diff options
| author | 2010-04-09 16:52:30 -0500 | |
|---|---|---|
| committer | 2012-03-20 23:25:55 +0100 | |
| commit | bea5efe442daeab05d5d7a2e9d9e7b934ba6e684 (patch) | |
| tree | 0346eebd799517c0976e640db7241d0c72cf7d95 /cython/mobilebackup.pxi | |
| parent | acac4f819ccafa6f6bb945626f2e21ec2b75074b (diff) | |
| download | libimobiledevice-bea5efe442daeab05d5d7a2e9d9e7b934ba6e684.tar.gz libimobiledevice-bea5efe442daeab05d5d7a2e9d9e7b934ba6e684.tar.bz2 | |
Implemented hierarchy suggested by Martin S.
Implemented new BaseService constructors.
Moved LockdownClient to lockdown.pxi.
Implemented more of the afc interface.
Diffstat (limited to 'cython/mobilebackup.pxi')
| -rw-r--r-- | cython/mobilebackup.pxi | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/cython/mobilebackup.pxi b/cython/mobilebackup.pxi index 330a99d..cb5276e 100644 --- a/cython/mobilebackup.pxi +++ b/cython/mobilebackup.pxi | |||
| @@ -28,19 +28,14 @@ cdef class MobileBackupError(BaseError): | |||
| 28 | } | 28 | } |
| 29 | BaseError.__init__(self, *args, **kwargs) | 29 | BaseError.__init__(self, *args, **kwargs) |
| 30 | 30 | ||
| 31 | cdef class MobileBackupClient(PropertyListClient): | 31 | cdef class MobileBackupClient(PropertyListService): |
| 32 | __service_name__ = "com.apple.mobilebackup" | ||
| 32 | cdef mobilebackup_client_t _c_client | 33 | cdef mobilebackup_client_t _c_client |
| 33 | 34 | ||
| 34 | def __cinit__(self, iDevice device not None, LockdownClient lockdown=None, *args, **kwargs): | 35 | def __cinit__(self, iDevice device not None, int port, *args, **kwargs): |
| 35 | cdef: | 36 | cdef: |
| 36 | iDevice dev = device | 37 | iDevice dev = device |
| 37 | LockdownClient lckd | ||
| 38 | mobilebackup_error_t err | 38 | mobilebackup_error_t err |
| 39 | if lockdown is None: | ||
| 40 | lckd = LockdownClient(dev) | ||
| 41 | else: | ||
| 42 | lckd = lockdown | ||
| 43 | port = lckd.start_service("com.apple.mobilebackup") | ||
| 44 | err = mobilebackup_client_new(dev._c_dev, port, &self._c_client) | 39 | err = mobilebackup_client_new(dev._c_dev, port, &self._c_client) |
| 45 | self.handle_error(err) | 40 | self.handle_error(err) |
| 46 | 41 | ||
