Adding a way to query all of the polling periods
[theonering] / src / capabilities.py
index c4a94cb..11a7f0c 100644 (file)
@@ -2,16 +2,17 @@ import logging
 
 import telepathy
 
+import tp
 import gtk_toolbox
 
 
 _moduleLogger = logging.getLogger('capabilities')
 
 
-class CapabilitiesMixin(telepathy.server.ConnectionInterfaceCapabilities):
+class CapabilitiesMixin(tp.ConnectionInterfaceCapabilities):
 
        def __init__(self):
-               telepathy.server.ConnectionInterfaceCapabilities.__init__(self)
+               tp.ConnectionInterfaceCapabilities.__init__(self)
                self._implement_property_get(
                        telepathy.interfaces.CONN_INTERFACE_CAPABILITIES,
                        {"caps": self.GetCapabilities},
@@ -24,7 +25,7 @@ class CapabilitiesMixin(telepathy.server.ConnectionInterfaceCapabilities):
                """
                raise NotImplementedError("Abstract property called")
 
-       def handle(self, handleType, handleId):
+       def get_handle_by_id(self, handleType, handleId):
                """
                @abstract
                """
@@ -43,7 +44,7 @@ class CapabilitiesMixin(telepathy.server.ConnectionInterfaceCapabilities):
                """
                ret = []
                for handleId in handleIds:
-                       h = self.handle(telepathy.HANDLE_TYPE_CONTACT, handleId)
+                       h = self.get_handle_by_id(telepathy.HANDLE_TYPE_CONTACT, handleId)
                        if handleId != 0 and (telepathy.HANDLE_TYPE_CONTACT, handleId) not in self._handles:
                                raise telepathy.errors.InvalidHandle
                        elif h in self._caps: