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

import enum
import datetime
import sys
import types
import typing

import winsdk.system
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(winsdk.system.Object):
    time: datetime.timedelta
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> CurrentTimeChangeRequestedEventArgs: ...

class MuteChangeRequestedEventArgs(winsdk.system.Object):
    mute: winsdk.system.Boolean
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> MuteChangeRequestedEventArgs: ...

class PlayToConnection(winsdk.system.Object):
    state: PlayToConnectionState
    @staticmethod
    def _from(obj: winsdk.system.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(winsdk.system.Object):
    code: PlayToConnectionError
    message: str
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PlayToConnectionErrorEventArgs: ...

class PlayToConnectionStateChangedEventArgs(winsdk.system.Object):
    current_state: PlayToConnectionState
    previous_state: PlayToConnectionState
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PlayToConnectionStateChangedEventArgs: ...

class PlayToConnectionTransferredEventArgs(winsdk.system.Object):
    current_source: typing.Optional[PlayToSource]
    previous_source: typing.Optional[PlayToSource]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PlayToConnectionTransferredEventArgs: ...

class PlayToManager(winsdk.system.Object):
    default_source_selection: winsdk.system.Boolean
    @staticmethod
    def _from(obj: winsdk.system.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(winsdk.system.Object):
    supports_video: winsdk.system.Boolean
    supports_image: winsdk.system.Boolean
    supports_audio: winsdk.system.Boolean
    friendly_name: str
    properties: typing.Optional[winsdk.windows.foundation.collections.IPropertySet]
    @staticmethod
    def _from(obj: winsdk.system.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: winsdk.system.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: winsdk.system.Double, mute: winsdk.system.Boolean, /) -> None: ...
    def start_async(self) -> winsdk.windows.foundation.IAsyncAction: ...
    def stop_async(self) -> 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, winsdk.system.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, winsdk.system.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, winsdk.system.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, winsdk.system.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(winsdk.system.Object):
    next: typing.Optional[PlayToSource]
    connection: typing.Optional[PlayToConnection]
    preferred_source_uri: typing.Optional[winsdk.windows.foundation.Uri]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PlayToSource: ...
    def play_next(self) -> None: ...

class PlayToSourceDeferral(winsdk.system.Object):
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PlayToSourceDeferral: ...
    def complete(self) -> None: ...

class PlayToSourceRequest(winsdk.system.Object):
    deadline: datetime.datetime
    @staticmethod
    def _from(obj: winsdk.system.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(winsdk.system.Object):
    source_request: typing.Optional[PlayToSourceRequest]
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PlayToSourceRequestedEventArgs: ...

class PlayToSourceSelectedEventArgs(winsdk.system.Object):
    friendly_name: str
    icon: typing.Optional[winsdk.windows.storage.streams.IRandomAccessStreamWithContentType]
    supports_audio: winsdk.system.Boolean
    supports_image: winsdk.system.Boolean
    supports_video: winsdk.system.Boolean
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PlayToSourceSelectedEventArgs: ...

class PlaybackRateChangeRequestedEventArgs(winsdk.system.Object):
    rate: winsdk.system.Double
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> PlaybackRateChangeRequestedEventArgs: ...

class SourceChangeRequestedEventArgs(winsdk.system.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, winsdk.system.Object]]
    rating: typing.Optional[typing.Optional[winsdk.system.UInt32]]
    stream: typing.Optional[winsdk.windows.storage.streams.IRandomAccessStreamWithContentType]
    thumbnail: typing.Optional[winsdk.windows.storage.streams.IRandomAccessStreamReference]
    title: str
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> SourceChangeRequestedEventArgs: ...

class VolumeChangeRequestedEventArgs(winsdk.system.Object):
    volume: winsdk.system.Double
    @staticmethod
    def _from(obj: winsdk.system.Object, /) -> VolumeChangeRequestedEventArgs: ...

