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

#ifndef __sdbuscpp__concatenator_proxy_h__proxy__H__
#define __sdbuscpp__concatenator_proxy_h__proxy__H__

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

namespace org {
namespace sdbuscpp {
namespace stresstests {

class concatenator_proxy
{
public:
    static constexpr const char* INTERFACE_NAME = "org.sdbuscpp.stresstests.concatenator";

protected:
    concatenator_proxy(sdbus::IProxy& proxy)
        : m_proxy(proxy)
    {
    }

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

    ~concatenator_proxy() = default;

    void registerProxy()
    {
        m_proxy.uponSignal("concatenatedSignal").onInterface(INTERFACE_NAME).call([this](const std::string& concatenatedString){ this->onConcatenatedSignal(concatenatedString); });
    }

    virtual void onConcatenatedSignal(const std::string& concatenatedString) = 0;

    virtual void onConcatenateReply(const std::string& result, std::optional<sdbus::Error> error) = 0;

public:
    sdbus::PendingAsyncCall concatenate(const std::map<std::string, sdbus::Variant>& params)
    {
        return m_proxy.callMethodAsync("concatenate").onInterface(INTERFACE_NAME).withArguments(params).uponReplyInvoke([this](std::optional<sdbus::Error> error, const std::string& result){ this->onConcatenateReply(result, std::move(error)); });
    }

private:
    sdbus::IProxy& m_proxy;
};

}}} // namespaces

#endif
