// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #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.250303.1"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.250303.1" #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{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->FindAppServiceProvidersAsync(*(void**)(&appServiceName), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->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{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_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_Status(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } return value; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection::AppServiceName() 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_AppServiceName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AppServiceName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection::AppServiceName(param::hstring 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_AppServiceName(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_AppServiceName(*(void**)(&value))); } } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection::PackageFamilyName() 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_PackageFamilyName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PackageFamilyName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection::PackageFamilyName(param::hstring 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_PackageFamilyName(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_PackageFamilyName(*(void**)(&value))); } } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection::OpenAsync() 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->OpenAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->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{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SendMessageAsync(*(void**)(&message), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->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{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_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_RequestReceived(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->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 { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_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_RequestReceived(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->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{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_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_ServiceClosed(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->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 { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_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_ServiceClosed(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ServiceClosed(impl::bind_in(token)); } } template auto consume_Windows_ApplicationModel_AppService_IAppServiceConnection2::OpenRemoteAsync(winrt::Windows::System::RemoteSystems::RemoteSystemConnectionRequest const& remoteSystemConnectionRequest) 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->OpenRemoteAsync(*(void**)(&remoteSystemConnectionRequest), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->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{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_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_User(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->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 { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_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_User(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->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{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SendStatelessMessageAsync(*(void**)(&connection), *(void**)(&connectionRequest), *(void**)(&message), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->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 { if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->Complete()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Complete()); } } template auto consume_Windows_ApplicationModel_AppService_IAppServiceRequest::Message() 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_Message(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->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{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_cast_result_code); check_hresult(_winrt_cast_result_code); auto const _winrt_abi_type = *(abi_t**)&_winrt_casted_result; check_hresult(_winrt_abi_type->SendResponseAsync(*(void**)(&message), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->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{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_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_Request(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->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{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_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(&result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&result)); } return winrt::Windows::ApplicationModel::AppService::AppServiceDeferral{ result, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceResponse::Message() 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_Message(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->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{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_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_Status(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Status(reinterpret_cast(&value))); } return value; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceTriggerDetails::Name() 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_Name(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Name(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceTriggerDetails::CallerPackageFamilyName() 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_CallerPackageFamilyName(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CallerPackageFamilyName(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceTriggerDetails::AppServiceConnection() 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_AppServiceConnection(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->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{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_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_IsRemoteSystemConnection(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsRemoteSystemConnection(&value)); } return value; } template auto consume_Windows_ApplicationModel_AppService_IAppServiceTriggerDetails3::CheckCallerForCapabilityAsync(param::hstring const& capabilityName) 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->CheckCallerForCapabilityAsync(*(void**)(&capabilityName), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->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{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_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_CallerRemoteConnectionToken(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CallerRemoteConnectionToken(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_ApplicationModel_AppService_IStatelessAppServiceResponse::Message() 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_Message(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->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{}; if constexpr (!std::is_same_v) { winrt::hresult _winrt_cast_result_code; auto const _winrt_casted_result = impl::try_as_with_reason(static_cast(this), _winrt_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_Status(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->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