summaryrefslogtreecommitdiffstats
path: root/cython/imobiledevice.pxd
diff options
context:
space:
mode:
Diffstat (limited to 'cython/imobiledevice.pxd')
-rw-r--r--cython/imobiledevice.pxd50
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 @@
1cimport plist
2
3include "stdint.pxi"
4
5cdef extern from "pyerrors.h":
6 ctypedef class __builtin__.Exception [object PyBaseExceptionObject]:
7 pass
8
9cdef class BaseError(Exception):
10 cdef dict _lookup_table
11 cdef int16_t _c_errcode
12
13cdef class iDeviceError(BaseError): pass
14
15cdef 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
29cdef class iDeviceEvent:
30 cdef const_idevice_event_t _c_event
31
32cdef class iDevice:
33 cdef idevice_t _c_dev
34
35cdef class LockdownError(BaseError): pass
36
37cdef extern from "libimobiledevice/lockdown.h":
38 cdef struct lockdownd_client_int:
39 pass
40 ctypedef lockdownd_client_int *lockdownd_client_t
41
42cdef class LockdownClient:
43 cdef lockdownd_client_t _c_client
44 cpdef int start_service(self, service)
45 cpdef goodbye(self)
46
47cpdef set_debug_level(int level)
48cpdef event_subscribe(object callback)
49cpdef event_unsubscribe()
50cpdef get_device_list()