diff options
| author | 2009-09-10 13:28:13 +0200 | |
|---|---|---|
| committer | 2009-09-12 11:41:38 +0200 | |
| commit | 1f6282ffddec7012df82fa929dfe72cfc74b063a (patch) | |
| tree | 452c927c07806855f360ee9803111a1f72e05d3c /tools/iphone_id.c | |
| parent | 26ce10634d277df51c4e9c2bd61b409df3f5b060 (diff) | |
| download | libimobiledevice-1f6282ffddec7012df82fa929dfe72cfc74b063a.tar.gz libimobiledevice-1f6282ffddec7012df82fa929dfe72cfc74b063a.tar.bz2 | |
Public API rework, extension and adaption to latest libusbmuxd-1.0 API.
Diffstat (limited to 'tools/iphone_id.c')
| -rw-r--r-- | tools/iphone_id.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/iphone_id.c b/tools/iphone_id.c index 835e214..ab36e7c 100644 --- a/tools/iphone_id.c +++ b/tools/iphone_id.c | |||
| @@ -28,7 +28,7 @@ int main(int argc, char **argv) | |||
| 28 | { | 28 | { |
| 29 | iphone_device_t phone = NULL; | 29 | iphone_device_t phone = NULL; |
| 30 | lockdownd_client_t client = NULL; | 30 | lockdownd_client_t client = NULL; |
| 31 | usbmuxd_scan_result *dev_list; | 31 | usbmuxd_device_info_t *dev_list; |
| 32 | char *devname = NULL; | 32 | char *devname = NULL; |
| 33 | int ret = 0; | 33 | int ret = 0; |
| 34 | int i; | 34 | int i; |
| @@ -65,7 +65,7 @@ int main(int argc, char **argv) | |||
| 65 | 65 | ||
| 66 | switch (mode) { | 66 | switch (mode) { |
| 67 | case MODE_SHOW_ID: | 67 | case MODE_SHOW_ID: |
| 68 | iphone_get_device_by_uuid(&phone, uuid); | 68 | iphone_device_new(&phone, uuid); |
| 69 | if (!phone) { | 69 | if (!phone) { |
| 70 | fprintf(stderr, "ERROR: No device with UUID=%s attached.\n", uuid); | 70 | fprintf(stderr, "ERROR: No device with UUID=%s attached.\n", uuid); |
| 71 | return -2; | 71 | return -2; |
| @@ -96,13 +96,14 @@ int main(int argc, char **argv) | |||
| 96 | return ret; | 96 | return ret; |
| 97 | case MODE_LIST_DEVICES: | 97 | case MODE_LIST_DEVICES: |
| 98 | default: | 98 | default: |
| 99 | if (usbmuxd_scan(&dev_list) < 0) { | 99 | if (usbmuxd_get_device_list(&dev_list) < 0) { |
| 100 | fprintf(stderr, "ERROR: usbmuxd is not running!\n"); | 100 | fprintf(stderr, "ERROR: usbmuxd is not running!\n"); |
| 101 | return -1; | 101 | return -1; |
| 102 | } | 102 | } |
| 103 | for (i = 0; dev_list[i].handle > 0; i++) { | 103 | for (i = 0; dev_list[i].handle > 0; i++) { |
| 104 | printf("handle=%d product_id=%04x uuid=%s\n", dev_list[i].handle, dev_list[i].product_id, dev_list[i].serial_number); | 104 | printf("handle=%d product_id=%04x uuid=%s\n", dev_list[i].handle, dev_list[i].product_id, dev_list[i].uuid); |
| 105 | } | 105 | } |
| 106 | usbmuxd_free_device_list(dev_list); | ||
| 106 | return 0; | 107 | return 0; |
| 107 | } | 108 | } |
| 108 | } | 109 | } |
