summaryrefslogtreecommitdiffstats
path: root/src/AFC.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/AFC.h')
-rw-r--r--src/AFC.h77
1 files changed, 0 insertions, 77 deletions
diff --git a/src/AFC.h b/src/AFC.h
deleted file mode 100644
index 5e4d17c..0000000
--- a/src/AFC.h
+++ /dev/null
@@ -1,77 +0,0 @@
1/*
2 * AFC.h
3 * Defines and structs and the like for the built-in AFC client
4 *
5 * Copyright (c) 2008 Zach C. All Rights Reserved.
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22#include "usbmux.h"
23#include "iphone.h"
24
25#include <string.h>
26#include <stdio.h>
27#include <stdlib.h>
28#include <sys/stat.h>
29#include <glib.h>
30
31typedef struct {
32 uint32_t header1, header2;
33 uint32_t entire_length, unknown1, this_length, unknown2, packet_num, unknown3, operation, unknown4;
34} AFCPacket;
35
36typedef struct {
37 uint32_t filehandle, unknown1, size, unknown2;
38} AFCFilePacket;
39
40typedef struct __AFCToken {
41 struct __AFCToken *last, *next;
42 char *token;
43} AFCToken;
44
45struct iphone_afc_client_int {
46 iphone_umux_client_t connection;
47 AFCPacket *afc_packet;
48 int file_handle;
49 int lock;
50 GMutex *mutex;
51};
52
53struct iphone_afc_file_int {
54 uint32_t filehandle, blocks, size, type;
55};
56
57
58
59enum {
60 AFC_ERROR = 0x00000001,
61 AFC_GET_INFO = 0x0000000a,
62 AFC_GET_DEVINFO = 0x0000000b,
63 AFC_LIST_DIR = 0x00000003,
64 AFC_MAKE_DIR = 0x00000009,
65 AFC_DELETE = 0x00000008,
66 AFC_RENAME = 0x00000018,
67 AFC_SUCCESS_RESPONSE = 0x00000002,
68 AFC_FILE_OPEN = 0x0000000d,
69 AFC_FILE_CLOSE = 0x00000014,
70 AFC_FILE_SEEK = 0x00000011,
71 AFC_FILE_TRUNCATE = 0x00000015,
72 AFC_FILE_HANDLE = 0x0000000e,
73 AFC_READ = 0x0000000f,
74 AFC_WRITE = 0x00000010
75};
76
77uint32_t iphone_afc_get_file_handle(iphone_afc_file_t file);