GNOME Bugzilla – Bug 171913
Patch to provide dbus feed subscription to Straw
Last modified: 2005-05-09 13:47:01 UTC
I am currently writing a plugin for epiphany that allows to parse rss feeds in the page you are viewing and "subscribe" to the page's feed. I went on the dbus road, so epiphany do a remote call on dbus to subscribe the feed in the program that answer the call (of course the reader has to run for it to accept the method call). I added a file (DbusFeedReader.py to be placed in src/lib/), as i don't know the working of setup.py, you may want to render that thing optional, somehow...
Created attachment 39363 [details] [review] straw-dbus-subscription.patch Patch the cvs Straw to use dbus subscription, this imply the user has dbus python support, something should be done in the setup.py to check for dbus and enable/disable this patch accordingly
Created attachment 39364 [details] DBusFeedReader.py To be added to straw/src/lib/
For more info, see epiphany-extension bug http://bugzilla.gnome.org/show_bug.cgi?id=171908
raphael, Hi! Thanks for the patch. I'll (most likely) put in in the mainline once I tested it. Thanks again. Cheers,
I suppose you know that, but anyway : You can use the dbus-send program to test the patch..
Hi there, just to signal that the extension has been integrated in cvs, and is ready to be shipped with next major release of epiphany. It would be great to also have support on your part at that time :)
Hi, looking at the patch now. I just have one question: Should we assign the namespace to /org/gnome/rss/FeedReader or it's better to put it in /org/gnome/feed/Reader? Since there are basically two major type of feeds out there: rss and atom. The /org/gnome/feed namespace would also be helpful for feed related stuff. What do you think? I'm integrating this now. It won't be optional though since distros nowadays ships with dbus anyway. Cheers,
You're right about the rss part, i tried to rip it off the source code where i used to use the more generic feed reader, obviously i forgot that part :) I'm ok with org/gnome/feed namespace, so if you agree we can use #define RSS_DBUS_SERVICE "org.gnome.feed.Reader" #define RSS_DBUS_OBJECT_PATH "/org/gnome/feed/Reader" #define RSS_DBUS_INTERFACE "org.gnome.feed.Reader" #define RSS_DBUS_SUBSCRIBE "Subscribe" I hope this is the correct way to handle dbus namespaces When you tell me you're ok with this, i'll reflect the changes in the ephy plugin and post the changes to other feed readers out there.
Oh i forgot also to tell you that some distro like gentoo :) like to customize their versions, so it may be useful to include a --enable-dbus and make it default so one can disable i if needed.. just my thought..
--- I'm ok with org/gnome/feed namespace, so if you agree we can use #define RSS_DBUS_SERVICE "org.gnome.feed.Reader" #define RSS_DBUS_OBJECT_PATH "/org/gnome/feed/Reader" #define RSS_DBUS_INTERFACE "org.gnome.feed.Reader" #define RSS_DBUS_SUBSCRIBE "Subscribe" --- Looks ok. Regarding the service being optional, I modified the source to load it if the 'dbus' python module is available. If not, then the module doesn't get loaded. No need to fiddle with setup.py :-) Since you're ok with the namespace bit, feel free to close this bug in case there are no comments from the other aggregator authors. Thanks a lot for the patch. I really appreciate it. Cheers,
Ok, this can be closed, thank you for your cooperation :) And now let's wait for gnome 2.12 ;)