diff options
| author | 2012-11-29 04:02:18 +0100 | |
|---|---|---|
| committer | 2012-11-29 04:02:18 +0100 | |
| commit | 14bacd927e8621d723a3d67c49f43a0485c3eff4 (patch) | |
| tree | 7937869319b864201dfa5b82361b52df71cc1258 /tools/idevicebackup.c | |
| parent | d28cb6b2b85bbaf97ae361aba531865e5bcaa898 (diff) | |
| download | libimobiledevice-14bacd927e8621d723a3d67c49f43a0485c3eff4.tar.gz libimobiledevice-14bacd927e8621d723a3d67c49f43a0485c3eff4.tar.bz2 | |
tools: mass replace 'device' with 'phone' variable names
Diffstat (limited to 'tools/idevicebackup.c')
| -rw-r--r-- | tools/idevicebackup.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/idevicebackup.c b/tools/idevicebackup.c index b4e0158..86b81da 100644 --- a/tools/idevicebackup.c +++ b/tools/idevicebackup.c | |||
| @@ -56,7 +56,7 @@ | |||
| 56 | 56 | ||
| 57 | static mobilebackup_client_t mobilebackup = NULL; | 57 | static mobilebackup_client_t mobilebackup = NULL; |
| 58 | static lockdownd_client_t client = NULL; | 58 | static lockdownd_client_t client = NULL; |
| 59 | static idevice_t phone = NULL; | 59 | static idevice_t device = NULL; |
| 60 | 60 | ||
| 61 | static int quit_flag = 0; | 61 | static int quit_flag = 0; |
| 62 | 62 | ||
| @@ -748,14 +748,14 @@ static void do_post_notification(const char *notification) | |||
| 748 | np_client_t np; | 748 | np_client_t np; |
| 749 | 749 | ||
| 750 | if (!client) { | 750 | if (!client) { |
| 751 | if (lockdownd_client_new_with_handshake(phone, &client, "idevicebackup") != LOCKDOWN_E_SUCCESS) { | 751 | if (lockdownd_client_new_with_handshake(device, &client, "idevicebackup") != LOCKDOWN_E_SUCCESS) { |
| 752 | return; | 752 | return; |
| 753 | } | 753 | } |
| 754 | } | 754 | } |
| 755 | 755 | ||
| 756 | lockdownd_start_service(client, NP_SERVICE_NAME, &nport); | 756 | lockdownd_start_service(client, NP_SERVICE_NAME, &nport); |
| 757 | if (nport) { | 757 | if (nport) { |
| 758 | np_client_new(phone, nport, &np); | 758 | np_client_new(device, nport, &np); |
| 759 | if (np) { | 759 | if (np) { |
| 760 | np_post_notification(np, notification); | 760 | np_post_notification(np, notification); |
| 761 | np_client_free(np); | 761 | np_client_free(np); |
| @@ -908,7 +908,7 @@ int main(int argc, char *argv[]) | |||
| 908 | printf("Backup directory is \"%s\"\n", backup_directory); | 908 | printf("Backup directory is \"%s\"\n", backup_directory); |
| 909 | 909 | ||
| 910 | if (udid) { | 910 | if (udid) { |
| 911 | ret = idevice_new(&phone, udid); | 911 | ret = idevice_new(&device, udid); |
| 912 | if (ret != IDEVICE_E_SUCCESS) { | 912 | if (ret != IDEVICE_E_SUCCESS) { |
| 913 | printf("No device found with udid %s, is it plugged in?\n", udid); | 913 | printf("No device found with udid %s, is it plugged in?\n", udid); |
| 914 | return -1; | 914 | return -1; |
| @@ -916,15 +916,15 @@ int main(int argc, char *argv[]) | |||
| 916 | } | 916 | } |
| 917 | else | 917 | else |
| 918 | { | 918 | { |
| 919 | ret = idevice_new(&phone, NULL); | 919 | ret = idevice_new(&device, NULL); |
| 920 | if (ret != IDEVICE_E_SUCCESS) { | 920 | if (ret != IDEVICE_E_SUCCESS) { |
| 921 | printf("No device found, is it plugged in?\n"); | 921 | printf("No device found, is it plugged in?\n"); |
| 922 | return -1; | 922 | return -1; |
| 923 | } | 923 | } |
| 924 | } | 924 | } |
| 925 | 925 | ||
| 926 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "idevicebackup")) { | 926 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &client, "idevicebackup")) { |
| 927 | idevice_free(phone); | 927 | idevice_free(device); |
| 928 | return -1; | 928 | return -1; |
| 929 | } | 929 | } |
| 930 | 930 | ||
| @@ -932,7 +932,7 @@ int main(int argc, char *argv[]) | |||
| 932 | np_client_t np = NULL; | 932 | np_client_t np = NULL; |
| 933 | ret = lockdownd_start_service(client, NP_SERVICE_NAME, &port); | 933 | ret = lockdownd_start_service(client, NP_SERVICE_NAME, &port); |
| 934 | if ((ret == LOCKDOWN_E_SUCCESS) && port) { | 934 | if ((ret == LOCKDOWN_E_SUCCESS) && port) { |
| 935 | np_client_new(phone, port, &np); | 935 | np_client_new(device, port, &np); |
| 936 | np_set_notify_callback(np, notify_cb, NULL); | 936 | np_set_notify_callback(np, notify_cb, NULL); |
| 937 | const char *noties[5] = { | 937 | const char *noties[5] = { |
| 938 | NP_SYNC_CANCEL_REQUEST, | 938 | NP_SYNC_CANCEL_REQUEST, |
| @@ -952,7 +952,7 @@ int main(int argc, char *argv[]) | |||
| 952 | port = 0; | 952 | port = 0; |
| 953 | ret = lockdownd_start_service(client, "com.apple.afc", &port); | 953 | ret = lockdownd_start_service(client, "com.apple.afc", &port); |
| 954 | if ((ret == LOCKDOWN_E_SUCCESS) && port) { | 954 | if ((ret == LOCKDOWN_E_SUCCESS) && port) { |
| 955 | afc_client_new(phone, port, &afc); | 955 | afc_client_new(device, port, &afc); |
| 956 | } | 956 | } |
| 957 | } | 957 | } |
| 958 | 958 | ||
| @@ -961,7 +961,7 @@ int main(int argc, char *argv[]) | |||
| 961 | ret = lockdownd_start_service(client, MOBILEBACKUP_SERVICE_NAME, &port); | 961 | ret = lockdownd_start_service(client, MOBILEBACKUP_SERVICE_NAME, &port); |
| 962 | if ((ret == LOCKDOWN_E_SUCCESS) && port) { | 962 | if ((ret == LOCKDOWN_E_SUCCESS) && port) { |
| 963 | printf("Started \"%s\" service on port %d.\n", MOBILEBACKUP_SERVICE_NAME, port); | 963 | printf("Started \"%s\" service on port %d.\n", MOBILEBACKUP_SERVICE_NAME, port); |
| 964 | mobilebackup_client_new(phone, port, &mobilebackup); | 964 | mobilebackup_client_new(device, port, &mobilebackup); |
| 965 | 965 | ||
| 966 | /* check abort conditions */ | 966 | /* check abort conditions */ |
| 967 | if (quit_flag > 0) { | 967 | if (quit_flag > 0) { |
| @@ -1694,7 +1694,7 @@ files_out: | |||
| 1694 | if (mobilebackup) | 1694 | if (mobilebackup) |
| 1695 | mobilebackup_client_free(mobilebackup); | 1695 | mobilebackup_client_free(mobilebackup); |
| 1696 | 1696 | ||
| 1697 | idevice_free(phone); | 1697 | idevice_free(device); |
| 1698 | 1698 | ||
| 1699 | if (udid) { | 1699 | if (udid) { |
| 1700 | free(udid); | 1700 | free(udid); |
