diff options
author | Nikias Bassen | 2022-04-12 02:56:18 +0200 |
---|---|---|
committer | Nikias Bassen | 2022-04-12 02:56:18 +0200 |
commit | 854ab9a5d9d04fb884459c5092f6620faa99673b (patch) | |
tree | c13e8ac64084e15cfabb09682dd19528dfa90b47 /src | |
parent | dca3cf8c5bd804bf563fd43a6cdfdb1a5b85d490 (diff) | |
download | libimobiledevice-854ab9a5d9d04fb884459c5092f6620faa99673b.tar.gz libimobiledevice-854ab9a5d9d04fb884459c5092f6620faa99673b.tar.bz2 |
Add property_list_client_get_service_client() and service_get_connection() functions
This allows for custom service implementations to easier switch to non-plist
communication after the service has been started.
Diffstat (limited to 'src')
-rw-r--r-- | src/property_list_service.c | 7 | ||||
-rw-r--r-- | src/service.c | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/property_list_service.c b/src/property_list_service.c index 7b5c738..4654b6e 100644 --- a/src/property_list_service.c +++ b/src/property_list_service.c @@ -286,3 +286,10 @@ LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_disable return service_to_property_list_service_error(service_disable_ssl(client->parent)); } +LIBIMOBILEDEVICE_API property_list_service_error_t property_list_service_get_service_client(property_list_service_client_t client, service_client_t *service_client) +{ + if (!client || !client->parent || !service_client) + return PROPERTY_LIST_SERVICE_E_INVALID_ARG; + *service_client = client->parent; + return PROPERTY_LIST_SERVICE_E_SUCCESS; +} diff --git a/src/service.c b/src/service.c index 0928bcd..6c9d109 100644 --- a/src/service.c +++ b/src/service.c @@ -198,3 +198,10 @@ LIBIMOBILEDEVICE_API service_error_t service_disable_bypass_ssl(service_client_t return idevice_to_service_error(idevice_connection_disable_bypass_ssl(client->connection, sslBypass)); } +LIBIMOBILEDEVICE_API service_error_t service_get_connection(service_client_t client, idevice_connection_t *connection) +{ + if (!client || !client->connection || !connection) + return SERVICE_E_INVALID_ARG; + *connection = client->connection; + return SERVICE_E_SUCCESS; +} |