looper/assets/mpris_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

318 lines
8.7 KiB
C++

/*
* 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