diff options
| author | 2014-10-03 15:51:43 +0200 | |
|---|---|---|
| committer | 2014-10-03 16:29:42 +0200 | |
| commit | 4c4bbd31f52845de70f5b828121eeea62f8b4514 (patch) | |
| tree | 6655c2eeba4a9865752523e68d73e982e8a0d515 /src/afc.c | |
| parent | d335f9350eef7b0140a249f92b791dc88b2900e5 (diff) | |
| download | libimobiledevice-4c4bbd31f52845de70f5b828121eeea62f8b4514.tar.gz libimobiledevice-4c4bbd31f52845de70f5b828121eeea62f8b4514.tar.bz2 | |
Avoid exporting non-public symbols
Diffstat (limited to 'src/afc.c')
| -rw-r--r-- | src/afc.c | 48 |
1 files changed, 24 insertions, 24 deletions
| @@ -68,7 +68,7 @@ static void afc_unlock(afc_client_t client) | |||
| 68 | * invalid, or AFC_E_NO_MEM if there is a memory allocation problem. | 68 | * invalid, or AFC_E_NO_MEM if there is a memory allocation problem. |
| 69 | */ | 69 | */ |
| 70 | 70 | ||
| 71 | afc_error_t afc_client_new_with_service_client(service_client_t service_client, afc_client_t *client) | 71 | LIBIMOBILEDEVICE_API afc_error_t afc_client_new_with_service_client(service_client_t service_client, afc_client_t *client) |
| 72 | { | 72 | { |
| 73 | if (!service_client) | 73 | if (!service_client) |
| 74 | return AFC_E_INVALID_ARG; | 74 | return AFC_E_INVALID_ARG; |
| @@ -96,7 +96,7 @@ afc_error_t afc_client_new_with_service_client(service_client_t service_client, | |||
| 96 | return AFC_E_SUCCESS; | 96 | return AFC_E_SUCCESS; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | afc_error_t afc_client_new(idevice_t device, lockdownd_service_descriptor_t service, afc_client_t * client) | 99 | LIBIMOBILEDEVICE_API afc_error_t afc_client_new(idevice_t device, lockdownd_service_descriptor_t service, afc_client_t * client) |
| 100 | { | 100 | { |
| 101 | if (!device || !service || service->port == 0) | 101 | if (!device || !service || service->port == 0) |
| 102 | return AFC_E_INVALID_ARG; | 102 | return AFC_E_INVALID_ARG; |
| @@ -115,14 +115,14 @@ afc_error_t afc_client_new(idevice_t device, lockdownd_service_descriptor_t serv | |||
| 115 | return err; | 115 | return err; |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | afc_error_t afc_client_start_service(idevice_t device, afc_client_t * client, const char* label) | 118 | LIBIMOBILEDEVICE_API afc_error_t afc_client_start_service(idevice_t device, afc_client_t * client, const char* label) |
| 119 | { | 119 | { |
| 120 | afc_error_t err = AFC_E_UNKNOWN_ERROR; | 120 | afc_error_t err = AFC_E_UNKNOWN_ERROR; |
| 121 | service_client_factory_start_service(device, AFC_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(afc_client_new), &err); | 121 | service_client_factory_start_service(device, AFC_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(afc_client_new), &err); |
| 122 | return err; | 122 | return err; |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | afc_error_t afc_client_free(afc_client_t client) | 125 | LIBIMOBILEDEVICE_API afc_error_t afc_client_free(afc_client_t client) |
| 126 | { | 126 | { |
| 127 | if (!client || !client->afc_packet) | 127 | if (!client || !client->afc_packet) |
| 128 | return AFC_E_INVALID_ARG; | 128 | return AFC_E_INVALID_ARG; |
| @@ -402,7 +402,7 @@ static char **make_strings_list(char *tokens, uint32_t length) | |||
| 402 | return list; | 402 | return list; |
| 403 | } | 403 | } |
| 404 | 404 | ||
| 405 | afc_error_t afc_read_directory(afc_client_t client, const char *path, char ***directory_information) | 405 | LIBIMOBILEDEVICE_API afc_error_t afc_read_directory(afc_client_t client, const char *path, char ***directory_information) |
| 406 | { | 406 | { |
| 407 | uint32_t bytes = 0; | 407 | uint32_t bytes = 0; |
| 408 | char *data = NULL, **list_loc = NULL; | 408 | char *data = NULL, **list_loc = NULL; |
| @@ -438,7 +438,7 @@ afc_error_t afc_read_directory(afc_client_t client, const char *path, char ***di | |||
| 438 | return ret; | 438 | return ret; |
| 439 | } | 439 | } |
| 440 | 440 | ||
| 441 | afc_error_t afc_get_device_info(afc_client_t client, char ***device_information) | 441 | LIBIMOBILEDEVICE_API afc_error_t afc_get_device_info(afc_client_t client, char ***device_information) |
| 442 | { | 442 | { |
| 443 | uint32_t bytes = 0; | 443 | uint32_t bytes = 0; |
| 444 | char *data = NULL, **list = NULL; | 444 | char *data = NULL, **list = NULL; |
| @@ -475,7 +475,7 @@ afc_error_t afc_get_device_info(afc_client_t client, char ***device_information) | |||
| 475 | return ret; | 475 | return ret; |
| 476 | } | 476 | } |
| 477 | 477 | ||
| 478 | afc_error_t afc_get_device_info_key(afc_client_t client, const char *key, char **value) | 478 | LIBIMOBILEDEVICE_API afc_error_t afc_get_device_info_key(afc_client_t client, const char *key, char **value) |
| 479 | { | 479 | { |
| 480 | afc_error_t ret = AFC_E_INTERNAL_ERROR; | 480 | afc_error_t ret = AFC_E_INTERNAL_ERROR; |
| 481 | char **kvps, **ptr; | 481 | char **kvps, **ptr; |
| @@ -502,7 +502,7 @@ afc_error_t afc_get_device_info_key(afc_client_t client, const char *key, char * | |||
| 502 | return ret; | 502 | return ret; |
| 503 | } | 503 | } |
| 504 | 504 | ||
| 505 | afc_error_t afc_remove_path(afc_client_t client, const char *path) | 505 | LIBIMOBILEDEVICE_API afc_error_t afc_remove_path(afc_client_t client, const char *path) |
| 506 | { | 506 | { |
| 507 | uint32_t bytes = 0; | 507 | uint32_t bytes = 0; |
| 508 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; | 508 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; |
| @@ -530,7 +530,7 @@ afc_error_t afc_remove_path(afc_client_t client, const char *path) | |||
| 530 | return ret; | 530 | return ret; |
| 531 | } | 531 | } |
| 532 | 532 | ||
| 533 | afc_error_t afc_rename_path(afc_client_t client, const char *from, const char *to) | 533 | LIBIMOBILEDEVICE_API afc_error_t afc_rename_path(afc_client_t client, const char *from, const char *to) |
| 534 | { | 534 | { |
| 535 | if (!client || !from || !to || !client->afc_packet || !client->parent) | 535 | if (!client || !from || !to || !client->afc_packet || !client->parent) |
| 536 | return AFC_E_INVALID_ARG; | 536 | return AFC_E_INVALID_ARG; |
| @@ -559,7 +559,7 @@ afc_error_t afc_rename_path(afc_client_t client, const char *from, const char *t | |||
| 559 | return ret; | 559 | return ret; |
| 560 | } | 560 | } |
| 561 | 561 | ||
| 562 | afc_error_t afc_make_directory(afc_client_t client, const char *path) | 562 | LIBIMOBILEDEVICE_API afc_error_t afc_make_directory(afc_client_t client, const char *path) |
| 563 | { | 563 | { |
| 564 | uint32_t bytes = 0; | 564 | uint32_t bytes = 0; |
| 565 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; | 565 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; |
| @@ -583,7 +583,7 @@ afc_error_t afc_make_directory(afc_client_t client, const char *path) | |||
| 583 | return ret; | 583 | return ret; |
| 584 | } | 584 | } |
| 585 | 585 | ||
| 586 | afc_error_t afc_get_file_info(afc_client_t client, const char *path, char ***file_information) | 586 | LIBIMOBILEDEVICE_API afc_error_t afc_get_file_info(afc_client_t client, const char *path, char ***file_information) |
| 587 | { | 587 | { |
| 588 | char *received = NULL; | 588 | char *received = NULL; |
| 589 | uint32_t bytes = 0; | 589 | uint32_t bytes = 0; |
| @@ -613,7 +613,7 @@ afc_error_t afc_get_file_info(afc_client_t client, const char *path, char ***fil | |||
| 613 | return ret; | 613 | return ret; |
| 614 | } | 614 | } |
| 615 | 615 | ||
| 616 | afc_error_t afc_file_open(afc_client_t client, const char *filename, afc_file_mode_t file_mode, uint64_t *handle) | 616 | LIBIMOBILEDEVICE_API afc_error_t afc_file_open(afc_client_t client, const char *filename, afc_file_mode_t file_mode, uint64_t *handle) |
| 617 | { | 617 | { |
| 618 | if (!client || !client->parent || !client->afc_packet) | 618 | if (!client || !client->parent || !client->afc_packet) |
| 619 | return AFC_E_INVALID_ARG; | 619 | return AFC_E_INVALID_ARG; |
| @@ -661,7 +661,7 @@ afc_error_t afc_file_open(afc_client_t client, const char *filename, afc_file_mo | |||
| 661 | return ret; | 661 | return ret; |
| 662 | } | 662 | } |
| 663 | 663 | ||
| 664 | afc_error_t afc_file_read(afc_client_t client, uint64_t handle, char *data, uint32_t length, uint32_t *bytes_read) | 664 | LIBIMOBILEDEVICE_API afc_error_t afc_file_read(afc_client_t client, uint64_t handle, char *data, uint32_t length, uint32_t *bytes_read) |
| 665 | { | 665 | { |
| 666 | char *input = NULL; | 666 | char *input = NULL; |
| 667 | uint32_t current_count = 0, bytes_loc = 0; | 667 | uint32_t current_count = 0, bytes_loc = 0; |
| @@ -714,7 +714,7 @@ afc_error_t afc_file_read(afc_client_t client, uint64_t handle, char *data, uint | |||
| 714 | return ret; | 714 | return ret; |
| 715 | } | 715 | } |
| 716 | 716 | ||
| 717 | afc_error_t afc_file_write(afc_client_t client, uint64_t handle, const char *data, uint32_t length, uint32_t *bytes_written) | 717 | LIBIMOBILEDEVICE_API afc_error_t afc_file_write(afc_client_t client, uint64_t handle, const char *data, uint32_t length, uint32_t *bytes_written) |
| 718 | { | 718 | { |
| 719 | uint32_t current_count = 0; | 719 | uint32_t current_count = 0; |
| 720 | uint32_t bytes_loc = 0; | 720 | uint32_t bytes_loc = 0; |
| @@ -746,7 +746,7 @@ afc_error_t afc_file_write(afc_client_t client, uint64_t handle, const char *dat | |||
| 746 | return ret; | 746 | return ret; |
| 747 | } | 747 | } |
| 748 | 748 | ||
| 749 | afc_error_t afc_file_close(afc_client_t client, uint64_t handle) | 749 | LIBIMOBILEDEVICE_API afc_error_t afc_file_close(afc_client_t client, uint64_t handle) |
| 750 | { | 750 | { |
| 751 | uint32_t bytes = 0; | 751 | uint32_t bytes = 0; |
| 752 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; | 752 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; |
| @@ -774,7 +774,7 @@ afc_error_t afc_file_close(afc_client_t client, uint64_t handle) | |||
| 774 | return ret; | 774 | return ret; |
| 775 | } | 775 | } |
| 776 | 776 | ||
| 777 | afc_error_t afc_file_lock(afc_client_t client, uint64_t handle, afc_lock_op_t operation) | 777 | LIBIMOBILEDEVICE_API afc_error_t afc_file_lock(afc_client_t client, uint64_t handle, afc_lock_op_t operation) |
| 778 | { | 778 | { |
| 779 | uint32_t bytes = 0; | 779 | uint32_t bytes = 0; |
| 780 | struct { | 780 | struct { |
| @@ -808,7 +808,7 @@ afc_error_t afc_file_lock(afc_client_t client, uint64_t handle, afc_lock_op_t op | |||
| 808 | return ret; | 808 | return ret; |
| 809 | } | 809 | } |
| 810 | 810 | ||
| 811 | afc_error_t afc_file_seek(afc_client_t client, uint64_t handle, int64_t offset, int whence) | 811 | LIBIMOBILEDEVICE_API afc_error_t afc_file_seek(afc_client_t client, uint64_t handle, int64_t offset, int whence) |
| 812 | { | 812 | { |
| 813 | uint32_t bytes = 0; | 813 | uint32_t bytes = 0; |
| 814 | struct { | 814 | struct { |
| @@ -841,7 +841,7 @@ afc_error_t afc_file_seek(afc_client_t client, uint64_t handle, int64_t offset, | |||
| 841 | return ret; | 841 | return ret; |
| 842 | } | 842 | } |
| 843 | 843 | ||
| 844 | afc_error_t afc_file_tell(afc_client_t client, uint64_t handle, uint64_t *position) | 844 | LIBIMOBILEDEVICE_API afc_error_t afc_file_tell(afc_client_t client, uint64_t handle, uint64_t *position) |
| 845 | { | 845 | { |
| 846 | char *buffer = NULL; | 846 | char *buffer = NULL; |
| 847 | uint32_t bytes = 0; | 847 | uint32_t bytes = 0; |
| @@ -874,7 +874,7 @@ afc_error_t afc_file_tell(afc_client_t client, uint64_t handle, uint64_t *positi | |||
| 874 | return ret; | 874 | return ret; |
| 875 | } | 875 | } |
| 876 | 876 | ||
| 877 | afc_error_t afc_file_truncate(afc_client_t client, uint64_t handle, uint64_t newsize) | 877 | LIBIMOBILEDEVICE_API afc_error_t afc_file_truncate(afc_client_t client, uint64_t handle, uint64_t newsize) |
| 878 | { | 878 | { |
| 879 | uint32_t bytes = 0; | 879 | uint32_t bytes = 0; |
| 880 | struct { | 880 | struct { |
| @@ -905,7 +905,7 @@ afc_error_t afc_file_truncate(afc_client_t client, uint64_t handle, uint64_t new | |||
| 905 | return ret; | 905 | return ret; |
| 906 | } | 906 | } |
| 907 | 907 | ||
| 908 | afc_error_t afc_truncate(afc_client_t client, const char *path, uint64_t newsize) | 908 | LIBIMOBILEDEVICE_API afc_error_t afc_truncate(afc_client_t client, const char *path, uint64_t newsize) |
| 909 | { | 909 | { |
| 910 | if (!client || !path || !client->afc_packet || !client->parent) | 910 | if (!client || !path || !client->afc_packet || !client->parent) |
| 911 | return AFC_E_INVALID_ARG; | 911 | return AFC_E_INVALID_ARG; |
| @@ -935,7 +935,7 @@ afc_error_t afc_truncate(afc_client_t client, const char *path, uint64_t newsize | |||
| 935 | return ret; | 935 | return ret; |
| 936 | } | 936 | } |
| 937 | 937 | ||
| 938 | afc_error_t afc_make_link(afc_client_t client, afc_link_type_t linktype, const char *target, const char *linkname) | 938 | LIBIMOBILEDEVICE_API afc_error_t afc_make_link(afc_client_t client, afc_link_type_t linktype, const char *target, const char *linkname) |
| 939 | { | 939 | { |
| 940 | if (!client || !target || !linkname || !client->afc_packet || !client->parent) | 940 | if (!client || !target || !linkname || !client->afc_packet || !client->parent) |
| 941 | return AFC_E_INVALID_ARG; | 941 | return AFC_E_INVALID_ARG; |
| @@ -969,7 +969,7 @@ afc_error_t afc_make_link(afc_client_t client, afc_link_type_t linktype, const c | |||
| 969 | return ret; | 969 | return ret; |
| 970 | } | 970 | } |
| 971 | 971 | ||
| 972 | afc_error_t afc_set_file_time(afc_client_t client, const char *path, uint64_t mtime) | 972 | LIBIMOBILEDEVICE_API afc_error_t afc_set_file_time(afc_client_t client, const char *path, uint64_t mtime) |
| 973 | { | 973 | { |
| 974 | if (!client || !path || !client->afc_packet || !client->parent) | 974 | if (!client || !path || !client->afc_packet || !client->parent) |
| 975 | return AFC_E_INVALID_ARG; | 975 | return AFC_E_INVALID_ARG; |
| @@ -998,7 +998,7 @@ afc_error_t afc_set_file_time(afc_client_t client, const char *path, uint64_t mt | |||
| 998 | return ret; | 998 | return ret; |
| 999 | } | 999 | } |
| 1000 | 1000 | ||
| 1001 | afc_error_t afc_remove_path_and_contents(afc_client_t client, const char *path) | 1001 | LIBIMOBILEDEVICE_API afc_error_t afc_remove_path_and_contents(afc_client_t client, const char *path) |
| 1002 | { | 1002 | { |
| 1003 | uint32_t bytes = 0; | 1003 | uint32_t bytes = 0; |
| 1004 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; | 1004 | afc_error_t ret = AFC_E_UNKNOWN_ERROR; |
| @@ -1022,7 +1022,7 @@ afc_error_t afc_remove_path_and_contents(afc_client_t client, const char *path) | |||
| 1022 | return ret; | 1022 | return ret; |
| 1023 | } | 1023 | } |
| 1024 | 1024 | ||
| 1025 | afc_error_t afc_dictionary_free(char **dictionary) | 1025 | LIBIMOBILEDEVICE_API afc_error_t afc_dictionary_free(char **dictionary) |
| 1026 | { | 1026 | { |
| 1027 | int i = 0; | 1027 | int i = 0; |
| 1028 | 1028 | ||
