diff options
author | 2024-01-31 02:57:11 +0100 | |
---|---|---|
committer | 2024-01-31 02:57:11 +0100 | |
commit | 63bbac545efc400373a7f472fdd78174149119c3 (patch) | |
tree | f95c8d58b7b0fbf33bd188c5becc0401ee7e64ef /src/mobilebackup2.c | |
parent | f723a44513eb5ba5797da24bc2b63d9f09600a6e (diff) | |
download | libimobiledevice-63bbac545efc400373a7f472fdd78174149119c3.tar.gz libimobiledevice-63bbac545efc400373a7f472fdd78174149119c3.tar.bz2 |
Move LIBIMOBILEDEVICE_API to public headers
Diffstat (limited to 'src/mobilebackup2.c')
-rw-r--r-- | src/mobilebackup2.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mobilebackup2.c b/src/mobilebackup2.c index 3726065..a8d673f 100644 --- a/src/mobilebackup2.c +++ b/src/mobilebackup2.c | |||
@@ -68,7 +68,7 @@ static mobilebackup2_error_t mobilebackup2_error(device_link_service_error_t err | |||
68 | return MOBILEBACKUP2_E_UNKNOWN_ERROR; | 68 | return MOBILEBACKUP2_E_UNKNOWN_ERROR; |
69 | } | 69 | } |
70 | 70 | ||
71 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_client_new(idevice_t device, lockdownd_service_descriptor_t service, | 71 | mobilebackup2_error_t mobilebackup2_client_new(idevice_t device, lockdownd_service_descriptor_t service, |
72 | mobilebackup2_client_t * client) | 72 | mobilebackup2_client_t * client) |
73 | { | 73 | { |
74 | if (!device || !service || service->port == 0 || !client || *client) | 74 | if (!device || !service || service->port == 0 || !client || *client) |
@@ -96,14 +96,14 @@ LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_client_new(idevice_t de | |||
96 | return ret; | 96 | return ret; |
97 | } | 97 | } |
98 | 98 | ||
99 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_client_start_service(idevice_t device, mobilebackup2_client_t * client, const char* label) | 99 | mobilebackup2_error_t mobilebackup2_client_start_service(idevice_t device, mobilebackup2_client_t * client, const char* label) |
100 | { | 100 | { |
101 | mobilebackup2_error_t err = MOBILEBACKUP2_E_UNKNOWN_ERROR; | 101 | mobilebackup2_error_t err = MOBILEBACKUP2_E_UNKNOWN_ERROR; |
102 | service_client_factory_start_service(device, MOBILEBACKUP2_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobilebackup2_client_new), &err); | 102 | service_client_factory_start_service(device, MOBILEBACKUP2_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobilebackup2_client_new), &err); |
103 | return err; | 103 | return err; |
104 | } | 104 | } |
105 | 105 | ||
106 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_client_free(mobilebackup2_client_t client) | 106 | mobilebackup2_error_t mobilebackup2_client_free(mobilebackup2_client_t client) |
107 | { | 107 | { |
108 | if (!client) | 108 | if (!client) |
109 | return MOBILEBACKUP2_E_INVALID_ARG; | 109 | return MOBILEBACKUP2_E_INVALID_ARG; |
@@ -116,7 +116,7 @@ LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_client_free(mobilebacku | |||
116 | return err; | 116 | return err; |
117 | } | 117 | } |
118 | 118 | ||
119 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_message(mobilebackup2_client_t client, const char *message, plist_t options) | 119 | mobilebackup2_error_t mobilebackup2_send_message(mobilebackup2_client_t client, const char *message, plist_t options) |
120 | { | 120 | { |
121 | if (!client || !client->parent || (!message && !options)) | 121 | if (!client || !client->parent || (!message && !options)) |
122 | return MOBILEBACKUP2_E_INVALID_ARG; | 122 | return MOBILEBACKUP2_E_INVALID_ARG; |
@@ -214,12 +214,12 @@ leave: | |||
214 | return err; | 214 | return err; |
215 | } | 215 | } |
216 | 216 | ||
217 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_receive_message(mobilebackup2_client_t client, plist_t *msg_plist, char **dlmessage) | 217 | mobilebackup2_error_t mobilebackup2_receive_message(mobilebackup2_client_t client, plist_t *msg_plist, char **dlmessage) |
218 | { | 218 | { |
219 | return mobilebackup2_error(device_link_service_receive_message(client->parent, msg_plist, dlmessage)); | 219 | return mobilebackup2_error(device_link_service_receive_message(client->parent, msg_plist, dlmessage)); |
220 | } | 220 | } |
221 | 221 | ||
222 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_client_t client, const char *data, uint32_t length, uint32_t *bytes) | 222 | mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_client_t client, const char *data, uint32_t length, uint32_t *bytes) |
223 | { | 223 | { |
224 | if (!client || !client->parent || !data || (length == 0) || !bytes) | 224 | if (!client || !client->parent || !data || (length == 0) || !bytes) |
225 | return MOBILEBACKUP2_E_INVALID_ARG; | 225 | return MOBILEBACKUP2_E_INVALID_ARG; |
@@ -244,7 +244,7 @@ LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_ | |||
244 | return MOBILEBACKUP2_E_MUX_ERROR; | 244 | return MOBILEBACKUP2_E_MUX_ERROR; |
245 | } | 245 | } |
246 | 246 | ||
247 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_receive_raw(mobilebackup2_client_t client, char *data, uint32_t length, uint32_t *bytes) | 247 | mobilebackup2_error_t mobilebackup2_receive_raw(mobilebackup2_client_t client, char *data, uint32_t length, uint32_t *bytes) |
248 | { | 248 | { |
249 | if (!client || !client->parent || !data || (length == 0) || !bytes) | 249 | if (!client || !client->parent || !data || (length == 0) || !bytes) |
250 | return MOBILEBACKUP2_E_INVALID_ARG; | 250 | return MOBILEBACKUP2_E_INVALID_ARG; |
@@ -271,7 +271,7 @@ LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_receive_raw(mobilebacku | |||
271 | return MOBILEBACKUP2_E_MUX_ERROR; | 271 | return MOBILEBACKUP2_E_MUX_ERROR; |
272 | } | 272 | } |
273 | 273 | ||
274 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_version_exchange(mobilebackup2_client_t client, double local_versions[], char count, double *remote_version) | 274 | mobilebackup2_error_t mobilebackup2_version_exchange(mobilebackup2_client_t client, double local_versions[], char count, double *remote_version) |
275 | { | 275 | { |
276 | int i; | 276 | int i; |
277 | 277 | ||
@@ -329,7 +329,7 @@ leave: | |||
329 | return err; | 329 | return err; |
330 | } | 330 | } |
331 | 331 | ||
332 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_request(mobilebackup2_client_t client, const char *request, const char *target_identifier, const char *source_identifier, plist_t options) | 332 | mobilebackup2_error_t mobilebackup2_send_request(mobilebackup2_client_t client, const char *request, const char *target_identifier, const char *source_identifier, plist_t options) |
333 | { | 333 | { |
334 | if (!client || !client->parent || !request || !target_identifier) | 334 | if (!client || !client->parent || !request || !target_identifier) |
335 | return MOBILEBACKUP2_E_INVALID_ARG; | 335 | return MOBILEBACKUP2_E_INVALID_ARG; |
@@ -360,7 +360,7 @@ LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_request(mobileback | |||
360 | return err; | 360 | return err; |
361 | } | 361 | } |
362 | 362 | ||
363 | LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_status_response(mobilebackup2_client_t client, int status_code, const char *status1, plist_t status2) | 363 | mobilebackup2_error_t mobilebackup2_send_status_response(mobilebackup2_client_t client, int status_code, const char *status1, plist_t status2) |
364 | { | 364 | { |
365 | if (!client || !client->parent) | 365 | if (!client || !client->parent) |
366 | return MOBILEBACKUP2_E_INVALID_ARG; | 366 | return MOBILEBACKUP2_E_INVALID_ARG; |