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

import enum
import typing
import uuid

import bleak_winrt._winrt as _winrt
try:
    import bleak_winrt.windows.applicationmodel.background
except Exception:
    pass

try:
    import bleak_winrt.windows.foundation
except Exception:
    pass

try:
    import bleak_winrt.windows.foundation.collections
except Exception:
    pass

try:
    import bleak_winrt.windows.security.credentials
except Exception:
    pass

try:
    import bleak_winrt.windows.storage.streams
except Exception:
    pass

try:
    import bleak_winrt.windows.ui
except Exception:
    pass

try:
    import bleak_winrt.windows.ui.popups
except Exception:
    pass

class DeviceAccessStatus(enum.IntEnum):
    UNSPECIFIED = 0
    ALLOWED = 1
    DENIED_BY_USER = 2
    DENIED_BY_SYSTEM = 3

class DeviceClass(enum.IntEnum):
    ALL = 0
    AUDIO_CAPTURE = 1
    AUDIO_RENDER = 2
    PORTABLE_STORAGE_DEVICE = 3
    VIDEO_CAPTURE = 4
    IMAGE_SCANNER = 5
    LOCATION = 6

class DeviceInformationKind(enum.IntEnum):
    UNKNOWN = 0
    DEVICE_INTERFACE = 1
    DEVICE_CONTAINER = 2
    DEVICE = 3
    DEVICE_INTERFACE_CLASS = 4
    ASSOCIATION_ENDPOINT = 5
    ASSOCIATION_ENDPOINT_CONTAINER = 6
    ASSOCIATION_ENDPOINT_SERVICE = 7
    DEVICE_PANEL = 8

class DevicePairingKinds(enum.IntFlag):
    NONE = 0
    CONFIRM_ONLY = 0x1
    DISPLAY_PIN = 0x2
    PROVIDE_PIN = 0x4
    CONFIRM_PIN_MATCH = 0x8
    PROVIDE_PASSWORD_CREDENTIAL = 0x10

class DevicePairingProtectionLevel(enum.IntEnum):
    DEFAULT = 0
    NONE = 1
    ENCRYPTION = 2
    ENCRYPTION_AND_AUTHENTICATION = 3

class DevicePairingResultStatus(enum.IntEnum):
    PAIRED = 0
    NOT_READY_TO_PAIR = 1
    NOT_PAIRED = 2
    ALREADY_PAIRED = 3
    CONNECTION_REJECTED = 4
    TOO_MANY_CONNECTIONS = 5
    HARDWARE_FAILURE = 6
    AUTHENTICATION_TIMEOUT = 7
    AUTHENTICATION_NOT_ALLOWED = 8
    AUTHENTICATION_FAILURE = 9
    NO_SUPPORTED_PROFILES = 10
    PROTECTION_LEVEL_COULD_NOT_BE_MET = 11
    ACCESS_DENIED = 12
    INVALID_CEREMONY_DATA = 13
    PAIRING_CANCELED = 14
    OPERATION_ALREADY_IN_PROGRESS = 15
    REQUIRED_HANDLER_NOT_REGISTERED = 16
    REJECTED_BY_HANDLER = 17
    REMOTE_DEVICE_HAS_ASSOCIATION = 18
    FAILED = 19

class DevicePickerDisplayStatusOptions(enum.IntFlag):
    NONE = 0
    SHOW_PROGRESS = 0x1
    SHOW_DISCONNECT_BUTTON = 0x2
    SHOW_RETRY_BUTTON = 0x4

class DeviceUnpairingResultStatus(enum.IntEnum):
    UNPAIRED = 0
    ALREADY_UNPAIRED = 1
    OPERATION_ALREADY_IN_PROGRESS = 2
    ACCESS_DENIED = 3
    FAILED = 4

class DeviceWatcherEventKind(enum.IntEnum):
    ADD = 0
    UPDATE = 1
    REMOVE = 2

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

class Panel(enum.IntEnum):
    UNKNOWN = 0
    FRONT = 1
    BACK = 2
    TOP = 3
    BOTTOM = 4
    LEFT = 5
    RIGHT = 6

class DeviceAccessChangedEventArgs(_winrt.winrt_base):
    ...
    status: DeviceAccessStatus
    id: str

class DeviceAccessInformation(_winrt.winrt_base):
    ...
    current_status: DeviceAccessStatus
    def create_from_id(device_id: str) -> DeviceAccessInformation:
        ...
    def create_from_device_class_id(device_class_id: uuid.UUID) -> DeviceAccessInformation:
        ...
    def create_from_device_class(device_class: DeviceClass) -> DeviceAccessInformation:
        ...
    def add_access_changed(handler: bleak_winrt.windows.foundation.TypedEventHandler[DeviceAccessInformation, DeviceAccessChangedEventArgs]) -> bleak_winrt.windows.foundation.EventRegistrationToken:
        ...
    def remove_access_changed(cookie: bleak_winrt.windows.foundation.EventRegistrationToken) -> None:
        ...

class DeviceConnectionChangeTriggerDetails(_winrt.winrt_base):
    ...
    device_id: str

class DeviceDisconnectButtonClickedEventArgs(_winrt.winrt_base):
    ...
    device: DeviceInformation

class DeviceInformation(_winrt.winrt_base):
    ...
    enclosure_location: EnclosureLocation
    id: str
    is_default: bool
    is_enabled: bool
    name: str
    properties: bleak_winrt.windows.foundation.collections.IMapView[str, _winrt.winrt_base]
    kind: DeviceInformationKind
    pairing: DeviceInformationPairing
    def update(update_info: DeviceInformationUpdate) -> None:
        ...
    def get_thumbnail_async() -> bleak_winrt.windows.foundation.IAsyncOperation[DeviceThumbnail]:
        ...
    def get_glyph_thumbnail_async() -> bleak_winrt.windows.foundation.IAsyncOperation[DeviceThumbnail]:
        ...
    def get_aqs_filter_from_device_class(device_class: DeviceClass) -> str:
        ...
    def create_from_id_async(device_id: str, additional_properties: bleak_winrt.windows.foundation.collections.IIterable[str], kind: DeviceInformationKind) -> bleak_winrt.windows.foundation.IAsyncOperation[DeviceInformation]:
        ...
    def find_all_async(aqs_filter: str, additional_properties: bleak_winrt.windows.foundation.collections.IIterable[str], kind: DeviceInformationKind) -> bleak_winrt.windows.foundation.IAsyncOperation[DeviceInformationCollection]:
        ...
    def create_watcher(aqs_filter: str, additional_properties: bleak_winrt.windows.foundation.collections.IIterable[str], kind: DeviceInformationKind) -> DeviceWatcher:
        ...
    def create_from_id_async(device_id: str) -> bleak_winrt.windows.foundation.IAsyncOperation[DeviceInformation]:
        ...
    def create_from_id_async(device_id: str, additional_properties: bleak_winrt.windows.foundation.collections.IIterable[str]) -> bleak_winrt.windows.foundation.IAsyncOperation[DeviceInformation]:
        ...
    def find_all_async() -> bleak_winrt.windows.foundation.IAsyncOperation[DeviceInformationCollection]:
        ...
    def find_all_async(device_class: DeviceClass) -> bleak_winrt.windows.foundation.IAsyncOperation[DeviceInformationCollection]:
        ...
    def find_all_async(aqs_filter: str) -> bleak_winrt.windows.foundation.IAsyncOperation[DeviceInformationCollection]:
        ...
    def find_all_async(aqs_filter: str, additional_properties: bleak_winrt.windows.foundation.collections.IIterable[str]) -> bleak_winrt.windows.foundation.IAsyncOperation[DeviceInformationCollection]:
        ...
    def create_watcher() -> DeviceWatcher:
        ...
    def create_watcher(device_class: DeviceClass) -> DeviceWatcher:
        ...
    def create_watcher(aqs_filter: str) -> DeviceWatcher:
        ...
    def create_watcher(aqs_filter: str, additional_properties: bleak_winrt.windows.foundation.collections.IIterable[str]) -> DeviceWatcher:
        ...

class DeviceInformationCollection(bleak_winrt.windows.foundation.collections.IVectorView[DeviceInformation], bleak_winrt.windows.foundation.collections.IIterable[DeviceInformation], _winrt.winrt_base):
    ...
    size: int
    def get_at(index: int) -> DeviceInformation:
        ...
    def index_of(value: DeviceInformation) -> typing.Tuple[bool, int]:
        ...
    def get_many(start_index: int, items_size: int) -> typing.Tuple[int, typing.List[DeviceInformation]]:
        ...
    def first() -> bleak_winrt.windows.foundation.collections.IIterator[DeviceInformation]:
        ...

class DeviceInformationCustomPairing(_winrt.winrt_base):
    ...
    def pair_async(pairing_kinds_supported: DevicePairingKinds) -> bleak_winrt.windows.foundation.IAsyncOperation[DevicePairingResult]:
        ...
    def pair_async(pairing_kinds_supported: DevicePairingKinds, min_protection_level: DevicePairingProtectionLevel) -> bleak_winrt.windows.foundation.IAsyncOperation[DevicePairingResult]:
        ...
    def pair_async(pairing_kinds_supported: DevicePairingKinds, min_protection_level: DevicePairingProtectionLevel, device_pairing_settings: IDevicePairingSettings) -> bleak_winrt.windows.foundation.IAsyncOperation[DevicePairingResult]:
        ...
    def add_pairing_requested(handler: bleak_winrt.windows.foundation.TypedEventHandler[DeviceInformationCustomPairing, DevicePairingRequestedEventArgs]) -> bleak_winrt.windows.foundation.EventRegistrationToken:
        ...
    def remove_pairing_requested(token: bleak_winrt.windows.foundation.EventRegistrationToken) -> None:
        ...

class DeviceInformationPairing(_winrt.winrt_base):
    ...
    can_pair: bool
    is_paired: bool
    custom: DeviceInformationCustomPairing
    protection_level: DevicePairingProtectionLevel
    def pair_async() -> bleak_winrt.windows.foundation.IAsyncOperation[DevicePairingResult]:
        ...
    def pair_async(min_protection_level: DevicePairingProtectionLevel) -> bleak_winrt.windows.foundation.IAsyncOperation[DevicePairingResult]:
        ...
    def pair_async(min_protection_level: DevicePairingProtectionLevel, device_pairing_settings: IDevicePairingSettings) -> bleak_winrt.windows.foundation.IAsyncOperation[DevicePairingResult]:
        ...
    def unpair_async() -> bleak_winrt.windows.foundation.IAsyncOperation[DeviceUnpairingResult]:
        ...
    def try_register_for_all_inbound_pairing_requests_with_protection_level(pairing_kinds_supported: DevicePairingKinds, min_protection_level: DevicePairingProtectionLevel) -> bool:
        ...
    def try_register_for_all_inbound_pairing_requests(pairing_kinds_supported: DevicePairingKinds) -> bool:
        ...

class DeviceInformationUpdate(_winrt.winrt_base):
    ...
    id: str
    properties: bleak_winrt.windows.foundation.collections.IMapView[str, _winrt.winrt_base]
    kind: DeviceInformationKind

class DevicePairingRequestedEventArgs(_winrt.winrt_base):
    ...
    device_information: DeviceInformation
    pairing_kind: DevicePairingKinds
    pin: str
    def accept() -> None:
        ...
    def accept(pin: str) -> None:
        ...
    def get_deferral() -> bleak_winrt.windows.foundation.Deferral:
        ...
    def accept_with_password_credential(password_credential: bleak_winrt.windows.security.credentials.PasswordCredential) -> None:
        ...

class DevicePairingResult(_winrt.winrt_base):
    ...
    protection_level_used: DevicePairingProtectionLevel
    status: DevicePairingResultStatus

class DevicePicker(_winrt.winrt_base):
    ...
    appearance: DevicePickerAppearance
    filter: DevicePickerFilter
    requested_properties: bleak_winrt.windows.foundation.collections.IVector[str]
    def show(selection: bleak_winrt.windows.foundation.Rect) -> None:
        ...
    def show(selection: bleak_winrt.windows.foundation.Rect, placement: bleak_winrt.windows.ui.popups.Placement) -> None:
        ...
    def pick_single_device_async(selection: bleak_winrt.windows.foundation.Rect) -> bleak_winrt.windows.foundation.IAsyncOperation[DeviceInformation]:
        ...
    def pick_single_device_async(selection: bleak_winrt.windows.foundation.Rect, placement: bleak_winrt.windows.ui.popups.Placement) -> bleak_winrt.windows.foundation.IAsyncOperation[DeviceInformation]:
        ...
    def hide() -> None:
        ...
    def set_display_status(device: DeviceInformation, status: str, options: DevicePickerDisplayStatusOptions) -> None:
        ...
    def add_device_picker_dismissed(handler: bleak_winrt.windows.foundation.TypedEventHandler[DevicePicker, _winrt.winrt_base]) -> bleak_winrt.windows.foundation.EventRegistrationToken:
        ...
    def remove_device_picker_dismissed(token: bleak_winrt.windows.foundation.EventRegistrationToken) -> None:
        ...
    def add_device_selected(handler: bleak_winrt.windows.foundation.TypedEventHandler[DevicePicker, DeviceSelectedEventArgs]) -> bleak_winrt.windows.foundation.EventRegistrationToken:
        ...
    def remove_device_selected(token: bleak_winrt.windows.foundation.EventRegistrationToken) -> None:
        ...
    def add_disconnect_button_clicked(handler: bleak_winrt.windows.foundation.TypedEventHandler[DevicePicker, DeviceDisconnectButtonClickedEventArgs]) -> bleak_winrt.windows.foundation.EventRegistrationToken:
        ...
    def remove_disconnect_button_clicked(token: bleak_winrt.windows.foundation.EventRegistrationToken) -> None:
        ...

class DevicePickerAppearance(_winrt.winrt_base):
    ...
    title: str
    selected_foreground_color: bleak_winrt.windows.ui.Color
    selected_background_color: bleak_winrt.windows.ui.Color
    selected_accent_color: bleak_winrt.windows.ui.Color
    foreground_color: bleak_winrt.windows.ui.Color
    background_color: bleak_winrt.windows.ui.Color
    accent_color: bleak_winrt.windows.ui.Color

class DevicePickerFilter(_winrt.winrt_base):
    ...
    supported_device_classes: bleak_winrt.windows.foundation.collections.IVector[DeviceClass]
    supported_device_selectors: bleak_winrt.windows.foundation.collections.IVector[str]

class DeviceSelectedEventArgs(_winrt.winrt_base):
    ...
    selected_device: DeviceInformation

class DeviceThumbnail(bleak_winrt.windows.storage.streams.IRandomAccessStreamWithContentType, bleak_winrt.windows.storage.streams.IContentTypeProvider, bleak_winrt.windows.storage.streams.IRandomAccessStream, bleak_winrt.windows.storage.streams.IOutputStream, bleak_winrt.windows.foundation.IClosable, bleak_winrt.windows.storage.streams.IInputStream, typing.ContextManager[DeviceThumbnail], _winrt.winrt_base):
    ...
    content_type: str
    size: int
    can_read: bool
    can_write: bool
    position: int
    def get_input_stream_at(position: int) -> bleak_winrt.windows.storage.streams.IInputStream:
        ...
    def get_output_stream_at(position: int) -> bleak_winrt.windows.storage.streams.IOutputStream:
        ...
    def seek(position: int) -> None:
        ...
    def clone_stream() -> bleak_winrt.windows.storage.streams.IRandomAccessStream:
        ...
    def close() -> None:
        ...
    def read_async(buffer: bleak_winrt.windows.storage.streams.IBuffer, count: int, options: bleak_winrt.windows.storage.streams.InputStreamOptions) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[bleak_winrt.windows.storage.streams.IBuffer, int]:
        ...
    def write_async(buffer: bleak_winrt.windows.storage.streams.IBuffer) -> bleak_winrt.windows.foundation.IAsyncOperationWithProgress[int, int]:
        ...
    def flush_async() -> bleak_winrt.windows.foundation.IAsyncOperation[bool]:
        ...

class DeviceUnpairingResult(_winrt.winrt_base):
    ...
    status: DeviceUnpairingResultStatus

class DeviceWatcher(_winrt.winrt_base):
    ...
    status: DeviceWatcherStatus
    def start() -> None:
        ...
    def stop() -> None:
        ...
    def get_background_trigger(requested_event_kinds: bleak_winrt.windows.foundation.collections.IIterable[DeviceWatcherEventKind]) -> bleak_winrt.windows.applicationmodel.background.DeviceWatcherTrigger:
        ...
    def add_added(handler: bleak_winrt.windows.foundation.TypedEventHandler[DeviceWatcher, DeviceInformation]) -> bleak_winrt.windows.foundation.EventRegistrationToken:
        ...
    def remove_added(token: bleak_winrt.windows.foundation.EventRegistrationToken) -> None:
        ...
    def add_enumeration_completed(handler: bleak_winrt.windows.foundation.TypedEventHandler[DeviceWatcher, _winrt.winrt_base]) -> bleak_winrt.windows.foundation.EventRegistrationToken:
        ...
    def remove_enumeration_completed(token: bleak_winrt.windows.foundation.EventRegistrationToken) -> None:
        ...
    def add_removed(handler: bleak_winrt.windows.foundation.TypedEventHandler[DeviceWatcher, DeviceInformationUpdate]) -> bleak_winrt.windows.foundation.EventRegistrationToken:
        ...
    def remove_removed(token: bleak_winrt.windows.foundation.EventRegistrationToken) -> None:
        ...
    def add_stopped(handler: bleak_winrt.windows.foundation.TypedEventHandler[DeviceWatcher, _winrt.winrt_base]) -> bleak_winrt.windows.foundation.EventRegistrationToken:
        ...
    def remove_stopped(token: bleak_winrt.windows.foundation.EventRegistrationToken) -> None:
        ...
    def add_updated(handler: bleak_winrt.windows.foundation.TypedEventHandler[DeviceWatcher, DeviceInformationUpdate]) -> bleak_winrt.windows.foundation.EventRegistrationToken:
        ...
    def remove_updated(token: bleak_winrt.windows.foundation.EventRegistrationToken) -> None:
        ...

class DeviceWatcherEvent(_winrt.winrt_base):
    ...
    device_information: DeviceInformation
    device_information_update: DeviceInformationUpdate
    kind: DeviceWatcherEventKind

class DeviceWatcherTriggerDetails(_winrt.winrt_base):
    ...
    device_watcher_events: bleak_winrt.windows.foundation.collections.IVectorView[DeviceWatcherEvent]

class EnclosureLocation(_winrt.winrt_base):
    ...
    in_dock: bool
    in_lid: bool
    panel: Panel
    rotation_angle_in_degrees_clockwise: int

class IDevicePairingSettings(_winrt.winrt_base):
    ...

