mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-15 15:16:12 -04:00
216 lines
5.1 KiB
C++
216 lines
5.1 KiB
C++
|
|
/*
|
|
* 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__
|
|
|
|
#include <sdbus-c++/sdbus-c++.h>
|
|
#include <string>
|
|
#include <tuple>
|
|
|
|
namespace org {
|
|
namespace bluez {
|
|
|
|
class Device1_proxy
|
|
{
|
|
public:
|
|
static constexpr const char* INTERFACE_NAME = "org.bluez.Device1";
|
|
|
|
protected:
|
|
Device1_proxy(sdbus::IProxy& proxy)
|
|
: proxy_(proxy)
|
|
{
|
|
}
|
|
|
|
~Device1_proxy() = default;
|
|
|
|
virtual void onConnectProfileReply(const sdbus::Error* error) = 0;
|
|
virtual void onPairReply(const sdbus::Error* error) = 0;
|
|
|
|
public:
|
|
void Disconnect()
|
|
{
|
|
proxy_.callMethod("Disconnect").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
void Connect()
|
|
{
|
|
proxy_.callMethod("Connect").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
sdbus::PendingAsyncCall ConnectProfile(const std::string& UUID)
|
|
{
|
|
return proxy_.callMethodAsync("ConnectProfile").onInterface(INTERFACE_NAME).withArguments(UUID).uponReplyInvoke([this](const sdbus::Error* error){ this->onConnectProfileReply(error); });
|
|
}
|
|
|
|
void DisconnectProfile(const std::string& UUID)
|
|
{
|
|
proxy_.callMethod("DisconnectProfile").onInterface(INTERFACE_NAME).withArguments(UUID);
|
|
}
|
|
|
|
sdbus::PendingAsyncCall Pair()
|
|
{
|
|
return proxy_.callMethodAsync("Pair").onInterface(INTERFACE_NAME).uponReplyInvoke([this](const sdbus::Error* error){ this->onPairReply(error); });
|
|
}
|
|
|
|
void CancelPairing()
|
|
{
|
|
proxy_.callMethod("CancelPairing").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
public:
|
|
std::string Address()
|
|
{
|
|
return proxy_.getProperty("Address").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
std::string AddressType()
|
|
{
|
|
return proxy_.getProperty("AddressType").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
std::string Name()
|
|
{
|
|
return proxy_.getProperty("Name").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
std::string Alias()
|
|
{
|
|
return proxy_.getProperty("Alias").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
void Alias(const std::string& value)
|
|
{
|
|
proxy_.setProperty("Alias").onInterface(INTERFACE_NAME).toValue(value);
|
|
}
|
|
|
|
uint32_t Class()
|
|
{
|
|
return proxy_.getProperty("Class").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
uint16_t Appearance()
|
|
{
|
|
return proxy_.getProperty("Appearance").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
std::string Icon()
|
|
{
|
|
return proxy_.getProperty("Icon").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
bool Paired()
|
|
{
|
|
return proxy_.getProperty("Paired").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
bool Bonded()
|
|
{
|
|
return proxy_.getProperty("Bonded").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
bool Trusted()
|
|
{
|
|
return proxy_.getProperty("Trusted").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
void Trusted(const bool& value)
|
|
{
|
|
proxy_.setProperty("Trusted").onInterface(INTERFACE_NAME).toValue(value);
|
|
}
|
|
|
|
bool Blocked()
|
|
{
|
|
return proxy_.getProperty("Blocked").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
void Blocked(const bool& value)
|
|
{
|
|
proxy_.setProperty("Blocked").onInterface(INTERFACE_NAME).toValue(value);
|
|
}
|
|
|
|
bool LegacyPairing()
|
|
{
|
|
return proxy_.getProperty("LegacyPairing").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
int16_t RSSI()
|
|
{
|
|
return proxy_.getProperty("RSSI").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
bool Connected()
|
|
{
|
|
return proxy_.getProperty("Connected").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
std::vector<std::string> UUIDs()
|
|
{
|
|
return proxy_.getProperty("UUIDs").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
std::string Modalias()
|
|
{
|
|
return proxy_.getProperty("Modalias").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
sdbus::ObjectPath Adapter()
|
|
{
|
|
return proxy_.getProperty("Adapter").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
std::map<uint16_t, sdbus::Variant> ManufacturerData()
|
|
{
|
|
return proxy_.getProperty("ManufacturerData").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
std::map<std::string, sdbus::Variant> ServiceData()
|
|
{
|
|
return proxy_.getProperty("ServiceData").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
int16_t TxPower()
|
|
{
|
|
return proxy_.getProperty("TxPower").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
bool ServicesResolved()
|
|
{
|
|
return proxy_.getProperty("ServicesResolved").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
std::vector<uint8_t> AdvertisingFlags()
|
|
{
|
|
return proxy_.getProperty("AdvertisingFlags").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
std::map<uint8_t, sdbus::Variant> AdvertisingData()
|
|
{
|
|
return proxy_.getProperty("AdvertisingData").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
bool WakeAllowed()
|
|
{
|
|
return proxy_.getProperty("WakeAllowed").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
void WakeAllowed(const bool& value)
|
|
{
|
|
proxy_.setProperty("WakeAllowed").onInterface(INTERFACE_NAME).toValue(value);
|
|
}
|
|
|
|
std::map<sdbus::ObjectPath, std::map<std::string, sdbus::Variant>> Sets()
|
|
{
|
|
return proxy_.getProperty("Sets").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
private:
|
|
sdbus::IProxy& proxy_;
|
|
};
|
|
|
|
}} // namespaces
|
|
|
|
#endif
|