diff options
| author | 2009-07-25 02:08:12 +0200 | |
|---|---|---|
| committer | 2009-07-25 02:08:12 +0200 | |
| commit | 40a0abaa1c7f2196d40276b0689b18a04e468acd (patch) | |
| tree | aee97118e637ccc7b8ab638a77a154b6bbed4f4b /dev/msyncclient.c | |
| parent | 66695e6b7db9457d5ecfe6f4f6624dc195e5274d (diff) | |
| download | libimobiledevice-40a0abaa1c7f2196d40276b0689b18a04e468acd.tar.gz libimobiledevice-40a0abaa1c7f2196d40276b0689b18a04e468acd.tar.bz2 | |
Update MobileSync API and introduce mobilesync error codes
Diffstat (limited to 'dev/msyncclient.c')
| -rw-r--r-- | dev/msyncclient.c | 12 | 
1 files changed, 5 insertions, 7 deletions
| 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 <libiphone/lockdown.h>  #include <libiphone/mobilesync.h> -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"); | 
