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

import enum
import sys
import types
import typing
import uuid

import winsdk._winrt as _winrt

try:
    import winsdk.windows.devices.enumeration
except Exception:
    pass

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

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

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

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

class CastingConnectionErrorStatus(enum.IntEnum):
    SUCCEEDED = 0
    DEVICE_DID_NOT_RESPOND = 1
    DEVICE_ERROR = 2
    DEVICE_LOCKED = 3
    PROTECTED_PLAYBACK_FAILED = 4
    INVALID_CASTING_SOURCE = 5
    UNKNOWN = 6

class CastingConnectionState(enum.IntEnum):
    DISCONNECTED = 0
    CONNECTED = 1
    RENDERING = 2
    DISCONNECTING = 3
    CONNECTING = 4

class CastingPlaybackTypes(enum.IntFlag):
    NONE = 0
    AUDIO = 0x1
    VIDEO = 0x2
    PICTURE = 0x4

class CastingConnection(winsdk.windows.foundation.IClosable, _winrt.Object):
    source: CastingSource
    device: CastingDevice
    state: CastingConnectionState
    @staticmethod
    def _from(obj: _winrt.Object) -> CastingConnection: ...
    @typing.overload
    def close(self) -> None: ...
    @typing.overload
    def disconnect_async(self) -> winsdk.windows.foundation.IAsyncOperation[CastingConnectionErrorStatus]: ...
    @typing.overload
    def request_start_casting_async(self, value: CastingSource) -> winsdk.windows.foundation.IAsyncOperation[CastingConnectionErrorStatus]: ...
    @typing.overload
    def add_error_occurred(self, handler: winsdk.windows.foundation.TypedEventHandler[CastingConnection, CastingConnectionErrorOccurredEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_error_occurred(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_state_changed(self, handler: winsdk.windows.foundation.TypedEventHandler[CastingConnection, _winrt.Object]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_state_changed(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class CastingConnectionErrorOccurredEventArgs(_winrt.Object):
    error_status: CastingConnectionErrorStatus
    message: str
    @staticmethod
    def _from(obj: _winrt.Object) -> CastingConnectionErrorOccurredEventArgs: ...

class CastingDevice(_winrt.Object):
    friendly_name: str
    icon: winsdk.windows.storage.streams.IRandomAccessStreamWithContentType
    id: str
    @staticmethod
    def _from(obj: _winrt.Object) -> CastingDevice: ...
    @typing.overload
    def create_casting_connection(self) -> CastingConnection: ...
    @typing.overload
    @staticmethod
    def device_info_supports_casting_async(device: winsdk.windows.devices.enumeration.DeviceInformation) -> winsdk.windows.foundation.IAsyncOperation[_winrt.Boolean]: ...
    @typing.overload
    @staticmethod
    def from_id_async(value: str) -> winsdk.windows.foundation.IAsyncOperation[CastingDevice]: ...
    @typing.overload
    @staticmethod
    def get_device_selector(type: CastingPlaybackTypes) -> str: ...
    @typing.overload
    @staticmethod
    def get_device_selector_from_casting_source_async(casting_source: CastingSource) -> winsdk.windows.foundation.IAsyncOperation[str]: ...
    @typing.overload
    def get_supported_casting_playback_types_async(self) -> winsdk.windows.foundation.IAsyncOperation[CastingPlaybackTypes]: ...

class CastingDevicePicker(_winrt.Object):
    appearance: winsdk.windows.devices.enumeration.DevicePickerAppearance
    filter: CastingDevicePickerFilter
    @staticmethod
    def _from(obj: _winrt.Object) -> CastingDevicePicker: ...
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def hide(self) -> None: ...
    @typing.overload
    def show(self, selection: winsdk.windows.foundation.Rect) -> None: ...
    @typing.overload
    def show(self, selection: winsdk.windows.foundation.Rect, preferred_placement: winsdk.windows.ui.popups.Placement) -> None: ...
    @typing.overload
    def add_casting_device_picker_dismissed(self, handler: winsdk.windows.foundation.TypedEventHandler[CastingDevicePicker, _winrt.Object]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_casting_device_picker_dismissed(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_casting_device_selected(self, handler: winsdk.windows.foundation.TypedEventHandler[CastingDevicePicker, CastingDeviceSelectedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_casting_device_selected(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class CastingDevicePickerFilter(_winrt.Object):
    supports_video: _winrt.Boolean
    supports_pictures: _winrt.Boolean
    supports_audio: _winrt.Boolean
    supported_casting_sources: winsdk.windows.foundation.collections.IVector[CastingSource]
    @staticmethod
    def _from(obj: _winrt.Object) -> CastingDevicePickerFilter: ...

class CastingDeviceSelectedEventArgs(_winrt.Object):
    selected_casting_device: CastingDevice
    @staticmethod
    def _from(obj: _winrt.Object) -> CastingDeviceSelectedEventArgs: ...

class CastingSource(_winrt.Object):
    preferred_source_uri: winsdk.windows.foundation.Uri
    @staticmethod
    def _from(obj: _winrt.Object) -> CastingSource: ...

