|
| 1 | +# SPDX-License-Identifier: LGPL-2.1-or-later |
| 2 | + |
| 3 | +# Copyright (C) 2022 igo95862 |
| 4 | + |
| 5 | +# This file is part of python-sdbus |
| 6 | + |
| 7 | +# This library is free software; you can redistribute it and/or |
| 8 | +# modify it under the terms of the GNU Lesser General Public |
| 9 | +# License as published by the Free Software Foundation; either |
| 10 | +# version 2.1 of the License, or (at your option) any later version. |
| 11 | + |
| 12 | +# This library is distributed in the hope that it will be useful, |
| 13 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | +# Lesser General Public License for more details. |
| 16 | + |
| 17 | +# You should have received a copy of the GNU Lesser General Public |
| 18 | +# License along with this library; if not, write to the Free Software |
| 19 | +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | +from __future__ import annotations |
| 21 | + |
| 22 | +from typing import Any, Dict, List, Tuple |
| 23 | + |
| 24 | +from sdbus import ( |
| 25 | + DbusInterfaceCommon, |
| 26 | + dbus_method, |
| 27 | + dbus_property, |
| 28 | +) |
| 29 | + |
| 30 | + |
| 31 | +class AdapterInterface( |
| 32 | + DbusInterfaceCommon, |
| 33 | + interface_name='org.bluez.Adapter1', |
| 34 | +): |
| 35 | + @dbus_method() |
| 36 | + def start_discovery( |
| 37 | + self, |
| 38 | + ) -> None: |
| 39 | + raise NotImplementedError |
| 40 | + |
| 41 | + @dbus_method() |
| 42 | + def stop_discovery( |
| 43 | + self, |
| 44 | + ) -> None: |
| 45 | + raise NotImplementedError |
| 46 | + |
| 47 | + @dbus_method( |
| 48 | + input_signature='o', |
| 49 | + ) |
| 50 | + def remove_device( |
| 51 | + self, |
| 52 | + device_path: str, |
| 53 | + ) -> None: |
| 54 | + raise NotImplementedError |
| 55 | + |
| 56 | + @dbus_method( |
| 57 | + input_signature='a{sv}', |
| 58 | + ) |
| 59 | + def set_discovery_filter( |
| 60 | + self, |
| 61 | + properties: Dict[str, Tuple[str, Any]], |
| 62 | + ) -> None: |
| 63 | + raise NotImplementedError |
| 64 | + |
| 65 | + @dbus_method( |
| 66 | + result_signature='as', |
| 67 | + ) |
| 68 | + def get_discovery_filters( |
| 69 | + self, |
| 70 | + ) -> List[str]: |
| 71 | + raise NotImplementedError |
| 72 | + |
| 73 | + @dbus_property( |
| 74 | + property_signature='s', |
| 75 | + ) |
| 76 | + def address(self) -> str: |
| 77 | + raise NotImplementedError |
| 78 | + |
| 79 | + @dbus_property( |
| 80 | + property_signature='s', |
| 81 | + ) |
| 82 | + def address_type(self) -> str: |
| 83 | + raise NotImplementedError |
| 84 | + |
| 85 | + @dbus_property( |
| 86 | + property_signature='s', |
| 87 | + ) |
| 88 | + def name(self) -> str: |
| 89 | + raise NotImplementedError |
| 90 | + |
| 91 | + @dbus_property( |
| 92 | + property_signature='s', |
| 93 | + ) |
| 94 | + def alias(self) -> str: |
| 95 | + raise NotImplementedError |
| 96 | + |
| 97 | + @dbus_property(property_signature='u', property_name='Class') |
| 98 | + def device_class(self) -> int: |
| 99 | + raise NotImplementedError |
| 100 | + |
| 101 | + @dbus_property( |
| 102 | + property_signature='b', |
| 103 | + ) |
| 104 | + def powered(self) -> bool: |
| 105 | + raise NotImplementedError |
| 106 | + |
| 107 | + @dbus_property( |
| 108 | + property_signature='b', |
| 109 | + ) |
| 110 | + def discoverable(self) -> bool: |
| 111 | + raise NotImplementedError |
| 112 | + |
| 113 | + @dbus_property( |
| 114 | + property_signature='b', |
| 115 | + ) |
| 116 | + def pairable(self) -> bool: |
| 117 | + raise NotImplementedError |
| 118 | + |
| 119 | + @dbus_property( |
| 120 | + property_signature='u', |
| 121 | + ) |
| 122 | + def pairable_timeout(self) -> int: |
| 123 | + raise NotImplementedError |
| 124 | + |
| 125 | + @dbus_property( |
| 126 | + property_signature='u', |
| 127 | + ) |
| 128 | + def discoverable_timeout(self) -> int: |
| 129 | + raise NotImplementedError |
| 130 | + |
| 131 | + @dbus_property( |
| 132 | + property_signature='b', |
| 133 | + ) |
| 134 | + def discovering(self) -> bool: |
| 135 | + raise NotImplementedError |
| 136 | + |
| 137 | + @dbus_property( |
| 138 | + property_signature='as', |
| 139 | + property_name='UUIDs', |
| 140 | + ) |
| 141 | + def uuids(self) -> List[str]: |
| 142 | + raise NotImplementedError |
| 143 | + |
| 144 | + @dbus_property( |
| 145 | + property_signature='s', |
| 146 | + ) |
| 147 | + def modalias(self) -> str: |
| 148 | + raise NotImplementedError |
| 149 | + |
| 150 | + @dbus_property(property_signature='as') |
| 151 | + def roles(self) -> List[str]: |
| 152 | + raise NotImplementedError |
| 153 | + |
| 154 | + @dbus_property(property_signature='as') |
| 155 | + def experimental_features(self) -> List[str]: |
| 156 | + raise NotImplementedError |
0 commit comments