looper/assets/dbus_stub_proxy.hpp

351 lines
10 KiB
C++
Raw Normal View History

2024-04-09 10:15:05 -07:00
/*
* 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)
2024-12-11 10:01:40 -08:00
: m_proxy(proxy)
2024-04-09 10:15:05 -07:00
{
}
Application_proxy(const Application_proxy&) = delete;
Application_proxy& operator=(const Application_proxy&) = delete;
2024-12-11 10:01:40 -08:00
Application_proxy(Application_proxy&&) = delete;
Application_proxy& operator=(Application_proxy&&) = delete;
2024-04-09 10:15:05 -07:00
~Application_proxy() = default;
2024-12-11 10:01:40 -08:00
void registerProxy()
{
}
2024-04-09 10:15:05 -07:00
public:
void Activate(const std::map<std::string, sdbus::Variant>& platform_data)
{
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("Activate").onInterface(INTERFACE_NAME).withArguments(platform_data);
2024-04-09 10:15:05 -07:00
}
void Open(const std::vector<std::string>& uris, const std::map<std::string, sdbus::Variant>& platform_data)
{
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("Open").onInterface(INTERFACE_NAME).withArguments(uris, platform_data);
2024-04-09 10:15:05 -07:00
}
void ActivateAction(const std::string& action_name, const std::vector<sdbus::Variant>& parameter, const std::map<std::string, sdbus::Variant>& platform_data)
{
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("ActivateAction").onInterface(INTERFACE_NAME).withArguments(action_name, parameter, platform_data);
2024-04-09 10:15:05 -07:00
}
private:
2024-12-11 10:01:40 -08:00
sdbus::IProxy& m_proxy;
2024-04-09 10:15:05 -07:00
};
}} // namespaces
namespace com {
namespace complecwaft {
class looper_proxy
2024-04-09 10:15:05 -07:00
{
public:
static constexpr const char* INTERFACE_NAME = "com.complecwaft.looper";
2024-04-09 10:15:05 -07:00
protected:
looper_proxy(sdbus::IProxy& proxy)
2024-12-11 10:01:40 -08:00
: m_proxy(proxy)
2024-04-09 10:15:05 -07:00
{
}
looper_proxy(const looper_proxy&) = delete;
looper_proxy& operator=(const looper_proxy&) = delete;
2024-12-11 10:01:40 -08:00
looper_proxy(looper_proxy&&) = delete;
looper_proxy& operator=(looper_proxy&&) = delete;
2024-04-09 10:15:05 -07:00
~looper_proxy() = default;
2024-04-09 10:15:05 -07:00
2024-12-11 10:01:40 -08:00
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); });
}
2024-04-09 10:15:05 -07:00
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;
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("CreateHandle").onInterface(INTERFACE_NAME).storeResultsTo(result);
2024-04-09 10:15:05 -07:00
return result;
}
void ClearHandle(const std::string& handle)
{
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("ClearHandle").onInterface(INTERFACE_NAME).withArguments(handle);
2024-04-09 10:15:05 -07:00
}
2024-04-13 12:56:39 -07:00
void Start(const std::string& path, const bool& isUri)
2024-04-09 10:15:05 -07:00
{
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("Start").onInterface(INTERFACE_NAME).withArguments(path, isUri);
2024-04-09 10:15:05 -07:00
}
2024-04-13 12:56:39 -07:00
void StartWithStreamIndex(const std::string& path, const bool& isUri, const uint32_t& streamIndex)
2024-04-09 10:15:05 -07:00
{
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("StartWithStreamIndex").onInterface(INTERFACE_NAME).withArguments(path, isUri, streamIndex);
2024-04-13 12:56:39 -07:00
}
void Load(const std::string& path, const bool& isUri)
{
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("Load").onInterface(INTERFACE_NAME).withArguments(path, isUri);
2024-04-09 10:15:05 -07:00
}
void Quit()
{
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("Quit").onInterface(INTERFACE_NAME);
2024-04-09 10:15:05 -07:00
}
void Stop()
{
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("Stop").onInterface(INTERFACE_NAME);
2024-04-09 10:15:05 -07:00
}
void TogglePause()
{
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("TogglePause").onInterface(INTERFACE_NAME);
2024-04-09 10:15:05 -07:00
}
2024-04-14 13:25:49 -07:00
std::vector<sdbus::Struct<double, std::string, int32_t>> GetStreams()
2024-04-13 12:56:39 -07:00
{
2024-04-14 13:25:49 -07:00
std::vector<sdbus::Struct<double, std::string, int32_t>> result;
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("GetStreams").onInterface(INTERFACE_NAME).storeResultsTo(result);
2024-04-13 12:56:39 -07:00
return result;
}
void PlayStream(const uint32_t& idx)
{
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("PlayStream").onInterface(INTERFACE_NAME).withArguments(idx);
2024-04-13 12:56:39 -07:00
}
2024-04-09 10:15:05 -07:00
public:
std::string FilePath()
{
2024-12-11 10:01:40 -08:00
return m_proxy.getProperty("FilePath").onInterface(INTERFACE_NAME).get<std::string>();
2024-04-09 10:15:05 -07:00
}
std::string FileTitle()
{
2024-12-11 10:01:40 -08:00
return m_proxy.getProperty("FileTitle").onInterface(INTERFACE_NAME).get<std::string>();
2024-04-09 10:15:05 -07:00
}
double Position()
{
2024-12-11 10:01:40 -08:00
return m_proxy.getProperty("Position").onInterface(INTERFACE_NAME).get<double>();
2024-04-09 10:15:05 -07:00
}
void Position(const double& value)
{
2024-12-11 10:01:40 -08:00
m_proxy.setProperty("Position").onInterface(INTERFACE_NAME).toValue(value);
2024-04-09 10:15:05 -07:00
}
double Length()
{
2024-12-11 10:01:40 -08:00
return m_proxy.getProperty("Length").onInterface(INTERFACE_NAME).get<double>();
2024-04-09 10:15:05 -07:00
}
double Speed()
{
2024-12-11 10:01:40 -08:00
return m_proxy.getProperty("Speed").onInterface(INTERFACE_NAME).get<double>();
2024-04-09 10:15:05 -07:00
}
void Speed(const double& value)
{
2024-12-11 10:01:40 -08:00
m_proxy.setProperty("Speed").onInterface(INTERFACE_NAME).toValue(value);
2024-04-09 10:15:05 -07:00
}
double Tempo()
{
2024-12-11 10:01:40 -08:00
return m_proxy.getProperty("Tempo").onInterface(INTERFACE_NAME).get<double>();
2024-04-09 10:15:05 -07:00
}
void Tempo(const double& value)
{
2024-12-11 10:01:40 -08:00
m_proxy.setProperty("Tempo").onInterface(INTERFACE_NAME).toValue(value);
2024-04-09 10:15:05 -07:00
}
double Pitch()
{
2024-12-11 10:01:40 -08:00
return m_proxy.getProperty("Pitch").onInterface(INTERFACE_NAME).get<double>();
2024-04-09 10:15:05 -07:00
}
void Pitch(const double& value)
{
2024-12-11 10:01:40 -08:00
m_proxy.setProperty("Pitch").onInterface(INTERFACE_NAME).toValue(value);
2024-04-09 10:15:05 -07:00
}
double Volume()
{
2024-12-11 10:01:40 -08:00
return m_proxy.getProperty("Volume").onInterface(INTERFACE_NAME).get<double>();
2024-04-09 10:15:05 -07:00
}
void Volume(const double& value)
{
2024-12-11 10:01:40 -08:00
m_proxy.setProperty("Volume").onInterface(INTERFACE_NAME).toValue(value);
2024-04-09 10:15:05 -07:00
}
bool Paused()
{
2024-12-11 10:01:40 -08:00
return m_proxy.getProperty("Paused").onInterface(INTERFACE_NAME).get<bool>();
2024-04-09 10:15:05 -07:00
}
void Paused(const bool& value)
{
2024-12-11 10:01:40 -08:00
m_proxy.setProperty("Paused").onInterface(INTERFACE_NAME).toValue(value);
2024-04-09 10:15:05 -07:00
}
bool IsStopped()
{
2024-12-11 10:01:40 -08:00
return m_proxy.getProperty("IsStopped").onInterface(INTERFACE_NAME).get<bool>();
2024-04-09 10:15:05 -07:00
}
bool IsDaemon()
{
2024-12-11 10:01:40 -08:00
return m_proxy.getProperty("IsDaemon").onInterface(INTERFACE_NAME).get<bool>();
2024-04-09 10:15:05 -07:00
}
2024-04-13 12:56:39 -07:00
uint32_t StreamIdx()
{
2024-12-11 10:01:40 -08:00
return m_proxy.getProperty("StreamIdx").onInterface(INTERFACE_NAME).get<uint32_t>();
2024-04-13 12:56:39 -07:00
}
2024-04-09 10:15:05 -07:00
private:
2024-12-11 10:01:40 -08:00
sdbus::IProxy& m_proxy;
2024-04-09 10:15:05 -07:00
};
}} // namespaces
namespace com {
namespace complecwaft {
namespace looper {
2024-04-09 10:15:05 -07:00
class Errors_proxy
{
public:
static constexpr const char* INTERFACE_NAME = "com.complecwaft.looper.Errors";
2024-04-09 10:15:05 -07:00
protected:
Errors_proxy(sdbus::IProxy& proxy)
2024-12-11 10:01:40 -08:00
: m_proxy(proxy)
2024-04-09 10:15:05 -07:00
{
}
Errors_proxy(const Errors_proxy&) = delete;
Errors_proxy& operator=(const Errors_proxy&) = delete;
2024-12-11 10:01:40 -08:00
Errors_proxy(Errors_proxy&&) = delete;
Errors_proxy& operator=(Errors_proxy&&) = delete;
2024-04-09 10:15:05 -07:00
~Errors_proxy() = default;
2024-12-11 10:01:40 -08:00
void registerProxy()
{
}
2024-04-09 10:15:05 -07:00
public:
std::string PopFront(const std::string& handle)
{
std::string result;
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("PopFront").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
2024-04-09 10:15:05 -07:00
return result;
}
std::string PopBack(const std::string& handle)
{
std::string result;
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("PopBack").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
2024-04-09 10:15:05 -07:00
return result;
}
std::string PeekFront(const std::string& handle)
{
std::string result;
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("PeekFront").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
2024-04-09 10:15:05 -07:00
return result;
}
std::string PeekBack(const std::string& handle)
{
std::string result;
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("PeekBack").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
2024-04-09 10:15:05 -07:00
return result;
}
uint32_t GetCount(const std::string& handle)
{
uint32_t result;
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("GetCount").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
2024-04-09 10:15:05 -07:00
return result;
}
bool IsEmpty(const std::string& handle)
{
bool result;
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("IsEmpty").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
2024-04-09 10:15:05 -07:00
return result;
}
void Clear(const std::string& handle)
{
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("Clear").onInterface(INTERFACE_NAME).withArguments(handle);
2024-04-09 10:15:05 -07:00
}
std::vector<std::string> PeekAll(const std::string& handle)
{
std::vector<std::string> result;
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("PeekAll").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
2024-04-09 10:15:05 -07:00
return result;
}
std::vector<std::string> GetAllAndClear(const std::string& handle)
{
std::vector<std::string> result;
2024-12-11 10:01:40 -08:00
m_proxy.callMethod("GetAllAndClear").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
2024-04-09 10:15:05 -07:00
return result;
}
private:
2024-12-11 10:01:40 -08:00
sdbus::IProxy& m_proxy;
2024-04-09 10:15:05 -07:00
};
}}} // namespaces
#endif