1 #!/usr/bin/env python2.5
4 # Copyright (c) 2007-2008 INdT.
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Lesser General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 # ============================================================================
21 # Author : Yves Marcoz
23 # Description : Simple RSS Reader
24 # ============================================================================
29 class ServerObject(dbus.service.Object):
30 def __init__(self, app):
31 # Here the service name
32 bus_name = dbus.service.BusName('org.maemo.feedingit',bus=dbus.SessionBus())
33 # Here the object path
34 dbus.service.Object.__init__(self, bus_name, '/org/maemo/feedingit')
37 # Here the interface name, and the method is named same as on dbus.
38 @dbus.service.method('org.maemo.feedingit')
39 def AddFeed(self, url):
43 @dbus.service.method('org.maemo.feedingit')
45 return self.app.getStatus()
47 @dbus.service.method('org.maemo.feedingit')
49 self.app.automaticUpdate()
52 @dbus.service.method('org.maemo.feedingit')
53 def OpenFeed(self, key):
54 self.app.buttonFeedClicked(None, self.app, None, key)
57 # A signal that will be exported to dbus
58 @dbus.service.signal('org.maemo.feedingit', signature='')
59 def ArticleCountUpdated(self):