diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/libiphone/libiphone.h | 46 |
1 files changed, 40 insertions, 6 deletions
diff --git a/include/libiphone/libiphone.h b/include/libiphone/libiphone.h index 4f131e1..d5dda15 100644 --- a/include/libiphone/libiphone.h +++ b/include/libiphone/libiphone.h | |||
| @@ -26,19 +26,53 @@ | |||
| 26 | extern "C" { | 26 | extern "C" { |
| 27 | #endif | 27 | #endif |
| 28 | 28 | ||
| 29 | #include <sys/types.h> | ||
| 29 | 30 | ||
| 30 | 31 | ||
| 32 | typedef void* iph_device_t; | ||
| 33 | typedef void* iph_lckd_client_t; | ||
| 34 | typedef void* iph_umux_client_t; | ||
| 35 | typedef void* iph_afc_client_t; | ||
| 36 | typedef void* iph_afc_file_t; | ||
| 31 | 37 | ||
| 38 | //device related functions | ||
| 39 | int iph_get_device ( iph_device_t *device ); | ||
| 40 | void iph_free_device ( iph_device_t device ); | ||
| 32 | 41 | ||
| 33 | typedef struct iPhone_s *iPhone_t; | ||
| 34 | typedef struct lockdownd_client_s *lockdownd_client_t; | ||
| 35 | 42 | ||
| 43 | //lockdownd related functions | ||
| 44 | int iph_lckd_get_client ( iph_device_t device, iph_lckd_client_t *client ); | ||
| 45 | void iph_lckd_free_client( iph_lckd_client_t client ); | ||
| 36 | 46 | ||
| 37 | void free_iPhone(iPhone_t victim); | 47 | int iph_lckd_start_service ( iph_lckd_client_t client, const char *service ); |
| 38 | iPhone_t get_iPhone(); | 48 | int iph_lckd_recv ( iph_lckd_client_t client, char **dump_data ); |
| 49 | int iph_lckd_send ( iph_lckd_client_t client, char *raw_data, uint32_t length ); | ||
| 50 | |||
| 51 | |||
| 52 | //usbmux related functions | ||
| 53 | int iph_mux_get_client ( iph_device_t device, uint16_t src_port, uint16_t dst_port, iph_umux_client_t *client ); | ||
| 54 | void iph_mux_free_client ( iph_umux_client_t client ); | ||
| 55 | |||
| 56 | int iph_mux_send ( iph_umux_client_t client, const char *data, uint32_t datalen ); | ||
| 57 | int iph_mux_recv ( iph_umux_client_t client, char *data, uint32_t datalen ); | ||
| 58 | |||
| 59 | |||
| 60 | //afc related functions | ||
| 61 | int iph_afc_get_client ( iph_device_t device, int src_port, int dst_port, iph_afc_client_t *client ); | ||
| 62 | void iph_afc_free_client ( iph_afc_client_t client ); | ||
| 63 | |||
| 64 | char **iph_afc_get_devinfo ( iph_afc_client_t client ); | ||
| 65 | char **iph_afc_get_dir_list ( iph_afc_client_t client, const char *dir); | ||
| 66 | int iph_afc_open_file ( iph_afc_client_t client, const char *filename, uint32 file_mode, iph_afc_file_t *file ); | ||
| 67 | void iph_afc_close_file ( iph_afc_client_t client, iph_afc_file_t file); | ||
| 68 | int iph_afc_read_file ( iph_afc_client_t client, iph_afc_file_t file, char *data, int length); | ||
| 69 | int iph_afc_write_file ( iph_afc_client_t client, iph_afc_file_t file, const char *data, int length); | ||
| 70 | int iph_afc_seek_file ( iph_afc_client_t client, iph_afc_file_t file, int seekpos); | ||
| 71 | int iph_afc_truncate_file ( iph_afc_client_t client, iph_afc_file_t file, uint32 newsize); | ||
| 72 | int iph_afc_delete_file ( iph_afc_client_t client, const char *path); | ||
| 73 | int iph_afc_rename_file ( iph_afc_client_t client, const char *from, const char *to); | ||
| 74 | int iph_afc_mkdir ( iph_afc_client_t client, const char *dir); | ||
| 39 | 75 | ||
| 40 | int lockdownd_init(iPhone_t phone, lockdownd_client_t *control); | ||
| 41 | int lockdownd_start_service(lockdownd_client_t control, const char *service); | ||
| 42 | 76 | ||
| 43 | #ifdef __cplusplus | 77 | #ifdef __cplusplus |
| 44 | } | 78 | } |
