// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_Media_Playback_H #define WINRT_Windows_Media_Playback_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.250303.1"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.250303.1" #include "winrt/Windows.Media.h" #include "winrt/impl/Windows.Devices.Enumeration.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Foundation.Numerics.2.h" #include "winrt/impl/Windows.Graphics.DirectX.Direct3D11.2.h" #include "winrt/impl/Windows.Media.2.h" #include "winrt/impl/Windows.Media.Audio.2.h" #include "winrt/impl/Windows.Media.Casting.2.h" #include "winrt/impl/Windows.Media.Core.2.h" #include "winrt/impl/Windows.Media.MediaProperties.2.h" #include "winrt/impl/Windows.Media.Protection.2.h" #include "winrt/impl/Windows.Storage.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Windows.UI.Composition.2.h" #include "winrt/impl/Windows.Media.Playback.2.h" namespace winrt::impl { template auto consume_Windows_Media_Playback_IBackgroundMediaPlayerStatics::Current() const { void* player{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Current(&player)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Current(&player)); } return winrt::Windows::Media::Playback::MediaPlayer{ player, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IBackgroundMediaPlayerStatics::MessageReceivedFromBackground(winrt::Windows::Foundation::EventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_MessageReceivedFromBackground(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_MessageReceivedFromBackground(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IBackgroundMediaPlayerStatics::MessageReceivedFromBackground(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) const { return impl::make_event_revoker(this, MessageReceivedFromBackground(value)); } template auto consume_Windows_Media_Playback_IBackgroundMediaPlayerStatics::MessageReceivedFromBackground(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_MessageReceivedFromBackground(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_MessageReceivedFromBackground(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IBackgroundMediaPlayerStatics::MessageReceivedFromForeground(winrt::Windows::Foundation::EventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_MessageReceivedFromForeground(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_MessageReceivedFromForeground(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IBackgroundMediaPlayerStatics::MessageReceivedFromForeground(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) const { return impl::make_event_revoker(this, MessageReceivedFromForeground(value)); } template auto consume_Windows_Media_Playback_IBackgroundMediaPlayerStatics::MessageReceivedFromForeground(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_MessageReceivedFromForeground(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_MessageReceivedFromForeground(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IBackgroundMediaPlayerStatics::SendMessageToBackground(winrt::Windows::Foundation::Collections::ValueSet const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SendMessageToBackground(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SendMessageToBackground(*(void**)(&value))); } } template auto consume_Windows_Media_Playback_IBackgroundMediaPlayerStatics::SendMessageToForeground(winrt::Windows::Foundation::Collections::ValueSet const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SendMessageToForeground(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SendMessageToForeground(*(void**)(&value))); } } template auto consume_Windows_Media_Playback_IBackgroundMediaPlayerStatics::IsMediaPlaying() const { bool isMediaPlaying{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->IsMediaPlaying(&isMediaPlaying)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IsMediaPlaying(&isMediaPlaying)); } return isMediaPlaying; } template auto consume_Windows_Media_Playback_IBackgroundMediaPlayerStatics::Shutdown() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Shutdown()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Shutdown()); } } template auto consume_Windows_Media_Playback_ICurrentMediaPlaybackItemChangedEventArgs::NewItem() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_NewItem(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NewItem(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackItem{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_ICurrentMediaPlaybackItemChangedEventArgs::OldItem() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_OldItem(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_OldItem(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackItem{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_ICurrentMediaPlaybackItemChangedEventArgs2::Reason() const { winrt::Windows::Media::Playback::MediaPlaybackItemChangedReason value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Reason(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Reason(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Playback_IMediaBreak::PlaybackList() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PlaybackList(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PlaybackList(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackList{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaBreak::PresentationPosition() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PresentationPosition(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PresentationPosition(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaBreak::InsertionMethod() const { winrt::Windows::Media::Playback::MediaBreakInsertionMethod value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_InsertionMethod(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InsertionMethod(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Playback_IMediaBreak::CustomProperties() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CustomProperties(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CustomProperties(&value)); } return winrt::Windows::Foundation::Collections::ValueSet{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaBreak::CanStart() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CanStart(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CanStart(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaBreak::CanStart(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_CanStart(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_CanStart(value)); } } template auto consume_Windows_Media_Playback_IMediaBreakEndedEventArgs::MediaBreak() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_MediaBreak(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MediaBreak(&value)); } return winrt::Windows::Media::Playback::MediaBreak{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaBreakFactory::Create(winrt::Windows::Media::Playback::MediaBreakInsertionMethod const& insertionMethod) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(static_cast(insertionMethod), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(static_cast(insertionMethod), &result)); } return winrt::Windows::Media::Playback::MediaBreak{ result, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaBreakFactory::CreateWithPresentationPosition(winrt::Windows::Media::Playback::MediaBreakInsertionMethod const& insertionMethod, winrt::Windows::Foundation::TimeSpan const& presentationPosition) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateWithPresentationPosition(static_cast(insertionMethod), impl::bind_in(presentationPosition), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithPresentationPosition(static_cast(insertionMethod), impl::bind_in(presentationPosition), &result)); } return winrt::Windows::Media::Playback::MediaBreak{ result, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaBreakManager::BreaksSeekedOver(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_BreaksSeekedOver(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_BreaksSeekedOver(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaBreakManager::BreaksSeekedOver(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, BreaksSeekedOver(handler)); } template auto consume_Windows_Media_Playback_IMediaBreakManager::BreaksSeekedOver(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_BreaksSeekedOver(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_BreaksSeekedOver(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaBreakManager::BreakStarted(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_BreakStarted(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_BreakStarted(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaBreakManager::BreakStarted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, BreakStarted(handler)); } template auto consume_Windows_Media_Playback_IMediaBreakManager::BreakStarted(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_BreakStarted(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_BreakStarted(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaBreakManager::BreakEnded(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_BreakEnded(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_BreakEnded(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaBreakManager::BreakEnded(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, BreakEnded(handler)); } template auto consume_Windows_Media_Playback_IMediaBreakManager::BreakEnded(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_BreakEnded(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_BreakEnded(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaBreakManager::BreakSkipped(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_BreakSkipped(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_BreakSkipped(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaBreakManager::BreakSkipped(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, BreakSkipped(handler)); } template auto consume_Windows_Media_Playback_IMediaBreakManager::BreakSkipped(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_BreakSkipped(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_BreakSkipped(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaBreakManager::CurrentBreak() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CurrentBreak(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CurrentBreak(&value)); } return winrt::Windows::Media::Playback::MediaBreak{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaBreakManager::PlaybackSession() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PlaybackSession(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PlaybackSession(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackSession{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaBreakManager::PlayBreak(winrt::Windows::Media::Playback::MediaBreak const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->PlayBreak(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->PlayBreak(*(void**)(&value))); } } template auto consume_Windows_Media_Playback_IMediaBreakManager::SkipCurrentBreak() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SkipCurrentBreak()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SkipCurrentBreak()); } } template auto consume_Windows_Media_Playback_IMediaBreakSchedule::ScheduleChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_ScheduleChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ScheduleChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaBreakSchedule::ScheduleChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ScheduleChanged(handler)); } template auto consume_Windows_Media_Playback_IMediaBreakSchedule::ScheduleChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_ScheduleChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ScheduleChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaBreakSchedule::InsertMidrollBreak(winrt::Windows::Media::Playback::MediaBreak const& mediaBreak) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->InsertMidrollBreak(*(void**)(&mediaBreak))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->InsertMidrollBreak(*(void**)(&mediaBreak))); } } template auto consume_Windows_Media_Playback_IMediaBreakSchedule::RemoveMidrollBreak(winrt::Windows::Media::Playback::MediaBreak const& mediaBreak) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RemoveMidrollBreak(*(void**)(&mediaBreak))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RemoveMidrollBreak(*(void**)(&mediaBreak))); } } template auto consume_Windows_Media_Playback_IMediaBreakSchedule::MidrollBreaks() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_MidrollBreaks(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MidrollBreaks(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaBreakSchedule::PrerollBreak(winrt::Windows::Media::Playback::MediaBreak const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_PrerollBreak(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PrerollBreak(*(void**)(&value))); } } template auto consume_Windows_Media_Playback_IMediaBreakSchedule::PrerollBreak() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PrerollBreak(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PrerollBreak(&value)); } return winrt::Windows::Media::Playback::MediaBreak{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaBreakSchedule::PostrollBreak(winrt::Windows::Media::Playback::MediaBreak const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_PostrollBreak(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PostrollBreak(*(void**)(&value))); } } template auto consume_Windows_Media_Playback_IMediaBreakSchedule::PostrollBreak() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PostrollBreak(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PostrollBreak(&value)); } return winrt::Windows::Media::Playback::MediaBreak{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaBreakSchedule::PlaybackItem() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PlaybackItem(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PlaybackItem(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackItem{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaBreakSeekedOverEventArgs::SeekedOverBreaks() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SeekedOverBreaks(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SeekedOverBreaks(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaBreakSeekedOverEventArgs::OldPosition() const { winrt::Windows::Foundation::TimeSpan value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_OldPosition(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_OldPosition(put_abi(value))); } return value; } template auto consume_Windows_Media_Playback_IMediaBreakSeekedOverEventArgs::NewPosition() const { winrt::Windows::Foundation::TimeSpan value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_NewPosition(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NewPosition(put_abi(value))); } return value; } template auto consume_Windows_Media_Playback_IMediaBreakSkippedEventArgs::MediaBreak() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_MediaBreak(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MediaBreak(&value)); } return winrt::Windows::Media::Playback::MediaBreak{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaBreakStartedEventArgs::MediaBreak() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_MediaBreak(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MediaBreak(&value)); } return winrt::Windows::Media::Playback::MediaBreak{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaEnginePlaybackSource::CurrentItem() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CurrentItem(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CurrentItem(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackItem{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaEnginePlaybackSource::SetPlaybackSource(winrt::Windows::Media::Playback::IMediaPlaybackSource const& source) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetPlaybackSource(*(void**)(&source))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetPlaybackSource(*(void**)(&source))); } } template auto consume_Windows_Media_Playback_IMediaItemDisplayProperties::Type() const { winrt::Windows::Media::MediaPlaybackType value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Type(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Type(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Playback_IMediaItemDisplayProperties::Type(winrt::Windows::Media::MediaPlaybackType const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Type(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Type(static_cast(value))); } } template auto consume_Windows_Media_Playback_IMediaItemDisplayProperties::MusicProperties() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_MusicProperties(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MusicProperties(&value)); } return winrt::Windows::Media::MusicDisplayProperties{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaItemDisplayProperties::VideoProperties() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_VideoProperties(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_VideoProperties(&value)); } return winrt::Windows::Media::VideoDisplayProperties{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaItemDisplayProperties::Thumbnail() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Thumbnail(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Thumbnail(&value)); } return winrt::Windows::Storage::Streams::RandomAccessStreamReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaItemDisplayProperties::Thumbnail(winrt::Windows::Storage::Streams::RandomAccessStreamReference const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Thumbnail(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Thumbnail(*(void**)(&value))); } } template auto consume_Windows_Media_Playback_IMediaItemDisplayProperties::ClearAll() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ClearAll()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ClearAll()); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::IsEnabled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsEnabled(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::IsEnabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_IsEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsEnabled(value)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::MediaPlayer() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_MediaPlayer(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MediaPlayer(&value)); } return winrt::Windows::Media::Playback::MediaPlayer{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::PlayBehavior() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PlayBehavior(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PlayBehavior(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::PauseBehavior() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PauseBehavior(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PauseBehavior(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::NextBehavior() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_NextBehavior(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NextBehavior(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::PreviousBehavior() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PreviousBehavior(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PreviousBehavior(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::FastForwardBehavior() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_FastForwardBehavior(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FastForwardBehavior(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::RewindBehavior() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_RewindBehavior(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RewindBehavior(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::ShuffleBehavior() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ShuffleBehavior(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ShuffleBehavior(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::AutoRepeatModeBehavior() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AutoRepeatModeBehavior(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AutoRepeatModeBehavior(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::PositionBehavior() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PositionBehavior(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PositionBehavior(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::RateBehavior() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_RateBehavior(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RateBehavior(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackCommandManagerCommandBehavior{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::PlayReceived(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PlayReceived(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PlayReceived(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::PlayReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PlayReceived(handler)); } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::PlayReceived(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PlayReceived(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PlayReceived(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::PauseReceived(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PauseReceived(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PauseReceived(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::PauseReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PauseReceived(handler)); } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::PauseReceived(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PauseReceived(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PauseReceived(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::NextReceived(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_NextReceived(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_NextReceived(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::NextReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, NextReceived(handler)); } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::NextReceived(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_NextReceived(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_NextReceived(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::PreviousReceived(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PreviousReceived(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PreviousReceived(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::PreviousReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PreviousReceived(handler)); } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::PreviousReceived(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PreviousReceived(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PreviousReceived(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::FastForwardReceived(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_FastForwardReceived(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_FastForwardReceived(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::FastForwardReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, FastForwardReceived(handler)); } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::FastForwardReceived(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_FastForwardReceived(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_FastForwardReceived(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::RewindReceived(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_RewindReceived(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_RewindReceived(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::RewindReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, RewindReceived(handler)); } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::RewindReceived(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_RewindReceived(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_RewindReceived(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::ShuffleReceived(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_ShuffleReceived(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ShuffleReceived(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::ShuffleReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ShuffleReceived(handler)); } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::ShuffleReceived(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_ShuffleReceived(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ShuffleReceived(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::AutoRepeatModeReceived(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_AutoRepeatModeReceived(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_AutoRepeatModeReceived(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::AutoRepeatModeReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, AutoRepeatModeReceived(handler)); } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::AutoRepeatModeReceived(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_AutoRepeatModeReceived(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_AutoRepeatModeReceived(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::PositionReceived(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PositionReceived(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PositionReceived(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::PositionReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PositionReceived(handler)); } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::PositionReceived(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PositionReceived(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PositionReceived(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::RateReceived(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_RateReceived(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_RateReceived(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::RateReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, RateReceived(handler)); } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManager::RateReceived(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_RateReceived(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_RateReceived(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs::Handled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Handled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Handled(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs::Handled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Handled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Handled(value)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs::AutoRepeatMode() const { winrt::Windows::Media::MediaPlaybackAutoRepeatMode value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AutoRepeatMode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AutoRepeatMode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerAutoRepeatModeReceivedEventArgs::GetDeferral() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDeferral(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&value)); } return winrt::Windows::Foundation::Deferral{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerCommandBehavior::CommandManager() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CommandManager(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CommandManager(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackCommandManager{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerCommandBehavior::IsEnabled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsEnabled(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerCommandBehavior::EnablingRule() const { winrt::Windows::Media::Playback::MediaCommandEnablingRule value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_EnablingRule(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_EnablingRule(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerCommandBehavior::EnablingRule(winrt::Windows::Media::Playback::MediaCommandEnablingRule const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_EnablingRule(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_EnablingRule(static_cast(value))); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerCommandBehavior::IsEnabledChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_IsEnabledChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_IsEnabledChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerCommandBehavior::IsEnabledChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, IsEnabledChanged(handler)); } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerCommandBehavior::IsEnabledChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_IsEnabledChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_IsEnabledChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerFastForwardReceivedEventArgs::Handled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Handled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Handled(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerFastForwardReceivedEventArgs::Handled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Handled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Handled(value)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerFastForwardReceivedEventArgs::GetDeferral() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDeferral(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&value)); } return winrt::Windows::Foundation::Deferral{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerNextReceivedEventArgs::Handled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Handled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Handled(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerNextReceivedEventArgs::Handled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Handled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Handled(value)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerNextReceivedEventArgs::GetDeferral() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDeferral(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&value)); } return winrt::Windows::Foundation::Deferral{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerPauseReceivedEventArgs::Handled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Handled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Handled(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerPauseReceivedEventArgs::Handled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Handled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Handled(value)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerPauseReceivedEventArgs::GetDeferral() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDeferral(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&value)); } return winrt::Windows::Foundation::Deferral{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerPlayReceivedEventArgs::Handled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Handled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Handled(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerPlayReceivedEventArgs::Handled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Handled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Handled(value)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerPlayReceivedEventArgs::GetDeferral() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDeferral(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&value)); } return winrt::Windows::Foundation::Deferral{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerPositionReceivedEventArgs::Handled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Handled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Handled(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerPositionReceivedEventArgs::Handled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Handled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Handled(value)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerPositionReceivedEventArgs::Position() const { winrt::Windows::Foundation::TimeSpan value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Position(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Position(put_abi(value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerPositionReceivedEventArgs::GetDeferral() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDeferral(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&value)); } return winrt::Windows::Foundation::Deferral{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerPreviousReceivedEventArgs::Handled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Handled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Handled(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerPreviousReceivedEventArgs::Handled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Handled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Handled(value)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerPreviousReceivedEventArgs::GetDeferral() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDeferral(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&value)); } return winrt::Windows::Foundation::Deferral{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerRateReceivedEventArgs::Handled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Handled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Handled(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerRateReceivedEventArgs::Handled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Handled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Handled(value)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerRateReceivedEventArgs::PlaybackRate() const { double value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PlaybackRate(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PlaybackRate(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerRateReceivedEventArgs::GetDeferral() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDeferral(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&value)); } return winrt::Windows::Foundation::Deferral{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerRewindReceivedEventArgs::Handled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Handled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Handled(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerRewindReceivedEventArgs::Handled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Handled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Handled(value)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerRewindReceivedEventArgs::GetDeferral() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDeferral(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&value)); } return winrt::Windows::Foundation::Deferral{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerShuffleReceivedEventArgs::Handled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Handled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Handled(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerShuffleReceivedEventArgs::Handled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Handled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Handled(value)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerShuffleReceivedEventArgs::IsShuffleRequested() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsShuffleRequested(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsShuffleRequested(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackCommandManagerShuffleReceivedEventArgs::GetDeferral() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDeferral(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&value)); } return winrt::Windows::Foundation::Deferral{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackItem::AudioTracksChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_AudioTracksChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_AudioTracksChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackItem::AudioTracksChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, AudioTracksChanged(handler)); } template auto consume_Windows_Media_Playback_IMediaPlaybackItem::AudioTracksChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_AudioTracksChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_AudioTracksChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackItem::VideoTracksChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_VideoTracksChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_VideoTracksChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackItem::VideoTracksChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, VideoTracksChanged(handler)); } template auto consume_Windows_Media_Playback_IMediaPlaybackItem::VideoTracksChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_VideoTracksChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_VideoTracksChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackItem::TimedMetadataTracksChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_TimedMetadataTracksChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_TimedMetadataTracksChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackItem::TimedMetadataTracksChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, TimedMetadataTracksChanged(handler)); } template auto consume_Windows_Media_Playback_IMediaPlaybackItem::TimedMetadataTracksChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_TimedMetadataTracksChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_TimedMetadataTracksChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackItem::Source() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Source(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Source(&value)); } return winrt::Windows::Media::Core::MediaSource{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackItem::AudioTracks() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AudioTracks(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AudioTracks(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackAudioTrackList{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackItem::VideoTracks() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_VideoTracks(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_VideoTracks(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackVideoTrackList{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackItem::TimedMetadataTracks() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_TimedMetadataTracks(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TimedMetadataTracks(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackTimedMetadataTrackList{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackItem2::BreakSchedule() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_BreakSchedule(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BreakSchedule(&value)); } return winrt::Windows::Media::Playback::MediaBreakSchedule{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackItem2::StartTime() const { winrt::Windows::Foundation::TimeSpan value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_StartTime(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_StartTime(put_abi(value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackItem2::DurationLimit() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_DurationLimit(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DurationLimit(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackItem2::CanSkip() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CanSkip(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CanSkip(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackItem2::CanSkip(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_CanSkip(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_CanSkip(value)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackItem2::GetDisplayProperties() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDisplayProperties(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDisplayProperties(&value)); } return winrt::Windows::Media::Playback::MediaItemDisplayProperties{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackItem2::ApplyDisplayProperties(winrt::Windows::Media::Playback::MediaItemDisplayProperties const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->ApplyDisplayProperties(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ApplyDisplayProperties(*(void**)(&value))); } } template auto consume_Windows_Media_Playback_IMediaPlaybackItem3::IsDisabledInPlaybackList() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsDisabledInPlaybackList(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsDisabledInPlaybackList(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackItem3::IsDisabledInPlaybackList(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_IsDisabledInPlaybackList(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsDisabledInPlaybackList(value)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackItem3::TotalDownloadProgress() const { double value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_TotalDownloadProgress(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TotalDownloadProgress(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackItem3::AutoLoadedDisplayProperties() const { winrt::Windows::Media::Playback::AutoLoadedDisplayPropertyKind value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AutoLoadedDisplayProperties(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AutoLoadedDisplayProperties(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackItem3::AutoLoadedDisplayProperties(winrt::Windows::Media::Playback::AutoLoadedDisplayPropertyKind const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AutoLoadedDisplayProperties(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AutoLoadedDisplayProperties(static_cast(value))); } } template auto consume_Windows_Media_Playback_IMediaPlaybackItemError::ErrorCode() const { winrt::Windows::Media::Playback::MediaPlaybackItemErrorCode value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ErrorCode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ErrorCode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackItemError::ExtendedError() const { winrt::hresult value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExtendedError(put_abi(value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackItemFactory::Create(winrt::Windows::Media::Core::MediaSource const& source) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(*(void**)(&source), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(*(void**)(&source), &value)); } return winrt::Windows::Media::Playback::MediaPlaybackItem{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackItemFactory2::CreateWithStartTime(winrt::Windows::Media::Core::MediaSource const& source, winrt::Windows::Foundation::TimeSpan const& startTime) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateWithStartTime(*(void**)(&source), impl::bind_in(startTime), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithStartTime(*(void**)(&source), impl::bind_in(startTime), &result)); } return winrt::Windows::Media::Playback::MediaPlaybackItem{ result, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackItemFactory2::CreateWithStartTimeAndDurationLimit(winrt::Windows::Media::Core::MediaSource const& source, winrt::Windows::Foundation::TimeSpan const& startTime, winrt::Windows::Foundation::TimeSpan const& durationLimit) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateWithStartTimeAndDurationLimit(*(void**)(&source), impl::bind_in(startTime), impl::bind_in(durationLimit), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateWithStartTimeAndDurationLimit(*(void**)(&source), impl::bind_in(startTime), impl::bind_in(durationLimit), &result)); } return winrt::Windows::Media::Playback::MediaPlaybackItem{ result, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackItemFailedEventArgs::Item() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Item(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Item(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackItem{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackItemFailedEventArgs::Error() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Error(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Error(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackItemError{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackItemOpenedEventArgs::Item() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Item(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Item(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackItem{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackItemStatics::FindFromMediaSource(winrt::Windows::Media::Core::MediaSource const& source) const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FindFromMediaSource(*(void**)(&source), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FindFromMediaSource(*(void**)(&source), &value)); } return winrt::Windows::Media::Playback::MediaPlaybackItem{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackList::ItemFailed(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_ItemFailed(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ItemFailed(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackList::ItemFailed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ItemFailed(handler)); } template auto consume_Windows_Media_Playback_IMediaPlaybackList::ItemFailed(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_ItemFailed(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ItemFailed(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackList::CurrentItemChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_CurrentItemChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_CurrentItemChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackList::CurrentItemChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, CurrentItemChanged(handler)); } template auto consume_Windows_Media_Playback_IMediaPlaybackList::CurrentItemChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_CurrentItemChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_CurrentItemChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackList::ItemOpened(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_ItemOpened(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ItemOpened(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackList::ItemOpened(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ItemOpened(handler)); } template auto consume_Windows_Media_Playback_IMediaPlaybackList::ItemOpened(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_ItemOpened(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ItemOpened(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackList::Items() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Items(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Items(&value)); } return winrt::Windows::Foundation::Collections::IObservableVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackList::AutoRepeatEnabled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AutoRepeatEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AutoRepeatEnabled(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackList::AutoRepeatEnabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AutoRepeatEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AutoRepeatEnabled(value)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackList::ShuffleEnabled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ShuffleEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ShuffleEnabled(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackList::ShuffleEnabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_ShuffleEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ShuffleEnabled(value)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackList::CurrentItem() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CurrentItem(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CurrentItem(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackItem{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackList::CurrentItemIndex() const { uint32_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CurrentItemIndex(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CurrentItemIndex(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackList::MoveNext() const { void* item{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->MoveNext(&item)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->MoveNext(&item)); } return winrt::Windows::Media::Playback::MediaPlaybackItem{ item, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackList::MovePrevious() const { void* item{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->MovePrevious(&item)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->MovePrevious(&item)); } return winrt::Windows::Media::Playback::MediaPlaybackItem{ item, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackList::MoveTo(uint32_t itemIndex) const { void* item{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->MoveTo(itemIndex, &item)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->MoveTo(itemIndex, &item)); } return winrt::Windows::Media::Playback::MediaPlaybackItem{ item, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackList2::MaxPrefetchTime() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_MaxPrefetchTime(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MaxPrefetchTime(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackList2::MaxPrefetchTime(winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_MaxPrefetchTime(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_MaxPrefetchTime(*(void**)(&value))); } } template auto consume_Windows_Media_Playback_IMediaPlaybackList2::StartingItem() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_StartingItem(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_StartingItem(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackItem{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackList2::StartingItem(winrt::Windows::Media::Playback::MediaPlaybackItem const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_StartingItem(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_StartingItem(*(void**)(&value))); } } template auto consume_Windows_Media_Playback_IMediaPlaybackList2::ShuffledItems() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ShuffledItems(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ShuffledItems(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackList2::SetShuffledItems(param::iterable const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetShuffledItems(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetShuffledItems(*(void**)(&value))); } } template auto consume_Windows_Media_Playback_IMediaPlaybackList3::MaxPlayedItemsToKeepOpen() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_MaxPlayedItemsToKeepOpen(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MaxPlayedItemsToKeepOpen(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackList3::MaxPlayedItemsToKeepOpen(winrt::Windows::Foundation::IReference const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_MaxPlayedItemsToKeepOpen(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_MaxPlayedItemsToKeepOpen(*(void**)(&value))); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::PlaybackStateChanged(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PlaybackStateChanged(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PlaybackStateChanged(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::PlaybackStateChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, PlaybackStateChanged(value)); } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::PlaybackStateChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PlaybackStateChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PlaybackStateChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::PlaybackRateChanged(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PlaybackRateChanged(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PlaybackRateChanged(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::PlaybackRateChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, PlaybackRateChanged(value)); } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::PlaybackRateChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PlaybackRateChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PlaybackRateChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::SeekCompleted(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_SeekCompleted(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_SeekCompleted(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::SeekCompleted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, SeekCompleted(value)); } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::SeekCompleted(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_SeekCompleted(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_SeekCompleted(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::BufferingStarted(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_BufferingStarted(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_BufferingStarted(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::BufferingStarted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, BufferingStarted(value)); } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::BufferingStarted(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_BufferingStarted(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_BufferingStarted(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::BufferingEnded(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_BufferingEnded(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_BufferingEnded(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::BufferingEnded(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, BufferingEnded(value)); } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::BufferingEnded(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_BufferingEnded(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_BufferingEnded(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::BufferingProgressChanged(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_BufferingProgressChanged(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_BufferingProgressChanged(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::BufferingProgressChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, BufferingProgressChanged(value)); } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::BufferingProgressChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_BufferingProgressChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_BufferingProgressChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::DownloadProgressChanged(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_DownloadProgressChanged(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_DownloadProgressChanged(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::DownloadProgressChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, DownloadProgressChanged(value)); } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::DownloadProgressChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_DownloadProgressChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_DownloadProgressChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::NaturalDurationChanged(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_NaturalDurationChanged(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_NaturalDurationChanged(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::NaturalDurationChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, NaturalDurationChanged(value)); } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::NaturalDurationChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_NaturalDurationChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_NaturalDurationChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::PositionChanged(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PositionChanged(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PositionChanged(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::PositionChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, PositionChanged(value)); } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::PositionChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PositionChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PositionChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::NaturalVideoSizeChanged(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_NaturalVideoSizeChanged(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_NaturalVideoSizeChanged(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::NaturalVideoSizeChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, NaturalVideoSizeChanged(value)); } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::NaturalVideoSizeChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_NaturalVideoSizeChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_NaturalVideoSizeChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::MediaPlayer() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_MediaPlayer(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MediaPlayer(&value)); } return winrt::Windows::Media::Playback::MediaPlayer{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::NaturalDuration() const { winrt::Windows::Foundation::TimeSpan value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_NaturalDuration(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NaturalDuration(put_abi(value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::Position() const { winrt::Windows::Foundation::TimeSpan value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Position(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Position(put_abi(value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::Position(winrt::Windows::Foundation::TimeSpan const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Position(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Position(impl::bind_in(value))); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::PlaybackState() const { winrt::Windows::Media::Playback::MediaPlaybackState value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PlaybackState(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PlaybackState(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::CanSeek() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CanSeek(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CanSeek(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::CanPause() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CanPause(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CanPause(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::IsProtected() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsProtected(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsProtected(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::PlaybackRate() const { double value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PlaybackRate(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PlaybackRate(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::PlaybackRate(double value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_PlaybackRate(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PlaybackRate(value)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::BufferingProgress() const { double value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_BufferingProgress(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BufferingProgress(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::DownloadProgress() const { double value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_DownloadProgress(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DownloadProgress(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::NaturalVideoHeight() const { uint32_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_NaturalVideoHeight(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NaturalVideoHeight(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::NaturalVideoWidth() const { uint32_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_NaturalVideoWidth(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NaturalVideoWidth(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::NormalizedSourceRect() const { winrt::Windows::Foundation::Rect value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_NormalizedSourceRect(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NormalizedSourceRect(put_abi(value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::NormalizedSourceRect(winrt::Windows::Foundation::Rect const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_NormalizedSourceRect(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_NormalizedSourceRect(impl::bind_in(value))); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::StereoscopicVideoPackingMode() const { winrt::Windows::Media::MediaProperties::StereoscopicVideoPackingMode value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_StereoscopicVideoPackingMode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_StereoscopicVideoPackingMode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession::StereoscopicVideoPackingMode(winrt::Windows::Media::MediaProperties::StereoscopicVideoPackingMode const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_StereoscopicVideoPackingMode(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_StereoscopicVideoPackingMode(static_cast(value))); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession2::BufferedRangesChanged(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_BufferedRangesChanged(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_BufferedRangesChanged(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession2::BufferedRangesChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, BufferedRangesChanged(value)); } template auto consume_Windows_Media_Playback_IMediaPlaybackSession2::BufferedRangesChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_BufferedRangesChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_BufferedRangesChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession2::PlayedRangesChanged(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PlayedRangesChanged(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PlayedRangesChanged(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession2::PlayedRangesChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, PlayedRangesChanged(value)); } template auto consume_Windows_Media_Playback_IMediaPlaybackSession2::PlayedRangesChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PlayedRangesChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PlayedRangesChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession2::SeekableRangesChanged(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_SeekableRangesChanged(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_SeekableRangesChanged(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession2::SeekableRangesChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, SeekableRangesChanged(value)); } template auto consume_Windows_Media_Playback_IMediaPlaybackSession2::SeekableRangesChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_SeekableRangesChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_SeekableRangesChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession2::SupportedPlaybackRatesChanged(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_SupportedPlaybackRatesChanged(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_SupportedPlaybackRatesChanged(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession2::SupportedPlaybackRatesChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, SupportedPlaybackRatesChanged(value)); } template auto consume_Windows_Media_Playback_IMediaPlaybackSession2::SupportedPlaybackRatesChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_SupportedPlaybackRatesChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_SupportedPlaybackRatesChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession2::SphericalVideoProjection() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SphericalVideoProjection(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SphericalVideoProjection(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackSphericalVideoProjection{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession2::IsMirroring() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsMirroring(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsMirroring(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession2::IsMirroring(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_IsMirroring(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsMirroring(value)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession2::GetBufferedRanges() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetBufferedRanges(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetBufferedRanges(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession2::GetPlayedRanges() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetPlayedRanges(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetPlayedRanges(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession2::GetSeekableRanges() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetSeekableRanges(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetSeekableRanges(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession2::IsSupportedPlaybackRateRange(double rate1, double rate2) const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->IsSupportedPlaybackRateRange(rate1, rate2, &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->IsSupportedPlaybackRateRange(rate1, rate2, &value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession3::PlaybackRotation() const { winrt::Windows::Media::MediaProperties::MediaRotation value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PlaybackRotation(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PlaybackRotation(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSession3::PlaybackRotation(winrt::Windows::Media::MediaProperties::MediaRotation const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_PlaybackRotation(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PlaybackRotation(static_cast(value))); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSession3::GetOutputDegradationPolicyState() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetOutputDegradationPolicyState(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetOutputDegradationPolicyState(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackSessionOutputDegradationPolicyState{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlaybackSessionBufferingStartedEventArgs::IsPlaybackInterruption() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsPlaybackInterruption(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsPlaybackInterruption(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSessionOutputDegradationPolicyState::VideoConstrictionReason() const { winrt::Windows::Media::Playback::MediaPlaybackSessionVideoConstrictionReason value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_VideoConstrictionReason(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_VideoConstrictionReason(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSphericalVideoProjection::IsEnabled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsEnabled(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSphericalVideoProjection::IsEnabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_IsEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsEnabled(value)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSphericalVideoProjection::FrameFormat() const { winrt::Windows::Media::MediaProperties::SphericalVideoFrameFormat value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_FrameFormat(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FrameFormat(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSphericalVideoProjection::FrameFormat(winrt::Windows::Media::MediaProperties::SphericalVideoFrameFormat const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_FrameFormat(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_FrameFormat(static_cast(value))); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSphericalVideoProjection::HorizontalFieldOfViewInDegrees() const { double value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_HorizontalFieldOfViewInDegrees(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HorizontalFieldOfViewInDegrees(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSphericalVideoProjection::HorizontalFieldOfViewInDegrees(double value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_HorizontalFieldOfViewInDegrees(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_HorizontalFieldOfViewInDegrees(value)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSphericalVideoProjection::ViewOrientation() const { winrt::Windows::Foundation::Numerics::quaternion value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ViewOrientation(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ViewOrientation(put_abi(value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSphericalVideoProjection::ViewOrientation(winrt::Windows::Foundation::Numerics::quaternion const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_ViewOrientation(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ViewOrientation(impl::bind_in(value))); } } template auto consume_Windows_Media_Playback_IMediaPlaybackSphericalVideoProjection::ProjectionMode() const { winrt::Windows::Media::Playback::SphericalVideoProjectionMode value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ProjectionMode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProjectionMode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackSphericalVideoProjection::ProjectionMode(winrt::Windows::Media::Playback::SphericalVideoProjectionMode const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_ProjectionMode(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ProjectionMode(static_cast(value))); } } template auto consume_Windows_Media_Playback_IMediaPlaybackTimedMetadataTrackList::PresentationModeChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PresentationModeChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PresentationModeChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlaybackTimedMetadataTrackList::PresentationModeChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PresentationModeChanged(handler)); } template auto consume_Windows_Media_Playback_IMediaPlaybackTimedMetadataTrackList::PresentationModeChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PresentationModeChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PresentationModeChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlaybackTimedMetadataTrackList::GetPresentationMode(uint32_t index) const { winrt::Windows::Media::Playback::TimedMetadataTrackPresentationMode value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetPresentationMode(index, reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetPresentationMode(index, reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlaybackTimedMetadataTrackList::SetPresentationMode(uint32_t index, winrt::Windows::Media::Playback::TimedMetadataTrackPresentationMode const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetPresentationMode(index, static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetPresentationMode(index, static_cast(value))); } } template auto consume_Windows_Media_Playback_IMediaPlayer::AutoPlay() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AutoPlay(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AutoPlay(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayer::AutoPlay(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AutoPlay(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AutoPlay(value)); } } template auto consume_Windows_Media_Playback_IMediaPlayer::NaturalDuration() const { winrt::Windows::Foundation::TimeSpan value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_NaturalDuration(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NaturalDuration(put_abi(value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayer::Position() const { winrt::Windows::Foundation::TimeSpan value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Position(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Position(put_abi(value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayer::Position(winrt::Windows::Foundation::TimeSpan const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Position(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Position(impl::bind_in(value))); } } template auto consume_Windows_Media_Playback_IMediaPlayer::BufferingProgress() const { double value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_BufferingProgress(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BufferingProgress(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayer::CurrentState() const { winrt::Windows::Media::Playback::MediaPlayerState value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CurrentState(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CurrentState(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayer::CanSeek() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CanSeek(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CanSeek(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayer::CanPause() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CanPause(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CanPause(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayer::IsLoopingEnabled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsLoopingEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsLoopingEnabled(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayer::IsLoopingEnabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_IsLoopingEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsLoopingEnabled(value)); } } template auto consume_Windows_Media_Playback_IMediaPlayer::IsProtected() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsProtected(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsProtected(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayer::IsMuted() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsMuted(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsMuted(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayer::IsMuted(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_IsMuted(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsMuted(value)); } } template auto consume_Windows_Media_Playback_IMediaPlayer::PlaybackRate() const { double value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PlaybackRate(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PlaybackRate(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayer::PlaybackRate(double value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_PlaybackRate(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PlaybackRate(value)); } } template auto consume_Windows_Media_Playback_IMediaPlayer::Volume() const { double value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Volume(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Volume(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayer::Volume(double value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Volume(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Volume(value)); } } template auto consume_Windows_Media_Playback_IMediaPlayer::PlaybackMediaMarkers() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PlaybackMediaMarkers(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PlaybackMediaMarkers(&value)); } return winrt::Windows::Media::Playback::PlaybackMediaMarkerSequence{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlayer::MediaOpened(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_MediaOpened(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_MediaOpened(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlayer::MediaOpened(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, MediaOpened(value)); } template auto consume_Windows_Media_Playback_IMediaPlayer::MediaOpened(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_MediaOpened(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_MediaOpened(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlayer::MediaEnded(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_MediaEnded(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_MediaEnded(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlayer::MediaEnded(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, MediaEnded(value)); } template auto consume_Windows_Media_Playback_IMediaPlayer::MediaEnded(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_MediaEnded(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_MediaEnded(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlayer::MediaFailed(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_MediaFailed(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_MediaFailed(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlayer::MediaFailed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, MediaFailed(value)); } template auto consume_Windows_Media_Playback_IMediaPlayer::MediaFailed(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_MediaFailed(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_MediaFailed(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlayer::CurrentStateChanged(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_CurrentStateChanged(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_CurrentStateChanged(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlayer::CurrentStateChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, CurrentStateChanged(value)); } template auto consume_Windows_Media_Playback_IMediaPlayer::CurrentStateChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_CurrentStateChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_CurrentStateChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlayer::PlaybackMediaMarkerReached(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_PlaybackMediaMarkerReached(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_PlaybackMediaMarkerReached(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlayer::PlaybackMediaMarkerReached(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, PlaybackMediaMarkerReached(value)); } template auto consume_Windows_Media_Playback_IMediaPlayer::PlaybackMediaMarkerReached(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_PlaybackMediaMarkerReached(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_PlaybackMediaMarkerReached(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlayer::MediaPlayerRateChanged(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_MediaPlayerRateChanged(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_MediaPlayerRateChanged(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlayer::MediaPlayerRateChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, MediaPlayerRateChanged(value)); } template auto consume_Windows_Media_Playback_IMediaPlayer::MediaPlayerRateChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_MediaPlayerRateChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_MediaPlayerRateChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlayer::VolumeChanged(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_VolumeChanged(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_VolumeChanged(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlayer::VolumeChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, VolumeChanged(value)); } template auto consume_Windows_Media_Playback_IMediaPlayer::VolumeChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_VolumeChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_VolumeChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlayer::SeekCompleted(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_SeekCompleted(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_SeekCompleted(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlayer::SeekCompleted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, SeekCompleted(value)); } template auto consume_Windows_Media_Playback_IMediaPlayer::SeekCompleted(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_SeekCompleted(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_SeekCompleted(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlayer::BufferingStarted(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_BufferingStarted(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_BufferingStarted(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlayer::BufferingStarted(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, BufferingStarted(value)); } template auto consume_Windows_Media_Playback_IMediaPlayer::BufferingStarted(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_BufferingStarted(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_BufferingStarted(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlayer::BufferingEnded(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_BufferingEnded(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_BufferingEnded(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlayer::BufferingEnded(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, BufferingEnded(value)); } template auto consume_Windows_Media_Playback_IMediaPlayer::BufferingEnded(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_BufferingEnded(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_BufferingEnded(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlayer::Play() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Play()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Play()); } } template auto consume_Windows_Media_Playback_IMediaPlayer::Pause() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Pause()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Pause()); } } template auto consume_Windows_Media_Playback_IMediaPlayer::SetUriSource(winrt::Windows::Foundation::Uri const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetUriSource(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetUriSource(*(void**)(&value))); } } template auto consume_Windows_Media_Playback_IMediaPlayer2::SystemMediaTransportControls() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_SystemMediaTransportControls(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SystemMediaTransportControls(&value)); } return winrt::Windows::Media::SystemMediaTransportControls{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlayer2::AudioCategory() const { winrt::Windows::Media::Playback::MediaPlayerAudioCategory value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AudioCategory(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AudioCategory(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayer2::AudioCategory(winrt::Windows::Media::Playback::MediaPlayerAudioCategory const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AudioCategory(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AudioCategory(static_cast(value))); } } template auto consume_Windows_Media_Playback_IMediaPlayer2::AudioDeviceType() const { winrt::Windows::Media::Playback::MediaPlayerAudioDeviceType value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AudioDeviceType(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AudioDeviceType(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayer2::AudioDeviceType(winrt::Windows::Media::Playback::MediaPlayerAudioDeviceType const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AudioDeviceType(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AudioDeviceType(static_cast(value))); } } template auto consume_Windows_Media_Playback_IMediaPlayer3::IsMutedChanged(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_IsMutedChanged(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_IsMutedChanged(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlayer3::IsMutedChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, IsMutedChanged(value)); } template auto consume_Windows_Media_Playback_IMediaPlayer3::IsMutedChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_IsMutedChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_IsMutedChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlayer3::SourceChanged(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_SourceChanged(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_SourceChanged(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlayer3::SourceChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, SourceChanged(value)); } template auto consume_Windows_Media_Playback_IMediaPlayer3::SourceChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_SourceChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_SourceChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlayer3::AudioBalance() const { double value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AudioBalance(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AudioBalance(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayer3::AudioBalance(double value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AudioBalance(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AudioBalance(value)); } } template auto consume_Windows_Media_Playback_IMediaPlayer3::RealTimePlayback() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_RealTimePlayback(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RealTimePlayback(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayer3::RealTimePlayback(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_RealTimePlayback(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_RealTimePlayback(value)); } } template auto consume_Windows_Media_Playback_IMediaPlayer3::StereoscopicVideoRenderMode() const { winrt::Windows::Media::Playback::StereoscopicVideoRenderMode value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_StereoscopicVideoRenderMode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_StereoscopicVideoRenderMode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayer3::StereoscopicVideoRenderMode(winrt::Windows::Media::Playback::StereoscopicVideoRenderMode const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_StereoscopicVideoRenderMode(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_StereoscopicVideoRenderMode(static_cast(value))); } } template auto consume_Windows_Media_Playback_IMediaPlayer3::BreakManager() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_BreakManager(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BreakManager(&value)); } return winrt::Windows::Media::Playback::MediaBreakManager{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlayer3::CommandManager() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CommandManager(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CommandManager(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackCommandManager{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlayer3::AudioDevice() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AudioDevice(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AudioDevice(&value)); } return winrt::Windows::Devices::Enumeration::DeviceInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlayer3::AudioDevice(winrt::Windows::Devices::Enumeration::DeviceInformation const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_AudioDevice(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AudioDevice(*(void**)(&value))); } } template auto consume_Windows_Media_Playback_IMediaPlayer3::TimelineController() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_TimelineController(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TimelineController(&value)); } return winrt::Windows::Media::MediaTimelineController{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlayer3::TimelineController(winrt::Windows::Media::MediaTimelineController const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_TimelineController(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_TimelineController(*(void**)(&value))); } } template auto consume_Windows_Media_Playback_IMediaPlayer3::TimelineControllerPositionOffset() const { winrt::Windows::Foundation::TimeSpan value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_TimelineControllerPositionOffset(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TimelineControllerPositionOffset(put_abi(value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayer3::TimelineControllerPositionOffset(winrt::Windows::Foundation::TimeSpan const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_TimelineControllerPositionOffset(impl::bind_in(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_TimelineControllerPositionOffset(impl::bind_in(value))); } } template auto consume_Windows_Media_Playback_IMediaPlayer3::PlaybackSession() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PlaybackSession(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PlaybackSession(&value)); } return winrt::Windows::Media::Playback::MediaPlaybackSession{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlayer3::StepForwardOneFrame() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->StepForwardOneFrame()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->StepForwardOneFrame()); } } template auto consume_Windows_Media_Playback_IMediaPlayer3::StepBackwardOneFrame() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->StepBackwardOneFrame()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->StepBackwardOneFrame()); } } template auto consume_Windows_Media_Playback_IMediaPlayer3::GetAsCastingSource() const { void* returnValue{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAsCastingSource(&returnValue)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAsCastingSource(&returnValue)); } return winrt::Windows::Media::Casting::CastingSource{ returnValue, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlayer4::SetSurfaceSize(winrt::Windows::Foundation::Size const& size) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetSurfaceSize(impl::bind_in(size))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetSurfaceSize(impl::bind_in(size))); } } template auto consume_Windows_Media_Playback_IMediaPlayer4::GetSurface(winrt::Windows::UI::Composition::Compositor const& compositor) const { void* result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetSurface(*(void**)(&compositor), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetSurface(*(void**)(&compositor), &result)); } return winrt::Windows::Media::Playback::MediaPlayerSurface{ result, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlayer5::VideoFrameAvailable(winrt::Windows::Foundation::TypedEventHandler const& value) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_VideoFrameAvailable(*(void**)(&value), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_VideoFrameAvailable(*(void**)(&value), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlayer5::VideoFrameAvailable(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& value) const { return impl::make_event_revoker(this, VideoFrameAvailable(value)); } template auto consume_Windows_Media_Playback_IMediaPlayer5::VideoFrameAvailable(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_VideoFrameAvailable(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_VideoFrameAvailable(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlayer5::IsVideoFrameServerEnabled() const { bool value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_IsVideoFrameServerEnabled(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsVideoFrameServerEnabled(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayer5::IsVideoFrameServerEnabled(bool value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_IsVideoFrameServerEnabled(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsVideoFrameServerEnabled(value)); } } template auto consume_Windows_Media_Playback_IMediaPlayer5::CopyFrameToVideoSurface(winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface const& destination) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CopyFrameToVideoSurface(*(void**)(&destination))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CopyFrameToVideoSurface(*(void**)(&destination))); } } template auto consume_Windows_Media_Playback_IMediaPlayer5::CopyFrameToVideoSurface(winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface const& destination, winrt::Windows::Foundation::Rect const& targetRectangle) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CopyFrameToVideoSurfaceWithTargetRectangle(*(void**)(&destination), impl::bind_in(targetRectangle))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CopyFrameToVideoSurfaceWithTargetRectangle(*(void**)(&destination), impl::bind_in(targetRectangle))); } } template auto consume_Windows_Media_Playback_IMediaPlayer5::CopyFrameToStereoscopicVideoSurfaces(winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface const& destinationLeftEye, winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface const& destinationRightEye) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CopyFrameToStereoscopicVideoSurfaces(*(void**)(&destinationLeftEye), *(void**)(&destinationRightEye))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CopyFrameToStereoscopicVideoSurfaces(*(void**)(&destinationLeftEye), *(void**)(&destinationRightEye))); } } template auto consume_Windows_Media_Playback_IMediaPlayer6::SubtitleFrameChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->add_SubtitleFrameChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_SubtitleFrameChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_Playback_IMediaPlayer6::SubtitleFrameChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, SubtitleFrameChanged(handler)); } template auto consume_Windows_Media_Playback_IMediaPlayer6::SubtitleFrameChanged(winrt::event_token const& token) const noexcept { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; _winrt_abi_type->remove_SubtitleFrameChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_SubtitleFrameChanged(impl::bind_in(token)); } } template auto consume_Windows_Media_Playback_IMediaPlayer6::RenderSubtitlesToSurface(winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface const& destination) const { bool result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RenderSubtitlesToSurface(*(void**)(&destination), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RenderSubtitlesToSurface(*(void**)(&destination), &result)); } return result; } template auto consume_Windows_Media_Playback_IMediaPlayer6::RenderSubtitlesToSurface(winrt::Windows::Graphics::DirectX::Direct3D11::IDirect3DSurface const& destination, winrt::Windows::Foundation::Rect const& targetRectangle) const { bool result{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RenderSubtitlesToSurfaceWithTargetRectangle(*(void**)(&destination), impl::bind_in(targetRectangle), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RenderSubtitlesToSurfaceWithTargetRectangle(*(void**)(&destination), impl::bind_in(targetRectangle), &result)); } return result; } template auto consume_Windows_Media_Playback_IMediaPlayer7::AudioStateMonitor() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_AudioStateMonitor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AudioStateMonitor(&value)); } return winrt::Windows::Media::Audio::AudioStateMonitor{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlayerDataReceivedEventArgs::Data() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Data(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Data(&value)); } return winrt::Windows::Foundation::Collections::ValueSet{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlayerEffects::AddAudioEffect(param::hstring const& activatableClassId, bool effectOptional, winrt::Windows::Foundation::Collections::IPropertySet const& configuration) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->AddAudioEffect(*(void**)(&activatableClassId), effectOptional, *(void**)(&configuration))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->AddAudioEffect(*(void**)(&activatableClassId), effectOptional, *(void**)(&configuration))); } } template auto consume_Windows_Media_Playback_IMediaPlayerEffects::RemoveAllEffects() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->RemoveAllEffects()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RemoveAllEffects()); } } template auto consume_Windows_Media_Playback_IMediaPlayerEffects2::AddVideoEffect(param::hstring const& activatableClassId, bool effectOptional, winrt::Windows::Foundation::Collections::IPropertySet const& effectConfiguration) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->AddVideoEffect(*(void**)(&activatableClassId), effectOptional, *(void**)(&effectConfiguration))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->AddVideoEffect(*(void**)(&activatableClassId), effectOptional, *(void**)(&effectConfiguration))); } } template auto consume_Windows_Media_Playback_IMediaPlayerFailedEventArgs::Error() const { winrt::Windows::Media::Playback::MediaPlayerError value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Error(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Error(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayerFailedEventArgs::ExtendedErrorCode() const { winrt::hresult value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ExtendedErrorCode(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExtendedErrorCode(put_abi(value))); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayerFailedEventArgs::ErrorMessage() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ErrorMessage(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ErrorMessage(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlayerRateChangedEventArgs::NewRate() const { double value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_NewRate(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NewRate(&value)); } return value; } template auto consume_Windows_Media_Playback_IMediaPlayerSource::ProtectionManager() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_ProtectionManager(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProtectionManager(&value)); } return winrt::Windows::Media::Protection::MediaProtectionManager{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlayerSource::ProtectionManager(winrt::Windows::Media::Protection::MediaProtectionManager const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_ProtectionManager(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ProtectionManager(*(void**)(&value))); } } template auto consume_Windows_Media_Playback_IMediaPlayerSource::SetFileSource(winrt::Windows::Storage::IStorageFile const& file) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetFileSource(*(void**)(&file))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetFileSource(*(void**)(&file))); } } template auto consume_Windows_Media_Playback_IMediaPlayerSource::SetStreamSource(winrt::Windows::Storage::Streams::IRandomAccessStream const& stream) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetStreamSource(*(void**)(&stream))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetStreamSource(*(void**)(&stream))); } } template auto consume_Windows_Media_Playback_IMediaPlayerSource::SetMediaSource(winrt::Windows::Media::Core::IMediaSource const& source) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetMediaSource(*(void**)(&source))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetMediaSource(*(void**)(&source))); } } template auto consume_Windows_Media_Playback_IMediaPlayerSource2::Source() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Source(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Source(&value)); } return winrt::Windows::Media::Playback::IMediaPlaybackSource{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlayerSource2::Source(winrt::Windows::Media::Playback::IMediaPlaybackSource const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->put_Source(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_Source(*(void**)(&value))); } } template auto consume_Windows_Media_Playback_IMediaPlayerSurface::CompositionSurface() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_CompositionSurface(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CompositionSurface(&value)); } return winrt::Windows::UI::Composition::ICompositionSurface{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlayerSurface::Compositor() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Compositor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Compositor(&value)); } return winrt::Windows::UI::Composition::Compositor{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IMediaPlayerSurface::MediaPlayer() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_MediaPlayer(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MediaPlayer(&value)); } return winrt::Windows::Media::Playback::MediaPlayer{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IPlaybackMediaMarker::Time() const { winrt::Windows::Foundation::TimeSpan value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Time(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Time(put_abi(value))); } return value; } template auto consume_Windows_Media_Playback_IPlaybackMediaMarker::MediaMarkerType() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_MediaMarkerType(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MediaMarkerType(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IPlaybackMediaMarker::Text() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Text(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Text(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IPlaybackMediaMarkerFactory::CreateFromTime(winrt::Windows::Foundation::TimeSpan const& value) const { void* marker{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->CreateFromTime(impl::bind_in(value), &marker)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateFromTime(impl::bind_in(value), &marker)); } return winrt::Windows::Media::Playback::PlaybackMediaMarker{ marker, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IPlaybackMediaMarkerFactory::Create(winrt::Windows::Foundation::TimeSpan const& value, param::hstring const& mediaMarketType, param::hstring const& text) const { void* marker{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Create(impl::bind_in(value), *(void**)(&mediaMarketType), *(void**)(&text), &marker)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Create(impl::bind_in(value), *(void**)(&mediaMarketType), *(void**)(&text), &marker)); } return winrt::Windows::Media::Playback::PlaybackMediaMarker{ marker, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IPlaybackMediaMarkerReachedEventArgs::PlaybackMediaMarker() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_PlaybackMediaMarker(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PlaybackMediaMarker(&value)); } return winrt::Windows::Media::Playback::PlaybackMediaMarker{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_IPlaybackMediaMarkerSequence::Size() const { uint32_t value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Size(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Size(&value)); } return value; } template auto consume_Windows_Media_Playback_IPlaybackMediaMarkerSequence::Insert(winrt::Windows::Media::Playback::PlaybackMediaMarker const& value) const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Insert(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Insert(*(void**)(&value))); } } template auto consume_Windows_Media_Playback_IPlaybackMediaMarkerSequence::Clear() const { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Clear()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Clear()); } } template auto consume_Windows_Media_Playback_ITimedMetadataPresentationModeChangedEventArgs::Track() const { void* value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_Track(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Track(&value)); } return winrt::Windows::Media::Core::TimedMetadataTrack{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_Playback_ITimedMetadataPresentationModeChangedEventArgs::OldPresentationMode() const { winrt::Windows::Media::Playback::TimedMetadataTrackPresentationMode value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_OldPresentationMode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_OldPresentationMode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_Playback_ITimedMetadataPresentationModeChangedEventArgs::NewPresentationMode() const { winrt::Windows::Media::Playback::TimedMetadataTrackPresentationMode value{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->get_NewPresentationMode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NewPresentationMode(reinterpret_cast(&value))); } return value; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Current(void** player) noexcept final try { clear_abi(player); typename D::abi_guard guard(this->shim()); *player = detach_from(this->shim().Current()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_MessageReceivedFromBackground(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().MessageReceivedFromBackground(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_MessageReceivedFromBackground(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().MessageReceivedFromBackground(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_MessageReceivedFromForeground(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().MessageReceivedFromForeground(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_MessageReceivedFromForeground(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().MessageReceivedFromForeground(*reinterpret_cast(&token)); return 0; } int32_t __stdcall SendMessageToBackground(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SendMessageToBackground(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SendMessageToForeground(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SendMessageToForeground(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsMediaPlaying(bool* isMediaPlaying) noexcept final try { typename D::abi_guard guard(this->shim()); *isMediaPlaying = detach_from(this->shim().IsMediaPlaying()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Shutdown() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Shutdown(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_NewItem(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NewItem()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_OldItem(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OldItem()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Reason(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Reason()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PlaybackList(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PlaybackList()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PresentationPosition(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().PresentationPosition()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InsertionMethod(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InsertionMethod()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CustomProperties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CustomProperties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CanStart(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CanStart()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CanStart(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CanStart(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_MediaBreak(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MediaBreak()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(int32_t insertionMethod, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Create(*reinterpret_cast(&insertionMethod))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWithPresentationPosition(int32_t insertionMethod, int64_t presentationPosition, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateWithPresentationPosition(*reinterpret_cast(&insertionMethod), *reinterpret_cast(&presentationPosition))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_BreaksSeekedOver(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().BreaksSeekedOver(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_BreaksSeekedOver(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().BreaksSeekedOver(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_BreakStarted(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().BreakStarted(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_BreakStarted(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().BreakStarted(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_BreakEnded(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().BreakEnded(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_BreakEnded(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().BreakEnded(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_BreakSkipped(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().BreakSkipped(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_BreakSkipped(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().BreakSkipped(*reinterpret_cast(&token)); return 0; } int32_t __stdcall get_CurrentBreak(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CurrentBreak()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PlaybackSession(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PlaybackSession()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall PlayBreak(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PlayBreak(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SkipCurrentBreak() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SkipCurrentBreak(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_ScheduleChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ScheduleChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ScheduleChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ScheduleChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall InsertMidrollBreak(void* mediaBreak) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().InsertMidrollBreak(*reinterpret_cast(&mediaBreak)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RemoveMidrollBreak(void* mediaBreak) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RemoveMidrollBreak(*reinterpret_cast(&mediaBreak)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MidrollBreaks(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().MidrollBreaks()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PrerollBreak(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PrerollBreak(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PrerollBreak(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PrerollBreak()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PostrollBreak(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PostrollBreak(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PostrollBreak(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PostrollBreak()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PlaybackItem(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PlaybackItem()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SeekedOverBreaks(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SeekedOverBreaks()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_OldPosition(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OldPosition()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NewPosition(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NewPosition()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_MediaBreak(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MediaBreak()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_MediaBreak(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MediaBreak()); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { int32_t __stdcall get_CurrentItem(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CurrentItem()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetPlaybackSource(void* source) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetPlaybackSource(*reinterpret_cast(&source)); return 0; } catch (...) { return to_hresult(); } }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Type(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Type()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Type(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Type(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MusicProperties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MusicProperties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VideoProperties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideoProperties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Thumbnail(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Thumbnail()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Thumbnail(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Thumbnail(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ClearAll() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ClearAll(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MediaPlayer(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MediaPlayer()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PlayBehavior(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PlayBehavior()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PauseBehavior(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PauseBehavior()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NextBehavior(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NextBehavior()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PreviousBehavior(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PreviousBehavior()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FastForwardBehavior(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FastForwardBehavior()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RewindBehavior(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RewindBehavior()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ShuffleBehavior(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ShuffleBehavior()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AutoRepeatModeBehavior(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AutoRepeatModeBehavior()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PositionBehavior(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PositionBehavior()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RateBehavior(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RateBehavior()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_PlayReceived(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().PlayReceived(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PlayReceived(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PlayReceived(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_PauseReceived(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().PauseReceived(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PauseReceived(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PauseReceived(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_NextReceived(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().NextReceived(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_NextReceived(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().NextReceived(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_PreviousReceived(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().PreviousReceived(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PreviousReceived(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PreviousReceived(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_FastForwardReceived(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().FastForwardReceived(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_FastForwardReceived(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().FastForwardReceived(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_RewindReceived(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().RewindReceived(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_RewindReceived(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().RewindReceived(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_ShuffleReceived(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ShuffleReceived(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ShuffleReceived(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ShuffleReceived(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_AutoRepeatModeReceived(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().AutoRepeatModeReceived(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_AutoRepeatModeReceived(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().AutoRepeatModeReceived(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_PositionReceived(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().PositionReceived(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PositionReceived(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PositionReceived(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_RateReceived(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().RateReceived(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_RateReceived(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().RateReceived(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Handled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Handled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Handled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AutoRepeatMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AutoRepeatMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CommandManager(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CommandManager()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_EnablingRule(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().EnablingRule()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_EnablingRule(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().EnablingRule(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_IsEnabledChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().IsEnabledChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_IsEnabledChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().IsEnabledChanged(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Handled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Handled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Handled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Handled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Handled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Handled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Handled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Handled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Handled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Handled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Handled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Handled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Handled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Handled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Handled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Position(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Position()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Handled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Handled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Handled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Handled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Handled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Handled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PlaybackRate(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PlaybackRate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Handled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Handled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Handled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Handled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Handled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Handled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Handled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsShuffleRequested(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsShuffleRequested()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_AudioTracksChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().AudioTracksChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_AudioTracksChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().AudioTracksChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_VideoTracksChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().VideoTracksChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_VideoTracksChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().VideoTracksChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_TimedMetadataTracksChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().TimedMetadataTracksChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_TimedMetadataTracksChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().TimedMetadataTracksChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall get_Source(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Source()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AudioTracks(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AudioTracks()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_VideoTracks(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideoTracks()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TimedMetadataTracks(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TimedMetadataTracks()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_BreakSchedule(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BreakSchedule()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_StartTime(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().StartTime()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DurationLimit(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().DurationLimit()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CanSkip(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CanSkip()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CanSkip(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CanSkip(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDisplayProperties(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDisplayProperties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ApplyDisplayProperties(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ApplyDisplayProperties(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsDisabledInPlaybackList(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsDisabledInPlaybackList()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsDisabledInPlaybackList(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsDisabledInPlaybackList(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TotalDownloadProgress(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TotalDownloadProgress()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AutoLoadedDisplayProperties(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AutoLoadedDisplayProperties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AutoLoadedDisplayProperties(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AutoLoadedDisplayProperties(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ErrorCode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ErrorCode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExtendedError(winrt::hresult* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExtendedError()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Create(void* source, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Create(*reinterpret_cast(&source))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateWithStartTime(void* source, int64_t startTime, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateWithStartTime(*reinterpret_cast(&source), *reinterpret_cast(&startTime))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateWithStartTimeAndDurationLimit(void* source, int64_t startTime, int64_t durationLimit, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateWithStartTimeAndDurationLimit(*reinterpret_cast(&source), *reinterpret_cast(&startTime), *reinterpret_cast(&durationLimit))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Item(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Item()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Error(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Error()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Item(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Item()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall FindFromMediaSource(void* source, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FindFromMediaSource(*reinterpret_cast(&source))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_ItemFailed(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ItemFailed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ItemFailed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ItemFailed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_CurrentItemChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().CurrentItemChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_CurrentItemChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().CurrentItemChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_ItemOpened(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ItemOpened(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ItemOpened(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ItemOpened(*reinterpret_cast(&token)); return 0; } int32_t __stdcall get_Items(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Items()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AutoRepeatEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AutoRepeatEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AutoRepeatEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AutoRepeatEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ShuffleEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ShuffleEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ShuffleEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ShuffleEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CurrentItem(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CurrentItem()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CurrentItemIndex(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CurrentItemIndex()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall MoveNext(void** item) noexcept final try { clear_abi(item); typename D::abi_guard guard(this->shim()); *item = detach_from(this->shim().MoveNext()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall MovePrevious(void** item) noexcept final try { clear_abi(item); typename D::abi_guard guard(this->shim()); *item = detach_from(this->shim().MovePrevious()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall MoveTo(uint32_t itemIndex, void** item) noexcept final try { clear_abi(item); typename D::abi_guard guard(this->shim()); *item = detach_from(this->shim().MoveTo(itemIndex)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_MaxPrefetchTime(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().MaxPrefetchTime()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_MaxPrefetchTime(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MaxPrefetchTime(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_StartingItem(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().StartingItem()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_StartingItem(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().StartingItem(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ShuffledItems(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ShuffledItems()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetShuffledItems(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetShuffledItems(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_MaxPlayedItemsToKeepOpen(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().MaxPlayedItemsToKeepOpen()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_MaxPlayedItemsToKeepOpen(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MaxPlayedItemsToKeepOpen(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_PlaybackStateChanged(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().PlaybackStateChanged(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PlaybackStateChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PlaybackStateChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_PlaybackRateChanged(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().PlaybackRateChanged(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PlaybackRateChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PlaybackRateChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_SeekCompleted(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().SeekCompleted(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_SeekCompleted(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().SeekCompleted(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_BufferingStarted(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().BufferingStarted(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_BufferingStarted(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().BufferingStarted(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_BufferingEnded(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().BufferingEnded(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_BufferingEnded(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().BufferingEnded(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_BufferingProgressChanged(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().BufferingProgressChanged(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_BufferingProgressChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().BufferingProgressChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_DownloadProgressChanged(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().DownloadProgressChanged(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_DownloadProgressChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().DownloadProgressChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_NaturalDurationChanged(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().NaturalDurationChanged(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_NaturalDurationChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().NaturalDurationChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_PositionChanged(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().PositionChanged(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PositionChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PositionChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_NaturalVideoSizeChanged(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().NaturalVideoSizeChanged(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_NaturalVideoSizeChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().NaturalVideoSizeChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall get_MediaPlayer(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MediaPlayer()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NaturalDuration(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NaturalDuration()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Position(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Position()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Position(int64_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Position(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PlaybackState(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PlaybackState()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CanSeek(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CanSeek()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CanPause(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CanPause()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsProtected(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsProtected()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PlaybackRate(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PlaybackRate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PlaybackRate(double value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PlaybackRate(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BufferingProgress(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BufferingProgress()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DownloadProgress(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DownloadProgress()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NaturalVideoHeight(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NaturalVideoHeight()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NaturalVideoWidth(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NaturalVideoWidth()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NormalizedSourceRect(winrt::Windows::Foundation::Rect* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NormalizedSourceRect()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_NormalizedSourceRect(winrt::Windows::Foundation::Rect value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().NormalizedSourceRect(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_StereoscopicVideoPackingMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().StereoscopicVideoPackingMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_StereoscopicVideoPackingMode(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().StereoscopicVideoPackingMode(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_BufferedRangesChanged(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().BufferedRangesChanged(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_BufferedRangesChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().BufferedRangesChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_PlayedRangesChanged(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().PlayedRangesChanged(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PlayedRangesChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PlayedRangesChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_SeekableRangesChanged(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().SeekableRangesChanged(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_SeekableRangesChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().SeekableRangesChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_SupportedPlaybackRatesChanged(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().SupportedPlaybackRatesChanged(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_SupportedPlaybackRatesChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().SupportedPlaybackRatesChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall get_SphericalVideoProjection(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SphericalVideoProjection()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsMirroring(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsMirroring()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsMirroring(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsMirroring(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetBufferedRanges(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().GetBufferedRanges()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetPlayedRanges(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().GetPlayedRanges()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetSeekableRanges(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().GetSeekableRanges()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsSupportedPlaybackRateRange(double rate1, double rate2, bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsSupportedPlaybackRateRange(rate1, rate2)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PlaybackRotation(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PlaybackRotation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PlaybackRotation(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PlaybackRotation(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetOutputDegradationPolicyState(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetOutputDegradationPolicyState()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsPlaybackInterruption(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsPlaybackInterruption()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_VideoConstrictionReason(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().VideoConstrictionReason()); return 0; } catch (...) { return to_hresult(); } }; #endif template struct produce : produce_base { }; #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FrameFormat(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FrameFormat()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_FrameFormat(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().FrameFormat(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HorizontalFieldOfViewInDegrees(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HorizontalFieldOfViewInDegrees()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_HorizontalFieldOfViewInDegrees(double value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().HorizontalFieldOfViewInDegrees(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ViewOrientation(winrt::Windows::Foundation::Numerics::quaternion* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ViewOrientation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ViewOrientation(winrt::Windows::Foundation::Numerics::quaternion value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ViewOrientation(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ProjectionMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ProjectionMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ProjectionMode(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ProjectionMode(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_PresentationModeChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().PresentationModeChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PresentationModeChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PresentationModeChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall GetPresentationMode(uint32_t index, int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetPresentationMode(index)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetPresentationMode(uint32_t index, int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetPresentationMode(index, *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AutoPlay(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AutoPlay()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AutoPlay(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AutoPlay(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NaturalDuration(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NaturalDuration()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Position(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Position()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Position(int64_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Position(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BufferingProgress(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BufferingProgress()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CurrentState(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CurrentState()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CanSeek(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CanSeek()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CanPause(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CanPause()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsLoopingEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsLoopingEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsLoopingEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsLoopingEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsProtected(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsProtected()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsMuted(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsMuted()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsMuted(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsMuted(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PlaybackRate(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PlaybackRate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PlaybackRate(double value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PlaybackRate(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Volume(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Volume()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Volume(double value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Volume(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PlaybackMediaMarkers(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PlaybackMediaMarkers()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_MediaOpened(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().MediaOpened(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_MediaOpened(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().MediaOpened(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_MediaEnded(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().MediaEnded(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_MediaEnded(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().MediaEnded(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_MediaFailed(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().MediaFailed(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_MediaFailed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().MediaFailed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_CurrentStateChanged(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().CurrentStateChanged(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_CurrentStateChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().CurrentStateChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_PlaybackMediaMarkerReached(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().PlaybackMediaMarkerReached(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PlaybackMediaMarkerReached(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PlaybackMediaMarkerReached(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_MediaPlayerRateChanged(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().MediaPlayerRateChanged(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_MediaPlayerRateChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().MediaPlayerRateChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_VolumeChanged(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().VolumeChanged(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_VolumeChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().VolumeChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_SeekCompleted(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().SeekCompleted(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_SeekCompleted(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().SeekCompleted(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_BufferingStarted(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().BufferingStarted(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_BufferingStarted(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().BufferingStarted(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_BufferingEnded(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().BufferingEnded(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_BufferingEnded(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().BufferingEnded(*reinterpret_cast(&token)); return 0; } int32_t __stdcall Play() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Play(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Pause() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Pause(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetUriSource(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetUriSource(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SystemMediaTransportControls(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SystemMediaTransportControls()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AudioCategory(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AudioCategory()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AudioCategory(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AudioCategory(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AudioDeviceType(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AudioDeviceType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AudioDeviceType(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AudioDeviceType(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_IsMutedChanged(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().IsMutedChanged(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_IsMutedChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().IsMutedChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_SourceChanged(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().SourceChanged(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_SourceChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().SourceChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall get_AudioBalance(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AudioBalance()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AudioBalance(double value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AudioBalance(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RealTimePlayback(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RealTimePlayback()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_RealTimePlayback(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RealTimePlayback(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_StereoscopicVideoRenderMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().StereoscopicVideoRenderMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_StereoscopicVideoRenderMode(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().StereoscopicVideoRenderMode(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BreakManager(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BreakManager()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CommandManager(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CommandManager()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AudioDevice(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AudioDevice()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AudioDevice(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AudioDevice(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TimelineController(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TimelineController()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_TimelineController(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TimelineController(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TimelineControllerPositionOffset(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TimelineControllerPositionOffset()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_TimelineControllerPositionOffset(int64_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().TimelineControllerPositionOffset(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PlaybackSession(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PlaybackSession()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall StepForwardOneFrame() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().StepForwardOneFrame(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall StepBackwardOneFrame() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().StepBackwardOneFrame(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetAsCastingSource(void** returnValue) noexcept final try { clear_abi(returnValue); typename D::abi_guard guard(this->shim()); *returnValue = detach_from(this->shim().GetAsCastingSource()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall SetSurfaceSize(winrt::Windows::Foundation::Size size) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetSurfaceSize(*reinterpret_cast(&size)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetSurface(void* compositor, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetSurface(*reinterpret_cast(&compositor))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_VideoFrameAvailable(void* value, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().VideoFrameAvailable(*reinterpret_cast const*>(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_VideoFrameAvailable(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().VideoFrameAvailable(*reinterpret_cast(&token)); return 0; } int32_t __stdcall get_IsVideoFrameServerEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsVideoFrameServerEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsVideoFrameServerEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsVideoFrameServerEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CopyFrameToVideoSurface(void* destination) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CopyFrameToVideoSurface(*reinterpret_cast(&destination)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CopyFrameToVideoSurfaceWithTargetRectangle(void* destination, winrt::Windows::Foundation::Rect targetRectangle) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CopyFrameToVideoSurface(*reinterpret_cast(&destination), *reinterpret_cast(&targetRectangle)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CopyFrameToStereoscopicVideoSurfaces(void* destinationLeftEye, void* destinationRightEye) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CopyFrameToStereoscopicVideoSurfaces(*reinterpret_cast(&destinationLeftEye), *reinterpret_cast(&destinationRightEye)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_SubtitleFrameChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().SubtitleFrameChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_SubtitleFrameChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().SubtitleFrameChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall RenderSubtitlesToSurface(void* destination, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().RenderSubtitlesToSurface(*reinterpret_cast(&destination))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RenderSubtitlesToSurfaceWithTargetRectangle(void* destination, winrt::Windows::Foundation::Rect targetRectangle, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().RenderSubtitlesToSurface(*reinterpret_cast(&destination), *reinterpret_cast(&targetRectangle))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AudioStateMonitor(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AudioStateMonitor()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Data(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Data()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall AddAudioEffect(void* activatableClassId, bool effectOptional, void* configuration) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AddAudioEffect(*reinterpret_cast(&activatableClassId), effectOptional, *reinterpret_cast(&configuration)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RemoveAllEffects() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RemoveAllEffects(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall AddVideoEffect(void* activatableClassId, bool effectOptional, void* effectConfiguration) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AddVideoEffect(*reinterpret_cast(&activatableClassId), effectOptional, *reinterpret_cast(&effectConfiguration)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Error(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Error()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExtendedErrorCode(winrt::hresult* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExtendedErrorCode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ErrorMessage(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ErrorMessage()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_NewRate(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NewRate()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ProtectionManager(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ProtectionManager()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ProtectionManager(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ProtectionManager(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetFileSource(void* file) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetFileSource(*reinterpret_cast(&file)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetStreamSource(void* stream) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetStreamSource(*reinterpret_cast(&stream)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetMediaSource(void* source) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetMediaSource(*reinterpret_cast(&source)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Source(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Source()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Source(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Source(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CompositionSurface(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CompositionSurface()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Compositor(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Compositor()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MediaPlayer(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MediaPlayer()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Time(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Time()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MediaMarkerType(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MediaMarkerType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Text(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Text()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromTime(int64_t value, void** marker) noexcept final try { clear_abi(marker); typename D::abi_guard guard(this->shim()); *marker = detach_from(this->shim().CreateFromTime(*reinterpret_cast(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Create(int64_t value, void* mediaMarketType, void* text, void** marker) noexcept final try { clear_abi(marker); typename D::abi_guard guard(this->shim()); *marker = detach_from(this->shim().Create(*reinterpret_cast(&value), *reinterpret_cast(&mediaMarketType), *reinterpret_cast(&text))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PlaybackMediaMarker(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PlaybackMediaMarker()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Size(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Size()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Insert(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Insert(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Clear() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Clear(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Track(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Track()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_OldPresentationMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OldPresentationMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NewPresentationMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NewPresentationMode()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Media::Playback { inline auto BackgroundMediaPlayer::Current() { return impl::call_factory_cast([](IBackgroundMediaPlayerStatics const& f) { return f.Current(); }); } inline auto BackgroundMediaPlayer::MessageReceivedFromBackground(winrt::Windows::Foundation::EventHandler const& value) { return impl::call_factory([&](IBackgroundMediaPlayerStatics const& f) { return f.MessageReceivedFromBackground(value); }); } inline auto BackgroundMediaPlayer::MessageReceivedFromBackground(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) { auto f = get_activation_factory(); return BackgroundMediaPlayer::MessageReceivedFromBackground_revoker{ f, f.MessageReceivedFromBackground(value) }; } inline auto BackgroundMediaPlayer::MessageReceivedFromBackground(winrt::event_token const& token) { impl::call_factory([&](IBackgroundMediaPlayerStatics const& f) { return f.MessageReceivedFromBackground(token); }); } inline auto BackgroundMediaPlayer::MessageReceivedFromForeground(winrt::Windows::Foundation::EventHandler const& value) { return impl::call_factory([&](IBackgroundMediaPlayerStatics const& f) { return f.MessageReceivedFromForeground(value); }); } inline auto BackgroundMediaPlayer::MessageReceivedFromForeground(auto_revoke_t, winrt::Windows::Foundation::EventHandler const& value) { auto f = get_activation_factory(); return BackgroundMediaPlayer::MessageReceivedFromForeground_revoker{ f, f.MessageReceivedFromForeground(value) }; } inline auto BackgroundMediaPlayer::MessageReceivedFromForeground(winrt::event_token const& token) { impl::call_factory([&](IBackgroundMediaPlayerStatics const& f) { return f.MessageReceivedFromForeground(token); }); } inline auto BackgroundMediaPlayer::SendMessageToBackground(winrt::Windows::Foundation::Collections::ValueSet const& value) { impl::call_factory([&](IBackgroundMediaPlayerStatics const& f) { return f.SendMessageToBackground(value); }); } inline auto BackgroundMediaPlayer::SendMessageToForeground(winrt::Windows::Foundation::Collections::ValueSet const& value) { impl::call_factory([&](IBackgroundMediaPlayerStatics const& f) { return f.SendMessageToForeground(value); }); } inline auto BackgroundMediaPlayer::IsMediaPlaying() { return impl::call_factory_cast([](IBackgroundMediaPlayerStatics const& f) { return f.IsMediaPlaying(); }); } inline auto BackgroundMediaPlayer::Shutdown() { impl::call_factory_cast([](IBackgroundMediaPlayerStatics const& f) { return f.Shutdown(); }); } inline MediaBreak::MediaBreak(winrt::Windows::Media::Playback::MediaBreakInsertionMethod const& insertionMethod) : MediaBreak(impl::call_factory([&](IMediaBreakFactory const& f) { return f.Create(insertionMethod); })) { } inline MediaBreak::MediaBreak(winrt::Windows::Media::Playback::MediaBreakInsertionMethod const& insertionMethod, winrt::Windows::Foundation::TimeSpan const& presentationPosition) : MediaBreak(impl::call_factory([&](IMediaBreakFactory const& f) { return f.CreateWithPresentationPosition(insertionMethod, presentationPosition); })) { } inline MediaPlaybackItem::MediaPlaybackItem(winrt::Windows::Media::Core::MediaSource const& source) : MediaPlaybackItem(impl::call_factory([&](IMediaPlaybackItemFactory const& f) { return f.Create(source); })) { } inline MediaPlaybackItem::MediaPlaybackItem(winrt::Windows::Media::Core::MediaSource const& source, winrt::Windows::Foundation::TimeSpan const& startTime) : MediaPlaybackItem(impl::call_factory([&](IMediaPlaybackItemFactory2 const& f) { return f.CreateWithStartTime(source, startTime); })) { } inline MediaPlaybackItem::MediaPlaybackItem(winrt::Windows::Media::Core::MediaSource const& source, winrt::Windows::Foundation::TimeSpan const& startTime, winrt::Windows::Foundation::TimeSpan const& durationLimit) : MediaPlaybackItem(impl::call_factory([&](IMediaPlaybackItemFactory2 const& f) { return f.CreateWithStartTimeAndDurationLimit(source, startTime, durationLimit); })) { } inline auto MediaPlaybackItem::FindFromMediaSource(winrt::Windows::Media::Core::MediaSource const& source) { return impl::call_factory([&](IMediaPlaybackItemStatics const& f) { return f.FindFromMediaSource(source); }); } inline MediaPlaybackList::MediaPlaybackList() : MediaPlaybackList(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline MediaPlayer::MediaPlayer() : MediaPlayer(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline PlaybackMediaMarker::PlaybackMediaMarker(winrt::Windows::Foundation::TimeSpan const& value) : PlaybackMediaMarker(impl::call_factory([&](IPlaybackMediaMarkerFactory const& f) { return f.CreateFromTime(value); })) { } inline PlaybackMediaMarker::PlaybackMediaMarker(winrt::Windows::Foundation::TimeSpan const& value, param::hstring const& mediaMarketType, param::hstring const& text) : PlaybackMediaMarker(impl::call_factory([&](IPlaybackMediaMarkerFactory const& f) { return f.Create(value, mediaMarketType, text); })) { } } namespace std { #ifndef WINRT_LEAN_AND_MEAN template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } #endif