// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_System_RemoteDesktop_Provider_H #define WINRT_Windows_System_RemoteDesktop_Provider_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.System.RemoteDesktop.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.UI.2.h" #include "winrt/impl/Windows.System.RemoteDesktop.Provider.2.h" namespace winrt::impl { template auto consume_Windows_System_RemoteDesktop_Provider_IPerformLocalActionRequestedEventArgs::Action() const { winrt::Windows::System::RemoteDesktop::Provider::RemoteDesktopLocalAction value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::RemoteDesktop::Provider::IPerformLocalActionRequestedEventArgs)->get_Action(reinterpret_cast(&value))); return value; } template auto consume_Windows_System_RemoteDesktop_Provider_IRemoteDesktopConnectionInfo::SetConnectionStatus(winrt::Windows::System::RemoteDesktop::Provider::RemoteDesktopConnectionStatus const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::RemoteDesktop::Provider::IRemoteDesktopConnectionInfo)->SetConnectionStatus(static_cast(value))); } template auto consume_Windows_System_RemoteDesktop_Provider_IRemoteDesktopConnectionInfo::SwitchToLocalSession() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::RemoteDesktop::Provider::IRemoteDesktopConnectionInfo)->SwitchToLocalSession()); } template auto consume_Windows_System_RemoteDesktop_Provider_IRemoteDesktopConnectionInfo2::PerformLocalActionFromRemote(winrt::Windows::System::RemoteDesktop::Provider::RemoteDesktopLocalAction const& action) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::RemoteDesktop::Provider::IRemoteDesktopConnectionInfo2)->PerformLocalActionFromRemote(static_cast(action))); } template auto consume_Windows_System_RemoteDesktop_Provider_IRemoteDesktopConnectionInfoStatics::GetForLaunchUri(winrt::Windows::Foundation::Uri const& launchUri, winrt::Windows::UI::WindowId const& windowId) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::RemoteDesktop::Provider::IRemoteDesktopConnectionInfoStatics)->GetForLaunchUri(*(void**)(&launchUri), impl::bind_in(windowId), &result)); return winrt::Windows::System::RemoteDesktop::Provider::RemoteDesktopConnectionInfo{ result, take_ownership_from_abi }; } template auto consume_Windows_System_RemoteDesktop_Provider_IRemoteDesktopConnectionRemoteInfo::ReportSwitched() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::RemoteDesktop::Provider::IRemoteDesktopConnectionRemoteInfo)->ReportSwitched()); } template auto consume_Windows_System_RemoteDesktop_Provider_IRemoteDesktopConnectionRemoteInfo::SwitchToLocalSessionRequested(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::RemoteDesktop::Provider::IRemoteDesktopConnectionRemoteInfo)->add_SwitchToLocalSessionRequested(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_System_RemoteDesktop_Provider_IRemoteDesktopConnectionRemoteInfo::SwitchToLocalSessionRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, SwitchToLocalSessionRequested(handler)); } template auto consume_Windows_System_RemoteDesktop_Provider_IRemoteDesktopConnectionRemoteInfo::SwitchToLocalSessionRequested(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::System::RemoteDesktop::Provider::IRemoteDesktopConnectionRemoteInfo)->remove_SwitchToLocalSessionRequested(impl::bind_in(token)); } template auto consume_Windows_System_RemoteDesktop_Provider_IRemoteDesktopConnectionRemoteInfo::PerformLocalActionRequested(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::RemoteDesktop::Provider::IRemoteDesktopConnectionRemoteInfo)->add_PerformLocalActionRequested(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_System_RemoteDesktop_Provider_IRemoteDesktopConnectionRemoteInfo::PerformLocalActionRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, PerformLocalActionRequested(handler)); } template auto consume_Windows_System_RemoteDesktop_Provider_IRemoteDesktopConnectionRemoteInfo::PerformLocalActionRequested(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::System::RemoteDesktop::Provider::IRemoteDesktopConnectionRemoteInfo)->remove_PerformLocalActionRequested(impl::bind_in(token)); } template auto consume_Windows_System_RemoteDesktop_Provider_IRemoteDesktopConnectionRemoteInfoStatics::IsSwitchSupported() const { bool result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::RemoteDesktop::Provider::IRemoteDesktopConnectionRemoteInfoStatics)->IsSwitchSupported(&result)); return result; } template auto consume_Windows_System_RemoteDesktop_Provider_IRemoteDesktopConnectionRemoteInfoStatics::GetForLaunchUri(winrt::Windows::Foundation::Uri const& launchUri) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::RemoteDesktop::Provider::IRemoteDesktopConnectionRemoteInfoStatics)->GetForLaunchUri(*(void**)(&launchUri), &result)); return winrt::Windows::System::RemoteDesktop::Provider::RemoteDesktopConnectionRemoteInfo{ result, take_ownership_from_abi }; } template auto consume_Windows_System_RemoteDesktop_Provider_IRemoteDesktopInfo::DisplayName() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::RemoteDesktop::Provider::IRemoteDesktopInfo)->get_DisplayName(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_RemoteDesktop_Provider_IRemoteDesktopInfo::Id() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::RemoteDesktop::Provider::IRemoteDesktopInfo)->get_Id(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_System_RemoteDesktop_Provider_IRemoteDesktopInfoFactory::CreateInstance(param::hstring const& id, param::hstring const& displayName) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::RemoteDesktop::Provider::IRemoteDesktopInfoFactory)->CreateInstance(*(void**)(&id), *(void**)(&displayName), &value)); return winrt::Windows::System::RemoteDesktop::Provider::RemoteDesktopInfo{ value, take_ownership_from_abi }; } template auto consume_Windows_System_RemoteDesktop_Provider_IRemoteDesktopRegistrarStatics::DesktopInfos() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::RemoteDesktop::Provider::IRemoteDesktopRegistrarStatics)->get_DesktopInfos(&value)); return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_System_RemoteDesktop_Provider_IRemoteDesktopRegistrarStatics::IsSwitchToLocalSessionEnabled() const { bool result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::System::RemoteDesktop::Provider::IRemoteDesktopRegistrarStatics)->IsSwitchToLocalSessionEnabled(&result)); return result; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Action(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Action()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall SetConnectionStatus(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SetConnectionStatus(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SwitchToLocalSession() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().SwitchToLocalSession(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall PerformLocalActionFromRemote(int32_t action) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PerformLocalActionFromRemote(*reinterpret_cast(&action)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetForLaunchUri(void* launchUri, struct struct_Windows_UI_WindowId windowId, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetForLaunchUri(*reinterpret_cast(&launchUri), *reinterpret_cast(&windowId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall ReportSwitched() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ReportSwitched(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_SwitchToLocalSessionRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().SwitchToLocalSessionRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_SwitchToLocalSessionRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().SwitchToLocalSessionRequested(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_PerformLocalActionRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().PerformLocalActionRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_PerformLocalActionRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().PerformLocalActionRequested(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall IsSwitchSupported(bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().IsSwitchSupported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetForLaunchUri(void* launchUri, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetForLaunchUri(*reinterpret_cast(&launchUri))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DisplayName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DisplayName()); return 0; } catch (...) { return to_hresult(); } 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(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstance(void* id, void* displayName, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstance(*reinterpret_cast(&id), *reinterpret_cast(&displayName))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DesktopInfos(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().DesktopInfos()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall IsSwitchToLocalSessionEnabled(bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().IsSwitchToLocalSessionEnabled()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::System::RemoteDesktop::Provider { inline auto RemoteDesktopConnectionInfo::GetForLaunchUri(winrt::Windows::Foundation::Uri const& launchUri, winrt::Windows::UI::WindowId const& windowId) { return impl::call_factory([&](IRemoteDesktopConnectionInfoStatics const& f) { return f.GetForLaunchUri(launchUri, windowId); }); } inline auto RemoteDesktopConnectionRemoteInfo::IsSwitchSupported() { return impl::call_factory_cast([](IRemoteDesktopConnectionRemoteInfoStatics const& f) { return f.IsSwitchSupported(); }); } inline auto RemoteDesktopConnectionRemoteInfo::GetForLaunchUri(winrt::Windows::Foundation::Uri const& launchUri) { return impl::call_factory([&](IRemoteDesktopConnectionRemoteInfoStatics const& f) { return f.GetForLaunchUri(launchUri); }); } inline RemoteDesktopInfo::RemoteDesktopInfo(param::hstring const& id, param::hstring const& displayName) : RemoteDesktopInfo(impl::call_factory([&](IRemoteDesktopInfoFactory const& f) { return f.CreateInstance(id, displayName); })) { } inline auto RemoteDesktopRegistrar::DesktopInfos() { return impl::call_factory_cast(*)(IRemoteDesktopRegistrarStatics const&), RemoteDesktopRegistrar, IRemoteDesktopRegistrarStatics>([](IRemoteDesktopRegistrarStatics const& f) { return f.DesktopInfos(); }); } inline auto RemoteDesktopRegistrar::IsSwitchToLocalSessionEnabled() { return impl::call_factory_cast([](IRemoteDesktopRegistrarStatics const& f) { return f.IsSwitchToLocalSessionEnabled(); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif