From 3f14669940ecf7e92f4e3432e2525d9c99d6cd1a Mon Sep 17 00:00:00 2001 From: lasan Date: Tue, 29 Oct 2024 14:28:30 +0530 Subject: [PATCH] added bluez dbus proxies --- .../platform/implementation/linux/ble_v2.h | 46 +++++++ .../advertisement_monitor_manager_client.h | 57 +++++++++ .../dbus/bluez/advertisement_monitor_server.h | 57 +++++++++ .../generated/dbus/bluez/device_client.h | 9 +- .../dbus/bluez/gatt_characteristic_client.h | 118 ++++++++++++++++++ .../dbus/bluez/gatt_characteristic_server.h | 59 +++++++++ .../dbus/bluez/gatt_manager_client.h | 46 +++++++ .../dbus/bluez/gatt_service_client.h | 56 +++++++++ .../dbus/bluez/gatt_service_server.h | 45 +++++++ .../bluez/le_advertisement_manager_client.h | 77 ++++++++++++ .../dbus/bluez/le_advertisement_server.h | 65 ++++++++++ .../bluez/org.bluez.AdvertisementMonitor1.xml | 27 ++++ ...org.bluez.AdvertisementMonitorManager1.xml | 14 +++ .../dbus/bluez/org.bluez.Device1.xml | 1 - .../org.bluez.GattCharacteristic1-client.xml | 35 ++++++ .../bluez/org.bluez.GattCharacteristic1.xml | 28 +++++ .../dbus/bluez/org.bluez.GattManager1.xml | 13 ++ .../dbus/bluez/org.bluez.GattService1.xml | 10 ++ .../dbus/bluez/org.bluez.LEAdvertisement1.xml | 21 ++++ .../org.bluez.LEAdvertisementManager1.xml | 19 +++ 20 files changed, 797 insertions(+), 6 deletions(-) create mode 100644 internal/platform/implementation/linux/generated/dbus/bluez/advertisement_monitor_manager_client.h create mode 100644 internal/platform/implementation/linux/generated/dbus/bluez/advertisement_monitor_server.h create mode 100644 internal/platform/implementation/linux/generated/dbus/bluez/gatt_characteristic_client.h create mode 100644 internal/platform/implementation/linux/generated/dbus/bluez/gatt_characteristic_server.h create mode 100644 internal/platform/implementation/linux/generated/dbus/bluez/gatt_manager_client.h create mode 100644 internal/platform/implementation/linux/generated/dbus/bluez/gatt_service_client.h create mode 100644 internal/platform/implementation/linux/generated/dbus/bluez/gatt_service_server.h create mode 100644 internal/platform/implementation/linux/generated/dbus/bluez/le_advertisement_manager_client.h create mode 100644 internal/platform/implementation/linux/generated/dbus/bluez/le_advertisement_server.h create mode 100644 internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.AdvertisementMonitor1.xml create mode 100644 internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.AdvertisementMonitorManager1.xml create mode 100644 internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.GattCharacteristic1-client.xml create mode 100644 internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.GattCharacteristic1.xml create mode 100644 internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.GattManager1.xml create mode 100644 internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.GattService1.xml create mode 100644 internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.LEAdvertisement1.xml create mode 100644 internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.LEAdvertisementManager1.xml diff --git a/internal/platform/implementation/linux/ble_v2.h b/internal/platform/implementation/linux/ble_v2.h index 85e54d19..292d06e0 100644 --- a/internal/platform/implementation/linux/ble_v2.h +++ b/internal/platform/implementation/linux/ble_v2.h @@ -65,5 +65,51 @@ class BleV2ServerSocket: public api::ble_v2::BleServerSocket std::unique_ptr Accept() override; Exception Close() override; }; +class BleV2Medium: public api::ble_v2::BleMedium +{ + std::unique_ptr + StartAdvertising(const api::ble_v2::BleAdvertisementData& advertising_data, + api::ble_v2::AdvertiseParameters advertise_set_parameters, + AdvertisingCallback callback) override; + + bool StopAdvertising() override; + + std::unique_ptr + StartScanning(const Uuid& service_uuid, + api::ble_v2::TxPowerLevel tx_power_level, + ScanningCallback callback) + override; + + bool StopScanning() override; + + std::unique_ptr + StartGattServer(api::ble_v2::ServerGattConnectionCallback callback) + override; + + std::unique_ptr + ConnectToGattServer(api::ble_v2::BlePeripheral& peripheral, + api::ble_v2::TxPowerLevel tx_power_level, + api::ble_v2::ClientGattConnectionCallback callback) + override; + + std::unique_ptr + OpenServerSocket(const std::string& service_id) + override; + + std::unique_ptr + Connect(const std::string& service_id, + api::ble_v2::TxPowerLevel tx_power_level, + api::ble_v2::BlePeripheral& peripheral, + CancellationFlag* cancellation_flag) + override; + + + bool IsExtendedAdvertisementsAvailable() override; + bool GetRemotePeripheral(const std::string &mac_address, + GetRemotePeripheralCallback callback) override; + bool GetRemotePeripheral(api::ble_v2::BlePeripheral::UniqueId id, + GetRemotePeripheralCallback callback) override; + +}; } } diff --git a/internal/platform/implementation/linux/generated/dbus/bluez/advertisement_monitor_manager_client.h b/internal/platform/implementation/linux/generated/dbus/bluez/advertisement_monitor_manager_client.h new file mode 100644 index 00000000..6e8a86fa --- /dev/null +++ b/internal/platform/implementation/linux/generated/dbus/bluez/advertisement_monitor_manager_client.h @@ -0,0 +1,57 @@ + +/* + * This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT! + */ + +#ifndef __sdbuscpp__advertisement_monitor_manager_client_h__proxy__H__ +#define __sdbuscpp__advertisement_monitor_manager_client_h__proxy__H__ + +#include +#include +#include + +namespace org { +namespace bluez { + +class AdvertisementMonitorManager1_proxy +{ +public: + static constexpr const char* INTERFACE_NAME = "org.bluez.AdvertisementMonitorManager1"; + +protected: + AdvertisementMonitorManager1_proxy(sdbus::IProxy& proxy) + : proxy_(proxy) + { + } + + ~AdvertisementMonitorManager1_proxy() = default; + +public: + void RegisterMonitor(const sdbus::ObjectPath& application) + { + proxy_.callMethod("RegisterMonitor").onInterface(INTERFACE_NAME).withArguments(application); + } + + void UnregisterMonitor(const sdbus::ObjectPath& application) + { + proxy_.callMethod("UnregisterMonitor").onInterface(INTERFACE_NAME).withArguments(application); + } + +public: + std::vector SupportedMonitorTypes() + { + return proxy_.getProperty("SupportedMonitorTypes").onInterface(INTERFACE_NAME); + } + + std::vector SupportedFeatures() + { + return proxy_.getProperty("SupportedFeatures").onInterface(INTERFACE_NAME); + } + +private: + sdbus::IProxy& proxy_; +}; + +}} // namespaces + +#endif diff --git a/internal/platform/implementation/linux/generated/dbus/bluez/advertisement_monitor_server.h b/internal/platform/implementation/linux/generated/dbus/bluez/advertisement_monitor_server.h new file mode 100644 index 00000000..1991ed31 --- /dev/null +++ b/internal/platform/implementation/linux/generated/dbus/bluez/advertisement_monitor_server.h @@ -0,0 +1,57 @@ + +/* + * This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT! + */ + +#ifndef __sdbuscpp__advertisement_monitor_server_h__adaptor__H__ +#define __sdbuscpp__advertisement_monitor_server_h__adaptor__H__ + +#include +#include +#include + +namespace org { +namespace bluez { + +class AdvertisementMonitor1_adaptor +{ +public: + static constexpr const char* INTERFACE_NAME = "org.bluez.AdvertisementMonitor1"; + +protected: + AdvertisementMonitor1_adaptor(sdbus::IObject& object) + : object_(object) + { + object_.registerMethod("Release").onInterface(INTERFACE_NAME).implementedAs([this](){ return this->Release(); }); + object_.registerMethod("Activate").onInterface(INTERFACE_NAME).implementedAs([this](){ return this->Activate(); }); + object_.registerMethod("DeviceFound").onInterface(INTERFACE_NAME).withInputParamNames("device").implementedAs([this](const sdbus::ObjectPath& device){ return this->DeviceFound(device); }); + object_.registerMethod("DeviceLost").onInterface(INTERFACE_NAME).withInputParamNames("device").implementedAs([this](const sdbus::ObjectPath& device){ return this->DeviceLost(device); }); + object_.registerProperty("Type").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Type(); }); + object_.registerProperty("RSSILowThreshold").onInterface(INTERFACE_NAME).withGetter([this](){ return this->RSSILowThreshold(); }); + object_.registerProperty("RSSIHighThreshold").onInterface(INTERFACE_NAME).withGetter([this](){ return this->RSSIHighThreshold(); }); + object_.registerProperty("RSSISamplingPeriod").onInterface(INTERFACE_NAME).withGetter([this](){ return this->RSSISamplingPeriod(); }); + object_.registerProperty("Patterns").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Patterns(); }); + } + + ~AdvertisementMonitor1_adaptor() = default; + +private: + virtual void Release() = 0; + virtual void Activate() = 0; + virtual void DeviceFound(const sdbus::ObjectPath& device) = 0; + virtual void DeviceLost(const sdbus::ObjectPath& device) = 0; + +private: + virtual std::string Type() = 0; + virtual int16_t RSSILowThreshold() = 0; + virtual int16_t RSSIHighThreshold() = 0; + virtual uint16_t RSSISamplingPeriod() = 0; + virtual std::vector>> Patterns() = 0; + +private: + sdbus::IObject& object_; +}; + +}} // namespaces + +#endif diff --git a/internal/platform/implementation/linux/generated/dbus/bluez/device_client.h b/internal/platform/implementation/linux/generated/dbus/bluez/device_client.h index 54102d1e..7082f3a7 100644 --- a/internal/platform/implementation/linux/generated/dbus/bluez/device_client.h +++ b/internal/platform/implementation/linux/generated/dbus/bluez/device_client.h @@ -3,8 +3,8 @@ * This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT! */ -#ifndef __sdbuscpp__bluez_device_client_glue_h__proxy__H__ -#define __sdbuscpp__bluez_device_client_glue_h__proxy__H__ +#ifndef __sdbuscpp__device_client_h__proxy__H__ +#define __sdbuscpp__device_client_h__proxy__H__ #include #include @@ -26,7 +26,6 @@ protected: ~Device1_proxy() = default; - virtual void onConnectProfileReply(const sdbus::Error* error) = 0; virtual void onPairReply(const sdbus::Error* error) = 0; public: @@ -40,9 +39,9 @@ public: proxy_.callMethod("Connect").onInterface(INTERFACE_NAME); } - sdbus::PendingAsyncCall ConnectProfile(const std::string& UUID) + void ConnectProfile(const std::string& UUID) { - return proxy_.callMethodAsync("ConnectProfile").onInterface(INTERFACE_NAME).withArguments(UUID).uponReplyInvoke([this](const sdbus::Error* error){ this->onConnectProfileReply(error); }); + proxy_.callMethod("ConnectProfile").onInterface(INTERFACE_NAME).withArguments(UUID); } void DisconnectProfile(const std::string& UUID) diff --git a/internal/platform/implementation/linux/generated/dbus/bluez/gatt_characteristic_client.h b/internal/platform/implementation/linux/generated/dbus/bluez/gatt_characteristic_client.h new file mode 100644 index 00000000..1bdc9087 --- /dev/null +++ b/internal/platform/implementation/linux/generated/dbus/bluez/gatt_characteristic_client.h @@ -0,0 +1,118 @@ + +/* + * This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT! + */ + +#ifndef __sdbuscpp__gatt_characteristic_client_h__proxy__H__ +#define __sdbuscpp__gatt_characteristic_client_h__proxy__H__ + +#include +#include +#include + +namespace org { +namespace bluez { + +class GattCharacteristic1_proxy +{ +public: + static constexpr const char* INTERFACE_NAME = "org.bluez.GattCharacteristic1"; + +protected: + GattCharacteristic1_proxy(sdbus::IProxy& proxy) + : proxy_(proxy) + { + } + + ~GattCharacteristic1_proxy() = default; + +public: + std::vector ReadValue(const std::map& options) + { + std::vector result; + proxy_.callMethod("ReadValue").onInterface(INTERFACE_NAME).withArguments(options).storeResultsTo(result); + return result; + } + + void WriteValue(const std::vector& value, const std::map& options) + { + proxy_.callMethod("WriteValue").onInterface(INTERFACE_NAME).withArguments(value, options); + } + + std::tuple AcquireWrite(const std::map& options) + { + std::tuple result; + proxy_.callMethod("AcquireWrite").onInterface(INTERFACE_NAME).withArguments(options).storeResultsTo(result); + return result; + } + + std::tuple AcquireNotify(const std::map& options) + { + std::tuple result; + proxy_.callMethod("AcquireNotify").onInterface(INTERFACE_NAME).withArguments(options).storeResultsTo(result); + return result; + } + + void StartNotify() + { + proxy_.callMethod("StartNotify").onInterface(INTERFACE_NAME); + } + + void StopNotify() + { + proxy_.callMethod("StopNotify").onInterface(INTERFACE_NAME); + } + +public: + uint16_t Handle() + { + return proxy_.getProperty("Handle").onInterface(INTERFACE_NAME); + } + + std::string UUID() + { + return proxy_.getProperty("UUID").onInterface(INTERFACE_NAME); + } + + sdbus::ObjectPath Service() + { + return proxy_.getProperty("Service").onInterface(INTERFACE_NAME); + } + + std::vector Value() + { + return proxy_.getProperty("Value").onInterface(INTERFACE_NAME); + } + + bool Notifying() + { + return proxy_.getProperty("Notifying").onInterface(INTERFACE_NAME); + } + + std::vector Flags() + { + return proxy_.getProperty("Flags").onInterface(INTERFACE_NAME); + } + + bool WriteAcquired() + { + return proxy_.getProperty("WriteAcquired").onInterface(INTERFACE_NAME); + } + + bool NotifyAcquired() + { + return proxy_.getProperty("NotifyAcquired").onInterface(INTERFACE_NAME); + } + + uint16_t MTU() + { + return proxy_.getProperty("MTU").onInterface(INTERFACE_NAME); + } + +private: + sdbus::IProxy& proxy_; +}; + +}} // namespaces + +#endif diff --git a/internal/platform/implementation/linux/generated/dbus/bluez/gatt_characteristic_server.h b/internal/platform/implementation/linux/generated/dbus/bluez/gatt_characteristic_server.h new file mode 100644 index 00000000..451ac678 --- /dev/null +++ b/internal/platform/implementation/linux/generated/dbus/bluez/gatt_characteristic_server.h @@ -0,0 +1,59 @@ + +/* + * This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT! + */ + +#ifndef __sdbuscpp__generated_dbus_bluez_gatt_characteristic_server_h__adaptor__H__ +#define __sdbuscpp__generated_dbus_bluez_gatt_characteristic_server_h__adaptor__H__ + +#include +#include +#include + +namespace org { +namespace bluez { + +class GattCharacteristic1_adaptor +{ +public: + static constexpr const char* INTERFACE_NAME = "org.bluez.GattCharacteristic1"; + +protected: + GattCharacteristic1_adaptor(sdbus::IObject& object) + : object_(object) + { + object_.registerMethod("ReadValue").onInterface(INTERFACE_NAME).withInputParamNames("options").withOutputParamNames("value").implementedAs([this](sdbus::Result>&& result, std::map options){ this->ReadValue(std::move(result), std::move(options)); }); + object_.registerMethod("WriteValue").onInterface(INTERFACE_NAME).withInputParamNames("value", "options").implementedAs([this](sdbus::Result<>&& result, std::vector value, std::map options){ this->WriteValue(std::move(result), std::move(value), std::move(options)); }); + object_.registerMethod("StartNotify").onInterface(INTERFACE_NAME).implementedAs([this](){ return this->StartNotify(); }); + object_.registerMethod("StopNotify").onInterface(INTERFACE_NAME).implementedAs([this](){ return this->StopNotify(); }); + object_.registerMethod("Confirm").onInterface(INTERFACE_NAME).implementedAs([this](){ return this->Confirm(); }); + object_.registerProperty("UUID").onInterface(INTERFACE_NAME).withGetter([this](){ return this->UUID(); }); + object_.registerProperty("Service").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Service(); }); + object_.registerProperty("Value").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Value(); }); + object_.registerProperty("Notifying").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Notifying(); }); + object_.registerProperty("Flags").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Flags(); }); + } + + ~GattCharacteristic1_adaptor() = default; + +private: + virtual void ReadValue(sdbus::Result>&& result, std::map options) = 0; + virtual void WriteValue(sdbus::Result<>&& result, std::vector value, std::map options) = 0; + virtual void StartNotify() = 0; + virtual void StopNotify() = 0; + virtual void Confirm() = 0; + +private: + virtual std::string UUID() = 0; + virtual sdbus::ObjectPath Service() = 0; + virtual std::vector Value() = 0; + virtual bool Notifying() = 0; + virtual std::vector Flags() = 0; + +private: + sdbus::IObject& object_; +}; + +}} // namespaces + +#endif diff --git a/internal/platform/implementation/linux/generated/dbus/bluez/gatt_manager_client.h b/internal/platform/implementation/linux/generated/dbus/bluez/gatt_manager_client.h new file mode 100644 index 00000000..340ee0af --- /dev/null +++ b/internal/platform/implementation/linux/generated/dbus/bluez/gatt_manager_client.h @@ -0,0 +1,46 @@ + +/* + * This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT! + */ + +#ifndef __sdbuscpp__gatt_manager_client_h__proxy__H__ +#define __sdbuscpp__gatt_manager_client_h__proxy__H__ + +#include +#include +#include + +namespace org { +namespace bluez { + +class GattManager1_proxy +{ +public: + static constexpr const char* INTERFACE_NAME = "org.bluez.GattManager1"; + +protected: + GattManager1_proxy(sdbus::IProxy& proxy) + : proxy_(proxy) + { + } + + ~GattManager1_proxy() = default; + +public: + void RegisterApplication(const sdbus::ObjectPath& application, const std::map& options) + { + proxy_.callMethod("RegisterApplication").onInterface(INTERFACE_NAME).withArguments(application, options); + } + + void UnregisterApplication(const sdbus::ObjectPath& application) + { + proxy_.callMethod("UnregisterApplication").onInterface(INTERFACE_NAME).withArguments(application); + } + +private: + sdbus::IProxy& proxy_; +}; + +}} // namespaces + +#endif diff --git a/internal/platform/implementation/linux/generated/dbus/bluez/gatt_service_client.h b/internal/platform/implementation/linux/generated/dbus/bluez/gatt_service_client.h new file mode 100644 index 00000000..fa36acc6 --- /dev/null +++ b/internal/platform/implementation/linux/generated/dbus/bluez/gatt_service_client.h @@ -0,0 +1,56 @@ + +/* + * This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT! + */ + +#ifndef __sdbuscpp__gatt_service_client_h__proxy__H__ +#define __sdbuscpp__gatt_service_client_h__proxy__H__ + +#include +#include +#include + +namespace org { +namespace bluez { + +class GattService1_proxy +{ +public: + static constexpr const char* INTERFACE_NAME = "org.bluez.GattService1"; + +protected: + GattService1_proxy(sdbus::IProxy& proxy) + : proxy_(proxy) + { + } + + ~GattService1_proxy() = default; + +public: + std::string UUID() + { + return proxy_.getProperty("UUID").onInterface(INTERFACE_NAME); + } + + bool Primary() + { + return proxy_.getProperty("Primary").onInterface(INTERFACE_NAME); + } + + sdbus::ObjectPath Device() + { + return proxy_.getProperty("Device").onInterface(INTERFACE_NAME); + } + + std::vector Includes() + { + return proxy_.getProperty("Includes").onInterface(INTERFACE_NAME); + } + +private: + sdbus::IProxy& proxy_; +}; + +}} // namespaces + +#endif diff --git a/internal/platform/implementation/linux/generated/dbus/bluez/gatt_service_server.h b/internal/platform/implementation/linux/generated/dbus/bluez/gatt_service_server.h new file mode 100644 index 00000000..e37253a0 --- /dev/null +++ b/internal/platform/implementation/linux/generated/dbus/bluez/gatt_service_server.h @@ -0,0 +1,45 @@ + +/* + * This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT! + */ + +#ifndef __sdbuscpp__generated_dbus_bluez_gatt_service_server_h__adaptor__H__ +#define __sdbuscpp__generated_dbus_bluez_gatt_service_server_h__adaptor__H__ + +#include +#include +#include + +namespace org { +namespace bluez { + +class GattService1_adaptor +{ +public: + static constexpr const char* INTERFACE_NAME = "org.bluez.GattService1"; + +protected: + GattService1_adaptor(sdbus::IObject& object) + : object_(object) + { + object_.registerProperty("UUID").onInterface(INTERFACE_NAME).withGetter([this](){ return this->UUID(); }); + object_.registerProperty("Primary").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Primary(); }); + object_.registerProperty("Device").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Device(); }); + object_.registerProperty("Includes").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Includes(); }); + } + + ~GattService1_adaptor() = default; + +private: + virtual std::string UUID() = 0; + virtual bool Primary() = 0; + virtual sdbus::ObjectPath Device() = 0; + virtual std::vector Includes() = 0; + +private: + sdbus::IObject& object_; +}; + +}} // namespaces + +#endif diff --git a/internal/platform/implementation/linux/generated/dbus/bluez/le_advertisement_manager_client.h b/internal/platform/implementation/linux/generated/dbus/bluez/le_advertisement_manager_client.h new file mode 100644 index 00000000..eb3125df --- /dev/null +++ b/internal/platform/implementation/linux/generated/dbus/bluez/le_advertisement_manager_client.h @@ -0,0 +1,77 @@ + +/* + * This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT! + */ + +#ifndef __sdbuscpp__generated_dbus_bluez_le_advertisement_manager_client_h__proxy__H__ +#define __sdbuscpp__generated_dbus_bluez_le_advertisement_manager_client_h__proxy__H__ + +#include +#include +#include + +namespace org { +namespace bluez { + +class LEAdvertisingManager1_proxy +{ +public: + static constexpr const char* INTERFACE_NAME = "org.bluez.LEAdvertisingManager1"; + +protected: + LEAdvertisingManager1_proxy(sdbus::IProxy& proxy) + : proxy_(proxy) + { + } + + ~LEAdvertisingManager1_proxy() = default; + +public: + void RegisterAdvertisement(const sdbus::ObjectPath& advertisement, const std::map& options) + { + proxy_.callMethod("RegisterAdvertisement").onInterface(INTERFACE_NAME).withArguments(advertisement, options); + } + + void UnregisterAdvertisement(const sdbus::ObjectPath& service) + { + proxy_.callMethod("UnregisterAdvertisement").onInterface(INTERFACE_NAME).withArguments(service); + } + +public: + uint8_t ActiveInstances() + { + return proxy_.getProperty("ActiveInstances").onInterface(INTERFACE_NAME); + } + + uint8_t SupportedInstances() + { + return proxy_.getProperty("SupportedInstances").onInterface(INTERFACE_NAME); + } + + std::vector SupportedIncludes() + { + return proxy_.getProperty("SupportedIncludes").onInterface(INTERFACE_NAME); + } + + std::vector SupportedSecondaryChannels() + { + return proxy_.getProperty("SupportedSecondaryChannels").onInterface(INTERFACE_NAME); + } + + std::vector SupportedFeatures() + { + return proxy_.getProperty("SupportedFeatures").onInterface(INTERFACE_NAME); + } + + std::map SupportedCapabilities() + { + return proxy_.getProperty("SupportedCapabilities").onInterface(INTERFACE_NAME); + } + +private: + sdbus::IProxy& proxy_; +}; + +}} // namespaces + +#endif diff --git a/internal/platform/implementation/linux/generated/dbus/bluez/le_advertisement_server.h b/internal/platform/implementation/linux/generated/dbus/bluez/le_advertisement_server.h new file mode 100644 index 00000000..89f6c0ef --- /dev/null +++ b/internal/platform/implementation/linux/generated/dbus/bluez/le_advertisement_server.h @@ -0,0 +1,65 @@ + +/* + * This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT! + */ + +#ifndef __sdbuscpp__generated_dbus_bluez_le_advertisement_server_h__adaptor__H__ +#define __sdbuscpp__generated_dbus_bluez_le_advertisement_server_h__adaptor__H__ + +#include +#include +#include + +namespace org { +namespace bluez { + +class LEAdvertisement1_adaptor +{ +public: + static constexpr const char* INTERFACE_NAME = "org.bluez.LEAdvertisement1"; + +protected: + LEAdvertisement1_adaptor(sdbus::IObject& object) + : object_(object) + { + object_.registerMethod("Release").onInterface(INTERFACE_NAME).implementedAs([this](){ return this->Release(); }); + object_.registerProperty("Type").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Type(); }); + object_.registerProperty("ServiceUUIDs").onInterface(INTERFACE_NAME).withGetter([this](){ return this->ServiceUUIDs(); }); + object_.registerProperty("ManufacturerData").onInterface(INTERFACE_NAME).withGetter([this](){ return this->ManufacturerData(); }); + object_.registerProperty("SolicitUUIDs").onInterface(INTERFACE_NAME).withGetter([this](){ return this->SolicitUUIDs(); }); + object_.registerProperty("ServiceData").onInterface(INTERFACE_NAME).withGetter([this](){ return this->ServiceData(); }); + object_.registerProperty("Includes").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Includes(); }); + object_.registerProperty("LocalName").onInterface(INTERFACE_NAME).withGetter([this](){ return this->LocalName(); }); + object_.registerProperty("Duration").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Duration(); }); + object_.registerProperty("Timeout").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Timeout(); }); + object_.registerProperty("MinInterval").onInterface(INTERFACE_NAME).withGetter([this](){ return this->MinInterval(); }); + object_.registerProperty("MaxInterval").onInterface(INTERFACE_NAME).withGetter([this](){ return this->MaxInterval(); }); + object_.registerProperty("TxPower").onInterface(INTERFACE_NAME).withGetter([this](){ return this->TxPower(); }); + } + + ~LEAdvertisement1_adaptor() = default; + +private: + virtual void Release() = 0; + +private: + virtual std::string Type() = 0; + virtual std::vector ServiceUUIDs() = 0; + virtual std::map ManufacturerData() = 0; + virtual std::vector SolicitUUIDs() = 0; + virtual std::map ServiceData() = 0; + virtual std::vector Includes() = 0; + virtual std::string LocalName() = 0; + virtual uint16_t Duration() = 0; + virtual uint16_t Timeout() = 0; + virtual uint32_t MinInterval() = 0; + virtual uint32_t MaxInterval() = 0; + virtual int16_t TxPower() = 0; + +private: + sdbus::IObject& object_; +}; + +}} // namespaces + +#endif diff --git a/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.AdvertisementMonitor1.xml b/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.AdvertisementMonitor1.xml new file mode 100644 index 00000000..c92058ef --- /dev/null +++ b/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.AdvertisementMonitor1.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.AdvertisementMonitorManager1.xml b/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.AdvertisementMonitorManager1.xml new file mode 100644 index 00000000..5b9f2e4c --- /dev/null +++ b/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.AdvertisementMonitorManager1.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.Device1.xml b/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.Device1.xml index afc55406..09bb7a6b 100644 --- a/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.Device1.xml +++ b/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.Device1.xml @@ -5,7 +5,6 @@ - diff --git a/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.GattCharacteristic1-client.xml b/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.GattCharacteristic1-client.xml new file mode 100644 index 00000000..94fcb206 --- /dev/null +++ b/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.GattCharacteristic1-client.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.GattCharacteristic1.xml b/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.GattCharacteristic1.xml new file mode 100644 index 00000000..f99de722 --- /dev/null +++ b/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.GattCharacteristic1.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.GattManager1.xml b/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.GattManager1.xml new file mode 100644 index 00000000..e353715b --- /dev/null +++ b/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.GattManager1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.GattService1.xml b/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.GattService1.xml new file mode 100644 index 00000000..da4f8e70 --- /dev/null +++ b/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.GattService1.xml @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.LEAdvertisement1.xml b/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.LEAdvertisement1.xml new file mode 100644 index 00000000..6fc4dcb0 --- /dev/null +++ b/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.LEAdvertisement1.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + diff --git a/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.LEAdvertisementManager1.xml b/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.LEAdvertisementManager1.xml new file mode 100644 index 00000000..36bb0196 --- /dev/null +++ b/internal/platform/implementation/linux/generated/dbus/bluez/org.bluez.LEAdvertisementManager1.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + +