diff options
| -rw-r--r-- | cython/imobiledevice.pxd | 8 | ||||
| -rw-r--r-- | cython/imobiledevice.pyx | 5 |
2 files changed, 11 insertions, 2 deletions
diff --git a/cython/imobiledevice.pxd b/cython/imobiledevice.pxd index 8523c94..b44e444 100644 --- a/cython/imobiledevice.pxd +++ b/cython/imobiledevice.pxd | |||
| @@ -23,13 +23,17 @@ cdef extern from "libimobiledevice/libimobiledevice.h": | |||
| 23 | cdef struct idevice_connection_private: | 23 | cdef struct idevice_connection_private: |
| 24 | pass | 24 | pass |
| 25 | ctypedef idevice_connection_private* idevice_connection_t | 25 | ctypedef idevice_connection_private* idevice_connection_t |
| 26 | cdef enum idevice_connection_type: | ||
| 27 | CONNECTION_USBMUXD = 1 | ||
| 28 | CONNECTION_NETWORK | ||
| 26 | cdef enum idevice_event_type: | 29 | cdef enum idevice_event_type: |
| 27 | IDEVICE_DEVICE_ADD = 1, | 30 | IDEVICE_DEVICE_ADD = 1 |
| 28 | IDEVICE_DEVICE_REMOVE | 31 | IDEVICE_DEVICE_REMOVE |
| 32 | IDEVICE_DEVICE_PAIRED | ||
| 29 | ctypedef struct idevice_event_t: | 33 | ctypedef struct idevice_event_t: |
| 30 | idevice_event_type event | 34 | idevice_event_type event |
| 31 | char *udid | 35 | char *udid |
| 32 | int conn_type | 36 | idevice_connection_type conn_type |
| 33 | ctypedef idevice_event_t* const_idevice_event_t "const idevice_event_t*" | 37 | ctypedef idevice_event_t* const_idevice_event_t "const idevice_event_t*" |
| 34 | 38 | ||
| 35 | cdef class iDeviceEvent: | 39 | cdef class iDeviceEvent: |
diff --git a/cython/imobiledevice.pyx b/cython/imobiledevice.pyx index 141f67c..aac4fdb 100644 --- a/cython/imobiledevice.pyx +++ b/cython/imobiledevice.pyx | |||
| @@ -40,6 +40,10 @@ cdef extern from "libimobiledevice/libimobiledevice.h": | |||
| 40 | IDEVICE_E_NOT_ENOUGH_DATA = -4 | 40 | IDEVICE_E_NOT_ENOUGH_DATA = -4 |
| 41 | IDEVICE_E_SSL_ERROR = -6 | 41 | IDEVICE_E_SSL_ERROR = -6 |
| 42 | IDEVICE_E_TIMEOUT = -7 | 42 | IDEVICE_E_TIMEOUT = -7 |
| 43 | cdef enum idevice_options: | ||
| 44 | IDEVICE_LOOKUP_USBMUX = 1 << 1 | ||
| 45 | IDEVICE_LOOKUP_NETWORK = 1 << 2 | ||
| 46 | IDEVICE_LOOKUP_PREFER_NETWORK = 1 << 3 | ||
| 43 | ctypedef void (*idevice_event_cb_t) (const_idevice_event_t event, void *user_data) | 47 | ctypedef void (*idevice_event_cb_t) (const_idevice_event_t event, void *user_data) |
| 44 | cdef extern idevice_error_t idevice_event_subscribe(idevice_event_cb_t callback, void *user_data) | 48 | cdef extern idevice_error_t idevice_event_subscribe(idevice_event_cb_t callback, void *user_data) |
| 45 | cdef extern idevice_error_t idevice_event_unsubscribe() | 49 | cdef extern idevice_error_t idevice_event_unsubscribe() |
| @@ -47,6 +51,7 @@ cdef extern from "libimobiledevice/libimobiledevice.h": | |||
| 47 | idevice_error_t idevice_device_list_free(char **devices) | 51 | idevice_error_t idevice_device_list_free(char **devices) |
| 48 | void idevice_set_debug_level(int level) | 52 | void idevice_set_debug_level(int level) |
| 49 | idevice_error_t idevice_new(idevice_t *device, char *udid) | 53 | idevice_error_t idevice_new(idevice_t *device, char *udid) |
| 54 | idevice_error_t idevice_new_with_options(idevice_t *device, const char *udid, idevice_options options); | ||
| 50 | idevice_error_t idevice_free(idevice_t device) | 55 | idevice_error_t idevice_free(idevice_t device) |
| 51 | idevice_error_t idevice_get_udid(idevice_t device, char** udid) | 56 | idevice_error_t idevice_get_udid(idevice_t device, char** udid) |
| 52 | idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle) | 57 | idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle) |
