summaryrefslogtreecommitdiffstats
path: root/include/libimobiledevice
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 /include/libimobiledevice
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 'include/libimobiledevice')
-rw-r--r--include/libimobiledevice/property_list_service.h20
-rw-r--r--include/libimobiledevice/service.h10
2 files changed, 26 insertions, 4 deletions
diff --git a/include/libimobiledevice/property_list_service.h b/include/libimobiledevice/property_list_service.h
index 5205551..3f6ebad 100644
--- a/include/libimobiledevice/property_list_service.h
+++ b/include/libimobiledevice/property_list_service.h
@@ -29,6 +29,7 @@ extern "C" {
#endif
#include <libimobiledevice/lockdown.h>
+#include <libimobiledevice/service.h>
/** Error Codes */
typedef enum {
@@ -147,8 +148,8 @@ property_list_service_error_t property_list_service_receive_plist(property_list_
* should be enabled.
*
* @return PROPERTY_LIST_SERVICE_E_SUCCESS on success,
- * PROPERTY_LIST_SERVICE_E_INVALID_ARG if client or client->connection is
- * NULL, PROPERTY_LIST_SERVICE_E_SSL_ERROR when SSL could not be enabled,
+ * PROPERTY_LIST_SERVICE_E_INVALID_ARG if one or more of the arguments are invalid,
+ * PROPERTY_LIST_SERVICE_E_SSL_ERROR when SSL could not be enabled,
* or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR otherwise.
*/
property_list_service_error_t property_list_service_enable_ssl(property_list_service_client_t client);
@@ -160,11 +161,22 @@ property_list_service_error_t property_list_service_enable_ssl(property_list_ser
* should be disabled.
*
* @return PROPERTY_LIST_SERVICE_E_SUCCESS on success,
- * PROPERTY_LIST_SERVICE_E_INVALID_ARG if client or client->connection is
- * NULL, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR otherwise.
+ * PROPERTY_LIST_SERVICE_E_INVALID_ARG if one or more of the arguments are invalid,
+ * or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR otherwise.
*/
property_list_service_error_t property_list_service_disable_ssl(property_list_service_client_t client);
+/**
+ * Return a handle to the parent #service_client_t of the given property list service client.
+ *
+ * @param client The property list service client
+ * @param service_client Pointer to be assigned to the parent #service_client_t
+ *
+ * @return PROPERTY_LIST_SERVICE_E_SUCCESS on success,
+ * PROPERTY_LIST_SERVICE_E_INVALID_ARG if one or more of the arguments are invalid.
+ */
+property_list_service_error_t property_list_service_get_service_client(property_list_service_client_t client, service_client_t *service_client);
+
#ifdef __cplusplus
}
#endif
diff --git a/include/libimobiledevice/service.h b/include/libimobiledevice/service.h
index 6842054..28b6db6 100644
--- a/include/libimobiledevice/service.h
+++ b/include/libimobiledevice/service.h
@@ -184,6 +184,16 @@ service_error_t service_disable_ssl(service_client_t client);
*/
service_error_t service_disable_bypass_ssl(service_client_t client, uint8_t sslBypass);
+/**
+ * Return a handle to the parent #idevice_connection_t of the given service client.
+ *
+ * @param client The service client
+ * @param connection Pointer to be assigned to the #idevice_connection_t.
+ *
+ * @return SERVICE_E_SUCCESS on success,
+ * SERVICE_E_INVALID_ARG if one or more of the arguments are invalid.
+ */
+service_error_t service_get_connection(service_client_t client, idevice_connection_t *connection);
#ifdef __cplusplus
}
#endif