Update .gitignore and remove generated assets
Some checks failed
Build / build-gentoo (push) Failing after 1m5s
Build / download-system-deps (push) Successful in 3m22s
Build / get-source-code (push) Successful in 12m21s
Build / build-appimage (push) Successful in 3m54s
Build / build-android (push) Failing after 2m58s
Build / build-windows (push) Failing after 7m19s
Some checks failed
Build / build-gentoo (push) Failing after 1m5s
Build / download-system-deps (push) Successful in 3m22s
Build / get-source-code (push) Successful in 12m21s
Build / build-appimage (push) Successful in 3m54s
Build / build-android (push) Failing after 2m58s
Build / build-windows (push) Failing after 7m19s
This commit is contained in:
parent
6240edefce
commit
9e4704d2ad
5 changed files with 1 additions and 1144 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,5 @@
|
||||||
assets/*.h
|
assets/*.h
|
||||||
|
assets/*.hpp
|
||||||
build*
|
build*
|
||||||
!build-env
|
!build-env
|
||||||
.vscode/settings.json
|
.vscode/settings.json
|
||||||
|
|
|
@ -1,247 +0,0 @@
|
||||||
|
|
||||||
/*
|
|
||||||
* 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
|
|
|
@ -1,350 +0,0 @@
|
||||||
|
|
||||||
/*
|
|
||||||
* 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
|
|
|
@ -1,229 +0,0 @@
|
||||||
|
|
||||||
/*
|
|
||||||
* This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT!
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __sdbuscpp__mpris_stub_adaptor_hpp__adaptor__H__
|
|
||||||
#define __sdbuscpp__mpris_stub_adaptor_hpp__adaptor__H__
|
|
||||||
|
|
||||||
#include <sdbus-c++/sdbus-c++.h>
|
|
||||||
#include <string>
|
|
||||||
#include <tuple>
|
|
||||||
|
|
||||||
namespace org {
|
|
||||||
namespace mpris {
|
|
||||||
|
|
||||||
class MediaPlayer2_adaptor
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
static constexpr const char* INTERFACE_NAME = "org.mpris.MediaPlayer2";
|
|
||||||
|
|
||||||
protected:
|
|
||||||
MediaPlayer2_adaptor(sdbus::IObject& object)
|
|
||||||
: m_object(object)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
MediaPlayer2_adaptor(const MediaPlayer2_adaptor&) = delete;
|
|
||||||
MediaPlayer2_adaptor& operator=(const MediaPlayer2_adaptor&) = delete;
|
|
||||||
MediaPlayer2_adaptor(MediaPlayer2_adaptor&&) = delete;
|
|
||||||
MediaPlayer2_adaptor& operator=(MediaPlayer2_adaptor&&) = delete;
|
|
||||||
|
|
||||||
~MediaPlayer2_adaptor() = default;
|
|
||||||
|
|
||||||
void registerAdaptor()
|
|
||||||
{
|
|
||||||
m_object.addVTable( sdbus::registerMethod("Raise").implementedAs([this](){ return this->Raise(); })
|
|
||||||
, sdbus::registerMethod("Quit").implementedAs([this](){ return this->Quit(); })
|
|
||||||
, sdbus::registerProperty("CanRaise").withGetter([this](){ return this->CanRaise(); })
|
|
||||||
, sdbus::registerProperty("CanQuit").withGetter([this](){ return this->CanQuit(); })
|
|
||||||
, sdbus::registerProperty("HasTrackList").withGetter([this](){ return this->HasTrackList(); })
|
|
||||||
, sdbus::registerProperty("Identity").withGetter([this](){ return this->Identity(); })
|
|
||||||
, sdbus::registerProperty("SupportedUriSchemes").withGetter([this](){ return this->SupportedUriSchemes(); })
|
|
||||||
, sdbus::registerProperty("SupportedMimeTypes").withGetter([this](){ return this->SupportedMimeTypes(); })
|
|
||||||
).forInterface(INTERFACE_NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
virtual void Raise() = 0;
|
|
||||||
virtual void Quit() = 0;
|
|
||||||
|
|
||||||
private:
|
|
||||||
virtual bool CanRaise() = 0;
|
|
||||||
virtual bool CanQuit() = 0;
|
|
||||||
virtual bool HasTrackList() = 0;
|
|
||||||
virtual std::string Identity() = 0;
|
|
||||||
virtual std::vector<std::string> SupportedUriSchemes() = 0;
|
|
||||||
virtual std::vector<std::string> SupportedMimeTypes() = 0;
|
|
||||||
|
|
||||||
private:
|
|
||||||
sdbus::IObject& m_object;
|
|
||||||
};
|
|
||||||
|
|
||||||
}} // namespaces
|
|
||||||
|
|
||||||
namespace org {
|
|
||||||
namespace mpris {
|
|
||||||
namespace MediaPlayer2 {
|
|
||||||
|
|
||||||
class Player_adaptor
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
static constexpr const char* INTERFACE_NAME = "org.mpris.MediaPlayer2.Player";
|
|
||||||
|
|
||||||
protected:
|
|
||||||
Player_adaptor(sdbus::IObject& object)
|
|
||||||
: m_object(object)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
Player_adaptor(const Player_adaptor&) = delete;
|
|
||||||
Player_adaptor& operator=(const Player_adaptor&) = delete;
|
|
||||||
Player_adaptor(Player_adaptor&&) = delete;
|
|
||||||
Player_adaptor& operator=(Player_adaptor&&) = delete;
|
|
||||||
|
|
||||||
~Player_adaptor() = default;
|
|
||||||
|
|
||||||
void registerAdaptor()
|
|
||||||
{
|
|
||||||
m_object.addVTable( sdbus::registerMethod("Next").implementedAs([this](){ return this->Next(); })
|
|
||||||
, sdbus::registerMethod("Previous").implementedAs([this](){ return this->Previous(); })
|
|
||||||
, sdbus::registerMethod("Pause").implementedAs([this](){ return this->Pause(); })
|
|
||||||
, sdbus::registerMethod("PlayPause").implementedAs([this](){ return this->PlayPause(); })
|
|
||||||
, sdbus::registerMethod("Stop").implementedAs([this](){ return this->Stop(); })
|
|
||||||
, sdbus::registerMethod("Play").implementedAs([this](){ return this->Play(); })
|
|
||||||
, sdbus::registerMethod("Seek").withInputParamNames("Offset").implementedAs([this](const int64_t& Offset){ return this->Seek(Offset); })
|
|
||||||
, sdbus::registerMethod("SetPosition").withInputParamNames("TrackId", "Position").implementedAs([this](const sdbus::ObjectPath& TrackId, const int64_t& Position){ return this->SetPosition(TrackId, Position); })
|
|
||||||
, sdbus::registerMethod("OpenUri").withInputParamNames("Uri").implementedAs([this](const std::string& Uri){ return this->OpenUri(Uri); })
|
|
||||||
, sdbus::registerSignal("Seeked").withParameters<int64_t>("Position")
|
|
||||||
, sdbus::registerProperty("PlaybackStatus").withGetter([this](){ return this->PlaybackStatus(); })
|
|
||||||
, sdbus::registerProperty("Rate").withGetter([this](){ return this->Rate(); }).withSetter([this](const double& value){ this->Rate(value); })
|
|
||||||
, sdbus::registerProperty("Metadata").withGetter([this](){ return this->Metadata(); })
|
|
||||||
, sdbus::registerProperty("Volume").withGetter([this](){ return this->Volume(); }).withSetter([this](const double& value){ this->Volume(value); })
|
|
||||||
, sdbus::registerProperty("Position").withGetter([this](){ return this->Position(); })
|
|
||||||
, sdbus::registerProperty("MinimumRate").withGetter([this](){ return this->MinimumRate(); })
|
|
||||||
, sdbus::registerProperty("MaximumRate").withGetter([this](){ return this->MaximumRate(); })
|
|
||||||
, sdbus::registerProperty("CanGoNext").withGetter([this](){ return this->CanGoNext(); })
|
|
||||||
, sdbus::registerProperty("CanGoPrevious").withGetter([this](){ return this->CanGoPrevious(); })
|
|
||||||
, sdbus::registerProperty("CanPlay").withGetter([this](){ return this->CanPlay(); })
|
|
||||||
, sdbus::registerProperty("CanPause").withGetter([this](){ return this->CanPause(); })
|
|
||||||
, sdbus::registerProperty("CanSeek").withGetter([this](){ return this->CanSeek(); })
|
|
||||||
, sdbus::registerProperty("CanControl").withGetter([this](){ return this->CanControl(); })
|
|
||||||
).forInterface(INTERFACE_NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
|
||||||
void emitSeeked(const int64_t& Position)
|
|
||||||
{
|
|
||||||
m_object.emitSignal("Seeked").onInterface(INTERFACE_NAME).withArguments(Position);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
virtual void Next() = 0;
|
|
||||||
virtual void Previous() = 0;
|
|
||||||
virtual void Pause() = 0;
|
|
||||||
virtual void PlayPause() = 0;
|
|
||||||
virtual void Stop() = 0;
|
|
||||||
virtual void Play() = 0;
|
|
||||||
virtual void Seek(const int64_t& Offset) = 0;
|
|
||||||
virtual void SetPosition(const sdbus::ObjectPath& TrackId, const int64_t& Position) = 0;
|
|
||||||
virtual void OpenUri(const std::string& Uri) = 0;
|
|
||||||
|
|
||||||
private:
|
|
||||||
virtual std::string PlaybackStatus() = 0;
|
|
||||||
virtual double Rate() = 0;
|
|
||||||
virtual void Rate(const double& value) = 0;
|
|
||||||
virtual std::map<std::string, sdbus::Variant> Metadata() = 0;
|
|
||||||
virtual double Volume() = 0;
|
|
||||||
virtual void Volume(const double& value) = 0;
|
|
||||||
virtual int64_t Position() = 0;
|
|
||||||
virtual double MinimumRate() = 0;
|
|
||||||
virtual double MaximumRate() = 0;
|
|
||||||
virtual bool CanGoNext() = 0;
|
|
||||||
virtual bool CanGoPrevious() = 0;
|
|
||||||
virtual bool CanPlay() = 0;
|
|
||||||
virtual bool CanPause() = 0;
|
|
||||||
virtual bool CanSeek() = 0;
|
|
||||||
virtual bool CanControl() = 0;
|
|
||||||
|
|
||||||
private:
|
|
||||||
sdbus::IObject& m_object;
|
|
||||||
};
|
|
||||||
|
|
||||||
}}} // namespaces
|
|
||||||
|
|
||||||
namespace org {
|
|
||||||
namespace mpris {
|
|
||||||
namespace MediaPlayer2 {
|
|
||||||
|
|
||||||
class TrackList_adaptor
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
static constexpr const char* INTERFACE_NAME = "org.mpris.MediaPlayer2.TrackList";
|
|
||||||
|
|
||||||
protected:
|
|
||||||
TrackList_adaptor(sdbus::IObject& object)
|
|
||||||
: m_object(object)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
TrackList_adaptor(const TrackList_adaptor&) = delete;
|
|
||||||
TrackList_adaptor& operator=(const TrackList_adaptor&) = delete;
|
|
||||||
TrackList_adaptor(TrackList_adaptor&&) = delete;
|
|
||||||
TrackList_adaptor& operator=(TrackList_adaptor&&) = delete;
|
|
||||||
|
|
||||||
~TrackList_adaptor() = default;
|
|
||||||
|
|
||||||
void registerAdaptor()
|
|
||||||
{
|
|
||||||
m_object.addVTable( sdbus::registerMethod("GetTracksMetadata").withInputParamNames("TrackIds").withOutputParamNames("Metadata").implementedAs([this](const std::vector<sdbus::ObjectPath>& TrackIds){ return this->GetTracksMetadata(TrackIds); })
|
|
||||||
, sdbus::registerMethod("AddTrack").withInputParamNames("Uri", "AfterTrack", "SetAsCurrent").implementedAs([this](const std::string& Uri, const sdbus::ObjectPath& AfterTrack, const bool& SetAsCurrent){ return this->AddTrack(Uri, AfterTrack, SetAsCurrent); })
|
|
||||||
, sdbus::registerMethod("RemoveTrack").withInputParamNames("TrackId").implementedAs([this](const sdbus::ObjectPath& TrackId){ return this->RemoveTrack(TrackId); })
|
|
||||||
, sdbus::registerMethod("GoTo").withInputParamNames("TrackId").implementedAs([this](const sdbus::ObjectPath& TrackId){ return this->GoTo(TrackId); })
|
|
||||||
, sdbus::registerSignal("TrackListReplaced").withParameters<std::vector<sdbus::ObjectPath>, sdbus::ObjectPath>("Tracks", "CurrentTrack")
|
|
||||||
, sdbus::registerSignal("TrackAdded").withParameters<std::map<std::string, sdbus::Variant>, sdbus::ObjectPath>("Metadata", "AfterTrack")
|
|
||||||
, sdbus::registerSignal("TrackRemoved").withParameters<sdbus::ObjectPath>("TrackId")
|
|
||||||
, sdbus::registerSignal("TrackMetadataChanged").withParameters<sdbus::ObjectPath, std::map<std::string, sdbus::Variant>>("TrackId", "Metadata")
|
|
||||||
, sdbus::registerProperty("Tracks").withGetter([this](){ return this->Tracks(); })
|
|
||||||
, sdbus::registerProperty("CanEditTracks").withGetter([this](){ return this->CanEditTracks(); })
|
|
||||||
).forInterface(INTERFACE_NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
|
||||||
void emitTrackListReplaced(const std::vector<sdbus::ObjectPath>& Tracks, const sdbus::ObjectPath& CurrentTrack)
|
|
||||||
{
|
|
||||||
m_object.emitSignal("TrackListReplaced").onInterface(INTERFACE_NAME).withArguments(Tracks, CurrentTrack);
|
|
||||||
}
|
|
||||||
|
|
||||||
void emitTrackAdded(const std::map<std::string, sdbus::Variant>& Metadata, const sdbus::ObjectPath& AfterTrack)
|
|
||||||
{
|
|
||||||
m_object.emitSignal("TrackAdded").onInterface(INTERFACE_NAME).withArguments(Metadata, AfterTrack);
|
|
||||||
}
|
|
||||||
|
|
||||||
void emitTrackRemoved(const sdbus::ObjectPath& TrackId)
|
|
||||||
{
|
|
||||||
m_object.emitSignal("TrackRemoved").onInterface(INTERFACE_NAME).withArguments(TrackId);
|
|
||||||
}
|
|
||||||
|
|
||||||
void emitTrackMetadataChanged(const sdbus::ObjectPath& TrackId, const std::map<std::string, sdbus::Variant>& Metadata)
|
|
||||||
{
|
|
||||||
m_object.emitSignal("TrackMetadataChanged").onInterface(INTERFACE_NAME).withArguments(TrackId, Metadata);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
virtual std::vector<std::map<std::string, sdbus::Variant>> GetTracksMetadata(const std::vector<sdbus::ObjectPath>& TrackIds) = 0;
|
|
||||||
virtual void AddTrack(const std::string& Uri, const sdbus::ObjectPath& AfterTrack, const bool& SetAsCurrent) = 0;
|
|
||||||
virtual void RemoveTrack(const sdbus::ObjectPath& TrackId) = 0;
|
|
||||||
virtual void GoTo(const sdbus::ObjectPath& TrackId) = 0;
|
|
||||||
|
|
||||||
private:
|
|
||||||
virtual std::vector<sdbus::ObjectPath> Tracks() = 0;
|
|
||||||
virtual bool CanEditTracks() = 0;
|
|
||||||
|
|
||||||
private:
|
|
||||||
sdbus::IObject& m_object;
|
|
||||||
};
|
|
||||||
|
|
||||||
}}} // namespaces
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -1,318 +0,0 @@
|
||||||
|
|
||||||
/*
|
|
||||||
* This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT!
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __sdbuscpp__mpris_stub_proxy_hpp__proxy__H__
|
|
||||||
#define __sdbuscpp__mpris_stub_proxy_hpp__proxy__H__
|
|
||||||
|
|
||||||
#include <sdbus-c++/sdbus-c++.h>
|
|
||||||
#include <string>
|
|
||||||
#include <tuple>
|
|
||||||
|
|
||||||
namespace org {
|
|
||||||
namespace mpris {
|
|
||||||
|
|
||||||
class MediaPlayer2_proxy
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
static constexpr const char* INTERFACE_NAME = "org.mpris.MediaPlayer2";
|
|
||||||
|
|
||||||
protected:
|
|
||||||
MediaPlayer2_proxy(sdbus::IProxy& proxy)
|
|
||||||
: m_proxy(proxy)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
MediaPlayer2_proxy(const MediaPlayer2_proxy&) = delete;
|
|
||||||
MediaPlayer2_proxy& operator=(const MediaPlayer2_proxy&) = delete;
|
|
||||||
MediaPlayer2_proxy(MediaPlayer2_proxy&&) = delete;
|
|
||||||
MediaPlayer2_proxy& operator=(MediaPlayer2_proxy&&) = delete;
|
|
||||||
|
|
||||||
~MediaPlayer2_proxy() = default;
|
|
||||||
|
|
||||||
void registerProxy()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
|
||||||
void Raise()
|
|
||||||
{
|
|
||||||
m_proxy.callMethod("Raise").onInterface(INTERFACE_NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Quit()
|
|
||||||
{
|
|
||||||
m_proxy.callMethod("Quit").onInterface(INTERFACE_NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
|
||||||
bool CanRaise()
|
|
||||||
{
|
|
||||||
return m_proxy.getProperty("CanRaise").onInterface(INTERFACE_NAME).get<bool>();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CanQuit()
|
|
||||||
{
|
|
||||||
return m_proxy.getProperty("CanQuit").onInterface(INTERFACE_NAME).get<bool>();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool HasTrackList()
|
|
||||||
{
|
|
||||||
return m_proxy.getProperty("HasTrackList").onInterface(INTERFACE_NAME).get<bool>();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string Identity()
|
|
||||||
{
|
|
||||||
return m_proxy.getProperty("Identity").onInterface(INTERFACE_NAME).get<std::string>();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<std::string> SupportedUriSchemes()
|
|
||||||
{
|
|
||||||
return m_proxy.getProperty("SupportedUriSchemes").onInterface(INTERFACE_NAME).get<std::vector<std::string>>();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<std::string> SupportedMimeTypes()
|
|
||||||
{
|
|
||||||
return m_proxy.getProperty("SupportedMimeTypes").onInterface(INTERFACE_NAME).get<std::vector<std::string>>();
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
sdbus::IProxy& m_proxy;
|
|
||||||
};
|
|
||||||
|
|
||||||
}} // namespaces
|
|
||||||
|
|
||||||
namespace org {
|
|
||||||
namespace mpris {
|
|
||||||
namespace MediaPlayer2 {
|
|
||||||
|
|
||||||
class Player_proxy
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
static constexpr const char* INTERFACE_NAME = "org.mpris.MediaPlayer2.Player";
|
|
||||||
|
|
||||||
protected:
|
|
||||||
Player_proxy(sdbus::IProxy& proxy)
|
|
||||||
: m_proxy(proxy)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
Player_proxy(const Player_proxy&) = delete;
|
|
||||||
Player_proxy& operator=(const Player_proxy&) = delete;
|
|
||||||
Player_proxy(Player_proxy&&) = delete;
|
|
||||||
Player_proxy& operator=(Player_proxy&&) = delete;
|
|
||||||
|
|
||||||
~Player_proxy() = default;
|
|
||||||
|
|
||||||
void registerProxy()
|
|
||||||
{
|
|
||||||
m_proxy.uponSignal("Seeked").onInterface(INTERFACE_NAME).call([this](const int64_t& Position){ this->onSeeked(Position); });
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void onSeeked(const int64_t& Position) = 0;
|
|
||||||
|
|
||||||
public:
|
|
||||||
void Next()
|
|
||||||
{
|
|
||||||
m_proxy.callMethod("Next").onInterface(INTERFACE_NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Previous()
|
|
||||||
{
|
|
||||||
m_proxy.callMethod("Previous").onInterface(INTERFACE_NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Pause()
|
|
||||||
{
|
|
||||||
m_proxy.callMethod("Pause").onInterface(INTERFACE_NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlayPause()
|
|
||||||
{
|
|
||||||
m_proxy.callMethod("PlayPause").onInterface(INTERFACE_NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Stop()
|
|
||||||
{
|
|
||||||
m_proxy.callMethod("Stop").onInterface(INTERFACE_NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Play()
|
|
||||||
{
|
|
||||||
m_proxy.callMethod("Play").onInterface(INTERFACE_NAME);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Seek(const int64_t& Offset)
|
|
||||||
{
|
|
||||||
m_proxy.callMethod("Seek").onInterface(INTERFACE_NAME).withArguments(Offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetPosition(const sdbus::ObjectPath& TrackId, const int64_t& Position)
|
|
||||||
{
|
|
||||||
m_proxy.callMethod("SetPosition").onInterface(INTERFACE_NAME).withArguments(TrackId, Position);
|
|
||||||
}
|
|
||||||
|
|
||||||
void OpenUri(const std::string& Uri)
|
|
||||||
{
|
|
||||||
m_proxy.callMethod("OpenUri").onInterface(INTERFACE_NAME).withArguments(Uri);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
|
||||||
std::string PlaybackStatus()
|
|
||||||
{
|
|
||||||
return m_proxy.getProperty("PlaybackStatus").onInterface(INTERFACE_NAME).get<std::string>();
|
|
||||||
}
|
|
||||||
|
|
||||||
double Rate()
|
|
||||||
{
|
|
||||||
return m_proxy.getProperty("Rate").onInterface(INTERFACE_NAME).get<double>();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Rate(const double& value)
|
|
||||||
{
|
|
||||||
m_proxy.setProperty("Rate").onInterface(INTERFACE_NAME).toValue(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::map<std::string, sdbus::Variant> Metadata()
|
|
||||||
{
|
|
||||||
return m_proxy.getProperty("Metadata").onInterface(INTERFACE_NAME).get<std::map<std::string, sdbus::Variant>>();
|
|
||||||
}
|
|
||||||
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
int64_t Position()
|
|
||||||
{
|
|
||||||
return m_proxy.getProperty("Position").onInterface(INTERFACE_NAME).get<int64_t>();
|
|
||||||
}
|
|
||||||
|
|
||||||
double MinimumRate()
|
|
||||||
{
|
|
||||||
return m_proxy.getProperty("MinimumRate").onInterface(INTERFACE_NAME).get<double>();
|
|
||||||
}
|
|
||||||
|
|
||||||
double MaximumRate()
|
|
||||||
{
|
|
||||||
return m_proxy.getProperty("MaximumRate").onInterface(INTERFACE_NAME).get<double>();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CanGoNext()
|
|
||||||
{
|
|
||||||
return m_proxy.getProperty("CanGoNext").onInterface(INTERFACE_NAME).get<bool>();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CanGoPrevious()
|
|
||||||
{
|
|
||||||
return m_proxy.getProperty("CanGoPrevious").onInterface(INTERFACE_NAME).get<bool>();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CanPlay()
|
|
||||||
{
|
|
||||||
return m_proxy.getProperty("CanPlay").onInterface(INTERFACE_NAME).get<bool>();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CanPause()
|
|
||||||
{
|
|
||||||
return m_proxy.getProperty("CanPause").onInterface(INTERFACE_NAME).get<bool>();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CanSeek()
|
|
||||||
{
|
|
||||||
return m_proxy.getProperty("CanSeek").onInterface(INTERFACE_NAME).get<bool>();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CanControl()
|
|
||||||
{
|
|
||||||
return m_proxy.getProperty("CanControl").onInterface(INTERFACE_NAME).get<bool>();
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
sdbus::IProxy& m_proxy;
|
|
||||||
};
|
|
||||||
|
|
||||||
}}} // namespaces
|
|
||||||
|
|
||||||
namespace org {
|
|
||||||
namespace mpris {
|
|
||||||
namespace MediaPlayer2 {
|
|
||||||
|
|
||||||
class TrackList_proxy
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
static constexpr const char* INTERFACE_NAME = "org.mpris.MediaPlayer2.TrackList";
|
|
||||||
|
|
||||||
protected:
|
|
||||||
TrackList_proxy(sdbus::IProxy& proxy)
|
|
||||||
: m_proxy(proxy)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
TrackList_proxy(const TrackList_proxy&) = delete;
|
|
||||||
TrackList_proxy& operator=(const TrackList_proxy&) = delete;
|
|
||||||
TrackList_proxy(TrackList_proxy&&) = delete;
|
|
||||||
TrackList_proxy& operator=(TrackList_proxy&&) = delete;
|
|
||||||
|
|
||||||
~TrackList_proxy() = default;
|
|
||||||
|
|
||||||
void registerProxy()
|
|
||||||
{
|
|
||||||
m_proxy.uponSignal("TrackListReplaced").onInterface(INTERFACE_NAME).call([this](const std::vector<sdbus::ObjectPath>& Tracks, const sdbus::ObjectPath& CurrentTrack){ this->onTrackListReplaced(Tracks, CurrentTrack); });
|
|
||||||
m_proxy.uponSignal("TrackAdded").onInterface(INTERFACE_NAME).call([this](const std::map<std::string, sdbus::Variant>& Metadata, const sdbus::ObjectPath& AfterTrack){ this->onTrackAdded(Metadata, AfterTrack); });
|
|
||||||
m_proxy.uponSignal("TrackRemoved").onInterface(INTERFACE_NAME).call([this](const sdbus::ObjectPath& TrackId){ this->onTrackRemoved(TrackId); });
|
|
||||||
m_proxy.uponSignal("TrackMetadataChanged").onInterface(INTERFACE_NAME).call([this](const sdbus::ObjectPath& TrackId, const std::map<std::string, sdbus::Variant>& Metadata){ this->onTrackMetadataChanged(TrackId, Metadata); });
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void onTrackListReplaced(const std::vector<sdbus::ObjectPath>& Tracks, const sdbus::ObjectPath& CurrentTrack) = 0;
|
|
||||||
virtual void onTrackAdded(const std::map<std::string, sdbus::Variant>& Metadata, const sdbus::ObjectPath& AfterTrack) = 0;
|
|
||||||
virtual void onTrackRemoved(const sdbus::ObjectPath& TrackId) = 0;
|
|
||||||
virtual void onTrackMetadataChanged(const sdbus::ObjectPath& TrackId, const std::map<std::string, sdbus::Variant>& Metadata) = 0;
|
|
||||||
|
|
||||||
public:
|
|
||||||
std::vector<std::map<std::string, sdbus::Variant>> GetTracksMetadata(const std::vector<sdbus::ObjectPath>& TrackIds)
|
|
||||||
{
|
|
||||||
std::vector<std::map<std::string, sdbus::Variant>> result;
|
|
||||||
m_proxy.callMethod("GetTracksMetadata").onInterface(INTERFACE_NAME).withArguments(TrackIds).storeResultsTo(result);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void AddTrack(const std::string& Uri, const sdbus::ObjectPath& AfterTrack, const bool& SetAsCurrent)
|
|
||||||
{
|
|
||||||
m_proxy.callMethod("AddTrack").onInterface(INTERFACE_NAME).withArguments(Uri, AfterTrack, SetAsCurrent);
|
|
||||||
}
|
|
||||||
|
|
||||||
void RemoveTrack(const sdbus::ObjectPath& TrackId)
|
|
||||||
{
|
|
||||||
m_proxy.callMethod("RemoveTrack").onInterface(INTERFACE_NAME).withArguments(TrackId);
|
|
||||||
}
|
|
||||||
|
|
||||||
void GoTo(const sdbus::ObjectPath& TrackId)
|
|
||||||
{
|
|
||||||
m_proxy.callMethod("GoTo").onInterface(INTERFACE_NAME).withArguments(TrackId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
|
||||||
std::vector<sdbus::ObjectPath> Tracks()
|
|
||||||
{
|
|
||||||
return m_proxy.getProperty("Tracks").onInterface(INTERFACE_NAME).get<std::vector<sdbus::ObjectPath>>();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CanEditTracks()
|
|
||||||
{
|
|
||||||
return m_proxy.getProperty("CanEditTracks").onInterface(INTERFACE_NAME).get<bool>();
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
sdbus::IProxy& m_proxy;
|
|
||||||
};
|
|
||||||
|
|
||||||
}}} // namespaces
|
|
||||||
|
|
||||||
#endif
|
|
Loading…
Reference in a new issue