MPD
0.20.6
|
#include <Interface.hxx>
Public Member Functions | |
Database (const DatabasePlugin &_plugin) | |
virtual | ~Database () |
Free instance data. More... | |
const DatabasePlugin & | GetPlugin () const |
bool | IsPlugin (const DatabasePlugin &other) const |
virtual void | Open () |
Open the database. More... | |
virtual void | Close () |
Close the database, free allocated memory. More... | |
virtual const LightSong * | GetSong (const char *uri_utf8) const =0 |
Look up a song (including tag data) in the database. More... | |
virtual void | ReturnSong (const LightSong *song) const =0 |
Mark the song object as "unused". More... | |
virtual void | Visit (const DatabaseSelection &selection, VisitDirectory visit_directory, VisitSong visit_song, VisitPlaylist visit_playlist) const =0 |
Visit the selected entities. More... | |
void | Visit (const DatabaseSelection &selection, VisitDirectory visit_directory, VisitSong visit_song) const |
void | Visit (const DatabaseSelection &selection, VisitSong visit_song) const |
virtual void | VisitUniqueTags (const DatabaseSelection &selection, TagType tag_type, tag_mask_t group_mask, VisitTag visit_tag) const =0 |
Visit all unique tag values. More... | |
virtual gcc_pure DatabaseStats | GetStats (const DatabaseSelection &selection) const =0 |
virtual unsigned | Update (gcc_unused const char *uri_utf8, gcc_unused bool discard) |
Update the database. More... | |
virtual gcc_pure time_t | GetUpdateStamp () const =0 |
Returns the time stamp of the last database update. More... | |
Definition at line 35 of file Interface.hxx.
|
inline |
Definition at line 39 of file Interface.hxx.
|
inlinevirtual |
Free instance data.
Definition at line 45 of file Interface.hxx.
|
inlinevirtual |
Close the database, free allocated memory.
Reimplemented in SimpleDatabase.
Definition at line 66 of file Interface.hxx.
|
inline |
Definition at line 47 of file Interface.hxx.
|
pure virtual |
Look up a song (including tag data) in the database.
When you don't need this anymore, call ReturnSong().
uri_utf8 | the URI of the song within the music directory (UTF-8) |
Implemented in SimpleDatabase.
|
pure virtual |
Implemented in SimpleDatabase.
|
pure virtual |
Returns the time stamp of the last database update.
Returns 0 if that is not not known/available.
Implemented in SimpleDatabase.
|
inline |
Definition at line 51 of file Interface.hxx.
|
inlinevirtual |
Open the database.
Read it into memory if applicable.
Throws DatabaseError or std::runtime_error on error.
Reimplemented in SimpleDatabase.
Definition at line 60 of file Interface.hxx.
|
pure virtual |
Mark the song object as "unused".
Call this on objects returned by GetSong().
Implemented in SimpleDatabase.
|
inlinevirtual |
Update the database.
Throws #std::runtime_error on error.
Definition at line 119 of file Interface.hxx.
|
pure virtual |
Visit the selected entities.
Implemented in SimpleDatabase.
|
inline |
Definition at line 91 of file Interface.hxx.
|
inline |
Definition at line 97 of file Interface.hxx.
|
pure virtual |
Visit all unique tag values.
Implemented in SimpleDatabase.