self._delayedConnect = gobject_utils.Async(self._delayed_connect)
_moduleLogger.info("Connection to the account %s created" % account)
self._delayedConnect = gobject_utils.Async(self._delayed_connect)
_moduleLogger.info("Connection to the account %s created" % account)
def get_handle_by_name(self, handleType, handleName):
requestedHandleName = handleName.encode('utf-8')
if handleType == telepathy.HANDLE_TYPE_CONTACT:
def get_handle_by_name(self, handleType, handleName):
requestedHandleName = handleName.encode('utf-8')
if handleType == telepathy.HANDLE_TYPE_CONTACT:
h = handle.create_handle(self, 'contact', requestedHandleName)
elif handleType == telepathy.HANDLE_TYPE_LIST:
# Support only server side (immutable) lists
h = handle.create_handle(self, 'contact', requestedHandleName)
elif handleType == telepathy.HANDLE_TYPE_LIST:
# Support only server side (immutable) lists
h = handle.create_handle(self, 'list', requestedHandleName)
else:
raise telepathy.errors.NotAvailable('Handle type unsupported %d' % handleType)
h = handle.create_handle(self, 'list', requestedHandleName)
else:
raise telepathy.errors.NotAvailable('Handle type unsupported %d' % handleType)
@misc_utils.log_exception(_moduleLogger)
def RequestChannel(self, type, handleType, handleId, suppressHandler):
@misc_utils.log_exception(_moduleLogger)
def RequestChannel(self, type, handleType, handleId, suppressHandler):
def disconnect(self, reason):
_moduleLogger.info("Disconnecting")
self._delayedConnect.cancel()
def disconnect(self, reason):
_moduleLogger.info("Disconnecting")
self._delayedConnect.cancel()
# Not having the disconnect first can cause weird behavior with clients
# including not being able to reconnect or even crashing
# Not having the disconnect first can cause weird behavior with clients
# including not being able to reconnect or even crashing