// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_Media_AppBroadcasting_H #define WINRT_Windows_Media_AppBroadcasting_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.240405.15"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.240405.15" #include "winrt/Windows.Media.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.System.2.h" #include "winrt/impl/Windows.Media.AppBroadcasting.2.h" namespace winrt::impl { template auto consume_Windows_Media_AppBroadcasting_IAppBroadcastingMonitor::IsCurrentAppBroadcasting() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::AppBroadcasting::IAppBroadcastingMonitor)->get_IsCurrentAppBroadcasting(&value)); return value; } template auto consume_Windows_Media_AppBroadcasting_IAppBroadcastingMonitor::IsCurrentAppBroadcastingChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::AppBroadcasting::IAppBroadcastingMonitor)->add_IsCurrentAppBroadcastingChanged(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_Media_AppBroadcasting_IAppBroadcastingMonitor::IsCurrentAppBroadcastingChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, IsCurrentAppBroadcastingChanged(handler)); } template auto consume_Windows_Media_AppBroadcasting_IAppBroadcastingMonitor::IsCurrentAppBroadcastingChanged(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Media::AppBroadcasting::IAppBroadcastingMonitor)->remove_IsCurrentAppBroadcastingChanged(impl::bind_in(token)); } template auto consume_Windows_Media_AppBroadcasting_IAppBroadcastingStatus::CanStartBroadcast() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::AppBroadcasting::IAppBroadcastingStatus)->get_CanStartBroadcast(&value)); return value; } template auto consume_Windows_Media_AppBroadcasting_IAppBroadcastingStatus::Details() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::AppBroadcasting::IAppBroadcastingStatus)->get_Details(&value)); return winrt::Windows::Media::AppBroadcasting::AppBroadcastingStatusDetails{ value, take_ownership_from_abi }; } template auto consume_Windows_Media_AppBroadcasting_IAppBroadcastingStatusDetails::IsAnyAppBroadcasting() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::AppBroadcasting::IAppBroadcastingStatusDetails)->get_IsAnyAppBroadcasting(&value)); return value; } template auto consume_Windows_Media_AppBroadcasting_IAppBroadcastingStatusDetails::IsCaptureResourceUnavailable() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::AppBroadcasting::IAppBroadcastingStatusDetails)->get_IsCaptureResourceUnavailable(&value)); return value; } template auto consume_Windows_Media_AppBroadcasting_IAppBroadcastingStatusDetails::IsGameStreamInProgress() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::AppBroadcasting::IAppBroadcastingStatusDetails)->get_IsGameStreamInProgress(&value)); return value; } template auto consume_Windows_Media_AppBroadcasting_IAppBroadcastingStatusDetails::IsGpuConstrained() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::AppBroadcasting::IAppBroadcastingStatusDetails)->get_IsGpuConstrained(&value)); return value; } template auto consume_Windows_Media_AppBroadcasting_IAppBroadcastingStatusDetails::IsAppInactive() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::AppBroadcasting::IAppBroadcastingStatusDetails)->get_IsAppInactive(&value)); return value; } template auto consume_Windows_Media_AppBroadcasting_IAppBroadcastingStatusDetails::IsBlockedForApp() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::AppBroadcasting::IAppBroadcastingStatusDetails)->get_IsBlockedForApp(&value)); return value; } template auto consume_Windows_Media_AppBroadcasting_IAppBroadcastingStatusDetails::IsDisabledByUser() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::AppBroadcasting::IAppBroadcastingStatusDetails)->get_IsDisabledByUser(&value)); return value; } template auto consume_Windows_Media_AppBroadcasting_IAppBroadcastingStatusDetails::IsDisabledBySystem() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::AppBroadcasting::IAppBroadcastingStatusDetails)->get_IsDisabledBySystem(&value)); return value; } template auto consume_Windows_Media_AppBroadcasting_IAppBroadcastingUI::GetStatus() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::AppBroadcasting::IAppBroadcastingUI)->GetStatus(&result)); return winrt::Windows::Media::AppBroadcasting::AppBroadcastingStatus{ result, take_ownership_from_abi }; } template auto consume_Windows_Media_AppBroadcasting_IAppBroadcastingUI::ShowBroadcastUI() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::AppBroadcasting::IAppBroadcastingUI)->ShowBroadcastUI()); } template auto consume_Windows_Media_AppBroadcasting_IAppBroadcastingUIStatics::GetDefault() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::AppBroadcasting::IAppBroadcastingUIStatics)->GetDefault(&result)); return winrt::Windows::Media::AppBroadcasting::AppBroadcastingUI{ result, take_ownership_from_abi }; } template auto consume_Windows_Media_AppBroadcasting_IAppBroadcastingUIStatics::GetForUser(winrt::Windows::System::User const& user) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Media::AppBroadcasting::IAppBroadcastingUIStatics)->GetForUser(*(void**)(&user), &result)); return winrt::Windows::Media::AppBroadcasting::AppBroadcastingUI{ result, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsCurrentAppBroadcasting(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsCurrentAppBroadcasting()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_IsCurrentAppBroadcastingChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().IsCurrentAppBroadcastingChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_IsCurrentAppBroadcastingChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().IsCurrentAppBroadcastingChanged(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CanStartBroadcast(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CanStartBroadcast()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Details(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Details()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsAnyAppBroadcasting(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsAnyAppBroadcasting()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsCaptureResourceUnavailable(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsCaptureResourceUnavailable()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsGameStreamInProgress(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsGameStreamInProgress()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsGpuConstrained(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsGpuConstrained()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsAppInactive(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsAppInactive()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsBlockedForApp(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsBlockedForApp()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsDisabledByUser(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsDisabledByUser()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsDisabledBySystem(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsDisabledBySystem()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetStatus(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetStatus()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ShowBroadcastUI() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ShowBroadcastUI(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDefault(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDefault()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetForUser(void* user, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetForUser(*reinterpret_cast(&user))); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Media::AppBroadcasting { inline AppBroadcastingMonitor::AppBroadcastingMonitor() : AppBroadcastingMonitor(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto AppBroadcastingUI::GetDefault() { return impl::call_factory_cast([](IAppBroadcastingUIStatics const& f) { return f.GetDefault(); }); } inline auto AppBroadcastingUI::GetForUser(winrt::Windows::System::User const& user) { return impl::call_factory([&](IAppBroadcastingUIStatics const& f) { return f.GetForUser(user); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif