diff options
Diffstat (limited to 'cython/imobiledevice.pyx')
| -rw-r--r-- | cython/imobiledevice.pyx | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/cython/imobiledevice.pyx b/cython/imobiledevice.pyx index c6a96dd..ecf94e1 100644 --- a/cython/imobiledevice.pyx +++ b/cython/imobiledevice.pyx | |||
| @@ -30,13 +30,14 @@ cdef class Base: | |||
| 30 | cdef inline BaseError _error(self, int16_t ret): pass | 30 | cdef inline BaseError _error(self, int16_t ret): pass |
| 31 | 31 | ||
| 32 | cdef extern from "libimobiledevice/libimobiledevice.h": | 32 | cdef extern from "libimobiledevice/libimobiledevice.h": |
| 33 | int16_t IDEVICE_E_SUCCESS | 33 | ctypedef enum idevice_error_t: |
| 34 | int16_t IDEVICE_E_INVALID_ARG | 34 | IDEVICE_E_SUCCESS = 0 |
| 35 | int16_t IDEVICE_E_UNKNOWN_ERROR | 35 | IDEVICE_E_INVALID_ARG = -1 |
| 36 | int16_t IDEVICE_E_NO_DEVICE | 36 | IDEVICE_E_UNKNOWN_ERROR = -2 |
| 37 | int16_t IDEVICE_E_NOT_ENOUGH_DATA | 37 | IDEVICE_E_NO_DEVICE = -3 |
| 38 | int16_t IDEVICE_E_BAD_HEADER | 38 | IDEVICE_E_NOT_ENOUGH_DATA = -4 |
| 39 | int16_t IDEVICE_E_SSL_ERROR | 39 | IDEVICE_E_BAD_HEADER = -5 |
| 40 | IDEVICE_E_SSL_ERROR = -6 | ||
| 40 | ctypedef void (*idevice_event_cb_t) (const_idevice_event_t event, void *user_data) | 41 | ctypedef void (*idevice_event_cb_t) (const_idevice_event_t event, void *user_data) |
| 41 | cdef extern idevice_error_t idevice_event_subscribe(idevice_event_cb_t callback, void *user_data) | 42 | cdef extern idevice_error_t idevice_event_subscribe(idevice_event_cb_t callback, void *user_data) |
| 42 | cdef extern idevice_error_t idevice_event_unsubscribe() | 43 | cdef extern idevice_error_t idevice_event_unsubscribe() |
| @@ -49,7 +50,7 @@ cdef extern from "libimobiledevice/libimobiledevice.h": | |||
| 49 | idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle) | 50 | idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle) |
| 50 | 51 | ||
| 51 | cdef class iDeviceError(BaseError): | 52 | cdef class iDeviceError(BaseError): |
| 52 | def __cinit__(self, *args, **kwargs): | 53 | def __init__(self, *args, **kwargs): |
| 53 | self._lookup_table = { | 54 | self._lookup_table = { |
| 54 | IDEVICE_E_SUCCESS: 'Success', | 55 | IDEVICE_E_SUCCESS: 'Success', |
| 55 | IDEVICE_E_INVALID_ARG: 'Invalid argument', | 56 | IDEVICE_E_INVALID_ARG: 'Invalid argument', |
| @@ -133,27 +134,27 @@ cdef extern from "libimobiledevice/lockdown.h": | |||
| 133 | cdef struct lockdownd_client_int: | 134 | cdef struct lockdownd_client_int: |
| 134 | pass | 135 | pass |
| 135 | ctypedef lockdownd_client_int *lockdownd_client_t | 136 | ctypedef lockdownd_client_int *lockdownd_client_t |
| 136 | ctypedef int16_t lockdownd_error_t | 137 | ctypedef enum lockdownd_error_t: |
| 137 | int16_t LOCKDOWN_E_SUCCESS | 138 | LOCKDOWN_E_SUCCESS = 0 |
| 138 | int16_t LOCKDOWN_E_INVALID_ARG | 139 | LOCKDOWN_E_INVALID_ARG = -1 |
| 139 | int16_t LOCKDOWN_E_INVALID_CONF | 140 | LOCKDOWN_E_INVALID_CONF = -2 |
| 140 | int16_t LOCKDOWN_E_PLIST_ERROR | 141 | LOCKDOWN_E_PLIST_ERROR = -3 |
| 141 | int16_t LOCKDOWN_E_PAIRING_FAILED | 142 | LOCKDOWN_E_PAIRING_FAILED = -4 |
| 142 | int16_t LOCKDOWN_E_SSL_ERROR | 143 | LOCKDOWN_E_SSL_ERROR = -5 |
| 143 | int16_t LOCKDOWN_E_DICT_ERROR | 144 | LOCKDOWN_E_DICT_ERROR = -6 |
| 144 | int16_t LOCKDOWN_E_START_SERVICE_FAILED | 145 | LOCKDOWN_E_START_SERVICE_FAILED = -7 |
| 145 | int16_t LOCKDOWN_E_NOT_ENOUGH_DATA | 146 | LOCKDOWN_E_NOT_ENOUGH_DATA = -8 |
| 146 | int16_t LOCKDOWN_E_SET_VALUE_PROHIBITED | 147 | LOCKDOWN_E_SET_VALUE_PROHIBITED = -9 |
| 147 | int16_t LOCKDOWN_E_GET_VALUE_PROHIBITED | 148 | LOCKDOWN_E_GET_VALUE_PROHIBITED = -10 |
| 148 | int16_t LOCKDOWN_E_REMOVE_VALUE_PROHIBITED | 149 | LOCKDOWN_E_REMOVE_VALUE_PROHIBITED = -11 |
| 149 | int16_t LOCKDOWN_E_MUX_ERROR | 150 | LOCKDOWN_E_MUX_ERROR = -12 |
| 150 | int16_t LOCKDOWN_E_ACTIVATION_FAILED | 151 | LOCKDOWN_E_ACTIVATION_FAILED = -13 |
| 151 | int16_t LOCKDOWN_E_PASSWORD_PROTECTED | 152 | LOCKDOWN_E_PASSWORD_PROTECTED = -14 |
| 152 | int16_t LOCKDOWN_E_NO_RUNNING_SESSION | 153 | LOCKDOWN_E_NO_RUNNING_SESSION = -15 |
| 153 | int16_t LOCKDOWN_E_INVALID_HOST_ID | 154 | LOCKDOWN_E_INVALID_HOST_ID = -16 |
| 154 | int16_t LOCKDOWN_E_INVALID_SERVICE | 155 | LOCKDOWN_E_INVALID_SERVICE = -17 |
| 155 | int16_t LOCKDOWN_E_INVALID_ACTIVATION_RECORD | 156 | LOCKDOWN_E_INVALID_ACTIVATION_RECORD = -18 |
| 156 | int16_t LOCKDOWN_E_UNKNOWN_ERROR | 157 | LOCKDOWN_E_UNKNOWN_ERROR = -256 |
| 157 | 158 | ||
| 158 | lockdownd_error_t lockdownd_client_new_with_handshake(idevice_t device, lockdownd_client_t *client, char *label) | 159 | lockdownd_error_t lockdownd_client_new_with_handshake(idevice_t device, lockdownd_client_t *client, char *label) |
| 159 | lockdownd_error_t lockdownd_client_free(lockdownd_client_t client) | 160 | lockdownd_error_t lockdownd_client_free(lockdownd_client_t client) |
| @@ -217,3 +218,4 @@ include "mobilesync.pxi" | |||
| 217 | include "notification_proxy.pxi" | 218 | include "notification_proxy.pxi" |
| 218 | include "sbservices.pxi" | 219 | include "sbservices.pxi" |
| 219 | include "mobilebackup.pxi" | 220 | include "mobilebackup.pxi" |
| 221 | include "afc.pxi" | ||
