2020-07-18 20:16:57 +02:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT!
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef __sdbuscpp__integrationtests_proxy_h__proxy__H__
|
|
|
|
|
#define __sdbuscpp__integrationtests_proxy_h__proxy__H__
|
|
|
|
|
|
|
|
|
|
#include <sdbus-c++/sdbus-c++.h>
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <tuple>
|
|
|
|
|
|
|
|
|
|
namespace org {
|
|
|
|
|
namespace sdbuscpp {
|
|
|
|
|
|
|
|
|
|
class integrationtests_proxy
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
static constexpr const char* INTERFACE_NAME = "org.sdbuscpp.integrationtests";
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
integrationtests_proxy(sdbus::IProxy& proxy)
|
2022-09-01 11:04:45 +02:00
|
|
|
: proxy_(&proxy)
|
2020-07-18 20:16:57 +02:00
|
|
|
{
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->uponSignal("simpleSignal").onInterface(INTERFACE_NAME).call([this](){ this->onSimpleSignal(); });
|
|
|
|
|
proxy_->uponSignal("signalWithMap").onInterface(INTERFACE_NAME).call([this](const std::map<int32_t, std::string>& aMap){ this->onSignalWithMap(aMap); });
|
|
|
|
|
proxy_->uponSignal("signalWithVariant").onInterface(INTERFACE_NAME).call([this](const sdbus::Variant& aVariant){ this->onSignalWithVariant(aVariant); });
|
2020-07-18 20:16:57 +02:00
|
|
|
}
|
|
|
|
|
|
2022-09-01 11:04:45 +02:00
|
|
|
integrationtests_proxy(const integrationtests_proxy&) = delete;
|
|
|
|
|
integrationtests_proxy& operator=(const integrationtests_proxy&) = delete;
|
|
|
|
|
integrationtests_proxy(integrationtests_proxy&&) = default;
|
|
|
|
|
integrationtests_proxy& operator=(integrationtests_proxy&&) = default;
|
|
|
|
|
|
2020-07-18 20:16:57 +02:00
|
|
|
~integrationtests_proxy() = default;
|
|
|
|
|
|
|
|
|
|
virtual void onSimpleSignal() = 0;
|
|
|
|
|
virtual void onSignalWithMap(const std::map<int32_t, std::string>& aMap) = 0;
|
|
|
|
|
virtual void onSignalWithVariant(const sdbus::Variant& aVariant) = 0;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
void noArgNoReturn()
|
|
|
|
|
{
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->callMethod("noArgNoReturn").onInterface(INTERFACE_NAME);
|
2020-07-18 20:16:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int32_t getInt()
|
|
|
|
|
{
|
|
|
|
|
int32_t result;
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->callMethod("getInt").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
2020-07-18 20:16:57 +02:00
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::tuple<uint32_t, std::string> getTuple()
|
|
|
|
|
{
|
|
|
|
|
std::tuple<uint32_t, std::string> result;
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->callMethod("getTuple").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
2020-07-18 20:16:57 +02:00
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
double multiply(const int64_t& a, const double& b)
|
|
|
|
|
{
|
|
|
|
|
double result;
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->callMethod("multiply").onInterface(INTERFACE_NAME).withArguments(a, b).storeResultsTo(result);
|
2020-07-18 20:16:57 +02:00
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void multiplyWithNoReply(const int64_t& a, const double& b)
|
|
|
|
|
{
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->callMethod("multiplyWithNoReply").onInterface(INTERFACE_NAME).withArguments(a, b).dontExpectReply();
|
2020-07-18 20:16:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::vector<int16_t> getInts16FromStruct(const sdbus::Struct<uint8_t, int16_t, double, std::string, std::vector<int16_t>>& arg0)
|
|
|
|
|
{
|
|
|
|
|
std::vector<int16_t> result;
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->callMethod("getInts16FromStruct").onInterface(INTERFACE_NAME).withArguments(arg0).storeResultsTo(result);
|
2020-07-18 20:16:57 +02:00
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sdbus::Variant processVariant(const sdbus::Variant& variant)
|
|
|
|
|
{
|
|
|
|
|
sdbus::Variant result;
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->callMethod("processVariant").onInterface(INTERFACE_NAME).withArguments(variant).storeResultsTo(result);
|
2020-07-18 20:16:57 +02:00
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::map<int32_t, sdbus::Variant> getMapOfVariants(const std::vector<int32_t>& x, const sdbus::Struct<sdbus::Variant, sdbus::Variant>& y)
|
|
|
|
|
{
|
|
|
|
|
std::map<int32_t, sdbus::Variant> result;
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->callMethod("getMapOfVariants").onInterface(INTERFACE_NAME).withArguments(x, y).storeResultsTo(result);
|
2020-07-18 20:16:57 +02:00
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sdbus::Struct<std::string, sdbus::Struct<std::map<int32_t, int32_t>>> getStructInStruct()
|
|
|
|
|
{
|
|
|
|
|
sdbus::Struct<std::string, sdbus::Struct<std::map<int32_t, int32_t>>> result;
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->callMethod("getStructInStruct").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
2020-07-18 20:16:57 +02:00
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int32_t sumStructItems(const sdbus::Struct<uint8_t, uint16_t>& arg0, const sdbus::Struct<int32_t, int64_t>& arg1)
|
|
|
|
|
{
|
|
|
|
|
int32_t result;
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->callMethod("sumStructItems").onInterface(INTERFACE_NAME).withArguments(arg0, arg1).storeResultsTo(result);
|
2020-07-18 20:16:57 +02:00
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-03 13:55:37 +02:00
|
|
|
uint32_t sumArrayItems(const std::vector<uint16_t>& arg0, const std::array<uint64_t, 3>& arg1)
|
2020-07-18 20:16:57 +02:00
|
|
|
{
|
|
|
|
|
uint32_t result;
|
2023-08-03 13:55:37 +02:00
|
|
|
proxy_->callMethod("sumArrayItems").onInterface(INTERFACE_NAME).withArguments(arg0, arg1).storeResultsTo(result);
|
2020-07-18 20:16:57 +02:00
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint32_t doOperation(const uint32_t& arg0)
|
|
|
|
|
{
|
|
|
|
|
uint32_t result;
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->callMethod("doOperation").onInterface(INTERFACE_NAME).withArguments(arg0).storeResultsTo(result);
|
2020-07-18 20:16:57 +02:00
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
uint32_t doOperationAsync(const uint32_t& arg0)
|
|
|
|
|
{
|
|
|
|
|
uint32_t result;
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->callMethod("doOperationAsync").onInterface(INTERFACE_NAME).withArguments(arg0).storeResultsTo(result);
|
2020-07-18 20:16:57 +02:00
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sdbus::Signature getSignature()
|
|
|
|
|
{
|
|
|
|
|
sdbus::Signature result;
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->callMethod("getSignature").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
2020-07-18 20:16:57 +02:00
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-18 20:30:51 +02:00
|
|
|
sdbus::ObjectPath getObjPath()
|
2020-07-18 20:16:57 +02:00
|
|
|
{
|
|
|
|
|
sdbus::ObjectPath result;
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->callMethod("getObjPath").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
2020-07-18 20:16:57 +02:00
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sdbus::UnixFd getUnixFd()
|
|
|
|
|
{
|
|
|
|
|
sdbus::UnixFd result;
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->callMethod("getUnixFd").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
2020-07-18 20:16:57 +02:00
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-03 13:55:37 +02:00
|
|
|
std::map<uint64_t, sdbus::Struct<std::map<uint8_t, std::vector<sdbus::Struct<sdbus::ObjectPath, bool, sdbus::Variant, std::unordered_map<int32_t, std::string>>>>, sdbus::Signature, std::string>> getComplex()
|
2020-07-18 20:16:57 +02:00
|
|
|
{
|
2023-08-03 13:55:37 +02:00
|
|
|
std::map<uint64_t, sdbus::Struct<std::map<uint8_t, std::vector<sdbus::Struct<sdbus::ObjectPath, bool, sdbus::Variant, std::unordered_map<int32_t, std::string>>>>, sdbus::Signature, std::string>> result;
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->callMethod("getComplex").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
2020-07-18 20:16:57 +02:00
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void throwError()
|
|
|
|
|
{
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->callMethod("throwError").onInterface(INTERFACE_NAME);
|
2020-07-18 20:16:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void throwErrorWithNoReply()
|
|
|
|
|
{
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->callMethod("throwErrorWithNoReply").onInterface(INTERFACE_NAME).dontExpectReply();
|
2020-07-18 20:16:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void doPrivilegedStuff()
|
|
|
|
|
{
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->callMethod("doPrivilegedStuff").onInterface(INTERFACE_NAME);
|
2020-07-18 20:16:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void emitTwoSimpleSignals()
|
|
|
|
|
{
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->callMethod("emitTwoSimpleSignals").onInterface(INTERFACE_NAME);
|
2020-07-18 20:16:57 +02:00
|
|
|
}
|
|
|
|
|
|
2021-11-28 16:30:49 +02:00
|
|
|
void unregisterSimpleSignalHandler()
|
|
|
|
|
{
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->muteSignal("simpleSignal").onInterface(INTERFACE_NAME);
|
2021-11-28 16:30:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void reRegisterSimpleSignalHandler()
|
|
|
|
|
{
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->uponSignal("simpleSignal").onInterface(INTERFACE_NAME).call([this](){ this->onSimpleSignal(); });
|
|
|
|
|
proxy_->finishRegistration();
|
2021-11-28 16:30:49 +02:00
|
|
|
}
|
|
|
|
|
|
2020-07-18 20:16:57 +02:00
|
|
|
public:
|
|
|
|
|
uint32_t action()
|
|
|
|
|
{
|
2022-09-01 11:04:45 +02:00
|
|
|
return proxy_->getProperty("action").onInterface(INTERFACE_NAME);
|
2020-07-18 20:16:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void action(const uint32_t& value)
|
|
|
|
|
{
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->setProperty("action").onInterface(INTERFACE_NAME).toValue(value);
|
2020-07-18 20:16:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool blocking()
|
|
|
|
|
{
|
2022-09-01 11:04:45 +02:00
|
|
|
return proxy_->getProperty("blocking").onInterface(INTERFACE_NAME);
|
2020-07-18 20:16:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void blocking(const bool& value)
|
|
|
|
|
{
|
2022-09-01 11:04:45 +02:00
|
|
|
proxy_->setProperty("blocking").onInterface(INTERFACE_NAME).toValue(value);
|
2020-07-18 20:16:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::string state()
|
|
|
|
|
{
|
2022-09-01 11:04:45 +02:00
|
|
|
return proxy_->getProperty("state").onInterface(INTERFACE_NAME);
|
2020-07-18 20:16:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private:
|
2022-09-01 11:04:45 +02:00
|
|
|
sdbus::IProxy* proxy_;
|
2020-07-18 20:16:57 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}} // namespaces
|
|
|
|
|
|
|
|
|
|
#endif
|