Re: dbus API



Hi Sebastian,

thanks for the pointer.
I had to modify DBusWrapper.py a bit to make it run.

Peter



Sebastian Pölsterl wrote:
Am 25.03.2010 21:13, schrieb Dr. Peter G. Baum:
Hi,

Hi Peter,

according to the web page, the dvb daemon can be controlled via dbus.
Is there a documentation about the dbus api?
Examples would be also quite helpful.

Yes, that's correct, all the GUIs talk to the daemon via DBus.

The DBus interfaces are documented in src/dbus except the scanner which is in Sattelite/Terrestrial/Cable. If you want to use Python have a look at at client/gnomedvb/DBusWrapper.py and tests, too.

--- DBusWrapper.py.orig	2010-01-14 23:09:16.000000000 +0100
+++ DBusWrapper.py	2010-03-26 20:57:20.000000000 +0100
@@ -585,18 +585,18 @@
             print "TV CHANNELS"
             for channel_id in channellist.get_tv_channels():
                 print "SID", channel_id
-                print "Name", channellist.get_channel_name(channel_id)
-                print "Network", channellist.get_channel_network(channel_id)
-                print "URL", channellist.get_channel_url(channel_id)
+                print "Name", channellist.get_channel_name(channel_id)[0]
+                print "Network", channellist.get_channel_network(channel_id)[0]
+                print "URL", channellist.get_channel_url(channel_id)[0]
                 schedule = dev_group.get_schedule (channel_id)
                 event_now = schedule.now_playing()
-                print u"Now: %s" % schedule.get_name(event_now)
-                print u"\tDesc: %s" % schedule.get_short_description(event_now)
-                time = schedule.get_local_start_time(event_now)
+                print u"Now: %s" % schedule.get_name(event_now)[0]
+                print u"\tDesc: %s" % schedule.get_short_description(event_now)[0]
+                time = schedule.get_local_start_time(event_now)[0]
                 if len(time) == 6:
                     print u"\tStart: %04d-%02d-%02d %02d:%02d:%02d" % (time[0], time[1], time[2], time[3],
                         time[4], time[5])
-                print u"\tDuration: %s" % schedule.get_duration(event_now)
+                print u"\tDuration: %s" % schedule.get_duration(event_now)[0]
                 print
             
         recstore = DVBRecordingsStoreClient()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]