[PATCH] NotificationProxy updated
Reported by Nikias Bassen | April 13th, 2009 @ 11:30 PM | in 1.0 Release
Here's a patch that updates the functionality and several declarations of the NotificationProxy implementation. This includes a new iphone_np_get_notification functions which allows to check if a notifcation has been triggered by the device. The 'iphoneclient' test program (main.c) has been updated to show a use case; When "XXX sleeping" is displayed, it checks for 5 seconds if a notification appears. In this time window, do the "slide to cancel" to see the magic happen (well ok, it prints a message to the terminal).
This change allows applications to actually react on notifications that are sent by the device (like the "slide to cancel" thing).
Ah. And included is also an additional function for lockdown to get the name of the device (e.g. Steve's iPhone).
Comments and changes to this ticket
-
Martin S. April 14th, 2009 @ 04:11 AM
The implementation for lockdownd_get_device_name seems missing from the patch.
-
Martin S. April 14th, 2009 @ 12:53 PM
You have a typo "g_strfr eev(dirs);" should be "g_strfreev(dirs);". Also "iphone_mux_recv_timeout" which you are using seems not to be defined in libiphone master.
I changed it to "iphone_mux_recv" here and got it working, good job!
Would it be possible to implement some kind of notification callback instead of needing to poll for the notification_proxy stuff?
-
Nikias Bassen April 14th, 2009 @ 05:07 PM
Hi again. This is the new and tested patch. It fixes the errors reported, introduces the iphone_mux_recv_timeout function as well as iphone_np_set_notify_callback which is used in iphoneclient test program. It's running in a new thread that polls for notifications sent by the notification proxy on the device.
-
Paul Sladen April 15th, 2009 @ 10:43 AM
- Milestone set to 1.0 Release
-
Nikias Bassen April 19th, 2009 @ 01:19 PM
Hi, the previous patch causes some problems when running the iphoneclient tool due to the notification callback implementation. My usbmuxd aware implementation is working perfectly with it, but to avoid trouble until the usbmuxd stuff is integrated, apply the attached patch after applying 'notification_proxy_new_update_fixed.diff'. This will just disable the callback usage in iphoneclient and reactivates the standard active check for incoming notifications.
-
Nikias Bassen April 21st, 2009 @ 03:56 PM
Here's the first patch updated and created with git format-patch.
-
Matt Colyer May 9th, 2009 @ 06:12 PM
Should I merge this in now or wait for the usbmux stuff to land?
-
Matt Colyer May 10th, 2009 @ 03:35 PM
- State changed from new to resolved
(from [1351b686d450112ae55d26d81d9d59c5f542f12e]) NotificationProxy support added.
[#27 state:resolved]
Signed-off-by: Matt Colyer matt@colyer.name http://github.com/MattColyer/lib...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A project around supporting the iPhone in Linux.
See http://libimobiledevice.org