aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/vk/tracking/db/meta.py
blob: eb15c74502cc6420f711d57edad6e2c68cba70c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Copyright (c) 2017 Egor Tensin <Egor.Tensin@gmail.com>
# This file is part of the "VK scripts" project.
# For details, see https://github.com/egor-tensin/vk-scripts.
# Distributed under the MIT License.

import abc
from collections.abc import Iterable


class Writer(metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def on_initial_status(self, user):
        pass

    @abc.abstractmethod
    def on_status_update(self, user):
        pass

    @abc.abstractmethod
    def on_connection_error(self, e):
        pass


class Reader(Iterable, metaclass=abc.ABCMeta):
    @abc.abstractmethod
    def __iter__(self):
        pass