// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_ApplicationModel_AppService_H #define WINRT_Windows_ApplicationModel_AppService_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.ApplicationModel.h" #include "winrt/impl/Windows.ApplicationModel.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.System.2.h" #include "winrt/impl/Windows.System.RemoteSystems.2.h" #include "winrt/impl/Windows.ApplicationModel.AppService.2.h" namespace winrt::impl { template auto consume_Windows_ApplicationModel_AppService_IAppServiceCatalogStatics::FindAppServiceProvidersAsync(param::hstring const& appServiceName) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceCatalogStatics)->FindAppServiceProvidersAsync(*(void**)(&appServiceName), &operation)); return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceClosedEventArgs::Status() const { winrt::Windows::ApplicationModel::AppService::AppServiceClosedStatus value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceClosedEventArgs)->get_Status(reinterpret_cast(&value))); return value; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection::AppServiceName() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceConnection)->get_AppServiceName(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection::AppServiceName(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceConnection)->put_AppServiceName(*(void**)(&value))); } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection::PackageFamilyName() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceConnection)->get_PackageFamilyName(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection::PackageFamilyName(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceConnection)->put_PackageFamilyName(*(void**)(&value))); } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection::OpenAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceConnection)->OpenAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection::SendMessageAsync(winrt::Windows::Foundation::Collections::ValueSet const& message) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceConnection)->SendMessageAsync(*(void**)(&message), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection::RequestReceived(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceConnection)->add_RequestReceived(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection::RequestReceived(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, RequestReceived(handler)); } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection::RequestReceived(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceConnection)->remove_RequestReceived(impl::bind_in(token)); } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection::ServiceClosed(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceConnection)->add_ServiceClosed(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection::ServiceClosed(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ServiceClosed(handler)); } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection::ServiceClosed(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceConnection)->remove_ServiceClosed(impl::bind_in(token)); } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection2::OpenRemoteAsync(winrt::Windows::System::RemoteSystems::RemoteSystemConnectionRequest const& remoteSystemConnectionRequest) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceConnection2)->OpenRemoteAsync(*(void**)(&remoteSystemConnectionRequest), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection2::User() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceConnection2)->get_User(&value)); return winrt::Windows::System::User{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection2::User(winrt::Windows::System::User const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceConnection2)->put_User(*(void**)(&value))); } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnectionStatics::SendStatelessMessageAsync(winrt::Windows::ApplicationModel::AppService::AppServiceConnection const& connection, winrt::Windows::System::RemoteSystems::RemoteSystemConnectionRequest const& connectionRequest, winrt::Windows::Foundation::Collections::ValueSet const& message) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceConnectionStatics)->SendStatelessMessageAsync(*(void**)(&connection), *(void**)(&connectionRequest), *(void**)(&message), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceDeferral::Complete() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceDeferral)->Complete()); } template auto consume_Windows_ApplicationModel_AppService_IAppServiceRequest::Message() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceRequest)->get_Message(&value)); return winrt::Windows::Foundation::Collections::ValueSet{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceRequest::SendResponseAsync(winrt::Windows::Foundation::Collections::ValueSet const& message) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceRequest)->SendResponseAsync(*(void**)(&message), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceRequestReceivedEventArgs::Request() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceRequestReceivedEventArgs)->get_Request(&value)); return winrt::Windows::ApplicationModel::AppService::AppServiceRequest{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceRequestReceivedEventArgs::GetDeferral() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceRequestReceivedEventArgs)->GetDeferral(&result)); return winrt::Windows::ApplicationModel::AppService::AppServiceDeferral{ result, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceResponse::Message() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceResponse)->get_Message(&value)); return winrt::Windows::Foundation::Collections::ValueSet{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceResponse::Status() const { winrt::Windows::ApplicationModel::AppService::AppServiceResponseStatus value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceResponse)->get_Status(reinterpret_cast(&value))); return value; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceTriggerDetails::Name() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceTriggerDetails)->get_Name(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceTriggerDetails::CallerPackageFamilyName() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceTriggerDetails)->get_CallerPackageFamilyName(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceTriggerDetails::AppServiceConnection() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceTriggerDetails)->get_AppServiceConnection(&value)); return winrt::Windows::ApplicationModel::AppService::AppServiceConnection{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceTriggerDetails2::IsRemoteSystemConnection() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceTriggerDetails2)->get_IsRemoteSystemConnection(&value)); return value; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceTriggerDetails3::CheckCallerForCapabilityAsync(param::hstring const& capabilityName) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceTriggerDetails3)->CheckCallerForCapabilityAsync(*(void**)(&capabilityName), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceTriggerDetails4::CallerRemoteConnectionToken() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IAppServiceTriggerDetails4)->get_CallerRemoteConnectionToken(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IStatelessAppServiceResponse::Message() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IStatelessAppServiceResponse)->get_Message(&value)); return winrt::Windows::Foundation::Collections::ValueSet{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IStatelessAppServiceResponse::Status() const { winrt::Windows::ApplicationModel::AppService::StatelessAppServiceResponseStatus value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::ApplicationModel::AppService::IStatelessAppServiceResponse)->get_Status(reinterpret_cast(&value))); return value; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall FindAppServiceProvidersAsync(void* appServiceName, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().FindAppServiceProvidersAsync(*reinterpret_cast(&appServiceName))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AppServiceName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AppServiceName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_AppServiceName(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().AppServiceName(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PackageFamilyName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PackageFamilyName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PackageFamilyName(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PackageFamilyName(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall OpenAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().OpenAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SendMessageAsync(void* message, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().SendMessageAsync(*reinterpret_cast(&message))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_RequestReceived(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().RequestReceived(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_RequestReceived(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().RequestReceived(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_ServiceClosed(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ServiceClosed(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ServiceClosed(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ServiceClosed(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall OpenRemoteAsync(void* remoteSystemConnectionRequest, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().OpenRemoteAsync(*reinterpret_cast(&remoteSystemConnectionRequest))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_User(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().User()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_User(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().User(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall SendStatelessMessageAsync(void* connection, void* connectionRequest, void* message, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().SendStatelessMessageAsync(*reinterpret_cast(&connection), *reinterpret_cast(&connectionRequest), *reinterpret_cast(&message))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall Complete() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Complete(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Message(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Message()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall SendResponseAsync(void* message, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().SendResponseAsync(*reinterpret_cast(&message))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Request(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Request()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = 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_Message(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Message()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Name(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Name()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CallerPackageFamilyName(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CallerPackageFamilyName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AppServiceConnection(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AppServiceConnection()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsRemoteSystemConnection(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsRemoteSystemConnection()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CheckCallerForCapabilityAsync(void* capabilityName, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CheckCallerForCapabilityAsync(*reinterpret_cast(&capabilityName))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CallerRemoteConnectionToken(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CallerRemoteConnectionToken()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Message(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Message()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Status(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Status()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::ApplicationModel::AppService { inline auto AppServiceCatalog::FindAppServiceProvidersAsync(param::hstring const& appServiceName) { return impl::call_factory([&](IAppServiceCatalogStatics const& f) { return f.FindAppServiceProvidersAsync(appServiceName); }); } inline AppServiceConnection::AppServiceConnection() : AppServiceConnection(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto AppServiceConnection::SendStatelessMessageAsync(winrt::Windows::ApplicationModel::AppService::AppServiceConnection const& connection, winrt::Windows::System::RemoteSystems::RemoteSystemConnectionRequest const& connectionRequest, winrt::Windows::Foundation::Collections::ValueSet const& message) { return impl::call_factory([&](IAppServiceConnectionStatics const& f) { return f.SendStatelessMessageAsync(connection, connectionRequest, message); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif