Add stub methods, TODOs and docstrings for application services.

This commit is contained in:
Kegan Dougal 2015-01-27 16:53:59 +00:00
parent 7331d34839
commit 92171f9dd1
2 changed files with 72 additions and 5 deletions

View file

@ -42,8 +42,27 @@ class ApplicationServicesHandler(BaseHandler):
"Consult the home server admin."
)
# update AS entry with base URL
# store namespaces for this AS
# store this AS
defer.returnValue("not_implemented_yet")
def unregister(self, token):
yield self.store.unregister_app_service(token)
def notify_interested_services(self, event):
"""Notifies (pushes) all application services interested in this event.
Pushing is done asynchronously, so this method won't block for any
prolonged length of time.
Args:
event(Event): The event to push out to interested services.
"""
# TODO: Gather interested services
# get_services_for_event(event) <-- room IDs and user IDs
# Get a list of room aliases. Check regex.
# TODO: If unknown user: poke User Query API.
# TODO: If unknown room alias: poke Room Alias Query API.
# TODO: Fork off pushes to these services - XXX First cut, best effort
pass