""" Event emitter protocols - abstract interfaces for event-producing components. """ from collections.abc import Callable from typing import Any, Protocol class EventEmitter(Protocol): """Protocol for components that emit events.""" def subscribe(self, callback: Callable[[Any], None]) -> None: ... def unsubscribe(self, callback: Callable[[Any], None]) -> None: ... class Startable(Protocol): """Protocol for components that can be started.""" def start(self) -> Any: ... class Stoppable(Protocol): """Protocol for components that can be stopped.""" def stop(self) -> None: ...