summaryrefslogtreecommitdiff
path: root/sunshine/channel
diff options
context:
space:
mode:
authorKrzysztof Klinikowski <kkszysiu@gmail.com>2010-04-11 22:40:55 +0200
committerKrzysztof Klinikowski <kkszysiu@gmail.com>2010-04-11 22:40:55 +0200
commite106dccb475ee09da94d8ffe3ae1ad122f6ee994 (patch)
tree8fb9bd0e0fb47cb86d477511b5f199c81aaaf839 /sunshine/channel
parent9b47417aa8dd8eb209a3a2a8ffef2e8ace96e0df (diff)
Many fixes and modifications. Capabilities implemented, better channel naming. Im not sure is that stable, need more testing.
Diffstat (limited to 'sunshine/channel')
-rw-r--r--sunshine/channel/contact_list.py7
-rw-r--r--sunshine/channel/group.py4
-rw-r--r--sunshine/channel/text.py4
3 files changed, 9 insertions, 6 deletions
diff --git a/sunshine/channel/contact_list.py b/sunshine/channel/contact_list.py
index 63bcaa4..e942a03 100644
--- a/sunshine/channel/contact_list.py
+++ b/sunshine/channel/contact_list.py
@@ -124,9 +124,9 @@ class SunshineListChannel(
telepathy.server.ChannelInterfaceGroup):
"Abstract Contact List channels"
- def __init__(self, connection, manager, props):
+ def __init__(self, connection, manager, props, object_path=None):
self._conn_ref = weakref.ref(connection)
- telepathy.server.ChannelTypeContactList.__init__(self, connection, manager, props)
+ telepathy.server.ChannelTypeContactList.__init__(self, connection, manager, props, object_path=None)
telepathy.server.ChannelInterfaceGroup.__init__(self)
self._populate(connection)
@@ -184,6 +184,9 @@ class SunshineListChannel(
if ad: added.add(handle)
if lp: local_pending.add(handle)
if rp: remote_pending.add(handle)
+ #self._conn_ref()._populate_capabilities()
+ #capabilities for self handle
+ self._conn_ref().contactAdded(self._conn_ref().GetSelfHandle())
self.MembersChanged('', added, (), local_pending, remote_pending, 0,
telepathy.CHANNEL_GROUP_CHANGE_REASON_NONE)
diff --git a/sunshine/channel/group.py b/sunshine/channel/group.py
index 6094092..375d07a 100644
--- a/sunshine/channel/group.py
+++ b/sunshine/channel/group.py
@@ -37,12 +37,12 @@ logger = logging.getLogger('Sunshine.GroupChannel')
class SunshineGroupChannel(SunshineListChannel):
- def __init__(self, connection, manager, props):
+ def __init__(self, connection, manager, props, object_path=None):
self.__pending_add = []
self.__pending_remove = []
self.conn = connection
self.groups = {}
- SunshineListChannel.__init__(self, connection, manager, props)
+ SunshineListChannel.__init__(self, connection, manager, props, object_path=object_path)
self.GroupFlagsChanged(telepathy.CHANNEL_GROUP_FLAG_CAN_ADD |
telepathy.CHANNEL_GROUP_FLAG_CAN_REMOVE, 0)
@async
diff --git a/sunshine/channel/text.py b/sunshine/channel/text.py
index 34c2269..9d01f74 100644
--- a/sunshine/channel/text.py
+++ b/sunshine/channel/text.py
@@ -34,14 +34,14 @@ logger = logging.getLogger('Sunshine.TextChannel')
class SunshineTextChannel(telepathy.server.ChannelTypeText):
- def __init__(self, conn, manager, conversation, props):
+ def __init__(self, conn, manager, conversation, props, object_path=None):
_, surpress_handler, handle = manager._get_type_requested_handle(props)
self._recv_id = 0
self._conn_ref = weakref.ref(conn)
self.conn = conn
self.handle = handle
- telepathy.server.ChannelTypeText.__init__(self, conn, manager, props)
+ telepathy.server.ChannelTypeText.__init__(self, conn, manager, props, object_path=None)
def Send(self, message_type, text):
if message_type == telepathy.CHANNEL_TEXT_MESSAGE_TYPE_NORMAL: