https://bugs.gpodder.org/show_bug.cgi?id=699

           Summary: Patch(es) for dbus interface facilitating Gnome-Do
                    plugin
           Product: gPodder
           Version: 2.0
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: low
         Component: Application
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=377)
 --> (https://bugs.gpodder.org/attachment.cgi?id=377)
A basic d-bus interface enabling the use by a new Gnome-Do plugin for Gpodder.

The attached patches implement a basic d-bus interface enabling the use by a
new Gnome-Do plugin for Gpodder. The changes are implemented on the trunk of
the Git repository. Preliminary source for the plugin can be retrieved from
https://code.launchpad.net/~iwanvanderkleijn/do-plugins/gpodder. Code retrieved
from this repository needs to be compiled. I will activate an PPA on Launchpad
in order to offer a preliminary binary. The plugin will be proposed for merging
with the main trunk of Gnome-Do in the following days. 

The interface is implemented separated from the current "org.gpodder.interface"
aka "/gui" d-bus interface / object_path. The new interface / object_path can
be referred to as "org.gpodder.podcasts" & "/podcasts. For interface details
see down. In this way the methods interacting directly with the GUI and methods
manipulating podcasts/episodes can be logically separated (while maintaining
compatibility with any eventual application using the current d-bus interface).


DBusPodcastsProxy deliberately does not use the api module as interaction with
gpodder through Gnome-Do invariably will involve a certain degree of
interaction with the GUI. Further more, there are issues with either the python
dbus implementation and the NBus Mono implementation which leads to issues with
None types in strings etc. The DBusPodcastsProxy is "safe" to work with NBus.


ISSUE: the current plugin is usable and supports retrieval of podcasts &
episodes with display of podcast-cover and episode state (new, downloaded,
deleted etc) through the Gnome-Do interface. The podcasts can be updated,
downloaded, played and deleted. However, changes in the episode state are not
immediately reflected. For this an event/notification mechanism needs to be
incorporated. 

----------------------
class DBusPodcastsProxy(dbus.service.Object):    
    @dbus.service.method(dbus_interface=dbus_podcasts, in_signature='',
out_signature='a(ssss)')
    def get_podcasts(self):
        """ Get all podcasts registered in Gpodder """
    pass

    @dbus.service.method(dbus_interface=dbus_podcasts, in_signature='s',
out_signature='a(sssssbbb)')
    def get_episodes(self, url):
        """ Return all episodes of one podcast

            url - url of podcast feed (rss, atom, etc)        
        """
    pass    

    @dbus.service.method(dbus_interface=dbus_podcasts, in_signature='as',
out_signature='(bs)')
    def play_or_download_episode(self, urls):
        """ Play or, if not available locally, download podcast episode

            urls -  List of episode Url's. If playable, only the first entry is
played. If not downloaded,
                    the episode is added to the download queue 
        """
        pass

    @dbus.service.method(dbus_interface=dbus_podcasts, in_signature='as',
out_signature='(bs)')
    def delete_episode(self, urls):
        """ Delete downloaded podcast episode

            urls -  List of episode Url's.  
        """
    pass

    @dbus.service.method(dbus_interface=dbus_podcasts, in_signature='',
out_signature='')
    def check_for_updates(self):
        pass

-- 
Configure bugmail: https://bugs.gpodder.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
_______________________________________________
gPodder-Bugs mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/gpodder-bugs

Reply via email to