// C++/WinRT v2.0.250303.1 // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #ifndef WINRT_Windows_Devices_Bluetooth_GenericAttributeProfile_H #define WINRT_Windows_Devices_Bluetooth_GenericAttributeProfile_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.Devices.Bluetooth.h" #include "winrt/impl/Windows.Devices.Bluetooth.2.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.Storage.Streams.2.h" #include "winrt/impl/Windows.Devices.Bluetooth.GenericAttributeProfile.2.h" namespace winrt::impl { template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic::GetDescriptors(winrt::guid const& descriptorUuid) 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->GetDescriptors(impl::bind_in(descriptorUuid), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDescriptors(impl::bind_in(descriptorUuid), &value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic::CharacteristicProperties() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCharacteristicProperties 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_CharacteristicProperties(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CharacteristicProperties(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic::ProtectionLevel() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel 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_ProtectionLevel(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProtectionLevel(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic::ProtectionLevel(winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel 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_ProtectionLevel(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ProtectionLevel(static_cast(value))); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic::UserDescription() 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_UserDescription(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UserDescription(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic::Uuid() const { winrt::guid 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_Uuid(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Uuid(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic::AttributeHandle() const { uint16_t 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_AttributeHandle(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AttributeHandle(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic::PresentationFormats() 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_PresentationFormats(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PresentationFormats(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic::ReadValueAsync() 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->ReadValueAsync(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ReadValueAsync(&value)); } return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic::ReadValueAsync(winrt::Windows::Devices::Bluetooth::BluetoothCacheMode const& cacheMode) 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->ReadValueWithCacheModeAsync(static_cast(cacheMode), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ReadValueWithCacheModeAsync(static_cast(cacheMode), &value)); } return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic::WriteValueAsync(winrt::Windows::Storage::Streams::IBuffer const& value) const { void* asyncOp{}; 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->WriteValueAsync(*(void**)(&value), &asyncOp)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->WriteValueAsync(*(void**)(&value), &asyncOp)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOp, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic::WriteValueAsync(winrt::Windows::Storage::Streams::IBuffer const& value, winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattWriteOption const& writeOption) const { void* asyncOp{}; 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->WriteValueWithOptionAsync(*(void**)(&value), static_cast(writeOption), &asyncOp)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->WriteValueWithOptionAsync(*(void**)(&value), static_cast(writeOption), &asyncOp)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOp, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic::ReadClientCharacteristicConfigurationDescriptorAsync() const { void* asyncOp{}; 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->ReadClientCharacteristicConfigurationDescriptorAsync(&asyncOp)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ReadClientCharacteristicConfigurationDescriptorAsync(&asyncOp)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOp, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic::WriteClientCharacteristicConfigurationDescriptorAsync(winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattClientCharacteristicConfigurationDescriptorValue const& clientCharacteristicConfigurationDescriptorValue) const { void* asyncOp{}; 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->WriteClientCharacteristicConfigurationDescriptorAsync(static_cast(clientCharacteristicConfigurationDescriptorValue), &asyncOp)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->WriteClientCharacteristicConfigurationDescriptorAsync(static_cast(clientCharacteristicConfigurationDescriptorValue), &asyncOp)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOp, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic::ValueChanged(winrt::Windows::Foundation::TypedEventHandler const& valueChangedHandler) const { winrt::event_token valueChangedEventCookie{}; 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_ValueChanged(*(void**)(&valueChangedHandler), put_abi(valueChangedEventCookie))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ValueChanged(*(void**)(&valueChangedHandler), put_abi(valueChangedEventCookie))); } return valueChangedEventCookie; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic::ValueChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& valueChangedHandler) const { return impl::make_event_revoker(this, ValueChanged(valueChangedHandler)); } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic::ValueChanged(winrt::event_token const& valueChangedEventCookie) 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_ValueChanged(impl::bind_in(valueChangedEventCookie)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ValueChanged(impl::bind_in(valueChangedEventCookie)); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic2::Service() 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_Service(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Service(&value)); } return winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattDeviceService{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic2::GetAllDescriptors() const { void* descriptors{}; 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->GetAllDescriptors(&descriptors)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAllDescriptors(&descriptors)); } return winrt::Windows::Foundation::Collections::IVectorView{ descriptors, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic3::GetDescriptorsAsync() 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->GetDescriptorsAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDescriptorsAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic3::GetDescriptorsAsync(winrt::Windows::Devices::Bluetooth::BluetoothCacheMode const& cacheMode) 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->GetDescriptorsWithCacheModeAsync(static_cast(cacheMode), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDescriptorsWithCacheModeAsync(static_cast(cacheMode), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic3::GetDescriptorsForUuidAsync(winrt::guid const& descriptorUuid) 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->GetDescriptorsForUuidAsync(impl::bind_in(descriptorUuid), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDescriptorsForUuidAsync(impl::bind_in(descriptorUuid), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic3::GetDescriptorsForUuidAsync(winrt::guid const& descriptorUuid, winrt::Windows::Devices::Bluetooth::BluetoothCacheMode const& cacheMode) 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->GetDescriptorsForUuidWithCacheModeAsync(impl::bind_in(descriptorUuid), static_cast(cacheMode), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDescriptorsForUuidWithCacheModeAsync(impl::bind_in(descriptorUuid), static_cast(cacheMode), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic3::WriteValueWithResultAsync(winrt::Windows::Storage::Streams::IBuffer const& value) 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->WriteValueWithResultAsync(*(void**)(&value), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->WriteValueWithResultAsync(*(void**)(&value), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic3::WriteValueWithResultAsync(winrt::Windows::Storage::Streams::IBuffer const& value, winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattWriteOption const& writeOption) 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->WriteValueWithResultAndOptionAsync(*(void**)(&value), static_cast(writeOption), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->WriteValueWithResultAndOptionAsync(*(void**)(&value), static_cast(writeOption), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristic3::WriteClientCharacteristicConfigurationDescriptorWithResultAsync(winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattClientCharacteristicConfigurationDescriptorValue const& clientCharacteristicConfigurationDescriptorValue) 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->WriteClientCharacteristicConfigurationDescriptorWithResultAsync(static_cast(clientCharacteristicConfigurationDescriptorValue), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->WriteClientCharacteristicConfigurationDescriptorWithResultAsync(static_cast(clientCharacteristicConfigurationDescriptorValue), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicStatics::ConvertShortIdToUuid(uint16_t shortId) const { winrt::guid characteristicUuid{}; 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->ConvertShortIdToUuid(shortId, put_abi(characteristicUuid))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ConvertShortIdToUuid(shortId, put_abi(characteristicUuid))); } return characteristicUuid; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::BatteryLevel() const { winrt::guid 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_BatteryLevel(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BatteryLevel(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::BloodPressureFeature() const { winrt::guid 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_BloodPressureFeature(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BloodPressureFeature(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::BloodPressureMeasurement() const { winrt::guid 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_BloodPressureMeasurement(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BloodPressureMeasurement(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::BodySensorLocation() const { winrt::guid 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_BodySensorLocation(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BodySensorLocation(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::CscFeature() const { winrt::guid 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_CscFeature(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CscFeature(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::CscMeasurement() const { winrt::guid 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_CscMeasurement(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CscMeasurement(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::GlucoseFeature() const { winrt::guid 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_GlucoseFeature(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_GlucoseFeature(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::GlucoseMeasurement() const { winrt::guid 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_GlucoseMeasurement(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_GlucoseMeasurement(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::GlucoseMeasurementContext() const { winrt::guid 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_GlucoseMeasurementContext(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_GlucoseMeasurementContext(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::HeartRateControlPoint() const { winrt::guid 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_HeartRateControlPoint(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HeartRateControlPoint(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::HeartRateMeasurement() const { winrt::guid 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_HeartRateMeasurement(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HeartRateMeasurement(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::IntermediateCuffPressure() const { winrt::guid 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_IntermediateCuffPressure(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IntermediateCuffPressure(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::IntermediateTemperature() const { winrt::guid 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_IntermediateTemperature(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IntermediateTemperature(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::MeasurementInterval() const { winrt::guid 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_MeasurementInterval(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MeasurementInterval(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::RecordAccessControlPoint() const { winrt::guid 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_RecordAccessControlPoint(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RecordAccessControlPoint(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::RscFeature() const { winrt::guid 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_RscFeature(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RscFeature(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::RscMeasurement() const { winrt::guid 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_RscMeasurement(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RscMeasurement(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::SCControlPoint() const { winrt::guid 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_SCControlPoint(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SCControlPoint(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::SensorLocation() const { winrt::guid 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_SensorLocation(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SensorLocation(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::TemperatureMeasurement() const { winrt::guid 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_TemperatureMeasurement(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TemperatureMeasurement(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics::TemperatureType() const { winrt::guid 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_TemperatureType(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TemperatureType(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::AlertCategoryId() const { winrt::guid 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_AlertCategoryId(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AlertCategoryId(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::AlertCategoryIdBitMask() const { winrt::guid 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_AlertCategoryIdBitMask(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AlertCategoryIdBitMask(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::AlertLevel() const { winrt::guid 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_AlertLevel(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AlertLevel(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::AlertNotificationControlPoint() const { winrt::guid 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_AlertNotificationControlPoint(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AlertNotificationControlPoint(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::AlertStatus() const { winrt::guid 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_AlertStatus(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AlertStatus(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::GapAppearance() const { winrt::guid 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_GapAppearance(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_GapAppearance(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::BootKeyboardInputReport() const { winrt::guid 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_BootKeyboardInputReport(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BootKeyboardInputReport(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::BootKeyboardOutputReport() const { winrt::guid 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_BootKeyboardOutputReport(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BootKeyboardOutputReport(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::BootMouseInputReport() const { winrt::guid 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_BootMouseInputReport(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BootMouseInputReport(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::CurrentTime() const { winrt::guid 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_CurrentTime(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CurrentTime(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::CyclingPowerControlPoint() const { winrt::guid 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_CyclingPowerControlPoint(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CyclingPowerControlPoint(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::CyclingPowerFeature() const { winrt::guid 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_CyclingPowerFeature(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CyclingPowerFeature(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::CyclingPowerMeasurement() const { winrt::guid 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_CyclingPowerMeasurement(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CyclingPowerMeasurement(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::CyclingPowerVector() const { winrt::guid 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_CyclingPowerVector(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CyclingPowerVector(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::DateTime() const { winrt::guid 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_DateTime(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DateTime(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::DayDateTime() const { winrt::guid 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_DayDateTime(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DayDateTime(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::DayOfWeek() const { winrt::guid 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_DayOfWeek(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DayOfWeek(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::GapDeviceName() const { winrt::guid 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_GapDeviceName(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_GapDeviceName(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::DstOffset() const { winrt::guid 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_DstOffset(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DstOffset(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::ExactTime256() const { winrt::guid 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_ExactTime256(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ExactTime256(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::FirmwareRevisionString() const { winrt::guid 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_FirmwareRevisionString(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FirmwareRevisionString(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::HardwareRevisionString() const { winrt::guid 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_HardwareRevisionString(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HardwareRevisionString(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::HidControlPoint() const { winrt::guid 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_HidControlPoint(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HidControlPoint(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::HidInformation() const { winrt::guid 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_HidInformation(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HidInformation(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::Ieee1107320601RegulatoryCertificationDataList() const { winrt::guid 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_Ieee1107320601RegulatoryCertificationDataList(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Ieee1107320601RegulatoryCertificationDataList(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::LnControlPoint() const { winrt::guid 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_LnControlPoint(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_LnControlPoint(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::LnFeature() const { winrt::guid 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_LnFeature(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_LnFeature(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::LocalTimeInformation() const { winrt::guid 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_LocalTimeInformation(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_LocalTimeInformation(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::LocationAndSpeed() const { winrt::guid 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_LocationAndSpeed(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_LocationAndSpeed(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::ManufacturerNameString() const { winrt::guid 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_ManufacturerNameString(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ManufacturerNameString(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::ModelNumberString() const { winrt::guid 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_ModelNumberString(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ModelNumberString(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::Navigation() const { winrt::guid 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_Navigation(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Navigation(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::NewAlert() const { winrt::guid 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_NewAlert(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NewAlert(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::GapPeripheralPreferredConnectionParameters() const { winrt::guid 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_GapPeripheralPreferredConnectionParameters(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_GapPeripheralPreferredConnectionParameters(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::GapPeripheralPrivacyFlag() const { winrt::guid 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_GapPeripheralPrivacyFlag(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_GapPeripheralPrivacyFlag(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::PnpId() const { winrt::guid 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_PnpId(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PnpId(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::PositionQuality() const { winrt::guid 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_PositionQuality(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PositionQuality(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::ProtocolMode() const { winrt::guid 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_ProtocolMode(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProtocolMode(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::GapReconnectionAddress() const { winrt::guid 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_GapReconnectionAddress(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_GapReconnectionAddress(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::ReferenceTimeInformation() const { winrt::guid 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_ReferenceTimeInformation(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ReferenceTimeInformation(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::Report() const { winrt::guid 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_Report(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Report(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::ReportMap() const { winrt::guid 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_ReportMap(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ReportMap(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::RingerControlPoint() const { winrt::guid 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_RingerControlPoint(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RingerControlPoint(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::RingerSetting() const { winrt::guid 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_RingerSetting(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RingerSetting(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::ScanIntervalWindow() const { winrt::guid 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_ScanIntervalWindow(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ScanIntervalWindow(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::ScanRefresh() const { winrt::guid 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_ScanRefresh(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ScanRefresh(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::SerialNumberString() const { winrt::guid 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_SerialNumberString(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SerialNumberString(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::GattServiceChanged() const { winrt::guid 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_GattServiceChanged(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_GattServiceChanged(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::SoftwareRevisionString() const { winrt::guid 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_SoftwareRevisionString(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SoftwareRevisionString(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::SupportedNewAlertCategory() const { winrt::guid 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_SupportedNewAlertCategory(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportedNewAlertCategory(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::SupportUnreadAlertCategory() const { winrt::guid 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_SupportUnreadAlertCategory(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SupportUnreadAlertCategory(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::SystemId() const { winrt::guid 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_SystemId(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SystemId(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::TimeAccuracy() const { winrt::guid 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_TimeAccuracy(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TimeAccuracy(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::TimeSource() const { winrt::guid 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_TimeSource(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TimeSource(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::TimeUpdateControlPoint() const { winrt::guid 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_TimeUpdateControlPoint(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TimeUpdateControlPoint(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::TimeUpdateState() const { winrt::guid 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_TimeUpdateState(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TimeUpdateState(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::TimeWithDst() const { winrt::guid 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_TimeWithDst(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TimeWithDst(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::TimeZone() const { winrt::guid 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_TimeZone(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TimeZone(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::TxPowerLevel() const { winrt::guid 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_TxPowerLevel(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TxPowerLevel(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicUuidsStatics2::UnreadAlertStatus() const { winrt::guid 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_UnreadAlertStatus(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UnreadAlertStatus(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicsResult::Status() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus 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_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicsResult::ProtocolError() 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_ProtocolError(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProtocolError(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattCharacteristicsResult::Characteristics() 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_Characteristics(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Characteristics(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattClientNotificationResult::SubscribedClient() 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_SubscribedClient(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SubscribedClient(&value)); } return winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattSubscribedClient{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattClientNotificationResult::Status() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus 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_Devices_Bluetooth_GenericAttributeProfile_IGattClientNotificationResult::ProtocolError() 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_ProtocolError(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProtocolError(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattClientNotificationResult2::BytesSent() const { uint16_t 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_BytesSent(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BytesSent(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDescriptor::ProtectionLevel() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel 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_ProtectionLevel(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProtectionLevel(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDescriptor::ProtectionLevel(winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel 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_ProtectionLevel(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ProtectionLevel(static_cast(value))); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDescriptor::Uuid() const { winrt::guid 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_Uuid(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Uuid(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDescriptor::AttributeHandle() const { uint16_t 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_AttributeHandle(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AttributeHandle(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDescriptor::ReadValueAsync() 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->ReadValueAsync(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ReadValueAsync(&value)); } return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDescriptor::ReadValueAsync(winrt::Windows::Devices::Bluetooth::BluetoothCacheMode const& cacheMode) 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->ReadValueWithCacheModeAsync(static_cast(cacheMode), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ReadValueWithCacheModeAsync(static_cast(cacheMode), &value)); } return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDescriptor::WriteValueAsync(winrt::Windows::Storage::Streams::IBuffer const& value) const { void* action{}; 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->WriteValueAsync(*(void**)(&value), &action)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->WriteValueAsync(*(void**)(&value), &action)); } return winrt::Windows::Foundation::IAsyncOperation{ action, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDescriptor2::WriteValueWithResultAsync(winrt::Windows::Storage::Streams::IBuffer const& value) 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->WriteValueWithResultAsync(*(void**)(&value), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->WriteValueWithResultAsync(*(void**)(&value), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDescriptorStatics::ConvertShortIdToUuid(uint16_t shortId) const { winrt::guid descriptorUuid{}; 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->ConvertShortIdToUuid(shortId, put_abi(descriptorUuid))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ConvertShortIdToUuid(shortId, put_abi(descriptorUuid))); } return descriptorUuid; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDescriptorUuidsStatics::CharacteristicAggregateFormat() const { winrt::guid 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_CharacteristicAggregateFormat(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CharacteristicAggregateFormat(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDescriptorUuidsStatics::CharacteristicExtendedProperties() const { winrt::guid 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_CharacteristicExtendedProperties(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CharacteristicExtendedProperties(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDescriptorUuidsStatics::CharacteristicPresentationFormat() const { winrt::guid 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_CharacteristicPresentationFormat(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CharacteristicPresentationFormat(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDescriptorUuidsStatics::CharacteristicUserDescription() const { winrt::guid 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_CharacteristicUserDescription(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CharacteristicUserDescription(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDescriptorUuidsStatics::ClientCharacteristicConfiguration() const { winrt::guid 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_ClientCharacteristicConfiguration(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ClientCharacteristicConfiguration(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDescriptorUuidsStatics::ServerCharacteristicConfiguration() const { winrt::guid 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_ServerCharacteristicConfiguration(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ServerCharacteristicConfiguration(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDescriptorsResult::Status() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus 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_Devices_Bluetooth_GenericAttributeProfile_IGattDescriptorsResult::ProtocolError() 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_ProtocolError(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProtocolError(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDescriptorsResult::Descriptors() 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_Descriptors(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Descriptors(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService::GetCharacteristics(winrt::guid const& characteristicUuid) 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->GetCharacteristics(impl::bind_in(characteristicUuid), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCharacteristics(impl::bind_in(characteristicUuid), &value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService::GetIncludedServices(winrt::guid const& serviceUuid) 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->GetIncludedServices(impl::bind_in(serviceUuid), &value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetIncludedServices(impl::bind_in(serviceUuid), &value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService::DeviceId() 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_DeviceId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DeviceId(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService::Uuid() const { winrt::guid 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_Uuid(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Uuid(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService::AttributeHandle() const { uint16_t 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_AttributeHandle(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AttributeHandle(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService2::Device() 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_Device(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Device(&value)); } return winrt::Windows::Devices::Bluetooth::BluetoothLEDevice{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService2::ParentServices() 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_ParentServices(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ParentServices(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService2::GetAllCharacteristics() const { void* characteristics{}; 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->GetAllCharacteristics(&characteristics)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAllCharacteristics(&characteristics)); } return winrt::Windows::Foundation::Collections::IVectorView{ characteristics, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService2::GetAllIncludedServices() const { void* includedServices{}; 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->GetAllIncludedServices(&includedServices)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetAllIncludedServices(&includedServices)); } return winrt::Windows::Foundation::Collections::IVectorView{ includedServices, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService3::DeviceAccessInformation() 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_DeviceAccessInformation(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DeviceAccessInformation(&value)); } return winrt::Windows::Devices::Enumeration::DeviceAccessInformation{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService3::Session() 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_Session(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Session(&value)); } return winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattSession{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService3::SharingMode() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattSharingMode 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_SharingMode(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SharingMode(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService3::RequestAccessAsync() 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->RequestAccessAsync(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RequestAccessAsync(&value)); } return winrt::Windows::Foundation::IAsyncOperation{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService3::OpenAsync(winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattSharingMode const& sharingMode) 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(static_cast(sharingMode), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->OpenAsync(static_cast(sharingMode), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService3::GetCharacteristicsAsync() 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->GetCharacteristicsAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCharacteristicsAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService3::GetCharacteristicsAsync(winrt::Windows::Devices::Bluetooth::BluetoothCacheMode const& cacheMode) 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->GetCharacteristicsWithCacheModeAsync(static_cast(cacheMode), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCharacteristicsWithCacheModeAsync(static_cast(cacheMode), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService3::GetCharacteristicsForUuidAsync(winrt::guid const& characteristicUuid) 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->GetCharacteristicsForUuidAsync(impl::bind_in(characteristicUuid), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCharacteristicsForUuidAsync(impl::bind_in(characteristicUuid), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService3::GetCharacteristicsForUuidAsync(winrt::guid const& characteristicUuid, winrt::Windows::Devices::Bluetooth::BluetoothCacheMode const& cacheMode) 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->GetCharacteristicsForUuidWithCacheModeAsync(impl::bind_in(characteristicUuid), static_cast(cacheMode), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetCharacteristicsForUuidWithCacheModeAsync(impl::bind_in(characteristicUuid), static_cast(cacheMode), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService3::GetIncludedServicesAsync() 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->GetIncludedServicesAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetIncludedServicesAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService3::GetIncludedServicesAsync(winrt::Windows::Devices::Bluetooth::BluetoothCacheMode const& cacheMode) 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->GetIncludedServicesWithCacheModeAsync(static_cast(cacheMode), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetIncludedServicesWithCacheModeAsync(static_cast(cacheMode), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService3::GetIncludedServicesForUuidAsync(winrt::guid const& serviceUuid) 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->GetIncludedServicesForUuidAsync(impl::bind_in(serviceUuid), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetIncludedServicesForUuidAsync(impl::bind_in(serviceUuid), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceService3::GetIncludedServicesForUuidAsync(winrt::guid const& serviceUuid, winrt::Windows::Devices::Bluetooth::BluetoothCacheMode const& cacheMode) 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->GetIncludedServicesForUuidWithCacheModeAsync(impl::bind_in(serviceUuid), static_cast(cacheMode), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetIncludedServicesForUuidWithCacheModeAsync(impl::bind_in(serviceUuid), static_cast(cacheMode), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceServiceStatics::FromIdAsync(param::hstring const& deviceId) const { void* asyncOp{}; 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->FromIdAsync(*(void**)(&deviceId), &asyncOp)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FromIdAsync(*(void**)(&deviceId), &asyncOp)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOp, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceServiceStatics::GetDeviceSelectorFromUuid(winrt::guid const& serviceUuid) const { void* selector{}; 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->GetDeviceSelectorFromUuid(impl::bind_in(serviceUuid), &selector)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeviceSelectorFromUuid(impl::bind_in(serviceUuid), &selector)); } return hstring{ selector, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceServiceStatics::GetDeviceSelectorFromShortId(uint16_t serviceShortId) const { void* selector{}; 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->GetDeviceSelectorFromShortId(serviceShortId, &selector)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeviceSelectorFromShortId(serviceShortId, &selector)); } return hstring{ selector, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceServiceStatics::ConvertShortIdToUuid(uint16_t shortId) const { winrt::guid serviceUuid{}; 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->ConvertShortIdToUuid(shortId, put_abi(serviceUuid))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->ConvertShortIdToUuid(shortId, put_abi(serviceUuid))); } return serviceUuid; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceServiceStatics2::FromIdAsync(param::hstring const& deviceId, winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattSharingMode const& sharingMode) 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->FromIdWithSharingModeAsync(*(void**)(&deviceId), static_cast(sharingMode), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FromIdWithSharingModeAsync(*(void**)(&deviceId), static_cast(sharingMode), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceServiceStatics2::GetDeviceSelectorForBluetoothDeviceId(winrt::Windows::Devices::Bluetooth::BluetoothDeviceId const& bluetoothDeviceId) 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->GetDeviceSelectorForBluetoothDeviceId(*(void**)(&bluetoothDeviceId), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeviceSelectorForBluetoothDeviceId(*(void**)(&bluetoothDeviceId), &result)); } return hstring{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceServiceStatics2::GetDeviceSelectorForBluetoothDeviceId(winrt::Windows::Devices::Bluetooth::BluetoothDeviceId const& bluetoothDeviceId, winrt::Windows::Devices::Bluetooth::BluetoothCacheMode const& cacheMode) 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->GetDeviceSelectorForBluetoothDeviceIdWithCacheMode(*(void**)(&bluetoothDeviceId), static_cast(cacheMode), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeviceSelectorForBluetoothDeviceIdWithCacheMode(*(void**)(&bluetoothDeviceId), static_cast(cacheMode), &result)); } return hstring{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceServiceStatics2::GetDeviceSelectorForBluetoothDeviceIdAndUuid(winrt::Windows::Devices::Bluetooth::BluetoothDeviceId const& bluetoothDeviceId, winrt::guid const& serviceUuid) 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->GetDeviceSelectorForBluetoothDeviceIdAndUuid(*(void**)(&bluetoothDeviceId), impl::bind_in(serviceUuid), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeviceSelectorForBluetoothDeviceIdAndUuid(*(void**)(&bluetoothDeviceId), impl::bind_in(serviceUuid), &result)); } return hstring{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceServiceStatics2::GetDeviceSelectorForBluetoothDeviceIdAndUuid(winrt::Windows::Devices::Bluetooth::BluetoothDeviceId const& bluetoothDeviceId, winrt::guid const& serviceUuid, winrt::Windows::Devices::Bluetooth::BluetoothCacheMode const& cacheMode) 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->GetDeviceSelectorForBluetoothDeviceIdAndUuidWithCacheMode(*(void**)(&bluetoothDeviceId), impl::bind_in(serviceUuid), static_cast(cacheMode), &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeviceSelectorForBluetoothDeviceIdAndUuidWithCacheMode(*(void**)(&bluetoothDeviceId), impl::bind_in(serviceUuid), static_cast(cacheMode), &result)); } return hstring{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceServicesResult::Status() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus 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_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceServicesResult::ProtocolError() 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_ProtocolError(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProtocolError(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattDeviceServicesResult::Services() 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_Services(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Services(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::Uuid() const { winrt::guid 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_Uuid(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Uuid(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::StaticValue() 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_StaticValue(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_StaticValue(&value)); } return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::CharacteristicProperties() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCharacteristicProperties 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_CharacteristicProperties(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CharacteristicProperties(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::ReadProtectionLevel() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel 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_ReadProtectionLevel(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ReadProtectionLevel(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::WriteProtectionLevel() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel 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_WriteProtectionLevel(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WriteProtectionLevel(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::CreateDescriptorAsync(winrt::guid const& descriptorUuid, winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattLocalDescriptorParameters const& parameters) 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->CreateDescriptorAsync(impl::bind_in(descriptorUuid), *(void**)(¶meters), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateDescriptorAsync(impl::bind_in(descriptorUuid), *(void**)(¶meters), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::Descriptors() 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_Descriptors(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Descriptors(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::UserDescription() 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_UserDescription(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UserDescription(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::PresentationFormats() 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_PresentationFormats(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PresentationFormats(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::SubscribedClients() 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_SubscribedClients(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SubscribedClients(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::SubscribedClientsChanged(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_SubscribedClientsChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_SubscribedClientsChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::SubscribedClientsChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, SubscribedClientsChanged(handler)); } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::SubscribedClientsChanged(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_SubscribedClientsChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_SubscribedClientsChanged(impl::bind_in(token)); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::ReadRequested(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_ReadRequested(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ReadRequested(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::ReadRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ReadRequested(handler)); } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::ReadRequested(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_ReadRequested(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ReadRequested(impl::bind_in(token)); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::WriteRequested(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_WriteRequested(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_WriteRequested(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::WriteRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, WriteRequested(handler)); } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::WriteRequested(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_WriteRequested(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_WriteRequested(impl::bind_in(token)); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::NotifyValueAsync(winrt::Windows::Storage::Streams::IBuffer const& value) 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->NotifyValueAsync(*(void**)(&value), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->NotifyValueAsync(*(void**)(&value), &operation)); } return winrt::Windows::Foundation::IAsyncOperation>{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristic::NotifyValueAsync(winrt::Windows::Storage::Streams::IBuffer const& value, winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattSubscribedClient const& subscribedClient) 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->NotifyValueForSubscribedClientAsync(*(void**)(&value), *(void**)(&subscribedClient), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->NotifyValueForSubscribedClientAsync(*(void**)(&value), *(void**)(&subscribedClient), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristicParameters::StaticValue(winrt::Windows::Storage::Streams::IBuffer 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_StaticValue(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_StaticValue(*(void**)(&value))); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristicParameters::StaticValue() 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_StaticValue(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_StaticValue(&value)); } return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristicParameters::CharacteristicProperties(winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCharacteristicProperties 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_CharacteristicProperties(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_CharacteristicProperties(static_cast(value))); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristicParameters::CharacteristicProperties() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCharacteristicProperties 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_CharacteristicProperties(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CharacteristicProperties(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristicParameters::ReadProtectionLevel(winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel 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_ReadProtectionLevel(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ReadProtectionLevel(static_cast(value))); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristicParameters::ReadProtectionLevel() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel 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_ReadProtectionLevel(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ReadProtectionLevel(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristicParameters::WriteProtectionLevel(winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel 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_WriteProtectionLevel(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_WriteProtectionLevel(static_cast(value))); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristicParameters::WriteProtectionLevel() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel 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_WriteProtectionLevel(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WriteProtectionLevel(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristicParameters::UserDescription(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_UserDescription(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_UserDescription(*(void**)(&value))); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristicParameters::UserDescription() 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_UserDescription(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UserDescription(&value)); } return hstring{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristicParameters::PresentationFormats() 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_PresentationFormats(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PresentationFormats(&value)); } return winrt::Windows::Foundation::Collections::IVector{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristicResult::Characteristic() 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_Characteristic(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Characteristic(&value)); } return winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattLocalCharacteristic{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalCharacteristicResult::Error() const { winrt::Windows::Devices::Bluetooth::BluetoothError 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_Error(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Error(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalDescriptor::Uuid() const { winrt::guid 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_Uuid(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Uuid(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalDescriptor::StaticValue() 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_StaticValue(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_StaticValue(&value)); } return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalDescriptor::ReadProtectionLevel() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel 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_ReadProtectionLevel(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ReadProtectionLevel(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalDescriptor::WriteProtectionLevel() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel 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_WriteProtectionLevel(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WriteProtectionLevel(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalDescriptor::ReadRequested(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_ReadRequested(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_ReadRequested(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalDescriptor::ReadRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, ReadRequested(handler)); } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalDescriptor::ReadRequested(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_ReadRequested(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_ReadRequested(impl::bind_in(token)); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalDescriptor::WriteRequested(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_WriteRequested(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_WriteRequested(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalDescriptor::WriteRequested(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, WriteRequested(handler)); } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalDescriptor::WriteRequested(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_WriteRequested(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_WriteRequested(impl::bind_in(token)); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalDescriptorParameters::StaticValue(winrt::Windows::Storage::Streams::IBuffer 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_StaticValue(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_StaticValue(*(void**)(&value))); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalDescriptorParameters::StaticValue() 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_StaticValue(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_StaticValue(&value)); } return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalDescriptorParameters::ReadProtectionLevel(winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel 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_ReadProtectionLevel(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ReadProtectionLevel(static_cast(value))); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalDescriptorParameters::ReadProtectionLevel() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel 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_ReadProtectionLevel(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ReadProtectionLevel(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalDescriptorParameters::WriteProtectionLevel(winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel 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_WriteProtectionLevel(static_cast(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_WriteProtectionLevel(static_cast(value))); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalDescriptorParameters::WriteProtectionLevel() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattProtectionLevel 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_WriteProtectionLevel(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WriteProtectionLevel(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalDescriptorResult::Descriptor() 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_Descriptor(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Descriptor(&value)); } return winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattLocalDescriptor{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalDescriptorResult::Error() const { winrt::Windows::Devices::Bluetooth::BluetoothError 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_Error(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Error(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalService::Uuid() const { winrt::guid 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_Uuid(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Uuid(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalService::CreateCharacteristicAsync(winrt::guid const& characteristicUuid, winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattLocalCharacteristicParameters const& parameters) 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->CreateCharacteristicAsync(impl::bind_in(characteristicUuid), *(void**)(¶meters), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateCharacteristicAsync(impl::bind_in(characteristicUuid), *(void**)(¶meters), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattLocalService::Characteristics() 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_Characteristics(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Characteristics(&value)); } return winrt::Windows::Foundation::Collections::IVectorView{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormat::FormatType() const { uint8_t 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_FormatType(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_FormatType(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormat::Exponent() const { int32_t 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_Exponent(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Exponent(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormat::Unit() const { uint16_t 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_Unit(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Unit(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormat::Namespace() const { uint8_t 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_Namespace(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Namespace(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormat::Description() const { uint16_t 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_Description(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Description(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatStatics::BluetoothSigAssignedNumbers() const { uint8_t 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_BluetoothSigAssignedNumbers(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BluetoothSigAssignedNumbers(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatStatics2::FromParts(uint8_t formatType, int32_t exponent, uint16_t unit, uint8_t namespaceId, uint16_t description) 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->FromParts(formatType, exponent, unit, namespaceId, description, &result)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FromParts(formatType, exponent, unit, namespaceId, description, &result)); } return winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattPresentationFormat{ result, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::Boolean() const { uint8_t 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_Boolean(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Boolean(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::Bit2() const { uint8_t 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_Bit2(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Bit2(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::Nibble() const { uint8_t 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_Nibble(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Nibble(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::UInt8() const { uint8_t 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_UInt8(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UInt8(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::UInt12() const { uint8_t 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_UInt12(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UInt12(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::UInt16() const { uint8_t 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_UInt16(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UInt16(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::UInt24() const { uint8_t 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_UInt24(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UInt24(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::UInt32() const { uint8_t 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_UInt32(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UInt32(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::UInt48() const { uint8_t 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_UInt48(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UInt48(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::UInt64() const { uint8_t 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_UInt64(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UInt64(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::UInt128() const { uint8_t 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_UInt128(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UInt128(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::SInt8() const { uint8_t 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_SInt8(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SInt8(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::SInt12() const { uint8_t 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_SInt12(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SInt12(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::SInt16() const { uint8_t 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_SInt16(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SInt16(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::SInt24() const { uint8_t 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_SInt24(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SInt24(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::SInt32() const { uint8_t 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_SInt32(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SInt32(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::SInt48() const { uint8_t 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_SInt48(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SInt48(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::SInt64() const { uint8_t 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_SInt64(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SInt64(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::SInt128() const { uint8_t 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_SInt128(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SInt128(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::Float32() const { uint8_t 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_Float32(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Float32(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::Float64() const { uint8_t 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_Float64(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Float64(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::SFloat() const { uint8_t 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_SFloat(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SFloat(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::Float() const { uint8_t 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_Float(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Float(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::DUInt16() const { uint8_t 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_DUInt16(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DUInt16(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::Utf8() const { uint8_t 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_Utf8(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Utf8(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::Utf16() const { uint8_t 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_Utf16(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Utf16(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattPresentationFormatTypesStatics::Struct() const { uint8_t 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_Struct(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Struct(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattProtocolErrorStatics::InvalidHandle() const { uint8_t 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_InvalidHandle(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InvalidHandle(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattProtocolErrorStatics::ReadNotPermitted() const { uint8_t 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_ReadNotPermitted(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ReadNotPermitted(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattProtocolErrorStatics::WriteNotPermitted() const { uint8_t 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_WriteNotPermitted(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_WriteNotPermitted(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattProtocolErrorStatics::InvalidPdu() const { uint8_t 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_InvalidPdu(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InvalidPdu(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattProtocolErrorStatics::InsufficientAuthentication() const { uint8_t 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_InsufficientAuthentication(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InsufficientAuthentication(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattProtocolErrorStatics::RequestNotSupported() const { uint8_t 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_RequestNotSupported(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RequestNotSupported(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattProtocolErrorStatics::InvalidOffset() const { uint8_t 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_InvalidOffset(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InvalidOffset(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattProtocolErrorStatics::InsufficientAuthorization() const { uint8_t 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_InsufficientAuthorization(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InsufficientAuthorization(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattProtocolErrorStatics::PrepareQueueFull() const { uint8_t 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_PrepareQueueFull(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PrepareQueueFull(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattProtocolErrorStatics::AttributeNotFound() const { uint8_t 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_AttributeNotFound(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AttributeNotFound(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattProtocolErrorStatics::AttributeNotLong() const { uint8_t 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_AttributeNotLong(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AttributeNotLong(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattProtocolErrorStatics::InsufficientEncryptionKeySize() const { uint8_t 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_InsufficientEncryptionKeySize(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InsufficientEncryptionKeySize(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattProtocolErrorStatics::InvalidAttributeValueLength() const { uint8_t 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_InvalidAttributeValueLength(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InvalidAttributeValueLength(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattProtocolErrorStatics::UnlikelyError() const { uint8_t 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_UnlikelyError(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UnlikelyError(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattProtocolErrorStatics::InsufficientEncryption() const { uint8_t 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_InsufficientEncryption(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InsufficientEncryption(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattProtocolErrorStatics::UnsupportedGroupType() const { uint8_t 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_UnsupportedGroupType(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UnsupportedGroupType(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattProtocolErrorStatics::InsufficientResources() const { uint8_t 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_InsufficientResources(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_InsufficientResources(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattReadClientCharacteristicConfigurationDescriptorResult::Status() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus 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_Devices_Bluetooth_GenericAttributeProfile_IGattReadClientCharacteristicConfigurationDescriptorResult::ClientCharacteristicConfigurationDescriptor() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattClientCharacteristicConfigurationDescriptorValue 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_ClientCharacteristicConfigurationDescriptor(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ClientCharacteristicConfigurationDescriptor(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattReadClientCharacteristicConfigurationDescriptorResult2::ProtocolError() 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_ProtocolError(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProtocolError(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattReadRequest::Offset() const { uint32_t 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_Offset(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Offset(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattReadRequest::Length() const { uint32_t 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_Length(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Length(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattReadRequest::State() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattRequestState 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_State(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_State(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattReadRequest::StateChanged(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_StateChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_StateChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattReadRequest::StateChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, StateChanged(handler)); } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattReadRequest::StateChanged(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_StateChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_StateChanged(impl::bind_in(token)); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattReadRequest::RespondWithValue(winrt::Windows::Storage::Streams::IBuffer 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->RespondWithValue(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RespondWithValue(*(void**)(&value))); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattReadRequest::RespondWithProtocolError(uint8_t protocolError) 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->RespondWithProtocolError(protocolError)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RespondWithProtocolError(protocolError)); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattReadRequestedEventArgs::Session() 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_Session(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Session(&value)); } return winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattSession{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattReadRequestedEventArgs::GetDeferral() 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->GetDeferral(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&value)); } return winrt::Windows::Foundation::Deferral{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattReadRequestedEventArgs::GetRequestAsync() 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->GetRequestAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetRequestAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattReadResult::Status() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus 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_Devices_Bluetooth_GenericAttributeProfile_IGattReadResult::Value() 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_Value(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Value(&value)); } return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattReadResult2::ProtocolError() 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_ProtocolError(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProtocolError(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattReliableWriteTransaction::WriteValue(winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCharacteristic const& characteristic, winrt::Windows::Storage::Streams::IBuffer 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->WriteValue(*(void**)(&characteristic), *(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->WriteValue(*(void**)(&characteristic), *(void**)(&value))); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattReliableWriteTransaction::CommitAsync() const { void* asyncOp{}; 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->CommitAsync(&asyncOp)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CommitAsync(&asyncOp)); } return winrt::Windows::Foundation::IAsyncOperation{ asyncOp, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattReliableWriteTransaction2::CommitWithResultAsync() 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->CommitWithResultAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CommitWithResultAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattRequestStateChangedEventArgs::State() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattRequestState 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_State(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_State(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattRequestStateChangedEventArgs::Error() const { winrt::Windows::Devices::Bluetooth::BluetoothError 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_Error(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Error(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProvider::Service() 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_Service(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Service(&value)); } return winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattLocalService{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProvider::AdvertisementStatus() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattServiceProviderAdvertisementStatus 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_AdvertisementStatus(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AdvertisementStatus(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProvider::AdvertisementStatusChanged(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_AdvertisementStatusChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_AdvertisementStatusChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProvider::AdvertisementStatusChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, AdvertisementStatusChanged(handler)); } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProvider::AdvertisementStatusChanged(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_AdvertisementStatusChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_AdvertisementStatusChanged(impl::bind_in(token)); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProvider::StartAdvertising() 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->StartAdvertising()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->StartAdvertising()); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProvider::StartAdvertising(winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattServiceProviderAdvertisingParameters const& parameters) 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->StartAdvertisingWithParameters(*(void**)(¶meters))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->StartAdvertisingWithParameters(*(void**)(¶meters))); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProvider::StopAdvertising() 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->StopAdvertising()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->StopAdvertising()); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProvider2::UpdateAdvertisingParameters(winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattServiceProviderAdvertisingParameters const& parameters) 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->UpdateAdvertisingParameters(*(void**)(¶meters))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->UpdateAdvertisingParameters(*(void**)(¶meters))); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProviderAdvertisementStatusChangedEventArgs::Error() const { winrt::Windows::Devices::Bluetooth::BluetoothError 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_Error(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Error(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProviderAdvertisementStatusChangedEventArgs::Status() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattServiceProviderAdvertisementStatus 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_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProviderAdvertisingParameters::IsConnectable(bool 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_IsConnectable(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsConnectable(value)); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProviderAdvertisingParameters::IsConnectable() 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_IsConnectable(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsConnectable(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProviderAdvertisingParameters::IsDiscoverable(bool 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_IsDiscoverable(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_IsDiscoverable(value)); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProviderAdvertisingParameters::IsDiscoverable() 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_IsDiscoverable(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_IsDiscoverable(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProviderAdvertisingParameters2::ServiceData(winrt::Windows::Storage::Streams::IBuffer 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_ServiceData(*(void**)(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_ServiceData(*(void**)(&value))); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProviderAdvertisingParameters2::ServiceData() 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_ServiceData(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ServiceData(&value)); } return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProviderAdvertisingParameters3::UseLowEnergyUncoded1MPhyAsSecondaryPhy() 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_UseLowEnergyUncoded1MPhyAsSecondaryPhy(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UseLowEnergyUncoded1MPhyAsSecondaryPhy(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProviderAdvertisingParameters3::UseLowEnergyUncoded1MPhyAsSecondaryPhy(bool 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_UseLowEnergyUncoded1MPhyAsSecondaryPhy(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_UseLowEnergyUncoded1MPhyAsSecondaryPhy(value)); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProviderAdvertisingParameters3::UseLowEnergyUncoded2MPhyAsSecondaryPhy() 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_UseLowEnergyUncoded2MPhyAsSecondaryPhy(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_UseLowEnergyUncoded2MPhyAsSecondaryPhy(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProviderAdvertisingParameters3::UseLowEnergyUncoded2MPhyAsSecondaryPhy(bool 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_UseLowEnergyUncoded2MPhyAsSecondaryPhy(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_UseLowEnergyUncoded2MPhyAsSecondaryPhy(value)); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProviderResult::Error() const { winrt::Windows::Devices::Bluetooth::BluetoothError 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_Error(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Error(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProviderResult::ServiceProvider() 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_ServiceProvider(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ServiceProvider(&value)); } return winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattServiceProvider{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceProviderStatics::CreateAsync(winrt::guid const& serviceUuid) 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->CreateAsync(impl::bind_in(serviceUuid), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->CreateAsync(impl::bind_in(serviceUuid), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics::Battery() const { winrt::guid 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_Battery(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Battery(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics::BloodPressure() const { winrt::guid 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_BloodPressure(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_BloodPressure(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics::CyclingSpeedAndCadence() const { winrt::guid 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_CyclingSpeedAndCadence(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CyclingSpeedAndCadence(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics::GenericAccess() const { winrt::guid 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_GenericAccess(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_GenericAccess(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics::GenericAttribute() const { winrt::guid 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_GenericAttribute(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_GenericAttribute(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics::Glucose() const { winrt::guid 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_Glucose(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Glucose(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics::HealthThermometer() const { winrt::guid 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_HealthThermometer(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HealthThermometer(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics::HeartRate() const { winrt::guid 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_HeartRate(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HeartRate(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics::RunningSpeedAndCadence() const { winrt::guid 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_RunningSpeedAndCadence(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_RunningSpeedAndCadence(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics2::AlertNotification() const { winrt::guid 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_AlertNotification(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_AlertNotification(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics2::CurrentTime() const { winrt::guid 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_CurrentTime(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CurrentTime(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics2::CyclingPower() const { winrt::guid 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_CyclingPower(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CyclingPower(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics2::DeviceInformation() const { winrt::guid 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_DeviceInformation(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DeviceInformation(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics2::HumanInterfaceDevice() const { winrt::guid 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_HumanInterfaceDevice(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_HumanInterfaceDevice(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics2::ImmediateAlert() const { winrt::guid 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_ImmediateAlert(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ImmediateAlert(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics2::LinkLoss() const { winrt::guid 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_LinkLoss(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_LinkLoss(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics2::LocationAndNavigation() const { winrt::guid 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_LocationAndNavigation(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_LocationAndNavigation(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics2::NextDstChange() const { winrt::guid 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_NextDstChange(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_NextDstChange(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics2::PhoneAlertStatus() const { winrt::guid 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_PhoneAlertStatus(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_PhoneAlertStatus(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics2::ReferenceTimeUpdate() const { winrt::guid 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_ReferenceTimeUpdate(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ReferenceTimeUpdate(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics2::ScanParameters() const { winrt::guid 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_ScanParameters(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ScanParameters(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattServiceUuidsStatics2::TxPower() const { winrt::guid 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_TxPower(put_abi(value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_TxPower(put_abi(value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattSession::DeviceId() 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_DeviceId(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_DeviceId(&value)); } return winrt::Windows::Devices::Bluetooth::BluetoothDeviceId{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattSession::CanMaintainConnection() 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_CanMaintainConnection(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CanMaintainConnection(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattSession::MaintainConnection(bool 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_MaintainConnection(value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->put_MaintainConnection(value)); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattSession::MaintainConnection() 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_MaintainConnection(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MaintainConnection(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattSession::MaxPduSize() const { uint16_t 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_MaxPduSize(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MaxPduSize(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattSession::SessionStatus() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattSessionStatus 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_SessionStatus(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_SessionStatus(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattSession::MaxPduSizeChanged(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_MaxPduSizeChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_MaxPduSizeChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattSession::MaxPduSizeChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, MaxPduSizeChanged(handler)); } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattSession::MaxPduSizeChanged(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_MaxPduSizeChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_MaxPduSizeChanged(impl::bind_in(token)); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattSession::SessionStatusChanged(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_SessionStatusChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_SessionStatusChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattSession::SessionStatusChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, SessionStatusChanged(handler)); } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattSession::SessionStatusChanged(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_SessionStatusChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_SessionStatusChanged(impl::bind_in(token)); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattSessionStatics::FromDeviceIdAsync(winrt::Windows::Devices::Bluetooth::BluetoothDeviceId const& deviceId) 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->FromDeviceIdAsync(*(void**)(&deviceId), &operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->FromDeviceIdAsync(*(void**)(&deviceId), &operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattSessionStatusChangedEventArgs::Error() const { winrt::Windows::Devices::Bluetooth::BluetoothError 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_Error(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Error(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattSessionStatusChangedEventArgs::Status() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattSessionStatus 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_Devices_Bluetooth_GenericAttributeProfile_IGattSubscribedClient::Session() 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_Session(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Session(&value)); } return winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattSession{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattSubscribedClient::MaxNotificationSize() const { uint16_t 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_MaxNotificationSize(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_MaxNotificationSize(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattSubscribedClient::MaxNotificationSizeChanged(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_MaxNotificationSizeChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_MaxNotificationSizeChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattSubscribedClient::MaxNotificationSizeChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, MaxNotificationSizeChanged(handler)); } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattSubscribedClient::MaxNotificationSizeChanged(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_MaxNotificationSizeChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_MaxNotificationSizeChanged(impl::bind_in(token)); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattValueChangedEventArgs::CharacteristicValue() 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_CharacteristicValue(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_CharacteristicValue(&value)); } return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattValueChangedEventArgs::Timestamp() const { winrt::Windows::Foundation::DateTime timestamp{}; 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_Timestamp(put_abi(timestamp))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Timestamp(put_abi(timestamp))); } return timestamp; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattWriteRequest::Value() 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_Value(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Value(&value)); } return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattWriteRequest::Offset() const { uint32_t 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_Offset(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Offset(&value)); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattWriteRequest::Option() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattWriteOption 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_Option(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Option(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattWriteRequest::State() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattRequestState 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_State(reinterpret_cast(&value))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_State(reinterpret_cast(&value))); } return value; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattWriteRequest::StateChanged(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_StateChanged(*(void**)(&handler), put_abi(token))); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->add_StateChanged(*(void**)(&handler), put_abi(token))); } return token; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattWriteRequest::StateChanged(auto_revoke_t, winrt::Windows::Foundation::TypedEventHandler const& handler) const { return impl::make_event_revoker(this, StateChanged(handler)); } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattWriteRequest::StateChanged(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_StateChanged(impl::bind_in(token)); } else { auto const _winrt_abi_type = *(abi_t**)this; _winrt_abi_type->remove_StateChanged(impl::bind_in(token)); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattWriteRequest::Respond() 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->Respond()); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->Respond()); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattWriteRequest::RespondWithProtocolError(uint8_t protocolError) 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->RespondWithProtocolError(protocolError)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->RespondWithProtocolError(protocolError)); } } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattWriteRequestedEventArgs::Session() 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_Session(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_Session(&value)); } return winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattSession{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattWriteRequestedEventArgs::GetDeferral() 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->GetDeferral(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetDeferral(&value)); } return winrt::Windows::Foundation::Deferral{ value, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattWriteRequestedEventArgs::GetRequestAsync() 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->GetRequestAsync(&operation)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->GetRequestAsync(&operation)); } return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Windows_Devices_Bluetooth_GenericAttributeProfile_IGattWriteResult::Status() const { winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCommunicationStatus 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_Devices_Bluetooth_GenericAttributeProfile_IGattWriteResult::ProtocolError() 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_ProtocolError(&value)); } else { auto const _winrt_abi_type = *(abi_t**)this; check_hresult(_winrt_abi_type->get_ProtocolError(&value)); } return winrt::Windows::Foundation::IReference{ value, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDescriptors(winrt::guid descriptorUuid, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().GetDescriptors(*reinterpret_cast(&descriptorUuid))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CharacteristicProperties(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CharacteristicProperties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ProtectionLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ProtectionLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ProtectionLevel(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ProtectionLevel(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UserDescription(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UserDescription()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Uuid(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Uuid()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AttributeHandle(uint16_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AttributeHandle()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PresentationFormats(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().PresentationFormats()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ReadValueAsync(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ReadValueAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ReadValueWithCacheModeAsync(int32_t cacheMode, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ReadValueAsync(*reinterpret_cast(&cacheMode))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall WriteValueAsync(void* value, void** asyncOp) noexcept final try { clear_abi(asyncOp); typename D::abi_guard guard(this->shim()); *asyncOp = detach_from>(this->shim().WriteValueAsync(*reinterpret_cast(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall WriteValueWithOptionAsync(void* value, int32_t writeOption, void** asyncOp) noexcept final try { clear_abi(asyncOp); typename D::abi_guard guard(this->shim()); *asyncOp = detach_from>(this->shim().WriteValueAsync(*reinterpret_cast(&value), *reinterpret_cast(&writeOption))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ReadClientCharacteristicConfigurationDescriptorAsync(void** asyncOp) noexcept final try { clear_abi(asyncOp); typename D::abi_guard guard(this->shim()); *asyncOp = detach_from>(this->shim().ReadClientCharacteristicConfigurationDescriptorAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall WriteClientCharacteristicConfigurationDescriptorAsync(int32_t clientCharacteristicConfigurationDescriptorValue, void** asyncOp) noexcept final try { clear_abi(asyncOp); typename D::abi_guard guard(this->shim()); *asyncOp = detach_from>(this->shim().WriteClientCharacteristicConfigurationDescriptorAsync(*reinterpret_cast(&clientCharacteristicConfigurationDescriptorValue))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_ValueChanged(void* valueChangedHandler, winrt::event_token* valueChangedEventCookie) noexcept final try { zero_abi(valueChangedEventCookie); typename D::abi_guard guard(this->shim()); *valueChangedEventCookie = detach_from(this->shim().ValueChanged(*reinterpret_cast const*>(&valueChangedHandler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ValueChanged(winrt::event_token valueChangedEventCookie) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ValueChanged(*reinterpret_cast(&valueChangedEventCookie)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Service(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Service()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetAllDescriptors(void** descriptors) noexcept final try { clear_abi(descriptors); typename D::abi_guard guard(this->shim()); *descriptors = detach_from>(this->shim().GetAllDescriptors()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetDescriptorsAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetDescriptorsAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDescriptorsWithCacheModeAsync(int32_t cacheMode, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetDescriptorsAsync(*reinterpret_cast(&cacheMode))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDescriptorsForUuidAsync(winrt::guid descriptorUuid, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetDescriptorsForUuidAsync(*reinterpret_cast(&descriptorUuid))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDescriptorsForUuidWithCacheModeAsync(winrt::guid descriptorUuid, int32_t cacheMode, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetDescriptorsForUuidAsync(*reinterpret_cast(&descriptorUuid), *reinterpret_cast(&cacheMode))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall WriteValueWithResultAsync(void* value, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().WriteValueWithResultAsync(*reinterpret_cast(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall WriteValueWithResultAndOptionAsync(void* value, int32_t writeOption, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().WriteValueWithResultAsync(*reinterpret_cast(&value), *reinterpret_cast(&writeOption))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall WriteClientCharacteristicConfigurationDescriptorWithResultAsync(int32_t clientCharacteristicConfigurationDescriptorValue, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().WriteClientCharacteristicConfigurationDescriptorWithResultAsync(*reinterpret_cast(&clientCharacteristicConfigurationDescriptorValue))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall ConvertShortIdToUuid(uint16_t shortId, winrt::guid* characteristicUuid) noexcept final try { typename D::abi_guard guard(this->shim()); *characteristicUuid = detach_from(this->shim().ConvertShortIdToUuid(shortId)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_BatteryLevel(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BatteryLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BloodPressureFeature(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BloodPressureFeature()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BloodPressureMeasurement(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BloodPressureMeasurement()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BodySensorLocation(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BodySensorLocation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CscFeature(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CscFeature()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CscMeasurement(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CscMeasurement()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_GlucoseFeature(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GlucoseFeature()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_GlucoseMeasurement(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GlucoseMeasurement()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_GlucoseMeasurementContext(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GlucoseMeasurementContext()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HeartRateControlPoint(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HeartRateControlPoint()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HeartRateMeasurement(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HeartRateMeasurement()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IntermediateCuffPressure(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IntermediateCuffPressure()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IntermediateTemperature(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IntermediateTemperature()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MeasurementInterval(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MeasurementInterval()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RecordAccessControlPoint(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RecordAccessControlPoint()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RscFeature(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RscFeature()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RscMeasurement(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RscMeasurement()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SCControlPoint(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SCControlPoint()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SensorLocation(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SensorLocation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TemperatureMeasurement(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TemperatureMeasurement()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TemperatureType(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TemperatureType()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AlertCategoryId(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AlertCategoryId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AlertCategoryIdBitMask(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AlertCategoryIdBitMask()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AlertLevel(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AlertLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AlertNotificationControlPoint(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AlertNotificationControlPoint()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AlertStatus(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AlertStatus()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_GapAppearance(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GapAppearance()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BootKeyboardInputReport(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BootKeyboardInputReport()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BootKeyboardOutputReport(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BootKeyboardOutputReport()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BootMouseInputReport(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BootMouseInputReport()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CurrentTime(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CurrentTime()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CyclingPowerControlPoint(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CyclingPowerControlPoint()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CyclingPowerFeature(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CyclingPowerFeature()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CyclingPowerMeasurement(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CyclingPowerMeasurement()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CyclingPowerVector(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CyclingPowerVector()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DateTime(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DateTime()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DayDateTime(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DayDateTime()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DayOfWeek(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DayOfWeek()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_GapDeviceName(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GapDeviceName()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DstOffset(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DstOffset()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExactTime256(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExactTime256()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_FirmwareRevisionString(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FirmwareRevisionString()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HardwareRevisionString(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HardwareRevisionString()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HidControlPoint(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HidControlPoint()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HidInformation(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HidInformation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Ieee1107320601RegulatoryCertificationDataList(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Ieee1107320601RegulatoryCertificationDataList()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LnControlPoint(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LnControlPoint()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LnFeature(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LnFeature()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LocalTimeInformation(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LocalTimeInformation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LocationAndSpeed(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LocationAndSpeed()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ManufacturerNameString(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ManufacturerNameString()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ModelNumberString(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ModelNumberString()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Navigation(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Navigation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NewAlert(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NewAlert()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_GapPeripheralPreferredConnectionParameters(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GapPeripheralPreferredConnectionParameters()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_GapPeripheralPrivacyFlag(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GapPeripheralPrivacyFlag()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PnpId(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PnpId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PositionQuality(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PositionQuality()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ProtocolMode(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ProtocolMode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_GapReconnectionAddress(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GapReconnectionAddress()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ReferenceTimeInformation(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ReferenceTimeInformation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Report(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Report()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ReportMap(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ReportMap()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RingerControlPoint(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RingerControlPoint()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RingerSetting(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RingerSetting()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ScanIntervalWindow(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ScanIntervalWindow()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ScanRefresh(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ScanRefresh()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SerialNumberString(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SerialNumberString()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_GattServiceChanged(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GattServiceChanged()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SoftwareRevisionString(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SoftwareRevisionString()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SupportedNewAlertCategory(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SupportedNewAlertCategory()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SupportUnreadAlertCategory(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SupportUnreadAlertCategory()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SystemId(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SystemId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TimeAccuracy(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TimeAccuracy()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TimeSource(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TimeSource()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TimeUpdateControlPoint(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TimeUpdateControlPoint()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TimeUpdateState(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TimeUpdateState()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TimeWithDst(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TimeWithDst()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TimeZone(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TimeZone()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TxPowerLevel(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TxPowerLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UnreadAlertStatus(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UnreadAlertStatus()); 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_ProtocolError(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ProtocolError()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Characteristics(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Characteristics()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_SubscribedClient(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SubscribedClient()); 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 get_ProtocolError(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ProtocolError()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_BytesSent(uint16_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BytesSent()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ProtectionLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ProtectionLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ProtectionLevel(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ProtectionLevel(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Uuid(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Uuid()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AttributeHandle(uint16_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AttributeHandle()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ReadValueAsync(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ReadValueAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ReadValueWithCacheModeAsync(int32_t cacheMode, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ReadValueAsync(*reinterpret_cast(&cacheMode))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall WriteValueAsync(void* value, void** action) noexcept final try { clear_abi(action); typename D::abi_guard guard(this->shim()); *action = detach_from>(this->shim().WriteValueAsync(*reinterpret_cast(&value))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall WriteValueWithResultAsync(void* value, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().WriteValueWithResultAsync(*reinterpret_cast(&value))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall ConvertShortIdToUuid(uint16_t shortId, winrt::guid* descriptorUuid) noexcept final try { typename D::abi_guard guard(this->shim()); *descriptorUuid = detach_from(this->shim().ConvertShortIdToUuid(shortId)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CharacteristicAggregateFormat(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CharacteristicAggregateFormat()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CharacteristicExtendedProperties(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CharacteristicExtendedProperties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CharacteristicPresentationFormat(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CharacteristicPresentationFormat()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CharacteristicUserDescription(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CharacteristicUserDescription()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ClientCharacteristicConfiguration(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ClientCharacteristicConfiguration()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ServerCharacteristicConfiguration(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ServerCharacteristicConfiguration()); 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_ProtocolError(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ProtocolError()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Descriptors(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Descriptors()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall GetCharacteristics(winrt::guid characteristicUuid, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().GetCharacteristics(*reinterpret_cast(&characteristicUuid))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetIncludedServices(winrt::guid serviceUuid, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().GetIncludedServices(*reinterpret_cast(&serviceUuid))); 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 get_Uuid(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Uuid()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AttributeHandle(uint16_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AttributeHandle()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Device(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Device()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ParentServices(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ParentServices()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetAllCharacteristics(void** characteristics) noexcept final try { clear_abi(characteristics); typename D::abi_guard guard(this->shim()); *characteristics = detach_from>(this->shim().GetAllCharacteristics()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetAllIncludedServices(void** includedServices) noexcept final try { clear_abi(includedServices); typename D::abi_guard guard(this->shim()); *includedServices = detach_from>(this->shim().GetAllIncludedServices()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_DeviceAccessInformation(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DeviceAccessInformation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Session(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Session()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SharingMode(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SharingMode()); 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(); } int32_t __stdcall OpenAsync(int32_t sharingMode, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().OpenAsync(*reinterpret_cast(&sharingMode))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCharacteristicsAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetCharacteristicsAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCharacteristicsWithCacheModeAsync(int32_t cacheMode, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetCharacteristicsAsync(*reinterpret_cast(&cacheMode))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCharacteristicsForUuidAsync(winrt::guid characteristicUuid, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetCharacteristicsForUuidAsync(*reinterpret_cast(&characteristicUuid))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetCharacteristicsForUuidWithCacheModeAsync(winrt::guid characteristicUuid, int32_t cacheMode, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetCharacteristicsForUuidAsync(*reinterpret_cast(&characteristicUuid), *reinterpret_cast(&cacheMode))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetIncludedServicesAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetIncludedServicesAsync()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetIncludedServicesWithCacheModeAsync(int32_t cacheMode, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetIncludedServicesAsync(*reinterpret_cast(&cacheMode))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetIncludedServicesForUuidAsync(winrt::guid serviceUuid, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetIncludedServicesForUuidAsync(*reinterpret_cast(&serviceUuid))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetIncludedServicesForUuidWithCacheModeAsync(winrt::guid serviceUuid, int32_t cacheMode, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetIncludedServicesForUuidAsync(*reinterpret_cast(&serviceUuid), *reinterpret_cast(&cacheMode))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { 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 GetDeviceSelectorFromUuid(winrt::guid serviceUuid, void** selector) noexcept final try { clear_abi(selector); typename D::abi_guard guard(this->shim()); *selector = detach_from(this->shim().GetDeviceSelectorFromUuid(*reinterpret_cast(&serviceUuid))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeviceSelectorFromShortId(uint16_t serviceShortId, void** selector) noexcept final try { clear_abi(selector); typename D::abi_guard guard(this->shim()); *selector = detach_from(this->shim().GetDeviceSelectorFromShortId(serviceShortId)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall ConvertShortIdToUuid(uint16_t shortId, winrt::guid* serviceUuid) noexcept final try { typename D::abi_guard guard(this->shim()); *serviceUuid = detach_from(this->shim().ConvertShortIdToUuid(shortId)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall FromIdWithSharingModeAsync(void* deviceId, int32_t sharingMode, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().FromIdAsync(*reinterpret_cast(&deviceId), *reinterpret_cast(&sharingMode))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeviceSelectorForBluetoothDeviceId(void* bluetoothDeviceId, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDeviceSelectorForBluetoothDeviceId(*reinterpret_cast(&bluetoothDeviceId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeviceSelectorForBluetoothDeviceIdWithCacheMode(void* bluetoothDeviceId, int32_t cacheMode, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDeviceSelectorForBluetoothDeviceId(*reinterpret_cast(&bluetoothDeviceId), *reinterpret_cast(&cacheMode))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeviceSelectorForBluetoothDeviceIdAndUuid(void* bluetoothDeviceId, winrt::guid serviceUuid, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDeviceSelectorForBluetoothDeviceIdAndUuid(*reinterpret_cast(&bluetoothDeviceId), *reinterpret_cast(&serviceUuid))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeviceSelectorForBluetoothDeviceIdAndUuidWithCacheMode(void* bluetoothDeviceId, winrt::guid serviceUuid, int32_t cacheMode, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().GetDeviceSelectorForBluetoothDeviceIdAndUuid(*reinterpret_cast(&bluetoothDeviceId), *reinterpret_cast(&serviceUuid), *reinterpret_cast(&cacheMode))); 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_ProtocolError(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ProtocolError()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Services(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Services()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Uuid(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Uuid()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_StaticValue(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().StaticValue()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CharacteristicProperties(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CharacteristicProperties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ReadProtectionLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ReadProtectionLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WriteProtectionLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WriteProtectionLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateDescriptorAsync(winrt::guid descriptorUuid, void* parameters, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CreateDescriptorAsync(*reinterpret_cast(&descriptorUuid), *reinterpret_cast(¶meters))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Descriptors(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Descriptors()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UserDescription(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UserDescription()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PresentationFormats(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().PresentationFormats()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SubscribedClients(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().SubscribedClients()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_SubscribedClientsChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().SubscribedClientsChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_SubscribedClientsChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().SubscribedClientsChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_ReadRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ReadRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ReadRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ReadRequested(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_WriteRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().WriteRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_WriteRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().WriteRequested(*reinterpret_cast(&token)); return 0; } int32_t __stdcall NotifyValueAsync(void* value, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>>(this->shim().NotifyValueAsync(*reinterpret_cast(&value))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall NotifyValueForSubscribedClientAsync(void* value, void* subscribedClient, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().NotifyValueAsync(*reinterpret_cast(&value), *reinterpret_cast(&subscribedClient))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_StaticValue(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().StaticValue(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_StaticValue(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().StaticValue()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CharacteristicProperties(uint32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CharacteristicProperties(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CharacteristicProperties(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CharacteristicProperties()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ReadProtectionLevel(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ReadProtectionLevel(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ReadProtectionLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ReadProtectionLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_WriteProtectionLevel(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().WriteProtectionLevel(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WriteProtectionLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WriteProtectionLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_UserDescription(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UserDescription(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UserDescription(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UserDescription()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PresentationFormats(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().PresentationFormats()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Characteristic(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Characteristic()); 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 get_Uuid(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Uuid()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_StaticValue(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().StaticValue()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ReadProtectionLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ReadProtectionLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WriteProtectionLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WriteProtectionLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_ReadRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().ReadRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_ReadRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().ReadRequested(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_WriteRequested(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().WriteRequested(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_WriteRequested(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().WriteRequested(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_StaticValue(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().StaticValue(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_StaticValue(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().StaticValue()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ReadProtectionLevel(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ReadProtectionLevel(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ReadProtectionLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ReadProtectionLevel()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_WriteProtectionLevel(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().WriteProtectionLevel(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WriteProtectionLevel(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WriteProtectionLevel()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Descriptor(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Descriptor()); 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 get_Uuid(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Uuid()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateCharacteristicAsync(winrt::guid characteristicUuid, void* parameters, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CreateCharacteristicAsync(*reinterpret_cast(&characteristicUuid), *reinterpret_cast(¶meters))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Characteristics(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().Characteristics()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_FormatType(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().FormatType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Exponent(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Exponent()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Unit(uint16_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Unit()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Namespace(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Namespace()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Description(uint16_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Description()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_BluetoothSigAssignedNumbers(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BluetoothSigAssignedNumbers()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall FromParts(uint8_t formatType, int32_t exponent, uint16_t unit, uint8_t namespaceId, uint16_t description, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().FromParts(formatType, exponent, unit, namespaceId, description)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Boolean(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Boolean()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Bit2(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Bit2()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Nibble(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Nibble()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UInt8(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UInt8()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UInt12(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UInt12()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UInt16(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UInt16()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UInt24(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UInt24()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UInt32(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UInt32()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UInt48(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UInt48()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UInt64(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UInt64()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UInt128(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UInt128()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SInt8(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SInt8()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SInt12(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SInt12()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SInt16(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SInt16()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SInt24(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SInt24()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SInt32(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SInt32()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SInt48(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SInt48()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SInt64(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SInt64()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SInt128(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SInt128()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Float32(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Float32()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Float64(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Float64()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SFloat(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SFloat()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Float(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Float()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DUInt16(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DUInt16()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Utf8(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Utf8()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Utf16(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Utf16()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Struct(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Struct()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_InvalidHandle(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InvalidHandle()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ReadNotPermitted(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ReadNotPermitted()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_WriteNotPermitted(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().WriteNotPermitted()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InvalidPdu(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InvalidPdu()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InsufficientAuthentication(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InsufficientAuthentication()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RequestNotSupported(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RequestNotSupported()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InvalidOffset(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InvalidOffset()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InsufficientAuthorization(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InsufficientAuthorization()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PrepareQueueFull(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PrepareQueueFull()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AttributeNotFound(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AttributeNotFound()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AttributeNotLong(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AttributeNotLong()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InsufficientEncryptionKeySize(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InsufficientEncryptionKeySize()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InvalidAttributeValueLength(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InvalidAttributeValueLength()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UnlikelyError(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UnlikelyError()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InsufficientEncryption(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InsufficientEncryption()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UnsupportedGroupType(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UnsupportedGroupType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_InsufficientResources(uint8_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().InsufficientResources()); 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_ClientCharacteristicConfigurationDescriptor(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ClientCharacteristicConfigurationDescriptor()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ProtocolError(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ProtocolError()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Offset(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Offset()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Length(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Length()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_State(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().State()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_StateChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().StateChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_StateChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().StateChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall RespondWithValue(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RespondWithValue(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RespondWithProtocolError(uint8_t protocolError) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RespondWithProtocolError(protocolError); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Session(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Session()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetRequestAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetRequestAsync()); 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_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(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ProtocolError(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ProtocolError()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall WriteValue(void* characteristic, void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().WriteValue(*reinterpret_cast(&characteristic), *reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CommitAsync(void** asyncOp) noexcept final try { clear_abi(asyncOp); typename D::abi_guard guard(this->shim()); *asyncOp = detach_from>(this->shim().CommitAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CommitWithResultAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CommitWithResultAsync()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_State(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().State()); 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 get_Service(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Service()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AdvertisementStatus(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AdvertisementStatus()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_AdvertisementStatusChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().AdvertisementStatusChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_AdvertisementStatusChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().AdvertisementStatusChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall StartAdvertising() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().StartAdvertising(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall StartAdvertisingWithParameters(void* parameters) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().StartAdvertising(*reinterpret_cast(¶meters)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall StopAdvertising() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().StopAdvertising(); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall UpdateAdvertisingParameters(void* parameters) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UpdateAdvertisingParameters(*reinterpret_cast(¶meters)); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { 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(); } 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 put_IsConnectable(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsConnectable(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsConnectable(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsConnectable()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_IsDiscoverable(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().IsDiscoverable(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_IsDiscoverable(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().IsDiscoverable()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall put_ServiceData(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ServiceData(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ServiceData(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ServiceData()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_UseLowEnergyUncoded1MPhyAsSecondaryPhy(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UseLowEnergyUncoded1MPhyAsSecondaryPhy()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_UseLowEnergyUncoded1MPhyAsSecondaryPhy(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UseLowEnergyUncoded1MPhyAsSecondaryPhy(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_UseLowEnergyUncoded2MPhyAsSecondaryPhy(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().UseLowEnergyUncoded2MPhyAsSecondaryPhy()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_UseLowEnergyUncoded2MPhyAsSecondaryPhy(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().UseLowEnergyUncoded2MPhyAsSecondaryPhy(value); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { 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(); } int32_t __stdcall get_ServiceProvider(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ServiceProvider()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateAsync(winrt::guid serviceUuid, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().CreateAsync(*reinterpret_cast(&serviceUuid))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Battery(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Battery()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_BloodPressure(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().BloodPressure()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CyclingSpeedAndCadence(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CyclingSpeedAndCadence()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_GenericAccess(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GenericAccess()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_GenericAttribute(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GenericAttribute()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Glucose(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Glucose()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HealthThermometer(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HealthThermometer()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HeartRate(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HeartRate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RunningSpeedAndCadence(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RunningSpeedAndCadence()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AlertNotification(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AlertNotification()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CurrentTime(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CurrentTime()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CyclingPower(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CyclingPower()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_DeviceInformation(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().DeviceInformation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_HumanInterfaceDevice(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().HumanInterfaceDevice()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ImmediateAlert(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ImmediateAlert()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LinkLoss(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LinkLoss()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_LocationAndNavigation(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().LocationAndNavigation()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_NextDstChange(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().NextDstChange()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_PhoneAlertStatus(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().PhoneAlertStatus()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ReferenceTimeUpdate(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ReferenceTimeUpdate()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ScanParameters(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ScanParameters()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TxPower(winrt::guid* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TxPower()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { 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 get_CanMaintainConnection(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CanMaintainConnection()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_MaintainConnection(bool value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().MaintainConnection(value); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaintainConnection(bool* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaintainConnection()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxPduSize(uint16_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxPduSize()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_SessionStatus(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().SessionStatus()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_MaxPduSizeChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().MaxPduSizeChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_MaxPduSizeChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().MaxPduSizeChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall add_SessionStatusChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().SessionStatusChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_SessionStatusChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().SessionStatusChanged(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall FromDeviceIdAsync(void* deviceId, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().FromDeviceIdAsync(*reinterpret_cast(&deviceId))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { 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(); } 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_Session(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Session()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_MaxNotificationSize(uint16_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().MaxNotificationSize()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_MaxNotificationSizeChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().MaxNotificationSizeChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_MaxNotificationSizeChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().MaxNotificationSizeChanged(*reinterpret_cast(&token)); return 0; } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_CharacteristicValue(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CharacteristicValue()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Timestamp(int64_t* timestamp) noexcept final try { zero_abi(timestamp); typename D::abi_guard guard(this->shim()); *timestamp = detach_from(this->shim().Timestamp()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { 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 get_Offset(uint32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Offset()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Option(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Option()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_State(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().State()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall add_StateChanged(void* handler, winrt::event_token* token) noexcept final try { zero_abi(token); typename D::abi_guard guard(this->shim()); *token = detach_from(this->shim().StateChanged(*reinterpret_cast const*>(&handler))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall remove_StateChanged(winrt::event_token token) noexcept final { typename D::abi_guard guard(this->shim()); this->shim().StateChanged(*reinterpret_cast(&token)); return 0; } int32_t __stdcall Respond() noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Respond(); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RespondWithProtocolError(uint8_t protocolError) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RespondWithProtocolError(protocolError); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Session(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Session()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetDeferral(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GetDeferral()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall GetRequestAsync(void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().GetRequestAsync()); 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_ProtocolError(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().ProtocolError()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Windows::Devices::Bluetooth::GenericAttributeProfile { constexpr auto operator|(GattCharacteristicProperties const left, GattCharacteristicProperties const right) noexcept { return static_cast(impl::to_underlying_type(left) | impl::to_underlying_type(right)); } constexpr auto operator|=(GattCharacteristicProperties& left, GattCharacteristicProperties const right) noexcept { left = left | right; return left; } constexpr auto operator&(GattCharacteristicProperties const left, GattCharacteristicProperties const right) noexcept { return static_cast(impl::to_underlying_type(left) & impl::to_underlying_type(right)); } constexpr auto operator&=(GattCharacteristicProperties& left, GattCharacteristicProperties const right) noexcept { left = left & right; return left; } constexpr auto operator~(GattCharacteristicProperties const value) noexcept { return static_cast(~impl::to_underlying_type(value)); } constexpr auto operator^(GattCharacteristicProperties const left, GattCharacteristicProperties const right) noexcept { return static_cast(impl::to_underlying_type(left) ^ impl::to_underlying_type(right)); } constexpr auto operator^=(GattCharacteristicProperties& left, GattCharacteristicProperties const right) noexcept { left = left ^ right; return left; } inline auto GattCharacteristic::ConvertShortIdToUuid(uint16_t shortId) { return impl::call_factory([&](IGattCharacteristicStatics const& f) { return f.ConvertShortIdToUuid(shortId); }); } inline auto GattCharacteristicUuids::BatteryLevel() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.BatteryLevel(); }); } inline auto GattCharacteristicUuids::BloodPressureFeature() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.BloodPressureFeature(); }); } inline auto GattCharacteristicUuids::BloodPressureMeasurement() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.BloodPressureMeasurement(); }); } inline auto GattCharacteristicUuids::BodySensorLocation() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.BodySensorLocation(); }); } inline auto GattCharacteristicUuids::CscFeature() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.CscFeature(); }); } inline auto GattCharacteristicUuids::CscMeasurement() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.CscMeasurement(); }); } inline auto GattCharacteristicUuids::GlucoseFeature() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.GlucoseFeature(); }); } inline auto GattCharacteristicUuids::GlucoseMeasurement() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.GlucoseMeasurement(); }); } inline auto GattCharacteristicUuids::GlucoseMeasurementContext() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.GlucoseMeasurementContext(); }); } inline auto GattCharacteristicUuids::HeartRateControlPoint() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.HeartRateControlPoint(); }); } inline auto GattCharacteristicUuids::HeartRateMeasurement() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.HeartRateMeasurement(); }); } inline auto GattCharacteristicUuids::IntermediateCuffPressure() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.IntermediateCuffPressure(); }); } inline auto GattCharacteristicUuids::IntermediateTemperature() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.IntermediateTemperature(); }); } inline auto GattCharacteristicUuids::MeasurementInterval() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.MeasurementInterval(); }); } inline auto GattCharacteristicUuids::RecordAccessControlPoint() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.RecordAccessControlPoint(); }); } inline auto GattCharacteristicUuids::RscFeature() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.RscFeature(); }); } inline auto GattCharacteristicUuids::RscMeasurement() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.RscMeasurement(); }); } inline auto GattCharacteristicUuids::SCControlPoint() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.SCControlPoint(); }); } inline auto GattCharacteristicUuids::SensorLocation() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.SensorLocation(); }); } inline auto GattCharacteristicUuids::TemperatureMeasurement() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.TemperatureMeasurement(); }); } inline auto GattCharacteristicUuids::TemperatureType() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics const& f) { return f.TemperatureType(); }); } inline auto GattCharacteristicUuids::AlertCategoryId() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.AlertCategoryId(); }); } inline auto GattCharacteristicUuids::AlertCategoryIdBitMask() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.AlertCategoryIdBitMask(); }); } inline auto GattCharacteristicUuids::AlertLevel() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.AlertLevel(); }); } inline auto GattCharacteristicUuids::AlertNotificationControlPoint() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.AlertNotificationControlPoint(); }); } inline auto GattCharacteristicUuids::AlertStatus() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.AlertStatus(); }); } inline auto GattCharacteristicUuids::GapAppearance() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.GapAppearance(); }); } inline auto GattCharacteristicUuids::BootKeyboardInputReport() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.BootKeyboardInputReport(); }); } inline auto GattCharacteristicUuids::BootKeyboardOutputReport() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.BootKeyboardOutputReport(); }); } inline auto GattCharacteristicUuids::BootMouseInputReport() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.BootMouseInputReport(); }); } inline auto GattCharacteristicUuids::CurrentTime() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.CurrentTime(); }); } inline auto GattCharacteristicUuids::CyclingPowerControlPoint() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.CyclingPowerControlPoint(); }); } inline auto GattCharacteristicUuids::CyclingPowerFeature() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.CyclingPowerFeature(); }); } inline auto GattCharacteristicUuids::CyclingPowerMeasurement() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.CyclingPowerMeasurement(); }); } inline auto GattCharacteristicUuids::CyclingPowerVector() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.CyclingPowerVector(); }); } inline auto GattCharacteristicUuids::DateTime() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.DateTime(); }); } inline auto GattCharacteristicUuids::DayDateTime() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.DayDateTime(); }); } inline auto GattCharacteristicUuids::DayOfWeek() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.DayOfWeek(); }); } inline auto GattCharacteristicUuids::GapDeviceName() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.GapDeviceName(); }); } inline auto GattCharacteristicUuids::DstOffset() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.DstOffset(); }); } inline auto GattCharacteristicUuids::ExactTime256() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.ExactTime256(); }); } inline auto GattCharacteristicUuids::FirmwareRevisionString() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.FirmwareRevisionString(); }); } inline auto GattCharacteristicUuids::HardwareRevisionString() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.HardwareRevisionString(); }); } inline auto GattCharacteristicUuids::HidControlPoint() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.HidControlPoint(); }); } inline auto GattCharacteristicUuids::HidInformation() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.HidInformation(); }); } inline auto GattCharacteristicUuids::Ieee1107320601RegulatoryCertificationDataList() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.Ieee1107320601RegulatoryCertificationDataList(); }); } inline auto GattCharacteristicUuids::LnControlPoint() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.LnControlPoint(); }); } inline auto GattCharacteristicUuids::LnFeature() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.LnFeature(); }); } inline auto GattCharacteristicUuids::LocalTimeInformation() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.LocalTimeInformation(); }); } inline auto GattCharacteristicUuids::LocationAndSpeed() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.LocationAndSpeed(); }); } inline auto GattCharacteristicUuids::ManufacturerNameString() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.ManufacturerNameString(); }); } inline auto GattCharacteristicUuids::ModelNumberString() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.ModelNumberString(); }); } inline auto GattCharacteristicUuids::Navigation() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.Navigation(); }); } inline auto GattCharacteristicUuids::NewAlert() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.NewAlert(); }); } inline auto GattCharacteristicUuids::GapPeripheralPreferredConnectionParameters() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.GapPeripheralPreferredConnectionParameters(); }); } inline auto GattCharacteristicUuids::GapPeripheralPrivacyFlag() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.GapPeripheralPrivacyFlag(); }); } inline auto GattCharacteristicUuids::PnpId() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.PnpId(); }); } inline auto GattCharacteristicUuids::PositionQuality() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.PositionQuality(); }); } inline auto GattCharacteristicUuids::ProtocolMode() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.ProtocolMode(); }); } inline auto GattCharacteristicUuids::GapReconnectionAddress() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.GapReconnectionAddress(); }); } inline auto GattCharacteristicUuids::ReferenceTimeInformation() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.ReferenceTimeInformation(); }); } inline auto GattCharacteristicUuids::Report() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.Report(); }); } inline auto GattCharacteristicUuids::ReportMap() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.ReportMap(); }); } inline auto GattCharacteristicUuids::RingerControlPoint() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.RingerControlPoint(); }); } inline auto GattCharacteristicUuids::RingerSetting() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.RingerSetting(); }); } inline auto GattCharacteristicUuids::ScanIntervalWindow() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.ScanIntervalWindow(); }); } inline auto GattCharacteristicUuids::ScanRefresh() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.ScanRefresh(); }); } inline auto GattCharacteristicUuids::SerialNumberString() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.SerialNumberString(); }); } inline auto GattCharacteristicUuids::GattServiceChanged() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.GattServiceChanged(); }); } inline auto GattCharacteristicUuids::SoftwareRevisionString() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.SoftwareRevisionString(); }); } inline auto GattCharacteristicUuids::SupportedNewAlertCategory() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.SupportedNewAlertCategory(); }); } inline auto GattCharacteristicUuids::SupportUnreadAlertCategory() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.SupportUnreadAlertCategory(); }); } inline auto GattCharacteristicUuids::SystemId() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.SystemId(); }); } inline auto GattCharacteristicUuids::TimeAccuracy() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.TimeAccuracy(); }); } inline auto GattCharacteristicUuids::TimeSource() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.TimeSource(); }); } inline auto GattCharacteristicUuids::TimeUpdateControlPoint() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.TimeUpdateControlPoint(); }); } inline auto GattCharacteristicUuids::TimeUpdateState() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.TimeUpdateState(); }); } inline auto GattCharacteristicUuids::TimeWithDst() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.TimeWithDst(); }); } inline auto GattCharacteristicUuids::TimeZone() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.TimeZone(); }); } inline auto GattCharacteristicUuids::TxPowerLevel() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.TxPowerLevel(); }); } inline auto GattCharacteristicUuids::UnreadAlertStatus() { return impl::call_factory_cast([](IGattCharacteristicUuidsStatics2 const& f) { return f.UnreadAlertStatus(); }); } inline auto GattDescriptor::ConvertShortIdToUuid(uint16_t shortId) { return impl::call_factory([&](IGattDescriptorStatics const& f) { return f.ConvertShortIdToUuid(shortId); }); } inline auto GattDescriptorUuids::CharacteristicAggregateFormat() { return impl::call_factory_cast([](IGattDescriptorUuidsStatics const& f) { return f.CharacteristicAggregateFormat(); }); } inline auto GattDescriptorUuids::CharacteristicExtendedProperties() { return impl::call_factory_cast([](IGattDescriptorUuidsStatics const& f) { return f.CharacteristicExtendedProperties(); }); } inline auto GattDescriptorUuids::CharacteristicPresentationFormat() { return impl::call_factory_cast([](IGattDescriptorUuidsStatics const& f) { return f.CharacteristicPresentationFormat(); }); } inline auto GattDescriptorUuids::CharacteristicUserDescription() { return impl::call_factory_cast([](IGattDescriptorUuidsStatics const& f) { return f.CharacteristicUserDescription(); }); } inline auto GattDescriptorUuids::ClientCharacteristicConfiguration() { return impl::call_factory_cast([](IGattDescriptorUuidsStatics const& f) { return f.ClientCharacteristicConfiguration(); }); } inline auto GattDescriptorUuids::ServerCharacteristicConfiguration() { return impl::call_factory_cast([](IGattDescriptorUuidsStatics const& f) { return f.ServerCharacteristicConfiguration(); }); } inline auto GattDeviceService::FromIdAsync(param::hstring const& deviceId) { return impl::call_factory([&](IGattDeviceServiceStatics const& f) { return f.FromIdAsync(deviceId); }); } inline auto GattDeviceService::GetDeviceSelectorFromUuid(winrt::guid const& serviceUuid) { return impl::call_factory([&](IGattDeviceServiceStatics const& f) { return f.GetDeviceSelectorFromUuid(serviceUuid); }); } inline auto GattDeviceService::GetDeviceSelectorFromShortId(uint16_t serviceShortId) { return impl::call_factory([&](IGattDeviceServiceStatics const& f) { return f.GetDeviceSelectorFromShortId(serviceShortId); }); } inline auto GattDeviceService::ConvertShortIdToUuid(uint16_t shortId) { return impl::call_factory([&](IGattDeviceServiceStatics const& f) { return f.ConvertShortIdToUuid(shortId); }); } inline auto GattDeviceService::FromIdAsync(param::hstring const& deviceId, winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattSharingMode const& sharingMode) { return impl::call_factory([&](IGattDeviceServiceStatics2 const& f) { return f.FromIdAsync(deviceId, sharingMode); }); } inline auto GattDeviceService::GetDeviceSelectorForBluetoothDeviceId(winrt::Windows::Devices::Bluetooth::BluetoothDeviceId const& bluetoothDeviceId) { return impl::call_factory([&](IGattDeviceServiceStatics2 const& f) { return f.GetDeviceSelectorForBluetoothDeviceId(bluetoothDeviceId); }); } inline auto GattDeviceService::GetDeviceSelectorForBluetoothDeviceId(winrt::Windows::Devices::Bluetooth::BluetoothDeviceId const& bluetoothDeviceId, winrt::Windows::Devices::Bluetooth::BluetoothCacheMode const& cacheMode) { return impl::call_factory([&](IGattDeviceServiceStatics2 const& f) { return f.GetDeviceSelectorForBluetoothDeviceId(bluetoothDeviceId, cacheMode); }); } inline auto GattDeviceService::GetDeviceSelectorForBluetoothDeviceIdAndUuid(winrt::Windows::Devices::Bluetooth::BluetoothDeviceId const& bluetoothDeviceId, winrt::guid const& serviceUuid) { return impl::call_factory([&](IGattDeviceServiceStatics2 const& f) { return f.GetDeviceSelectorForBluetoothDeviceIdAndUuid(bluetoothDeviceId, serviceUuid); }); } inline auto GattDeviceService::GetDeviceSelectorForBluetoothDeviceIdAndUuid(winrt::Windows::Devices::Bluetooth::BluetoothDeviceId const& bluetoothDeviceId, winrt::guid const& serviceUuid, winrt::Windows::Devices::Bluetooth::BluetoothCacheMode const& cacheMode) { return impl::call_factory([&](IGattDeviceServiceStatics2 const& f) { return f.GetDeviceSelectorForBluetoothDeviceIdAndUuid(bluetoothDeviceId, serviceUuid, cacheMode); }); } inline GattLocalCharacteristicParameters::GattLocalCharacteristicParameters() : GattLocalCharacteristicParameters(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline GattLocalDescriptorParameters::GattLocalDescriptorParameters() : GattLocalDescriptorParameters(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto GattPresentationFormat::BluetoothSigAssignedNumbers() { return impl::call_factory_cast([](IGattPresentationFormatStatics const& f) { return f.BluetoothSigAssignedNumbers(); }); } inline auto GattPresentationFormat::FromParts(uint8_t formatType, int32_t exponent, uint16_t unit, uint8_t namespaceId, uint16_t description) { return impl::call_factory([&](IGattPresentationFormatStatics2 const& f) { return f.FromParts(formatType, exponent, unit, namespaceId, description); }); } inline auto GattPresentationFormatTypes::Boolean() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.Boolean(); }); } inline auto GattPresentationFormatTypes::Bit2() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.Bit2(); }); } inline auto GattPresentationFormatTypes::Nibble() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.Nibble(); }); } inline auto GattPresentationFormatTypes::UInt8() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.UInt8(); }); } inline auto GattPresentationFormatTypes::UInt12() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.UInt12(); }); } inline auto GattPresentationFormatTypes::UInt16() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.UInt16(); }); } inline auto GattPresentationFormatTypes::UInt24() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.UInt24(); }); } inline auto GattPresentationFormatTypes::UInt32() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.UInt32(); }); } inline auto GattPresentationFormatTypes::UInt48() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.UInt48(); }); } inline auto GattPresentationFormatTypes::UInt64() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.UInt64(); }); } inline auto GattPresentationFormatTypes::UInt128() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.UInt128(); }); } inline auto GattPresentationFormatTypes::SInt8() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.SInt8(); }); } inline auto GattPresentationFormatTypes::SInt12() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.SInt12(); }); } inline auto GattPresentationFormatTypes::SInt16() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.SInt16(); }); } inline auto GattPresentationFormatTypes::SInt24() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.SInt24(); }); } inline auto GattPresentationFormatTypes::SInt32() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.SInt32(); }); } inline auto GattPresentationFormatTypes::SInt48() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.SInt48(); }); } inline auto GattPresentationFormatTypes::SInt64() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.SInt64(); }); } inline auto GattPresentationFormatTypes::SInt128() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.SInt128(); }); } inline auto GattPresentationFormatTypes::Float32() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.Float32(); }); } inline auto GattPresentationFormatTypes::Float64() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.Float64(); }); } inline auto GattPresentationFormatTypes::SFloat() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.SFloat(); }); } inline auto GattPresentationFormatTypes::Float() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.Float(); }); } inline auto GattPresentationFormatTypes::DUInt16() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.DUInt16(); }); } inline auto GattPresentationFormatTypes::Utf8() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.Utf8(); }); } inline auto GattPresentationFormatTypes::Utf16() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.Utf16(); }); } inline auto GattPresentationFormatTypes::Struct() { return impl::call_factory_cast([](IGattPresentationFormatTypesStatics const& f) { return f.Struct(); }); } inline auto GattProtocolError::InvalidHandle() { return impl::call_factory_cast([](IGattProtocolErrorStatics const& f) { return f.InvalidHandle(); }); } inline auto GattProtocolError::ReadNotPermitted() { return impl::call_factory_cast([](IGattProtocolErrorStatics const& f) { return f.ReadNotPermitted(); }); } inline auto GattProtocolError::WriteNotPermitted() { return impl::call_factory_cast([](IGattProtocolErrorStatics const& f) { return f.WriteNotPermitted(); }); } inline auto GattProtocolError::InvalidPdu() { return impl::call_factory_cast([](IGattProtocolErrorStatics const& f) { return f.InvalidPdu(); }); } inline auto GattProtocolError::InsufficientAuthentication() { return impl::call_factory_cast([](IGattProtocolErrorStatics const& f) { return f.InsufficientAuthentication(); }); } inline auto GattProtocolError::RequestNotSupported() { return impl::call_factory_cast([](IGattProtocolErrorStatics const& f) { return f.RequestNotSupported(); }); } inline auto GattProtocolError::InvalidOffset() { return impl::call_factory_cast([](IGattProtocolErrorStatics const& f) { return f.InvalidOffset(); }); } inline auto GattProtocolError::InsufficientAuthorization() { return impl::call_factory_cast([](IGattProtocolErrorStatics const& f) { return f.InsufficientAuthorization(); }); } inline auto GattProtocolError::PrepareQueueFull() { return impl::call_factory_cast([](IGattProtocolErrorStatics const& f) { return f.PrepareQueueFull(); }); } inline auto GattProtocolError::AttributeNotFound() { return impl::call_factory_cast([](IGattProtocolErrorStatics const& f) { return f.AttributeNotFound(); }); } inline auto GattProtocolError::AttributeNotLong() { return impl::call_factory_cast([](IGattProtocolErrorStatics const& f) { return f.AttributeNotLong(); }); } inline auto GattProtocolError::InsufficientEncryptionKeySize() { return impl::call_factory_cast([](IGattProtocolErrorStatics const& f) { return f.InsufficientEncryptionKeySize(); }); } inline auto GattProtocolError::InvalidAttributeValueLength() { return impl::call_factory_cast([](IGattProtocolErrorStatics const& f) { return f.InvalidAttributeValueLength(); }); } inline auto GattProtocolError::UnlikelyError() { return impl::call_factory_cast([](IGattProtocolErrorStatics const& f) { return f.UnlikelyError(); }); } inline auto GattProtocolError::InsufficientEncryption() { return impl::call_factory_cast([](IGattProtocolErrorStatics const& f) { return f.InsufficientEncryption(); }); } inline auto GattProtocolError::UnsupportedGroupType() { return impl::call_factory_cast([](IGattProtocolErrorStatics const& f) { return f.UnsupportedGroupType(); }); } inline auto GattProtocolError::InsufficientResources() { return impl::call_factory_cast([](IGattProtocolErrorStatics const& f) { return f.InsufficientResources(); }); } inline GattReliableWriteTransaction::GattReliableWriteTransaction() : GattReliableWriteTransaction(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto GattServiceProvider::CreateAsync(winrt::guid const& serviceUuid) { return impl::call_factory([&](IGattServiceProviderStatics const& f) { return f.CreateAsync(serviceUuid); }); } inline GattServiceProviderAdvertisingParameters::GattServiceProviderAdvertisingParameters() : GattServiceProviderAdvertisingParameters(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline auto GattServiceUuids::Battery() { return impl::call_factory_cast([](IGattServiceUuidsStatics const& f) { return f.Battery(); }); } inline auto GattServiceUuids::BloodPressure() { return impl::call_factory_cast([](IGattServiceUuidsStatics const& f) { return f.BloodPressure(); }); } inline auto GattServiceUuids::CyclingSpeedAndCadence() { return impl::call_factory_cast([](IGattServiceUuidsStatics const& f) { return f.CyclingSpeedAndCadence(); }); } inline auto GattServiceUuids::GenericAccess() { return impl::call_factory_cast([](IGattServiceUuidsStatics const& f) { return f.GenericAccess(); }); } inline auto GattServiceUuids::GenericAttribute() { return impl::call_factory_cast([](IGattServiceUuidsStatics const& f) { return f.GenericAttribute(); }); } inline auto GattServiceUuids::Glucose() { return impl::call_factory_cast([](IGattServiceUuidsStatics const& f) { return f.Glucose(); }); } inline auto GattServiceUuids::HealthThermometer() { return impl::call_factory_cast([](IGattServiceUuidsStatics const& f) { return f.HealthThermometer(); }); } inline auto GattServiceUuids::HeartRate() { return impl::call_factory_cast([](IGattServiceUuidsStatics const& f) { return f.HeartRate(); }); } inline auto GattServiceUuids::RunningSpeedAndCadence() { return impl::call_factory_cast([](IGattServiceUuidsStatics const& f) { return f.RunningSpeedAndCadence(); }); } inline auto GattServiceUuids::AlertNotification() { return impl::call_factory_cast([](IGattServiceUuidsStatics2 const& f) { return f.AlertNotification(); }); } inline auto GattServiceUuids::CurrentTime() { return impl::call_factory_cast([](IGattServiceUuidsStatics2 const& f) { return f.CurrentTime(); }); } inline auto GattServiceUuids::CyclingPower() { return impl::call_factory_cast([](IGattServiceUuidsStatics2 const& f) { return f.CyclingPower(); }); } inline auto GattServiceUuids::DeviceInformation() { return impl::call_factory_cast([](IGattServiceUuidsStatics2 const& f) { return f.DeviceInformation(); }); } inline auto GattServiceUuids::HumanInterfaceDevice() { return impl::call_factory_cast([](IGattServiceUuidsStatics2 const& f) { return f.HumanInterfaceDevice(); }); } inline auto GattServiceUuids::ImmediateAlert() { return impl::call_factory_cast([](IGattServiceUuidsStatics2 const& f) { return f.ImmediateAlert(); }); } inline auto GattServiceUuids::LinkLoss() { return impl::call_factory_cast([](IGattServiceUuidsStatics2 const& f) { return f.LinkLoss(); }); } inline auto GattServiceUuids::LocationAndNavigation() { return impl::call_factory_cast([](IGattServiceUuidsStatics2 const& f) { return f.LocationAndNavigation(); }); } inline auto GattServiceUuids::NextDstChange() { return impl::call_factory_cast([](IGattServiceUuidsStatics2 const& f) { return f.NextDstChange(); }); } inline auto GattServiceUuids::PhoneAlertStatus() { return impl::call_factory_cast([](IGattServiceUuidsStatics2 const& f) { return f.PhoneAlertStatus(); }); } inline auto GattServiceUuids::ReferenceTimeUpdate() { return impl::call_factory_cast([](IGattServiceUuidsStatics2 const& f) { return f.ReferenceTimeUpdate(); }); } inline auto GattServiceUuids::ScanParameters() { return impl::call_factory_cast([](IGattServiceUuidsStatics2 const& f) { return f.ScanParameters(); }); } inline auto GattServiceUuids::TxPower() { return impl::call_factory_cast([](IGattServiceUuidsStatics2 const& f) { return f.TxPower(); }); } inline auto GattSession::FromDeviceIdAsync(winrt::Windows::Devices::Bluetooth::BluetoothDeviceId const& deviceId) { return impl::call_factory([&](IGattSessionStatics const& f) { return f.FromDeviceIdAsync(deviceId); }); } } 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 {}; 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 {}; 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 {}; 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