/* * 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 #include #include 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 SupportedUriSchemes() = 0; virtual std::vector 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("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 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& 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, sdbus::ObjectPath>("Tracks", "CurrentTrack") , sdbus::registerSignal("TrackAdded").withParameters, sdbus::ObjectPath>("Metadata", "AfterTrack") , sdbus::registerSignal("TrackRemoved").withParameters("TrackId") , sdbus::registerSignal("TrackMetadataChanged").withParameters>("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& Tracks, const sdbus::ObjectPath& CurrentTrack) { m_object.emitSignal("TrackListReplaced").onInterface(INTERFACE_NAME).withArguments(Tracks, CurrentTrack); } void emitTrackAdded(const std::map& 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& Metadata) { m_object.emitSignal("TrackMetadataChanged").onInterface(INTERFACE_NAME).withArguments(TrackId, Metadata); } private: virtual std::vector> GetTracksMetadata(const std::vector& 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 Tracks() = 0; virtual bool CanEditTracks() = 0; private: sdbus::IObject& m_object; }; }}} // namespaces #endif