from typing import Protocol, TypeVar

U_co = TypeVar('U_co', covariant=True)
R_co = TypeVar('R_co', covariant=True)

class ConfigHandle(Protocol):
    def setopt(self, option: int, value: object, /) -> None: ...
    def unsetopt(self, option: int, /) -> None: ...
    def pause(self, state: int, /) -> None: ...

class GetInfoHandle(Protocol):
    def getinfo(self, option: int, /) -> object: ...
    def getinfo_raw(self, option: int, /) -> object: ...

class RequestProtocol(Protocol[U_co, R_co]):
    def configure_handle(self, handle: ConfigHandle, /) -> None: ...
    def has_update(self, /) -> bool: ...
    def get_update(self, /) -> U_co: ...
    def completed(self, handle: GetInfoHandle, /) -> R_co: ...
