diff options
Diffstat (limited to 'include/libiphone/libiphone.h')
| -rw-r--r-- | include/libiphone/libiphone.h | 41 |
1 files changed, 15 insertions, 26 deletions
diff --git a/include/libiphone/libiphone.h b/include/libiphone/libiphone.h index fa26d14..1451f15 100644 --- a/include/libiphone/libiphone.h +++ b/include/libiphone/libiphone.h | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | /* | 1 | /** |
| 2 | * libiphone.h | 2 | * @file libiphone/libiphone.h |
| 3 | * Main include of libiphone | 3 | * @brief Common code and device handling |
| 4 | * \internal | ||
| 4 | * | 5 | * |
| 5 | * Copyright (c) 2008 Jonathan Beck All Rights Reserved. | 6 | * Copyright (c) 2008 Jonathan Beck All Rights Reserved. |
| 6 | * | 7 | * |
| @@ -32,46 +33,34 @@ extern "C" { | |||
| 32 | #include <plist/plist.h> | 33 | #include <plist/plist.h> |
| 33 | #include <usbmuxd.h> | 34 | #include <usbmuxd.h> |
| 34 | 35 | ||
| 35 | //general errors | 36 | /* Error Codes */ |
| 36 | #define IPHONE_E_SUCCESS 0 | 37 | #define IPHONE_E_SUCCESS 0 |
| 37 | #define IPHONE_E_INVALID_ARG -1 | 38 | #define IPHONE_E_INVALID_ARG -1 |
| 38 | #define IPHONE_E_UNKNOWN_ERROR -2 | 39 | #define IPHONE_E_UNKNOWN_ERROR -2 |
| 39 | #define IPHONE_E_NO_DEVICE -3 | 40 | #define IPHONE_E_NO_DEVICE -3 |
| 40 | #define IPHONE_E_TIMEOUT -4 | 41 | #define IPHONE_E_NOT_ENOUGH_DATA -4 |
| 41 | #define IPHONE_E_NOT_ENOUGH_DATA -5 | 42 | #define IPHONE_E_BAD_HEADER -5 |
| 42 | #define IPHONE_E_BAD_HEADER -6 | ||
| 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 | ||
| 53 | #define IPHONE_E_AFC_ERROR -13 | ||
| 54 | 43 | ||
| 55 | typedef int16_t iphone_error_t; | 44 | typedef int16_t iphone_error_t; |
| 56 | 45 | ||
| 57 | struct iphone_device_int; | 46 | struct iphone_device_int; |
| 58 | typedef struct iphone_device_int *iphone_device_t; | 47 | typedef struct iphone_device_int *iphone_device_t; |
| 59 | 48 | ||
| 60 | //debug related functions | 49 | /* Debugging */ |
| 61 | #define DBGMASK_ALL 0xFFFF | 50 | #define DBGMASK_ALL 0xFFFF |
| 62 | #define DBGMASK_NONE 0x0000 | 51 | #define DBGMASK_NONE 0x0000 |
| 63 | #define DBGMASK_USBMUX (1 << 1) | 52 | #define DBGMASK_LOCKDOWND (1 << 1) |
| 64 | #define DBGMASK_LOCKDOWND (1 << 2) | 53 | #define DBGMASK_MOBILESYNC (1 << 2) |
| 65 | #define DBGMASK_MOBILESYNC (1 << 3) | ||
| 66 | 54 | ||
| 67 | void iphone_set_debug_mask(uint16_t mask); | 55 | void iphone_set_debug_mask(uint16_t mask); |
| 68 | void iphone_set_debug(int level); | 56 | void iphone_set_debug_level(int level); |
| 69 | 57 | ||
| 70 | //device related functions | 58 | /* Interface */ |
| 71 | iphone_error_t iphone_get_device(iphone_device_t *device); | 59 | iphone_error_t iphone_get_device(iphone_device_t *device); |
| 72 | iphone_error_t iphone_get_device_by_uuid(iphone_device_t *device, const char *uuid); | 60 | iphone_error_t iphone_get_device_by_uuid(iphone_device_t *device, const char *uuid); |
| 73 | iphone_error_t iphone_free_device(iphone_device_t device); | 61 | iphone_error_t iphone_device_free(iphone_device_t device); |
| 74 | uint32_t iphone_get_device_handle(iphone_device_t device); | 62 | iphone_error_t iphone_device_get_handle(iphone_device_t device, uint32_t *handle); |
| 63 | iphone_error_t iphone_device_get_uuid(iphone_device_t device, char **uuid); | ||
| 75 | 64 | ||
| 76 | #ifdef __cplusplus | 65 | #ifdef __cplusplus |
| 77 | } | 66 | } |
