from typing import Protocol

from bussdcc.context import ContextProtocol
from bussdcc.event.event import Event


class ProcessProtocol(Protocol):
    name: str

    def attach(self, ctx: ContextProtocol) -> None: ...
    def detach(self) -> None: ...
    def on_start(self, ctx: ContextProtocol) -> None: ...
    def on_stop(self, ctx: ContextProtocol) -> None: ...
    def on_event(self, ctx: ContextProtocol, evt: Event) -> None: ...
