mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
861 lines
52 KiB
C++
861 lines
52 KiB
C++
// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.250303.1
|
|
|
|
#pragma once
|
|
#ifndef WINRT_Windows_Devices_Bluetooth_Background_H
|
|
#define WINRT_Windows_Devices_Bluetooth_Background_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.Bluetooth.Advertisement.2.h"
|
|
#include "winrt/impl/Windows.Devices.Bluetooth.GenericAttributeProfile.2.h"
|
|
#include "winrt/impl/Windows.Devices.Bluetooth.Rfcomm.2.h"
|
|
#include "winrt/impl/Windows.Foundation.2.h"
|
|
#include "winrt/impl/Windows.Foundation.Collections.2.h"
|
|
#include "winrt/impl/Windows.Networking.Sockets.2.h"
|
|
#include "winrt/impl/Windows.Storage.Streams.2.h"
|
|
#include "winrt/impl/Windows.Devices.Bluetooth.Background.2.h"
|
|
namespace winrt::impl
|
|
{
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IBluetoothLEAdvertisementPublisherTriggerDetails<D>::Status() const
|
|
{
|
|
winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisherStatus value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementPublisherTriggerDetails>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementPublisherTriggerDetails, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementPublisherTriggerDetails>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_Status(reinterpret_cast<int32_t*>(&value)));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementPublisherTriggerDetails>**)this;
|
|
check_hresult(_winrt_abi_type->get_Status(reinterpret_cast<int32_t*>(&value)));
|
|
}
|
|
return value;
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IBluetoothLEAdvertisementPublisherTriggerDetails<D>::Error() const
|
|
{
|
|
winrt::Windows::Devices::Bluetooth::BluetoothError value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementPublisherTriggerDetails>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementPublisherTriggerDetails, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementPublisherTriggerDetails>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_Error(reinterpret_cast<int32_t*>(&value)));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementPublisherTriggerDetails>**)this;
|
|
check_hresult(_winrt_abi_type->get_Error(reinterpret_cast<int32_t*>(&value)));
|
|
}
|
|
return value;
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IBluetoothLEAdvertisementPublisherTriggerDetails2<D>::SelectedTransmitPowerLevelInDBm() const
|
|
{
|
|
void* value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementPublisherTriggerDetails2>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementPublisherTriggerDetails2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementPublisherTriggerDetails2>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_SelectedTransmitPowerLevelInDBm(&value));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementPublisherTriggerDetails2>**)this;
|
|
check_hresult(_winrt_abi_type->get_SelectedTransmitPowerLevelInDBm(&value));
|
|
}
|
|
return winrt::Windows::Foundation::IReference<int16_t>{ value, take_ownership_from_abi };
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IBluetoothLEAdvertisementWatcherTriggerDetails<D>::Error() const
|
|
{
|
|
winrt::Windows::Devices::Bluetooth::BluetoothError value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementWatcherTriggerDetails>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementWatcherTriggerDetails, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementWatcherTriggerDetails>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_Error(reinterpret_cast<int32_t*>(&value)));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementWatcherTriggerDetails>**)this;
|
|
check_hresult(_winrt_abi_type->get_Error(reinterpret_cast<int32_t*>(&value)));
|
|
}
|
|
return value;
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IBluetoothLEAdvertisementWatcherTriggerDetails<D>::Advertisements() const
|
|
{
|
|
void* value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementWatcherTriggerDetails>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementWatcherTriggerDetails, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementWatcherTriggerDetails>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_Advertisements(&value));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementWatcherTriggerDetails>**)this;
|
|
check_hresult(_winrt_abi_type->get_Advertisements(&value));
|
|
}
|
|
return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs>{ value, take_ownership_from_abi };
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IBluetoothLEAdvertisementWatcherTriggerDetails<D>::SignalStrengthFilter() const
|
|
{
|
|
void* value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementWatcherTriggerDetails>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementWatcherTriggerDetails, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementWatcherTriggerDetails>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_SignalStrengthFilter(&value));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementWatcherTriggerDetails>**)this;
|
|
check_hresult(_winrt_abi_type->get_SignalStrengthFilter(&value));
|
|
}
|
|
return winrt::Windows::Devices::Bluetooth::BluetoothSignalStrengthFilter{ value, take_ownership_from_abi };
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IGattCharacteristicNotificationTriggerDetails<D>::Characteristic() const
|
|
{
|
|
void* value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_Characteristic(&value));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails>**)this;
|
|
check_hresult(_winrt_abi_type->get_Characteristic(&value));
|
|
}
|
|
return winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCharacteristic{ value, take_ownership_from_abi };
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IGattCharacteristicNotificationTriggerDetails<D>::Value() const
|
|
{
|
|
void* value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_Value(&value));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails>**)this;
|
|
check_hresult(_winrt_abi_type->get_Value(&value));
|
|
}
|
|
return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi };
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IGattCharacteristicNotificationTriggerDetails2<D>::Error() const
|
|
{
|
|
winrt::Windows::Devices::Bluetooth::BluetoothError value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails2>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails2>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_Error(reinterpret_cast<int32_t*>(&value)));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails2>**)this;
|
|
check_hresult(_winrt_abi_type->get_Error(reinterpret_cast<int32_t*>(&value)));
|
|
}
|
|
return value;
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IGattCharacteristicNotificationTriggerDetails2<D>::EventTriggeringMode() const
|
|
{
|
|
winrt::Windows::Devices::Bluetooth::Background::BluetoothEventTriggeringMode value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails2>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails2>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_EventTriggeringMode(reinterpret_cast<int32_t*>(&value)));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails2>**)this;
|
|
check_hresult(_winrt_abi_type->get_EventTriggeringMode(reinterpret_cast<int32_t*>(&value)));
|
|
}
|
|
return value;
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IGattCharacteristicNotificationTriggerDetails2<D>::ValueChangedEvents() const
|
|
{
|
|
void* value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails2>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails2, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails2>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_ValueChangedEvents(&value));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails2>**)this;
|
|
check_hresult(_winrt_abi_type->get_ValueChangedEvents(&value));
|
|
}
|
|
return winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattValueChangedEventArgs>{ value, take_ownership_from_abi };
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IGattServiceProviderConnection<D>::TriggerId() const
|
|
{
|
|
void* value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderConnection>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderConnection, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderConnection>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_TriggerId(&value));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderConnection>**)this;
|
|
check_hresult(_winrt_abi_type->get_TriggerId(&value));
|
|
}
|
|
return hstring{ value, take_ownership_from_abi };
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IGattServiceProviderConnection<D>::Service() const
|
|
{
|
|
void* value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderConnection>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderConnection, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderConnection>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_Service(&value));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderConnection>**)this;
|
|
check_hresult(_winrt_abi_type->get_Service(&value));
|
|
}
|
|
return winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattLocalService{ value, take_ownership_from_abi };
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IGattServiceProviderConnection<D>::Start() const
|
|
{
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderConnection>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderConnection, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderConnection>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->Start());
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderConnection>**)this;
|
|
check_hresult(_winrt_abi_type->Start());
|
|
}
|
|
}
|
|
template <typename D>
|
|
auto
|
|
consume_Windows_Devices_Bluetooth_Background_IGattServiceProviderConnection2<
|
|
D>::
|
|
UpdateAdvertisingParameters(
|
|
winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::
|
|
GattServiceProviderAdvertisingParameters const& parameters)
|
|
const {
|
|
if constexpr (!std::is_same_v<
|
|
D, winrt::Windows::Devices::Bluetooth::Background::
|
|
IGattServiceProviderConnection2>) {
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<
|
|
winrt::Windows::Devices::Bluetooth::Background::
|
|
IGattServiceProviderConnection2,
|
|
D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(
|
|
abi_t<winrt::Windows::Devices::Bluetooth::Background::
|
|
IGattServiceProviderConnection2>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->UpdateAdvertisingParameters(
|
|
*(void**)(¶meters)));
|
|
} else {
|
|
auto const _winrt_abi_type =
|
|
*(abi_t<winrt::Windows::Devices::Bluetooth::Background::
|
|
IGattServiceProviderConnection2>**)this;
|
|
check_hresult(_winrt_abi_type->UpdateAdvertisingParameters(
|
|
*(void**)(¶meters)));
|
|
}
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IGattServiceProviderConnectionStatics<D>::AllServices() const
|
|
{
|
|
void* value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderConnectionStatics>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderConnectionStatics, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderConnectionStatics>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_AllServices(&value));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderConnectionStatics>**)this;
|
|
check_hresult(_winrt_abi_type->get_AllServices(&value));
|
|
}
|
|
return winrt::Windows::Foundation::Collections::IMapView<hstring, winrt::Windows::Devices::Bluetooth::Background::GattServiceProviderConnection>{ value, take_ownership_from_abi };
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IGattServiceProviderTriggerDetails<D>::Connection() const
|
|
{
|
|
void* value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderTriggerDetails>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderTriggerDetails, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderTriggerDetails>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_Connection(&value));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderTriggerDetails>**)this;
|
|
check_hresult(_winrt_abi_type->get_Connection(&value));
|
|
}
|
|
return winrt::Windows::Devices::Bluetooth::Background::GattServiceProviderConnection{ value, take_ownership_from_abi };
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IRfcommConnectionTriggerDetails<D>::Socket() const
|
|
{
|
|
void* value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IRfcommConnectionTriggerDetails>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IRfcommConnectionTriggerDetails, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommConnectionTriggerDetails>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_Socket(&value));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommConnectionTriggerDetails>**)this;
|
|
check_hresult(_winrt_abi_type->get_Socket(&value));
|
|
}
|
|
return winrt::Windows::Networking::Sockets::StreamSocket{ value, take_ownership_from_abi };
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IRfcommConnectionTriggerDetails<D>::Incoming() const
|
|
{
|
|
bool value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IRfcommConnectionTriggerDetails>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IRfcommConnectionTriggerDetails, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommConnectionTriggerDetails>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_Incoming(&value));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommConnectionTriggerDetails>**)this;
|
|
check_hresult(_winrt_abi_type->get_Incoming(&value));
|
|
}
|
|
return value;
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IRfcommConnectionTriggerDetails<D>::RemoteDevice() const
|
|
{
|
|
void* value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IRfcommConnectionTriggerDetails>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IRfcommConnectionTriggerDetails, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommConnectionTriggerDetails>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_RemoteDevice(&value));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommConnectionTriggerDetails>**)this;
|
|
check_hresult(_winrt_abi_type->get_RemoteDevice(&value));
|
|
}
|
|
return winrt::Windows::Devices::Bluetooth::BluetoothDevice{ value, take_ownership_from_abi };
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IRfcommInboundConnectionInformation<D>::SdpRecord() const
|
|
{
|
|
void* value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_SdpRecord(&value));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation>**)this;
|
|
check_hresult(_winrt_abi_type->get_SdpRecord(&value));
|
|
}
|
|
return winrt::Windows::Storage::Streams::IBuffer{ value, take_ownership_from_abi };
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IRfcommInboundConnectionInformation<D>::SdpRecord(winrt::Windows::Storage::Streams::IBuffer const& value) const
|
|
{
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->put_SdpRecord(*(void**)(&value)));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation>**)this;
|
|
check_hresult(_winrt_abi_type->put_SdpRecord(*(void**)(&value)));
|
|
}
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IRfcommInboundConnectionInformation<D>::LocalServiceId() const
|
|
{
|
|
void* value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_LocalServiceId(&value));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation>**)this;
|
|
check_hresult(_winrt_abi_type->get_LocalServiceId(&value));
|
|
}
|
|
return winrt::Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId{ value, take_ownership_from_abi };
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IRfcommInboundConnectionInformation<D>::LocalServiceId(winrt::Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId const& value) const
|
|
{
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->put_LocalServiceId(*(void**)(&value)));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation>**)this;
|
|
check_hresult(_winrt_abi_type->put_LocalServiceId(*(void**)(&value)));
|
|
}
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IRfcommInboundConnectionInformation<D>::ServiceCapabilities() const
|
|
{
|
|
winrt::Windows::Devices::Bluetooth::BluetoothServiceCapabilities value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_ServiceCapabilities(reinterpret_cast<uint32_t*>(&value)));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation>**)this;
|
|
check_hresult(_winrt_abi_type->get_ServiceCapabilities(reinterpret_cast<uint32_t*>(&value)));
|
|
}
|
|
return value;
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IRfcommInboundConnectionInformation<D>::ServiceCapabilities(winrt::Windows::Devices::Bluetooth::BluetoothServiceCapabilities const& value) const
|
|
{
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->put_ServiceCapabilities(static_cast<uint32_t>(value)));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation>**)this;
|
|
check_hresult(_winrt_abi_type->put_ServiceCapabilities(static_cast<uint32_t>(value)));
|
|
}
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IRfcommOutboundConnectionInformation<D>::RemoteServiceId() const
|
|
{
|
|
void* value{};
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IRfcommOutboundConnectionInformation>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IRfcommOutboundConnectionInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommOutboundConnectionInformation>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->get_RemoteServiceId(&value));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommOutboundConnectionInformation>**)this;
|
|
check_hresult(_winrt_abi_type->get_RemoteServiceId(&value));
|
|
}
|
|
return winrt::Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId{ value, take_ownership_from_abi };
|
|
}
|
|
template <typename D> auto consume_Windows_Devices_Bluetooth_Background_IRfcommOutboundConnectionInformation<D>::RemoteServiceId(winrt::Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId const& value) const
|
|
{
|
|
if constexpr (!std::is_same_v<D, winrt::Windows::Devices::Bluetooth::Background::IRfcommOutboundConnectionInformation>)
|
|
{
|
|
winrt::hresult _winrt_cast_result_code;
|
|
auto const _winrt_casted_result = impl::try_as_with_reason<winrt::Windows::Devices::Bluetooth::Background::IRfcommOutboundConnectionInformation, D const*>(static_cast<D const*>(this), _winrt_cast_result_code);
|
|
check_hresult(_winrt_cast_result_code);
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommOutboundConnectionInformation>**)&_winrt_casted_result;
|
|
check_hresult(_winrt_abi_type->put_RemoteServiceId(*(void**)(&value)));
|
|
}
|
|
else
|
|
{
|
|
auto const _winrt_abi_type = *(abi_t<winrt::Windows::Devices::Bluetooth::Background::IRfcommOutboundConnectionInformation>**)this;
|
|
check_hresult(_winrt_abi_type->put_RemoteServiceId(*(void**)(&value)));
|
|
}
|
|
}
|
|
#ifndef WINRT_LEAN_AND_MEAN
|
|
template <typename D>
|
|
struct produce<D, winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementPublisherTriggerDetails> : produce_base<D, winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementPublisherTriggerDetails>
|
|
{
|
|
int32_t __stdcall get_Status(int32_t* value) noexcept final try
|
|
{
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementPublisherStatus>(this->shim().Status());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
int32_t __stdcall get_Error(int32_t* value) noexcept final try
|
|
{
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<winrt::Windows::Devices::Bluetooth::BluetoothError>(this->shim().Error());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
};
|
|
#endif
|
|
#ifndef WINRT_LEAN_AND_MEAN
|
|
template <typename D>
|
|
struct produce<D, winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementPublisherTriggerDetails2> : produce_base<D, winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementPublisherTriggerDetails2>
|
|
{
|
|
int32_t __stdcall get_SelectedTransmitPowerLevelInDBm(void** value) noexcept final try
|
|
{
|
|
clear_abi(value);
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<winrt::Windows::Foundation::IReference<int16_t>>(this->shim().SelectedTransmitPowerLevelInDBm());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
};
|
|
#endif
|
|
#ifndef WINRT_LEAN_AND_MEAN
|
|
template <typename D>
|
|
struct produce<D, winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementWatcherTriggerDetails> : produce_base<D, winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementWatcherTriggerDetails>
|
|
{
|
|
int32_t __stdcall get_Error(int32_t* value) noexcept final try
|
|
{
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<winrt::Windows::Devices::Bluetooth::BluetoothError>(this->shim().Error());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
int32_t __stdcall get_Advertisements(void** value) noexcept final try
|
|
{
|
|
clear_abi(value);
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Devices::Bluetooth::Advertisement::BluetoothLEAdvertisementReceivedEventArgs>>(this->shim().Advertisements());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
int32_t __stdcall get_SignalStrengthFilter(void** value) noexcept final try
|
|
{
|
|
clear_abi(value);
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<winrt::Windows::Devices::Bluetooth::BluetoothSignalStrengthFilter>(this->shim().SignalStrengthFilter());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
};
|
|
#endif
|
|
#ifndef WINRT_LEAN_AND_MEAN
|
|
template <typename D>
|
|
struct produce<D, winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails> : produce_base<D, winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails>
|
|
{
|
|
int32_t __stdcall get_Characteristic(void** value) noexcept final try
|
|
{
|
|
clear_abi(value);
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattCharacteristic>(this->shim().Characteristic());
|
|
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<winrt::Windows::Storage::Streams::IBuffer>(this->shim().Value());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
};
|
|
#endif
|
|
#ifndef WINRT_LEAN_AND_MEAN
|
|
template <typename D>
|
|
struct produce<D, winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails2> : produce_base<D, winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails2>
|
|
{
|
|
int32_t __stdcall get_Error(int32_t* value) noexcept final try
|
|
{
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<winrt::Windows::Devices::Bluetooth::BluetoothError>(this->shim().Error());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
int32_t __stdcall get_EventTriggeringMode(int32_t* value) noexcept final try
|
|
{
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<winrt::Windows::Devices::Bluetooth::Background::BluetoothEventTriggeringMode>(this->shim().EventTriggeringMode());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
int32_t __stdcall get_ValueChangedEvents(void** value) noexcept final try
|
|
{
|
|
clear_abi(value);
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattValueChangedEventArgs>>(this->shim().ValueChangedEvents());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
};
|
|
#endif
|
|
#ifndef WINRT_LEAN_AND_MEAN
|
|
template <typename D>
|
|
struct produce<D, winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderConnection> : produce_base<D, winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderConnection>
|
|
{
|
|
int32_t __stdcall get_TriggerId(void** value) noexcept final try
|
|
{
|
|
clear_abi(value);
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<hstring>(this->shim().TriggerId());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
int32_t __stdcall get_Service(void** value) noexcept final try
|
|
{
|
|
clear_abi(value);
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::GattLocalService>(this->shim().Service());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
int32_t __stdcall Start() noexcept final try
|
|
{
|
|
typename D::abi_guard guard(this->shim());
|
|
this->shim().Start();
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
};
|
|
#endif
|
|
#ifndef WINRT_LEAN_AND_MEAN
|
|
template <typename D>
|
|
struct produce<D, winrt::Windows::Devices::Bluetooth::Background::
|
|
IGattServiceProviderConnection2>
|
|
: produce_base<D, winrt::Windows::Devices::Bluetooth::Background::
|
|
IGattServiceProviderConnection2> {
|
|
int32_t __stdcall UpdateAdvertisingParameters(
|
|
void* parameters) noexcept final try {
|
|
typename D::abi_guard guard(this->shim());
|
|
this->shim().UpdateAdvertisingParameters(
|
|
*reinterpret_cast<
|
|
winrt::Windows::Devices::Bluetooth::GenericAttributeProfile::
|
|
GattServiceProviderAdvertisingParameters const*>(
|
|
¶meters));
|
|
return 0;
|
|
} catch (...) {
|
|
return to_hresult();
|
|
}
|
|
};
|
|
#endif
|
|
#ifndef WINRT_LEAN_AND_MEAN
|
|
template <typename D>
|
|
struct produce<D, winrt::Windows::Devices::Bluetooth::Background::
|
|
IGattServiceProviderConnectionStatics>
|
|
: produce_base<D, winrt::Windows::Devices::Bluetooth::Background::
|
|
IGattServiceProviderConnectionStatics> {
|
|
int32_t __stdcall get_AllServices(void** value) noexcept final try {
|
|
clear_abi(value);
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<winrt::Windows::Foundation::Collections::IMapView<
|
|
hstring, winrt::Windows::Devices::Bluetooth::Background::
|
|
GattServiceProviderConnection>>(
|
|
this->shim().AllServices());
|
|
return 0;
|
|
} catch (...) {
|
|
return to_hresult();
|
|
}
|
|
};
|
|
#endif
|
|
#ifndef WINRT_LEAN_AND_MEAN
|
|
template <typename D>
|
|
struct produce<D, winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderTriggerDetails> : produce_base<D, winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderTriggerDetails>
|
|
{
|
|
int32_t __stdcall get_Connection(void** value) noexcept final try
|
|
{
|
|
clear_abi(value);
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<winrt::Windows::Devices::Bluetooth::Background::GattServiceProviderConnection>(this->shim().Connection());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
};
|
|
#endif
|
|
#ifndef WINRT_LEAN_AND_MEAN
|
|
template <typename D>
|
|
struct produce<D, winrt::Windows::Devices::Bluetooth::Background::IRfcommConnectionTriggerDetails> : produce_base<D, winrt::Windows::Devices::Bluetooth::Background::IRfcommConnectionTriggerDetails>
|
|
{
|
|
int32_t __stdcall get_Socket(void** value) noexcept final try
|
|
{
|
|
clear_abi(value);
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<winrt::Windows::Networking::Sockets::StreamSocket>(this->shim().Socket());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
int32_t __stdcall get_Incoming(bool* value) noexcept final try
|
|
{
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<bool>(this->shim().Incoming());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
int32_t __stdcall get_RemoteDevice(void** value) noexcept final try
|
|
{
|
|
clear_abi(value);
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<winrt::Windows::Devices::Bluetooth::BluetoothDevice>(this->shim().RemoteDevice());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
};
|
|
#endif
|
|
#ifndef WINRT_LEAN_AND_MEAN
|
|
template <typename D>
|
|
struct produce<D, winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation> : produce_base<D, winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation>
|
|
{
|
|
int32_t __stdcall get_SdpRecord(void** value) noexcept final try
|
|
{
|
|
clear_abi(value);
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<winrt::Windows::Storage::Streams::IBuffer>(this->shim().SdpRecord());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
int32_t __stdcall put_SdpRecord(void* value) noexcept final try
|
|
{
|
|
typename D::abi_guard guard(this->shim());
|
|
this->shim().SdpRecord(*reinterpret_cast<winrt::Windows::Storage::Streams::IBuffer const*>(&value));
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
int32_t __stdcall get_LocalServiceId(void** value) noexcept final try
|
|
{
|
|
clear_abi(value);
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<winrt::Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId>(this->shim().LocalServiceId());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
int32_t __stdcall put_LocalServiceId(void* value) noexcept final try
|
|
{
|
|
typename D::abi_guard guard(this->shim());
|
|
this->shim().LocalServiceId(*reinterpret_cast<winrt::Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId const*>(&value));
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
int32_t __stdcall get_ServiceCapabilities(uint32_t* value) noexcept final try
|
|
{
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<winrt::Windows::Devices::Bluetooth::BluetoothServiceCapabilities>(this->shim().ServiceCapabilities());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
int32_t __stdcall put_ServiceCapabilities(uint32_t value) noexcept final try
|
|
{
|
|
typename D::abi_guard guard(this->shim());
|
|
this->shim().ServiceCapabilities(*reinterpret_cast<winrt::Windows::Devices::Bluetooth::BluetoothServiceCapabilities const*>(&value));
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
};
|
|
#endif
|
|
#ifndef WINRT_LEAN_AND_MEAN
|
|
template <typename D>
|
|
struct produce<D, winrt::Windows::Devices::Bluetooth::Background::IRfcommOutboundConnectionInformation> : produce_base<D, winrt::Windows::Devices::Bluetooth::Background::IRfcommOutboundConnectionInformation>
|
|
{
|
|
int32_t __stdcall get_RemoteServiceId(void** value) noexcept final try
|
|
{
|
|
clear_abi(value);
|
|
typename D::abi_guard guard(this->shim());
|
|
*value = detach_from<winrt::Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId>(this->shim().RemoteServiceId());
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
int32_t __stdcall put_RemoteServiceId(void* value) noexcept final try
|
|
{
|
|
typename D::abi_guard guard(this->shim());
|
|
this->shim().RemoteServiceId(*reinterpret_cast<winrt::Windows::Devices::Bluetooth::Rfcomm::RfcommServiceId const*>(&value));
|
|
return 0;
|
|
}
|
|
catch (...) { return to_hresult(); }
|
|
};
|
|
#endif
|
|
}
|
|
WINRT_EXPORT namespace winrt::Windows::Devices::Bluetooth::Background
|
|
{
|
|
inline auto GattServiceProviderConnection::AllServices()
|
|
{
|
|
return impl::call_factory_cast<winrt::Windows::Foundation::Collections::IMapView<hstring, winrt::Windows::Devices::Bluetooth::Background::GattServiceProviderConnection>(*)(IGattServiceProviderConnectionStatics const&), GattServiceProviderConnection, IGattServiceProviderConnectionStatics>([](IGattServiceProviderConnectionStatics const& f) { return f.AllServices(); });
|
|
}
|
|
}
|
|
namespace std
|
|
{
|
|
#ifndef WINRT_LEAN_AND_MEAN
|
|
template<> struct hash<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementPublisherTriggerDetails> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementPublisherTriggerDetails2> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::Devices::Bluetooth::Background::IBluetoothLEAdvertisementWatcherTriggerDetails> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::Devices::Bluetooth::Background::IGattCharacteristicNotificationTriggerDetails2> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderConnection> : winrt::impl::hash_base {};
|
|
template <>
|
|
struct hash<winrt::Windows::Devices::Bluetooth::Background::
|
|
IGattServiceProviderConnection2> : winrt::impl::hash_base {
|
|
};
|
|
template<> struct hash<winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderConnectionStatics> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::Devices::Bluetooth::Background::IGattServiceProviderTriggerDetails> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::Devices::Bluetooth::Background::IRfcommConnectionTriggerDetails> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::Devices::Bluetooth::Background::IRfcommInboundConnectionInformation> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::Devices::Bluetooth::Background::IRfcommOutboundConnectionInformation> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::Devices::Bluetooth::Background::BluetoothLEAdvertisementPublisherTriggerDetails> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::Devices::Bluetooth::Background::BluetoothLEAdvertisementWatcherTriggerDetails> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::Devices::Bluetooth::Background::GattCharacteristicNotificationTriggerDetails> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::Devices::Bluetooth::Background::GattServiceProviderConnection> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::Devices::Bluetooth::Background::GattServiceProviderTriggerDetails> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::Devices::Bluetooth::Background::RfcommConnectionTriggerDetails> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::Devices::Bluetooth::Background::RfcommInboundConnectionInformation> : winrt::impl::hash_base {};
|
|
template<> struct hash<winrt::Windows::Devices::Bluetooth::Background::RfcommOutboundConnectionInformation> : winrt::impl::hash_base {};
|
|
#endif
|
|
#ifdef __cpp_lib_format
|
|
#endif
|
|
}
|
|
#endif
|