diff options
| author | 2009-07-25 02:40:25 +0200 | |
|---|---|---|
| committer | 2009-07-25 02:40:25 +0200 | |
| commit | f5e9d76ebd74999512ab73f44fabba86879b1c1f (patch) | |
| tree | 9e01e1b8bda52c04c31c5334805a530403713e08 /include/libiphone | |
| parent | d11abfb48218a37d9c66831ebec8b0a736d5385f (diff) | |
| download | libimobiledevice-f5e9d76ebd74999512ab73f44fabba86879b1c1f.tar.gz libimobiledevice-f5e9d76ebd74999512ab73f44fabba86879b1c1f.tar.bz2 | |
Update lockdown API and introduce new error codes
Diffstat (limited to 'include/libiphone')
| -rw-r--r-- | include/libiphone/libiphone.h | 10 | ||||
| -rw-r--r-- | include/libiphone/lockdown.h | 51 |
2 files changed, 36 insertions, 25 deletions
diff --git a/include/libiphone/libiphone.h b/include/libiphone/libiphone.h index 9764a7e..895e809 100644 --- a/include/libiphone/libiphone.h +++ b/include/libiphone/libiphone.h | |||
| @@ -32,7 +32,7 @@ extern "C" { | |||
| 32 | #include <plist/plist.h> | 32 | #include <plist/plist.h> |
| 33 | #include <usbmuxd.h> | 33 | #include <usbmuxd.h> |
| 34 | 34 | ||
| 35 | //general errors | 35 | /* Error Codes */ |
| 36 | #define IPHONE_E_SUCCESS 0 | 36 | #define IPHONE_E_SUCCESS 0 |
| 37 | #define IPHONE_E_INVALID_ARG -1 | 37 | #define IPHONE_E_INVALID_ARG -1 |
| 38 | #define IPHONE_E_UNKNOWN_ERROR -2 | 38 | #define IPHONE_E_UNKNOWN_ERROR -2 |
| @@ -41,14 +41,6 @@ extern "C" { | |||
| 41 | #define IPHONE_E_NOT_ENOUGH_DATA -5 | 41 | #define IPHONE_E_NOT_ENOUGH_DATA -5 |
| 42 | #define IPHONE_E_BAD_HEADER -6 | 42 | #define IPHONE_E_BAD_HEADER -6 |
| 43 | 43 | ||
| 44 | //lockdownd specific error | ||
| 45 | #define IPHONE_E_INVALID_CONF -7 | ||
| 46 | #define IPHONE_E_PAIRING_FAILED -8 | ||
| 47 | #define IPHONE_E_SSL_ERROR -9 | ||
| 48 | #define IPHONE_E_PLIST_ERROR -10 | ||
| 49 | #define IPHONE_E_DICT_ERROR -11 | ||
| 50 | #define IPHONE_E_START_SERVICE_FAILED -12 | ||
| 51 | |||
| 52 | //afc specific error | 44 | //afc specific error |
| 53 | #define IPHONE_E_AFC_ERROR -13 | 45 | #define IPHONE_E_AFC_ERROR -13 |
| 54 | 46 | ||
diff --git a/include/libiphone/lockdown.h b/include/libiphone/lockdown.h index 20ccf77..55c0cb7 100644 --- a/include/libiphone/lockdown.h +++ b/include/libiphone/lockdown.h | |||
| @@ -27,25 +27,44 @@ extern "C" { | |||
| 27 | 27 | ||
| 28 | #include <libiphone/libiphone.h> | 28 | #include <libiphone/libiphone.h> |
| 29 | 29 | ||
| 30 | /* Error Codes */ | ||
| 31 | #define LOCKDOWN_E_SUCCESS 0 | ||
| 32 | #define LOCKDOWN_E_INVALID_ARG -1 | ||
| 33 | #define LOCKDOWN_E_INVALID_CONF -2 | ||
| 34 | #define LOCKDOWN_E_PLIST_ERROR -3 | ||
| 35 | #define LOCKDOWN_E_PAIRING_FAILED -4 | ||
| 36 | #define LOCKDOWN_E_SSL_ERROR -5 | ||
| 37 | #define LOCKDOWN_E_DICT_ERROR -6 | ||
| 38 | #define LOCKDOWN_E_START_SERVICE_FAILED -7 | ||
| 39 | #define LOCKDOWN_E_NOT_ENOUGH_DATA -8 | ||
| 40 | #define LOCKDOWN_E_SET_VALUE_PROHIBITED -9 | ||
| 41 | #define LOCKDOWN_E_GET_VALUE_PROHIBITED -10 | ||
| 42 | #define LOCKDOWN_E_REMOVE_VALUE_PROHIBITED -11 | ||
| 43 | #define LOCKDOWN_E_MUX_ERROR -12 | ||
| 44 | |||
| 45 | #define LOCKDOWN_E_UNKNOWN_ERROR -256 | ||
| 46 | |||
| 47 | typedef int16_t lockdownd_error_t; | ||
| 48 | |||
| 30 | struct lockdownd_client_int; | 49 | struct lockdownd_client_int; |
| 31 | typedef struct lockdownd_client_int *lockdownd_client_t; | 50 | typedef struct lockdownd_client_int *lockdownd_client_t; |
| 32 | 51 | ||
| 33 | //lockdownd related functions | 52 | /* Interface */ |
| 34 | iphone_error_t lockdownd_new_client (iphone_device_t device, lockdownd_client_t *client); | 53 | lockdownd_error_t lockdownd_client_new(iphone_device_t device, lockdownd_client_t *client); |
| 35 | iphone_error_t lockdownd_free_client(lockdownd_client_t client); | 54 | lockdownd_error_t lockdownd_client_free(lockdownd_client_t client); |
| 36 | iphone_error_t lockdownd_query_type(lockdownd_client_t client); | 55 | lockdownd_error_t lockdownd_query_type(lockdownd_client_t client); |
| 37 | iphone_error_t lockdownd_get_value(lockdownd_client_t client, const char *domain, const char *key, plist_t *value); | 56 | lockdownd_error_t lockdownd_get_value(lockdownd_client_t client, const char *domain, const char *key, plist_t *value); |
| 38 | iphone_error_t lockdownd_set_value(lockdownd_client_t client, const char *domain, const char *key, plist_t value); | 57 | lockdownd_error_t lockdownd_set_value(lockdownd_client_t client, const char *domain, const char *key, plist_t value); |
| 39 | iphone_error_t lockdownd_remove_value(lockdownd_client_t client, const char *domain, const char *key); | 58 | lockdownd_error_t lockdownd_remove_value(lockdownd_client_t client, const char *domain, const char *key); |
| 40 | iphone_error_t lockdownd_start_service (lockdownd_client_t client, const char *service, int *port); | 59 | lockdownd_error_t lockdownd_start_service(lockdownd_client_t client, const char *service, int *port); |
| 41 | iphone_error_t lockdownd_stop_session(lockdownd_client_t client); | 60 | lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client); |
| 42 | iphone_error_t lockdownd_send (lockdownd_client_t client, plist_t plist); | 61 | lockdownd_error_t lockdownd_send(lockdownd_client_t client, plist_t plist); |
| 43 | iphone_error_t lockdownd_recv (lockdownd_client_t client, plist_t *plist); | 62 | lockdownd_error_t lockdownd_recv(lockdownd_client_t client, plist_t *plist); |
| 44 | iphone_error_t lockdownd_pair(lockdownd_client_t client, char *uid, char *host_id); | 63 | lockdownd_error_t lockdownd_pair(lockdownd_client_t client, char *uuid, char *host_id); |
| 45 | iphone_error_t lockdownd_get_device_uid (lockdownd_client_t control, char **uid); | 64 | lockdownd_error_t lockdownd_get_device_uuid(lockdownd_client_t control, char **uuid); |
| 46 | iphone_error_t lockdownd_get_device_name (lockdownd_client_t client, char **device_name); | 65 | lockdownd_error_t lockdownd_get_device_name(lockdownd_client_t client, char **device_name); |
| 47 | iphone_error_t lockdownd_enter_recovery(lockdownd_client_t client); | 66 | lockdownd_error_t lockdownd_enter_recovery(lockdownd_client_t client); |
| 48 | iphone_error_t lockdownd_goodbye(lockdownd_client_t client); | 67 | lockdownd_error_t lockdownd_goodbye(lockdownd_client_t client); |
| 49 | 68 | ||
| 50 | #ifdef __cplusplus | 69 | #ifdef __cplusplus |
| 51 | } | 70 | } |
