X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fconnection_manager.py;h=c4b5f219b96befa1fba85dea74b7ec23ba43fbeb;hb=68d1653679bdce47f008d9167a263dbb2259e91d;hp=50f15f70faab1f4e0d3a03831550012fd63492e3;hpb=7cf2d153dde249c72e3939799f67dffe9f8fc1df;p=theonering diff --git a/src/connection_manager.py b/src/connection_manager.py index 50f15f7..c4b5f21 100644 --- a/src/connection_manager.py +++ b/src/connection_manager.py @@ -1,9 +1,18 @@ +""" +Empathy Experience: + Can't call + When first started, reports all read conversations when some might have been read + When first started, reports all of an SMS conversation even though some has been reported previously + Still leaking one of two contact lists +""" + import logging import gobject import telepathy import constants +import gtk_toolbox import connection @@ -15,10 +24,12 @@ class TheOneRingConnectionManager(telepathy.server.ConnectionManager): def __init__(self, shutdown_func=None): telepathy.server.ConnectionManager.__init__(self, constants._telepathy_implementation_name_) + # self._protos is from super self._protos[constants._telepathy_protocol_name_] = connection.TheOneRingConnection self._on_shutdown = shutdown_func _moduleLogger.info("Connection manager created") + @gtk_toolbox.log_exception(_moduleLogger) def GetParameters(self, proto): """ For org.freedesktop.telepathy.ConnectionManager @@ -26,7 +37,7 @@ class TheOneRingConnectionManager(telepathy.server.ConnectionManager): @returns the mandatory and optional parameters for creating a connection """ if proto not in self._protos: - raise telepathy.NotImplemented('unknown protocol %s' % proto) + raise telepathy.errors.NotImplemented('unknown protocol %s' % proto) result = [] ConnectionClass = self._protos[proto] @@ -70,7 +81,7 @@ class TheOneRingConnectionManager(telepathy.server.ConnectionManager): Overrides telepathy.server.ConnectionManager """ result = telepathy.server.ConnectionManager.disconnected(self, conn) - gobject.timeout_add(5000, self.shutdown) + gobject.timeout_add(5000, self._shutdown) def quit(self): """ @@ -80,6 +91,7 @@ class TheOneRingConnectionManager(telepathy.server.ConnectionManager): connection.Disconnect() _moduleLogger.info("Connection manager quitting") + @gtk_toolbox.log_exception(_moduleLogger) def _shutdown(self): if ( self._on_shutdown is not None and