X-Git-Url: http://git.maemo.org/git/?p=theonering;a=blobdiff_plain;f=src%2Fpresence.py;h=c73a06140747c6ee053435fe16dcbaec127d72f4;hp=f078e27dd0beaf1d9056928bb437f6ec1fdedb95;hb=5bfb4228f1fff939aa06dfbe446cf17b5ce3ed76;hpb=d0c410418ea6a64e3b6b72ba132a14bcaebbf771 diff --git a/src/presence.py b/src/presence.py index f078e27..c73a061 100644 --- a/src/presence.py +++ b/src/presence.py @@ -1,22 +1,20 @@ import logging -import telepathy - -import gtk_toolbox +import tp +import util.misc as misc_utils import simple_presence -import gvoice.state_machine as state_machine _moduleLogger = logging.getLogger('presence') -class PresenceMixin(telepathy.server.ConnectionInterfacePresence, simple_presence.TheOneRingPresence): +class PresenceMixin(tp.ConnectionInterfacePresence, simple_presence.TheOneRingPresence): def __init__(self): - telepathy.server.ConnectionInterfacePresence.__init__(self) + tp.ConnectionInterfacePresence.__init__(self) simple_presence.TheOneRingPresence.__init__(self) - @gtk_toolbox.log_exception(_moduleLogger) + @misc_utils.log_exception(_moduleLogger) def GetStatuses(self): # the arguments are in common to all on-line presences arguments = {} @@ -26,16 +24,16 @@ class PresenceMixin(telepathy.server.ConnectionInterfacePresence, simple_presenc for (localType, telepathyType) in self.TO_PRESENCE_TYPE.iteritems() ) - @gtk_toolbox.log_exception(_moduleLogger) + @misc_utils.log_exception(_moduleLogger) def RequestPresence(self, contactIds): presences = self.__get_presences(contactIds) self.PresenceUpdate(presences) - @gtk_toolbox.log_exception(_moduleLogger) + @misc_utils.log_exception(_moduleLogger) def GetPresence(self, contactIds): return self.__get_presences(contactIds) - @gtk_toolbox.log_exception(_moduleLogger) + @misc_utils.log_exception(_moduleLogger) def SetStatus(self, statuses): assert len(statuses) == 1 status, arguments = statuses.items()[0]