diff options
author | 2024-01-31 02:57:11 +0100 | |
---|---|---|
committer | 2024-01-31 02:57:11 +0100 | |
commit | 63bbac545efc400373a7f472fdd78174149119c3 (patch) | |
tree | f95c8d58b7b0fbf33bd188c5becc0401ee7e64ef /src/installation_proxy.c | |
parent | f723a44513eb5ba5797da24bc2b63d9f09600a6e (diff) | |
download | libimobiledevice-63bbac545efc400373a7f472fdd78174149119c3.tar.gz libimobiledevice-63bbac545efc400373a7f472fdd78174149119c3.tar.bz2 |
Move LIBIMOBILEDEVICE_API to public headers
Diffstat (limited to 'src/installation_proxy.c')
-rw-r--r-- | src/installation_proxy.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/installation_proxy.c b/src/installation_proxy.c index 9602876..ec19da0 100644 --- a/src/installation_proxy.c +++ b/src/installation_proxy.c | |||
@@ -232,7 +232,7 @@ static instproxy_error_t instproxy_error(property_list_service_error_t err) | |||
232 | return INSTPROXY_E_UNKNOWN_ERROR; | 232 | return INSTPROXY_E_UNKNOWN_ERROR; |
233 | } | 233 | } |
234 | 234 | ||
235 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, instproxy_client_t *client) | 235 | instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, instproxy_client_t *client) |
236 | { | 236 | { |
237 | property_list_service_client_t plistclient = NULL; | 237 | property_list_service_client_t plistclient = NULL; |
238 | instproxy_error_t err = instproxy_error(property_list_service_client_new(device, service, &plistclient)); | 238 | instproxy_error_t err = instproxy_error(property_list_service_client_new(device, service, &plistclient)); |
@@ -249,14 +249,14 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_new(idevice_t device, lo | |||
249 | return INSTPROXY_E_SUCCESS; | 249 | return INSTPROXY_E_SUCCESS; |
250 | } | 250 | } |
251 | 251 | ||
252 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_start_service(idevice_t device, instproxy_client_t * client, const char* label) | 252 | instproxy_error_t instproxy_client_start_service(idevice_t device, instproxy_client_t * client, const char* label) |
253 | { | 253 | { |
254 | instproxy_error_t err = INSTPROXY_E_UNKNOWN_ERROR; | 254 | instproxy_error_t err = INSTPROXY_E_UNKNOWN_ERROR; |
255 | service_client_factory_start_service(device, INSTPROXY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(instproxy_client_new), &err); | 255 | service_client_factory_start_service(device, INSTPROXY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(instproxy_client_new), &err); |
256 | return err; | 256 | return err; |
257 | } | 257 | } |
258 | 258 | ||
259 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_free(instproxy_client_t client) | 259 | instproxy_error_t instproxy_client_free(instproxy_client_t client) |
260 | { | 260 | { |
261 | if (!client) | 261 | if (!client) |
262 | return INSTPROXY_E_INVALID_ARG; | 262 | return INSTPROXY_E_INVALID_ARG; |
@@ -525,7 +525,7 @@ static instproxy_error_t instproxy_perform_command(instproxy_client_t client, pl | |||
525 | return res; | 525 | return res; |
526 | } | 526 | } |
527 | 527 | ||
528 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_browse_with_callback(instproxy_client_t client, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) | 528 | instproxy_error_t instproxy_browse_with_callback(instproxy_client_t client, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
529 | { | 529 | { |
530 | if (!client || !client->parent || !status_cb) | 530 | if (!client || !client->parent || !status_cb) |
531 | return INSTPROXY_E_INVALID_ARG; | 531 | return INSTPROXY_E_INVALID_ARG; |
@@ -566,7 +566,7 @@ static void instproxy_append_current_list_to_result_cb(plist_t command, plist_t | |||
566 | plist_free(current_list); | 566 | plist_free(current_list); |
567 | } | 567 | } |
568 | 568 | ||
569 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_options, plist_t *result) | 569 | instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_options, plist_t *result) |
570 | { | 570 | { |
571 | if (!client || !client->parent || !result) | 571 | if (!client || !client->parent || !result) |
572 | return INSTPROXY_E_INVALID_ARG; | 572 | return INSTPROXY_E_INVALID_ARG; |
@@ -603,7 +603,7 @@ static void instproxy_copy_lookup_result_cb(plist_t command, plist_t status, voi | |||
603 | } | 603 | } |
604 | } | 604 | } |
605 | 605 | ||
606 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_lookup(instproxy_client_t client, const char** appids, plist_t client_options, plist_t *result) | 606 | instproxy_error_t instproxy_lookup(instproxy_client_t client, const char** appids, plist_t client_options, plist_t *result) |
607 | { | 607 | { |
608 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; | 608 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; |
609 | int i = 0; | 609 | int i = 0; |
@@ -650,7 +650,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_lookup(instproxy_client_t clien | |||
650 | return res; | 650 | return res; |
651 | } | 651 | } |
652 | 652 | ||
653 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_install(instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) | 653 | instproxy_error_t instproxy_install(instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
654 | { | 654 | { |
655 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; | 655 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; |
656 | 656 | ||
@@ -667,7 +667,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_install(instproxy_client_t clie | |||
667 | return res; | 667 | return res; |
668 | } | 668 | } |
669 | 669 | ||
670 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_upgrade(instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) | 670 | instproxy_error_t instproxy_upgrade(instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
671 | { | 671 | { |
672 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; | 672 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; |
673 | 673 | ||
@@ -684,7 +684,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_upgrade(instproxy_client_t clie | |||
684 | return res; | 684 | return res; |
685 | } | 685 | } |
686 | 686 | ||
687 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_uninstall(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) | 687 | instproxy_error_t instproxy_uninstall(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
688 | { | 688 | { |
689 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; | 689 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; |
690 | 690 | ||
@@ -701,7 +701,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_uninstall(instproxy_client_t cl | |||
701 | return res; | 701 | return res; |
702 | } | 702 | } |
703 | 703 | ||
704 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t client_options, plist_t *result) | 704 | instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t client_options, plist_t *result) |
705 | { | 705 | { |
706 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; | 706 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; |
707 | 707 | ||
@@ -717,7 +717,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_lookup_archives(instproxy_clien | |||
717 | return res; | 717 | return res; |
718 | } | 718 | } |
719 | 719 | ||
720 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_archive(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) | 720 | instproxy_error_t instproxy_archive(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
721 | { | 721 | { |
722 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; | 722 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; |
723 | 723 | ||
@@ -734,7 +734,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_archive(instproxy_client_t clie | |||
734 | return res; | 734 | return res; |
735 | } | 735 | } |
736 | 736 | ||
737 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_restore(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) | 737 | instproxy_error_t instproxy_restore(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
738 | { | 738 | { |
739 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; | 739 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; |
740 | 740 | ||
@@ -751,7 +751,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_restore(instproxy_client_t clie | |||
751 | return res; | 751 | return res; |
752 | } | 752 | } |
753 | 753 | ||
754 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_remove_archive(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) | 754 | instproxy_error_t instproxy_remove_archive(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
755 | { | 755 | { |
756 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; | 756 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; |
757 | 757 | ||
@@ -768,7 +768,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_remove_archive(instproxy_client | |||
768 | return res; | 768 | return res; |
769 | } | 769 | } |
770 | 770 | ||
771 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_check_capabilities_match(instproxy_client_t client, const char** capabilities, plist_t client_options, plist_t *result) | 771 | instproxy_error_t instproxy_check_capabilities_match(instproxy_client_t client, const char** capabilities, plist_t client_options, plist_t *result) |
772 | { | 772 | { |
773 | if (!client || !capabilities || !result) | 773 | if (!client || !capabilities || !result) |
774 | return INSTPROXY_E_INVALID_ARG; | 774 | return INSTPROXY_E_INVALID_ARG; |
@@ -805,7 +805,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_check_capabilities_match(instpr | |||
805 | return res; | 805 | return res; |
806 | } | 806 | } |
807 | 807 | ||
808 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_status_get_error(plist_t status, char **name, char** description, uint64_t* code) | 808 | instproxy_error_t instproxy_status_get_error(plist_t status, char **name, char** description, uint64_t* code) |
809 | { | 809 | { |
810 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; | 810 | instproxy_error_t res = INSTPROXY_E_UNKNOWN_ERROR; |
811 | 811 | ||
@@ -843,7 +843,7 @@ LIBIMOBILEDEVICE_API instproxy_error_t instproxy_status_get_error(plist_t status | |||
843 | return res; | 843 | return res; |
844 | } | 844 | } |
845 | 845 | ||
846 | LIBIMOBILEDEVICE_API void instproxy_status_get_name(plist_t status, char **name) | 846 | void instproxy_status_get_name(plist_t status, char **name) |
847 | { | 847 | { |
848 | if (name) { | 848 | if (name) { |
849 | plist_t node = plist_dict_get_item(status, "Status"); | 849 | plist_t node = plist_dict_get_item(status, "Status"); |
@@ -855,7 +855,7 @@ LIBIMOBILEDEVICE_API void instproxy_status_get_name(plist_t status, char **name) | |||
855 | } | 855 | } |
856 | } | 856 | } |
857 | 857 | ||
858 | LIBIMOBILEDEVICE_API void instproxy_status_get_percent_complete(plist_t status, int *percent) | 858 | void instproxy_status_get_percent_complete(plist_t status, int *percent) |
859 | { | 859 | { |
860 | uint64_t val = 0; | 860 | uint64_t val = 0; |
861 | if (percent) { | 861 | if (percent) { |
@@ -867,7 +867,7 @@ LIBIMOBILEDEVICE_API void instproxy_status_get_percent_complete(plist_t status, | |||
867 | } | 867 | } |
868 | } | 868 | } |
869 | 869 | ||
870 | LIBIMOBILEDEVICE_API void instproxy_status_get_current_list(plist_t status, uint64_t* total, uint64_t* current_index, uint64_t* current_amount, plist_t* list) | 870 | void instproxy_status_get_current_list(plist_t status, uint64_t* total, uint64_t* current_index, uint64_t* current_amount, plist_t* list) |
871 | { | 871 | { |
872 | plist_t node = NULL; | 872 | plist_t node = NULL; |
873 | 873 | ||
@@ -904,7 +904,7 @@ LIBIMOBILEDEVICE_API void instproxy_status_get_current_list(plist_t status, uint | |||
904 | } | 904 | } |
905 | } | 905 | } |
906 | 906 | ||
907 | LIBIMOBILEDEVICE_API void instproxy_command_get_name(plist_t command, char** name) | 907 | void instproxy_command_get_name(plist_t command, char** name) |
908 | { | 908 | { |
909 | if (name) { | 909 | if (name) { |
910 | plist_t node = plist_dict_get_item(command, "Command"); | 910 | plist_t node = plist_dict_get_item(command, "Command"); |
@@ -916,12 +916,12 @@ LIBIMOBILEDEVICE_API void instproxy_command_get_name(plist_t command, char** nam | |||
916 | } | 916 | } |
917 | } | 917 | } |
918 | 918 | ||
919 | LIBIMOBILEDEVICE_API plist_t instproxy_client_options_new(void) | 919 | plist_t instproxy_client_options_new(void) |
920 | { | 920 | { |
921 | return plist_new_dict(); | 921 | return plist_new_dict(); |
922 | } | 922 | } |
923 | 923 | ||
924 | LIBIMOBILEDEVICE_API void instproxy_client_options_add(plist_t client_options, ...) | 924 | void instproxy_client_options_add(plist_t client_options, ...) |
925 | { | 925 | { |
926 | if (!client_options) | 926 | if (!client_options) |
927 | return; | 927 | return; |
@@ -955,7 +955,7 @@ LIBIMOBILEDEVICE_API void instproxy_client_options_add(plist_t client_options, . | |||
955 | va_end(args); | 955 | va_end(args); |
956 | } | 956 | } |
957 | 957 | ||
958 | LIBIMOBILEDEVICE_API void instproxy_client_options_set_return_attributes(plist_t client_options, ...) | 958 | void instproxy_client_options_set_return_attributes(plist_t client_options, ...) |
959 | { | 959 | { |
960 | if (!client_options) | 960 | if (!client_options) |
961 | return; | 961 | return; |
@@ -976,14 +976,14 @@ LIBIMOBILEDEVICE_API void instproxy_client_options_set_return_attributes(plist_t | |||
976 | plist_dict_set_item(client_options, "ReturnAttributes", return_attributes); | 976 | plist_dict_set_item(client_options, "ReturnAttributes", return_attributes); |
977 | } | 977 | } |
978 | 978 | ||
979 | LIBIMOBILEDEVICE_API void instproxy_client_options_free(plist_t client_options) | 979 | void instproxy_client_options_free(plist_t client_options) |
980 | { | 980 | { |
981 | if (client_options) { | 981 | if (client_options) { |
982 | plist_free(client_options); | 982 | plist_free(client_options); |
983 | } | 983 | } |
984 | } | 984 | } |
985 | 985 | ||
986 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_get_path_for_bundle_identifier(instproxy_client_t client, const char* bundle_id, char** path) | 986 | instproxy_error_t instproxy_client_get_path_for_bundle_identifier(instproxy_client_t client, const char* bundle_id, char** path) |
987 | { | 987 | { |
988 | if (!client || !client->parent || !bundle_id) | 988 | if (!client || !client->parent || !bundle_id) |
989 | return INSTPROXY_E_INVALID_ARG; | 989 | return INSTPROXY_E_INVALID_ARG; |