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 # ============================================================================
30 @mainthread.mainthread
33 bus_name = dbus.service.BusName('org.marcoz.feedingit.lock_%s' %key,bus=dbus.SessionBus(), do_not_queue=True)
38 def release_lock(lock):
39 assert lock is not None
40 mainthread.execute(lock.__del__, async=True)
42 class UpdateServerObject(dbus.service.Object):
43 def __init__(self, app):
44 # Here the service name
45 bus_name = dbus.service.BusName('org.marcoz.feedingit',bus=dbus.SessionBus())
46 # Here the object path
47 dbus.service.Object.__init__(self, bus_name, '/org/marcoz/feedingit/update')
50 @dbus.service.method('org.marcoz.feedingit')
52 self.app.automaticUpdate()
55 @dbus.service.method('org.marcoz.feedingit')
60 # A signal that will be exported to dbus
61 @dbus.service.signal('org.marcoz.feedingit', signature='')
62 def ArticleCountUpdated(self):
65 # A signal that will be exported to dbus
66 @dbus.service.signal('org.marcoz.feedingit', signature='')
67 def UpdateStarted(self):
70 # A signal that will be exported to dbus
71 @dbus.service.signal('org.marcoz.feedingit', signature='')
72 def UpdateFinished(self):