diff options
author | Nikias Bassen | 2009-05-18 22:29:39 +0200 |
---|---|---|
committer | Matt Colyer | 2009-05-18 18:47:20 -0700 |
commit | 8eaac0513bfb238edec22d46320669f5c9c76542 (patch) | |
tree | 2db842339bf525d67017525bcbd3f4d35181e5ca /dev/main.c | |
parent | dca1758c4f9602fc240c6a7c9ae45839e154d15f (diff) | |
download | libimobiledevice-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.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -42,7 +42,7 @@ void perform_notification(iphone_device_t phone, iphone_lckd_client_t control, c iphone_lckd_start_service(control, "com.apple.mobile.notification_proxy", &nport); if (nport) { printf("::::::::::::::: np was started ::::::::::::\n"); - iphone_np_new_client(phone, 3555, nport, &np); + iphone_np_new_client(phone, nport, &np); if (np) { printf("::::::::: PostNotification %s\n", notification); iphone_np_post_notification(np, notification); @@ -98,12 +98,12 @@ int main(int argc, char *argv[]) if (port) { iphone_afc_client_t afc = NULL; - iphone_afc_new_client(phone, 3432, port, &afc); + iphone_afc_new_client(phone, port, &afc); if (afc) { iphone_lckd_start_service(control, "com.apple.mobile.notification_proxy", &npp); if (npp) { printf("Notification Proxy started.\n"); - iphone_np_new_client(phone, 3756, npp, &gnp); + iphone_np_new_client(phone, npp, &gnp); } else { printf("ERROR: Notification proxy could not be started.\n"); } @@ -115,7 +115,7 @@ int main(int argc, char *argv[]) NULL }; iphone_np_observe_notifications(gnp, nspec); - //iphone_np_set_notify_callback(gnp, notifier); + iphone_np_set_notify_callback(gnp, notifier); } perform_notification(phone, control, NP_SYNC_WILL_START); @@ -209,15 +209,16 @@ int main(int argc, char *argv[]) if (gnp && lockfile) { char *noti; + /* noti = NULL; iphone_np_get_notification(gnp, ¬i); if (noti) { printf("------> received notification '%s'\n", noti); free(noti); - } + }*/ printf("XXX sleeping\n"); - for (i = 0; i < 5; i++) { + /*for (i = 0; i < 5; i++) { noti = NULL; printf("--- getting notification\n"); iphone_np_get_notification(gnp, ¬i); @@ -229,6 +230,8 @@ int main(int argc, char *argv[]) } sleep(1); } + */ + sleep(5); //perform_notification(phone, control, NP_SYNC_DID_FINISH); |