looper/assets/dbus_stub_proxy.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

350 lines
10 KiB
C++

/*
* This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT!
*/
#ifndef __sdbuscpp__dbus_stub_proxy_hpp__proxy__H__
#define __sdbuscpp__dbus_stub_proxy_hpp__proxy__H__
#include <sdbus-c++/sdbus-c++.h>
#include <string>
#include <tuple>
namespace org {
namespace freedesktop {
class Application_proxy
{
public:
static constexpr const char* INTERFACE_NAME = "org.freedesktop.Application";
protected:
Application_proxy(sdbus::IProxy& proxy)
: m_proxy(proxy)
{
}
Application_proxy(const Application_proxy&) = delete;
Application_proxy& operator=(const Application_proxy&) = delete;
Application_proxy(Application_proxy&&) = delete;
Application_proxy& operator=(Application_proxy&&) = delete;
~Application_proxy() = default;
void registerProxy()
{
}
public:
void Activate(const std::map<std::string, sdbus::Variant>& platform_data)
{
m_proxy.callMethod("Activate").onInterface(INTERFACE_NAME).withArguments(platform_data);
}
void Open(const std::vector<std::string>& uris, const std::map<std::string, sdbus::Variant>& platform_data)
{
m_proxy.callMethod("Open").onInterface(INTERFACE_NAME).withArguments(uris, platform_data);
}
void ActivateAction(const std::string& action_name, const std::vector<sdbus::Variant>& parameter, const std::map<std::string, sdbus::Variant>& platform_data)
{
m_proxy.callMethod("ActivateAction").onInterface(INTERFACE_NAME).withArguments(action_name, parameter, platform_data);
}
private:
sdbus::IProxy& m_proxy;
};
}} // namespaces
namespace com {
namespace complecwaft {
class looper_proxy
{
public:
static constexpr const char* INTERFACE_NAME = "com.complecwaft.looper";
protected:
looper_proxy(sdbus::IProxy& proxy)
: m_proxy(proxy)
{
}
looper_proxy(const looper_proxy&) = delete;
looper_proxy& operator=(const looper_proxy&) = delete;
looper_proxy(looper_proxy&&) = delete;
looper_proxy& operator=(looper_proxy&&) = delete;
~looper_proxy() = default;
void registerProxy()
{
m_proxy.uponSignal("PlaybackEngineStarted").onInterface(INTERFACE_NAME).call([this](){ this->onPlaybackEngineStarted(); });
m_proxy.uponSignal("SpeedChanged").onInterface(INTERFACE_NAME).call([this](const double& new_speed){ this->onSpeedChanged(new_speed); });
m_proxy.uponSignal("TempoChanged").onInterface(INTERFACE_NAME).call([this](const double& new_tempo){ this->onTempoChanged(new_tempo); });
m_proxy.uponSignal("PitchChanged").onInterface(INTERFACE_NAME).call([this](const double& new_pitch){ this->onPitchChanged(new_pitch); });
m_proxy.uponSignal("PauseChanged").onInterface(INTERFACE_NAME).call([this](const bool& now_paused){ this->onPauseChanged(now_paused); });
m_proxy.uponSignal("Stopped").onInterface(INTERFACE_NAME).call([this](){ this->onStopped(); });
m_proxy.uponSignal("ErrorOccurred").onInterface(INTERFACE_NAME).call([this](const std::string& error_desc, const std::string& error_type){ this->onErrorOccurred(error_desc, error_type); });
m_proxy.uponSignal("Seeked").onInterface(INTERFACE_NAME).call([this](const double& to_position){ this->onSeeked(to_position); });
m_proxy.uponSignal("FileChanged").onInterface(INTERFACE_NAME).call([this](const std::string& path, const std::string& title){ this->onFileChanged(path, title); });
}
virtual void onPlaybackEngineStarted() = 0;
virtual void onSpeedChanged(const double& new_speed) = 0;
virtual void onTempoChanged(const double& new_tempo) = 0;
virtual void onPitchChanged(const double& new_pitch) = 0;
virtual void onPauseChanged(const bool& now_paused) = 0;
virtual void onStopped() = 0;
virtual void onErrorOccurred(const std::string& error_desc, const std::string& error_type) = 0;
virtual void onSeeked(const double& to_position) = 0;
virtual void onFileChanged(const std::string& path, const std::string& title) = 0;
public:
std::string CreateHandle()
{
std::string result;
m_proxy.callMethod("CreateHandle").onInterface(INTERFACE_NAME).storeResultsTo(result);
return result;
}
void ClearHandle(const std::string& handle)
{
m_proxy.callMethod("ClearHandle").onInterface(INTERFACE_NAME).withArguments(handle);
}
void Start(const std::string& path, const bool& isUri)
{
m_proxy.callMethod("Start").onInterface(INTERFACE_NAME).withArguments(path, isUri);
}
void StartWithStreamIndex(const std::string& path, const bool& isUri, const uint32_t& streamIndex)
{
m_proxy.callMethod("StartWithStreamIndex").onInterface(INTERFACE_NAME).withArguments(path, isUri, streamIndex);
}
void Load(const std::string& path, const bool& isUri)
{
m_proxy.callMethod("Load").onInterface(INTERFACE_NAME).withArguments(path, isUri);
}
void Quit()
{
m_proxy.callMethod("Quit").onInterface(INTERFACE_NAME);
}
void Stop()
{
m_proxy.callMethod("Stop").onInterface(INTERFACE_NAME);
}
void TogglePause()
{
m_proxy.callMethod("TogglePause").onInterface(INTERFACE_NAME);
}
std::vector<sdbus::Struct<double, std::string, int32_t>> GetStreams()
{
std::vector<sdbus::Struct<double, std::string, int32_t>> result;
m_proxy.callMethod("GetStreams").onInterface(INTERFACE_NAME).storeResultsTo(result);
return result;
}
void PlayStream(const uint32_t& idx)
{
m_proxy.callMethod("PlayStream").onInterface(INTERFACE_NAME).withArguments(idx);
}
public:
std::string FilePath()
{
return m_proxy.getProperty("FilePath").onInterface(INTERFACE_NAME).get<std::string>();
}
std::string FileTitle()
{
return m_proxy.getProperty("FileTitle").onInterface(INTERFACE_NAME).get<std::string>();
}
double Position()
{
return m_proxy.getProperty("Position").onInterface(INTERFACE_NAME).get<double>();
}
void Position(const double& value)
{
m_proxy.setProperty("Position").onInterface(INTERFACE_NAME).toValue(value);
}
double Length()
{
return m_proxy.getProperty("Length").onInterface(INTERFACE_NAME).get<double>();
}
double Speed()
{
return m_proxy.getProperty("Speed").onInterface(INTERFACE_NAME).get<double>();
}
void Speed(const double& value)
{
m_proxy.setProperty("Speed").onInterface(INTERFACE_NAME).toValue(value);
}
double Tempo()
{
return m_proxy.getProperty("Tempo").onInterface(INTERFACE_NAME).get<double>();
}
void Tempo(const double& value)
{
m_proxy.setProperty("Tempo").onInterface(INTERFACE_NAME).toValue(value);
}
double Pitch()
{
return m_proxy.getProperty("Pitch").onInterface(INTERFACE_NAME).get<double>();
}
void Pitch(const double& value)
{
m_proxy.setProperty("Pitch").onInterface(INTERFACE_NAME).toValue(value);
}
double Volume()
{
return m_proxy.getProperty("Volume").onInterface(INTERFACE_NAME).get<double>();
}
void Volume(const double& value)
{
m_proxy.setProperty("Volume").onInterface(INTERFACE_NAME).toValue(value);
}
bool Paused()
{
return m_proxy.getProperty("Paused").onInterface(INTERFACE_NAME).get<bool>();
}
void Paused(const bool& value)
{
m_proxy.setProperty("Paused").onInterface(INTERFACE_NAME).toValue(value);
}
bool IsStopped()
{
return m_proxy.getProperty("IsStopped").onInterface(INTERFACE_NAME).get<bool>();
}
bool IsDaemon()
{
return m_proxy.getProperty("IsDaemon").onInterface(INTERFACE_NAME).get<bool>();
}
uint32_t StreamIdx()
{
return m_proxy.getProperty("StreamIdx").onInterface(INTERFACE_NAME).get<uint32_t>();
}
private:
sdbus::IProxy& m_proxy;
};
}} // namespaces
namespace com {
namespace complecwaft {
namespace looper {
class Errors_proxy
{
public:
static constexpr const char* INTERFACE_NAME = "com.complecwaft.looper.Errors";
protected:
Errors_proxy(sdbus::IProxy& proxy)
: m_proxy(proxy)
{
}
Errors_proxy(const Errors_proxy&) = delete;
Errors_proxy& operator=(const Errors_proxy&) = delete;
Errors_proxy(Errors_proxy&&) = delete;
Errors_proxy& operator=(Errors_proxy&&) = delete;
~Errors_proxy() = default;
void registerProxy()
{
}
public:
std::string PopFront(const std::string& handle)
{
std::string result;
m_proxy.callMethod("PopFront").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
return result;
}
std::string PopBack(const std::string& handle)
{
std::string result;
m_proxy.callMethod("PopBack").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
return result;
}
std::string PeekFront(const std::string& handle)
{
std::string result;
m_proxy.callMethod("PeekFront").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
return result;
}
std::string PeekBack(const std::string& handle)
{
std::string result;
m_proxy.callMethod("PeekBack").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
return result;
}
uint32_t GetCount(const std::string& handle)
{
uint32_t result;
m_proxy.callMethod("GetCount").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
return result;
}
bool IsEmpty(const std::string& handle)
{
bool result;
m_proxy.callMethod("IsEmpty").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
return result;
}
void Clear(const std::string& handle)
{
m_proxy.callMethod("Clear").onInterface(INTERFACE_NAME).withArguments(handle);
}
std::vector<std::string> PeekAll(const std::string& handle)
{
std::vector<std::string> result;
m_proxy.callMethod("PeekAll").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
return result;
}
std::vector<std::string> GetAllAndClear(const std::string& handle)
{
std::vector<std::string> result;
m_proxy.callMethod("GetAllAndClear").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
return result;
}
private:
sdbus::IProxy& m_proxy;
};
}}} // namespaces
#endif