diff options
| author | 2010-03-17 10:27:44 -0500 | |
|---|---|---|
| committer | 2012-03-20 23:25:54 +0100 | |
| commit | 68c63cc1382326e7f0cb4e6bd863427f9069ca05 (patch) | |
| tree | d4094cb7f98cdb081e614c519f6cf8d0f9080c18 /cython/property_list_client.pxi | |
| parent | cfe6244f8954efce4ef12b9b4338cc0d41a9ff40 (diff) | |
| download | libimobiledevice-68c63cc1382326e7f0cb4e6bd863427f9069ca05.tar.gz libimobiledevice-68c63cc1382326e7f0cb4e6bd863427f9069ca05.tar.bz2 | |
Added base class for more efficient error handling.
Diffstat (limited to 'cython/property_list_client.pxi')
| -rw-r--r-- | cython/property_list_client.pxi | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cython/property_list_client.pxi b/cython/property_list_client.pxi new file mode 100644 index 0000000..2689658 --- /dev/null +++ b/cython/property_list_client.pxi | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | cdef class PropertyListClient(Base): | ||
| 2 | cpdef send(self, plist.Node node): | ||
| 3 | cdef plist.Node n = node | ||
| 4 | self.handle_error(self._send(n._c_node)) | ||
| 5 | |||
| 6 | cpdef plist.Node receive(self): | ||
| 7 | cdef plist.plist_t c_node = NULL | ||
| 8 | self.handle_error(self._receive(&c_node)) | ||
| 9 | |||
| 10 | return plist.plist_t_to_node(c_node) | ||
| 11 | |||
| 12 | cdef inline int16_t _send(self, plist.plist_t node): pass | ||
| 13 | cdef inline int16_t _receive(self, plist.plist_t* c_node): pass | ||
