diff options
| author | 2010-05-13 08:58:46 -0400 | |
|---|---|---|
| committer | 2010-05-13 08:58:46 -0400 | |
| commit | 520c99d33e18009660f30bd38b31a2f1cd432fe6 (patch) | |
| tree | 554dcde9de73f69a1cc34de0e4c7819fd148a5e8 /include | |
| parent | 5bbd277ce71521a3898697e4c8cb25ed65990f9c (diff) | |
| download | libirecovery-520c99d33e18009660f30bd38b31a2f1cd432fe6.tar.gz libirecovery-520c99d33e18009660f30bd38b31a2f1cd432fe6.tar.bz2 | |
Implemented command line argument parsing and irecv_command() function.
Diffstat (limited to 'include')
| -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 | ||
