diff options
Diffstat (limited to 'src/mobilesync.c')
-rw-r--r-- | src/mobilesync.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/mobilesync.c b/src/mobilesync.c index f0fc4b2..6138762 100644 --- a/src/mobilesync.c +++ b/src/mobilesync.c @@ -65,7 +65,7 @@ static mobilesync_error_t mobilesync_error(device_link_service_error_t err) return MOBILESYNC_E_UNKNOWN_ERROR; } -mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_descriptor_t service, +LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilesync_client_t * client) { if (!device || !service || service->port == 0 || !client || *client) @@ -95,14 +95,14 @@ mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_des return ret; } -mobilesync_error_t mobilesync_client_start_service(idevice_t device, mobilesync_client_t * client, const char* label) +LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_client_start_service(idevice_t device, mobilesync_client_t * client, const char* label) { mobilesync_error_t err = MOBILESYNC_E_UNKNOWN_ERROR; service_client_factory_start_service(device, MOBILESYNC_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobilesync_client_new), &err); return err; } -mobilesync_error_t mobilesync_client_free(mobilesync_client_t client) +LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_client_free(mobilesync_client_t client) { if (!client) return MOBILESYNC_E_INVALID_ARG; @@ -112,7 +112,7 @@ mobilesync_error_t mobilesync_client_free(mobilesync_client_t client) return err; } -mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t * plist) +LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t * plist) { if (!client) return MOBILESYNC_E_INVALID_ARG; @@ -120,14 +120,14 @@ mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t * plis return ret; } -mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist) +LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist) { if (!client || !plist) return MOBILESYNC_E_INVALID_ARG; return mobilesync_error(device_link_service_send(client->parent, plist)); } -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) +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) { if (!client || client->data_class || !data_class || !anchors || !anchors->computer_anchor) { @@ -253,7 +253,7 @@ mobilesync_error_t mobilesync_start(mobilesync_client_t client, const char *data return err; } -mobilesync_error_t mobilesync_finish(mobilesync_client_t client) +LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_finish(mobilesync_client_t client) { if (!client || !client->data_class) { return MOBILESYNC_E_INVALID_ARG; @@ -338,17 +338,17 @@ static mobilesync_error_t mobilesync_get_records(mobilesync_client_t client, con return err; } -mobilesync_error_t mobilesync_get_all_records_from_device(mobilesync_client_t client) +LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_get_all_records_from_device(mobilesync_client_t client) { return mobilesync_get_records(client, "SDMessageGetAllRecordsFromDevice"); } -mobilesync_error_t mobilesync_get_changes_from_device(mobilesync_client_t client) +LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_get_changes_from_device(mobilesync_client_t client) { return mobilesync_get_records(client, "SDMessageGetChangesFromDevice"); } -mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist_t *entities, uint8_t *is_last_record, plist_t *actions) +LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist_t *entities, uint8_t *is_last_record, plist_t *actions) { if (!client || !client->data_class) { return MOBILESYNC_E_INVALID_ARG; @@ -415,7 +415,7 @@ mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist_ return err; } -mobilesync_error_t mobilesync_clear_all_records_on_device(mobilesync_client_t client) +LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_clear_all_records_on_device(mobilesync_client_t client) { if (!client || !client->data_class) { return MOBILESYNC_E_INVALID_ARG; @@ -484,7 +484,7 @@ mobilesync_error_t mobilesync_clear_all_records_on_device(mobilesync_client_t cl return err; } -mobilesync_error_t mobilesync_acknowledge_changes_from_device(mobilesync_client_t client) +LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_acknowledge_changes_from_device(mobilesync_client_t client) { if (!client || !client->data_class) { return MOBILESYNC_E_INVALID_ARG; @@ -518,7 +518,7 @@ static plist_t create_process_changes_message(const char *data_class, plist_t en return msg; } -mobilesync_error_t mobilesync_ready_to_send_changes_from_computer(mobilesync_client_t client) +LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_ready_to_send_changes_from_computer(mobilesync_client_t client) { if (!client || !client->data_class) { return MOBILESYNC_E_INVALID_ARG; @@ -585,7 +585,7 @@ mobilesync_error_t mobilesync_ready_to_send_changes_from_computer(mobilesync_cli return err; } -mobilesync_error_t mobilesync_send_changes(mobilesync_client_t client, plist_t entities, uint8_t is_last_record, plist_t actions) +LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_send_changes(mobilesync_client_t client, plist_t entities, uint8_t is_last_record, plist_t actions) { if (!client || !client->data_class || !entities) { return MOBILESYNC_E_INVALID_ARG; @@ -613,7 +613,7 @@ mobilesync_error_t mobilesync_send_changes(mobilesync_client_t client, plist_t e return err; } -mobilesync_error_t mobilesync_remap_identifiers(mobilesync_client_t client, plist_t *mapping) +LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_remap_identifiers(mobilesync_client_t client, plist_t *mapping) { if (!client || !client->data_class) { return MOBILESYNC_E_INVALID_ARG; @@ -682,7 +682,7 @@ mobilesync_error_t mobilesync_remap_identifiers(mobilesync_client_t client, plis return err; } -mobilesync_error_t mobilesync_cancel(mobilesync_client_t client, const char* reason) +LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_cancel(mobilesync_client_t client, const char* reason) { if (!client || !client->data_class || !reason) { return MOBILESYNC_E_INVALID_ARG; @@ -708,7 +708,7 @@ mobilesync_error_t mobilesync_cancel(mobilesync_client_t client, const char* rea return err; } -mobilesync_anchors_t mobilesync_anchors_new(const char *device_anchor, const char *computer_anchor) +LIBIMOBILEDEVICE_API mobilesync_anchors_t mobilesync_anchors_new(const char *device_anchor, const char *computer_anchor) { mobilesync_anchors_t anchors = (mobilesync_anchors_t) malloc(sizeof(mobilesync_anchors)); if (device_anchor != NULL) { @@ -725,7 +725,7 @@ mobilesync_anchors_t mobilesync_anchors_new(const char *device_anchor, const cha return anchors; } -void mobilesync_anchors_free(mobilesync_anchors_t anchors) +LIBIMOBILEDEVICE_API void mobilesync_anchors_free(mobilesync_anchors_t anchors) { if (anchors->device_anchor != NULL) { free(anchors->device_anchor); @@ -739,12 +739,12 @@ void mobilesync_anchors_free(mobilesync_anchors_t anchors) anchors = NULL; } -plist_t mobilesync_actions_new() +LIBIMOBILEDEVICE_API plist_t mobilesync_actions_new() { return plist_new_dict(); } -void mobilesync_actions_add(plist_t actions, ...) +LIBIMOBILEDEVICE_API void mobilesync_actions_add(plist_t actions, ...) { if (!actions) return; @@ -776,7 +776,7 @@ void mobilesync_actions_add(plist_t actions, ...) va_end(args); } -void mobilesync_actions_free(plist_t actions) +LIBIMOBILEDEVICE_API void mobilesync_actions_free(plist_t actions) { if (actions) { plist_free(actions); |