diff options
| author | 2022-04-12 02:56:18 +0200 | |
|---|---|---|
| committer | 2022-04-12 02:56:18 +0200 | |
| commit | 854ab9a5d9d04fb884459c5092f6620faa99673b (patch) | |
| tree | c13e8ac64084e15cfabb09682dd19528dfa90b47 /include/libimobiledevice | |
| 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 'include/libimobiledevice')
| -rw-r--r-- | include/libimobiledevice/property_list_service.h | 20 | ||||
| -rw-r--r-- | include/libimobiledevice/service.h | 10 |
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" { | |||
| 29 | #endif | 29 | #endif |
| 30 | 30 | ||
| 31 | #include <libimobiledevice/lockdown.h> | 31 | #include <libimobiledevice/lockdown.h> |
| 32 | #include <libimobiledevice/service.h> | ||
| 32 | 33 | ||
| 33 | /** Error Codes */ | 34 | /** Error Codes */ |
| 34 | typedef enum { | 35 | typedef enum { |
| @@ -147,8 +148,8 @@ property_list_service_error_t property_list_service_receive_plist(property_list_ | |||
| 147 | * should be enabled. | 148 | * should be enabled. |
| 148 | * | 149 | * |
| 149 | * @return PROPERTY_LIST_SERVICE_E_SUCCESS on success, | 150 | * @return PROPERTY_LIST_SERVICE_E_SUCCESS on success, |
| 150 | * PROPERTY_LIST_SERVICE_E_INVALID_ARG if client or client->connection is | 151 | * PROPERTY_LIST_SERVICE_E_INVALID_ARG if one or more of the arguments are invalid, |
| 151 | * NULL, PROPERTY_LIST_SERVICE_E_SSL_ERROR when SSL could not be enabled, | 152 | * PROPERTY_LIST_SERVICE_E_SSL_ERROR when SSL could not be enabled, |
| 152 | * or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR otherwise. | 153 | * or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR otherwise. |
| 153 | */ | 154 | */ |
| 154 | property_list_service_error_t property_list_service_enable_ssl(property_list_service_client_t client); | 155 | 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 | |||
| 160 | * should be disabled. | 161 | * should be disabled. |
| 161 | * | 162 | * |
| 162 | * @return PROPERTY_LIST_SERVICE_E_SUCCESS on success, | 163 | * @return PROPERTY_LIST_SERVICE_E_SUCCESS on success, |
| 163 | * PROPERTY_LIST_SERVICE_E_INVALID_ARG if client or client->connection is | 164 | * PROPERTY_LIST_SERVICE_E_INVALID_ARG if one or more of the arguments are invalid, |
| 164 | * NULL, or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR otherwise. | 165 | * or PROPERTY_LIST_SERVICE_E_UNKNOWN_ERROR otherwise. |
| 165 | */ | 166 | */ |
| 166 | property_list_service_error_t property_list_service_disable_ssl(property_list_service_client_t client); | 167 | property_list_service_error_t property_list_service_disable_ssl(property_list_service_client_t client); |
| 167 | 168 | ||
| 169 | /** | ||
| 170 | * Return a handle to the parent #service_client_t of the given property list service client. | ||
| 171 | * | ||
| 172 | * @param client The property list service client | ||
| 173 | * @param service_client Pointer to be assigned to the parent #service_client_t | ||
| 174 | * | ||
| 175 | * @return PROPERTY_LIST_SERVICE_E_SUCCESS on success, | ||
| 176 | * PROPERTY_LIST_SERVICE_E_INVALID_ARG if one or more of the arguments are invalid. | ||
| 177 | */ | ||
| 178 | property_list_service_error_t property_list_service_get_service_client(property_list_service_client_t client, service_client_t *service_client); | ||
| 179 | |||
| 168 | #ifdef __cplusplus | 180 | #ifdef __cplusplus |
| 169 | } | 181 | } |
| 170 | #endif | 182 | #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); | |||
| 184 | */ | 184 | */ |
| 185 | service_error_t service_disable_bypass_ssl(service_client_t client, uint8_t sslBypass); | 185 | service_error_t service_disable_bypass_ssl(service_client_t client, uint8_t sslBypass); |
| 186 | 186 | ||
| 187 | /** | ||
| 188 | * Return a handle to the parent #idevice_connection_t of the given service client. | ||
| 189 | * | ||
| 190 | * @param client The service client | ||
| 191 | * @param connection Pointer to be assigned to the #idevice_connection_t. | ||
| 192 | * | ||
| 193 | * @return SERVICE_E_SUCCESS on success, | ||
| 194 | * SERVICE_E_INVALID_ARG if one or more of the arguments are invalid. | ||
| 195 | */ | ||
| 196 | service_error_t service_get_connection(service_client_t client, idevice_connection_t *connection); | ||
| 187 | #ifdef __cplusplus | 197 | #ifdef __cplusplus |
| 188 | } | 198 | } |
| 189 | #endif | 199 | #endif |
