diff options
| author | 2009-07-07 21:02:00 +0200 | |
|---|---|---|
| committer | 2009-07-18 10:39:42 -0700 | |
| commit | b8ce722ffaeab22e141e18907c46bbed4659d857 (patch) | |
| tree | b30563dacd1ef2699fe79af9695bf237e1e688aa /swig/iphone.i | |
| parent | ab8e29dafc0577203e6867329b1d3ff9095a4fb2 (diff) | |
| download | libimobiledevice-b8ce722ffaeab22e141e18907c46bbed4659d857.tar.gz libimobiledevice-b8ce722ffaeab22e141e18907c46bbed4659d857.tar.bz2 | |
Cleanup lockdown request API and fix docs, tools, bindings and exports
Diffstat (limited to 'swig/iphone.i')
| -rw-r--r-- | swig/iphone.i | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/swig/iphone.i b/swig/iphone.i index 0a337ad..25687f5 100644 --- a/swig/iphone.i +++ b/swig/iphone.i | |||
| @@ -4,15 +4,16 @@ | |||
| 4 | %{ | 4 | %{ |
| 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 <plist/plist.h> | 8 | #include <plist/plist.h> |
| 8 | #include "../src/utils.h" | 9 | #include "../src/utils.h" |
| 9 | typedef struct { | 10 | typedef struct { |
| 10 | iphone_device_t dev; | 11 | iphone_device_t dev; |
| 11 | } iPhone; | 12 | } iPhone; |
| 12 | 13 | ||
| 13 | typedef struct { | 14 | typedef struct { |
| 14 | iPhone* dev; | 15 | iPhone* dev; |
| 15 | iphone_lckd_client_t client; | 16 | lockdownd_client_t client; |
| 16 | } Lockdownd; | 17 | } Lockdownd; |
| 17 | 18 | ||
| 18 | typedef struct { | 19 | typedef struct { |
| @@ -44,7 +45,7 @@ typedef struct { | |||
| 44 | 45 | ||
| 45 | typedef struct { | 46 | typedef struct { |
| 46 | iPhone* dev; | 47 | iPhone* dev; |
| 47 | iphone_lckd_client_t client; | 48 | lockdownd_client_t client; |
| 48 | } Lockdownd; | 49 | } Lockdownd; |
| 49 | 50 | ||
| 50 | typedef struct { | 51 | typedef struct { |
| @@ -68,7 +69,7 @@ Lockdownd* my_new_Lockdownd(iPhone* phone) { | |||
| 68 | Lockdownd* client = (Lockdownd*) malloc(sizeof(Lockdownd)); | 69 | Lockdownd* client = (Lockdownd*) malloc(sizeof(Lockdownd)); |
| 69 | client->dev = phone; | 70 | client->dev = phone; |
| 70 | client->client = NULL; | 71 | client->client = NULL; |
| 71 | if (IPHONE_E_SUCCESS == iphone_lckd_new_client ( phone->dev , &(client->client))) { | 72 | if (IPHONE_E_SUCCESS == lockdownd_new_client ( phone->dev , &(client->client))) { |
| 72 | return client; | 73 | return client; |
| 73 | } | 74 | } |
| 74 | else { | 75 | else { |
| @@ -79,7 +80,7 @@ Lockdownd* my_new_Lockdownd(iPhone* phone) { | |||
| 79 | 80 | ||
| 80 | void my_delete_Lockdownd(Lockdownd* lckd) { | 81 | void my_delete_Lockdownd(Lockdownd* lckd) { |
| 81 | if (lckd) { | 82 | if (lckd) { |
| 82 | iphone_lckd_free_client ( lckd->client ); | 83 | lockdownd_free_client ( lckd->client ); |
| 83 | free(lckd); | 84 | free(lckd); |
| 84 | } | 85 | } |
| 85 | } | 86 | } |
| @@ -88,7 +89,7 @@ MobileSync* my_new_MobileSync(Lockdownd* lckd) { | |||
| 88 | if (!lckd || !lckd->dev) return NULL; | 89 | if (!lckd || !lckd->dev) return NULL; |
| 89 | MobileSync* client = NULL; | 90 | MobileSync* client = NULL; |
| 90 | int port = 0; | 91 | int port = 0; |
| 91 | if (IPHONE_E_SUCCESS == iphone_lckd_start_service ( lckd->client, "com.apple.mobilesync", &port )) { | 92 | if (IPHONE_E_SUCCESS == lockdownd_start_service ( lckd->client, "com.apple.mobilesync", &port )) { |
| 92 | client = (MobileSync*) malloc(sizeof(MobileSync)); | 93 | client = (MobileSync*) malloc(sizeof(MobileSync)); |
| 93 | client->dev = lckd->dev; | 94 | client->dev = lckd->dev; |
| 94 | client->client = NULL; | 95 | client->client = NULL; |
| @@ -154,13 +155,13 @@ MobileSync* my_new_MobileSync(Lockdownd* lckd) { | |||
| 154 | } | 155 | } |
| 155 | 156 | ||
| 156 | void send(PListNode* node) { | 157 | void send(PListNode* node) { |
| 157 | iphone_lckd_send($self->client, node->node); | 158 | lockdownd_send($self->client, node->node); |
| 158 | } | 159 | } |
| 159 | 160 | ||
| 160 | PListNode* receive() { | 161 | PListNode* receive() { |
| 161 | PListNode* node = (PListNode*)malloc(sizeof(PListNode)); | 162 | PListNode* node = (PListNode*)malloc(sizeof(PListNode)); |
| 162 | node->node = NULL; | 163 | node->node = NULL; |
| 163 | iphone_lckd_recv($self->client, &(node->node)); | 164 | lockdownd_recv($self->client, &(node->node)); |
| 164 | return node; | 165 | return node; |
| 165 | } | 166 | } |
| 166 | 167 | ||
