diff options
Diffstat (limited to 'include/libirecovery.h')
| -rw-r--r-- | include/libirecovery.h | 114 |
1 files changed, 3 insertions, 111 deletions
diff --git a/include/libirecovery.h b/include/libirecovery.h index 8c17167..a405005 100644 --- a/include/libirecovery.h +++ b/include/libirecovery.h | |||
| @@ -26,11 +26,6 @@ extern "C" { | |||
| 26 | 26 | ||
| 27 | #include <stdint.h> | 27 | #include <stdint.h> |
| 28 | 28 | ||
| 29 | |||
| 30 | #define APPLE_VENDOR_ID 0x05AC | ||
| 31 | #define CPID_UNKNOWN -1 | ||
| 32 | #define BDID_UNKNOWN -1 | ||
| 33 | |||
| 34 | enum { | 29 | enum { |
| 35 | IRECV_K_RECOVERY_MODE_1 = 0x1280, | 30 | IRECV_K_RECOVERY_MODE_1 = 0x1280, |
| 36 | IRECV_K_RECOVERY_MODE_2 = 0x1281, | 31 | IRECV_K_RECOVERY_MODE_2 = 0x1281, |
| @@ -72,119 +67,16 @@ typedef struct { | |||
| 72 | irecv_event_type type; | 67 | irecv_event_type type; |
| 73 | } irecv_event_t; | 68 | } irecv_event_t; |
| 74 | 69 | ||
| 75 | struct irecv_client; | ||
| 76 | typedef struct irecv_client* irecv_client_t; | ||
| 77 | typedef struct irecv_device* irecv_device_t; | ||
| 78 | |||
| 79 | struct irecv_client { | ||
| 80 | int debug; | ||
| 81 | int config; | ||
| 82 | int interface; | ||
| 83 | int alt_interface; | ||
| 84 | unsigned short mode; | ||
| 85 | char serial[256]; | ||
| 86 | |||
| 87 | #ifndef WIN32 | ||
| 88 | libusb_device_handle* handle; | ||
| 89 | #else | ||
| 90 | HANDLE handle; | ||
| 91 | HANDLE hDFU; | ||
| 92 | HANDLE hIB; | ||
| 93 | LPSTR iBootPath; | ||
| 94 | LPSTR DfuPath; | ||
| 95 | #endif | ||
| 96 | |||
| 97 | irecv_event_cb_t progress_callback; | ||
| 98 | irecv_event_cb_t received_callback; | ||
| 99 | irecv_event_cb_t connected_callback; | ||
| 100 | irecv_event_cb_t precommand_callback; | ||
| 101 | irecv_event_cb_t postcommand_callback; | ||
| 102 | irecv_event_cb_t disconnected_callback; | ||
| 103 | }; | ||
| 104 | |||
| 105 | #define DEVICE_UNKNOWN -1 | ||
| 106 | #define DEVICE_IPHONE2G 0 | ||
| 107 | #define DEVICE_IPHONE3G 1 | ||
| 108 | #define DEVICE_IPHONE3GS 2 | ||
| 109 | #define DEVICE_IPHONE4 3 | ||
| 110 | #define DEVICE_IPHONE4REVA 4 | ||
| 111 | #define DEVICE_IPHONE4CDMA 5 | ||
| 112 | #define DEVICE_IPHONE4S 6 | ||
| 113 | #define DEVICE_IPHONE51 7 | ||
| 114 | #define DEVICE_IPHONE52 8 | ||
| 115 | #define DEVICE_IPHONE53 9 | ||
| 116 | #define DEVICE_IPHONE54 10 | ||
| 117 | #define DEVICE_IPHONE61 11 | ||
| 118 | #define DEVICE_IPHONE62 12 | ||
| 119 | #define DEVICE_IPOD1G 13 | ||
| 120 | #define DEVICE_IPOD2G 14 | ||
| 121 | #define DEVICE_IPOD3G 15 | ||
| 122 | #define DEVICE_IPOD4G 16 | ||
| 123 | #define DEVICE_IPOD5G 17 | ||
| 124 | #define DEVICE_IPAD1G 18 | ||
| 125 | #define DEVICE_IPAD21 19 | ||
| 126 | #define DEVICE_IPAD22 20 | ||
| 127 | #define DEVICE_IPAD23 21 | ||
| 128 | #define DEVICE_IPAD24 22 | ||
| 129 | #define DEVICE_IPAD25 23 | ||
| 130 | #define DEVICE_IPAD26 24 | ||
| 131 | #define DEVICE_IPAD27 25 | ||
| 132 | #define DEVICE_IPAD31 26 | ||
| 133 | #define DEVICE_IPAD32 27 | ||
| 134 | #define DEVICE_IPAD33 28 | ||
| 135 | #define DEVICE_IPAD34 29 | ||
| 136 | #define DEVICE_IPAD35 30 | ||
| 137 | #define DEVICE_IPAD36 31 | ||
| 138 | #define DEVICE_APPLETV2 32 | ||
| 139 | #define DEVICE_APPLETV31 33 | ||
| 140 | #define DEVICE_APPLETV32 34 | ||
| 141 | |||
| 142 | struct irecv_device { | 70 | struct irecv_device { |
| 143 | int index; | ||
| 144 | const char* product; | 71 | const char* product; |
| 145 | const char* model; | 72 | const char* model; |
| 146 | unsigned int board_id; | 73 | unsigned int board_id; |
| 147 | unsigned int chip_id; | 74 | unsigned int chip_id; |
| 148 | }; | 75 | }; |
| 76 | typedef struct irecv_device* irecv_device_t; | ||
| 149 | 77 | ||
| 150 | static struct irecv_device irecv_devices[] = { | 78 | typedef struct irecv_client_private irecv_client_private; |
| 151 | { 0, "iPhone1,1", "m68ap", 0x00, 0x8900 }, | 79 | typedef irecv_client_private* irecv_client_t; |
| 152 | { 1, "iPhone1,2", "n82ap", 0x04, 0x8900 }, | ||
| 153 | { 2, "iPhone2,1", "n88ap", 0x00, 0x8920 }, | ||
| 154 | { 3, "iPhone3,1", "n90ap", 0x00, 0x8930 }, | ||
| 155 | { 4, "iPhone3,2", "n90bap", 0x04, 0x8930 }, | ||
| 156 | { 5, "iPhone3,3", "n92ap", 0x06, 0x8930 }, | ||
| 157 | { 6, "iPhone4,1", "n94ap", 0x08, 0x8940 }, | ||
| 158 | { 7, "iPhone5,1", "n41ap", 0x00, 0x8950 }, | ||
| 159 | { 8, "iPhone5,2", "n42ap", 0x02, 0x8950 }, | ||
| 160 | { 9, "iPhone5,3", "n48ap", 0x0a, 0x8950 }, | ||
| 161 | { 10, "iPhone5,4", "n49ap", 0x0e, 0x8950 }, | ||
| 162 | { 11, "iPhone6,1", "n51ap", 0x00, 0x8960 }, | ||
| 163 | { 12, "iPhone6,2", "n53ap", 0x02, 0x8960 }, | ||
| 164 | { 13, "iPod1,1", "n45ap", 0x02, 0x8900 }, | ||
| 165 | { 14, "iPod2,1", "n72ap", 0x00, 0x8720 }, | ||
| 166 | { 15, "iPod3,1", "n18ap", 0x02, 0x8922 }, | ||
| 167 | { 16, "iPod4,1", "n81ap", 0x08, 0x8930 }, | ||
| 168 | { 17, "iPod5,1", "n78ap", 0x00, 0x8942 }, | ||
| 169 | { 18, "iPad1,1", "k48ap", 0x02, 0x8930 }, | ||
| 170 | { 19, "iPad2,1", "k93ap", 0x04, 0x8940 }, | ||
| 171 | { 20, "iPad2,2", "k94ap", 0x06, 0x8940 }, | ||
| 172 | { 21, "iPad2,3", "k95ap", 0x02, 0x8940 }, | ||
| 173 | { 22, "iPad2,4", "k93aap", 0x06, 0x8942 }, | ||
| 174 | { 23, "iPad2,5", "p105ap", 0x0a, 0x8942 }, | ||
| 175 | { 24, "iPad2,6", "p106ap", 0x0c, 0x8942 }, | ||
| 176 | { 25, "iPad2,7", "p107ap", 0x0e, 0x8942 }, | ||
| 177 | { 26, "iPad3,1", "j1ap", 0x00, 0x8945 }, | ||
| 178 | { 27, "iPad3,2", "j2ap", 0x02, 0x8945 }, | ||
| 179 | { 28, "iPad3,3", "j2aap", 0x04, 0x8945 }, | ||
| 180 | { 29, "iPad3,4", "p101ap", 0x00, 0x8955 }, | ||
| 181 | { 30, "iPad3,5", "p102ap", 0x02, 0x8955 }, | ||
| 182 | { 31, "iPad3,6", "p103ap", 0x04, 0x8955 }, | ||
| 183 | { 32, "AppleTV2,1", "k66ap", 0x10, 0x8930 }, | ||
| 184 | { 33, "AppleTV3,1", "j33ap", 0x08, 0x8942 }, | ||
| 185 | { 34, "AppleTV3,2","j33iap", 0x00, 0x8947 }, | ||
| 186 | { -1, NULL, NULL, -1, -1 } | ||
| 187 | }; | ||
| 188 | 80 | ||
| 189 | /* library */ | 81 | /* library */ |
| 190 | void irecv_set_debug_level(int level); | 82 | void irecv_set_debug_level(int level); |
