diff options
| author | 2009-01-09 19:24:27 +0100 | |
|---|---|---|
| committer | 2009-01-09 19:24:27 +0100 | |
| commit | f3c08cfad0833d55a69ca3d54d9920a3cb558328 (patch) | |
| tree | 1cd946385a22ce2da3772df290ce71a4486219f2 /dev/msyncclient.c | |
| parent | bc2f3964851dff088dd47a08997e6c6730258834 (diff) | |
| download | libimobiledevice-f3c08cfad0833d55a69ca3d54d9920a3cb558328.tar.gz libimobiledevice-f3c08cfad0833d55a69ca3d54d9920a3cb558328.tar.bz2 | |
Change msync recv and send functions to only deal with abstract plists.
Start full address book dump function.
Update to new logging mechanism.
Diffstat (limited to 'dev/msyncclient.c')
| -rw-r--r-- | dev/msyncclient.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/dev/msyncclient.c b/dev/msyncclient.c index 55d07c4..a6764b4 100644 --- a/dev/msyncclient.c +++ b/dev/msyncclient.c | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | 29 | ||
| 30 | #include <libiphone/libiphone.h> | 30 | #include <libiphone/libiphone.h> |
| 31 | #include "../src/MobileSync.h" | 31 | #include "../src/MobileSync.h" |
| 32 | #include "../src/utils.h" | ||
| 32 | 33 | ||
| 33 | 34 | ||
| 34 | int main(int argc, char *argv[]) | 35 | int main(int argc, char *argv[]) |
| @@ -37,11 +38,9 @@ int main(int argc, char *argv[]) | |||
| 37 | iphone_lckd_client_t control = NULL; | 38 | iphone_lckd_client_t control = NULL; |
| 38 | iphone_device_t phone = NULL; | 39 | iphone_device_t phone = NULL; |
| 39 | 40 | ||
| 40 | if (argc > 1 && !strcasecmp(argv[1], "--debug")) { | 41 | if (argc > 1 && !strcasecmp(argv[1], "--debug")) |
| 41 | iphone_set_debug(1); | 42 | iphone_set_debug_mask(DBGMASK_MOBILESYNC); |
| 42 | } else { | 43 | |
| 43 | iphone_set_debug(0); | ||
| 44 | } | ||
| 45 | 44 | ||
| 46 | if (IPHONE_E_SUCCESS != iphone_get_device(&phone)) { | 45 | if (IPHONE_E_SUCCESS != iphone_get_device(&phone)) { |
| 47 | printf("No iPhone found, is it plugged in?\n"); | 46 | printf("No iPhone found, is it plugged in?\n"); |
| @@ -58,8 +57,10 @@ int main(int argc, char *argv[]) | |||
| 58 | if (port) { | 57 | if (port) { |
| 59 | iphone_msync_client_t msync = NULL; | 58 | iphone_msync_client_t msync = NULL; |
| 60 | iphone_msync_new_client(phone, 3432, port, &msync); | 59 | iphone_msync_new_client(phone, 3432, port, &msync); |
| 61 | if (msync) | 60 | if (msync) { |
| 61 | iphone_msync_get_all_contacts(msync); | ||
| 62 | iphone_msync_free_client(msync); | 62 | iphone_msync_free_client(msync); |
| 63 | } | ||
| 63 | } else { | 64 | } else { |
| 64 | printf("Start service failure.\n"); | 65 | printf("Start service failure.\n"); |
| 65 | } | 66 | } |
