- @gtk_toolbox.log_exception(_moduleLogger)
- def RequestHandles(self, handleType, names, sender):
- """
- For org.freedesktop.telepathy.Connection
- Overiding telepathy.server.Connecton to allow custom handles
- """
- self.check_connected()
- self.check_handle_type(handleType)
-
- handles = []
- for name in names:
- requestedHandleName = name.encode('utf-8')
- if handleType == telepathy.HANDLE_TYPE_CONTACT:
- _moduleLogger.info("RequestHandles Contact: %s" % requestedHandleName)
- requestedContactId, requestedContactNumber = handle.ContactHandle.from_handle_name(
- requestedHandleName
- )
- h = handle.create_handle(self, 'contact', requestedContactId, requestedContactNumber)
- elif handleType == telepathy.HANDLE_TYPE_LIST:
- # Support only server side (immutable) lists
- _moduleLogger.info("RequestHandles List: %s" % requestedHandleName)
- h = handle.create_handle(self, 'list', requestedHandleName)
- else:
- raise telepathy.errors.NotAvailable('Handle type unsupported %d' % handleType)
- handles.append(h.id)
- self.add_client_handle(h, sender)
- return handles
-
- def _generate_props(self, channelType, handle, suppressHandler, initiatorHandle=None):
- targetHandle = 0 if handle is None else handle.get_id()
- targetHandleType = telepathy.HANDLE_TYPE_NONE if handle is None else handle.get_type()
+ def generate_props(self, channelType, handleObj, suppressHandler, initiatorHandle=None):
+ targetHandle = 0 if handleObj is None else handleObj.get_id()
+ targetHandleType = telepathy.HANDLE_TYPE_NONE if handleObj is None else handleObj.get_type()