summaryrefslogtreecommitdiffstats
path: root/cython/mobilesync.pxi
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2012-03-20 22:56:33 +0100
committerGravatar Martin Szulecki2012-03-20 23:25:56 +0100
commit2d9ecc3d805e616b2bf85c0b8e99737e9b30c89d (patch)
tree48e924795c6bf3c217de61efe6048f6bb6573244 /cython/mobilesync.pxi
parent3e9d17ccd5212c110db9cfb5daa2d889d0a1aee4 (diff)
downloadlibimobiledevice-2d9ecc3d805e616b2bf85c0b8e99737e9b30c89d.tar.gz
libimobiledevice-2d9ecc3d805e616b2bf85c0b8e99737e9b30c89d.tar.bz2
cython: Update to latest API and fix deprecation warnings with cython 0.13+
Diffstat (limited to 'cython/mobilesync.pxi')
-rw-r--r--cython/mobilesync.pxi10
1 files changed, 6 insertions, 4 deletions
diff --git a/cython/mobilesync.pxi b/cython/mobilesync.pxi
index aef13f9..beafe10 100644
--- a/cython/mobilesync.pxi
+++ b/cython/mobilesync.pxi
@@ -35,7 +35,7 @@ cdef extern from "libimobiledevice/mobilesync.h":
35 35
36 mobilesync_error_t mobilesync_get_all_records_from_device(mobilesync_client_t client) 36 mobilesync_error_t mobilesync_get_all_records_from_device(mobilesync_client_t client)
37 mobilesync_error_t mobilesync_get_changes_from_device(mobilesync_client_t client) 37 mobilesync_error_t mobilesync_get_changes_from_device(mobilesync_client_t client)
38 mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist.plist_t *entities, uint8_t *is_last_record) 38 mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist.plist_t *entities, uint8_t *is_last_record, plist.plist_t *actions)
39 mobilesync_error_t mobilesync_acknowledge_changes_from_device(mobilesync_client_t client) 39 mobilesync_error_t mobilesync_acknowledge_changes_from_device(mobilesync_client_t client)
40 40
41 mobilesync_error_t mobilesync_ready_to_send_changes_from_computer(mobilesync_client_t client) 41 mobilesync_error_t mobilesync_ready_to_send_changes_from_computer(mobilesync_client_t client)
@@ -114,13 +114,15 @@ cdef class MobileSyncClient(DeviceLinkService):
114 cdef: 114 cdef:
115 plist.plist_t entities = NULL 115 plist.plist_t entities = NULL
116 uint8_t is_last_record = 0 116 uint8_t is_last_record = 0
117 117 plist.plist_t actions = NULL
118 try: 118 try:
119 self.handle_error(mobilesync_receive_changes(self._c_client, &entities, &is_last_record)) 119 self.handle_error(mobilesync_receive_changes(self._c_client, &entities, &is_last_record, &actions))
120 return (plist.plist_t_to_node(entities), <bint>is_last_record) 120 return (plist.plist_t_to_node(entities), <bint>is_last_record, plist.plist_t_to_node(actions))
121 except Exception, e: 121 except Exception, e:
122 if entities != NULL: 122 if entities != NULL:
123 plist.plist_free(entities) 123 plist.plist_free(entities)
124 if actions != NULL:
125 plist.plist_free(actions)
124 raise 126 raise
125 127
126 cpdef acknowledge_changes_from_device(self): 128 cpdef acknowledge_changes_from_device(self):