summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2008-08-13 19:33:52 +0200
committerGravatar Jonathan Beck2008-08-31 19:27:19 +0200
commit9236fee813a21019528cc6b6fe4cf7f9ac3647fd (patch)
tree2289a5c45e5672a88c5222bc574aa100bfcf2954 /include
parenta8409b6f5aa11e05f59249f8b44ea3107cff5274 (diff)
downloadlibimobiledevice-9236fee813a21019528cc6b6fe4cf7f9ac3647fd.tar.gz
libimobiledevice-9236fee813a21019528cc6b6fe4cf7f9ac3647fd.tar.bz2
first draft of public API
Diffstat (limited to 'include')
-rw-r--r--include/libiphone/libiphone.h46
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 @@
extern "C" {
#endif
+#include <sys/types.h>
+typedef void* iph_device_t;
+typedef void* iph_lckd_client_t;
+typedef void* iph_umux_client_t;
+typedef void* iph_afc_client_t;
+typedef void* iph_afc_file_t;
+//device related functions
+int iph_get_device ( iph_device_t *device );
+void iph_free_device ( iph_device_t device );
-typedef struct iPhone_s *iPhone_t;
-typedef struct lockdownd_client_s *lockdownd_client_t;
+//lockdownd related functions
+int iph_lckd_get_client ( iph_device_t device, iph_lckd_client_t *client );
+void iph_lckd_free_client( iph_lckd_client_t client );
-void free_iPhone(iPhone_t victim);
-iPhone_t get_iPhone();
+int iph_lckd_start_service ( iph_lckd_client_t client, const char *service );
+int iph_lckd_recv ( iph_lckd_client_t client, char **dump_data );
+int iph_lckd_send ( iph_lckd_client_t client, char *raw_data, uint32_t length );
+
+
+//usbmux related functions
+int iph_mux_get_client ( iph_device_t device, uint16_t src_port, uint16_t dst_port, iph_umux_client_t *client );
+void iph_mux_free_client ( iph_umux_client_t client );
+
+int iph_mux_send ( iph_umux_client_t client, const char *data, uint32_t datalen );
+int iph_mux_recv ( iph_umux_client_t client, char *data, uint32_t datalen );
+
+
+//afc related functions
+int iph_afc_get_client ( iph_device_t device, int src_port, int dst_port, iph_afc_client_t *client );
+void iph_afc_free_client ( iph_afc_client_t client );
+
+char **iph_afc_get_devinfo ( iph_afc_client_t client );
+char **iph_afc_get_dir_list ( iph_afc_client_t client, const char *dir);
+int iph_afc_open_file ( iph_afc_client_t client, const char *filename, uint32 file_mode, iph_afc_file_t *file );
+void iph_afc_close_file ( iph_afc_client_t client, iph_afc_file_t file);
+int iph_afc_read_file ( iph_afc_client_t client, iph_afc_file_t file, char *data, int length);
+int iph_afc_write_file ( iph_afc_client_t client, iph_afc_file_t file, const char *data, int length);
+int iph_afc_seek_file ( iph_afc_client_t client, iph_afc_file_t file, int seekpos);
+int iph_afc_truncate_file ( iph_afc_client_t client, iph_afc_file_t file, uint32 newsize);
+int iph_afc_delete_file ( iph_afc_client_t client, const char *path);
+int iph_afc_rename_file ( iph_afc_client_t client, const char *from, const char *to);
+int iph_afc_mkdir ( iph_afc_client_t client, const char *dir);
-int lockdownd_init(iPhone_t phone, lockdownd_client_t *control);
-int lockdownd_start_service(lockdownd_client_t control, const char *service);
#ifdef __cplusplus
}