diff options
Diffstat (limited to 'include/libirecovery.h')
| -rw-r--r-- | include/libirecovery.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/include/libirecovery.h b/include/libirecovery.h index 342e99b..b489011 100644 --- a/include/libirecovery.h +++ b/include/libirecovery.h | |||
| @@ -18,14 +18,15 @@ | |||
| 18 | 18 | ||
| 19 | #include <libusb-1.0/libusb.h> | 19 | #include <libusb-1.0/libusb.h> |
| 20 | 20 | ||
| 21 | #define kAppleVendorId 0x05AC | 21 | #define IRECV_SUCCESS 0 |
| 22 | 22 | #define IRECV_ERROR_NO_DEVICE -1 | |
| 23 | #define IRECV_SUCCESS 0 | 23 | #define IRECV_ERROR_OUT_OF_MEMORY -2 |
| 24 | #define IRECV_ERROR_NO_DEVICE -1 | 24 | #define IRECV_ERROR_UNABLE_TO_CONNECT -3 |
| 25 | #define IRECV_ERROR_OUT_OF_MEMORY -2 | 25 | #define IRECV_ERROR_INVALID_INPUT -4 |
| 26 | #define IRECV_ERROR_UNABLE_TO_CONNECT -3 | 26 | #define IRECV_ERROR_UNKNOWN -5 |
| 27 | 27 | ||
| 28 | enum { | 28 | enum { |
| 29 | kAppleId = 0x05AC, | ||
| 29 | kKernelMode = 0x1294, | 30 | kKernelMode = 0x1294, |
| 30 | kRecoveryMode = 0x1281, | 31 | kRecoveryMode = 0x1281, |
| 31 | kDfuMode = 0x1227 | 32 | kDfuMode = 0x1227 |
| @@ -37,9 +38,11 @@ typedef struct { | |||
| 37 | struct libusb_device_handle* handle; | 38 | struct libusb_device_handle* handle; |
| 38 | } irecv_device; | 39 | } irecv_device; |
| 39 | 40 | ||
| 40 | int irecv_init(irecv_device** device); | 41 | void irecv_set_debug(int level); |
| 41 | int irecv_open(irecv_device* device); | 42 | int irecv_open(irecv_device* device); |
| 43 | int irecv_exit(irecv_device* device); | ||
| 44 | int irecv_init(irecv_device** device); | ||
| 42 | int irecv_reset(irecv_device* device); | 45 | int irecv_reset(irecv_device* device); |
| 43 | int irecv_close(irecv_device* device); | 46 | int irecv_close(irecv_device* device); |
| 44 | int irecv_exit(irecv_device* device); | 47 | int irecv_command(irecv_device* device, const char* command); |
| 45 | 48 | ||
