// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Windows_Devices_WiFi_H #define WINRT_Windows_Devices_WiFi_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.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Networking.Connectivity.2.h" #include "winrt/impl/Windows.Security.Credentials.2.h" #include "winrt/impl/Windows.Devices.WiFi.2.h" namespace winrt::impl { template auto consume_Windows_Devices_WiFi_IWiFiAdapter::NetworkAdapter() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAdapter)->get_NetworkAdapter(&value)); return winrt::Windows::Networking::Connectivity::NetworkAdapter{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiAdapter::ScanAsync() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAdapter)->ScanAsync(&value)); return winrt::Windows::Foundation::IAsyncAction{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiAdapter::NetworkReport() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAdapter)->get_NetworkReport(&value)); return winrt::Windows::Devices::WiFi::WiFiNetworkReport{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiAdapter::AvailableNetworksChanged(winrt::Windows::Foundation::TypedEventHandler const& args) const { winrt::event_token eventCookie{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAdapter)->add_AvailableNetworksChanged(*(void**)(&args), put_abi(eventCookie))); return eventCookie; } template auto consume_Windows_Devices_WiFi_IWiFiAdapter::AvailableNetworksChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& args) const { return impl::make_event_revoker(this, AvailableNetworksChanged(args)); } template auto consume_Windows_Devices_WiFi_IWiFiAdapter::AvailableNetworksChanged(winrt::event_token const& eventCookie) const noexcept { WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAdapter)->remove_AvailableNetworksChanged(impl::bind_in(eventCookie)); } template auto consume_Windows_Devices_WiFi_IWiFiAdapter::ConnectAsync(winrt::Windows::Devices::WiFi::WiFiAvailableNetwork const& availableNetwork, winrt::Windows::Devices::WiFi::WiFiReconnectionKind const& reconnectionKind) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAdapter)->ConnectAsync(*(void**)(&availableNetwork), static_cast(reconnectionKind), &value)); return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiAdapter::ConnectAsync(winrt::Windows::Devices::WiFi::WiFiAvailableNetwork const& availableNetwork, winrt::Windows::Devices::WiFi::WiFiReconnectionKind const& reconnectionKind, winrt::Windows::Security::Credentials::PasswordCredential const& passwordCredential) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAdapter)->ConnectWithPasswordCredentialAsync(*(void**)(&availableNetwork), static_cast(reconnectionKind), *(void**)(&passwordCredential), &value)); return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiAdapter::ConnectAsync(winrt::Windows::Devices::WiFi::WiFiAvailableNetwork const& availableNetwork, winrt::Windows::Devices::WiFi::WiFiReconnectionKind const& reconnectionKind, winrt::Windows::Security::Credentials::PasswordCredential const& passwordCredential, param::hstring const& ssid) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAdapter)->ConnectWithPasswordCredentialAndSsidAsync(*(void**)(&availableNetwork), static_cast(reconnectionKind), *(void**)(&passwordCredential), *(void**)(&ssid), &value)); return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiAdapter::Disconnect() const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAdapter)->Disconnect()); } template auto consume_Windows_Devices_WiFi_IWiFiAdapter2::GetWpsConfigurationAsync(winrt::Windows::Devices::WiFi::WiFiAvailableNetwork const& availableNetwork) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAdapter2)->GetWpsConfigurationAsync(*(void**)(&availableNetwork), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiAdapter2::ConnectAsync(winrt::Windows::Devices::WiFi::WiFiAvailableNetwork const& availableNetwork, winrt::Windows::Devices::WiFi::WiFiReconnectionKind const& reconnectionKind, winrt::Windows::Security::Credentials::PasswordCredential const& passwordCredential, param::hstring const& ssid, winrt::Windows::Devices::WiFi::WiFiConnectionMethod const& connectionMethod) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAdapter2)->ConnectWithPasswordCredentialAndSsidAndConnectionMethodAsync(*(void**)(&availableNetwork), static_cast(reconnectionKind), *(void**)(&passwordCredential), *(void**)(&ssid), static_cast(connectionMethod), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiAdapterStatics::FindAllAdaptersAsync() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAdapterStatics)->FindAllAdaptersAsync(&value)); return winrt::Windows::Foundation::IAsyncOperation>{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiAdapterStatics::GetDeviceSelector() const { void* deviceSelector{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAdapterStatics)->GetDeviceSelector(&deviceSelector)); return hstring{ deviceSelector, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiAdapterStatics::FromIdAsync(param::hstring const& deviceId) const { void* asyncOp{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAdapterStatics)->FromIdAsync(*(void**)(&deviceId), &asyncOp)); return winrt::Windows::Foundation::IAsyncOperation{ asyncOp, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiAdapterStatics::RequestAccessAsync() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAdapterStatics)->RequestAccessAsync(&value)); return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiAvailableNetwork::Uptime() const { winrt::Windows::Foundation::TimeSpan value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAvailableNetwork)->get_Uptime(put_abi(value))); return value; } template auto consume_Windows_Devices_WiFi_IWiFiAvailableNetwork::Ssid() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAvailableNetwork)->get_Ssid(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiAvailableNetwork::Bssid() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAvailableNetwork)->get_Bssid(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiAvailableNetwork::ChannelCenterFrequencyInKilohertz() const { int32_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAvailableNetwork)->get_ChannelCenterFrequencyInKilohertz(&value)); return value; } template auto consume_Windows_Devices_WiFi_IWiFiAvailableNetwork::NetworkRssiInDecibelMilliwatts() const { double value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAvailableNetwork)->get_NetworkRssiInDecibelMilliwatts(&value)); return value; } template auto consume_Windows_Devices_WiFi_IWiFiAvailableNetwork::SignalBars() const { uint8_t value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAvailableNetwork)->get_SignalBars(&value)); return value; } template auto consume_Windows_Devices_WiFi_IWiFiAvailableNetwork::NetworkKind() const { winrt::Windows::Devices::WiFi::WiFiNetworkKind value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAvailableNetwork)->get_NetworkKind(reinterpret_cast(&value))); return value; } template auto consume_Windows_Devices_WiFi_IWiFiAvailableNetwork::PhyKind() const { winrt::Windows::Devices::WiFi::WiFiPhyKind value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAvailableNetwork)->get_PhyKind(reinterpret_cast(&value))); return value; } template auto consume_Windows_Devices_WiFi_IWiFiAvailableNetwork::SecuritySettings() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAvailableNetwork)->get_SecuritySettings(&value)); return winrt::Windows::Networking::Connectivity::NetworkSecuritySettings{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiAvailableNetwork::BeaconInterval() const { winrt::Windows::Foundation::TimeSpan value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAvailableNetwork)->get_BeaconInterval(put_abi(value))); return value; } template auto consume_Windows_Devices_WiFi_IWiFiAvailableNetwork::IsWiFiDirect() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiAvailableNetwork)->get_IsWiFiDirect(&value)); return value; } template auto consume_Windows_Devices_WiFi_IWiFiConnectionResult::ConnectionStatus() const { winrt::Windows::Devices::WiFi::WiFiConnectionStatus value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiConnectionResult)->get_ConnectionStatus(reinterpret_cast(&value))); return value; } template auto consume_Windows_Devices_WiFi_IWiFiNetworkReport::Timestamp() const { winrt::Windows::Foundation::DateTime value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiNetworkReport)->get_Timestamp(put_abi(value))); return value; } template auto consume_Windows_Devices_WiFi_IWiFiNetworkReport::AvailableNetworks() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiNetworkReport)->get_AvailableNetworks(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotConnectTriggerDetails::RequestedNetwork() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotConnectTriggerDetails)->get_RequestedNetwork(&value)); return winrt::Windows::Devices::WiFi::WiFiOnDemandHotspotNetwork{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotConnectTriggerDetails::ReportError(winrt::Windows::Devices::WiFi::WiFiOnDemandHotspotConnectStatus const& status) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotConnectTriggerDetails)->ReportError(static_cast(status))); } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotConnectTriggerDetails::ConnectAsync() const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotConnectTriggerDetails)->ConnectAsync(&operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotConnectTriggerDetails::Connect() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotConnectTriggerDetails)->Connect(&result)); return winrt::Windows::Devices::WiFi::WiFiOnDemandHotspotConnectionResult{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotConnectionResult::Status() const { winrt::Windows::Devices::WiFi::WiFiOnDemandHotspotConnectStatus value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotConnectionResult)->get_Status(reinterpret_cast(&value))); return value; } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotNetwork::GetProperties() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotNetwork)->GetProperties(&result)); return winrt::Windows::Devices::WiFi::WiFiOnDemandHotspotNetworkProperties{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotNetwork::UpdateProperties(winrt::Windows::Devices::WiFi::WiFiOnDemandHotspotNetworkProperties const& newProperties) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotNetwork)->UpdateProperties(*(void**)(&newProperties))); } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotNetwork::Id() const { winrt::guid value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotNetwork)->get_Id(put_abi(value))); return value; } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotNetworkProperties::DisplayName() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotNetworkProperties)->get_DisplayName(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotNetworkProperties::DisplayName(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotNetworkProperties)->put_DisplayName(*(void**)(&value))); } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotNetworkProperties::Availability() const { winrt::Windows::Devices::WiFi::WiFiOnDemandHotspotAvailability value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotNetworkProperties)->get_Availability(reinterpret_cast(&value))); return value; } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotNetworkProperties::Availability(winrt::Windows::Devices::WiFi::WiFiOnDemandHotspotAvailability const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotNetworkProperties)->put_Availability(static_cast(value))); } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotNetworkProperties::RemainingBatteryPercent() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotNetworkProperties)->get_RemainingBatteryPercent(&value)); return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotNetworkProperties::RemainingBatteryPercent(winrt::Windows::Foundation::IReference const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotNetworkProperties)->put_RemainingBatteryPercent(*(void**)(&value))); } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotNetworkProperties::CellularBars() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotNetworkProperties)->get_CellularBars(&value)); return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotNetworkProperties::CellularBars(winrt::Windows::Foundation::IReference const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotNetworkProperties)->put_CellularBars(*(void**)(&value))); } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotNetworkProperties::IsMetered() const { bool value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotNetworkProperties)->get_IsMetered(&value)); return value; } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotNetworkProperties::IsMetered(bool value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotNetworkProperties)->put_IsMetered(value)); } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotNetworkProperties::Ssid() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotNetworkProperties)->get_Ssid(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotNetworkProperties::Ssid(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotNetworkProperties)->put_Ssid(*(void**)(&value))); } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotNetworkProperties::Password() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotNetworkProperties)->get_Password(&value)); return winrt::Windows::Security::Credentials::PasswordCredential{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotNetworkProperties::Password(winrt::Windows::Security::Credentials::PasswordCredential const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotNetworkProperties)->put_Password(*(void**)(&value))); } template auto consume_Windows_Devices_WiFi_IWiFiOnDemandHotspotNetworkStatics::GetOrCreateById(winrt::guid const& networkId) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiOnDemandHotspotNetworkStatics)->GetOrCreateById(impl::bind_in(networkId), &result)); return winrt::Windows::Devices::WiFi::WiFiOnDemandHotspotNetwork{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_WiFi_IWiFiWpsConfigurationResult::Status() const { winrt::Windows::Devices::WiFi::WiFiWpsConfigurationStatus value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiWpsConfigurationResult)->get_Status(reinterpret_cast(&value))); return value; } template auto consume_Windows_Devices_WiFi_IWiFiWpsConfigurationResult::SupportedWpsKinds() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Windows::Devices::WiFi::IWiFiWpsConfigurationResult)->get_SupportedWpsKinds(&value)); return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_NetworkAdapter(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NetworkAdapter()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ScanAsync(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ScanAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NetworkReport(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NetworkReport()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_AvailableNetworksChanged(void* args, winrt::event_token* eventCookie) noexcept final try { zero_abi(eventCookie); typename D::abi_guard guard(this->shim()); *eventCookie = detach_from(this->shim().AvailableNetworksChanged(*reinterpret_cast const*>(&args))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_AvailableNetworksChanged(winrt::event_token eventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().AvailableNetworksChanged(*reinterpret_cast(&eventCookie)); return 0; } int32_t __stdcall ConnectAsync(void* availableNetwork, int32_t reconnectionKind, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ConnectAsync(*reinterpret_cast(&availableNetwork), *reinterpret_cast(&reconnectionKind))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ConnectWithPasswordCredentialAsync(void* availableNetwork, int32_t reconnectionKind, void* passwordCredential, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ConnectAsync(*reinterpret_cast(&availableNetwork), *reinterpret_cast(&reconnectionKind), *reinterpret_cast(&passwordCredential))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ConnectWithPasswordCredentialAndSsidAsync(void* availableNetwork, int32_t reconnectionKind, void* passwordCredential, void* ssid, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ConnectAsync(*reinterpret_cast(&availableNetwork), *reinterpret_cast(&reconnectionKind), *reinterpret_cast(&passwordCredential), *reinterpret_cast(&ssid))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Disconnect() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Disconnect(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetWpsConfigurationAsync(void* availableNetwork, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetWpsConfigurationAsync(*reinterpret_cast(&availableNetwork))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ConnectWithPasswordCredentialAndSsidAndConnectionMethodAsync(void* availableNetwork, int32_t reconnectionKind, void* passwordCredential, void* ssid, int32_t connectionMethod, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().ConnectAsync(*reinterpret_cast(&availableNetwork), *reinterpret_cast(&reconnectionKind), *reinterpret_cast(&passwordCredential), *reinterpret_cast(&ssid), *reinterpret_cast(&connectionMethod))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall FindAllAdaptersAsync(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>>(this->shim().FindAllAdaptersAsync()); return 0; } catch (...) { return to_hresult(); } 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(); } int32_t __stdcall RequestAccessAsync(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().RequestAccessAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Uptime(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Uptime()); 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 get_Bssid(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Bssid()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ChannelCenterFrequencyInKilohertz(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ChannelCenterFrequencyInKilohertz()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NetworkRssiInDecibelMilliwatts(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NetworkRssiInDecibelMilliwatts()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SignalBars(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SignalBars()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NetworkKind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NetworkKind()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PhyKind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PhyKind()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SecuritySettings(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SecuritySettings()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BeaconInterval(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BeaconInterval()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsWiFiDirect(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsWiFiDirect()); 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(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Timestamp(int64_t* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Timestamp()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AvailableNetworks(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().AvailableNetworks()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_RequestedNetwork(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RequestedNetwork()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ReportError(int32_t status) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ReportError(*reinterpret_cast(&status)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ConnectAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().ConnectAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall Connect(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().Connect()); 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 GetProperties(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetProperties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall UpdateProperties(void* newProperties) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UpdateProperties(*reinterpret_cast(&newProperties)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Id(winrt::guid* value) noexcept final try { 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 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 put_DisplayName(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().DisplayName(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Availability(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Availability()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Availability(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Availability(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RemainingBatteryPercent(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().RemainingBatteryPercent()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_RemainingBatteryPercent(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RemainingBatteryPercent(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CellularBars(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().CellularBars()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CellularBars(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CellularBars(*reinterpret_cast const*>(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsMetered(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsMetered()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsMetered(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsMetered(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_Password(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Password()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Password(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Password(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetOrCreateById(winrt::guid networkId, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetOrCreateById(*reinterpret_cast(&networkId))); 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_SupportedWpsKinds(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SupportedWpsKinds()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Devices::WiFi { inline auto WiFiAdapter::FindAllAdaptersAsync() { return impl::call_factory_cast>(*)(IWiFiAdapterStatics const&), WiFiAdapter, IWiFiAdapterStatics>([](IWiFiAdapterStatics const& f) { return f.FindAllAdaptersAsync(); }); } inline auto WiFiAdapter::GetDeviceSelector() { return impl::call_factory_cast([](IWiFiAdapterStatics const& f) { return f.GetDeviceSelector(); }); } inline auto WiFiAdapter::FromIdAsync(param::hstring const& deviceId) { return impl::call_factory([&](IWiFiAdapterStatics const& f) { return f.FromIdAsync(deviceId); }); } inline auto WiFiAdapter::RequestAccessAsync() { return impl::call_factory_cast(*)(IWiFiAdapterStatics const&), WiFiAdapter, IWiFiAdapterStatics>([](IWiFiAdapterStatics const& f) { return f.RequestAccessAsync(); }); } inline auto WiFiOnDemandHotspotNetwork::GetOrCreateById(winrt::guid const& networkId) { return impl::call_factory([&](IWiFiOnDemandHotspotNetworkStatics const& f) { return f.GetOrCreateById(networkId); }); } } 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 {}; #endif #ifdef __cpp_lib_format #endif } #endif