3
# Copyright (C) 2008, J. Félix Ontañón <fontanon at emergya dot es>
5
# This file is part of Project Hamster.
7
# Project Hamster is free software: you can redistribute it and/or modify
8
# it under the terms of the GNU General Public License as published by
9
# the Free Software Foundation, either version 3 of the License, or
10
# (at your option) any later version.
12
# Project Hamster is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
17
# You should have received a copy of the GNU General Public License
18
# along with Project Hamster. If not, see <http://www.gnu.org/licenses/>.
23
HAMSTER_URI = "org.gnome.hamster"
24
HAMSTER_PATH = "/org/gnome/hamster"
26
class HamsterDbusController(dbus.service.Object):
27
activity = "Undefined"
30
def __init__(self, bus_name):
31
dbus.service.Object.__init__(self, bus_name, HAMSTER_PATH)
33
@dbus.service.method(HAMSTER_URI)
34
def get_activity(self):
37
@dbus.service.signal(HAMSTER_URI)
38
def update_activity(self, activity):
39
self.activity = activity
41
@dbus.service.method(HAMSTER_URI)
45
@dbus.service.signal(HAMSTER_URI)
46
def update_fact(self, fact):