MPD: DetachedSong Class Reference

MPD 0.20.18

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 noexcept
template<typename T >
void | SetURI (T &&_uri)
gcc_pure bool | HasRealURI () const noexcept
| Does this object have a "real" URI different from the displayed URI? More...
gcc_pure const char * | GetRealURI () const noexcept
| 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 noexcept
| Returns true if both objects refer to the same physical song. More...
gcc_pure gcc_nonnull_all bool | IsURI (const char *other_uri) const noexcept
gcc_pure bool | IsRemote () const noexcept
gcc_pure bool | IsFile () const noexcept
gcc_pure bool | IsAbsoluteFile () const noexcept
gcc_pure bool | IsInDatabase () const noexcept
const Tag & | GetTag () const noexcept
Tag & | WritableTag () noexcept
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 noexcept
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() [1/6]

DetachedSong::DetachedSong | ( | const DetachedSong & |  | ) |
| explicitdefault

## ◆ DetachedSong() [2/6]

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

Definition at line 84 of file DetachedSong.hxx.

## ◆ DetachedSong() [3/6]

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

Definition at line 87 of file DetachedSong.hxx.

## ◆ DetachedSong() [4/6]

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

Definition at line 90 of file DetachedSong.hxx.

## ◆ DetachedSong() [5/6]

template<typename U >

DetachedSong::DetachedSong | ( | U && | _uri,
|  | Tag && | _tag
| ) |  |
| inline

Definition at line 94 of file DetachedSong.hxx.

## ◆ DetachedSong() [6/6]

DetachedSong::DetachedSong | ( | DetachedSong && |  | ) |
| default

## ◆ ~DetachedSong()

DetachedSong::~DetachedSong | ( |  | ) |

## Member Function Documentation

## ◆ GetDuration()

gcc_pure SignedSongTime DetachedSong::GetDuration | ( |  | ) | const
| noexcept

## ◆ GetEndTime()

SongTime DetachedSong::GetEndTime | ( |  | ) | const
| inline

Definition at line 209 of file DetachedSong.hxx.

## ◆ GetLastModified()

time_t DetachedSong::GetLastModified | ( |  | ) | const
| inline

Definition at line 193 of file DetachedSong.hxx.

## ◆ GetRealURI()

gcc_pure const char* DetachedSong::GetRealURI | ( |  | ) | const
| inlinenoexcept

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

Definition at line 126 of file DetachedSong.hxx.

## ◆ GetStartTime()

SongTime DetachedSong::GetStartTime | ( |  | ) | const
| inline

Definition at line 201 of file DetachedSong.hxx.

## ◆ GetTag()

const Tag& DetachedSong::GetTag | ( |  | ) | const
| inlinenoexcept

Definition at line 165 of file DetachedSong.hxx.

## ◆ GetURI()

gcc_pure const char* DetachedSong::GetURI | ( |  | ) | const
| inlinenoexcept

Definition at line 103 of file DetachedSong.hxx.

## ◆ HasRealURI()

gcc_pure bool DetachedSong::HasRealURI | ( |  | ) | const
| inlinenoexcept

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

Definition at line 117 of file DetachedSong.hxx.

## ◆ IsAbsoluteFile()

gcc_pure bool DetachedSong::IsAbsoluteFile | ( |  | ) | const
| noexcept

## ◆ IsFile()

gcc_pure bool DetachedSong::IsFile | ( |  | ) | const
| inlinenoexcept

Definition at line 155 of file DetachedSong.hxx.

## ◆ IsInDatabase()

gcc_pure bool DetachedSong::IsInDatabase | ( |  | ) | const
| noexcept

## ◆ IsRemote()

gcc_pure bool DetachedSong::IsRemote | ( |  | ) | const
| noexcept

## ◆ IsSame()

gcc_pure bool DetachedSong::IsSame | ( | const DetachedSong & | other | ) | const
| inlinenoexcept

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

Definition at line 140 of file DetachedSong.hxx.

## ◆ IsURI()

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

Definition at line 147 of file DetachedSong.hxx.

## ◆ LoadFile()

bool DetachedSong::LoadFile | ( | Path | path | ) |

Load #tag and #mtime from a local file.

## ◆ MoveTagFrom()

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

Definition at line 181 of file DetachedSong.hxx.

## ◆ MoveTagItemsFrom()

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

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

Definition at line 189 of file DetachedSong.hxx.

## ◆ SetEndTime()

void DetachedSong::SetEndTime | ( | SongTime | _value | ) |
| inline

Definition at line 213 of file DetachedSong.hxx.

## ◆ SetLastModified()

void DetachedSong::SetLastModified | ( | time_t | _value | ) |
| inline

Definition at line 197 of file DetachedSong.hxx.

## ◆ SetRealURI()

template<typename T >

void DetachedSong::SetRealURI | ( | T && | _uri | ) |
| inline

Definition at line 131 of file DetachedSong.hxx.

## ◆ SetStartTime()

void DetachedSong::SetStartTime | ( | SongTime | _value | ) |
| inline

Definition at line 205 of file DetachedSong.hxx.

## ◆ SetTag() [1/2]

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

Definition at line 173 of file DetachedSong.hxx.

## ◆ SetTag() [2/2]

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

Definition at line 177 of file DetachedSong.hxx.

## ◆ SetURI()

template<typename T >

void DetachedSong::SetURI | ( | T && | _uri | ) |
| inline

Definition at line 108 of file DetachedSong.hxx.

## ◆ Update()

bool DetachedSong::Update | ( |  | ) |

Update the #tag and #mtime.

Returns
  true on success

## ◆ WritableTag()

Tag& DetachedSong::WritableTag | ( |  | ) |
| inlinenoexcept

Definition at line 169 of file DetachedSong.hxx.

## Friends And Related Function Documentation

## ◆ DatabaseDetachSong

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:

- DetachedSong.hxx