summary refs log tree commit diff
path: root/synapse/streams/events.py
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2015-09-28 14:22:44 +0100
committerMark Haines <mjark@negativecurvature.net>2015-09-28 14:22:44 +0100
commit301141515a75f6925ff458a7de1d84bf7b3960e8 (patch)
treed5aeeadd630bdd8559f320be7c90742f75def41b /synapse/streams/events.py
parentMerge pull request #290 from matrix-org/daniel/synctl (diff)
parentFix scripts-dev/definitions.py argparse options (diff)
downloadsynapse-301141515a75f6925ff458a7de1d84bf7b3960e8.tar.xz
Merge pull request #288 from matrix-org/markjh/unused_definitions
Remove some of the unused definitions from synapse
Diffstat (limited to 'synapse/streams/events.py')
-rw-r--r--synapse/streams/events.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/synapse/streams/events.py b/synapse/streams/events.py
index aaa3609aa5..699083ae12 100644
--- a/synapse/streams/events.py
+++ b/synapse/streams/events.py
@@ -23,22 +23,6 @@ from synapse.handlers.typing import TypingNotificationEventSource
 from synapse.handlers.receipts import ReceiptEventSource
 
 
-class NullSource(object):
-    """This event source never yields any events and its token remains at
-    zero. It may be useful for unit-testing."""
-    def __init__(self, hs):
-        pass
-
-    def get_new_events_for_user(self, user, from_key, limit):
-        return defer.succeed(([], from_key))
-
-    def get_current_key(self, direction='f'):
-        return defer.succeed(0)
-
-    def get_pagination_rows(self, user, pagination_config, key):
-        return defer.succeed(([], pagination_config.from_key))
-
-
 class EventSources(object):
     SOURCE_TYPES = {
         "room": RoomEventSource,
@@ -70,15 +54,3 @@ class EventSources(object):
             ),
         )
         defer.returnValue(token)
-
-
-class StreamSource(object):
-    def get_new_events_for_user(self, user, from_key, limit):
-        """from_key is the key within this event source."""
-        raise NotImplementedError("get_new_events_for_user")
-
-    def get_current_key(self):
-        raise NotImplementedError("get_current_key")
-
-    def get_pagination_rows(self, user, pagination_config, key):
-        raise NotImplementedError("get_rows")