diff options
Diffstat (limited to 'src/ideviceinstaller.c')
| -rw-r--r-- | src/ideviceinstaller.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/ideviceinstaller.c b/src/ideviceinstaller.c index 86c6fe7..c8bc239 100644 --- a/src/ideviceinstaller.c +++ b/src/ideviceinstaller.c | |||
| @@ -75,7 +75,11 @@ static void notifier(const char *notification) | |||
| 75 | notified = 1; | 75 | notified = 1; |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | #ifdef HAVE_LIBIMOBILEDEVICE_1_1 | ||
| 79 | static void status_cb(const char *operation, plist_t status, void *unused) | ||
| 80 | #else | ||
| 78 | static void status_cb(const char *operation, plist_t status) | 81 | static void status_cb(const char *operation, plist_t status) |
| 82 | #endif | ||
| 79 | { | 83 | { |
| 80 | if (status && operation) { | 84 | if (status && operation) { |
| 81 | plist_t npercent = plist_dict_get_item(status, "PercentComplete"); | 85 | plist_t npercent = plist_dict_get_item(status, "PercentComplete"); |
| @@ -665,17 +669,29 @@ run_again: | |||
| 665 | } | 669 | } |
| 666 | if (install_mode) { | 670 | if (install_mode) { |
| 667 | printf("Installing '%s'\n", pkgname); | 671 | printf("Installing '%s'\n", pkgname); |
| 672 | #ifdef HAVE_LIBIMOBILEDEVICE_1_1 | ||
| 673 | instproxy_install(ipc, pkgname, client_opts, status_cb, NULL); | ||
| 674 | #else | ||
| 668 | instproxy_install(ipc, pkgname, client_opts, status_cb); | 675 | instproxy_install(ipc, pkgname, client_opts, status_cb); |
| 676 | #endif | ||
| 669 | } else { | 677 | } else { |
| 670 | printf("Upgrading '%s'\n", pkgname); | 678 | printf("Upgrading '%s'\n", pkgname); |
| 679 | #ifdef HAVE_LIBIMOBILEDEVICE_1_1 | ||
| 680 | instproxy_upgrade(ipc, pkgname, client_opts, status_cb, NULL); | ||
| 681 | #else | ||
| 671 | instproxy_upgrade(ipc, pkgname, client_opts, status_cb); | 682 | instproxy_upgrade(ipc, pkgname, client_opts, status_cb); |
| 683 | #endif | ||
| 672 | } | 684 | } |
| 673 | instproxy_client_options_free(client_opts); | 685 | instproxy_client_options_free(client_opts); |
| 674 | free(pkgname); | 686 | free(pkgname); |
| 675 | wait_for_op_complete = 1; | 687 | wait_for_op_complete = 1; |
| 676 | notification_expected = 1; | 688 | notification_expected = 1; |
| 677 | } else if (uninstall_mode) { | 689 | } else if (uninstall_mode) { |
| 690 | #ifdef HAVE_LIBIMOBILEDEVICE_1_1 | ||
| 691 | instproxy_uninstall(ipc, appid, NULL, status_cb, NULL); | ||
| 692 | #else | ||
| 678 | instproxy_uninstall(ipc, appid, NULL, status_cb); | 693 | instproxy_uninstall(ipc, appid, NULL, status_cb); |
| 694 | #endif | ||
| 679 | wait_for_op_complete = 1; | 695 | wait_for_op_complete = 1; |
| 680 | notification_expected = 1; | 696 | notification_expected = 1; |
| 681 | } else if (list_archives_mode) { | 697 | } else if (list_archives_mode) { |
| @@ -834,7 +850,11 @@ run_again: | |||
| 834 | } | 850 | } |
| 835 | } | 851 | } |
| 836 | 852 | ||
| 853 | #ifdef HAVE_LIBIMOBILEDEVICE_1_1 | ||
| 854 | instproxy_archive(ipc, appid, client_opts, status_cb, NULL); | ||
| 855 | #else | ||
| 837 | instproxy_archive(ipc, appid, client_opts, status_cb); | 856 | instproxy_archive(ipc, appid, client_opts, status_cb); |
| 857 | #endif | ||
| 838 | instproxy_client_options_free(client_opts); | 858 | instproxy_client_options_free(client_opts); |
| 839 | wait_for_op_complete = 1; | 859 | wait_for_op_complete = 1; |
| 840 | if (skip_uninstall) { | 860 | if (skip_uninstall) { |
| @@ -968,11 +988,19 @@ run_again: | |||
| 968 | } | 988 | } |
| 969 | goto leave_cleanup; | 989 | goto leave_cleanup; |
| 970 | } else if (restore_mode) { | 990 | } else if (restore_mode) { |
| 991 | #ifdef HAVE_LIBIMOBILEDEVICE_1_1 | ||
| 992 | instproxy_restore(ipc, appid, NULL, status_cb, NULL); | ||
| 993 | #else | ||
| 971 | instproxy_restore(ipc, appid, NULL, status_cb); | 994 | instproxy_restore(ipc, appid, NULL, status_cb); |
| 995 | #endif | ||
| 972 | wait_for_op_complete = 1; | 996 | wait_for_op_complete = 1; |
| 973 | notification_expected = 1; | 997 | notification_expected = 1; |
| 974 | } else if (remove_archive_mode) { | 998 | } else if (remove_archive_mode) { |
| 999 | #ifdef HAVE_LIBIMOBILEDEVICE_1_1 | ||
| 1000 | instproxy_remove_archive(ipc, appid, NULL, status_cb, NULL); | ||
| 1001 | #else | ||
| 975 | instproxy_remove_archive(ipc, appid, NULL, status_cb); | 1002 | instproxy_remove_archive(ipc, appid, NULL, status_cb); |
| 1003 | #endif | ||
| 976 | wait_for_op_complete = 1; | 1004 | wait_for_op_complete = 1; |
| 977 | } else { | 1005 | } else { |
| 978 | printf | 1006 | printf |
