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 --- include/libiphone/mobilesync.h | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/libiphone/mobilesync.h b/include/libiphone/mobilesync.h index 128be45..f8fa711 100644 --- a/include/libiphone/mobilesync.h +++ b/include/libiphone/mobilesync.h @@ -27,14 +27,24 @@ extern "C" { #include +/* Error Codes */ +#define MOBILESYNC_E_SUCCESS 0 +#define MOBILESYNC_E_INVALID_ARG -1 +#define MOBILESYNC_E_PLIST_ERROR -2 +#define MOBILESYNC_E_MUX_ERROR -3 +#define MOBILESYNC_E_BAD_VERSION -4 + +#define MOBILESYNC_E_UNKNOWN_ERROR -256 + +typedef int16_t mobilesync_error_t; + struct mobilesync_client_int; typedef struct mobilesync_client_int *mobilesync_client_t; -iphone_error_t mobilesync_new_client(iphone_device_t device, int dst_port, - mobilesync_client_t * client); -iphone_error_t mobilesync_free_client(mobilesync_client_t client); -iphone_error_t mobilesync_recv(mobilesync_client_t client, plist_t *plist); -iphone_error_t mobilesync_send(mobilesync_client_t client, plist_t plist); +mobilesync_error_t mobilesync_client_new(iphone_device_t device, int dst_port, mobilesync_client_t * client); +mobilesync_error_t mobilesync_client_free(mobilesync_client_t client); +mobilesync_error_t mobilesync_recv(mobilesync_client_t client, plist_t *plist); +mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist); #ifdef __cplusplus } -- cgit v1.1-32-gdbae