mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
added bluez dbus proxies
This commit is contained in:
@@ -65,5 +65,51 @@ class BleV2ServerSocket: public api::ble_v2::BleServerSocket
|
||||
std::unique_ptr<api::ble_v2::BleSocket> Accept() override;
|
||||
Exception Close() override;
|
||||
};
|
||||
class BleV2Medium: public api::ble_v2::BleMedium
|
||||
{
|
||||
std::unique_ptr<AdvertisingSession>
|
||||
StartAdvertising(const api::ble_v2::BleAdvertisementData& advertising_data,
|
||||
api::ble_v2::AdvertiseParameters advertise_set_parameters,
|
||||
AdvertisingCallback callback) override;
|
||||
|
||||
bool StopAdvertising() override;
|
||||
|
||||
std::unique_ptr<ScanningSession>
|
||||
StartScanning(const Uuid& service_uuid,
|
||||
api::ble_v2::TxPowerLevel tx_power_level,
|
||||
ScanningCallback callback)
|
||||
override;
|
||||
|
||||
bool StopScanning() override;
|
||||
|
||||
std::unique_ptr<api::ble_v2::GattServer>
|
||||
StartGattServer(api::ble_v2::ServerGattConnectionCallback callback)
|
||||
override;
|
||||
|
||||
std::unique_ptr<api::ble_v2::GattClient>
|
||||
ConnectToGattServer(api::ble_v2::BlePeripheral& peripheral,
|
||||
api::ble_v2::TxPowerLevel tx_power_level,
|
||||
api::ble_v2::ClientGattConnectionCallback callback)
|
||||
override;
|
||||
|
||||
std::unique_ptr<api::ble_v2::BleServerSocket>
|
||||
OpenServerSocket(const std::string& service_id)
|
||||
override;
|
||||
|
||||
std::unique_ptr<api::ble_v2::BleSocket>
|
||||
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;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
+57
@@ -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 <sdbus-c++/sdbus-c++.h>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
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<std::string> SupportedMonitorTypes()
|
||||
{
|
||||
return proxy_.getProperty("SupportedMonitorTypes").onInterface(INTERFACE_NAME);
|
||||
}
|
||||
|
||||
std::vector<std::string> SupportedFeatures()
|
||||
{
|
||||
return proxy_.getProperty("SupportedFeatures").onInterface(INTERFACE_NAME);
|
||||
}
|
||||
|
||||
private:
|
||||
sdbus::IProxy& proxy_;
|
||||
};
|
||||
|
||||
}} // namespaces
|
||||
|
||||
#endif
|
||||
+57
@@ -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 <sdbus-c++/sdbus-c++.h>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
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<sdbus::Struct<uint8_t, uint8_t, std::vector<uint8_t>>> Patterns() = 0;
|
||||
|
||||
private:
|
||||
sdbus::IObject& object_;
|
||||
};
|
||||
|
||||
}} // namespaces
|
||||
|
||||
#endif
|
||||
@@ -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 <sdbus-c++/sdbus-c++.h>
|
||||
#include <string>
|
||||
@@ -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)
|
||||
|
||||
+118
@@ -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 <sdbus-c++/sdbus-c++.h>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
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<uint8_t> ReadValue(const std::map<std::string, sdbus::Variant>& options)
|
||||
{
|
||||
std::vector<uint8_t> result;
|
||||
proxy_.callMethod("ReadValue").onInterface(INTERFACE_NAME).withArguments(options).storeResultsTo(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
void WriteValue(const std::vector<uint8_t>& value, const std::map<std::string, sdbus::Variant>& options)
|
||||
{
|
||||
proxy_.callMethod("WriteValue").onInterface(INTERFACE_NAME).withArguments(value, options);
|
||||
}
|
||||
|
||||
std::tuple<sdbus::UnixFd, uint16_t> AcquireWrite(const std::map<std::string, sdbus::Variant>& options)
|
||||
{
|
||||
std::tuple<sdbus::UnixFd, uint16_t> result;
|
||||
proxy_.callMethod("AcquireWrite").onInterface(INTERFACE_NAME).withArguments(options).storeResultsTo(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
std::tuple<sdbus::UnixFd, uint16_t> AcquireNotify(const std::map<std::string, sdbus::Variant>& options)
|
||||
{
|
||||
std::tuple<sdbus::UnixFd, uint16_t> 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<uint8_t> Value()
|
||||
{
|
||||
return proxy_.getProperty("Value").onInterface(INTERFACE_NAME);
|
||||
}
|
||||
|
||||
bool Notifying()
|
||||
{
|
||||
return proxy_.getProperty("Notifying").onInterface(INTERFACE_NAME);
|
||||
}
|
||||
|
||||
std::vector<std::string> 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
|
||||
+59
@@ -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 <sdbus-c++/sdbus-c++.h>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
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<std::vector<uint8_t>>&& result, std::map<std::string, sdbus::Variant> 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<uint8_t> value, std::map<std::string, sdbus::Variant> 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<std::vector<uint8_t>>&& result, std::map<std::string, sdbus::Variant> options) = 0;
|
||||
virtual void WriteValue(sdbus::Result<>&& result, std::vector<uint8_t> value, std::map<std::string, sdbus::Variant> 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<uint8_t> Value() = 0;
|
||||
virtual bool Notifying() = 0;
|
||||
virtual std::vector<std::string> Flags() = 0;
|
||||
|
||||
private:
|
||||
sdbus::IObject& object_;
|
||||
};
|
||||
|
||||
}} // namespaces
|
||||
|
||||
#endif
|
||||
@@ -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 <sdbus-c++/sdbus-c++.h>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
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<std::string, sdbus::Variant>& 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
|
||||
@@ -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 <sdbus-c++/sdbus-c++.h>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
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<sdbus::ObjectPath> Includes()
|
||||
{
|
||||
return proxy_.getProperty("Includes").onInterface(INTERFACE_NAME);
|
||||
}
|
||||
|
||||
private:
|
||||
sdbus::IProxy& proxy_;
|
||||
};
|
||||
|
||||
}} // namespaces
|
||||
|
||||
#endif
|
||||
@@ -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 <sdbus-c++/sdbus-c++.h>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
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<sdbus::ObjectPath> Includes() = 0;
|
||||
|
||||
private:
|
||||
sdbus::IObject& object_;
|
||||
};
|
||||
|
||||
}} // namespaces
|
||||
|
||||
#endif
|
||||
+77
@@ -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 <sdbus-c++/sdbus-c++.h>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
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<std::string, sdbus::Variant>& 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<std::string> SupportedIncludes()
|
||||
{
|
||||
return proxy_.getProperty("SupportedIncludes").onInterface(INTERFACE_NAME);
|
||||
}
|
||||
|
||||
std::vector<std::string> SupportedSecondaryChannels()
|
||||
{
|
||||
return proxy_.getProperty("SupportedSecondaryChannels").onInterface(INTERFACE_NAME);
|
||||
}
|
||||
|
||||
std::vector<std::string> SupportedFeatures()
|
||||
{
|
||||
return proxy_.getProperty("SupportedFeatures").onInterface(INTERFACE_NAME);
|
||||
}
|
||||
|
||||
std::map<std::string, sdbus::Variant> SupportedCapabilities()
|
||||
{
|
||||
return proxy_.getProperty("SupportedCapabilities").onInterface(INTERFACE_NAME);
|
||||
}
|
||||
|
||||
private:
|
||||
sdbus::IProxy& proxy_;
|
||||
};
|
||||
|
||||
}} // namespaces
|
||||
|
||||
#endif
|
||||
@@ -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 <sdbus-c++/sdbus-c++.h>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
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<std::string> ServiceUUIDs() = 0;
|
||||
virtual std::map<std::string, sdbus::Variant> ManufacturerData() = 0;
|
||||
virtual std::vector<std::string> SolicitUUIDs() = 0;
|
||||
virtual std::map<std::string, sdbus::Variant> ServiceData() = 0;
|
||||
virtual std::vector<std::string> 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
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||
<node>
|
||||
<interface name="org.bluez.AdvertisementMonitor1">
|
||||
<method name="Release">
|
||||
</method>
|
||||
<method name="Activate">
|
||||
</method>
|
||||
<method name="DeviceFound">
|
||||
<arg type='o' name="device" direction="in"/>
|
||||
</method>
|
||||
<method name="DeviceLost">
|
||||
<arg type='o' name="device" direction="in"/>
|
||||
</method>
|
||||
|
||||
<property name="Type" type="s" access="read">
|
||||
</property>
|
||||
<property name="RSSILowThreshold" type="n" access="read">
|
||||
</property>
|
||||
<property name="RSSIHighThreshold" type="n" access="read">
|
||||
</property>
|
||||
<property name="RSSISamplingPeriod" type="q" access="read">
|
||||
</property>
|
||||
<property name="Patterns" type="a(yyay)" access="read">
|
||||
</property>
|
||||
</interface>
|
||||
</node>
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||
<node>
|
||||
<interface name="org.bluez.AdvertisementMonitorManager1">
|
||||
<method name="RegisterMonitor">
|
||||
<arg name="application" type="o" direction="in" />
|
||||
</method>
|
||||
<method name="UnregisterMonitor">
|
||||
<arg name="application" type="o" direction="in" />
|
||||
</method>
|
||||
<property name="SupportedMonitorTypes" type="as" access="read" />
|
||||
<property name="SupportedFeatures" type="as" access="read" />
|
||||
</interface>
|
||||
</node>
|
||||
@@ -5,7 +5,6 @@
|
||||
<method name="Disconnect" />
|
||||
<method name="Connect" />
|
||||
<method name="ConnectProfile">
|
||||
<annotation name="org.freedesktop.DBus.Method.Async" value="client"/>
|
||||
<arg name="UUID" type="s" direction="in" />
|
||||
</method>
|
||||
<method name="DisconnectProfile">
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||
<node>
|
||||
<interface name="org.bluez.GattCharacteristic1">
|
||||
<method name="ReadValue">
|
||||
<arg name="options" type="a{sv}" direction="in" />
|
||||
<arg name="value" type="ay" direction="out" />
|
||||
</method>
|
||||
<method name="WriteValue">
|
||||
<arg name="value" type="ay" direction="in" />
|
||||
<arg name="options" type="a{sv}" direction="in" />
|
||||
</method>
|
||||
<method name="AcquireWrite">
|
||||
<arg name="options" type="a{sv}" direction="in" />
|
||||
<arg name="fd" type="h" direction="out" />
|
||||
<arg name="mtu" type="q" direction="out" />
|
||||
</method>
|
||||
<method name="AcquireNotify">
|
||||
<arg name="options" type="a{sv}" direction="in" />
|
||||
<arg name="fd" type="h" direction="out" />
|
||||
<arg name="mtu" type="q" direction="out" />
|
||||
</method>
|
||||
<method name="StartNotify" />
|
||||
<method name="StopNotify" />
|
||||
<property name="Handle" type="q" access="read" />
|
||||
<property name="UUID" type="s" access="read" />
|
||||
<property name="Service" type="o" access="read" />
|
||||
<property name="Value" type="ay" access="read" />
|
||||
<property name="Notifying" type="b" access="read" />
|
||||
<property name="Flags" type="as" access="read" />
|
||||
<property name="WriteAcquired" type="b" access="read" />
|
||||
<property name="NotifyAcquired" type="b" access="read" />
|
||||
<property name="MTU" type="q" access="read" />
|
||||
</interface>
|
||||
</node>
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||
<node>
|
||||
<interface name="org.bluez.GattCharacteristic1">
|
||||
<method name="ReadValue">
|
||||
<annotation name="org.freedesktop.DBus.Method.Async" value="server" />
|
||||
<arg name="options" type="a{sv}" direction="in"/>
|
||||
<arg name="value" type="ay" direction="out"/>
|
||||
</method>
|
||||
<method name="WriteValue">
|
||||
<annotation name="org.freedesktop.DBus.Method.Async" value="server" />
|
||||
<arg name="value" type="ay" direction="in"/>
|
||||
<arg name="options" type="a{sv}" direction="in"/>
|
||||
</method>
|
||||
<method name="StartNotify">
|
||||
</method>
|
||||
<method name="StopNotify">
|
||||
</method>
|
||||
<method name="Confirm">
|
||||
</method>
|
||||
|
||||
<property name="UUID" type="s" access="read"></property>
|
||||
<property name="Service" type="o" access="read"></property>
|
||||
<property name="Value" type="ay" access="read"></property>
|
||||
<property name="Notifying" type="b" access="read"></property>
|
||||
<property name="Flags" type="as" access="read"></property>
|
||||
</interface>
|
||||
</node>
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||
<node>
|
||||
<interface name="org.bluez.GattManager1">
|
||||
<method name="RegisterApplication">
|
||||
<arg name="application" type="o" direction="in" />
|
||||
<arg name="options" type="a{sv}" direction="in" />
|
||||
</method>
|
||||
<method name="UnregisterApplication">
|
||||
<arg name="application" type="o" direction="in" />
|
||||
</method>
|
||||
</interface>
|
||||
</node>
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||
<node>
|
||||
<interface name="org.bluez.GattService1">
|
||||
<property name="UUID" type="s" access="read"></property>
|
||||
<property name="Primary" type="b" access="read"></property>
|
||||
<property name="Device" type="o" access="read"></property>
|
||||
<property name="Includes" type="ao" access="read"></property>
|
||||
</interface>
|
||||
</node>
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE node PUBLIC
|
||||
"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||
<node>
|
||||
<interface name="org.bluez.LEAdvertisement1">
|
||||
<method name="Release"/>
|
||||
<property name="Type" type="s" access="read"/>
|
||||
<property name="ServiceUUIDs" type="as" access="read"/>
|
||||
<property name="ManufacturerData" type="a{sv}" access="read"/>
|
||||
<property name="SolicitUUIDs" type="as" access="read"/>
|
||||
<property name="ServiceData" type="a{sv}" access="read"/>
|
||||
<property name="Includes" type="as" access="read"/>
|
||||
<property name="LocalName" type="s" access="read"/>
|
||||
<property name="Duration" type="q" access="read"/>
|
||||
<property name="Timeout" type="q" access="read"/>
|
||||
<property name="MinInterval" type="u" access="read"/>
|
||||
<property name="MaxInterval" type="u" access="read"/>
|
||||
<property name="TxPower" type="n" access="read"/>
|
||||
</interface>
|
||||
</node>
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
|
||||
<node>
|
||||
<interface name="org.bluez.LEAdvertisingManager1">
|
||||
<method name="RegisterAdvertisement">
|
||||
<arg name="advertisement" type="o" direction="in" />
|
||||
<arg name="options" type="a{sv}" direction="in" />
|
||||
</method>
|
||||
<method name="UnregisterAdvertisement">
|
||||
<arg name="service" type="o" direction="in" />
|
||||
</method>
|
||||
<property name="ActiveInstances" type="y" access="read" />
|
||||
<property name="SupportedInstances" type="y" access="read" />
|
||||
<property name="SupportedIncludes" type="as" access="read" />
|
||||
<property name="SupportedSecondaryChannels" type="as" access="read" />
|
||||
<property name="SupportedFeatures" type="as" access="read" />
|
||||
<property name="SupportedCapabilities" type="a{sv}" access="read" />
|
||||
</interface>
|
||||
</node>
|
||||
Reference in New Issue
Block a user