-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathevents.py
39 lines (30 loc) · 1.04 KB
/
events.py
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
28
29
30
31
32
33
34
35
36
37
38
from abc import ABC, abstractmethod
from typing import Any, Union
class SyncEvent:
def __init__(this, value: Any = None, *, processed: Union[int | None] = None, total: Union[int | None] = None):
this.value = value
this.processed = processed
this.total = total
class RobinHoodBackend(ABC):
'''This class manages the communication between the backend and frontend
It contains a series of events that are triggered when they occur
before/during/after comparing/synching two directories
'''
@abstractmethod
def before_comparing(this, event: SyncEvent) -> None:
...
@abstractmethod
def on_comparing(this, event: SyncEvent) -> None:
...
@abstractmethod
def after_comparing(this, event: SyncEvent) -> None:
...
@abstractmethod
def before_synching(this, event: SyncEvent) -> None:
...
@abstractmethod
def on_synching(this, event:SyncEvent) -> None:
...
@abstractmethod
def after_synching(this, event: SyncEvent) -> None:
...