diff options
Diffstat (limited to 'dev/msyncclient.c')
| -rw-r--r-- | dev/msyncclient.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/dev/msyncclient.c b/dev/msyncclient.c index 5eb105d..5fffe7a 100644 --- a/dev/msyncclient.c +++ b/dev/msyncclient.c | |||
| @@ -28,12 +28,12 @@ | |||
| 28 | #include <libiphone/lockdown.h> | 28 | #include <libiphone/lockdown.h> |
| 29 | #include <libiphone/mobilesync.h> | 29 | #include <libiphone/mobilesync.h> |
| 30 | 30 | ||
| 31 | static iphone_error_t mobilesync_get_all_contacts(mobilesync_client_t client) | 31 | static mobilesync_error_t mobilesync_get_all_contacts(mobilesync_client_t client) |
| 32 | { | 32 | { |
| 33 | if (!client) | 33 | if (!client) |
| 34 | return IPHONE_E_INVALID_ARG; | 34 | return MOBILESYNC_E_INVALID_ARG; |
| 35 | 35 | ||
| 36 | iphone_error_t ret = IPHONE_E_UNKNOWN_ERROR; | 36 | mobilesync_error_t ret = MOBILESYNC_E_UNKNOWN_ERROR; |
| 37 | plist_t array = NULL; | 37 | plist_t array = NULL; |
| 38 | 38 | ||
| 39 | array = plist_new_array(); | 39 | array = plist_new_array(); |
| @@ -124,7 +124,6 @@ static iphone_error_t mobilesync_get_all_contacts(mobilesync_client_t client) | |||
| 124 | plist_free(array); | 124 | plist_free(array); |
| 125 | array = NULL; | 125 | array = NULL; |
| 126 | 126 | ||
| 127 | |||
| 128 | return ret; | 127 | return ret; |
| 129 | } | 128 | } |
| 130 | 129 | ||
| @@ -137,14 +136,13 @@ int main(int argc, char *argv[]) | |||
| 137 | if (argc > 1 && !strcasecmp(argv[1], "--debug")) | 136 | if (argc > 1 && !strcasecmp(argv[1], "--debug")) |
| 138 | iphone_set_debug_mask(DBGMASK_MOBILESYNC); | 137 | iphone_set_debug_mask(DBGMASK_MOBILESYNC); |
| 139 | 138 | ||
| 140 | |||
| 141 | if (IPHONE_E_SUCCESS != iphone_get_device(&phone)) { | 139 | if (IPHONE_E_SUCCESS != iphone_get_device(&phone)) { |
| 142 | printf("No iPhone found, is it plugged in?\n"); | 140 | printf("No iPhone found, is it plugged in?\n"); |
| 143 | return -1; | 141 | return -1; |
| 144 | } | 142 | } |
| 145 | 143 | ||
| 146 | if (IPHONE_E_SUCCESS != lockdownd_new_client(phone, &client)) { | 144 | if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { |
| 147 | iphone_free_device(phone); | 145 | iphone_device_free(phone); |
| 148 | return -1; | 146 | return -1; |
| 149 | } | 147 | } |
| 150 | 148 | ||
| @@ -152,10 +150,10 @@ int main(int argc, char *argv[]) | |||
| 152 | 150 | ||
| 153 | if (port) { | 151 | if (port) { |
| 154 | mobilesync_client_t msync = NULL; | 152 | mobilesync_client_t msync = NULL; |
| 155 | mobilesync_new_client(phone, port, &msync); | 153 | mobilesync_client_new(phone, port, &msync); |
| 156 | if (msync) { | 154 | if (msync) { |
| 157 | mobilesync_get_all_contacts(msync); | 155 | mobilesync_get_all_contacts(msync); |
| 158 | mobilesync_free_client(msync); | 156 | mobilesync_client_free(msync); |
| 159 | } | 157 | } |
| 160 | } else { | 158 | } else { |
| 161 | printf("Start service failure.\n"); | 159 | printf("Start service failure.\n"); |
| @@ -163,8 +161,8 @@ int main(int argc, char *argv[]) | |||
| 163 | 161 | ||
| 164 | printf("All done.\n"); | 162 | printf("All done.\n"); |
| 165 | 163 | ||
| 166 | lockdownd_free_client(client); | 164 | lockdownd_client_free(client); |
| 167 | iphone_free_device(phone); | 165 | iphone_device_free(phone); |
| 168 | 166 | ||
| 169 | return 0; | 167 | return 0; |
| 170 | } | 168 | } |
