summaryrefslogtreecommitdiffstats
path: root/swig/iphone.i
diff options
context:
space:
mode:
Diffstat (limited to 'swig/iphone.i')
-rw-r--r--swig/iphone.i15
1 files changed, 3 insertions, 12 deletions
diff --git a/swig/iphone.i b/swig/iphone.i
index a0ee509..f1969ed 100644
--- a/swig/iphone.i
+++ b/swig/iphone.i
@@ -8,7 +8,7 @@
8 #include <libiphone/mobilesync.h> 8 #include <libiphone/mobilesync.h>
9 #include <plist/plist.h> 9 #include <plist/plist.h>
10 #include <plist/plist++.h> 10 #include <plist/plist++.h>
11 #include "../src/utils.h" 11 #include "../src/debug.h"
12 typedef struct { 12 typedef struct {
13 iphone_device_t dev; 13 iphone_device_t dev;
14 } iPhone; 14 } iPhone;
@@ -36,11 +36,6 @@ PList::Node* new_node_from_plist(plist_t node);
36%include "cstring.i" 36%include "cstring.i"
37%include "plist/swig/plist.i" 37%include "plist/swig/plist.i"
38 38
39#define DBGMASK_ALL 0xFFFF
40#define DBGMASK_NONE 0x0000
41#define DBGMASK_LOCKDOWND (1 << 1)
42#define DBGMASK_MOBILESYNC (1 << 2)
43
44typedef struct { 39typedef struct {
45 iphone_device_t dev; 40 iphone_device_t dev;
46} iPhone; 41} iPhone;
@@ -71,7 +66,7 @@ Lockdownd* my_new_Lockdownd(iPhone* phone) {
71 Lockdownd* client = (Lockdownd*) malloc(sizeof(Lockdownd)); 66 Lockdownd* client = (Lockdownd*) malloc(sizeof(Lockdownd));
72 client->dev = phone; 67 client->dev = phone;
73 client->client = NULL; 68 client->client = NULL;
74 if (LOCKDOWN_E_SUCCESS == lockdownd_client_new(phone->dev , &(client->client))) { 69 if (LOCKDOWN_E_SUCCESS == lockdownd_client_new_with_handshake(phone->dev , &(client->client), NULL)) {
75 return client; 70 return client;
76 } 71 }
77 else { 72 else {
@@ -90,7 +85,7 @@ void my_delete_Lockdownd(Lockdownd* lckd) {
90MobileSync* my_new_MobileSync(Lockdownd* lckd) { 85MobileSync* my_new_MobileSync(Lockdownd* lckd) {
91 if (!lckd || !lckd->dev) return NULL; 86 if (!lckd || !lckd->dev) return NULL;
92 MobileSync* client = NULL; 87 MobileSync* client = NULL;
93 int port = 0; 88 uint16_t port = 0;
94 if (LOCKDOWN_E_SUCCESS == lockdownd_start_service(lckd->client, "com.apple.mobilesync", &port)) { 89 if (LOCKDOWN_E_SUCCESS == lockdownd_start_service(lckd->client, "com.apple.mobilesync", &port)) {
95 client = (MobileSync*) malloc(sizeof(MobileSync)); 90 client = (MobileSync*) malloc(sizeof(MobileSync));
96 client->dev = lckd->dev; 91 client->dev = lckd->dev;
@@ -149,10 +144,6 @@ PList::Node* new_node_from_plist(plist_t node)
149 my_delete_iPhone($self); 144 my_delete_iPhone($self);
150 } 145 }
151 146
152 void set_debug_mask(uint16_t mask) {
153 iphone_set_debug_mask(mask);
154 }
155
156 void set_debug_level(int level) { 147 void set_debug_level(int level) {
157 iphone_set_debug_level(level); 148 iphone_set_debug_level(level);
158 } 149 }