diff options
| author | 2014-10-03 15:51:43 +0200 | |
|---|---|---|
| committer | 2014-10-03 16:29:42 +0200 | |
| commit | 4c4bbd31f52845de70f5b828121eeea62f8b4514 (patch) | |
| tree | 6655c2eeba4a9865752523e68d73e982e8a0d515 /src/mobilesync.c | |
| parent | d335f9350eef7b0140a249f92b791dc88b2900e5 (diff) | |
| download | libimobiledevice-4c4bbd31f52845de70f5b828121eeea62f8b4514.tar.gz libimobiledevice-4c4bbd31f52845de70f5b828121eeea62f8b4514.tar.bz2 | |
Avoid exporting non-public symbols
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) | |||
| 65 | return MOBILESYNC_E_UNKNOWN_ERROR; | 65 | return MOBILESYNC_E_UNKNOWN_ERROR; |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_descriptor_t service, | 68 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_descriptor_t service, |
| 69 | mobilesync_client_t * client) | 69 | mobilesync_client_t * client) |
| 70 | { | 70 | { |
| 71 | if (!device || !service || service->port == 0 || !client || *client) | 71 | if (!device || !service || service->port == 0 || !client || *client) |
| @@ -95,14 +95,14 @@ mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_des | |||
| 95 | return ret; | 95 | return ret; |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | mobilesync_error_t mobilesync_client_start_service(idevice_t device, mobilesync_client_t * client, const char* label) | 98 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_client_start_service(idevice_t device, mobilesync_client_t * client, const char* label) |
| 99 | { | 99 | { |
| 100 | mobilesync_error_t err = MOBILESYNC_E_UNKNOWN_ERROR; | 100 | mobilesync_error_t err = MOBILESYNC_E_UNKNOWN_ERROR; |
| 101 | service_client_factory_start_service(device, MOBILESYNC_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobilesync_client_new), &err); | 101 | service_client_factory_start_service(device, MOBILESYNC_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobilesync_client_new), &err); |
| 102 | return err; | 102 | return err; |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | mobilesync_error_t mobilesync_client_free(mobilesync_client_t client) | 105 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_client_free(mobilesync_client_t client) |
| 106 | { | 106 | { |
| 107 | if (!client) | 107 | if (!client) |
| 108 | return MOBILESYNC_E_INVALID_ARG; | 108 | return MOBILESYNC_E_INVALID_ARG; |
| @@ -112,7 +112,7 @@ mobilesync_error_t mobilesync_client_free(mobilesync_client_t client) | |||
| 112 | return err; | 112 | return err; |
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t * plist) | 115 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t * plist) |
| 116 | { | 116 | { |
| 117 | if (!client) | 117 | if (!client) |
| 118 | return MOBILESYNC_E_INVALID_ARG; | 118 | return MOBILESYNC_E_INVALID_ARG; |
| @@ -120,14 +120,14 @@ mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t * plis | |||
| 120 | return ret; | 120 | return ret; |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist) | 123 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist) |
| 124 | { | 124 | { |
| 125 | if (!client || !plist) | 125 | if (!client || !plist) |
| 126 | return MOBILESYNC_E_INVALID_ARG; | 126 | return MOBILESYNC_E_INVALID_ARG; |
| 127 | return mobilesync_error(device_link_service_send(client->parent, plist)); | 127 | return mobilesync_error(device_link_service_send(client->parent, plist)); |
| 128 | } | 128 | } |
| 129 | 129 | ||
| 130 | 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) | 130 | 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) |
| 131 | { | 131 | { |
| 132 | if (!client || client->data_class || !data_class || | 132 | if (!client || client->data_class || !data_class || |
| 133 | !anchors || !anchors->computer_anchor) { | 133 | !anchors || !anchors->computer_anchor) { |
| @@ -253,7 +253,7 @@ mobilesync_error_t mobilesync_start(mobilesync_client_t client, const char *data | |||
| 253 | return err; | 253 | return err; |
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | mobilesync_error_t mobilesync_finish(mobilesync_client_t client) | 256 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_finish(mobilesync_client_t client) |
| 257 | { | 257 | { |
| 258 | if (!client || !client->data_class) { | 258 | if (!client || !client->data_class) { |
| 259 | return MOBILESYNC_E_INVALID_ARG; | 259 | return MOBILESYNC_E_INVALID_ARG; |
| @@ -338,17 +338,17 @@ static mobilesync_error_t mobilesync_get_records(mobilesync_client_t client, con | |||
| 338 | return err; | 338 | return err; |
| 339 | } | 339 | } |
| 340 | 340 | ||
| 341 | mobilesync_error_t mobilesync_get_all_records_from_device(mobilesync_client_t client) | 341 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_get_all_records_from_device(mobilesync_client_t client) |
| 342 | { | 342 | { |
| 343 | return mobilesync_get_records(client, "SDMessageGetAllRecordsFromDevice"); | 343 | return mobilesync_get_records(client, "SDMessageGetAllRecordsFromDevice"); |
| 344 | } | 344 | } |
| 345 | 345 | ||
| 346 | mobilesync_error_t mobilesync_get_changes_from_device(mobilesync_client_t client) | 346 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_get_changes_from_device(mobilesync_client_t client) |
| 347 | { | 347 | { |
| 348 | return mobilesync_get_records(client, "SDMessageGetChangesFromDevice"); | 348 | return mobilesync_get_records(client, "SDMessageGetChangesFromDevice"); |
| 349 | } | 349 | } |
| 350 | 350 | ||
| 351 | mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist_t *entities, uint8_t *is_last_record, plist_t *actions) | 351 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist_t *entities, uint8_t *is_last_record, plist_t *actions) |
| 352 | { | 352 | { |
| 353 | if (!client || !client->data_class) { | 353 | if (!client || !client->data_class) { |
| 354 | return MOBILESYNC_E_INVALID_ARG; | 354 | return MOBILESYNC_E_INVALID_ARG; |
| @@ -415,7 +415,7 @@ mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist_ | |||
| 415 | return err; | 415 | return err; |
| 416 | } | 416 | } |
| 417 | 417 | ||
| 418 | mobilesync_error_t mobilesync_clear_all_records_on_device(mobilesync_client_t client) | 418 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_clear_all_records_on_device(mobilesync_client_t client) |
| 419 | { | 419 | { |
| 420 | if (!client || !client->data_class) { | 420 | if (!client || !client->data_class) { |
| 421 | return MOBILESYNC_E_INVALID_ARG; | 421 | return MOBILESYNC_E_INVALID_ARG; |
| @@ -484,7 +484,7 @@ mobilesync_error_t mobilesync_clear_all_records_on_device(mobilesync_client_t cl | |||
| 484 | return err; | 484 | return err; |
| 485 | } | 485 | } |
| 486 | 486 | ||
| 487 | mobilesync_error_t mobilesync_acknowledge_changes_from_device(mobilesync_client_t client) | 487 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_acknowledge_changes_from_device(mobilesync_client_t client) |
| 488 | { | 488 | { |
| 489 | if (!client || !client->data_class) { | 489 | if (!client || !client->data_class) { |
| 490 | return MOBILESYNC_E_INVALID_ARG; | 490 | return MOBILESYNC_E_INVALID_ARG; |
| @@ -518,7 +518,7 @@ static plist_t create_process_changes_message(const char *data_class, plist_t en | |||
| 518 | return msg; | 518 | return msg; |
| 519 | } | 519 | } |
| 520 | 520 | ||
| 521 | mobilesync_error_t mobilesync_ready_to_send_changes_from_computer(mobilesync_client_t client) | 521 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_ready_to_send_changes_from_computer(mobilesync_client_t client) |
| 522 | { | 522 | { |
| 523 | if (!client || !client->data_class) { | 523 | if (!client || !client->data_class) { |
| 524 | return MOBILESYNC_E_INVALID_ARG; | 524 | return MOBILESYNC_E_INVALID_ARG; |
| @@ -585,7 +585,7 @@ mobilesync_error_t mobilesync_ready_to_send_changes_from_computer(mobilesync_cli | |||
| 585 | return err; | 585 | return err; |
| 586 | } | 586 | } |
| 587 | 587 | ||
| 588 | mobilesync_error_t mobilesync_send_changes(mobilesync_client_t client, plist_t entities, uint8_t is_last_record, plist_t actions) | 588 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_send_changes(mobilesync_client_t client, plist_t entities, uint8_t is_last_record, plist_t actions) |
| 589 | { | 589 | { |
| 590 | if (!client || !client->data_class || !entities) { | 590 | if (!client || !client->data_class || !entities) { |
| 591 | return MOBILESYNC_E_INVALID_ARG; | 591 | return MOBILESYNC_E_INVALID_ARG; |
| @@ -613,7 +613,7 @@ mobilesync_error_t mobilesync_send_changes(mobilesync_client_t client, plist_t e | |||
| 613 | return err; | 613 | return err; |
| 614 | } | 614 | } |
| 615 | 615 | ||
| 616 | mobilesync_error_t mobilesync_remap_identifiers(mobilesync_client_t client, plist_t *mapping) | 616 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_remap_identifiers(mobilesync_client_t client, plist_t *mapping) |
| 617 | { | 617 | { |
| 618 | if (!client || !client->data_class) { | 618 | if (!client || !client->data_class) { |
| 619 | return MOBILESYNC_E_INVALID_ARG; | 619 | return MOBILESYNC_E_INVALID_ARG; |
| @@ -682,7 +682,7 @@ mobilesync_error_t mobilesync_remap_identifiers(mobilesync_client_t client, plis | |||
| 682 | return err; | 682 | return err; |
| 683 | } | 683 | } |
| 684 | 684 | ||
| 685 | mobilesync_error_t mobilesync_cancel(mobilesync_client_t client, const char* reason) | 685 | LIBIMOBILEDEVICE_API mobilesync_error_t mobilesync_cancel(mobilesync_client_t client, const char* reason) |
| 686 | { | 686 | { |
| 687 | if (!client || !client->data_class || !reason) { | 687 | if (!client || !client->data_class || !reason) { |
| 688 | return MOBILESYNC_E_INVALID_ARG; | 688 | return MOBILESYNC_E_INVALID_ARG; |
| @@ -708,7 +708,7 @@ mobilesync_error_t mobilesync_cancel(mobilesync_client_t client, const char* rea | |||
| 708 | return err; | 708 | return err; |
| 709 | } | 709 | } |
| 710 | 710 | ||
| 711 | mobilesync_anchors_t mobilesync_anchors_new(const char *device_anchor, const char *computer_anchor) | 711 | LIBIMOBILEDEVICE_API mobilesync_anchors_t mobilesync_anchors_new(const char *device_anchor, const char *computer_anchor) |
| 712 | { | 712 | { |
| 713 | mobilesync_anchors_t anchors = (mobilesync_anchors_t) malloc(sizeof(mobilesync_anchors)); | 713 | mobilesync_anchors_t anchors = (mobilesync_anchors_t) malloc(sizeof(mobilesync_anchors)); |
| 714 | if (device_anchor != NULL) { | 714 | if (device_anchor != NULL) { |
| @@ -725,7 +725,7 @@ mobilesync_anchors_t mobilesync_anchors_new(const char *device_anchor, const cha | |||
| 725 | return anchors; | 725 | return anchors; |
| 726 | } | 726 | } |
| 727 | 727 | ||
| 728 | void mobilesync_anchors_free(mobilesync_anchors_t anchors) | 728 | LIBIMOBILEDEVICE_API void mobilesync_anchors_free(mobilesync_anchors_t anchors) |
| 729 | { | 729 | { |
| 730 | if (anchors->device_anchor != NULL) { | 730 | if (anchors->device_anchor != NULL) { |
| 731 | free(anchors->device_anchor); | 731 | free(anchors->device_anchor); |
| @@ -739,12 +739,12 @@ void mobilesync_anchors_free(mobilesync_anchors_t anchors) | |||
| 739 | anchors = NULL; | 739 | anchors = NULL; |
| 740 | } | 740 | } |
| 741 | 741 | ||
| 742 | plist_t mobilesync_actions_new() | 742 | LIBIMOBILEDEVICE_API plist_t mobilesync_actions_new() |
| 743 | { | 743 | { |
| 744 | return plist_new_dict(); | 744 | return plist_new_dict(); |
| 745 | } | 745 | } |
| 746 | 746 | ||
| 747 | void mobilesync_actions_add(plist_t actions, ...) | 747 | LIBIMOBILEDEVICE_API void mobilesync_actions_add(plist_t actions, ...) |
| 748 | { | 748 | { |
| 749 | if (!actions) | 749 | if (!actions) |
| 750 | return; | 750 | return; |
| @@ -776,7 +776,7 @@ void mobilesync_actions_add(plist_t actions, ...) | |||
| 776 | va_end(args); | 776 | va_end(args); |
| 777 | } | 777 | } |
| 778 | 778 | ||
| 779 | void mobilesync_actions_free(plist_t actions) | 779 | LIBIMOBILEDEVICE_API void mobilesync_actions_free(plist_t actions) |
| 780 | { | 780 | { |
| 781 | if (actions) { | 781 | if (actions) { |
| 782 | plist_free(actions); | 782 | plist_free(actions); |
