add GetName method

This commit is contained in:
Guillaume Desmottes 2007-03-07 20:09:40 +01:00
parent cb2489bff6
commit abf60c1c89

View File

@ -27,6 +27,7 @@ class Activity(dbus.service.Object):
self._buddies = [] self._buddies = []
self._color = None self._color = None
self._valid = False self._valid = False
self._name = None
self._activity_id = activity_id self._activity_id = activity_id
self._object_id = object_id self._object_id = object_id
@ -85,6 +86,11 @@ class Activity(dbus.service.Object):
def GetChannels(self): def GetChannels(self):
return self.get_channels() return self.get_channels()
@dbus.service.method(_ACTIVITY_INTERFACE,
in_signature="", out_signature="s")
def GetName(self):
return self.get_name()
# methods # methods
def object_path(self): def object_path(self):
return dbus.ObjectPath(self._object_path) return dbus.ObjectPath(self._object_path)
@ -102,6 +108,9 @@ class Activity(dbus.service.Object):
def get_joined_buddies(self): def get_joined_buddies(self):
return self._buddies return self._buddies
def get_name(self):
return self._name
def buddy_joined(self, buddy): def buddy_joined(self, buddy):
if buddy not in self._buddies: if buddy not in self._buddies:
self._buddies.append(buddy) self._buddies.append(buddy)