# Path: bluezero/adapter.py
# class AdapterError(Exception):
# class Adapter:
# def list_adapters():
#     def available():
#     def __new__(cls, adapter_addr=None, *args, **kwargs):
#     def __init__(self, adapter_addr=None):
#     def address(self):
#     def name(self):
#     def bt_class(self):
#     def alias(self):
#     def alias(self, new_alias):
#     def get_all(self):
#     def powered(self):
#     def powered(self, new_state):
#     def pairable(self):
#     def pairable(self, new_state):
#     def pairabletimeout(self):
#     def pairabletimeout(self, new_timeout):
#     def discoverable(self):
#     def discoverable(self, new_state):
#     def discoverabletimeout(self):
#     def discoverabletimeout(self, new_timeout):
#     def discovering(self):
#     def _discovering_timeout(self):
#     def uuids(self):
#     def nearby_discovery(self, timeout=10):
#     def show_duplicates(self):
#     def hide_duplicates(self):
#     def start_discovery(self):
#     def stop_discovery(self):
#     def remove_device(self, device_path):
#     def run(self):
#     def quit(self):
#     def _properties_changed(self, interface, changed, invalidated, path):
#     def _device_added(self, dbus_mngr, device_address):
#     def _interfaces_removed(self, path, device_info):
# 
# Path: bluezero/advertisement.py
# class Advertisement(gio_dbus.DbusService):
# class AdvertisingManager:
#     def __init__(self, advert_id, ad_type):
#     def start(self):
#     def stop(self):
#     def get_path(self):
#     def Release(self):  # pylint: disable=invalid-name
#     def service_UUIDs(self):  # pylint: disable=invalid-name
#     def service_UUIDs(self, UUID):  # pylint: disable=invalid-name
#     def manufacturer_data(self, company_id, data):
#     def manufacturer_data(self, manufacturer_data: Dict[int, List[int]]) -> None:
#     def solicit_UUIDs(self):  # pylint: disable=invalid-name
#     def solicit_UUIDs(self, data: List[str]) -> None:
#     def service_data(self):
#     def service_data(self, service_data):
#     def local_name(self) -> Union[str, None]:
#     def local_name(self, name: Union[str, None]):
#     def appearance(self) -> int:
#     def appearance(self, appearance: int) -> None:
# def register_ad_cb():
# def register_ad_error_cb(error):
#     def __new__(cls, adapter_addr=None, *args, **kwargs):
#     def __init__(self, adapter_addr=None):
#     def register_advertisement(self, advertisement, options):
#     def unregister_advertisement(self, advertisement):


from bluezero import adapter
from bluezero import advertisement
"""
The level 10 file for creating beacons
This requires BlueZ to have the experimental flag set
"""


class Beacon:
    """
    Create a non-connectable Bluetooth instance advertising information
    """
    def __init__(self, adapter_addr=None):
        """Default initialiser.

        Creates the BLE beacon object
        If an adapter object exists then give it as an optional argument
        If an adapter object is not given then the first adapter found is used
        :param adapter_addr: Optional Python adapter object.
        """
        self.dongle = None
        if adapter_addr is None:
            self.dongle = adapter.Adapter(adapter.list_adapters()[0])
        else:
            self.dongle = adapter.Adapter(adapter_addr)


# Path: bluezero/adapter.py
# class AdapterError(Exception):
# class Adapter:
# def list_adapters():
#     def available():
#     def __new__(cls, adapter_addr=None, *args, **kwargs):
#     def __init__(self, adapter_addr=None):
#     def address(self):
#     def name(self):
#     def bt_class(self):
#     def alias(self):
#     def alias(self, new_alias):
#     def get_all(self):
#     def powered(self):
#     def powered(self, new_state):
#     def pairable(self):
#     def pairable(self, new_state):
#     def pairabletimeout(self):
#     def pairabletimeout(self, new_timeout):
#     def discoverable(self):
#     def discoverable(self, new_state):
#     def discoverabletimeout(self):
#     def discoverabletimeout(self, new_timeout):
#     def discovering(self):
#     def _discovering_timeout(self):
#     def uuids(self):
#     def nearby_discovery(self, timeout=10):
#     def show_duplicates(self):
#     def hide_duplicates(self):
#     def start_discovery(self):
#     def stop_discovery(self):
#     def remove_device(self, device_path):
#     def run(self):
#     def quit(self):
#     def _properties_changed(self, interface, changed, invalidated, path):
#     def _device_added(self, dbus_mngr, device_address):
#     def _interfaces_removed(self, path, device_info):
# 
# Path: bluezero/advertisement.py
# class Advertisement(gio_dbus.DbusService):
# class AdvertisingManager:
#     def __init__(self, advert_id, ad_type):
#     def start(self):
#     def stop(self):
#     def get_path(self):
#     def Release(self):  # pylint: disable=invalid-name
#     def service_UUIDs(self):  # pylint: disable=invalid-name
#     def service_UUIDs(self, UUID):  # pylint: disable=invalid-name
#     def manufacturer_data(self, company_id, data):
#     def manufacturer_data(self, manufacturer_data: Dict[int, List[int]]) -> None:
#     def solicit_UUIDs(self):  # pylint: disable=invalid-name
#     def solicit_UUIDs(self, data: List[str]) -> None:
#     def service_data(self):
#     def service_data(self, service_data):
#     def local_name(self) -> Union[str, None]:
#     def local_name(self, name: Union[str, None]):
#     def appearance(self) -> int:
#     def appearance(self, appearance: int) -> None:
# def register_ad_cb():
# def register_ad_error_cb(error):
#     def __new__(cls, adapter_addr=None, *args, **kwargs):
#     def __init__(self, adapter_addr=None):
#     def register_advertisement(self, advertisement, options):
#     def unregister_advertisement(self, advertisement):


# Path: bluezero/broadcaster.py
from bluezero import adapter
from bluezero import advertisement

"""
The level 10 file for creating beacons
This requires BlueZ to have the experimental flag set
"""


class Beacon:
    """
    Create a non-connectable Bluetooth instance advertising information
    """
    def __init__(self, adapter_addr=None):
        """Default initialiser.

        Creates the BLE beacon object
        If an adapter object exists then give it as an optional argument
        If an adapter object is not given then the first adapter found is used
        :param adapter_addr: Optional Python adapter object.
        """
        self.dongle = None
        if adapter_addr is None:
            self.dongle = adapter.Adapter(adapter.list_adapters()[0])
        else:
            self.dongle = adapter.Adapter(adapter_addr)


        self.broadcaster = advertisement.Advertisement(1, 'broadcast')