looper/assets/dbus_stub_adaptor.hpp
Zachary Hall ee94b97d19
Some checks failed
Build / build-gentoo (push) Failing after 31s
Build / download-system-deps (push) Successful in 3m5s
Build / get-source-code (push) Successful in 13m4s
Build / build-appimage (push) Successful in 5m0s
Build / build-android (push) Failing after 3m46s
Build / build-windows (push) Failing after 8m42s
Migrate to sdbus-c++ v2
2024-12-11 10:03:32 -08:00

247 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)
: m_object(object)
{
}
Application_adaptor(const Application_adaptor&) = delete;
Application_adaptor& operator=(const Application_adaptor&) = delete;
Application_adaptor(Application_adaptor&&) = delete;
Application_adaptor& operator=(Application_adaptor&&) = delete;
~Application_adaptor() = default;
void registerAdaptor()
{
m_object.addVTable( sdbus::registerMethod("Activate").withInputParamNames("platform_data").implementedAs([this](const std::map<std::string, sdbus::Variant>& platform_data){ return this->Activate(platform_data); })
, sdbus::registerMethod("Open").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); })
, sdbus::registerMethod("ActivateAction").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); })
).forInterface(INTERFACE_NAME);
}
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& m_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)
: m_object(object)
{
}
looper_adaptor(const looper_adaptor&) = delete;
looper_adaptor& operator=(const looper_adaptor&) = delete;
looper_adaptor(looper_adaptor&&) = delete;
looper_adaptor& operator=(looper_adaptor&&) = delete;
~looper_adaptor() = default;
void registerAdaptor()
{
m_object.addVTable( sdbus::registerMethod("CreateHandle").withOutputParamNames("new_handle").implementedAs([this](){ return this->CreateHandle(); })
, sdbus::registerMethod("ClearHandle").withInputParamNames("handle").implementedAs([this](const std::string& handle){ return this->ClearHandle(handle); })
, sdbus::registerMethod("Start").withInputParamNames("path", "isUri").implementedAs([this](const std::string& path, const bool& isUri){ return this->Start(path, isUri); })
, sdbus::registerMethod("StartWithStreamIndex").withInputParamNames("path", "isUri", "streamIndex").implementedAs([this](const std::string& path, const bool& isUri, const uint32_t& streamIndex){ return this->StartWithStreamIndex(path, isUri, streamIndex); })
, sdbus::registerMethod("Load").withInputParamNames("path", "isUri").implementedAs([this](const std::string& path, const bool& isUri){ return this->Load(path, isUri); })
, sdbus::registerMethod("Quit").implementedAs([this](){ return this->Quit(); })
, sdbus::registerMethod("Stop").implementedAs([this](){ return this->Stop(); })
, sdbus::registerMethod("TogglePause").implementedAs([this](){ return this->TogglePause(); })
, sdbus::registerMethod("GetStreams").withOutputParamNames("streams").implementedAs([this](){ return this->GetStreams(); })
, sdbus::registerMethod("PlayStream").withInputParamNames("idx").implementedAs([this](const uint32_t& idx){ return this->PlayStream(idx); })
, sdbus::registerSignal("PlaybackEngineStarted")
, sdbus::registerSignal("SpeedChanged").withParameters<double>("new_speed")
, sdbus::registerSignal("TempoChanged").withParameters<double>("new_tempo")
, sdbus::registerSignal("PitchChanged").withParameters<double>("new_pitch")
, sdbus::registerSignal("PauseChanged").withParameters<bool>("now_paused")
, sdbus::registerSignal("Stopped")
, sdbus::registerSignal("ErrorOccurred").withParameters<std::string, std::string>("error_desc", "error_type")
, sdbus::registerSignal("Seeked").withParameters<double>("to_position")
, sdbus::registerSignal("FileChanged").withParameters<std::string, std::string>("path", "title")
, sdbus::registerProperty("FilePath").withGetter([this](){ return this->FilePath(); })
, sdbus::registerProperty("FileTitle").withGetter([this](){ return this->FileTitle(); })
, sdbus::registerProperty("Position").withGetter([this](){ return this->Position(); }).withSetter([this](const double& value){ this->Position(value); })
, sdbus::registerProperty("Length").withGetter([this](){ return this->Length(); })
, sdbus::registerProperty("Speed").withGetter([this](){ return this->Speed(); }).withSetter([this](const double& value){ this->Speed(value); })
, sdbus::registerProperty("Tempo").withGetter([this](){ return this->Tempo(); }).withSetter([this](const double& value){ this->Tempo(value); })
, sdbus::registerProperty("Pitch").withGetter([this](){ return this->Pitch(); }).withSetter([this](const double& value){ this->Pitch(value); })
, sdbus::registerProperty("Volume").withGetter([this](){ return this->Volume(); }).withSetter([this](const double& value){ this->Volume(value); })
, sdbus::registerProperty("Paused").withGetter([this](){ return this->Paused(); }).withSetter([this](const bool& value){ this->Paused(value); })
, sdbus::registerProperty("IsStopped").withGetter([this](){ return this->IsStopped(); })
, sdbus::registerProperty("IsDaemon").withGetter([this](){ return this->IsDaemon(); })
, sdbus::registerProperty("StreamIdx").withGetter([this](){ return this->StreamIdx(); })
).forInterface(INTERFACE_NAME);
}
public:
void emitPlaybackEngineStarted()
{
m_object.emitSignal("PlaybackEngineStarted").onInterface(INTERFACE_NAME);
}
void emitSpeedChanged(const double& new_speed)
{
m_object.emitSignal("SpeedChanged").onInterface(INTERFACE_NAME).withArguments(new_speed);
}
void emitTempoChanged(const double& new_tempo)
{
m_object.emitSignal("TempoChanged").onInterface(INTERFACE_NAME).withArguments(new_tempo);
}
void emitPitchChanged(const double& new_pitch)
{
m_object.emitSignal("PitchChanged").onInterface(INTERFACE_NAME).withArguments(new_pitch);
}
void emitPauseChanged(const bool& now_paused)
{
m_object.emitSignal("PauseChanged").onInterface(INTERFACE_NAME).withArguments(now_paused);
}
void emitStopped()
{
m_object.emitSignal("Stopped").onInterface(INTERFACE_NAME);
}
void emitErrorOccurred(const std::string& error_desc, const std::string& error_type)
{
m_object.emitSignal("ErrorOccurred").onInterface(INTERFACE_NAME).withArguments(error_desc, error_type);
}
void emitSeeked(const double& to_position)
{
m_object.emitSignal("Seeked").onInterface(INTERFACE_NAME).withArguments(to_position);
}
void emitFileChanged(const std::string& path, const std::string& title)
{
m_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<sdbus::Struct<double, std::string, int32_t>> 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& m_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)
: m_object(object)
{
}
Errors_adaptor(const Errors_adaptor&) = delete;
Errors_adaptor& operator=(const Errors_adaptor&) = delete;
Errors_adaptor(Errors_adaptor&&) = delete;
Errors_adaptor& operator=(Errors_adaptor&&) = delete;
~Errors_adaptor() = default;
void registerAdaptor()
{
m_object.addVTable( sdbus::registerMethod("PopFront").withInputParamNames("handle").withOutputParamNames("error").implementedAs([this](const std::string& handle){ return this->PopFront(handle); })
, sdbus::registerMethod("PopBack").withInputParamNames("handle").withOutputParamNames("error").implementedAs([this](const std::string& handle){ return this->PopBack(handle); })
, sdbus::registerMethod("PeekFront").withInputParamNames("handle").withOutputParamNames("error").implementedAs([this](const std::string& handle){ return this->PeekFront(handle); })
, sdbus::registerMethod("PeekBack").withInputParamNames("handle").withOutputParamNames("error").implementedAs([this](const std::string& handle){ return this->PeekBack(handle); })
, sdbus::registerMethod("GetCount").withInputParamNames("handle").withOutputParamNames("count").implementedAs([this](const std::string& handle){ return this->GetCount(handle); })
, sdbus::registerMethod("IsEmpty").withInputParamNames("handle").withOutputParamNames("empty").implementedAs([this](const std::string& handle){ return this->IsEmpty(handle); })
, sdbus::registerMethod("Clear").withInputParamNames("handle").implementedAs([this](const std::string& handle){ return this->Clear(handle); })
, sdbus::registerMethod("PeekAll").withInputParamNames("handle").withOutputParamNames("errors").implementedAs([this](const std::string& handle){ return this->PeekAll(handle); })
, sdbus::registerMethod("GetAllAndClear").withInputParamNames("handle").withOutputParamNames("errors").implementedAs([this](const std::string& handle){ return this->GetAllAndClear(handle); })
).forInterface(INTERFACE_NAME);
}
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& m_object;
};
}}} // namespaces
#endif