// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_Media_DialProtocol_H #define WINRT_Windows_Media_DialProtocol_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.Storage.Streams.2.h" #include "winrt/impl/Windows.UI.Popups.2.h" #include "winrt/impl/Windows.Media.DialProtocol.2.h" namespace winrt::impl { template auto consume_Windows_Media_DialProtocol_IDialApp::AppName() 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_AppName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AppName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialApp::RequestLaunchAsync(param::hstring const& appArgument) 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->RequestLaunchAsync(*(void**)(&appArgument), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestLaunchAsync(*(void**)(&appArgument), &value)); } return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialApp::StopAsync() 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->StopAsync(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->StopAsync(&value)); } return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialApp::GetAppStateAsync() 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->GetAppStateAsync(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAppStateAsync(&value)); } return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialAppStateDetails::State() const { winrt::Windows::Media::DialProtocol::DialAppState 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_State(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_State(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Media_DialProtocol_IDialAppStateDetails::FullXml() 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_FullXml(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FullXml(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialDevice::Id() 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_Id(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Id(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialDevice::GetDialApp(param::hstring const& appName) 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->GetDialApp(*(void**)(&appName), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDialApp(*(void**)(&appName), &value)); } return winrt::Windows::Media::DialProtocol::DialApp{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialDevice2::FriendlyName() 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_FriendlyName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FriendlyName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialDevice2::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::IRandomAccessStreamReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialDevicePicker::Filter() 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_Filter(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Filter(&value)); } return winrt::Windows::Media::DialProtocol::DialDevicePickerFilter{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialDevicePicker::Appearance() 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_Appearance(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Appearance(&value)); } return winrt::Windows::Devices::Enumeration::DevicePickerAppearance{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialDevicePicker::DialDeviceSelected(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_DialDeviceSelected(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_DialDeviceSelected(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_DialProtocol_IDialDevicePicker::DialDeviceSelected(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, DialDeviceSelected(handler)); } template auto consume_Windows_Media_DialProtocol_IDialDevicePicker::DialDeviceSelected(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_DialDeviceSelected(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_DialDeviceSelected(impl::bind_in(token)); } } template auto consume_Windows_Media_DialProtocol_IDialDevicePicker::DisconnectButtonClicked(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_DisconnectButtonClicked(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_DisconnectButtonClicked(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_DialProtocol_IDialDevicePicker::DisconnectButtonClicked(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, DisconnectButtonClicked(handler)); } template auto consume_Windows_Media_DialProtocol_IDialDevicePicker::DisconnectButtonClicked(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_DisconnectButtonClicked(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_DisconnectButtonClicked(impl::bind_in(token)); } } template auto consume_Windows_Media_DialProtocol_IDialDevicePicker::DialDevicePickerDismissed(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_DialDevicePickerDismissed(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_DialDevicePickerDismissed(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Media_DialProtocol_IDialDevicePicker::DialDevicePickerDismissed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, DialDevicePickerDismissed(handler)); } template auto consume_Windows_Media_DialProtocol_IDialDevicePicker::DialDevicePickerDismissed(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_DialDevicePickerDismissed(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_DialDevicePickerDismissed(impl::bind_in(token)); } } template auto consume_Windows_Media_DialProtocol_IDialDevicePicker::Show(winrt::Windows::Foundation::Rect const& selection) 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->Show(impl::bind_in(selection))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Show(impl::bind_in(selection))); } } template auto consume_Windows_Media_DialProtocol_IDialDevicePicker::Show(winrt::Windows::Foundation::Rect const& selection, winrt::Windows::UI::Popups::Placement const& preferredPlacement) 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->ShowWithPlacement(impl::bind_in(selection), static_cast(preferredPlacement))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ShowWithPlacement(impl::bind_in(selection), static_cast(preferredPlacement))); } } template auto consume_Windows_Media_DialProtocol_IDialDevicePicker::PickSingleDialDeviceAsync(winrt::Windows::Foundation::Rect const& selection) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->PickSingleDialDeviceAsync(impl::bind_in(selection), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->PickSingleDialDeviceAsync(impl::bind_in(selection), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialDevicePicker::PickSingleDialDeviceAsync(winrt::Windows::Foundation::Rect const& selection, winrt::Windows::UI::Popups::Placement const& preferredPlacement) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->PickSingleDialDeviceAsyncWithPlacement(impl::bind_in(selection), static_cast(preferredPlacement), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->PickSingleDialDeviceAsyncWithPlacement(impl::bind_in(selection), static_cast(preferredPlacement), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialDevicePicker::Hide() 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->Hide()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Hide()); } } template auto consume_Windows_Media_DialProtocol_IDialDevicePicker::SetDisplayStatus(winrt::Windows::Media::DialProtocol::DialDevice const& device, winrt::Windows::Media::DialProtocol::DialDeviceDisplayStatus const& status) 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->SetDisplayStatus(*(void**)(&device), static_cast(status))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetDisplayStatus(*(void**)(&device), static_cast(status))); } } template auto consume_Windows_Media_DialProtocol_IDialDevicePickerFilter::SupportedAppNames() 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_SupportedAppNames(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportedAppNames(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialDeviceSelectedEventArgs::SelectedDialDevice() 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_SelectedDialDevice(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SelectedDialDevice(&value)); } return winrt::Windows::Media::DialProtocol::DialDevice{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialDeviceStatics::GetDeviceSelector(param::hstring const& appName) const { void* selector{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetDeviceSelector(*(void**)(&appName), &selector)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeviceSelector(*(void**)(&appName), &selector)); } return hstring{ selector, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialDeviceStatics::FromIdAsync(param::hstring const& value) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FromIdAsync(*(void**)(&value), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FromIdAsync(*(void**)(&value), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialDeviceStatics::DeviceInfoSupportsDialAsync(winrt::Windows::Devices::Enumeration::DeviceInformation const& device) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->DeviceInfoSupportsDialAsync(*(void**)(&device), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->DeviceInfoSupportsDialAsync(*(void**)(&device), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialDisconnectButtonClickedEventArgs::Device() 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_Device(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Device(&value)); } return winrt::Windows::Media::DialProtocol::DialDevice{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialReceiverApp::GetAdditionalDataAsync() const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetAdditionalDataAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAdditionalDataAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialReceiverApp::SetAdditionalDataAsync(param::async_iterable> const& additionalData) const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SetAdditionalDataAsync(*(void**)(&additionalData), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->SetAdditionalDataAsync(*(void**)(&additionalData), &operation)); } return winrt::Windows::Foundation::IAsyncAction{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialReceiverApp2::GetUniqueDeviceNameAsync() const { void* operation{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->GetUniqueDeviceNameAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetUniqueDeviceNameAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Media_DialProtocol_IDialReceiverAppStatics::Current() 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_Current(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Current(&value)); } return winrt::Windows::Media::DialProtocol::DialReceiverApp{ value, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AppName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AppName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestLaunchAsync(void* appArgument, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().RequestLaunchAsync(*reinterpret_cast(&appArgument))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall StopAsync(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().StopAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetAppStateAsync(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().GetAppStateAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_State(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().State()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FullXml(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FullXml()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Id(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Id()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDialApp(void* appName, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDialApp(*reinterpret_cast(&appName))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_FriendlyName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FriendlyName()); 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(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Filter(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Filter()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Appearance(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Appearance()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_DialDeviceSelected(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().DialDeviceSelected(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_DialDeviceSelected(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().DialDeviceSelected(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_DisconnectButtonClicked(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().DisconnectButtonClicked(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_DisconnectButtonClicked(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().DisconnectButtonClicked(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_DialDevicePickerDismissed(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().DialDevicePickerDismissed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_DialDevicePickerDismissed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().DialDevicePickerDismissed(*reinterpret_cast(&token)); return 0; } int32_t __stdcall Show(winrt::Windows::Foundation::Rect selection) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Show(*reinterpret_cast(&selection)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShowWithPlacement(winrt::Windows::Foundation::Rect selection, int32_t preferredPlacement) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Show(*reinterpret_cast(&selection), *reinterpret_cast(&preferredPlacement)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall PickSingleDialDeviceAsync(winrt::Windows::Foundation::Rect selection, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().PickSingleDialDeviceAsync(*reinterpret_cast(&selection))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall PickSingleDialDeviceAsyncWithPlacement(winrt::Windows::Foundation::Rect selection, int32_t preferredPlacement, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().PickSingleDialDeviceAsync(*reinterpret_cast(&selection), *reinterpret_cast(&preferredPlacement))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Hide() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Hide(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetDisplayStatus(void* device, int32_t status) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetDisplayStatus(*reinterpret_cast(&device), *reinterpret_cast(&status)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SupportedAppNames(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedAppNames()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SelectedDialDevice(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SelectedDialDevice()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDeviceSelector(void* appName, void** selector) noexcept final try { clear_abi(selector); typename D::abi_guard guard(this->shim()); *selector = detach_from(this->shim().GetDeviceSelector(*reinterpret_cast(&appName))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FromIdAsync(void* value, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().FromIdAsync(*reinterpret_cast(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall DeviceInfoSupportsDialAsync(void* device, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().DeviceInfoSupportsDialAsync(*reinterpret_cast(&device))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Device(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Device()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetAdditionalDataAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().GetAdditionalDataAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SetAdditionalDataAsync(void* additionalData, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from(this->shim().SetAdditionalDataAsync(*reinterpret_cast> const*>(&additionalData))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetUniqueDeviceNameAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetUniqueDeviceNameAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Current(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Current()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Media::DialProtocol { inline auto DialDevice::GetDeviceSelector(param::hstring const& appName) { return impl::call_factory([&](IDialDeviceStatics const& f) { return f.GetDeviceSelector(appName); }); } inline auto DialDevice::FromIdAsync(param::hstring const& value) { return impl::call_factory([&](IDialDeviceStatics const& f) { return f.FromIdAsync(value); }); } inline auto DialDevice::DeviceInfoSupportsDialAsync(winrt::Windows::Devices::Enumeration::DeviceInformation const& device) { return impl::call_factory([&](IDialDeviceStatics const& f) { return f.DeviceInfoSupportsDialAsync(device); }); } inline DialDevicePicker::DialDevicePicker() : DialDevicePicker(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto DialReceiverApp::Current() { return impl::call_factory_cast([](IDialReceiverAppStatics const& f) { return f.Current(); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif