// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_Devices_WiFiDirect_H #define WINRT_Windows_Devices_WiFiDirect_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.Devices.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.Networking.2.h" #include "winrt/impl/Windows.Security.Credentials.2.h" #include "winrt/impl/Windows.Storage.Streams.2.h" #include "winrt/impl/Windows.Devices.WiFiDirect.2.h" namespace winrt::impl { template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectAdvertisement::InformationElements() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectAdvertisement)->get_InformationElements(&value)); return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectAdvertisement::InformationElements(param::vector const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectAdvertisement)->put_InformationElements(*(void**)(&value))); } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectAdvertisement::ListenStateDiscoverability() const { winrt::Windows::Devices::WiFiDirect::WiFiDirectAdvertisementListenStateDiscoverability value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectAdvertisement)->get_ListenStateDiscoverability(reinterpret_cast(&value))); return value; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectAdvertisement::ListenStateDiscoverability(winrt::Windows::Devices::WiFiDirect::WiFiDirectAdvertisementListenStateDiscoverability const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectAdvertisement)->put_ListenStateDiscoverability(static_cast(value))); } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectAdvertisement::IsAutonomousGroupOwnerEnabled() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectAdvertisement)->get_IsAutonomousGroupOwnerEnabled(&value)); return value; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectAdvertisement::IsAutonomousGroupOwnerEnabled(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectAdvertisement)->put_IsAutonomousGroupOwnerEnabled(value)); } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectAdvertisement::LegacySettings() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectAdvertisement)->get_LegacySettings(&value)); return winrt::Windows::Devices::WiFiDirect::WiFiDirectLegacySettings{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectAdvertisement2::SupportedConfigurationMethods() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectAdvertisement2)->get_SupportedConfigurationMethods(&value)); return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectAdvertisementPublisher::Advertisement() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectAdvertisementPublisher)->get_Advertisement(&value)); return winrt::Windows::Devices::WiFiDirect::WiFiDirectAdvertisement{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectAdvertisementPublisher::Status() const { winrt::Windows::Devices::WiFiDirect::WiFiDirectAdvertisementPublisherStatus value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectAdvertisementPublisher)->get_Status(reinterpret_cast(&value))); return value; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectAdvertisementPublisher::StatusChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectAdvertisementPublisher)->add_StatusChanged(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectAdvertisementPublisher::StatusChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, StatusChanged(handler)); } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectAdvertisementPublisher::StatusChanged(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectAdvertisementPublisher)->remove_StatusChanged(impl::bind_in(token)); } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectAdvertisementPublisher::Start() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectAdvertisementPublisher)->Start()); } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectAdvertisementPublisher::Stop() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectAdvertisementPublisher)->Stop()); } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectAdvertisementPublisherStatusChangedEventArgs::Status() const { winrt::Windows::Devices::WiFiDirect::WiFiDirectAdvertisementPublisherStatus value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectAdvertisementPublisherStatusChangedEventArgs)->get_Status(reinterpret_cast(&value))); return value; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectAdvertisementPublisherStatusChangedEventArgs::Error() const { winrt::Windows::Devices::WiFiDirect::WiFiDirectError value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectAdvertisementPublisherStatusChangedEventArgs)->get_Error(reinterpret_cast(&value))); return value; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectConnectionListener::ConnectionRequested(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectConnectionListener)->add_ConnectionRequested(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectConnectionListener::ConnectionRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ConnectionRequested(handler)); } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectConnectionListener::ConnectionRequested(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectConnectionListener)->remove_ConnectionRequested(impl::bind_in(token)); } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectConnectionParameters::GroupOwnerIntent() const { int16_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectConnectionParameters)->get_GroupOwnerIntent(&value)); return value; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectConnectionParameters::GroupOwnerIntent(int16_t value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectConnectionParameters)->put_GroupOwnerIntent(value)); } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectConnectionParameters2::PreferenceOrderedConfigurationMethods() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectConnectionParameters2)->get_PreferenceOrderedConfigurationMethods(&value)); return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectConnectionParameters2::PreferredPairingProcedure() const { winrt::Windows::Devices::WiFiDirect::WiFiDirectPairingProcedure value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectConnectionParameters2)->get_PreferredPairingProcedure(reinterpret_cast(&value))); return value; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectConnectionParameters2::PreferredPairingProcedure(winrt::Windows::Devices::WiFiDirect::WiFiDirectPairingProcedure const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectConnectionParameters2)->put_PreferredPairingProcedure(static_cast(value))); } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectConnectionParametersStatics::GetDevicePairingKinds(winrt::Windows::Devices::WiFiDirect::WiFiDirectConfigurationMethod const& configurationMethod) const { winrt::Windows::Devices::Enumeration::DevicePairingKinds result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectConnectionParametersStatics)->GetDevicePairingKinds(static_cast(configurationMethod), reinterpret_cast(&result))); return result; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectConnectionRequest::DeviceInformation() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectConnectionRequest)->get_DeviceInformation(&value)); return winrt::Windows::Devices::Enumeration::DeviceInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectConnectionRequestedEventArgs::GetConnectionRequest() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectConnectionRequestedEventArgs)->GetConnectionRequest(&result)); return winrt::Windows::Devices::WiFiDirect::WiFiDirectConnectionRequest{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectDevice::ConnectionStatus() const { winrt::Windows::Devices::WiFiDirect::WiFiDirectConnectionStatus value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectDevice)->get_ConnectionStatus(reinterpret_cast(&value))); return value; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectDevice::DeviceId() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectDevice)->get_DeviceId(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectDevice::ConnectionStatusChanged(winrt::Windows::Foundation::TypedEventHandler const& handler) const { winrt::event_token token{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectDevice)->add_ConnectionStatusChanged(*(void**)(&handler), put_abi(token))); return token; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectDevice::ConnectionStatusChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ConnectionStatusChanged(handler)); } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectDevice::ConnectionStatusChanged(winrt::event_token const& token) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectDevice)->remove_ConnectionStatusChanged(impl::bind_in(token)); } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectDevice::GetConnectionEndpointPairs() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectDevice)->GetConnectionEndpointPairs(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectDeviceStatics::GetDeviceSelector() const { void* deviceSelector{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectDeviceStatics)->GetDeviceSelector(&deviceSelector)); return hstring{ deviceSelector, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectDeviceStatics::FromIdAsync(param::hstring const& deviceId) const { void* asyncOp{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectDeviceStatics)->FromIdAsync(*(void**)(&deviceId), &asyncOp)); return winrt::Windows::Foundation::IAsyncOperation{ asyncOp, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectDeviceStatics2::GetDeviceSelector(winrt::Windows::Devices::WiFiDirect::WiFiDirectDeviceSelectorType const& type) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectDeviceStatics2)->GetDeviceSelector(static_cast(type), &result)); return hstring{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectDeviceStatics2::FromIdAsync(param::hstring const& deviceId, winrt::Windows::Devices::WiFiDirect::WiFiDirectConnectionParameters const& connectionParameters) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectDeviceStatics2)->FromIdAsync(*(void**)(&deviceId), *(void**)(&connectionParameters), &result)); return winrt::Windows::Foundation::IAsyncOperation{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectInformationElement::Oui() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectInformationElement)->get_Oui(&value)); return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectInformationElement::Oui(winrt::Windows::Storage::Streams::IBuffer const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectInformationElement)->put_Oui(*(void**)(&value))); } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectInformationElement::OuiType() const { uint8_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectInformationElement)->get_OuiType(&value)); return value; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectInformationElement::OuiType(uint8_t value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectInformationElement)->put_OuiType(value)); } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectInformationElement::Value() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectInformationElement)->get_Value(&value)); return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectInformationElement::Value(winrt::Windows::Storage::Streams::IBuffer const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectInformationElement)->put_Value(*(void**)(&value))); } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectInformationElementStatics::CreateFromBuffer(winrt::Windows::Storage::Streams::IBuffer const& buffer) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectInformationElementStatics)->CreateFromBuffer(*(void**)(&buffer), &result)); return winrt::Windows::Foundation::Collections::IVector{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectInformationElementStatics::CreateFromDeviceInformation(winrt::Windows::Devices::Enumeration::DeviceInformation const& deviceInformation) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectInformationElementStatics)->CreateFromDeviceInformation(*(void**)(&deviceInformation), &result)); return winrt::Windows::Foundation::Collections::IVector{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectLegacySettings::IsEnabled() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectLegacySettings)->get_IsEnabled(&value)); return value; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectLegacySettings::IsEnabled(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectLegacySettings)->put_IsEnabled(value)); } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectLegacySettings::Ssid() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectLegacySettings)->get_Ssid(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectLegacySettings::Ssid(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectLegacySettings)->put_Ssid(*(void**)(&value))); } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectLegacySettings::Passphrase() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectLegacySettings)->get_Passphrase(&value)); return winrt::Windows::Security::Credentials::PasswordCredential{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFiDirect_IWiFiDirectLegacySettings::Passphrase(winrt::Windows::Security::Credentials::PasswordCredential const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFiDirect::IWiFiDirectLegacySettings)->put_Passphrase(*(void**)(&value))); } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_InformationElements(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().InformationElements()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_InformationElements(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().InformationElements(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ListenStateDiscoverability(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ListenStateDiscoverability()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ListenStateDiscoverability(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ListenStateDiscoverability(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsAutonomousGroupOwnerEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsAutonomousGroupOwnerEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsAutonomousGroupOwnerEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsAutonomousGroupOwnerEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LegacySettings(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LegacySettings()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SupportedConfigurationMethods(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedConfigurationMethods()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Advertisement(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Advertisement()); 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(); } int32_t __stdcall add_StatusChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().StatusChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_StatusChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().StatusChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall Start() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Start(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Stop() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Stop(); 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(); } int32_t __stdcall get_Error(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Error()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall add_ConnectionRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ConnectionRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ConnectionRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ConnectionRequested(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_GroupOwnerIntent(int16_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GroupOwnerIntent()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_GroupOwnerIntent(int16_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().GroupOwnerIntent(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_PreferenceOrderedConfigurationMethods(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().PreferenceOrderedConfigurationMethods()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PreferredPairingProcedure(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PreferredPairingProcedure()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_PreferredPairingProcedure(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().PreferredPairingProcedure(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDevicePairingKinds(int32_t configurationMethod, uint32_t* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDevicePairingKinds(*reinterpret_cast(&configurationMethod))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DeviceInformation(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DeviceInformation()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetConnectionRequest(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetConnectionRequest()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ConnectionStatus(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ConnectionStatus()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DeviceId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DeviceId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_ConnectionStatusChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ConnectionStatusChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ConnectionStatusChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ConnectionStatusChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall GetConnectionEndpointPairs(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().GetConnectionEndpointPairs()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDeviceSelector(void** deviceSelector) noexcept final try { clear_abi(deviceSelector); typename D::abi_guard guard(this->shim()); *deviceSelector = detach_from(this->shim().GetDeviceSelector()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FromIdAsync(void* deviceId, void** asyncOp) noexcept final try { clear_abi(asyncOp); typename D::abi_guard guard(this->shim()); *asyncOp = detach_from>(this->shim().FromIdAsync(*reinterpret_cast(&deviceId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDeviceSelector(int32_t type, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDeviceSelector(*reinterpret_cast(&type))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall FromIdAsync(void* deviceId, void* connectionParameters, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().FromIdAsync(*reinterpret_cast(&deviceId), *reinterpret_cast(&connectionParameters))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Oui(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Oui()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Oui(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Oui(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_OuiType(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().OuiType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_OuiType(uint8_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().OuiType(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Value(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Value()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Value(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Value(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateFromBuffer(void* buffer, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().CreateFromBuffer(*reinterpret_cast(&buffer))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateFromDeviceInformation(void* deviceInformation, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from>(this->shim().CreateFromDeviceInformation(*reinterpret_cast(&deviceInformation))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_IsEnabled(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsEnabled()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsEnabled(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsEnabled(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Ssid(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Ssid()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Ssid(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Ssid(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Passphrase(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Passphrase()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Passphrase(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Passphrase(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Devices::WiFiDirect { inline WiFiDirectAdvertisementPublisher::WiFiDirectAdvertisementPublisher() : WiFiDirectAdvertisementPublisher(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline WiFiDirectConnectionListener::WiFiDirectConnectionListener() : WiFiDirectConnectionListener(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline WiFiDirectConnectionParameters::WiFiDirectConnectionParameters() : WiFiDirectConnectionParameters(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto WiFiDirectConnectionParameters::GetDevicePairingKinds(winrt::Windows::Devices::WiFiDirect::WiFiDirectConfigurationMethod const& configurationMethod) { return impl::call_factory([&](IWiFiDirectConnectionParametersStatics const& f) { return f.GetDevicePairingKinds(configurationMethod); }); } inline auto WiFiDirectDevice::GetDeviceSelector() { return impl::call_factory_cast([](IWiFiDirectDeviceStatics const& f) { return f.GetDeviceSelector(); }); } inline auto WiFiDirectDevice::FromIdAsync(param::hstring const& deviceId) { return impl::call_factory([&](IWiFiDirectDeviceStatics const& f) { return f.FromIdAsync(deviceId); }); } inline auto WiFiDirectDevice::GetDeviceSelector(winrt::Windows::Devices::WiFiDirect::WiFiDirectDeviceSelectorType const& type) { return impl::call_factory([&](IWiFiDirectDeviceStatics2 const& f) { return f.GetDeviceSelector(type); }); } inline auto WiFiDirectDevice::FromIdAsync(param::hstring const& deviceId, winrt::Windows::Devices::WiFiDirect::WiFiDirectConnectionParameters const& connectionParameters) { return impl::call_factory([&](IWiFiDirectDeviceStatics2 const& f) { return f.FromIdAsync(deviceId, connectionParameters); }); } inline WiFiDirectInformationElement::WiFiDirectInformationElement() : WiFiDirectInformationElement(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto WiFiDirectInformationElement::CreateFromBuffer(winrt::Windows::Storage::Streams::IBuffer const& buffer) { return impl::call_factory([&](IWiFiDirectInformationElementStatics const& f) { return f.CreateFromBuffer(buffer); }); } inline auto WiFiDirectInformationElement::CreateFromDeviceInformation(winrt::Windows::Devices::Enumeration::DeviceInformation const& deviceInformation) { return impl::call_factory([&](IWiFiDirectInformationElementStatics const& f) { return f.CreateFromDeviceInformation(deviceInformation); }); } } 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 {}; 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