summaryrefslogtreecommitdiffstats
path: root/src/AFC.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/AFC.h')
-rw-r--r--src/AFC.h36
1 files changed, 10 insertions, 26 deletions
diff --git a/src/AFC.h b/src/AFC.h
index e04ce63..60cb22a 100644
--- a/src/AFC.h
+++ b/src/AFC.h
@@ -33,25 +33,24 @@ typedef struct {
33} AFCPacket; 33} AFCPacket;
34 34
35typedef struct { 35typedef struct {
36 usbmux_connection *connection;
37 AFCPacket *afc_packet;
38 int file_handle;
39 int lock;
40} AFClient;
41
42typedef struct {
43 uint32 filehandle, unknown1, size, unknown2; 36 uint32 filehandle, unknown1, size, unknown2;
44} AFCFilePacket; 37} AFCFilePacket;
45 38
46typedef struct {
47 uint32 filehandle, blocks, size, type;
48} AFCFile;
49
50typedef struct __AFCToken { 39typedef struct __AFCToken {
51 struct __AFCToken *last, *next; 40 struct __AFCToken *last, *next;
52 char *token; 41 char *token;
53} AFCToken; 42} AFCToken;
54 43
44struct iphone_afc_client_int {
45 iphone_umux_client_t connection;
46 AFCPacket *afc_packet;
47 int file_handle;
48 int lock;
49};
50
51struct iphone_afc_file_int {
52 uint32 filehandle, blocks, size, type;
53};
55 54
56enum { 55enum {
57 AFC_FILE_READ = 0x00000002, // seems to be able to read and write files 56 AFC_FILE_READ = 0x00000002, // seems to be able to read and write files
@@ -82,18 +81,3 @@ enum {
82 AFC_WRITE = 0x00000010 81 AFC_WRITE = 0x00000010
83}; 82};
84 83
85AFClient *afc_connect(iPhone *phone, int s_port, int d_port);
86void afc_disconnect(AFClient *client);
87
88char **afc_get_devinfo(AFClient *client);
89char **afc_get_dir_list(AFClient *client, const char *dir);
90AFCFile *afc_get_file_info(AFClient *client, const char *path);
91AFCFile *afc_open_file(AFClient *client, const char *filename, uint32 file_mode);
92void afc_close_file(AFClient *client, AFCFile *file);
93int afc_read_file(AFClient *client, AFCFile *file, char *data, int length);
94int afc_write_file(AFClient *client, AFCFile *file, const char *data, int length);
95int afc_seek_file(AFClient *client, AFCFile *file, int seekpos);
96int afc_truncate_file(AFClient *client, AFCFile *file, uint32 newsize);
97int afc_delete_file(AFClient *client, const char *path);
98int afc_rename_file(AFClient *client, const char *from, const char *to);
99int afc_mkdir(AFClient *client, const char *dir);