summaryrefslogtreecommitdiffstats
path: root/src/service.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2022-04-12 02:56:18 +0200
committerGravatar Nikias Bassen2022-04-12 02:56:18 +0200
commit854ab9a5d9d04fb884459c5092f6620faa99673b (patch)
treec13e8ac64084e15cfabb09682dd19528dfa90b47 /src/service.c
parentdca3cf8c5bd804bf563fd43a6cdfdb1a5b85d490 (diff)
downloadlibimobiledevice-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/service.c')
-rw-r--r--src/service.c7
1 files changed, 7 insertions, 0 deletions
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;
+}