Auditing what interfaces we plan to support
authorEd Page <eopage@byu.net>
Sun, 27 Sep 2009 02:11:17 +0000 (21:11 -0500)
committerEd Page <eopage@byu.net>
Sun, 27 Sep 2009 02:11:17 +0000 (21:11 -0500)
src/channel/group.py [deleted file]
src/channel/text.py

diff --git a/src/channel/group.py b/src/channel/group.py
deleted file mode 100644 (file)
index f67f78c..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-import logging
-
-import telepathy
-
-import contact_list
-
-
-class TheOneRingGroupChannel(contact_list.TheOneRingListChannel):
-
-       def __init__(self, connection, h):
-               self.__pending_add = []
-               self.__pending_remove = []
-               contact_list.TheOneRingListChannel.__init__(self, connection, h)
-               self.GroupFlagsChanged(
-                       telepathy.CHANNEL_GROUP_FLAG_CAN_ADD | telepathy.CHANNEL_GROUP_FLAG_CAN_REMOVE,
-                       0,
-               )
-
-       def AddMembers(self, contacts, message):
-               addressBook = self._conn.gvoice_client
-               if self._handle.group is None:
-                       for contactHandleId in contacts:
-                               contactHandle = self._conn.handle(telepathy.HANDLE_TYPE_CONTACT, contactHandleId)
-                               logging.info("Adding contact %r to pending group %r" % (contactHandle, self._handle))
-                               if contactHandleId in self.__pending_remove:
-                                       self.__pending_remove.remove(contactHandleId)
-                               else:
-                                       self.__pending_add.append(contactHandleId)
-                       return
-               else:
-                       for contactHandleId in contacts:
-                               contactHandle = self._conn.handle(telepathy.HANDLE_TYPE_CONTACT, contactHandleId)
-                               logging.info("Adding contact %r to group %r" % (contactHandle, self._handle))
-                               contact = contactHandle.contact
-                               group = self._handle.group
-                               if contact is not None:
-                                       addressBook.add_contact_to_group(group, contact)
-                               else:
-                                       contactHandle.pending_groups.add(group)
-
-       def RemoveMembers(self, contacts, message):
-               addressBook = self._conn.gvoice_client
-               if self._handle.group is None:
-                       for contactHandleId in contacts:
-                               contactHandle = self._conn.handle(telepathy.HANDLE_TYPE_CONTACT, contactHandleId)
-                               logging.info("Adding contact %r to pending group %r" % (contactHandle, self._handle))
-                               if contactHandleId in self.__pending_add:
-                                       self.__pending_add.remove(contactHandleId)
-                               else:
-                                       self.__pending_remove.append(contactHandleId)
-                       return
-               else:
-                       for contactHandleId in contacts:
-                               contactHandle = self._conn.handle(telepathy.HANDLE_TYPE_CONTACT, contactHandleId)
-                               logging.info("Removing contact %r from pending group %r" % (contactHandle, self._handle))
-                               contact = contactHandle.contact
-                               group = self._handle.group
-                               if contact is not None:
-                                       addressBook.delete_contact_from_group(group, contact)
-                               else:
-                                       contactHandle.pending_groups.discard(group)
-
-       def Close(self):
-               logging.debug("Deleting group %s" % self._handle.name)
-               addressBook = self._conn.gvoice_client
-               group = self._handle.group
-               addressBook.delete_group(group)
index 36f506f..16b6f40 100644 (file)
@@ -3,13 +3,9 @@ import weakref
 
 import telepathy
 
-import handle
-
 
 class TheOneRingChannelText(
                telepathy.server.ChannelTypeText,
-               telepathy.server.ChannelInterfaceGroup,
-               telepathy.server.ChannelInterfaceChatState
        ):
 
        def __init__(self, connection, conversation):
@@ -24,12 +20,6 @@ class TheOneRingChannelText(
                self.GroupFlagsChanged(telepathy.CHANNEL_GROUP_FLAG_CAN_ADD, 0)
                self.__add_initial_participants()
 
-       def SetChatState(self, state):
-               if state == telepathy.CHANNEL_CHAT_STATE_COMPOSING:
-                       self._conversation.send_typing_notification()
-               h = handle.create_handle(self._conn_ref(), 'connection')
-               self.ChatStateChanged(h, state)
-
        def Send(self, messageType, text):
                if messageType == telepathy.CHANNEL_TEXT_MESSAGE_TYPE_NORMAL:
                        self._conversation.send_text_message(text)