looper/assets/dbus_stub_adaptor.hpp

232 lines
13 KiB
C++

/*
* This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT!
*/
#ifndef __sdbuscpp__dbus_stub_adaptor_hpp__adaptor__H__
#define __sdbuscpp__dbus_stub_adaptor_hpp__adaptor__H__
#include <sdbus-c++/sdbus-c++.h>
#include <string>
#include <tuple>
namespace org {
namespace freedesktop {
class Application_adaptor
{
public:
static constexpr const char* INTERFACE_NAME = "org.freedesktop.Application";
protected:
Application_adaptor(sdbus::IObject& object)
: object_(&object)
{
object_->registerMethod("Activate").onInterface(INTERFACE_NAME).withInputParamNames("platform_data").implementedAs([this](const std::map<std::string, sdbus::Variant>& platform_data){ return this->Activate(platform_data); });
object_->registerMethod("Open").onInterface(INTERFACE_NAME).withInputParamNames("uris", "platform_data").implementedAs([this](const std::vector<std::string>& uris, const std::map<std::string, sdbus::Variant>& platform_data){ return this->Open(uris, platform_data); });
object_->registerMethod("ActivateAction").onInterface(INTERFACE_NAME).withInputParamNames("action_name", "parameter", "platform_data").implementedAs([this](const std::string& action_name, const std::vector<sdbus::Variant>& parameter, const std::map<std::string, sdbus::Variant>& platform_data){ return this->ActivateAction(action_name, parameter, platform_data); });
}
Application_adaptor(const Application_adaptor&) = delete;
Application_adaptor& operator=(const Application_adaptor&) = delete;
Application_adaptor(Application_adaptor&&) = default;
Application_adaptor& operator=(Application_adaptor&&) = default;
~Application_adaptor() = default;
private:
virtual void Activate(const std::map<std::string, sdbus::Variant>& platform_data) = 0;
virtual void Open(const std::vector<std::string>& uris, const std::map<std::string, sdbus::Variant>& platform_data) = 0;
virtual void ActivateAction(const std::string& action_name, const std::vector<sdbus::Variant>& parameter, const std::map<std::string, sdbus::Variant>& platform_data) = 0;
private:
sdbus::IObject* object_;
};
}} // namespaces
namespace com {
namespace complecwaft {
class Looper_adaptor
{
public:
static constexpr const char* INTERFACE_NAME = "com.complecwaft.Looper";
protected:
Looper_adaptor(sdbus::IObject& object)
: object_(&object)
{
object_->registerMethod("CreateHandle").onInterface(INTERFACE_NAME).withOutputParamNames("new_handle").implementedAs([this](){ return this->CreateHandle(); });
object_->registerMethod("ClearHandle").onInterface(INTERFACE_NAME).withInputParamNames("handle").implementedAs([this](const std::string& handle){ return this->ClearHandle(handle); });
object_->registerMethod("Start").onInterface(INTERFACE_NAME).withInputParamNames("path", "isUri").implementedAs([this](const std::string& path, const bool& isUri){ return this->Start(path, isUri); });
object_->registerMethod("StartWithStreamIndex").onInterface(INTERFACE_NAME).withInputParamNames("path", "isUri", "streamIndex").implementedAs([this](const std::string& path, const bool& isUri, const uint32_t& streamIndex){ return this->StartWithStreamIndex(path, isUri, streamIndex); });
object_->registerMethod("Load").onInterface(INTERFACE_NAME).withInputParamNames("path", "isUri").implementedAs([this](const std::string& path, const bool& isUri){ return this->Load(path, isUri); });
object_->registerMethod("Quit").onInterface(INTERFACE_NAME).implementedAs([this](){ return this->Quit(); });
object_->registerMethod("Stop").onInterface(INTERFACE_NAME).implementedAs([this](){ return this->Stop(); });
object_->registerMethod("TogglePause").onInterface(INTERFACE_NAME).implementedAs([this](){ return this->TogglePause(); });
object_->registerMethod("GetStreams").onInterface(INTERFACE_NAME).withOutputParamNames("streams").implementedAs([this](){ return this->GetStreams(); });
object_->registerMethod("PlayStream").onInterface(INTERFACE_NAME).withInputParamNames("idx").implementedAs([this](const uint32_t& idx){ return this->PlayStream(idx); });
object_->registerSignal("PlaybackEngineStarted").onInterface(INTERFACE_NAME);
object_->registerSignal("SpeedChanged").onInterface(INTERFACE_NAME).withParameters<double>("new_speed");
object_->registerSignal("TempoChanged").onInterface(INTERFACE_NAME).withParameters<double>("new_tempo");
object_->registerSignal("PitchChanged").onInterface(INTERFACE_NAME).withParameters<double>("new_pitch");
object_->registerSignal("PauseChanged").onInterface(INTERFACE_NAME).withParameters<bool>("now_paused");
object_->registerSignal("Stopped").onInterface(INTERFACE_NAME);
object_->registerSignal("ErrorOccurred").onInterface(INTERFACE_NAME).withParameters<std::string, std::string>("error_desc", "error_type");
object_->registerSignal("Seeked").onInterface(INTERFACE_NAME).withParameters<double>("to_position");
object_->registerSignal("FileChanged").onInterface(INTERFACE_NAME).withParameters<std::string, std::string>("path", "title");
object_->registerProperty("FilePath").onInterface(INTERFACE_NAME).withGetter([this](){ return this->FilePath(); });
object_->registerProperty("FileTitle").onInterface(INTERFACE_NAME).withGetter([this](){ return this->FileTitle(); });
object_->registerProperty("Position").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Position(); }).withSetter([this](const double& value){ this->Position(value); });
object_->registerProperty("Length").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Length(); });
object_->registerProperty("Speed").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Speed(); }).withSetter([this](const double& value){ this->Speed(value); });
object_->registerProperty("Tempo").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Tempo(); }).withSetter([this](const double& value){ this->Tempo(value); });
object_->registerProperty("Pitch").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Pitch(); }).withSetter([this](const double& value){ this->Pitch(value); });
object_->registerProperty("Volume").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Volume(); }).withSetter([this](const double& value){ this->Volume(value); });
object_->registerProperty("Paused").onInterface(INTERFACE_NAME).withGetter([this](){ return this->Paused(); }).withSetter([this](const bool& value){ this->Paused(value); });
object_->registerProperty("IsStopped").onInterface(INTERFACE_NAME).withGetter([this](){ return this->IsStopped(); });
object_->registerProperty("IsDaemon").onInterface(INTERFACE_NAME).withGetter([this](){ return this->IsDaemon(); });
object_->registerProperty("StreamIdx").onInterface(INTERFACE_NAME).withGetter([this](){ return this->StreamIdx(); });
}
Looper_adaptor(const Looper_adaptor&) = delete;
Looper_adaptor& operator=(const Looper_adaptor&) = delete;
Looper_adaptor(Looper_adaptor&&) = default;
Looper_adaptor& operator=(Looper_adaptor&&) = default;
~Looper_adaptor() = default;
public:
void emitPlaybackEngineStarted()
{
object_->emitSignal("PlaybackEngineStarted").onInterface(INTERFACE_NAME);
}
void emitSpeedChanged(const double& new_speed)
{
object_->emitSignal("SpeedChanged").onInterface(INTERFACE_NAME).withArguments(new_speed);
}
void emitTempoChanged(const double& new_tempo)
{
object_->emitSignal("TempoChanged").onInterface(INTERFACE_NAME).withArguments(new_tempo);
}
void emitPitchChanged(const double& new_pitch)
{
object_->emitSignal("PitchChanged").onInterface(INTERFACE_NAME).withArguments(new_pitch);
}
void emitPauseChanged(const bool& now_paused)
{
object_->emitSignal("PauseChanged").onInterface(INTERFACE_NAME).withArguments(now_paused);
}
void emitStopped()
{
object_->emitSignal("Stopped").onInterface(INTERFACE_NAME);
}
void emitErrorOccurred(const std::string& error_desc, const std::string& error_type)
{
object_->emitSignal("ErrorOccurred").onInterface(INTERFACE_NAME).withArguments(error_desc, error_type);
}
void emitSeeked(const double& to_position)
{
object_->emitSignal("Seeked").onInterface(INTERFACE_NAME).withArguments(to_position);
}
void emitFileChanged(const std::string& path, const std::string& title)
{
object_->emitSignal("FileChanged").onInterface(INTERFACE_NAME).withArguments(path, title);
}
private:
virtual std::string CreateHandle() = 0;
virtual void ClearHandle(const std::string& handle) = 0;
virtual void Start(const std::string& path, const bool& isUri) = 0;
virtual void StartWithStreamIndex(const std::string& path, const bool& isUri, const uint32_t& streamIndex) = 0;
virtual void Load(const std::string& path, const bool& isUri) = 0;
virtual void Quit() = 0;
virtual void Stop() = 0;
virtual void TogglePause() = 0;
virtual std::vector<std::string> GetStreams() = 0;
virtual void PlayStream(const uint32_t& idx) = 0;
private:
virtual std::string FilePath() = 0;
virtual std::string FileTitle() = 0;
virtual double Position() = 0;
virtual void Position(const double& value) = 0;
virtual double Length() = 0;
virtual double Speed() = 0;
virtual void Speed(const double& value) = 0;
virtual double Tempo() = 0;
virtual void Tempo(const double& value) = 0;
virtual double Pitch() = 0;
virtual void Pitch(const double& value) = 0;
virtual double Volume() = 0;
virtual void Volume(const double& value) = 0;
virtual bool Paused() = 0;
virtual void Paused(const bool& value) = 0;
virtual bool IsStopped() = 0;
virtual bool IsDaemon() = 0;
virtual uint32_t StreamIdx() = 0;
private:
sdbus::IObject* object_;
};
}} // namespaces
namespace com {
namespace complecwaft {
namespace Looper {
class Errors_adaptor
{
public:
static constexpr const char* INTERFACE_NAME = "com.complecwaft.Looper.Errors";
protected:
Errors_adaptor(sdbus::IObject& object)
: object_(&object)
{
object_->registerMethod("PopFront").onInterface(INTERFACE_NAME).withInputParamNames("handle").withOutputParamNames("error").implementedAs([this](const std::string& handle){ return this->PopFront(handle); });
object_->registerMethod("PopBack").onInterface(INTERFACE_NAME).withInputParamNames("handle").withOutputParamNames("error").implementedAs([this](const std::string& handle){ return this->PopBack(handle); });
object_->registerMethod("PeekFront").onInterface(INTERFACE_NAME).withInputParamNames("handle").withOutputParamNames("error").implementedAs([this](const std::string& handle){ return this->PeekFront(handle); });
object_->registerMethod("PeekBack").onInterface(INTERFACE_NAME).withInputParamNames("handle").withOutputParamNames("error").implementedAs([this](const std::string& handle){ return this->PeekBack(handle); });
object_->registerMethod("GetCount").onInterface(INTERFACE_NAME).withInputParamNames("handle").withOutputParamNames("count").implementedAs([this](const std::string& handle){ return this->GetCount(handle); });
object_->registerMethod("IsEmpty").onInterface(INTERFACE_NAME).withInputParamNames("handle").withOutputParamNames("empty").implementedAs([this](const std::string& handle){ return this->IsEmpty(handle); });
object_->registerMethod("Clear").onInterface(INTERFACE_NAME).withInputParamNames("handle").implementedAs([this](const std::string& handle){ return this->Clear(handle); });
object_->registerMethod("PeekAll").onInterface(INTERFACE_NAME).withInputParamNames("handle").withOutputParamNames("errors").implementedAs([this](const std::string& handle){ return this->PeekAll(handle); });
object_->registerMethod("GetAllAndClear").onInterface(INTERFACE_NAME).withInputParamNames("handle").withOutputParamNames("errors").implementedAs([this](const std::string& handle){ return this->GetAllAndClear(handle); });
}
Errors_adaptor(const Errors_adaptor&) = delete;
Errors_adaptor& operator=(const Errors_adaptor&) = delete;
Errors_adaptor(Errors_adaptor&&) = default;
Errors_adaptor& operator=(Errors_adaptor&&) = default;
~Errors_adaptor() = default;
private:
virtual std::string PopFront(const std::string& handle) = 0;
virtual std::string PopBack(const std::string& handle) = 0;
virtual std::string PeekFront(const std::string& handle) = 0;
virtual std::string PeekBack(const std::string& handle) = 0;
virtual uint32_t GetCount(const std::string& handle) = 0;
virtual bool IsEmpty(const std::string& handle) = 0;
virtual void Clear(const std::string& handle) = 0;
virtual std::vector<std::string> PeekAll(const std::string& handle) = 0;
virtual std::vector<std::string> GetAllAndClear(const std::string& handle) = 0;
private:
sdbus::IObject* object_;
};
}}} // namespaces
#endif