# 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.foundation
except Exception:
    pass

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

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

class PlayToConnectionError(enum.IntEnum):
    NONE = 0
    DEVICE_NOT_RESPONDING = 1
    DEVICE_ERROR = 2
    DEVICE_LOCKED = 3
    PROTECTED_PLAYBACK_FAILED = 4

class PlayToConnectionState(enum.IntEnum):
    DISCONNECTED = 0
    CONNECTED = 1
    RENDERING = 2

class CurrentTimeChangeRequestedEventArgs(_winrt.Object):
    time: winsdk.windows.foundation.TimeSpan
    @staticmethod
    def _from(obj: _winrt.Object) -> CurrentTimeChangeRequestedEventArgs: ...

class MuteChangeRequestedEventArgs(_winrt.Object):
    mute: _winrt.Boolean
    @staticmethod
    def _from(obj: _winrt.Object) -> MuteChangeRequestedEventArgs: ...

class PlayToConnection(_winrt.Object):
    state: PlayToConnectionState
    @staticmethod
    def _from(obj: _winrt.Object) -> PlayToConnection: ...
    @typing.overload
    def add_error(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToConnection, PlayToConnectionErrorEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_error(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_state_changed(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToConnection, PlayToConnectionStateChangedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_state_changed(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_transferred(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToConnection, PlayToConnectionTransferredEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_transferred(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class PlayToConnectionErrorEventArgs(_winrt.Object):
    code: PlayToConnectionError
    message: str
    @staticmethod
    def _from(obj: _winrt.Object) -> PlayToConnectionErrorEventArgs: ...

class PlayToConnectionStateChangedEventArgs(_winrt.Object):
    current_state: PlayToConnectionState
    previous_state: PlayToConnectionState
    @staticmethod
    def _from(obj: _winrt.Object) -> PlayToConnectionStateChangedEventArgs: ...

class PlayToConnectionTransferredEventArgs(_winrt.Object):
    current_source: PlayToSource
    previous_source: PlayToSource
    @staticmethod
    def _from(obj: _winrt.Object) -> PlayToConnectionTransferredEventArgs: ...

class PlayToManager(_winrt.Object):
    default_source_selection: _winrt.Boolean
    @staticmethod
    def _from(obj: _winrt.Object) -> PlayToManager: ...
    @typing.overload
    @staticmethod
    def get_for_current_view() -> PlayToManager: ...
    @typing.overload
    @staticmethod
    def show_play_to_u_i() -> None: ...
    @typing.overload
    def add_source_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToManager, PlayToSourceRequestedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_source_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_source_selected(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToManager, PlayToSourceSelectedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_source_selected(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class PlayToReceiver(_winrt.Object):
    supports_video: _winrt.Boolean
    supports_image: _winrt.Boolean
    supports_audio: _winrt.Boolean
    friendly_name: str
    properties: winsdk.windows.foundation.collections.IPropertySet
    @staticmethod
    def _from(obj: _winrt.Object) -> PlayToReceiver: ...
    @typing.overload
    def __init__(self) -> None: ...
    @typing.overload
    def notify_duration_change(self, duration: winsdk.windows.foundation.TimeSpan) -> None: ...
    @typing.overload
    def notify_ended(self) -> None: ...
    @typing.overload
    def notify_error(self) -> None: ...
    @typing.overload
    def notify_loaded_metadata(self) -> None: ...
    @typing.overload
    def notify_paused(self) -> None: ...
    @typing.overload
    def notify_playing(self) -> None: ...
    @typing.overload
    def notify_rate_change(self, rate: _winrt.Double) -> None: ...
    @typing.overload
    def notify_seeked(self) -> None: ...
    @typing.overload
    def notify_seeking(self) -> None: ...
    @typing.overload
    def notify_stopped(self) -> None: ...
    @typing.overload
    def notify_time_update(self, current_time: winsdk.windows.foundation.TimeSpan) -> None: ...
    @typing.overload
    def notify_volume_change(self, volume: _winrt.Double, mute: _winrt.Boolean) -> None: ...
    @typing.overload
    def start_async(self) -> winsdk.windows.foundation.IAsyncAction: ...
    @typing.overload
    def stop_async(self) -> winsdk.windows.foundation.IAsyncAction: ...
    @typing.overload
    def add_current_time_change_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToReceiver, CurrentTimeChangeRequestedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_current_time_change_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_mute_change_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToReceiver, MuteChangeRequestedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_mute_change_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_pause_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToReceiver, _winrt.Object]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_pause_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_play_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToReceiver, _winrt.Object]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_play_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_playback_rate_change_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToReceiver, PlaybackRateChangeRequestedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_playback_rate_change_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_source_change_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToReceiver, SourceChangeRequestedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_source_change_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_stop_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToReceiver, _winrt.Object]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_stop_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_time_update_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToReceiver, _winrt.Object]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_time_update_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    @typing.overload
    def add_volume_change_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToReceiver, VolumeChangeRequestedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    @typing.overload
    def remove_volume_change_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

class PlayToSource(_winrt.Object):
    next: PlayToSource
    connection: PlayToConnection
    preferred_source_uri: winsdk.windows.foundation.Uri
    @staticmethod
    def _from(obj: _winrt.Object) -> PlayToSource: ...
    @typing.overload
    def play_next(self) -> None: ...

class PlayToSourceDeferral(_winrt.Object):
    @staticmethod
    def _from(obj: _winrt.Object) -> PlayToSourceDeferral: ...
    @typing.overload
    def complete(self) -> None: ...

class PlayToSourceRequest(_winrt.Object):
    deadline: winsdk.windows.foundation.DateTime
    @staticmethod
    def _from(obj: _winrt.Object) -> PlayToSourceRequest: ...
    @typing.overload
    def display_error_string(self, error_string: str) -> None: ...
    @typing.overload
    def get_deferral(self) -> PlayToSourceDeferral: ...
    @typing.overload
    def set_source(self, value: PlayToSource) -> None: ...

class PlayToSourceRequestedEventArgs(_winrt.Object):
    source_request: PlayToSourceRequest
    @staticmethod
    def _from(obj: _winrt.Object) -> PlayToSourceRequestedEventArgs: ...

class PlayToSourceSelectedEventArgs(_winrt.Object):
    friendly_name: str
    icon: winsdk.windows.storage.streams.IRandomAccessStreamWithContentType
    supports_audio: _winrt.Boolean
    supports_image: _winrt.Boolean
    supports_video: _winrt.Boolean
    @staticmethod
    def _from(obj: _winrt.Object) -> PlayToSourceSelectedEventArgs: ...

class PlaybackRateChangeRequestedEventArgs(_winrt.Object):
    rate: _winrt.Double
    @staticmethod
    def _from(obj: _winrt.Object) -> PlaybackRateChangeRequestedEventArgs: ...

class SourceChangeRequestedEventArgs(_winrt.Object):
    album: str
    author: str
    date: typing.Optional[winsdk.windows.foundation.DateTime]
    description: str
    genre: str
    properties: winsdk.windows.foundation.collections.IMapView[str, _winrt.Object]
    rating: typing.Optional[_winrt.UInt32]
    stream: winsdk.windows.storage.streams.IRandomAccessStreamWithContentType
    thumbnail: winsdk.windows.storage.streams.IRandomAccessStreamReference
    title: str
    @staticmethod
    def _from(obj: _winrt.Object) -> SourceChangeRequestedEventArgs: ...

class VolumeChangeRequestedEventArgs(_winrt.Object):
    volume: _winrt.Double
    @staticmethod
    def _from(obj: _winrt.Object) -> VolumeChangeRequestedEventArgs: ...

