diff options
Diffstat (limited to 'cython/imobiledevice.pxd')
| -rw-r--r-- | cython/imobiledevice.pxd | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/cython/imobiledevice.pxd b/cython/imobiledevice.pxd new file mode 100644 index 0000000..bdebe33 --- /dev/null +++ b/cython/imobiledevice.pxd | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | cimport plist | ||
| 2 | |||
| 3 | include "stdint.pxi" | ||
| 4 | |||
| 5 | cdef extern from "pyerrors.h": | ||
| 6 | ctypedef class __builtin__.Exception [object PyBaseExceptionObject]: | ||
| 7 | pass | ||
| 8 | |||
| 9 | cdef class BaseError(Exception): | ||
| 10 | cdef dict _lookup_table | ||
| 11 | cdef int16_t _c_errcode | ||
| 12 | |||
| 13 | cdef class iDeviceError(BaseError): pass | ||
| 14 | |||
| 15 | cdef extern from "libimobiledevice/libimobiledevice.h": | ||
| 16 | cdef struct idevice_int: | ||
| 17 | pass | ||
| 18 | ctypedef idevice_int* idevice_t | ||
| 19 | ctypedef int16_t idevice_error_t | ||
| 20 | cdef enum idevice_event_type: | ||
| 21 | IDEVICE_DEVICE_ADD = 1, | ||
| 22 | IDEVICE_DEVICE_REMOVE | ||
| 23 | ctypedef struct idevice_event_t: | ||
| 24 | idevice_event_type event | ||
| 25 | char *uuid | ||
| 26 | int conn_type | ||
| 27 | ctypedef idevice_event_t* const_idevice_event_t "const idevice_event_t*" | ||
| 28 | |||
| 29 | cdef class iDeviceEvent: | ||
| 30 | cdef const_idevice_event_t _c_event | ||
| 31 | |||
| 32 | cdef class iDevice: | ||
| 33 | cdef idevice_t _c_dev | ||
| 34 | |||
| 35 | cdef class LockdownError(BaseError): pass | ||
| 36 | |||
| 37 | cdef extern from "libimobiledevice/lockdown.h": | ||
| 38 | cdef struct lockdownd_client_int: | ||
| 39 | pass | ||
| 40 | ctypedef lockdownd_client_int *lockdownd_client_t | ||
| 41 | |||
| 42 | cdef class LockdownClient: | ||
| 43 | cdef lockdownd_client_t _c_client | ||
| 44 | cpdef int start_service(self, service) | ||
| 45 | cpdef goodbye(self) | ||
| 46 | |||
| 47 | cpdef set_debug_level(int level) | ||
| 48 | cpdef event_subscribe(object callback) | ||
| 49 | cpdef event_unsubscribe() | ||
| 50 | cpdef get_device_list() | ||
