diff options
| author | 2009-07-26 19:34:22 -0700 | |
|---|---|---|
| committer | 2009-07-26 19:34:22 -0700 | |
| commit | eea538c94f01f8054f69f059614f19400187a472 (patch) | |
| tree | 209a12dc8c8eaece15b8153d15e689c8c2147ab6 /swig | |
| parent | 8ebfd7d8eea89bb27e4e6dbb1f37fd90d98b439c (diff) | |
| parent | 19c9750d670435ce430f0fc85a55faf127bdfbf9 (diff) | |
| download | libimobiledevice-eea538c94f01f8054f69f059614f19400187a472.tar.gz libimobiledevice-eea538c94f01f8054f69f059614f19400187a472.tar.bz2 | |
Merge commit 'martin-s/martin'
[#46 state:resolved]
Diffstat (limited to 'swig')
| -rw-r--r-- | swig/iphone.i | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/swig/iphone.i b/swig/iphone.i index 53fa8da..3c208ef 100644 --- a/swig/iphone.i +++ b/swig/iphone.i | |||
| @@ -36,9 +36,8 @@ MobileSync* my_new_MobileSync(Lockdownd* lckd); | |||
| 36 | 36 | ||
| 37 | #define DBGMASK_ALL 0xFFFF | 37 | #define DBGMASK_ALL 0xFFFF |
| 38 | #define DBGMASK_NONE 0x0000 | 38 | #define DBGMASK_NONE 0x0000 |
| 39 | #define DBGMASK_USBMUX (1 << 1) | 39 | #define DBGMASK_LOCKDOWND (1 << 1) |
| 40 | #define DBGMASK_LOCKDOWND (1 << 2) | 40 | #define DBGMASK_MOBILESYNC (1 << 2) |
| 41 | #define DBGMASK_MOBILESYNC (1 << 3) | ||
| 42 | 41 | ||
| 43 | typedef struct { | 42 | typedef struct { |
| 44 | iphone_device_t dev; | 43 | iphone_device_t dev; |
| @@ -60,7 +59,7 @@ typedef struct { | |||
| 60 | 59 | ||
| 61 | void my_delete_iPhone(iPhone* dev) { | 60 | void my_delete_iPhone(iPhone* dev) { |
| 62 | if (dev) { | 61 | if (dev) { |
| 63 | iphone_free_device ( dev->dev ); | 62 | iphone_device_free(dev->dev); |
| 64 | free(dev); | 63 | free(dev); |
| 65 | } | 64 | } |
| 66 | } | 65 | } |
| @@ -70,7 +69,7 @@ Lockdownd* my_new_Lockdownd(iPhone* phone) { | |||
| 70 | Lockdownd* client = (Lockdownd*) malloc(sizeof(Lockdownd)); | 69 | Lockdownd* client = (Lockdownd*) malloc(sizeof(Lockdownd)); |
| 71 | client->dev = phone; | 70 | client->dev = phone; |
| 72 | client->client = NULL; | 71 | client->client = NULL; |
| 73 | if (IPHONE_E_SUCCESS == lockdownd_new_client ( phone->dev , &(client->client))) { | 72 | if (LOCKDOWN_E_SUCCESS == lockdownd_client_new(phone->dev , &(client->client))) { |
| 74 | return client; | 73 | return client; |
| 75 | } | 74 | } |
| 76 | else { | 75 | else { |
| @@ -81,7 +80,7 @@ Lockdownd* my_new_Lockdownd(iPhone* phone) { | |||
| 81 | 80 | ||
| 82 | void my_delete_Lockdownd(Lockdownd* lckd) { | 81 | void my_delete_Lockdownd(Lockdownd* lckd) { |
| 83 | if (lckd) { | 82 | if (lckd) { |
| 84 | lockdownd_free_client ( lckd->client ); | 83 | lockdownd_client_free(lckd->client); |
| 85 | free(lckd); | 84 | free(lckd); |
| 86 | } | 85 | } |
| 87 | } | 86 | } |
| @@ -90,11 +89,11 @@ MobileSync* my_new_MobileSync(Lockdownd* lckd) { | |||
| 90 | if (!lckd || !lckd->dev) return NULL; | 89 | if (!lckd || !lckd->dev) return NULL; |
| 91 | MobileSync* client = NULL; | 90 | MobileSync* client = NULL; |
| 92 | int port = 0; | 91 | int port = 0; |
| 93 | if (IPHONE_E_SUCCESS == lockdownd_start_service ( lckd->client, "com.apple.mobilesync", &port )) { | 92 | if (LOCKDOWN_E_SUCCESS == lockdownd_start_service(lckd->client, "com.apple.mobilesync", &port)) { |
| 94 | client = (MobileSync*) malloc(sizeof(MobileSync)); | 93 | client = (MobileSync*) malloc(sizeof(MobileSync)); |
| 95 | client->dev = lckd->dev; | 94 | client->dev = lckd->dev; |
| 96 | client->client = NULL; | 95 | client->client = NULL; |
| 97 | mobilesync_new_client ( lckd->dev->dev, port, &(client->client)); | 96 | mobilesync_client_new(lckd->dev->dev, port, &(client->client)); |
| 98 | } | 97 | } |
| 99 | return client; | 98 | return client; |
| 100 | } | 99 | } |
| @@ -118,17 +117,17 @@ MobileSync* my_new_MobileSync(Lockdownd* lckd) { | |||
| 118 | } | 117 | } |
| 119 | 118 | ||
| 120 | void set_debug_level(int level) { | 119 | void set_debug_level(int level) { |
| 121 | iphone_set_debug(level); | 120 | iphone_set_debug_level(level); |
| 122 | } | 121 | } |
| 123 | 122 | ||
| 124 | int init_device_by_uuid(char* uuid) { | 123 | int init_device_by_uuid(char* uuid) { |
| 125 | if (IPHONE_E_SUCCESS == iphone_get_device_by_uuid ( &($self->dev), uuid)) | 124 | if (IPHONE_E_SUCCESS == iphone_get_device_by_uuid(&($self->dev), uuid)) |
| 126 | return 1; | 125 | return 1; |
| 127 | return 0; | 126 | return 0; |
| 128 | } | 127 | } |
| 129 | 128 | ||
| 130 | int init_device() { | 129 | int init_device() { |
| 131 | if (IPHONE_E_SUCCESS == iphone_get_device ( &($self->dev))) | 130 | if (IPHONE_E_SUCCESS == iphone_get_device(&($self->dev))) |
| 132 | return 1; | 131 | return 1; |
| 133 | return 0; | 132 | return 0; |
| 134 | } | 133 | } |
| @@ -136,7 +135,7 @@ MobileSync* my_new_MobileSync(Lockdownd* lckd) { | |||
| 136 | %newobject get_uuid; | 135 | %newobject get_uuid; |
| 137 | char* get_uuid(){ | 136 | char* get_uuid(){ |
| 138 | char* uuid = NULL; | 137 | char* uuid = NULL; |
| 139 | uuid = (char *)iphone_get_uuid($self->dev); | 138 | iphone_device_get_uuid($self->dev, &uuid); |
| 140 | return uuid; | 139 | return uuid; |
| 141 | } | 140 | } |
| 142 | 141 | ||
| @@ -177,7 +176,7 @@ MobileSync* my_new_MobileSync(Lockdownd* lckd) { | |||
| 177 | } | 176 | } |
| 178 | 177 | ||
| 179 | ~MobileSync() { | 178 | ~MobileSync() { |
| 180 | mobilesync_free_client ( $self->client ); | 179 | mobilesync_client_free($self->client); |
| 181 | free($self); | 180 | free($self); |
| 182 | } | 181 | } |
| 183 | 182 | ||
