306 lines
8.2 KiB
C++
306 lines
8.2 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)
|
|
: proxy_(&proxy)
|
|
{
|
|
}
|
|
|
|
MediaPlayer2_proxy(const MediaPlayer2_proxy&) = delete;
|
|
MediaPlayer2_proxy& operator=(const MediaPlayer2_proxy&) = delete;
|
|
MediaPlayer2_proxy(MediaPlayer2_proxy&&) = default;
|
|
MediaPlayer2_proxy& operator=(MediaPlayer2_proxy&&) = default;
|
|
|
|
~MediaPlayer2_proxy() = default;
|
|
|
|
public:
|
|
void Raise()
|
|
{
|
|
proxy_->callMethod("Raise").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
void Quit()
|
|
{
|
|
proxy_->callMethod("Quit").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
public:
|
|
bool CanRaise()
|
|
{
|
|
return proxy_->getProperty("CanRaise").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
bool CanQuit()
|
|
{
|
|
return proxy_->getProperty("CanQuit").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
bool HasTrackList()
|
|
{
|
|
return proxy_->getProperty("HasTrackList").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
std::string Identity()
|
|
{
|
|
return proxy_->getProperty("Identity").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
std::vector<std::string> SupportedUriSchemes()
|
|
{
|
|
return proxy_->getProperty("SupportedUriSchemes").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
std::vector<std::string> SupportedMimeTypes()
|
|
{
|
|
return proxy_->getProperty("SupportedMimeTypes").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
private:
|
|
sdbus::IProxy* 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)
|
|
: proxy_(&proxy)
|
|
{
|
|
proxy_->uponSignal("Seeked").onInterface(INTERFACE_NAME).call([this](const int64_t& Position){ this->onSeeked(Position); });
|
|
}
|
|
|
|
Player_proxy(const Player_proxy&) = delete;
|
|
Player_proxy& operator=(const Player_proxy&) = delete;
|
|
Player_proxy(Player_proxy&&) = default;
|
|
Player_proxy& operator=(Player_proxy&&) = default;
|
|
|
|
~Player_proxy() = default;
|
|
|
|
virtual void onSeeked(const int64_t& Position) = 0;
|
|
|
|
public:
|
|
void Next()
|
|
{
|
|
proxy_->callMethod("Next").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
void Previous()
|
|
{
|
|
proxy_->callMethod("Previous").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
void Pause()
|
|
{
|
|
proxy_->callMethod("Pause").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
void PlayPause()
|
|
{
|
|
proxy_->callMethod("PlayPause").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
void Stop()
|
|
{
|
|
proxy_->callMethod("Stop").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
void Play()
|
|
{
|
|
proxy_->callMethod("Play").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
void Seek(const int64_t& Offset)
|
|
{
|
|
proxy_->callMethod("Seek").onInterface(INTERFACE_NAME).withArguments(Offset);
|
|
}
|
|
|
|
void SetPosition(const sdbus::ObjectPath& TrackId, const int64_t& Position)
|
|
{
|
|
proxy_->callMethod("SetPosition").onInterface(INTERFACE_NAME).withArguments(TrackId, Position);
|
|
}
|
|
|
|
void OpenUri(const std::string& Uri)
|
|
{
|
|
proxy_->callMethod("OpenUri").onInterface(INTERFACE_NAME).withArguments(Uri);
|
|
}
|
|
|
|
public:
|
|
std::string PlaybackStatus()
|
|
{
|
|
return proxy_->getProperty("PlaybackStatus").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
double Rate()
|
|
{
|
|
return proxy_->getProperty("Rate").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
void Rate(const double& value)
|
|
{
|
|
proxy_->setProperty("Rate").onInterface(INTERFACE_NAME).toValue(value);
|
|
}
|
|
|
|
std::map<std::string, sdbus::Variant> Metadata()
|
|
{
|
|
return proxy_->getProperty("Metadata").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
double Volume()
|
|
{
|
|
return proxy_->getProperty("Volume").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
void Volume(const double& value)
|
|
{
|
|
proxy_->setProperty("Volume").onInterface(INTERFACE_NAME).toValue(value);
|
|
}
|
|
|
|
int64_t Position()
|
|
{
|
|
return proxy_->getProperty("Position").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
double MinimumRate()
|
|
{
|
|
return proxy_->getProperty("MinimumRate").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
double MaximumRate()
|
|
{
|
|
return proxy_->getProperty("MaximumRate").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
bool CanGoNext()
|
|
{
|
|
return proxy_->getProperty("CanGoNext").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
bool CanGoPrevious()
|
|
{
|
|
return proxy_->getProperty("CanGoPrevious").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
bool CanPlay()
|
|
{
|
|
return proxy_->getProperty("CanPlay").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
bool CanPause()
|
|
{
|
|
return proxy_->getProperty("CanPause").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
bool CanSeek()
|
|
{
|
|
return proxy_->getProperty("CanSeek").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
bool CanControl()
|
|
{
|
|
return proxy_->getProperty("CanControl").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
private:
|
|
sdbus::IProxy* 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)
|
|
: proxy_(&proxy)
|
|
{
|
|
proxy_->uponSignal("TrackListReplaced").onInterface(INTERFACE_NAME).call([this](const std::vector<sdbus::ObjectPath>& Tracks, const sdbus::ObjectPath& CurrentTrack){ this->onTrackListReplaced(Tracks, CurrentTrack); });
|
|
proxy_->uponSignal("TrackAdded").onInterface(INTERFACE_NAME).call([this](const std::map<std::string, sdbus::Variant>& Metadata, const sdbus::ObjectPath& AfterTrack){ this->onTrackAdded(Metadata, AfterTrack); });
|
|
proxy_->uponSignal("TrackRemoved").onInterface(INTERFACE_NAME).call([this](const sdbus::ObjectPath& TrackId){ this->onTrackRemoved(TrackId); });
|
|
proxy_->uponSignal("TrackMetadataChanged").onInterface(INTERFACE_NAME).call([this](const sdbus::ObjectPath& TrackId, const std::map<std::string, sdbus::Variant>& Metadata){ this->onTrackMetadataChanged(TrackId, Metadata); });
|
|
}
|
|
|
|
TrackList_proxy(const TrackList_proxy&) = delete;
|
|
TrackList_proxy& operator=(const TrackList_proxy&) = delete;
|
|
TrackList_proxy(TrackList_proxy&&) = default;
|
|
TrackList_proxy& operator=(TrackList_proxy&&) = default;
|
|
|
|
~TrackList_proxy() = default;
|
|
|
|
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;
|
|
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)
|
|
{
|
|
proxy_->callMethod("AddTrack").onInterface(INTERFACE_NAME).withArguments(Uri, AfterTrack, SetAsCurrent);
|
|
}
|
|
|
|
void RemoveTrack(const sdbus::ObjectPath& TrackId)
|
|
{
|
|
proxy_->callMethod("RemoveTrack").onInterface(INTERFACE_NAME).withArguments(TrackId);
|
|
}
|
|
|
|
void GoTo(const sdbus::ObjectPath& TrackId)
|
|
{
|
|
proxy_->callMethod("GoTo").onInterface(INTERFACE_NAME).withArguments(TrackId);
|
|
}
|
|
|
|
public:
|
|
std::vector<sdbus::ObjectPath> Tracks()
|
|
{
|
|
return proxy_->getProperty("Tracks").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
bool CanEditTracks()
|
|
{
|
|
return proxy_->getProperty("CanEditTracks").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
private:
|
|
sdbus::IProxy* proxy_;
|
|
};
|
|
|
|
}}} // namespaces
|
|
|
|
#endif
|