diff options
author | Martin Szulecki | 2020-06-07 16:03:06 +0200 |
---|---|---|
committer | Martin Szulecki | 2020-06-07 16:03:06 +0200 |
commit | fb99e7c9d22c7d07b3b5fdb5064d3aa6cef88e62 (patch) | |
tree | 2cf8aa54c6e5f9b8626b08fc9369dfc3323ad3fc | |
parent | 03ba291453b992101a3fa15cc4469f1cc053927c (diff) | |
download | libimobiledevice-fb99e7c9d22c7d07b3b5fdb5064d3aa6cef88e62.tar.gz libimobiledevice-fb99e7c9d22c7d07b3b5fdb5064d3aa6cef88e62.tar.bz2 |
cython: First run at updating Python bindings to updated interface
-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": cdef struct idevice_connection_private: pass ctypedef idevice_connection_private* idevice_connection_t + cdef enum idevice_connection_type: + CONNECTION_USBMUXD = 1 + CONNECTION_NETWORK cdef enum idevice_event_type: - IDEVICE_DEVICE_ADD = 1, + IDEVICE_DEVICE_ADD = 1 IDEVICE_DEVICE_REMOVE + IDEVICE_DEVICE_PAIRED ctypedef struct idevice_event_t: idevice_event_type event char *udid - int conn_type + idevice_connection_type conn_type ctypedef idevice_event_t* const_idevice_event_t "const idevice_event_t*" 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": IDEVICE_E_NOT_ENOUGH_DATA = -4 IDEVICE_E_SSL_ERROR = -6 IDEVICE_E_TIMEOUT = -7 + cdef enum idevice_options: + IDEVICE_LOOKUP_USBMUX = 1 << 1 + IDEVICE_LOOKUP_NETWORK = 1 << 2 + IDEVICE_LOOKUP_PREFER_NETWORK = 1 << 3 ctypedef void (*idevice_event_cb_t) (const_idevice_event_t event, void *user_data) cdef extern idevice_error_t idevice_event_subscribe(idevice_event_cb_t callback, void *user_data) cdef extern idevice_error_t idevice_event_unsubscribe() @@ -47,6 +51,7 @@ cdef extern from "libimobiledevice/libimobiledevice.h": idevice_error_t idevice_device_list_free(char **devices) void idevice_set_debug_level(int level) idevice_error_t idevice_new(idevice_t *device, char *udid) + idevice_error_t idevice_new_with_options(idevice_t *device, const char *udid, idevice_options options); idevice_error_t idevice_free(idevice_t device) idevice_error_t idevice_get_udid(idevice_t device, char** udid) idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle) |