# WARNING: Please don't edit this file. It was generated by Python/WinRT v1.0.0-beta.9

import enum
import datetime
import sys
import types
import typing

import winsdk.system
import winsdk.windows.devices.bluetooth
import winsdk.windows.foundation
import winsdk.windows.foundation.collections
import winsdk.windows.storage.streams

class BluetoothLEAdvertisementFlags(enum.IntFlag):
    NONE = 0
    LIMITED_DISCOVERABLE_MODE = 0x1
    GENERAL_DISCOVERABLE_MODE = 0x2
    CLASSIC_NOT_SUPPORTED = 0x4
    DUAL_MODE_CONTROLLER_CAPABLE = 0x8
    DUAL_MODE_HOST_CAPABLE = 0x10

class BluetoothLEAdvertisementPublisherStatus(enum.IntEnum):
    CREATED = 0
    WAITING = 1
    STARTED = 2
    STOPPING = 3
    STOPPED = 4
    ABORTED = 5

class BluetoothLEAdvertisementType(enum.IntEnum):
    CONNECTABLE_UNDIRECTED = 0
    CONNECTABLE_DIRECTED = 1
    SCANNABLE_UNDIRECTED = 2
    NON_CONNECTABLE_UNDIRECTED = 3
    SCAN_RESPONSE = 4
    EXTENDED = 5

class BluetoothLEAdvertisementWatcherStatus(enum.IntEnum):
    CREATED = 0
    STARTED = 1
    STOPPING = 2
    STOPPED = 3
    ABORTED = 4

class BluetoothLEScanningMode(enum.IntEnum):
    PASSIVE = 0
    ACTIVE = 1
    NONE = 2

Self = typing.TypeVar('Self')

class BluetoothLEAdvertisement(winsdk.system.Object):
    local_name: str
    flags: typing.Optional[typing.Optional[BluetoothLEAdvertisementFlags]]
    data_sections: typing.Optional[winsdk.windows.foundation.collections.IVector[BluetoothLEAdvertisementDataSection]]
    manufacturer_data: typing.Optional[winsdk.windows.foundation.collections.IVector[BluetoothLEManufacturerData]]
    service_uuids: typing.Optional[winsdk.windows.foundation.collections.IVector[winsdk.system.Guid]]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> BluetoothLEAdvertisement: ...
    def __new__(cls: typing.Type[BluetoothLEAdvertisement]) -> BluetoothLEAdvertisement:...
    def get_manufacturer_data_by_company_id(self, company_id: winsdk.system.UInt16) -> typing.Optional[winsdk.windows.foundation.collections.IVectorView[BluetoothLEManufacturerData]]: ...
    def get_sections_by_type(self, type: winsdk.system.UInt8) -> typing.Optional[winsdk.windows.foundation.collections.IVectorView[BluetoothLEAdvertisementDataSection]]: ...

class BluetoothLEAdvertisementBytePattern(winsdk.system.Object):
    offset: winsdk.system.Int16
    data_type: winsdk.system.UInt8
    data: typing.Optional[winsdk.windows.storage.streams.IBuffer]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> BluetoothLEAdvertisementBytePattern: ...
    @typing.overload
    def __new__(cls: typing.Type[BluetoothLEAdvertisementBytePattern]) -> BluetoothLEAdvertisementBytePattern:...
    @typing.overload
    def __new__(cls: typing.Type[BluetoothLEAdvertisementBytePattern], data_type: winsdk.system.UInt8, offset: winsdk.system.Int16, data: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> BluetoothLEAdvertisementBytePattern:...

class BluetoothLEAdvertisementDataSection(winsdk.system.Object):
    data_type: winsdk.system.UInt8
    data: typing.Optional[winsdk.windows.storage.streams.IBuffer]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> BluetoothLEAdvertisementDataSection: ...
    @typing.overload
    def __new__(cls: typing.Type[BluetoothLEAdvertisementDataSection]) -> BluetoothLEAdvertisementDataSection:...
    @typing.overload
    def __new__(cls: typing.Type[BluetoothLEAdvertisementDataSection], data_type: winsdk.system.UInt8, data: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> BluetoothLEAdvertisementDataSection:...

class BluetoothLEAdvertisementDataTypes(winsdk.system.Object):
    advertising_interval: typing.ClassVar[winsdk.system.UInt8]
    appearance: typing.ClassVar[winsdk.system.UInt8]
    complete_local_name: typing.ClassVar[winsdk.system.UInt8]
    complete_service128_bit_uuids: typing.ClassVar[winsdk.system.UInt8]
    complete_service16_bit_uuids: typing.ClassVar[winsdk.system.UInt8]
    complete_service32_bit_uuids: typing.ClassVar[winsdk.system.UInt8]
    flags: typing.ClassVar[winsdk.system.UInt8]
    incomplete_service128_bit_uuids: typing.ClassVar[winsdk.system.UInt8]
    incomplete_service16_bit_uuids: typing.ClassVar[winsdk.system.UInt8]
    incomplete_service32_bit_uuids: typing.ClassVar[winsdk.system.UInt8]
    manufacturer_specific_data: typing.ClassVar[winsdk.system.UInt8]
    peripheral_connection_interval_range: typing.ClassVar[winsdk.system.UInt8]
    public_target_address: typing.ClassVar[winsdk.system.UInt8]
    random_target_address: typing.ClassVar[winsdk.system.UInt8]
    service_data128_bit_uuids: typing.ClassVar[winsdk.system.UInt8]
    service_data16_bit_uuids: typing.ClassVar[winsdk.system.UInt8]
    service_data32_bit_uuids: typing.ClassVar[winsdk.system.UInt8]
    service_solicitation128_bit_uuids: typing.ClassVar[winsdk.system.UInt8]
    service_solicitation16_bit_uuids: typing.ClassVar[winsdk.system.UInt8]
    service_solicitation32_bit_uuids: typing.ClassVar[winsdk.system.UInt8]
    shortened_local_name: typing.ClassVar[winsdk.system.UInt8]
    tx_power_level: typing.ClassVar[winsdk.system.UInt8]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> BluetoothLEAdvertisementDataTypes: ...

class BluetoothLEAdvertisementFilter(winsdk.system.Object):
    advertisement: typing.Optional[BluetoothLEAdvertisement]
    byte_patterns: typing.Optional[winsdk.windows.foundation.collections.IVector[BluetoothLEAdvertisementBytePattern]]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> BluetoothLEAdvertisementFilter: ...
    def __new__(cls: typing.Type[BluetoothLEAdvertisementFilter]) -> BluetoothLEAdvertisementFilter:...

class BluetoothLEAdvertisementPublisher(winsdk.system.Object):
    advertisement: typing.Optional[BluetoothLEAdvertisement]
    status: BluetoothLEAdvertisementPublisherStatus
    use_extended_advertisement: winsdk.system.Boolean
    preferred_transmit_power_level_in_d_bm: typing.Optional[typing.Optional[winsdk.system.Int16]]
    is_anonymous: winsdk.system.Boolean
    include_transmit_power_level: winsdk.system.Boolean
    @staticmethod
    def _from(obj: winsdk.system.Object) -> BluetoothLEAdvertisementPublisher: ...
    @typing.overload
    def __new__(cls: typing.Type[BluetoothLEAdvertisementPublisher]) -> BluetoothLEAdvertisementPublisher:...
    @typing.overload
    def __new__(cls: typing.Type[BluetoothLEAdvertisementPublisher], advertisement: typing.Optional[BluetoothLEAdvertisement]) -> BluetoothLEAdvertisementPublisher:...
    def start(self) -> None: ...
    def stop(self) -> None: ...
    def add_status_changed(self, handler: winsdk.windows.foundation.TypedEventHandler[BluetoothLEAdvertisementPublisher, BluetoothLEAdvertisementPublisherStatusChangedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_status_changed(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class BluetoothLEAdvertisementPublisherStatusChangedEventArgs(winsdk.system.Object):
    error: winsdk.windows.devices.bluetooth.BluetoothError
    status: BluetoothLEAdvertisementPublisherStatus
    selected_transmit_power_level_in_d_bm: typing.Optional[typing.Optional[winsdk.system.Int16]]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> BluetoothLEAdvertisementPublisherStatusChangedEventArgs: ...

class BluetoothLEAdvertisementReceivedEventArgs(winsdk.system.Object):
    advertisement: typing.Optional[BluetoothLEAdvertisement]
    advertisement_type: BluetoothLEAdvertisementType
    bluetooth_address: winsdk.system.UInt64
    raw_signal_strength_in_d_bm: winsdk.system.Int16
    timestamp: datetime.datetime
    bluetooth_address_type: winsdk.windows.devices.bluetooth.BluetoothAddressType
    is_anonymous: winsdk.system.Boolean
    is_connectable: winsdk.system.Boolean
    is_directed: winsdk.system.Boolean
    is_scan_response: winsdk.system.Boolean
    is_scannable: winsdk.system.Boolean
    transmit_power_level_in_d_bm: typing.Optional[typing.Optional[winsdk.system.Int16]]
    @staticmethod
    def _from(obj: winsdk.system.Object) -> BluetoothLEAdvertisementReceivedEventArgs: ...

class BluetoothLEAdvertisementWatcher(winsdk.system.Object):
    signal_strength_filter: typing.Optional[winsdk.windows.devices.bluetooth.BluetoothSignalStrengthFilter]
    scanning_mode: BluetoothLEScanningMode
    advertisement_filter: typing.Optional[BluetoothLEAdvertisementFilter]
    max_out_of_range_timeout: datetime.timedelta
    max_sampling_interval: datetime.timedelta
    min_out_of_range_timeout: datetime.timedelta
    min_sampling_interval: datetime.timedelta
    status: BluetoothLEAdvertisementWatcherStatus
    allow_extended_advertisements: winsdk.system.Boolean
    @staticmethod
    def _from(obj: winsdk.system.Object) -> BluetoothLEAdvertisementWatcher: ...
    @typing.overload
    def __new__(cls: typing.Type[BluetoothLEAdvertisementWatcher]) -> BluetoothLEAdvertisementWatcher:...
    @typing.overload
    def __new__(cls: typing.Type[BluetoothLEAdvertisementWatcher], advertisement_filter: typing.Optional[BluetoothLEAdvertisementFilter]) -> BluetoothLEAdvertisementWatcher:...
    def start(self) -> None: ...
    def stop(self) -> None: ...
    def add_received(self, handler: winsdk.windows.foundation.TypedEventHandler[BluetoothLEAdvertisementWatcher, BluetoothLEAdvertisementReceivedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_received(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    def add_stopped(self, handler: winsdk.windows.foundation.TypedEventHandler[BluetoothLEAdvertisementWatcher, BluetoothLEAdvertisementWatcherStoppedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_stopped(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class BluetoothLEAdvertisementWatcherStoppedEventArgs(winsdk.system.Object):
    error: winsdk.windows.devices.bluetooth.BluetoothError
    @staticmethod
    def _from(obj: winsdk.system.Object) -> BluetoothLEAdvertisementWatcherStoppedEventArgs: ...

class BluetoothLEManufacturerData(winsdk.system.Object):
    data: typing.Optional[winsdk.windows.storage.streams.IBuffer]
    company_id: winsdk.system.UInt16
    @staticmethod
    def _from(obj: winsdk.system.Object) -> BluetoothLEManufacturerData: ...
    @typing.overload
    def __new__(cls: typing.Type[BluetoothLEManufacturerData]) -> BluetoothLEManufacturerData:...
    @typing.overload
    def __new__(cls: typing.Type[BluetoothLEManufacturerData], company_id: winsdk.system.UInt16, data: typing.Optional[winsdk.windows.storage.streams.IBuffer]) -> BluetoothLEManufacturerData:...

