diff options
| author | 2009-07-25 02:54:40 +0200 | |
|---|---|---|
| committer | 2009-07-25 02:54:40 +0200 | |
| commit | 5cb9ecc85240102402082c442d561d7350732027 (patch) | |
| tree | cea461435303568e39571b0ccb19d4e25d4d266b | |
| parent | f5e9d76ebd74999512ab73f44fabba86879b1c1f (diff) | |
| download | libimobiledevice-5cb9ecc85240102402082c442d561d7350732027.tar.gz libimobiledevice-5cb9ecc85240102402082c442d561d7350732027.tar.bz2 | |
Follow glib style and rename iphone_free_device to iphone_device_free
| -rw-r--r-- | dev/afccheck.c | 6 | ||||
| -rw-r--r-- | dev/iphone_id.c | 4 | ||||
| -rw-r--r-- | dev/iphoneinfo.c | 4 | ||||
| -rw-r--r-- | dev/lckdclient.c | 4 | ||||
| -rw-r--r-- | dev/main.c | 4 | ||||
| -rw-r--r-- | dev/msyncclient.c | 4 | ||||
| -rw-r--r-- | dev/syslog_relay.c | 4 | ||||
| -rw-r--r-- | include/libiphone/libiphone.h | 4 | ||||
| -rw-r--r-- | src/iphone.c | 6 |
9 files changed, 20 insertions, 20 deletions
diff --git a/dev/afccheck.c b/dev/afccheck.c index 370742b..067dd5b 100644 --- a/dev/afccheck.c +++ b/dev/afccheck.c | |||
| @@ -105,13 +105,13 @@ int main(int argc, char *argv[]) | |||
| 105 | } | 105 | } |
| 106 | 106 | ||
| 107 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { | 107 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { |
| 108 | iphone_free_device(phone); | 108 | iphone_device_free(phone); |
| 109 | return 1; | 109 | return 1; |
| 110 | } | 110 | } |
| 111 | 111 | ||
| 112 | if (LOCKDOWN_E_SUCCESS == lockdownd_start_service(client, "com.apple.afc", &port) && !port) { | 112 | if (LOCKDOWN_E_SUCCESS == lockdownd_start_service(client, "com.apple.afc", &port) && !port) { |
| 113 | lockdownd_client_free(client); | 113 | lockdownd_client_free(client); |
| 114 | iphone_free_device(phone); | 114 | iphone_device_free(phone); |
| 115 | fprintf(stderr, "Something went wrong when starting AFC."); | 115 | fprintf(stderr, "Something went wrong when starting AFC."); |
| 116 | return 1; | 116 | return 1; |
| 117 | } | 117 | } |
| @@ -137,7 +137,7 @@ int main(int argc, char *argv[]) | |||
| 137 | } | 137 | } |
| 138 | 138 | ||
| 139 | lockdownd_client_free(client); | 139 | lockdownd_client_free(client); |
| 140 | iphone_free_device(phone); | 140 | iphone_device_free(phone); |
| 141 | 141 | ||
| 142 | return 0; | 142 | return 0; |
| 143 | } | 143 | } |
diff --git a/dev/iphone_id.c b/dev/iphone_id.c index 1b8f8a1..f68fc8b 100644 --- a/dev/iphone_id.c +++ b/dev/iphone_id.c | |||
| @@ -69,7 +69,7 @@ int main(int argc, char **argv) | |||
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { | 71 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { |
| 72 | iphone_free_device(phone); | 72 | iphone_device_free(phone); |
| 73 | fprintf(stderr, "ERROR: Connecting to device failed!\n"); | 73 | fprintf(stderr, "ERROR: Connecting to device failed!\n"); |
| 74 | return -2; | 74 | return -2; |
| 75 | } | 75 | } |
| @@ -80,7 +80,7 @@ int main(int argc, char **argv) | |||
| 80 | } | 80 | } |
| 81 | 81 | ||
| 82 | lockdownd_client_free(client); | 82 | lockdownd_client_free(client); |
| 83 | iphone_free_device(phone); | 83 | iphone_device_free(phone); |
| 84 | 84 | ||
| 85 | if (ret == 0) { | 85 | if (ret == 0) { |
| 86 | printf("%s\n", devname); | 86 | printf("%s\n", devname); |
diff --git a/dev/iphoneinfo.c b/dev/iphoneinfo.c index 52d7c8a..790804c 100644 --- a/dev/iphoneinfo.c +++ b/dev/iphoneinfo.c | |||
| @@ -137,7 +137,7 @@ int main(int argc, char *argv[]) | |||
| 137 | } | 137 | } |
| 138 | 138 | ||
| 139 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { | 139 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { |
| 140 | iphone_free_device(phone); | 140 | iphone_device_free(phone); |
| 141 | return -1; | 141 | return -1; |
| 142 | } | 142 | } |
| 143 | 143 | ||
| @@ -170,7 +170,7 @@ int main(int argc, char *argv[]) | |||
| 170 | if (domain != NULL) | 170 | if (domain != NULL) |
| 171 | free(domain); | 171 | free(domain); |
| 172 | lockdownd_client_free(client); | 172 | lockdownd_client_free(client); |
| 173 | iphone_free_device(phone); | 173 | iphone_device_free(phone); |
| 174 | 174 | ||
| 175 | return 0; | 175 | return 0; |
| 176 | } | 176 | } |
diff --git a/dev/lckdclient.c b/dev/lckdclient.c index 4dcb0b4..b880253 100644 --- a/dev/lckdclient.c +++ b/dev/lckdclient.c | |||
| @@ -49,7 +49,7 @@ int main(int argc, char *argv[]) | |||
| 49 | free(uuid); | 49 | free(uuid); |
| 50 | 50 | ||
| 51 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { | 51 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { |
| 52 | iphone_free_device(phone); | 52 | iphone_device_free(phone); |
| 53 | return -1; | 53 | return -1; |
| 54 | } | 54 | } |
| 55 | 55 | ||
| @@ -109,7 +109,7 @@ int main(int argc, char *argv[]) | |||
| 109 | } | 109 | } |
| 110 | clear_history(); | 110 | clear_history(); |
| 111 | lockdownd_client_free(client); | 111 | lockdownd_client_free(client); |
| 112 | iphone_free_device(phone); | 112 | iphone_device_free(phone); |
| 113 | 113 | ||
| 114 | return 0; | 114 | return 0; |
| 115 | } | 115 | } |
| @@ -88,7 +88,7 @@ int main(int argc, char *argv[]) | |||
| 88 | free(uuid); | 88 | free(uuid); |
| 89 | 89 | ||
| 90 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { | 90 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { |
| 91 | iphone_free_device(phone); | 91 | iphone_device_free(phone); |
| 92 | printf("Exiting.\n"); | 92 | printf("Exiting.\n"); |
| 93 | return -1; | 93 | return -1; |
| 94 | } | 94 | } |
| @@ -249,7 +249,7 @@ int main(int argc, char *argv[]) | |||
| 249 | printf("All done.\n"); | 249 | printf("All done.\n"); |
| 250 | 250 | ||
| 251 | lockdownd_client_free(client); | 251 | lockdownd_client_free(client); |
| 252 | iphone_free_device(phone); | 252 | iphone_device_free(phone); |
| 253 | 253 | ||
| 254 | return 0; | 254 | return 0; |
| 255 | } | 255 | } |
diff --git a/dev/msyncclient.c b/dev/msyncclient.c index 6ab7c79..5fffe7a 100644 --- a/dev/msyncclient.c +++ b/dev/msyncclient.c | |||
| @@ -142,7 +142,7 @@ int main(int argc, char *argv[]) | |||
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { | 144 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { |
| 145 | iphone_free_device(phone); | 145 | iphone_device_free(phone); |
| 146 | return -1; | 146 | return -1; |
| 147 | } | 147 | } |
| 148 | 148 | ||
| @@ -162,7 +162,7 @@ int main(int argc, char *argv[]) | |||
| 162 | printf("All done.\n"); | 162 | printf("All done.\n"); |
| 163 | 163 | ||
| 164 | lockdownd_client_free(client); | 164 | lockdownd_client_free(client); |
| 165 | iphone_free_device(phone); | 165 | iphone_device_free(phone); |
| 166 | 166 | ||
| 167 | return 0; | 167 | return 0; |
| 168 | } | 168 | } |
diff --git a/dev/syslog_relay.c b/dev/syslog_relay.c index 0c41c94..58a2544 100644 --- a/dev/syslog_relay.c +++ b/dev/syslog_relay.c | |||
| @@ -101,7 +101,7 @@ int main(int argc, char *argv[]) | |||
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { | 103 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { |
| 104 | iphone_free_device(phone); | 104 | iphone_device_free(phone); |
| 105 | return -1; | 105 | return -1; |
| 106 | } | 106 | } |
| 107 | 107 | ||
| @@ -148,7 +148,7 @@ int main(int argc, char *argv[]) | |||
| 148 | printf("ERROR: Could not start service com.apple.syslog_relay.\n"); | 148 | printf("ERROR: Could not start service com.apple.syslog_relay.\n"); |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | iphone_free_device(phone); | 151 | iphone_device_free(phone); |
| 152 | 152 | ||
| 153 | return 0; | 153 | return 0; |
| 154 | } | 154 | } |
diff --git a/include/libiphone/libiphone.h b/include/libiphone/libiphone.h index 895e809..7974526 100644 --- a/include/libiphone/libiphone.h +++ b/include/libiphone/libiphone.h | |||
| @@ -58,10 +58,10 @@ typedef struct iphone_device_int *iphone_device_t; | |||
| 58 | void iphone_set_debug_mask(uint16_t mask); | 58 | void iphone_set_debug_mask(uint16_t mask); |
| 59 | void iphone_set_debug_level(int level); | 59 | void iphone_set_debug_level(int level); |
| 60 | 60 | ||
| 61 | //device related functions | 61 | /* Interface */ |
| 62 | iphone_error_t iphone_get_device(iphone_device_t *device); | 62 | iphone_error_t iphone_get_device(iphone_device_t *device); |
| 63 | iphone_error_t iphone_get_device_by_uuid(iphone_device_t *device, const char *uuid); | 63 | iphone_error_t iphone_get_device_by_uuid(iphone_device_t *device, const char *uuid); |
| 64 | iphone_error_t iphone_free_device(iphone_device_t device); | 64 | iphone_error_t iphone_device_free(iphone_device_t device); |
| 65 | uint32_t iphone_get_device_handle(iphone_device_t device); | 65 | uint32_t iphone_get_device_handle(iphone_device_t device); |
| 66 | iphone_error_t iphone_device_get_uuid(iphone_device_t device, char **uuid); | 66 | iphone_error_t iphone_device_get_uuid(iphone_device_t device, char **uuid); |
| 67 | 67 | ||
diff --git a/src/iphone.c b/src/iphone.c index 93d7b5d..bdabc35 100644 --- a/src/iphone.c +++ b/src/iphone.c | |||
| @@ -52,11 +52,11 @@ iphone_error_t iphone_get_device_by_uuid(iphone_device_t * device, const char *u | |||
| 52 | } | 52 | } |
| 53 | if (dev_list && dev_list[0].handle > 0) { | 53 | if (dev_list && dev_list[0].handle > 0) { |
| 54 | if (!uuid) { | 54 | if (!uuid) { |
| 55 | // select first device found if no UUID specified | 55 | /* select first device found if no UUID specified */ |
| 56 | handle = dev_list[0].handle; | 56 | handle = dev_list[0].handle; |
| 57 | strcpy(serial_number, dev_list[0].serial_number); | 57 | strcpy(serial_number, dev_list[0].serial_number); |
| 58 | } else { | 58 | } else { |
| 59 | // otherwise walk through the list | 59 | /* otherwise walk through the list */ |
| 60 | for (i = 0; dev_list[i].handle > 0; i++) { | 60 | for (i = 0; dev_list[i].handle > 0; i++) { |
| 61 | log_debug_msg("%s: device handle=%d, uuid=%s\n", __func__, dev_list[i].handle, dev_list[i].serial_number); | 61 | log_debug_msg("%s: device handle=%d, uuid=%s\n", __func__, dev_list[i].handle, dev_list[i].serial_number); |
| 62 | if (strcasecmp(uuid, dev_list[i].serial_number) == 0) { | 62 | if (strcasecmp(uuid, dev_list[i].serial_number) == 0) { |
| @@ -119,7 +119,7 @@ iphone_error_t iphone_device_get_uuid(iphone_device_t device, char **uuid) | |||
| 119 | * | 119 | * |
| 120 | * @param phone A pointer to an iPhone structure. | 120 | * @param phone A pointer to an iPhone structure. |
| 121 | */ | 121 | */ |
| 122 | iphone_error_t iphone_free_device(iphone_device_t device) | 122 | iphone_error_t iphone_device_free(iphone_device_t device) |
| 123 | { | 123 | { |
| 124 | if (!device) | 124 | if (!device) |
| 125 | return IPHONE_E_INVALID_ARG; | 125 | return IPHONE_E_INVALID_ARG; |
