summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis-Francis Ratté-Boulianne <louis-francis.ratte-boulianne@collabora.co.uk>2010-10-22 14:25:51 -0400
committerLouis-Francis Ratté-Boulianne <louis-francis.ratte-boulianne@collabora.co.uk>2010-12-03 10:55:43 -0500
commitdb97bc612d96dc7a6466538fb4a4c8c314159a88 (patch)
tree7e53869708d03129d305655464e85c53816cbac6
parenta3e3c0b2e547b4404fbdcfd77f06514744ebf103 (diff)
Add property to get self handle even when not connected
-rw-r--r--src/server/conn.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/server/conn.py b/src/server/conn.py
index db2da89..e8a3b29 100644
--- a/src/server/conn.py
+++ b/src/server/conn.py
@@ -39,7 +39,7 @@ from telepathy.interfaces import (CONN_INTERFACE,
CONN_INTERFACE_RENAMING,
CONNECTION_INTERFACE_REQUESTS,
CHANNEL_INTERFACE)
-from telepathy.server.handle import Handle
+from telepathy.server.handle import Handle, NoneHandle
from telepathy.server.properties import DBusProperties
from telepathy._generated.Connection import Connection as _Connection
@@ -101,6 +101,7 @@ class Connection(_Connection, DBusProperties):
self._status = CONNECTION_STATUS_DISCONNECTED
+ self._self_handle = NoneHandle()
self._handles = weakref.WeakValueDictionary()
self._next_handle_id = 1
self._client_handles = {}
@@ -108,6 +109,10 @@ class Connection(_Connection, DBusProperties):
self._channels = set()
self._next_channel_id = 0
+ @property
+ def self_handle(self):
+ return self._self_handle
+
def check_parameters(self, parameters):
"""
Uses the values of self._mandatory_parameters and