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

import enum
import datetime
import sys
import types
import typing

import winsdk._winrt as _winrt
import winsdk.windows.foundation
import winsdk.windows.foundation.collections
import winsdk.windows.storage.streams

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

Self = typing.TypeVar('Self')

class CurrentTimeChangeRequestedEventArgs(_winrt.Object):
    time: datetime.timedelta
    @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: ...
    def add_error(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToConnection, PlayToConnectionErrorEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_error(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    def add_state_changed(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToConnection, PlayToConnectionStateChangedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_state_changed(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    def add_transferred(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToConnection, PlayToConnectionTransferredEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    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: typing.Optional[PlayToSource]
    previous_source: typing.Optional[PlayToSource]
    @staticmethod
    def _from(obj: _winrt.Object) -> PlayToConnectionTransferredEventArgs: ...

class PlayToManager(_winrt.Object):
    default_source_selection: _winrt.Boolean
    @staticmethod
    def _from(obj: _winrt.Object) -> PlayToManager: ...
    @staticmethod
    def get_for_current_view() -> typing.Optional[PlayToManager]: ...
    @staticmethod
    def show_play_to_u_i() -> None: ...
    def add_source_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToManager, PlayToSourceRequestedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_source_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    def add_source_selected(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToManager, PlayToSourceSelectedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    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: typing.Optional[winsdk.windows.foundation.collections.IPropertySet]
    @staticmethod
    def _from(obj: _winrt.Object) -> PlayToReceiver: ...
    def __new__(cls: typing.Type[PlayToReceiver]) -> PlayToReceiver:...
    def notify_duration_change(self, duration: datetime.timedelta) -> None: ...
    def notify_ended(self) -> None: ...
    def notify_error(self) -> None: ...
    def notify_loaded_metadata(self) -> None: ...
    def notify_paused(self) -> None: ...
    def notify_playing(self) -> None: ...
    def notify_rate_change(self, rate: _winrt.Double) -> None: ...
    def notify_seeked(self) -> None: ...
    def notify_seeking(self) -> None: ...
    def notify_stopped(self) -> None: ...
    def notify_time_update(self, current_time: datetime.timedelta) -> None: ...
    def notify_volume_change(self, volume: _winrt.Double, mute: _winrt.Boolean) -> None: ...
    def start_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    def stop_async(self) -> typing.Optional[winsdk.windows.foundation.IAsyncAction]: ...
    def add_current_time_change_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToReceiver, CurrentTimeChangeRequestedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_current_time_change_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    def add_mute_change_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToReceiver, MuteChangeRequestedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_mute_change_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    def add_pause_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToReceiver, _winrt.Object]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_pause_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    def add_play_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToReceiver, _winrt.Object]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_play_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    def add_playback_rate_change_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToReceiver, PlaybackRateChangeRequestedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_playback_rate_change_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    def add_source_change_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToReceiver, SourceChangeRequestedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_source_change_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    def add_stop_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToReceiver, _winrt.Object]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_stop_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    def add_time_update_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToReceiver, _winrt.Object]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_time_update_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...
    def add_volume_change_requested(self, handler: winsdk.windows.foundation.TypedEventHandler[PlayToReceiver, VolumeChangeRequestedEventArgs]) -> winsdk.windows.foundation.EventRegistrationToken: ...
    def remove_volume_change_requested(self, token: winsdk.windows.foundation.EventRegistrationToken) -> None: ...

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

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

class PlayToSourceRequest(_winrt.Object):
    deadline: datetime.datetime
    @staticmethod
    def _from(obj: _winrt.Object) -> PlayToSourceRequest: ...
    def display_error_string(self, error_string: str) -> None: ...
    def get_deferral(self) -> typing.Optional[PlayToSourceDeferral]: ...
    def set_source(self, value: typing.Optional[PlayToSource]) -> None: ...

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

class PlayToSourceSelectedEventArgs(_winrt.Object):
    friendly_name: str
    icon: typing.Optional[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[typing.Optional[datetime.datetime]]
    description: str
    genre: str
    properties: typing.Optional[winsdk.windows.foundation.collections.IMapView[str, _winrt.Object]]
    rating: typing.Optional[typing.Optional[_winrt.UInt32]]
    stream: typing.Optional[winsdk.windows.storage.streams.IRandomAccessStreamWithContentType]
    thumbnail: typing.Optional[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: ...

