# Copyright 2026 Helmut Grohne <helmut@subdivi.de>
# SPDX-License-Identifier: LGPL-2.0-or-later


import collections.abc
import typing


class _Signal: ...


def signal(
    name: str,
    in_signature: str,
) -> collections.abc.Callable[
    [collections.abc.Callable[..., None]], _Signal
]: ...


class _Object:
    async def get_async_interface(self, interface: str) -> typing.Any: ...


class BusPeer:
    def __getitem__(self, path: str) -> _Object: ...


class Connection:
    def listen_signal(
        self,
        path: str,
        fallback: bool,
        interface: str,
        name: str,
        func: _Signal,
    ) -> None: ...

    def unlisten_signal(
        self,
        path: str,
        something: bool,
        interface: str,
        name: str,
        func: _Signal,
    ) -> None: ...

    def __getitem__(self, bus_name: str) -> BusPeer: ...


def session_bus_async() -> collections.abc.Awaitable[Connection]: ...
