MPD  0.20.6
Public Member Functions | Friends
DetachedSong Class Reference

#include <DetachedSong.hxx>

Public Member Functions

 DetachedSong (const DetachedSong &)=default
 
 DetachedSong (const char *_uri)
 
 DetachedSong (const std::string &_uri)
 
 DetachedSong (std::string &&_uri)
 
template<typename U >
 DetachedSong (U &&_uri, Tag &&_tag)
 
 DetachedSong (DetachedSong &&)=default
 
 ~DetachedSong ()
 
gcc_pure const char * GetURI () const
 
template<typename T >
void SetURI (T &&_uri)
 
gcc_pure bool HasRealURI () const
 Does this object have a "real" URI different from the displayed URI? More...
 
gcc_pure const char * GetRealURI () const
 Returns "real" URI (#real_uri) and falls back to just GetURI(). More...
 
template<typename T >
void SetRealURI (T &&_uri)
 
gcc_pure bool IsSame (const DetachedSong &other) const
 Returns true if both objects refer to the same physical song. More...
 
gcc_pure gcc_nonnull_all bool IsURI (const char *other_uri) const
 
gcc_pure bool IsRemote () const
 
gcc_pure bool IsFile () const
 
gcc_pure bool IsAbsoluteFile () const
 
gcc_pure bool IsInDatabase () const
 
const TagGetTag () const
 
TagWritableTag ()
 
void SetTag (const Tag &_tag)
 
void SetTag (Tag &&_tag)
 
void MoveTagFrom (DetachedSong &&other)
 
void MoveTagItemsFrom (DetachedSong &&other)
 Similar to the MoveTagFrom(), but move only the TagItem array. More...
 
time_t GetLastModified () const
 
void SetLastModified (time_t _value)
 
SongTime GetStartTime () const
 
void SetStartTime (SongTime _value)
 
SongTime GetEndTime () const
 
void SetEndTime (SongTime _value)
 
gcc_pure SignedSongTime GetDuration () const
 
bool Update ()
 Update the #tag and #mtime. More...
 
bool LoadFile (Path path)
 Load #tag and #mtime from a local file. More...
 

Friends

DetachedSong DatabaseDetachSong (const Storage &db, const LightSong &song)
 "Detach" the Song object, i.e. More...
 

Detailed Description

Definition at line 37 of file DetachedSong.hxx.

Constructor & Destructor Documentation

DetachedSong::DetachedSong ( const DetachedSong )
explicitdefault
DetachedSong::DetachedSong ( const char *  _uri)
inlineexplicit

Definition at line 84 of file DetachedSong.hxx.

DetachedSong::DetachedSong ( const std::string &  _uri)
inlineexplicit

Definition at line 87 of file DetachedSong.hxx.

DetachedSong::DetachedSong ( std::string &&  _uri)
inlineexplicit

Definition at line 90 of file DetachedSong.hxx.

template<typename U >
DetachedSong::DetachedSong ( U &&  _uri,
Tag &&  _tag 
)
inline

Definition at line 94 of file DetachedSong.hxx.

DetachedSong::DetachedSong ( DetachedSong &&  )
default
DetachedSong::~DetachedSong ( )

Member Function Documentation

gcc_pure SignedSongTime DetachedSong::GetDuration ( ) const
SongTime DetachedSong::GetEndTime ( ) const
inline

Definition at line 209 of file DetachedSong.hxx.

time_t DetachedSong::GetLastModified ( ) const
inline

Definition at line 193 of file DetachedSong.hxx.

gcc_pure const char* DetachedSong::GetRealURI ( ) const
inline

Returns "real" URI (#real_uri) and falls back to just GetURI().

Definition at line 126 of file DetachedSong.hxx.

SongTime DetachedSong::GetStartTime ( ) const
inline

Definition at line 201 of file DetachedSong.hxx.

const Tag& DetachedSong::GetTag ( ) const
inline

Definition at line 165 of file DetachedSong.hxx.

gcc_pure const char* DetachedSong::GetURI ( ) const
inline

Definition at line 103 of file DetachedSong.hxx.

gcc_pure bool DetachedSong::HasRealURI ( ) const
inline

Does this object have a "real" URI different from the displayed URI?

Definition at line 117 of file DetachedSong.hxx.

gcc_pure bool DetachedSong::IsAbsoluteFile ( ) const
gcc_pure bool DetachedSong::IsFile ( ) const
inline

Definition at line 155 of file DetachedSong.hxx.

gcc_pure bool DetachedSong::IsInDatabase ( ) const
gcc_pure bool DetachedSong::IsRemote ( ) const
gcc_pure bool DetachedSong::IsSame ( const DetachedSong other) const
inline

Returns true if both objects refer to the same physical song.

Definition at line 140 of file DetachedSong.hxx.

gcc_pure gcc_nonnull_all bool DetachedSong::IsURI ( const char *  other_uri) const
inline

Definition at line 147 of file DetachedSong.hxx.

bool DetachedSong::LoadFile ( Path  path)

Load #tag and #mtime from a local file.

void DetachedSong::MoveTagFrom ( DetachedSong &&  other)
inline

Definition at line 181 of file DetachedSong.hxx.

void DetachedSong::MoveTagItemsFrom ( DetachedSong &&  other)
inline

Similar to the MoveTagFrom(), but move only the TagItem array.

Definition at line 189 of file DetachedSong.hxx.

void DetachedSong::SetEndTime ( SongTime  _value)
inline

Definition at line 213 of file DetachedSong.hxx.

void DetachedSong::SetLastModified ( time_t  _value)
inline

Definition at line 197 of file DetachedSong.hxx.

template<typename T >
void DetachedSong::SetRealURI ( T &&  _uri)
inline

Definition at line 131 of file DetachedSong.hxx.

void DetachedSong::SetStartTime ( SongTime  _value)
inline

Definition at line 205 of file DetachedSong.hxx.

void DetachedSong::SetTag ( const Tag _tag)
inline

Definition at line 173 of file DetachedSong.hxx.

void DetachedSong::SetTag ( Tag &&  _tag)
inline

Definition at line 177 of file DetachedSong.hxx.

template<typename T >
void DetachedSong::SetURI ( T &&  _uri)
inline

Definition at line 108 of file DetachedSong.hxx.

bool DetachedSong::Update ( )

Update the #tag and #mtime.

Returns
true on success
Tag& DetachedSong::WritableTag ( )
inline

Definition at line 169 of file DetachedSong.hxx.

Friends And Related Function Documentation

DetachedSong DatabaseDetachSong ( const Storage db,
const LightSong song 
)
friend

"Detach" the Song object, i.e.

convert it to a DetachedSong instance.


The documentation for this class was generated from the following file: