From 40a0abaa1c7f2196d40276b0689b18a04e468acd Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Sat, 25 Jul 2009 02:08:12 +0200 Subject: Update MobileSync API and introduce mobilesync error codes --- dev/msyncclient.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'dev') diff --git a/dev/msyncclient.c b/dev/msyncclient.c index 5eb105d..7651002 100644 --- a/dev/msyncclient.c +++ b/dev/msyncclient.c @@ -28,12 +28,12 @@ #include #include -static iphone_error_t mobilesync_get_all_contacts(mobilesync_client_t client) +static mobilesync_error_t mobilesync_get_all_contacts(mobilesync_client_t client) { if (!client) - return IPHONE_E_INVALID_ARG; + return MOBILESYNC_E_INVALID_ARG; - iphone_error_t ret = IPHONE_E_UNKNOWN_ERROR; + mobilesync_error_t ret = MOBILESYNC_E_UNKNOWN_ERROR; plist_t array = NULL; array = plist_new_array(); @@ -124,7 +124,6 @@ static iphone_error_t mobilesync_get_all_contacts(mobilesync_client_t client) plist_free(array); array = NULL; - return ret; } @@ -137,7 +136,6 @@ int main(int argc, char *argv[]) if (argc > 1 && !strcasecmp(argv[1], "--debug")) iphone_set_debug_mask(DBGMASK_MOBILESYNC); - if (IPHONE_E_SUCCESS != iphone_get_device(&phone)) { printf("No iPhone found, is it plugged in?\n"); return -1; @@ -152,10 +150,10 @@ int main(int argc, char *argv[]) if (port) { mobilesync_client_t msync = NULL; - mobilesync_new_client(phone, port, &msync); + mobilesync_client_new(phone, port, &msync); if (msync) { mobilesync_get_all_contacts(msync); - mobilesync_free_client(msync); + mobilesync_client_free(msync); } } else { printf("Start service failure.\n"); -- cgit v1.1-32-gdbae