# WARNING: Please don't edit this file. It was generated by Python/WinRT v2.1.0

import datetime
import sys
import types
import typing
import uuid as _uuid
from builtins import property as _property

import winrt._winrt
import winrt.system
import winrt.windows.devices.bluetooth.genericattributeprofile as windows_devices_bluetooth_genericattributeprofile
import winrt.windows.devices.bluetooth.rfcomm as windows_devices_bluetooth_rfcomm
import winrt.windows.devices.enumeration as windows_devices_enumeration
import winrt.windows.devices.radios as windows_devices_radios
import winrt.windows.foundation as windows_foundation
import winrt.windows.foundation.collections as windows_foundation_collections
import winrt.windows.networking as windows_networking
import winrt.windows.storage.streams as windows_storage_streams

from winrt.windows.devices.bluetooth import BluetoothAddressType, BluetoothCacheMode, BluetoothConnectionStatus, BluetoothError, BluetoothLEPreferredConnectionParametersRequestStatus, BluetoothMajorClass, BluetoothMinorClass, BluetoothServiceCapabilities

Self = typing.TypeVar('Self')

@typing.final
class BluetoothAdapter_Static(type):
    def from_id_async(cls, device_id: str, /) -> windows_foundation.IAsyncOperation[BluetoothAdapter]: ...
    def get_default_async(cls) -> windows_foundation.IAsyncOperation[BluetoothAdapter]: ...
    def get_device_selector(cls) -> str: ...

@typing.final
class BluetoothAdapter(winrt.system.Object, metaclass=BluetoothAdapter_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> BluetoothAdapter: ...
    def get_radio_async(self) -> windows_foundation.IAsyncOperation[windows_devices_radios.Radio]: ...
    @_property
    def bluetooth_address(self) -> winrt.system.UInt64: ...
    @_property
    def device_id(self) -> str: ...
    @_property
    def is_advertisement_offload_supported(self) -> bool: ...
    @_property
    def is_central_role_supported(self) -> bool: ...
    @_property
    def is_classic_supported(self) -> bool: ...
    @_property
    def is_low_energy_supported(self) -> bool: ...
    @_property
    def is_peripheral_role_supported(self) -> bool: ...
    @_property
    def are_classic_secure_connections_supported(self) -> bool: ...
    @_property
    def are_low_energy_secure_connections_supported(self) -> bool: ...
    @_property
    def is_extended_advertising_supported(self) -> bool: ...
    @_property
    def max_advertisement_data_length(self) -> winrt.system.UInt32: ...

@typing.final
class BluetoothClassOfDevice_Static(type):
    def from_parts(cls, major_class: BluetoothMajorClass, minor_class: BluetoothMinorClass, service_capabilities: BluetoothServiceCapabilities, /) -> typing.Optional[BluetoothClassOfDevice]: ...
    def from_raw_value(cls, raw_value: winrt.system.UInt32, /) -> typing.Optional[BluetoothClassOfDevice]: ...

@typing.final
class BluetoothClassOfDevice(winrt.system.Object, metaclass=BluetoothClassOfDevice_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> BluetoothClassOfDevice: ...
    @_property
    def major_class(self) -> BluetoothMajorClass: ...
    @_property
    def minor_class(self) -> BluetoothMinorClass: ...
    @_property
    def raw_value(self) -> winrt.system.UInt32: ...
    @_property
    def service_capabilities(self) -> BluetoothServiceCapabilities: ...

@typing.final
class BluetoothDevice_Static(type):
    def from_bluetooth_address_async(cls, address: winrt.system.UInt64, /) -> windows_foundation.IAsyncOperation[BluetoothDevice]: ...
    def from_host_name_async(cls, host_name: typing.Optional[windows_networking.HostName], /) -> windows_foundation.IAsyncOperation[BluetoothDevice]: ...
    def from_id_async(cls, device_id: str, /) -> windows_foundation.IAsyncOperation[BluetoothDevice]: ...
    def get_device_selector(cls) -> str: ...
    def get_device_selector_from_bluetooth_address(cls, bluetooth_address: winrt.system.UInt64, /) -> str: ...
    def get_device_selector_from_class_of_device(cls, class_of_device: typing.Optional[BluetoothClassOfDevice], /) -> str: ...
    def get_device_selector_from_connection_status(cls, connection_status: BluetoothConnectionStatus, /) -> str: ...
    def get_device_selector_from_device_name(cls, device_name: str, /) -> str: ...
    def get_device_selector_from_pairing_state(cls, pairing_state: bool, /) -> str: ...

@typing.final
class BluetoothDevice(winrt.system.Object, metaclass=BluetoothDevice_Static):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> BluetoothDevice: ...
    def close(self) -> None: ...
    @typing.overload
    def get_rfcomm_services_async(self) -> windows_foundation.IAsyncOperation[windows_devices_bluetooth_rfcomm.RfcommDeviceServicesResult]: ...
    @typing.overload
    def get_rfcomm_services_async(self, cache_mode: BluetoothCacheMode, /) -> windows_foundation.IAsyncOperation[windows_devices_bluetooth_rfcomm.RfcommDeviceServicesResult]: ...
    @typing.overload
    def get_rfcomm_services_for_id_async(self, service_id: typing.Optional[windows_devices_bluetooth_rfcomm.RfcommServiceId], /) -> windows_foundation.IAsyncOperation[windows_devices_bluetooth_rfcomm.RfcommDeviceServicesResult]: ...
    @typing.overload
    def get_rfcomm_services_for_id_async(self, service_id: typing.Optional[windows_devices_bluetooth_rfcomm.RfcommServiceId], cache_mode: BluetoothCacheMode, /) -> windows_foundation.IAsyncOperation[windows_devices_bluetooth_rfcomm.RfcommDeviceServicesResult]: ...
    def request_access_async(self) -> windows_foundation.IAsyncOperation[windows_devices_enumeration.DeviceAccessStatus]: ...
    def add_connection_status_changed(self, handler: windows_foundation.TypedEventHandler[BluetoothDevice, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_connection_status_changed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_name_changed(self, handler: windows_foundation.TypedEventHandler[BluetoothDevice, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_name_changed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_sdp_records_changed(self, handler: windows_foundation.TypedEventHandler[BluetoothDevice, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_sdp_records_changed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def bluetooth_address(self) -> winrt.system.UInt64: ...
    @_property
    def class_of_device(self) -> typing.Optional[BluetoothClassOfDevice]: ...
    @_property
    def connection_status(self) -> BluetoothConnectionStatus: ...
    @_property
    def device_id(self) -> str: ...
    @_property
    def host_name(self) -> typing.Optional[windows_networking.HostName]: ...
    @_property
    def name(self) -> str: ...
    @_property
    def rfcomm_services(self) -> typing.Optional[windows_foundation_collections.IVectorView[windows_devices_bluetooth_rfcomm.RfcommDeviceService]]: ...
    @_property
    def sdp_records(self) -> typing.Optional[windows_foundation_collections.IVectorView[windows_storage_streams.IBuffer]]: ...
    @_property
    def device_information(self) -> typing.Optional[windows_devices_enumeration.DeviceInformation]: ...
    @_property
    def device_access_information(self) -> typing.Optional[windows_devices_enumeration.DeviceAccessInformation]: ...
    @_property
    def bluetooth_device_id(self) -> typing.Optional[BluetoothDeviceId]: ...
    @_property
    def was_secure_connection_used_for_pairing(self) -> bool: ...

@typing.final
class BluetoothDeviceId_Static(type):
    def from_id(cls, device_id: str, /) -> typing.Optional[BluetoothDeviceId]: ...

@typing.final
class BluetoothDeviceId(winrt.system.Object, metaclass=BluetoothDeviceId_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> BluetoothDeviceId: ...
    @_property
    def id(self) -> str: ...
    @_property
    def is_classic_device(self) -> bool: ...
    @_property
    def is_low_energy_device(self) -> bool: ...

@typing.final
class BluetoothLEAppearance_Static(type):
    def from_parts(cls, appearance_category: winrt.system.UInt16, appearance_sub_category: winrt.system.UInt16, /) -> typing.Optional[BluetoothLEAppearance]: ...
    def from_raw_value(cls, raw_value: winrt.system.UInt16, /) -> typing.Optional[BluetoothLEAppearance]: ...

@typing.final
class BluetoothLEAppearance(winrt.system.Object, metaclass=BluetoothLEAppearance_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> BluetoothLEAppearance: ...
    @_property
    def category(self) -> winrt.system.UInt16: ...
    @_property
    def raw_value(self) -> winrt.system.UInt16: ...
    @_property
    def sub_category(self) -> winrt.system.UInt16: ...

@typing.final
class BluetoothLEAppearanceCategories_Static(type):
    @_property
    def barcode_scanner(cls) -> winrt.system.UInt16: ...
    @_property
    def blood_pressure(cls) -> winrt.system.UInt16: ...
    @_property
    def clock(cls) -> winrt.system.UInt16: ...
    @_property
    def computer(cls) -> winrt.system.UInt16: ...
    @_property
    def cycling(cls) -> winrt.system.UInt16: ...
    @_property
    def display(cls) -> winrt.system.UInt16: ...
    @_property
    def eye_glasses(cls) -> winrt.system.UInt16: ...
    @_property
    def glucose_meter(cls) -> winrt.system.UInt16: ...
    @_property
    def heart_rate(cls) -> winrt.system.UInt16: ...
    @_property
    def human_interface_device(cls) -> winrt.system.UInt16: ...
    @_property
    def keyring(cls) -> winrt.system.UInt16: ...
    @_property
    def media_player(cls) -> winrt.system.UInt16: ...
    @_property
    def outdoor_sport_activity(cls) -> winrt.system.UInt16: ...
    @_property
    def phone(cls) -> winrt.system.UInt16: ...
    @_property
    def pulse_oximeter(cls) -> winrt.system.UInt16: ...
    @_property
    def remote_control(cls) -> winrt.system.UInt16: ...
    @_property
    def running_walking(cls) -> winrt.system.UInt16: ...
    @_property
    def tag(cls) -> winrt.system.UInt16: ...
    @_property
    def thermometer(cls) -> winrt.system.UInt16: ...
    @_property
    def uncategorized(cls) -> winrt.system.UInt16: ...
    @_property
    def watch(cls) -> winrt.system.UInt16: ...
    @_property
    def weight_scale(cls) -> winrt.system.UInt16: ...

@typing.final
class BluetoothLEAppearanceCategories(winrt.system.Object, metaclass=BluetoothLEAppearanceCategories_Static):
    pass

@typing.final
class BluetoothLEAppearanceSubcategories_Static(type):
    @_property
    def barcode_scanner(cls) -> winrt.system.UInt16: ...
    @_property
    def blood_pressure_arm(cls) -> winrt.system.UInt16: ...
    @_property
    def blood_pressure_wrist(cls) -> winrt.system.UInt16: ...
    @_property
    def card_reader(cls) -> winrt.system.UInt16: ...
    @_property
    def cycling_cadence_sensor(cls) -> winrt.system.UInt16: ...
    @_property
    def cycling_computer(cls) -> winrt.system.UInt16: ...
    @_property
    def cycling_power_sensor(cls) -> winrt.system.UInt16: ...
    @_property
    def cycling_speed_cadence_sensor(cls) -> winrt.system.UInt16: ...
    @_property
    def cycling_speed_sensor(cls) -> winrt.system.UInt16: ...
    @_property
    def digital_pen(cls) -> winrt.system.UInt16: ...
    @_property
    def digitizer_tablet(cls) -> winrt.system.UInt16: ...
    @_property
    def gamepad(cls) -> winrt.system.UInt16: ...
    @_property
    def generic(cls) -> winrt.system.UInt16: ...
    @_property
    def heart_rate_belt(cls) -> winrt.system.UInt16: ...
    @_property
    def joystick(cls) -> winrt.system.UInt16: ...
    @_property
    def keyboard(cls) -> winrt.system.UInt16: ...
    @_property
    def location_display(cls) -> winrt.system.UInt16: ...
    @_property
    def location_navigation_display(cls) -> winrt.system.UInt16: ...
    @_property
    def location_navigation_pod(cls) -> winrt.system.UInt16: ...
    @_property
    def location_pod(cls) -> winrt.system.UInt16: ...
    @_property
    def mouse(cls) -> winrt.system.UInt16: ...
    @_property
    def oximeter_fingertip(cls) -> winrt.system.UInt16: ...
    @_property
    def oximeter_wrist_worn(cls) -> winrt.system.UInt16: ...
    @_property
    def running_walking_in_shoe(cls) -> winrt.system.UInt16: ...
    @_property
    def running_walking_on_hip(cls) -> winrt.system.UInt16: ...
    @_property
    def running_walking_on_shoe(cls) -> winrt.system.UInt16: ...
    @_property
    def sports_watch(cls) -> winrt.system.UInt16: ...
    @_property
    def thermometer_ear(cls) -> winrt.system.UInt16: ...

@typing.final
class BluetoothLEAppearanceSubcategories(winrt.system.Object, metaclass=BluetoothLEAppearanceSubcategories_Static):
    pass

@typing.final
class BluetoothLEConnectionParameters(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> BluetoothLEConnectionParameters: ...
    @_property
    def connection_interval(self) -> winrt.system.UInt16: ...
    @_property
    def connection_latency(self) -> winrt.system.UInt16: ...
    @_property
    def link_timeout(self) -> winrt.system.UInt16: ...

@typing.final
class BluetoothLEConnectionPhy(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> BluetoothLEConnectionPhy: ...
    @_property
    def receive_info(self) -> typing.Optional[BluetoothLEConnectionPhyInfo]: ...
    @_property
    def transmit_info(self) -> typing.Optional[BluetoothLEConnectionPhyInfo]: ...

@typing.final
class BluetoothLEConnectionPhyInfo(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> BluetoothLEConnectionPhyInfo: ...
    @_property
    def is_coded_phy(self) -> bool: ...
    @_property
    def is_uncoded1_m_phy(self) -> bool: ...
    @_property
    def is_uncoded2_m_phy(self) -> bool: ...

@typing.final
class BluetoothLEDevice_Static(type):
    @typing.overload
    def from_bluetooth_address_async(cls, bluetooth_address: winrt.system.UInt64, /) -> windows_foundation.IAsyncOperation[BluetoothLEDevice]: ...
    @typing.overload
    def from_bluetooth_address_async(cls, bluetooth_address: winrt.system.UInt64, bluetooth_address_type: BluetoothAddressType, /) -> windows_foundation.IAsyncOperation[BluetoothLEDevice]: ...
    def from_id_async(cls, device_id: str, /) -> windows_foundation.IAsyncOperation[BluetoothLEDevice]: ...
    def get_device_selector(cls) -> str: ...
    def get_device_selector_from_appearance(cls, appearance: typing.Optional[BluetoothLEAppearance], /) -> str: ...
    @typing.overload
    def get_device_selector_from_bluetooth_address(cls, bluetooth_address: winrt.system.UInt64, /) -> str: ...
    @typing.overload
    def get_device_selector_from_bluetooth_address(cls, bluetooth_address: winrt.system.UInt64, bluetooth_address_type: BluetoothAddressType, /) -> str: ...
    def get_device_selector_from_connection_status(cls, connection_status: BluetoothConnectionStatus, /) -> str: ...
    def get_device_selector_from_device_name(cls, device_name: str, /) -> str: ...
    def get_device_selector_from_pairing_state(cls, pairing_state: bool, /) -> str: ...

@typing.final
class BluetoothLEDevice(winrt.system.Object, metaclass=BluetoothLEDevice_Static):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> BluetoothLEDevice: ...
    def close(self) -> None: ...
    def get_connection_parameters(self) -> typing.Optional[BluetoothLEConnectionParameters]: ...
    def get_connection_phy(self) -> typing.Optional[BluetoothLEConnectionPhy]: ...
    def get_gatt_service(self, service_uuid: _uuid.UUID, /) -> typing.Optional[windows_devices_bluetooth_genericattributeprofile.GattDeviceService]: ...
    @typing.overload
    def get_gatt_services_async(self) -> windows_foundation.IAsyncOperation[windows_devices_bluetooth_genericattributeprofile.GattDeviceServicesResult]: ...
    @typing.overload
    def get_gatt_services_async(self, cache_mode: BluetoothCacheMode, /) -> windows_foundation.IAsyncOperation[windows_devices_bluetooth_genericattributeprofile.GattDeviceServicesResult]: ...
    @typing.overload
    def get_gatt_services_for_uuid_async(self, service_uuid: _uuid.UUID, /) -> windows_foundation.IAsyncOperation[windows_devices_bluetooth_genericattributeprofile.GattDeviceServicesResult]: ...
    @typing.overload
    def get_gatt_services_for_uuid_async(self, service_uuid: _uuid.UUID, cache_mode: BluetoothCacheMode, /) -> windows_foundation.IAsyncOperation[windows_devices_bluetooth_genericattributeprofile.GattDeviceServicesResult]: ...
    def request_access_async(self) -> windows_foundation.IAsyncOperation[windows_devices_enumeration.DeviceAccessStatus]: ...
    def request_preferred_connection_parameters(self, preferred_connection_parameters: typing.Optional[BluetoothLEPreferredConnectionParameters], /) -> typing.Optional[BluetoothLEPreferredConnectionParametersRequest]: ...
    def add_connection_status_changed(self, handler: windows_foundation.TypedEventHandler[BluetoothLEDevice, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_connection_status_changed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_gatt_services_changed(self, handler: windows_foundation.TypedEventHandler[BluetoothLEDevice, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_gatt_services_changed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_name_changed(self, handler: windows_foundation.TypedEventHandler[BluetoothLEDevice, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_name_changed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_connection_parameters_changed(self, handler: windows_foundation.TypedEventHandler[BluetoothLEDevice, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_connection_parameters_changed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_connection_phy_changed(self, handler: windows_foundation.TypedEventHandler[BluetoothLEDevice, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_connection_phy_changed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def bluetooth_address(self) -> winrt.system.UInt64: ...
    @_property
    def connection_status(self) -> BluetoothConnectionStatus: ...
    @_property
    def device_id(self) -> str: ...
    @_property
    def gatt_services(self) -> typing.Optional[windows_foundation_collections.IVectorView[windows_devices_bluetooth_genericattributeprofile.GattDeviceService]]: ...
    @_property
    def name(self) -> str: ...
    @_property
    def appearance(self) -> typing.Optional[BluetoothLEAppearance]: ...
    @_property
    def bluetooth_address_type(self) -> BluetoothAddressType: ...
    @_property
    def device_information(self) -> typing.Optional[windows_devices_enumeration.DeviceInformation]: ...
    @_property
    def device_access_information(self) -> typing.Optional[windows_devices_enumeration.DeviceAccessInformation]: ...
    @_property
    def bluetooth_device_id(self) -> typing.Optional[BluetoothDeviceId]: ...
    @_property
    def was_secure_connection_used_for_pairing(self) -> bool: ...

@typing.final
class BluetoothLEPreferredConnectionParameters_Static(type):
    @_property
    def balanced(cls) -> typing.Optional[BluetoothLEPreferredConnectionParameters]: ...
    @_property
    def power_optimized(cls) -> typing.Optional[BluetoothLEPreferredConnectionParameters]: ...
    @_property
    def throughput_optimized(cls) -> typing.Optional[BluetoothLEPreferredConnectionParameters]: ...

@typing.final
class BluetoothLEPreferredConnectionParameters(winrt.system.Object, metaclass=BluetoothLEPreferredConnectionParameters_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> BluetoothLEPreferredConnectionParameters: ...
    @_property
    def connection_latency(self) -> winrt.system.UInt16: ...
    @_property
    def link_timeout(self) -> winrt.system.UInt16: ...
    @_property
    def max_connection_interval(self) -> winrt.system.UInt16: ...
    @_property
    def min_connection_interval(self) -> winrt.system.UInt16: ...

@typing.final
class BluetoothLEPreferredConnectionParametersRequest(winrt.system.Object):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> BluetoothLEPreferredConnectionParametersRequest: ...
    def close(self) -> None: ...
    @_property
    def status(self) -> BluetoothLEPreferredConnectionParametersRequestStatus: ...

@typing.final
class BluetoothSignalStrengthFilter(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> BluetoothSignalStrengthFilter: ...
    def __new__(cls: typing.Type[BluetoothSignalStrengthFilter]) -> BluetoothSignalStrengthFilter: ...
    @_property
    def sampling_interval(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...
    @sampling_interval.setter
    def sampling_interval(self, value: typing.Optional[typing.Optional[datetime.timedelta]]) -> None: ...
    @_property
    def out_of_range_timeout(self) -> typing.Optional[typing.Optional[datetime.timedelta]]: ...
    @out_of_range_timeout.setter
    def out_of_range_timeout(self, value: typing.Optional[typing.Optional[datetime.timedelta]]) -> None: ...
    @_property
    def out_of_range_threshold_in_d_bm(self) -> typing.Optional[typing.Optional[winrt.system.Int16]]: ...
    @out_of_range_threshold_in_d_bm.setter
    def out_of_range_threshold_in_d_bm(self, value: typing.Optional[typing.Optional[winrt.system.Int16]]) -> None: ...
    @_property
    def in_range_threshold_in_d_bm(self) -> typing.Optional[typing.Optional[winrt.system.Int16]]: ...
    @in_range_threshold_in_d_bm.setter
    def in_range_threshold_in_d_bm(self, value: typing.Optional[typing.Optional[winrt.system.Int16]]) -> None: ...

@typing.final
class BluetoothUuidHelper_Static(type):
    def from_short_id(cls, short_id: winrt.system.UInt32, /) -> _uuid.UUID: ...
    def try_get_short_id(cls, uuid: _uuid.UUID, /) -> typing.Optional[typing.Optional[winrt.system.UInt32]]: ...

@typing.final
class BluetoothUuidHelper(winrt.system.Object, metaclass=BluetoothUuidHelper_Static):
    pass

