Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

There was a problem

You must be a member of this account.

[PATCH] NotificationProxy updated

#27

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).

Reported by Nikias Bassen · April 13th, 2009 @ 11:30 PM

State: resolved
Milestone: 1.0 Release
Assigned to: Matt Colyer Matt Colyer

Activity

  1. Martin S.
    Martin S.

    The implementation for lockdownd_get_device_name seems missing from the patch.

    April 14th, 2009 @ 04:11 AM

  2. Nikias Bassen
    Nikias Bassen

    Yes, right. Here is the complete patch.

    April 14th, 2009 @ 10:01 AM

  3. Nikias Bassen
    Nikias Bassen

    Well, here is the complete patch.

    April 14th, 2009 @ 10:06 AM

  4. Martin S.
    Martin S.

    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?

    April 14th, 2009 @ 12:53 PM

  5. Nikias Bassen
    Nikias Bassen

    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.

    April 14th, 2009 @ 05:07 PM

  6. Paul Sladen
    Paul Sladen
    • Milestone set to 1.0 Release

    April 15th, 2009 @ 10:43 AM

  7. Nikias Bassen
    Nikias Bassen

    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.

    April 19th, 2009 @ 01:19 PM

  8. Nikias Bassen
    Nikias Bassen

    Here's the first patch updated and created with git format-patch.

    April 21st, 2009 @ 03:56 PM

  9. Nikias Bassen
  10. Matt Colyer
    Matt Colyer

    Should I merge this in now or wait for the usbmux stuff to land?

    May 9th, 2009 @ 06:12 PM

  11. Matt Colyer
    Matt Colyer
    • State changed from new to resolved

    (from [1351b686d450112ae55d26d81d9d59c5f542f12e]) NotificationProxy support added.

    [#27 [PATCH] NotificationProxy updated state:resolved]

    Signed-off-by: Matt Colyer matt@colyer.name http://github.com/MattColyer/lib...

    May 10th, 2009 @ 03:35 PM

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.