diff options
Diffstat (limited to 'src/installation_proxy.c')
| -rw-r--r-- | src/installation_proxy.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/installation_proxy.c b/src/installation_proxy.c index e3a8103..578756e 100644 --- a/src/installation_proxy.c +++ b/src/installation_proxy.c | |||
| @@ -86,7 +86,7 @@ static instproxy_error_t instproxy_error(property_list_service_error_t err) | |||
| 86 | return INSTPROXY_E_UNKNOWN_ERROR; | 86 | return INSTPROXY_E_UNKNOWN_ERROR; |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, instproxy_client_t *client) | 89 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, instproxy_client_t *client) |
| 90 | { | 90 | { |
| 91 | property_list_service_client_t plistclient = NULL; | 91 | property_list_service_client_t plistclient = NULL; |
| 92 | instproxy_error_t err = instproxy_error(property_list_service_client_new(device, service, &plistclient)); | 92 | instproxy_error_t err = instproxy_error(property_list_service_client_new(device, service, &plistclient)); |
| @@ -103,14 +103,14 @@ instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descr | |||
| 103 | return INSTPROXY_E_SUCCESS; | 103 | return INSTPROXY_E_SUCCESS; |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | instproxy_error_t instproxy_client_start_service(idevice_t device, instproxy_client_t * client, const char* label) | 106 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_start_service(idevice_t device, instproxy_client_t * client, const char* label) |
| 107 | { | 107 | { |
| 108 | instproxy_error_t err = INSTPROXY_E_UNKNOWN_ERROR; | 108 | instproxy_error_t err = INSTPROXY_E_UNKNOWN_ERROR; |
| 109 | service_client_factory_start_service(device, INSTPROXY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(instproxy_client_new), &err); | 109 | service_client_factory_start_service(device, INSTPROXY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(instproxy_client_new), &err); |
| 110 | return err; | 110 | return err; |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | instproxy_error_t instproxy_client_free(instproxy_client_t client) | 113 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_free(instproxy_client_t client) |
| 114 | { | 114 | { |
| 115 | if (!client) | 115 | if (!client) |
| 116 | return INSTPROXY_E_INVALID_ARG; | 116 | return INSTPROXY_E_INVALID_ARG; |
| @@ -162,7 +162,7 @@ static instproxy_error_t instproxy_send_command(instproxy_client_t client, const | |||
| 162 | return err; | 162 | return err; |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_options, plist_t *result) | 165 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_options, plist_t *result) |
| 166 | { | 166 | { |
| 167 | if (!client || !client->parent || !result) | 167 | if (!client || !client->parent || !result) |
| 168 | return INSTPROXY_E_INVALID_ARG; | 168 | return INSTPROXY_E_INVALID_ARG; |
| @@ -414,17 +414,17 @@ static instproxy_error_t instproxy_install_or_upgrade(instproxy_client_t client, | |||
| 414 | return instproxy_create_status_updater(client, status_cb, command, user_data); | 414 | return instproxy_create_status_updater(client, status_cb, command, user_data); |
| 415 | } | 415 | } |
| 416 | 416 | ||
| 417 | 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) | 417 | 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) |
| 418 | { | 418 | { |
| 419 | return instproxy_install_or_upgrade(client, pkg_path, client_options, status_cb, "Install", user_data); | 419 | return instproxy_install_or_upgrade(client, pkg_path, client_options, status_cb, "Install", user_data); |
| 420 | } | 420 | } |
| 421 | 421 | ||
| 422 | 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) | 422 | 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) |
| 423 | { | 423 | { |
| 424 | return instproxy_install_or_upgrade(client, pkg_path, client_options, status_cb, "Upgrade", user_data); | 424 | return instproxy_install_or_upgrade(client, pkg_path, client_options, status_cb, "Upgrade", user_data); |
| 425 | } | 425 | } |
| 426 | 426 | ||
| 427 | 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) | 427 | 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) |
| 428 | { | 428 | { |
| 429 | if (!client || !client->parent || !appid) { | 429 | if (!client || !client->parent || !appid) { |
| 430 | return INSTPROXY_E_INVALID_ARG; | 430 | return INSTPROXY_E_INVALID_ARG; |
| @@ -448,7 +448,7 @@ instproxy_error_t instproxy_uninstall(instproxy_client_t client, const char *app | |||
| 448 | return instproxy_create_status_updater(client, status_cb, "Uninstall", user_data); | 448 | return instproxy_create_status_updater(client, status_cb, "Uninstall", user_data); |
| 449 | } | 449 | } |
| 450 | 450 | ||
| 451 | instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t client_options, plist_t *result) | 451 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t client_options, plist_t *result) |
| 452 | { | 452 | { |
| 453 | if (!client || !client->parent || !result) | 453 | if (!client || !client->parent || !result) |
| 454 | return INSTPROXY_E_INVALID_ARG; | 454 | return INSTPROXY_E_INVALID_ARG; |
| @@ -474,7 +474,7 @@ leave_unlock: | |||
| 474 | return res; | 474 | return res; |
| 475 | } | 475 | } |
| 476 | 476 | ||
| 477 | 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) | 477 | 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) |
| 478 | { | 478 | { |
| 479 | if (!client || !client->parent || !appid) | 479 | if (!client || !client->parent || !appid) |
| 480 | return INSTPROXY_E_INVALID_ARG; | 480 | return INSTPROXY_E_INVALID_ARG; |
| @@ -494,7 +494,7 @@ instproxy_error_t instproxy_archive(instproxy_client_t client, const char *appid | |||
| 494 | return instproxy_create_status_updater(client, status_cb, "Archive", user_data); | 494 | return instproxy_create_status_updater(client, status_cb, "Archive", user_data); |
| 495 | } | 495 | } |
| 496 | 496 | ||
| 497 | 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) | 497 | 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) |
| 498 | { | 498 | { |
| 499 | if (!client || !client->parent || !appid) | 499 | if (!client || !client->parent || !appid) |
| 500 | return INSTPROXY_E_INVALID_ARG; | 500 | return INSTPROXY_E_INVALID_ARG; |
| @@ -514,7 +514,7 @@ instproxy_error_t instproxy_restore(instproxy_client_t client, const char *appid | |||
| 514 | return instproxy_create_status_updater(client, status_cb, "Restore", user_data); | 514 | return instproxy_create_status_updater(client, status_cb, "Restore", user_data); |
| 515 | } | 515 | } |
| 516 | 516 | ||
| 517 | 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) | 517 | 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) |
| 518 | { | 518 | { |
| 519 | if (!client || !client->parent || !appid) | 519 | if (!client || !client->parent || !appid) |
| 520 | return INSTPROXY_E_INVALID_ARG; | 520 | return INSTPROXY_E_INVALID_ARG; |
| @@ -534,12 +534,12 @@ instproxy_error_t instproxy_remove_archive(instproxy_client_t client, const char | |||
| 534 | return instproxy_create_status_updater(client, status_cb, "RemoveArchive", user_data); | 534 | return instproxy_create_status_updater(client, status_cb, "RemoveArchive", user_data); |
| 535 | } | 535 | } |
| 536 | 536 | ||
| 537 | plist_t instproxy_client_options_new() | 537 | LIBIMOBILEDEVICE_API plist_t instproxy_client_options_new() |
| 538 | { | 538 | { |
| 539 | return plist_new_dict(); | 539 | return plist_new_dict(); |
| 540 | } | 540 | } |
| 541 | 541 | ||
| 542 | void instproxy_client_options_add(plist_t client_options, ...) | 542 | LIBIMOBILEDEVICE_API void instproxy_client_options_add(plist_t client_options, ...) |
| 543 | { | 543 | { |
| 544 | if (!client_options) | 544 | if (!client_options) |
| 545 | return; | 545 | return; |
| @@ -572,14 +572,14 @@ void instproxy_client_options_add(plist_t client_options, ...) | |||
| 572 | va_end(args); | 572 | va_end(args); |
| 573 | } | 573 | } |
| 574 | 574 | ||
| 575 | void instproxy_client_options_free(plist_t client_options) | 575 | LIBIMOBILEDEVICE_API void instproxy_client_options_free(plist_t client_options) |
| 576 | { | 576 | { |
| 577 | if (client_options) { | 577 | if (client_options) { |
| 578 | plist_free(client_options); | 578 | plist_free(client_options); |
| 579 | } | 579 | } |
| 580 | } | 580 | } |
| 581 | 581 | ||
| 582 | instproxy_error_t instproxy_client_get_path_for_bundle_identifier(instproxy_client_t client, const char* appid, char** path) | 582 | LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_get_path_for_bundle_identifier(instproxy_client_t client, const char* appid, char** path) |
| 583 | { | 583 | { |
| 584 | if (!client || !client->parent || !appid) | 584 | if (!client || !client->parent || !appid) |
| 585 | return INSTPROXY_E_INVALID_ARG; | 585 | return INSTPROXY_E_INVALID_ARG; |
