diff options
Diffstat (limited to 'cython/imobiledevice.pyx')
| -rw-r--r-- | cython/imobiledevice.pyx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cython/imobiledevice.pyx b/cython/imobiledevice.pyx index 9d2e13d..cdb9978 100644 --- a/cython/imobiledevice.pyx +++ b/cython/imobiledevice.pyx | |||
| @@ -210,12 +210,29 @@ cdef class PropertyListService(BaseService): | |||
| 210 | plist.plist_free(c_node) | 210 | plist.plist_free(c_node) |
| 211 | raise | 211 | raise |
| 212 | 212 | ||
| 213 | cpdef object receive_with_timeout(self, int timeout_ms): | ||
| 214 | cdef: | ||
| 215 | plist.plist_t c_node = NULL | ||
| 216 | int16_t err | ||
| 217 | err = self._receive_with_timeout(&c_node, timeout_ms) | ||
| 218 | try: | ||
| 219 | self.handle_error(err) | ||
| 220 | |||
| 221 | return plist.plist_t_to_node(c_node) | ||
| 222 | except BaseError, e: | ||
| 223 | if c_node != NULL: | ||
| 224 | plist.plist_free(c_node) | ||
| 225 | raise | ||
| 226 | |||
| 213 | cdef int16_t _send(self, plist.plist_t node): | 227 | cdef int16_t _send(self, plist.plist_t node): |
| 214 | raise NotImplementedError("send is not implemented") | 228 | raise NotImplementedError("send is not implemented") |
| 215 | 229 | ||
| 216 | cdef int16_t _receive(self, plist.plist_t* c_node): | 230 | cdef int16_t _receive(self, plist.plist_t* c_node): |
| 217 | raise NotImplementedError("receive is not implemented") | 231 | raise NotImplementedError("receive is not implemented") |
| 218 | 232 | ||
| 233 | cdef int16_t _receive_with_timeout(self, plist.plist_t* c_node, int timeout_ms): | ||
| 234 | raise NotImplementedError("receive_with_timeout is not implemented") | ||
| 235 | |||
| 219 | cdef class DeviceLinkService(PropertyListService): | 236 | cdef class DeviceLinkService(PropertyListService): |
| 220 | pass | 237 | pass |
| 221 | 238 | ||
