summaryrefslogtreecommitdiffstats
path: root/swig/iphone.i
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2009-07-14 14:21:53 +0200
committerGravatar Matt Colyer2009-07-18 10:39:42 -0700
commit484ff2166a2de58dd185a05fefea47a3f8165033 (patch)
treea8b6f712399369b60999dcd81c8bdbdd36c8ce8b /swig/iphone.i
parent5fa071717799ee2424c41b62360c7122b104fefb (diff)
downloadlibimobiledevice-484ff2166a2de58dd185a05fefea47a3f8165033.tar.gz
libimobiledevice-484ff2166a2de58dd185a05fefea47a3f8165033.tar.bz2
Cleanup mobilesync API and bindings. Move get_all_contacts() into msyncclient.
Diffstat (limited to 'swig/iphone.i')
-rw-r--r--swig/iphone.i15
1 files changed, 8 insertions, 7 deletions
diff --git a/swig/iphone.i b/swig/iphone.i
index 25687f5..53fa8da 100644
--- a/swig/iphone.i
+++ b/swig/iphone.i
@@ -5,6 +5,7 @@
5 /* Includes the header in the wrapper code */ 5 /* Includes the header in the wrapper code */
6 #include <libiphone/libiphone.h> 6 #include <libiphone/libiphone.h>
7 #include <libiphone/lockdown.h> 7 #include <libiphone/lockdown.h>
8 #include <libiphone/mobilesync.h>
8 #include <plist/plist.h> 9 #include <plist/plist.h>
9 #include "../src/utils.h" 10 #include "../src/utils.h"
10 typedef struct { 11 typedef struct {
@@ -18,7 +19,7 @@
18 19
19 typedef struct { 20 typedef struct {
20 iPhone* dev; 21 iPhone* dev;
21 iphone_msync_client_t client; 22 mobilesync_client_t client;
22 } MobileSync; 23 } MobileSync;
23 24
24//now declare funtions to handle creation and deletion of objects 25//now declare funtions to handle creation and deletion of objects
@@ -50,7 +51,7 @@ typedef struct {
50 51
51typedef struct { 52typedef struct {
52 iPhone* dev; 53 iPhone* dev;
53 iphone_msync_client_t client; 54 mobilesync_client_t client;
54} MobileSync; 55} MobileSync;
55 56
56%inline %{ 57%inline %{
@@ -93,7 +94,7 @@ MobileSync* my_new_MobileSync(Lockdownd* lckd) {
93 client = (MobileSync*) malloc(sizeof(MobileSync)); 94 client = (MobileSync*) malloc(sizeof(MobileSync));
94 client->dev = lckd->dev; 95 client->dev = lckd->dev;
95 client->client = NULL; 96 client->client = NULL;
96 iphone_msync_new_client ( lckd->dev->dev, port, &(client->client)); 97 mobilesync_new_client ( lckd->dev->dev, port, &(client->client));
97 } 98 }
98 return client; 99 return client;
99} 100}
@@ -165,7 +166,7 @@ MobileSync* my_new_MobileSync(Lockdownd* lckd) {
165 return node; 166 return node;
166 } 167 }
167 168
168 MobileSync* get_mobile_sync_client() { 169 MobileSync* get_mobilesync_client() {
169 return my_new_MobileSync($self); 170 return my_new_MobileSync($self);
170 } 171 }
171}; 172};
@@ -176,18 +177,18 @@ MobileSync* my_new_MobileSync(Lockdownd* lckd) {
176 } 177 }
177 178
178 ~MobileSync() { 179 ~MobileSync() {
179 iphone_msync_free_client ( $self->client ); 180 mobilesync_free_client ( $self->client );
180 free($self); 181 free($self);
181 } 182 }
182 183
183 void send(PListNode* node) { 184 void send(PListNode* node) {
184 iphone_msync_send($self->client, node->node); 185 mobilesync_send($self->client, node->node);
185 } 186 }
186 187
187 PListNode* receive() { 188 PListNode* receive() {
188 PListNode* node = (PListNode*)malloc(sizeof(PListNode)); 189 PListNode* node = (PListNode*)malloc(sizeof(PListNode));
189 node->node = NULL; 190 node->node = NULL;
190 iphone_msync_recv($self->client, &(node->node)); 191 mobilesync_recv($self->client, &(node->node));
191 return node; 192 return node;
192 } 193 }
193}; 194};