# 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.enumeration as windows_devices_enumeration
import winrt.windows.foundation as windows_foundation
import winrt.windows.foundation.collections as windows_foundation_collections
import winrt.windows.storage.streams as windows_storage_streams
import winrt.windows.ui.popups as windows_ui_popups

from winrt.windows.media.casting import CastingConnectionErrorStatus, CastingConnectionState, CastingPlaybackTypes

Self = typing.TypeVar('Self')

@typing.final
class CastingConnection(winrt.system.Object):
    def __enter__(self: Self) -> Self: ...
    def __exit__(self, *args) -> None: ...
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CastingConnection: ...
    def close(self) -> None: ...
    def disconnect_async(self) -> windows_foundation.IAsyncOperation[CastingConnectionErrorStatus]: ...
    def request_start_casting_async(self, value: typing.Optional[CastingSource], /) -> windows_foundation.IAsyncOperation[CastingConnectionErrorStatus]: ...
    def add_error_occurred(self, handler: windows_foundation.TypedEventHandler[CastingConnection, CastingConnectionErrorOccurredEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_error_occurred(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_state_changed(self, handler: windows_foundation.TypedEventHandler[CastingConnection, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_state_changed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def source(self) -> typing.Optional[CastingSource]: ...
    @source.setter
    def source(self, value: typing.Optional[CastingSource]) -> None: ...
    @_property
    def device(self) -> typing.Optional[CastingDevice]: ...
    @_property
    def state(self) -> CastingConnectionState: ...

@typing.final
class CastingConnectionErrorOccurredEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CastingConnectionErrorOccurredEventArgs: ...
    @_property
    def error_status(self) -> CastingConnectionErrorStatus: ...
    @_property
    def message(self) -> str: ...

@typing.final
class CastingDevice_Static(type):
    def device_info_supports_casting_async(cls, device: typing.Optional[windows_devices_enumeration.DeviceInformation], /) -> windows_foundation.IAsyncOperation[bool]: ...
    def from_id_async(cls, value: str, /) -> windows_foundation.IAsyncOperation[CastingDevice]: ...
    def get_device_selector(cls, type: CastingPlaybackTypes, /) -> str: ...
    def get_device_selector_from_casting_source_async(cls, casting_source: typing.Optional[CastingSource], /) -> windows_foundation.IAsyncOperation[str]: ...

@typing.final
class CastingDevice(winrt.system.Object, metaclass=CastingDevice_Static):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CastingDevice: ...
    def create_casting_connection(self) -> typing.Optional[CastingConnection]: ...
    def get_supported_casting_playback_types_async(self) -> windows_foundation.IAsyncOperation[CastingPlaybackTypes]: ...
    @_property
    def friendly_name(self) -> str: ...
    @_property
    def icon(self) -> typing.Optional[windows_storage_streams.IRandomAccessStreamWithContentType]: ...
    @_property
    def id(self) -> str: ...

@typing.final
class CastingDevicePicker(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CastingDevicePicker: ...
    def __new__(cls: typing.Type[CastingDevicePicker]) -> CastingDevicePicker: ...
    def hide(self) -> None: ...
    @typing.overload
    def show(self, selection: windows_foundation.Rect, /) -> None: ...
    @typing.overload
    def show(self, selection: windows_foundation.Rect, preferred_placement: windows_ui_popups.Placement, /) -> None: ...
    def add_casting_device_picker_dismissed(self, handler: windows_foundation.TypedEventHandler[CastingDevicePicker, winrt.system.Object], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_casting_device_picker_dismissed(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    def add_casting_device_selected(self, handler: windows_foundation.TypedEventHandler[CastingDevicePicker, CastingDeviceSelectedEventArgs], /) -> windows_foundation.EventRegistrationToken: ...
    def remove_casting_device_selected(self, token: windows_foundation.EventRegistrationToken, /) -> None: ...
    @_property
    def appearance(self) -> typing.Optional[windows_devices_enumeration.DevicePickerAppearance]: ...
    @_property
    def filter(self) -> typing.Optional[CastingDevicePickerFilter]: ...

@typing.final
class CastingDevicePickerFilter(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CastingDevicePickerFilter: ...
    @_property
    def supports_video(self) -> bool: ...
    @supports_video.setter
    def supports_video(self, value: bool) -> None: ...
    @_property
    def supports_pictures(self) -> bool: ...
    @supports_pictures.setter
    def supports_pictures(self, value: bool) -> None: ...
    @_property
    def supports_audio(self) -> bool: ...
    @supports_audio.setter
    def supports_audio(self, value: bool) -> None: ...
    @_property
    def supported_casting_sources(self) -> typing.Optional[windows_foundation_collections.IVector[CastingSource]]: ...

@typing.final
class CastingDeviceSelectedEventArgs(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CastingDeviceSelectedEventArgs: ...
    @_property
    def selected_casting_device(self) -> typing.Optional[CastingDevice]: ...

@typing.final
class CastingSource(winrt.system.Object):
    @staticmethod
    def _from(obj: winrt.system.Object, /) -> CastingSource: ...
    @_property
    def preferred_source_uri(self) -> typing.Optional[windows_foundation.Uri]: ...
    @preferred_source_uri.setter
    def preferred_source_uri(self, value: typing.Optional[windows_foundation.Uri]) -> None: ...

