diff options
| author | 2010-05-13 05:59:36 -0400 | |
|---|---|---|
| committer | 2010-05-13 05:59:36 -0400 | |
| commit | a57e39d7180ae1c7ce28105fb0c735121dec6f0d (patch) | |
| tree | f435bddb3658cb310cb9f5e57b20775f32ec26c7 /include | |
| parent | 2e8feabfe1ec82e75434663d5e3128e1769f34c5 (diff) | |
| download | libirecovery-a57e39d7180ae1c7ce28105fb0c735121dec6f0d.tar.gz libirecovery-a57e39d7180ae1c7ce28105fb0c735121dec6f0d.tar.bz2 | |
Began work. Added basic Makefile and implemented irecv_init(), irecv_open(), irecv_close(), and irecv_exit()
Needs to be tested on MacOSX and Windows, and Makefile needs to be updated for these platforms.
Diffstat (limited to 'include')
| -rw-r--r-- | include/libirecovery.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/include/libirecovery.h b/include/libirecovery.h new file mode 100644 index 0000000..c94a3e6 --- /dev/null +++ b/include/libirecovery.h | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | /** | ||
| 2 | * iRecovery - Utility for DFU 2.0, WTF and Recovery Mode | ||
| 3 | * Copyright (C) 2008 - 2009 westbaer | ||
| 4 | * | ||
| 5 | * This program is free software: you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation, either version 3 of the License, or | ||
| 8 | * (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 17 | **/ | ||
| 18 | |||
| 19 | #include <libusb-1.0/libusb.h> | ||
| 20 | |||
| 21 | #define kAppleVendorId 0x05AC | ||
| 22 | |||
| 23 | #define IRECV_SUCCESS 0 | ||
| 24 | #define IRECV_ERROR_NO_DEVICE -1 | ||
| 25 | #define IRECV_ERROR_OUT_OF_MEMORY -2 | ||
| 26 | #define IRECV_ERROR_UNABLE_TO_CONNECT -3 | ||
| 27 | |||
| 28 | enum { | ||
| 29 | kKernelMode = 0x1294, | ||
| 30 | kRecoveryMode = 0x1281, | ||
| 31 | kDfuMode = 0x1227 | ||
| 32 | }; | ||
| 33 | |||
| 34 | typedef struct { | ||
| 35 | unsigned int mode; | ||
| 36 | struct libusb_context* context; | ||
| 37 | struct libusb_device_handle* handle; | ||
| 38 | } irecv_device; | ||
| 39 | |||
| 40 | int irecv_init(irecv_device** device); | ||
| 41 | int irecv_open(irecv_device* device); | ||
| 42 | int irecv_close(irecv_device* device); | ||
| 43 | int irecv_exit(irecv_device* device); | ||
