Cleaning up the unimplemented location support
[theonering] / src / location.py
index 1965255..4151b9c 100644 (file)
@@ -1,30 +1,42 @@
+import logging
+
 import telepathy
 
+import gtk_toolbox
+
+
+_moduleLogger = logging.getLogger('location')
+
 
-class LocationMixin(telepathy.server.ConnectionInterfaceLocation):
+#class LocationMixin(telepathy.server.ConnectionInterfaceLocation):
+class LocationMixin(object):
 
        def __init__(self):
-               telepathy.server.ConnectionInterfaceLocation.__init__(self)
+               #telepathy.server.ConnectionInterfaceLocation.__init__(self)
+               pass
 
        @property
-       def gvoice_backend(self):
+       def session(self):
                """
                @abstract
                """
-               raise NotImplementedError()
+               raise NotImplementedError("Abstract property called")
 
+       @gtk_toolbox.log_exception(_moduleLogger)
        def GetLocations(self, contacts):
                """
                @returns {Contact: {Location Type: Location}}
                """
-               raise NotImplementedError()
+               raise telepathy.NotImplemented("Yet")
 
+       @gtk_toolbox.log_exception(_moduleLogger)
        def RequestLocation(self, contact):
                """
                @returns {Location Type: Location}
                """
-               raise NotImplementedError()
+               raise telepathy.NotImplemented("Yet")
 
+       @gtk_toolbox.log_exception(_moduleLogger)
        def SetLocation(self, location):
                """
                Since presence is based off of phone numbers, not allowing the client to change it