
/*
 * This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT!
 */

#ifndef __sdbuscpp__integrationtests_adaptor_h__adaptor__H__
#define __sdbuscpp__integrationtests_adaptor_h__adaptor__H__

#include <sdbus-c++/sdbus-c++.h>
#include <string>
#include <tuple>

namespace org {
namespace sdbuscpp {

class integrationtests_adaptor
{
public:
    static constexpr const char* INTERFACE_NAME = "org.sdbuscpp.integrationtests";

protected:
    integrationtests_adaptor(sdbus::IObject& object)
        : m_object(object)
    {
    }

    integrationtests_adaptor(const integrationtests_adaptor&) = delete;
    integrationtests_adaptor& operator=(const integrationtests_adaptor&) = delete;
    integrationtests_adaptor(integrationtests_adaptor&&) = delete;
    integrationtests_adaptor& operator=(integrationtests_adaptor&&) = delete;

    ~integrationtests_adaptor() = default;

    void registerAdaptor()
    {
        m_object.addVTable( sdbus::setInterfaceFlags().markAsDeprecated().withPropertyUpdateBehavior(sdbus::Flags::EMITS_NO_SIGNAL)
                          , sdbus::registerMethod("noArgNoReturn").implementedAs([this](){ return this->noArgNoReturn(); })
                          , sdbus::registerMethod("getInt").withOutputParamNames("anInt").implementedAs([this](){ return this->getInt(); })
                          , sdbus::registerMethod("getTuple").withOutputParamNames("arg0", "arg1").implementedAs([this](){ return this->getTuple(); })
                          , sdbus::registerMethod("multiply").withInputParamNames("a", "b").withOutputParamNames("result").implementedAs([this](const int64_t& a, const double& b){ return this->multiply(a, b); })
                          , sdbus::registerMethod("multiplyWithNoReply").withInputParamNames("a", "b").implementedAs([this](const int64_t& a, const double& b){ return this->multiplyWithNoReply(a, b); }).markAsDeprecated().withNoReply()
                          , sdbus::registerMethod("getInts16FromStruct").withInputParamNames("arg0").withOutputParamNames("arg0").implementedAs([this](const sdbus::Struct<uint8_t, int16_t, double, std::string, std::vector<int16_t>>& arg0){ return this->getInts16FromStruct(arg0); })
                          , sdbus::registerMethod("processVariant").withInputParamNames("variant").withOutputParamNames("result").implementedAs([this](const std::variant<int32_t, double, std::string>& variant){ return this->processVariant(variant); })
                          , sdbus::registerMethod("getMapOfVariants").withInputParamNames("x", "y").withOutputParamNames("aMapOfVariants").implementedAs([this](const std::vector<int32_t>& x, const sdbus::Struct<sdbus::Variant, sdbus::Variant>& y){ return this->getMapOfVariants(x, y); })
                          , sdbus::registerMethod("getStructInStruct").withOutputParamNames("aMapOfVariants").implementedAs([this](){ return this->getStructInStruct(); })
                          , sdbus::registerMethod("sumStructItems").withInputParamNames("arg0", "arg1").withOutputParamNames("arg0").implementedAs([this](const sdbus::Struct<uint8_t, uint16_t>& arg0, const sdbus::Struct<int32_t, int64_t>& arg1){ return this->sumStructItems(arg0, arg1); })
                          , sdbus::registerMethod("sumArrayItems").withInputParamNames("arg0", "arg1").withOutputParamNames("arg0").implementedAs([this](const std::vector<uint16_t>& arg0, const std::array<uint64_t, 3>& arg1){ return this->sumArrayItems(arg0, arg1); })
                          , sdbus::registerMethod("doOperation").withInputParamNames("arg0").withOutputParamNames("arg0").implementedAs([this](const uint32_t& arg0){ return this->doOperation(arg0); })
                          , sdbus::registerMethod("doOperationAsync").withInputParamNames("arg0").withOutputParamNames("arg0").implementedAs([this](sdbus::Result<uint32_t>&& result, uint32_t arg0){ this->doOperationAsync(std::move(result), std::move(arg0)); })
                          , sdbus::registerMethod("getSignature").withOutputParamNames("arg0").implementedAs([this](){ return this->getSignature(); })
                          , sdbus::registerMethod("getObjPath").withOutputParamNames("arg0").implementedAs([this](){ return this->getObjPath(); })
                          , sdbus::registerMethod("getUnixFd").withOutputParamNames("arg0").implementedAs([this](){ return this->getUnixFd(); })
                          , sdbus::registerMethod("getComplex").withOutputParamNames("arg0").implementedAs([this](){ return this->getComplex(); }).markAsDeprecated()
                          , sdbus::registerMethod("throwError").implementedAs([this](){ return this->throwError(); })
                          , sdbus::registerMethod("throwErrorWithNoReply").implementedAs([this](){ return this->throwErrorWithNoReply(); }).withNoReply()
                          , sdbus::registerMethod("doPrivilegedStuff").implementedAs([this](){ return this->doPrivilegedStuff(); }).markAsPrivileged()
                          , sdbus::registerMethod("emitTwoSimpleSignals").implementedAs([this](){ return this->emitTwoSimpleSignals(); })
                          , sdbus::registerSignal("simpleSignal").markAsDeprecated()
                          , sdbus::registerSignal("signalWithMap").withParameters<std::map<int32_t, std::string>>("aMap")
                          , sdbus::registerSignal("signalWithVariant").withParameters<sdbus::Variant>("aVariant")
                          , sdbus::registerProperty("action").withGetter([this](){ return this->action(); }).withSetter([this](const uint32_t& value){ this->action(value); }).withUpdateBehavior(sdbus::Flags::EMITS_INVALIDATION_SIGNAL)
                          , sdbus::registerProperty("blocking").withGetter([this](){ return this->blocking(); }).withSetter([this](const bool& value){ this->blocking(value); })
                          , sdbus::registerProperty("state").withGetter([this](){ return this->state(); }).markAsDeprecated().withUpdateBehavior(sdbus::Flags::CONST_PROPERTY_VALUE)
                          ).forInterface(INTERFACE_NAME);
    }

public:
    void emitSimpleSignal()
    {
        m_object.emitSignal("simpleSignal").onInterface(INTERFACE_NAME);
    }

    void emitSignalWithMap(const std::map<int32_t, std::string>& aMap)
    {
        m_object.emitSignal("signalWithMap").onInterface(INTERFACE_NAME).withArguments(aMap);
    }

    void emitSignalWithVariant(const sdbus::Variant& aVariant)
    {
        m_object.emitSignal("signalWithVariant").onInterface(INTERFACE_NAME).withArguments(aVariant);
    }

private:
    virtual void noArgNoReturn() = 0;
    virtual int32_t getInt() = 0;
    virtual std::tuple<uint32_t, std::string> getTuple() = 0;
    virtual double multiply(const int64_t& a, const double& b) = 0;
    virtual void multiplyWithNoReply(const int64_t& a, const double& b) = 0;
    virtual std::vector<int16_t> getInts16FromStruct(const sdbus::Struct<uint8_t, int16_t, double, std::string, std::vector<int16_t>>& arg0) = 0;
    virtual sdbus::Variant processVariant(const std::variant<int32_t, double, std::string>& variant) = 0;
    virtual std::map<int32_t, sdbus::Variant> getMapOfVariants(const std::vector<int32_t>& x, const sdbus::Struct<sdbus::Variant, sdbus::Variant>& y) = 0;
    virtual sdbus::Struct<std::string, sdbus::Struct<std::map<int32_t, int32_t>>> getStructInStruct() = 0;
    virtual int32_t sumStructItems(const sdbus::Struct<uint8_t, uint16_t>& arg0, const sdbus::Struct<int32_t, int64_t>& arg1) = 0;
    virtual uint32_t sumArrayItems(const std::vector<uint16_t>& arg0, const std::array<uint64_t, 3>& arg1) = 0;
    virtual uint32_t doOperation(const uint32_t& arg0) = 0;
    virtual void doOperationAsync(sdbus::Result<uint32_t>&& result, uint32_t arg0) = 0;
    virtual sdbus::Signature getSignature() = 0;
    virtual sdbus::ObjectPath getObjPath() = 0;
    virtual sdbus::UnixFd getUnixFd() = 0;
    virtual std::unordered_map<uint64_t, sdbus::Struct<std::map<uint8_t, std::vector<sdbus::Struct<sdbus::ObjectPath, bool, sdbus::Variant, std::map<int32_t, std::string>>>>, sdbus::Signature, std::string>> getComplex() = 0;
    virtual void throwError() = 0;
    virtual void throwErrorWithNoReply() = 0;
    virtual void doPrivilegedStuff() = 0;
    virtual void emitTwoSimpleSignals() = 0;

private:
    virtual uint32_t action() = 0;
    virtual void action(const uint32_t& value) = 0;
    virtual bool blocking() = 0;
    virtual void blocking(const bool& value) = 0;
    virtual std::string state() = 0;

private:
    sdbus::IObject& m_object;
};

}} // namespaces

#endif
