diff options
Diffstat (limited to 'include/libiphone')
| -rw-r--r-- | include/libiphone/libiphone.h | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/include/libiphone/libiphone.h b/include/libiphone/libiphone.h index 53be73f..0d5257a 100644 --- a/include/libiphone/libiphone.h +++ b/include/libiphone/libiphone.h | |||
| @@ -29,6 +29,7 @@ extern "C" { | |||
| 29 | #include <stdint.h> | 29 | #include <stdint.h> |
| 30 | #include <sys/types.h> | 30 | #include <sys/types.h> |
| 31 | #include <sys/stat.h> | 31 | #include <sys/stat.h> |
| 32 | #include <plist/plist.h> | ||
| 32 | 33 | ||
| 33 | //general errors | 34 | //general errors |
| 34 | #define IPHONE_E_SUCCESS 0 | 35 | #define IPHONE_E_SUCCESS 0 |
| @@ -77,11 +78,23 @@ typedef struct iphone_afc_client_int *iphone_afc_client_t; | |||
| 77 | struct iphone_afc_file_int; | 78 | struct iphone_afc_file_int; |
| 78 | typedef struct iphone_afc_file_int *iphone_afc_file_t; | 79 | typedef struct iphone_afc_file_int *iphone_afc_file_t; |
| 79 | 80 | ||
| 81 | struct iphone_msync_client_int; | ||
| 82 | typedef struct iphone_msync_client_int *iphone_msync_client_t; | ||
| 83 | |||
| 80 | struct iphone_np_client_int; | 84 | struct iphone_np_client_int; |
| 81 | typedef struct iphone_np_client_int *iphone_np_client_t; | 85 | typedef struct iphone_np_client_int *iphone_np_client_t; |
| 82 | 86 | ||
| 83 | //device related functions | 87 | //debug related functions |
| 88 | #define DBGMASK_ALL 0xFFFF | ||
| 89 | #define DBGMASK_NONE 0x0000 | ||
| 90 | #define DBGMASK_USBMUX (1 << 1) | ||
| 91 | #define DBGMASK_LOCKDOWND (1 << 2) | ||
| 92 | #define DBGMASK_MOBILESYNC (1 << 3) | ||
| 93 | |||
| 94 | void iphone_set_debug_mask(uint16_t mask); | ||
| 84 | void iphone_set_debug(int level); | 95 | void iphone_set_debug(int level); |
| 96 | |||
| 97 | //device related functions | ||
| 85 | iphone_error_t iphone_get_device ( iphone_device_t *device ); | 98 | iphone_error_t iphone_get_device ( iphone_device_t *device ); |
| 86 | iphone_error_t iphone_get_specific_device( unsigned int bus_n, int dev_n, iphone_device_t * device ); | 99 | iphone_error_t iphone_get_specific_device( unsigned int bus_n, int dev_n, iphone_device_t * device ); |
| 87 | iphone_error_t iphone_free_device ( iphone_device_t device ); | 100 | iphone_error_t iphone_free_device ( iphone_device_t device ); |
| @@ -93,8 +106,8 @@ iphone_error_t iphone_lckd_new_client ( iphone_device_t device, iphone_lckd_clie | |||
| 93 | iphone_error_t iphone_lckd_free_client( iphone_lckd_client_t client ); | 106 | iphone_error_t iphone_lckd_free_client( iphone_lckd_client_t client ); |
| 94 | 107 | ||
| 95 | iphone_error_t iphone_lckd_start_service ( iphone_lckd_client_t client, const char *service, int *port ); | 108 | iphone_error_t iphone_lckd_start_service ( iphone_lckd_client_t client, const char *service, int *port ); |
| 96 | iphone_error_t iphone_lckd_recv ( iphone_lckd_client_t client, char **dump_data, uint32_t *recv_bytes ); | 109 | iphone_error_t iphone_lckd_recv ( iphone_lckd_client_t client, plist_t* plist); |
| 97 | iphone_error_t iphone_lckd_send ( iphone_lckd_client_t client, char *raw_data, uint32_t length, uint32_t *recv_bytes ); | 110 | iphone_error_t iphone_lckd_send ( iphone_lckd_client_t client, plist_t plist); |
| 98 | 111 | ||
| 99 | 112 | ||
| 100 | //usbmux related functions | 113 | //usbmux related functions |
| @@ -126,6 +139,14 @@ iphone_error_t iphone_afc_mkdir ( iphone_afc_client_t client, const char *dir); | |||
| 126 | iphone_error_t iphone_afc_truncate(iphone_afc_client_t client, const char *path, off_t newsize); | 139 | iphone_error_t iphone_afc_truncate(iphone_afc_client_t client, const char *path, off_t newsize); |
| 127 | 140 | ||
| 128 | 141 | ||
| 142 | |||
| 143 | iphone_error_t iphone_msync_new_client(iphone_device_t device, int src_port, int dst_port, | ||
| 144 | iphone_msync_client_t * client); | ||
| 145 | iphone_error_t iphone_msync_free_client(iphone_msync_client_t client); | ||
| 146 | |||
| 147 | iphone_error_t iphone_msync_recv(iphone_msync_client_t client, plist_t * plist); | ||
| 148 | iphone_error_t iphone_msync_send(iphone_msync_client_t client, plist_t plist); | ||
| 149 | |||
| 129 | #ifdef __cplusplus | 150 | #ifdef __cplusplus |
| 130 | } | 151 | } |
| 131 | #endif | 152 | #endif |
