diff options
Diffstat (limited to 'swig/iphone.i')
| -rw-r--r-- | swig/iphone.i | 15 |
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 | ||
| 51 | typedef struct { | 52 | typedef 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 | }; |
