summaryrefslogtreecommitdiffstats
path: root/dev/main.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2009-05-18 22:29:39 +0200
committerGravatar Matt Colyer2009-05-18 18:47:20 -0700
commit8eaac0513bfb238edec22d46320669f5c9c76542 (patch)
tree2db842339bf525d67017525bcbd3f4d35181e5ca /dev/main.c
parentdca1758c4f9602fc240c6a7c9ae45839e154d15f (diff)
downloadlibimobiledevice-8eaac0513bfb238edec22d46320669f5c9c76542.tar.gz
libimobiledevice-8eaac0513bfb238edec22d46320669f5c9c76542.tar.bz2
Make use of usbmuxd and remove libusb dependencies
Signed-off-by: Matt Colyer <matt@colyer.name>
Diffstat (limited to 'dev/main.c')
-rw-r--r--dev/main.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/dev/main.c b/dev/main.c
index 510c75f..5c9a5a7 100644
--- a/dev/main.c
+++ b/dev/main.c
@@ -42,7 +42,7 @@ void perform_notification(iphone_device_t phone, iphone_lckd_client_t control, c
42 iphone_lckd_start_service(control, "com.apple.mobile.notification_proxy", &nport); 42 iphone_lckd_start_service(control, "com.apple.mobile.notification_proxy", &nport);
43 if (nport) { 43 if (nport) {
44 printf("::::::::::::::: np was started ::::::::::::\n"); 44 printf("::::::::::::::: np was started ::::::::::::\n");
45 iphone_np_new_client(phone, 3555, nport, &np); 45 iphone_np_new_client(phone, nport, &np);
46 if (np) { 46 if (np) {
47 printf("::::::::: PostNotification %s\n", notification); 47 printf("::::::::: PostNotification %s\n", notification);
48 iphone_np_post_notification(np, notification); 48 iphone_np_post_notification(np, notification);
@@ -98,12 +98,12 @@ int main(int argc, char *argv[])
98 98
99 if (port) { 99 if (port) {
100 iphone_afc_client_t afc = NULL; 100 iphone_afc_client_t afc = NULL;
101 iphone_afc_new_client(phone, 3432, port, &afc); 101 iphone_afc_new_client(phone, port, &afc);
102 if (afc) { 102 if (afc) {
103 iphone_lckd_start_service(control, "com.apple.mobile.notification_proxy", &npp); 103 iphone_lckd_start_service(control, "com.apple.mobile.notification_proxy", &npp);
104 if (npp) { 104 if (npp) {
105 printf("Notification Proxy started.\n"); 105 printf("Notification Proxy started.\n");
106 iphone_np_new_client(phone, 3756, npp, &gnp); 106 iphone_np_new_client(phone, npp, &gnp);
107 } else { 107 } else {
108 printf("ERROR: Notification proxy could not be started.\n"); 108 printf("ERROR: Notification proxy could not be started.\n");
109 } 109 }
@@ -115,7 +115,7 @@ int main(int argc, char *argv[])
115 NULL 115 NULL
116 }; 116 };
117 iphone_np_observe_notifications(gnp, nspec); 117 iphone_np_observe_notifications(gnp, nspec);
118 //iphone_np_set_notify_callback(gnp, notifier); 118 iphone_np_set_notify_callback(gnp, notifier);
119 } 119 }
120 120
121 perform_notification(phone, control, NP_SYNC_WILL_START); 121 perform_notification(phone, control, NP_SYNC_WILL_START);
@@ -209,15 +209,16 @@ int main(int argc, char *argv[])
209 if (gnp && lockfile) { 209 if (gnp && lockfile) {
210 char *noti; 210 char *noti;
211 211
212 /*
212 noti = NULL; 213 noti = NULL;
213 iphone_np_get_notification(gnp, &noti); 214 iphone_np_get_notification(gnp, &noti);
214 if (noti) { 215 if (noti) {
215 printf("------> received notification '%s'\n", noti); 216 printf("------> received notification '%s'\n", noti);
216 free(noti); 217 free(noti);
217 } 218 }*/
218 219
219 printf("XXX sleeping\n"); 220 printf("XXX sleeping\n");
220 for (i = 0; i < 5; i++) { 221 /*for (i = 0; i < 5; i++) {
221 noti = NULL; 222 noti = NULL;
222 printf("--- getting notification\n"); 223 printf("--- getting notification\n");
223 iphone_np_get_notification(gnp, &noti); 224 iphone_np_get_notification(gnp, &noti);
@@ -229,6 +230,8 @@ int main(int argc, char *argv[])
229 } 230 }
230 sleep(1); 231 sleep(1);
231 } 232 }
233 */
234 sleep(5);
232 235
233 //perform_notification(phone, control, NP_SYNC_DID_FINISH); 236 //perform_notification(phone, control, NP_SYNC_DID_FINISH);
234 237