2024-04-09 10:15:05 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 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)
|
2024-12-11 10:01:40 -08:00
|
|
|
: m_proxy(proxy)
|
2024-04-09 10:15:05 -07:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
MediaPlayer2_proxy(const MediaPlayer2_proxy&) = delete;
|
|
|
|
MediaPlayer2_proxy& operator=(const MediaPlayer2_proxy&) = delete;
|
2024-12-11 10:01:40 -08:00
|
|
|
MediaPlayer2_proxy(MediaPlayer2_proxy&&) = delete;
|
|
|
|
MediaPlayer2_proxy& operator=(MediaPlayer2_proxy&&) = delete;
|
2024-04-09 10:15:05 -07:00
|
|
|
|
|
|
|
~MediaPlayer2_proxy() = default;
|
|
|
|
|
2024-12-11 10:01:40 -08:00
|
|
|
void registerProxy()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2024-04-09 10:15:05 -07:00
|
|
|
public:
|
|
|
|
void Raise()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
m_proxy.callMethod("Raise").onInterface(INTERFACE_NAME);
|
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
|
|
|
}
|
|
|
|
|
|
|
|
public:
|
|
|
|
bool CanRaise()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
return m_proxy.getProperty("CanRaise").onInterface(INTERFACE_NAME).get<bool>();
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
bool CanQuit()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
return m_proxy.getProperty("CanQuit").onInterface(INTERFACE_NAME).get<bool>();
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
bool HasTrackList()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
return m_proxy.getProperty("HasTrackList").onInterface(INTERFACE_NAME).get<bool>();
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
std::string Identity()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
return m_proxy.getProperty("Identity").onInterface(INTERFACE_NAME).get<std::string>();
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
std::vector<std::string> SupportedUriSchemes()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
return m_proxy.getProperty("SupportedUriSchemes").onInterface(INTERFACE_NAME).get<std::vector<std::string>>();
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
std::vector<std::string> SupportedMimeTypes()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
return m_proxy.getProperty("SupportedMimeTypes").onInterface(INTERFACE_NAME).get<std::vector<std::string>>();
|
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 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)
|
2024-12-11 10:01:40 -08:00
|
|
|
: m_proxy(proxy)
|
2024-04-09 10:15:05 -07:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
Player_proxy(const Player_proxy&) = delete;
|
|
|
|
Player_proxy& operator=(const Player_proxy&) = delete;
|
2024-12-11 10:01:40 -08:00
|
|
|
Player_proxy(Player_proxy&&) = delete;
|
|
|
|
Player_proxy& operator=(Player_proxy&&) = delete;
|
2024-04-09 10:15:05 -07:00
|
|
|
|
|
|
|
~Player_proxy() = default;
|
|
|
|
|
2024-12-11 10:01:40 -08:00
|
|
|
void registerProxy()
|
|
|
|
{
|
|
|
|
m_proxy.uponSignal("Seeked").onInterface(INTERFACE_NAME).call([this](const int64_t& Position){ this->onSeeked(Position); });
|
|
|
|
}
|
|
|
|
|
2024-04-09 10:15:05 -07:00
|
|
|
virtual void onSeeked(const int64_t& Position) = 0;
|
|
|
|
|
|
|
|
public:
|
|
|
|
void Next()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
m_proxy.callMethod("Next").onInterface(INTERFACE_NAME);
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void Previous()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
m_proxy.callMethod("Previous").onInterface(INTERFACE_NAME);
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void Pause()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
m_proxy.callMethod("Pause").onInterface(INTERFACE_NAME);
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void PlayPause()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
m_proxy.callMethod("PlayPause").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 Play()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
m_proxy.callMethod("Play").onInterface(INTERFACE_NAME);
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void Seek(const int64_t& Offset)
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
m_proxy.callMethod("Seek").onInterface(INTERFACE_NAME).withArguments(Offset);
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void SetPosition(const sdbus::ObjectPath& TrackId, const int64_t& Position)
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
m_proxy.callMethod("SetPosition").onInterface(INTERFACE_NAME).withArguments(TrackId, Position);
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void OpenUri(const std::string& Uri)
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
m_proxy.callMethod("OpenUri").onInterface(INTERFACE_NAME).withArguments(Uri);
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
public:
|
|
|
|
std::string PlaybackStatus()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
return m_proxy.getProperty("PlaybackStatus").onInterface(INTERFACE_NAME).get<std::string>();
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
double Rate()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
return m_proxy.getProperty("Rate").onInterface(INTERFACE_NAME).get<double>();
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void Rate(const double& value)
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
m_proxy.setProperty("Rate").onInterface(INTERFACE_NAME).toValue(value);
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
std::map<std::string, sdbus::Variant> Metadata()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
return m_proxy.getProperty("Metadata").onInterface(INTERFACE_NAME).get<std::map<std::string, sdbus::Variant>>();
|
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
|
|
|
}
|
|
|
|
|
|
|
|
int64_t Position()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
return m_proxy.getProperty("Position").onInterface(INTERFACE_NAME).get<int64_t>();
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
double MinimumRate()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
return m_proxy.getProperty("MinimumRate").onInterface(INTERFACE_NAME).get<double>();
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
double MaximumRate()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
return m_proxy.getProperty("MaximumRate").onInterface(INTERFACE_NAME).get<double>();
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
bool CanGoNext()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
return m_proxy.getProperty("CanGoNext").onInterface(INTERFACE_NAME).get<bool>();
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
bool CanGoPrevious()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
return m_proxy.getProperty("CanGoPrevious").onInterface(INTERFACE_NAME).get<bool>();
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
bool CanPlay()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
return m_proxy.getProperty("CanPlay").onInterface(INTERFACE_NAME).get<bool>();
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
bool CanPause()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
return m_proxy.getProperty("CanPause").onInterface(INTERFACE_NAME).get<bool>();
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
bool CanSeek()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
return m_proxy.getProperty("CanSeek").onInterface(INTERFACE_NAME).get<bool>();
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
bool CanControl()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
return m_proxy.getProperty("CanControl").onInterface(INTERFACE_NAME).get<bool>();
|
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 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)
|
2024-12-11 10:01:40 -08:00
|
|
|
: m_proxy(proxy)
|
2024-04-09 10:15:05 -07:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
TrackList_proxy(const TrackList_proxy&) = delete;
|
|
|
|
TrackList_proxy& operator=(const TrackList_proxy&) = delete;
|
2024-12-11 10:01:40 -08:00
|
|
|
TrackList_proxy(TrackList_proxy&&) = delete;
|
|
|
|
TrackList_proxy& operator=(TrackList_proxy&&) = delete;
|
2024-04-09 10:15:05 -07:00
|
|
|
|
|
|
|
~TrackList_proxy() = default;
|
|
|
|
|
2024-12-11 10:01:40 -08:00
|
|
|
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); });
|
|
|
|
}
|
|
|
|
|
2024-04-09 10:15:05 -07:00
|
|
|
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;
|
2024-12-11 10:01:40 -08:00
|
|
|
m_proxy.callMethod("GetTracksMetadata").onInterface(INTERFACE_NAME).withArguments(TrackIds).storeResultsTo(result);
|
2024-04-09 10:15:05 -07:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
void AddTrack(const std::string& Uri, const sdbus::ObjectPath& AfterTrack, const bool& SetAsCurrent)
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
m_proxy.callMethod("AddTrack").onInterface(INTERFACE_NAME).withArguments(Uri, AfterTrack, SetAsCurrent);
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void RemoveTrack(const sdbus::ObjectPath& TrackId)
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
m_proxy.callMethod("RemoveTrack").onInterface(INTERFACE_NAME).withArguments(TrackId);
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void GoTo(const sdbus::ObjectPath& TrackId)
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
m_proxy.callMethod("GoTo").onInterface(INTERFACE_NAME).withArguments(TrackId);
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
public:
|
|
|
|
std::vector<sdbus::ObjectPath> Tracks()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
return m_proxy.getProperty("Tracks").onInterface(INTERFACE_NAME).get<std::vector<sdbus::ObjectPath>>();
|
2024-04-09 10:15:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
bool CanEditTracks()
|
|
|
|
{
|
2024-12-11 10:01:40 -08:00
|
|
|
return m_proxy.getProperty("CanEditTracks").onInterface(INTERFACE_NAME).get<bool>();
|
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
|
|
|
|
|
|
|
|
#endif
|