diff options
Diffstat (limited to 'include/libimobiledevice/mobilesync.h')
| -rw-r--r-- | include/libimobiledevice/mobilesync.h | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/include/libimobiledevice/mobilesync.h b/include/libimobiledevice/mobilesync.h index 6b1af18..c3bc53d 100644 --- a/include/libimobiledevice/mobilesync.h +++ b/include/libimobiledevice/mobilesync.h | |||
| @@ -86,7 +86,7 @@ typedef mobilesync_anchors *mobilesync_anchors_t; | |||
| 86 | * @retval DEVICE_LINK_SERVICE_E_BAD_VERSION if the mobilesync version on | 86 | * @retval DEVICE_LINK_SERVICE_E_BAD_VERSION if the mobilesync version on |
| 87 | * the device is newer. | 87 | * the device is newer. |
| 88 | */ | 88 | */ |
| 89 | mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilesync_client_t * client); | 89 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilesync_client_t * client); |
| 90 | 90 | ||
| 91 | /** | 91 | /** |
| 92 | * Starts a new mobilesync service on the specified device and connects to it. | 92 | * Starts a new mobilesync service on the specified device and connects to it. |
| @@ -101,7 +101,7 @@ mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_des | |||
| 101 | * @return MOBILESYNC_E_SUCCESS on success, or an MOBILESYNC_E_* error | 101 | * @return MOBILESYNC_E_SUCCESS on success, or an MOBILESYNC_E_* error |
| 102 | * code otherwise. | 102 | * code otherwise. |
| 103 | */ | 103 | */ |
| 104 | mobilesync_error_t mobilesync_client_start_service(idevice_t device, mobilesync_client_t* client, const char* label); | 104 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_client_start_service(idevice_t device, mobilesync_client_t* client, const char* label); |
| 105 | 105 | ||
| 106 | /** | 106 | /** |
| 107 | * Disconnects a mobilesync client from the device and frees up the | 107 | * Disconnects a mobilesync client from the device and frees up the |
| @@ -112,7 +112,7 @@ mobilesync_error_t mobilesync_client_start_service(idevice_t device, mobilesync_ | |||
| 112 | * @retval MOBILESYNC_E_SUCCESS on success | 112 | * @retval MOBILESYNC_E_SUCCESS on success |
| 113 | * @retval MOBILESYNC_E_INVALID_ARG if \a client is NULL. | 113 | * @retval MOBILESYNC_E_INVALID_ARG if \a client is NULL. |
| 114 | */ | 114 | */ |
| 115 | mobilesync_error_t mobilesync_client_free(mobilesync_client_t client); | 115 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_client_free(mobilesync_client_t client); |
| 116 | 116 | ||
| 117 | 117 | ||
| 118 | /** | 118 | /** |
| @@ -123,7 +123,7 @@ mobilesync_error_t mobilesync_client_free(mobilesync_client_t client); | |||
| 123 | * | 123 | * |
| 124 | * @return an error code | 124 | * @return an error code |
| 125 | */ | 125 | */ |
| 126 | mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t *plist); | 126 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t *plist); |
| 127 | 127 | ||
| 128 | /** | 128 | /** |
| 129 | * Sends mobilesync data to the device | 129 | * Sends mobilesync data to the device |
| @@ -136,7 +136,7 @@ mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t *plist | |||
| 136 | * | 136 | * |
| 137 | * @return an error code | 137 | * @return an error code |
| 138 | */ | 138 | */ |
| 139 | mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist); | 139 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist); |
| 140 | 140 | ||
| 141 | 141 | ||
| 142 | /** | 142 | /** |
| @@ -159,7 +159,7 @@ mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist); | |||
| 159 | * @retval MOBILESYNC_E_CANCELLED if the device explicitly cancelled the | 159 | * @retval MOBILESYNC_E_CANCELLED if the device explicitly cancelled the |
| 160 | * sync request | 160 | * sync request |
| 161 | */ | 161 | */ |
| 162 | mobilesync_error_t mobilesync_start(mobilesync_client_t client, const char *data_class, mobilesync_anchors_t anchors, uint64_t computer_data_class_version, mobilesync_sync_type_t *sync_type, uint64_t *device_data_class_version, char** error_description); | 162 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_start(mobilesync_client_t client, const char *data_class, mobilesync_anchors_t anchors, uint64_t computer_data_class_version, mobilesync_sync_type_t *sync_type, uint64_t *device_data_class_version, char** error_description); |
| 163 | 163 | ||
| 164 | /** | 164 | /** |
| 165 | * Cancels a running synchronization session with a device at any time. | 165 | * Cancels a running synchronization session with a device at any time. |
| @@ -170,7 +170,7 @@ mobilesync_error_t mobilesync_start(mobilesync_client_t client, const char *data | |||
| 170 | * @retval MOBILESYNC_E_SUCCESS on success | 170 | * @retval MOBILESYNC_E_SUCCESS on success |
| 171 | * @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid | 171 | * @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid |
| 172 | */ | 172 | */ |
| 173 | mobilesync_error_t mobilesync_cancel(mobilesync_client_t client, const char* reason); | 173 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_cancel(mobilesync_client_t client, const char* reason); |
| 174 | 174 | ||
| 175 | /** | 175 | /** |
| 176 | * Finish a synchronization session of a data class on the device. | 176 | * Finish a synchronization session of a data class on the device. |
| @@ -183,7 +183,7 @@ mobilesync_error_t mobilesync_cancel(mobilesync_client_t client, const char* rea | |||
| 183 | * @retval MOBILESYNC_E_PLIST_ERROR if the received plist is not of valid | 183 | * @retval MOBILESYNC_E_PLIST_ERROR if the received plist is not of valid |
| 184 | * form | 184 | * form |
| 185 | */ | 185 | */ |
| 186 | mobilesync_error_t mobilesync_finish(mobilesync_client_t client); | 186 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_finish(mobilesync_client_t client); |
| 187 | 187 | ||
| 188 | 188 | ||
| 189 | /** | 189 | /** |
| @@ -196,7 +196,7 @@ mobilesync_error_t mobilesync_finish(mobilesync_client_t client); | |||
| 196 | * @retval MOBILESYNC_E_SUCCESS on success | 196 | * @retval MOBILESYNC_E_SUCCESS on success |
| 197 | * @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid | 197 | * @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid |
| 198 | */ | 198 | */ |
| 199 | mobilesync_error_t mobilesync_get_all_records_from_device(mobilesync_client_t client); | 199 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_get_all_records_from_device(mobilesync_client_t client); |
| 200 | 200 | ||
| 201 | /** | 201 | /** |
| 202 | * Requests to receive only changed records of the currently set data class from the device. | 202 | * Requests to receive only changed records of the currently set data class from the device. |
| @@ -208,7 +208,7 @@ mobilesync_error_t mobilesync_get_all_records_from_device(mobilesync_client_t cl | |||
| 208 | * @retval MOBILESYNC_E_SUCCESS on success | 208 | * @retval MOBILESYNC_E_SUCCESS on success |
| 209 | * @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid | 209 | * @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid |
| 210 | */ | 210 | */ |
| 211 | mobilesync_error_t mobilesync_get_changes_from_device(mobilesync_client_t client); | 211 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_get_changes_from_device(mobilesync_client_t client); |
| 212 | 212 | ||
| 213 | /** | 213 | /** |
| 214 | * Requests the device to delete all records of the current data class | 214 | * Requests the device to delete all records of the current data class |
| @@ -221,7 +221,7 @@ mobilesync_error_t mobilesync_get_changes_from_device(mobilesync_client_t client | |||
| 221 | * @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid | 221 | * @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid |
| 222 | * @retval MOBILESYNC_E_PLIST_ERROR if the received plist is not of valid form | 222 | * @retval MOBILESYNC_E_PLIST_ERROR if the received plist is not of valid form |
| 223 | */ | 223 | */ |
| 224 | mobilesync_error_t mobilesync_clear_all_records_on_device(mobilesync_client_t client); | 224 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_clear_all_records_on_device(mobilesync_client_t client); |
| 225 | 225 | ||
| 226 | 226 | ||
| 227 | /** | 227 | /** |
| @@ -237,7 +237,7 @@ mobilesync_error_t mobilesync_clear_all_records_on_device(mobilesync_client_t cl | |||
| 237 | * @retval MOBILESYNC_E_CANCELLED if the device explicitly cancelled the | 237 | * @retval MOBILESYNC_E_CANCELLED if the device explicitly cancelled the |
| 238 | * session | 238 | * session |
| 239 | */ | 239 | */ |
| 240 | mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist_t *entities, uint8_t *is_last_record, plist_t *actions); | 240 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist_t *entities, uint8_t *is_last_record, plist_t *actions); |
| 241 | 241 | ||
| 242 | /** | 242 | /** |
| 243 | * Acknowledges to the device that the changes have been merged on the computer | 243 | * Acknowledges to the device that the changes have been merged on the computer |
| @@ -247,7 +247,7 @@ mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist_ | |||
| 247 | * @retval MOBILESYNC_E_SUCCESS on success | 247 | * @retval MOBILESYNC_E_SUCCESS on success |
| 248 | * @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid | 248 | * @retval MOBILESYNC_E_INVALID_ARG if one of the parameters is invalid |
| 249 | */ | 249 | */ |
| 250 | mobilesync_error_t mobilesync_acknowledge_changes_from_device(mobilesync_client_t client); | 250 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_acknowledge_changes_from_device(mobilesync_client_t client); |
| 251 | 251 | ||
| 252 | 252 | ||
| 253 | /** | 253 | /** |
| @@ -267,7 +267,7 @@ mobilesync_error_t mobilesync_acknowledge_changes_from_device(mobilesync_client_ | |||
| 267 | * @retval MOBILESYNC_E_NOT_READY if the device is not ready to start | 267 | * @retval MOBILESYNC_E_NOT_READY if the device is not ready to start |
| 268 | * receiving any changes | 268 | * receiving any changes |
| 269 | */ | 269 | */ |
| 270 | mobilesync_error_t mobilesync_ready_to_send_changes_from_computer(mobilesync_client_t client); | 270 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_ready_to_send_changes_from_computer(mobilesync_client_t client); |
| 271 | 271 | ||
| 272 | 272 | ||
| 273 | /** | 273 | /** |
| @@ -284,7 +284,7 @@ mobilesync_error_t mobilesync_ready_to_send_changes_from_computer(mobilesync_cli | |||
| 284 | * @retval MOBILESYNC_E_WRONG_DIRECTION if the current sync direction does | 284 | * @retval MOBILESYNC_E_WRONG_DIRECTION if the current sync direction does |
| 285 | * not permit this call | 285 | * not permit this call |
| 286 | */ | 286 | */ |
| 287 | mobilesync_error_t mobilesync_send_changes(mobilesync_client_t client, plist_t entities, uint8_t is_last_record, plist_t actions); | 287 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_send_changes(mobilesync_client_t client, plist_t entities, uint8_t is_last_record, plist_t actions); |
| 288 | 288 | ||
| 289 | /** | 289 | /** |
| 290 | * Receives any remapped identifiers reported after the device merged submitted changes. | 290 | * Receives any remapped identifiers reported after the device merged submitted changes. |
| @@ -301,7 +301,7 @@ mobilesync_error_t mobilesync_send_changes(mobilesync_client_t client, plist_t e | |||
| 301 | * @retval MOBILESYNC_E_CANCELLED if the device explicitly cancelled the | 301 | * @retval MOBILESYNC_E_CANCELLED if the device explicitly cancelled the |
| 302 | * session | 302 | * session |
| 303 | */ | 303 | */ |
| 304 | mobilesync_error_t mobilesync_remap_identifiers(mobilesync_client_t client, plist_t *mapping); | 304 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_remap_identifiers(mobilesync_client_t client, plist_t *mapping); |
| 305 | 305 | ||
| 306 | /* Helper */ | 306 | /* Helper */ |
| 307 | 307 | ||
| @@ -314,14 +314,14 @@ mobilesync_error_t mobilesync_remap_identifiers(mobilesync_client_t client, plis | |||
| 314 | * | 314 | * |
| 315 | * @return A new #mobilesync_anchors_t struct. Must be freed using mobilesync_anchors_free(). | 315 | * @return A new #mobilesync_anchors_t struct. Must be freed using mobilesync_anchors_free(). |
| 316 | */ | 316 | */ |
| 317 | mobilesync_anchors_t mobilesync_anchors_new(const char *device_anchor, const char *computer_anchor); | 317 | LIBIMOBILEDEVICE_API mobilesync_anchors_t mobilesync_anchors_new(const char *device_anchor, const char *computer_anchor); |
| 318 | 318 | ||
| 319 | /** | 319 | /** |
| 320 | * Free memory used by anchors. | 320 | * Free memory used by anchors. |
| 321 | * | 321 | * |
| 322 | * @param anchors The anchors to free. | 322 | * @param anchors The anchors to free. |
| 323 | */ | 323 | */ |
| 324 | void mobilesync_anchors_free(mobilesync_anchors_t anchors); | 324 | LIBIMOBILEDEVICE_API void mobilesync_anchors_free(mobilesync_anchors_t anchors); |
| 325 | 325 | ||
| 326 | 326 | ||
| 327 | /** | 327 | /** |
| @@ -329,7 +329,7 @@ void mobilesync_anchors_free(mobilesync_anchors_t anchors); | |||
| 329 | * | 329 | * |
| 330 | * @return A new plist_t of type PLIST_DICT. | 330 | * @return A new plist_t of type PLIST_DICT. |
| 331 | */ | 331 | */ |
| 332 | plist_t mobilesync_actions_new(void); | 332 | LIBIMOBILEDEVICE_API plist_t mobilesync_actions_new(void); |
| 333 | 333 | ||
| 334 | /** | 334 | /** |
| 335 | * Add one or more new key:value pairs to the given actions plist. | 335 | * Add one or more new key:value pairs to the given actions plist. |
| @@ -343,14 +343,14 @@ plist_t mobilesync_actions_new(void); | |||
| 343 | * integer to use as a boolean value indicating that the device should | 343 | * integer to use as a boolean value indicating that the device should |
| 344 | * link submitted changes and report remapped identifiers. | 344 | * link submitted changes and report remapped identifiers. |
| 345 | */ | 345 | */ |
| 346 | void mobilesync_actions_add(plist_t actions, ...); | 346 | LIBIMOBILEDEVICE_API void mobilesync_actions_add(plist_t actions, ...); |
| 347 | 347 | ||
| 348 | /** | 348 | /** |
| 349 | * Free actions plist. | 349 | * Free actions plist. |
| 350 | * | 350 | * |
| 351 | * @param actions The actions plist to free. Does nothing if NULL is passed. | 351 | * @param actions The actions plist to free. Does nothing if NULL is passed. |
| 352 | */ | 352 | */ |
| 353 | void mobilesync_actions_free(plist_t actions); | 353 | LIBIMOBILEDEVICE_API void mobilesync_actions_free(plist_t actions); |
| 354 | 354 | ||
| 355 | #ifdef __cplusplus | 355 | #ifdef __cplusplus |
| 356 | } | 356 | } |
