Slowly transforming things into the shape needed to be ready to get things working
[theonering] / src / location.py
1 import telepathy
2
3
4 class LocationMixin(telepathy.server.ConnectionInterfaceLocation):
5
6         def __init__(self):
7                 telepathy.server.ConnectionInterfaceLocation.__init__(self)
8
9         @property
10         def session(self):
11                 """
12                 @abstract
13                 """
14                 raise NotImplementedError()
15
16         def GetLocations(self, contacts):
17                 """
18                 @returns {Contact: {Location Type: Location}}
19                 """
20                 raise NotImplementedError()
21
22         def RequestLocation(self, contact):
23                 """
24                 @returns {Location Type: Location}
25                 """
26                 raise NotImplementedError()
27
28         def SetLocation(self, location):
29                 """
30                 Since presence is based off of phone numbers, not allowing the client to change it
31                 """
32                 raise telepathy.errors.PermissionDenied()