summaryrefslogtreecommitdiffstats
path: root/cython/afc.pxi
diff options
context:
space:
mode:
authorGravatar Kurt Kiefer2014-01-21 15:30:05 -0800
committerGravatar Martin Szulecki2014-03-12 19:23:48 +0100
commit2636941a177dcbbb0fc1d00fd3213632b55c9b7d (patch)
tree6e1371e08dc6f322b127689900e9fdb473d69d7d /cython/afc.pxi
parent6c905358d5f6f73120369891b5c28b26fd6feb29 (diff)
downloadlibimobiledevice-2636941a177dcbbb0fc1d00fd3213632b55c9b7d.tar.gz
libimobiledevice-2636941a177dcbbb0fc1d00fd3213632b55c9b7d.tar.bz2
Changes to make cython HouseArrestClient functional.
Allow HouseArrestClient to initialize the AfcClient without running afc's normal __cinit__ body, and expose send_command and send_request methods to python. Signed-off-by: Martin Szulecki <m.szulecki@libimobiledevice.org>
Diffstat (limited to 'cython/afc.pxi')
-rw-r--r--cython/afc.pxi5
1 files changed, 3 insertions, 2 deletions
diff --git a/cython/afc.pxi b/cython/afc.pxi
index abc1180..e34588f 100644
--- a/cython/afc.pxi
+++ b/cython/afc.pxi
@@ -171,8 +171,9 @@ cdef class AfcClient(BaseService):
__service_name__ = "com.apple.afc"
cdef afc_client_t _c_client
- def __cinit__(self, iDevice device not None, LockdownServiceDescriptor descriptor, *args, **kwargs):
- self.handle_error(afc_client_new(device._c_dev, descriptor._c_service_descriptor, &(self._c_client)))
+ def __cinit__(self, iDevice device = None, LockdownServiceDescriptor descriptor = None, *args, **kwargs):
+ if (device is not None and descriptor is not None):
+ self.handle_error(afc_client_new(device._c_dev, descriptor._c_service_descriptor, &(self._c_client)))
def __dealloc__(self):
cdef afc_error_t err