from typing import Protocol from pigway_frame_flow.models import Device, GalleryImage class FrameDeviceDriver(Protocol): def invalidate(self) -> None: ... def device(self, refresh: bool = False) -> Device: ... def get_current_image(self) -> int | None: ... def health(self) -> bool: ... def display_by_name(self, name: str): ... def images(self) -> list[GalleryImage]: ... def upload(self, path, name: str) -> int: ... def display(self, image_id: int): ... def delete(self, image_id: int): ... def download(self, image_id: int) -> bytes: ... class DriverRegistry(Protocol): drivers: dict[str, FrameDeviceDriver] def get(self, id: str) -> FrameDeviceDriver: ...