diff options
author | Martin Szulecki | 2009-05-24 00:25:03 +0200 |
---|---|---|
committer | Martin Szulecki | 2009-05-24 00:25:03 +0200 |
commit | 36ea32e0064f33d6a285684c3069f4d75bbac7a8 (patch) | |
tree | 039291b47e954fe8529f52e1fc71f7e924761a6a /dev/main.c | |
parent | 46f8d46845355e6a33a6dcb97ba11d4c4cab62eb (diff) | |
parent | 435f5feb4b5c501db52743a170908687d3ba6f60 (diff) | |
download | libimobiledevice-36ea32e0064f33d6a285684c3069f4d75bbac7a8.tar.gz libimobiledevice-36ea32e0064f33d6a285684c3069f4d75bbac7a8.tar.bz2 |
Merge branch 'master' of git://github.com/MattColyer/libiphone into martin
Conflicts:
src/Makefile.am
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); |