looper/assets/dbus_stub_proxy.hpp

338 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)
: proxy_(&proxy)
{
}
Application_proxy(const Application_proxy&) = delete;
Application_proxy& operator=(const Application_proxy&) = delete;
Application_proxy(Application_proxy&&) = default;
Application_proxy& operator=(Application_proxy&&) = default;
~Application_proxy() = default;
public:
void Activate(const std::map<std::string, sdbus::Variant>& platform_data)
{
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)
{
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)
{
proxy_->callMethod("ActivateAction").onInterface(INTERFACE_NAME).withArguments(action_name, parameter, platform_data);
}
private:
sdbus::IProxy* 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)
: proxy_(&proxy)
{
proxy_->uponSignal("PlaybackEngineStarted").onInterface(INTERFACE_NAME).call([this](){ this->onPlaybackEngineStarted(); });
proxy_->uponSignal("SpeedChanged").onInterface(INTERFACE_NAME).call([this](const double& new_speed){ this->onSpeedChanged(new_speed); });
proxy_->uponSignal("TempoChanged").onInterface(INTERFACE_NAME).call([this](const double& new_tempo){ this->onTempoChanged(new_tempo); });
proxy_->uponSignal("PitchChanged").onInterface(INTERFACE_NAME).call([this](const double& new_pitch){ this->onPitchChanged(new_pitch); });
proxy_->uponSignal("PauseChanged").onInterface(INTERFACE_NAME).call([this](const bool& now_paused){ this->onPauseChanged(now_paused); });
proxy_->uponSignal("Stopped").onInterface(INTERFACE_NAME).call([this](){ this->onStopped(); });
proxy_->uponSignal("ErrorOccurred").onInterface(INTERFACE_NAME).call([this](const std::string& error_desc, const std::string& error_type){ this->onErrorOccurred(error_desc, error_type); });
proxy_->uponSignal("Seeked").onInterface(INTERFACE_NAME).call([this](const double& to_position){ this->onSeeked(to_position); });
proxy_->uponSignal("FileChanged").onInterface(INTERFACE_NAME).call([this](const std::string& path, const std::string& title){ this->onFileChanged(path, title); });
}
Looper_proxy(const Looper_proxy&) = delete;
Looper_proxy& operator=(const Looper_proxy&) = delete;
Looper_proxy(Looper_proxy&&) = default;
Looper_proxy& operator=(Looper_proxy&&) = default;
~Looper_proxy() = default;
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;
proxy_->callMethod("CreateHandle").onInterface(INTERFACE_NAME).storeResultsTo(result);
return result;
}
void ClearHandle(const std::string& handle)
{
proxy_->callMethod("ClearHandle").onInterface(INTERFACE_NAME).withArguments(handle);
}
void Start(const std::string& path, const bool& isUri)
{
proxy_->callMethod("Start").onInterface(INTERFACE_NAME).withArguments(path, isUri);
}
void StartWithStreamIndex(const std::string& path, const bool& isUri, const uint32_t& streamIndex)
{
proxy_->callMethod("StartWithStreamIndex").onInterface(INTERFACE_NAME).withArguments(path, isUri, streamIndex);
}
void Load(const std::string& path, const bool& isUri)
{
proxy_->callMethod("Load").onInterface(INTERFACE_NAME).withArguments(path, isUri);
}
void Quit()
{
proxy_->callMethod("Quit").onInterface(INTERFACE_NAME);
}
void Stop()
{
proxy_->callMethod("Stop").onInterface(INTERFACE_NAME);
}
void TogglePause()
{
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;
proxy_->callMethod("GetStreams").onInterface(INTERFACE_NAME).storeResultsTo(result);
return result;
}
void PlayStream(const uint32_t& idx)
{
proxy_->callMethod("PlayStream").onInterface(INTERFACE_NAME).withArguments(idx);
}
public:
std::string FilePath()
{
return proxy_->getProperty("FilePath").onInterface(INTERFACE_NAME);
}
std::string FileTitle()
{
return proxy_->getProperty("FileTitle").onInterface(INTERFACE_NAME);
}
double Position()
{
return proxy_->getProperty("Position").onInterface(INTERFACE_NAME);
}
void Position(const double& value)
{
proxy_->setProperty("Position").onInterface(INTERFACE_NAME).toValue(value);
}
double Length()
{
return proxy_->getProperty("Length").onInterface(INTERFACE_NAME);
}
double Speed()
{
return proxy_->getProperty("Speed").onInterface(INTERFACE_NAME);
}
void Speed(const double& value)
{
proxy_->setProperty("Speed").onInterface(INTERFACE_NAME).toValue(value);
}
double Tempo()
{
return proxy_->getProperty("Tempo").onInterface(INTERFACE_NAME);
}
void Tempo(const double& value)
{
proxy_->setProperty("Tempo").onInterface(INTERFACE_NAME).toValue(value);
}
double Pitch()
{
return proxy_->getProperty("Pitch").onInterface(INTERFACE_NAME);
}
void Pitch(const double& value)
{
proxy_->setProperty("Pitch").onInterface(INTERFACE_NAME).toValue(value);
}
double Volume()
{
return proxy_->getProperty("Volume").onInterface(INTERFACE_NAME);
}
void Volume(const double& value)
{
proxy_->setProperty("Volume").onInterface(INTERFACE_NAME).toValue(value);
}
bool Paused()
{
return proxy_->getProperty("Paused").onInterface(INTERFACE_NAME);
}
void Paused(const bool& value)
{
proxy_->setProperty("Paused").onInterface(INTERFACE_NAME).toValue(value);
}
bool IsStopped()
{
return proxy_->getProperty("IsStopped").onInterface(INTERFACE_NAME);
}
bool IsDaemon()
{
return proxy_->getProperty("IsDaemon").onInterface(INTERFACE_NAME);
}
uint32_t StreamIdx()
{
return proxy_->getProperty("StreamIdx").onInterface(INTERFACE_NAME);
}
private:
sdbus::IProxy* 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)
: proxy_(&proxy)
{
}
Errors_proxy(const Errors_proxy&) = delete;
Errors_proxy& operator=(const Errors_proxy&) = delete;
Errors_proxy(Errors_proxy&&) = default;
Errors_proxy& operator=(Errors_proxy&&) = default;
~Errors_proxy() = default;
public:
std::string PopFront(const std::string& handle)
{
std::string result;
proxy_->callMethod("PopFront").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
return result;
}
std::string PopBack(const std::string& handle)
{
std::string result;
proxy_->callMethod("PopBack").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
return result;
}
std::string PeekFront(const std::string& handle)
{
std::string result;
proxy_->callMethod("PeekFront").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
return result;
}
std::string PeekBack(const std::string& handle)
{
std::string result;
proxy_->callMethod("PeekBack").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
return result;
}
uint32_t GetCount(const std::string& handle)
{
uint32_t result;
proxy_->callMethod("GetCount").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
return result;
}
bool IsEmpty(const std::string& handle)
{
bool result;
proxy_->callMethod("IsEmpty").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
return result;
}
void Clear(const std::string& handle)
{
proxy_->callMethod("Clear").onInterface(INTERFACE_NAME).withArguments(handle);
}
std::vector<std::string> PeekAll(const std::string& handle)
{
std::vector<std::string> result;
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;
proxy_->callMethod("GetAllAndClear").onInterface(INTERFACE_NAME).withArguments(handle).storeResultsTo(result);
return result;
}
private:
sdbus::IProxy* proxy_;
};
}}} // namespaces
#endif