/* * 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 #include #include 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 CanQuit() { return m_proxy.getProperty("CanQuit").onInterface(INTERFACE_NAME).get(); } bool HasTrackList() { return m_proxy.getProperty("HasTrackList").onInterface(INTERFACE_NAME).get(); } std::string Identity() { return m_proxy.getProperty("Identity").onInterface(INTERFACE_NAME).get(); } std::vector SupportedUriSchemes() { return m_proxy.getProperty("SupportedUriSchemes").onInterface(INTERFACE_NAME).get>(); } std::vector SupportedMimeTypes() { return m_proxy.getProperty("SupportedMimeTypes").onInterface(INTERFACE_NAME).get>(); } 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(); } double Rate() { return m_proxy.getProperty("Rate").onInterface(INTERFACE_NAME).get(); } void Rate(const double& value) { m_proxy.setProperty("Rate").onInterface(INTERFACE_NAME).toValue(value); } std::map Metadata() { return m_proxy.getProperty("Metadata").onInterface(INTERFACE_NAME).get>(); } double Volume() { return m_proxy.getProperty("Volume").onInterface(INTERFACE_NAME).get(); } 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(); } double MinimumRate() { return m_proxy.getProperty("MinimumRate").onInterface(INTERFACE_NAME).get(); } double MaximumRate() { return m_proxy.getProperty("MaximumRate").onInterface(INTERFACE_NAME).get(); } bool CanGoNext() { return m_proxy.getProperty("CanGoNext").onInterface(INTERFACE_NAME).get(); } bool CanGoPrevious() { return m_proxy.getProperty("CanGoPrevious").onInterface(INTERFACE_NAME).get(); } bool CanPlay() { return m_proxy.getProperty("CanPlay").onInterface(INTERFACE_NAME).get(); } bool CanPause() { return m_proxy.getProperty("CanPause").onInterface(INTERFACE_NAME).get(); } bool CanSeek() { return m_proxy.getProperty("CanSeek").onInterface(INTERFACE_NAME).get(); } bool CanControl() { return m_proxy.getProperty("CanControl").onInterface(INTERFACE_NAME).get(); } 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& Tracks, const sdbus::ObjectPath& CurrentTrack){ this->onTrackListReplaced(Tracks, CurrentTrack); }); m_proxy.uponSignal("TrackAdded").onInterface(INTERFACE_NAME).call([this](const std::map& 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& Metadata){ this->onTrackMetadataChanged(TrackId, Metadata); }); } virtual void onTrackListReplaced(const std::vector& Tracks, const sdbus::ObjectPath& CurrentTrack) = 0; virtual void onTrackAdded(const std::map& Metadata, const sdbus::ObjectPath& AfterTrack) = 0; virtual void onTrackRemoved(const sdbus::ObjectPath& TrackId) = 0; virtual void onTrackMetadataChanged(const sdbus::ObjectPath& TrackId, const std::map& Metadata) = 0; public: std::vector> GetTracksMetadata(const std::vector& TrackIds) { std::vector> 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 Tracks() { return m_proxy.getProperty("Tracks").onInterface(INTERFACE_NAME).get>(); } bool CanEditTracks() { return m_proxy.getProperty("CanEditTracks").onInterface(INTERFACE_NAME).get(); } private: sdbus::IProxy& m_proxy; }; }}} // namespaces #endif