#include <SimpleDatabasePlugin.hxx>
|
gcc_pure Directory & | GetRoot () noexcept |
|
void | Save () |
|
bool | FileExists () const |
| Returns true if there is a valid database file on the disk. More...
|
|
gcc_nonnull_all void | Mount (const char *uri, Database *db) |
|
gcc_nonnull_all void | Mount (const char *local_uri, const char *storage_uri) |
| Throws #std::runtime_error on error. More...
|
|
gcc_nonnull_all bool | Unmount (const char *uri) |
|
void | Open () override |
| Open the database. More...
|
|
void | Close () override |
| Close the database, free allocated memory. More...
|
|
const LightSong * | GetSong (const char *uri_utf8) const override |
| Look up a song (including tag data) in the database. More...
|
|
void | ReturnSong (const LightSong *song) const override |
| Mark the song object as "unused". More...
|
|
void | Visit (const DatabaseSelection &selection, VisitDirectory visit_directory, VisitSong visit_song, VisitPlaylist visit_playlist) const override |
| Visit the selected entities. More...
|
|
void | VisitUniqueTags (const DatabaseSelection &selection, TagType tag_type, tag_mask_t group_mask, VisitTag visit_tag) const override |
| Visit all unique tag values. More...
|
|
DatabaseStats | GetStats (const DatabaseSelection &selection) const override |
|
time_t | GetUpdateStamp () const noexcept override |
| Returns the time stamp of the last database update. More...
|
|
| Database (const DatabasePlugin &_plugin) |
|
virtual | ~Database () |
| Free instance data. More...
|
|
const DatabasePlugin & | GetPlugin () const |
|
bool | IsPlugin (const DatabasePlugin &other) const |
|
void | Visit (const DatabaseSelection &selection, VisitDirectory visit_directory, VisitSong visit_song) const |
|
void | Visit (const DatabaseSelection &selection, VisitSong visit_song) const |
|
virtual unsigned | Update (gcc_unused const char *uri_utf8, gcc_unused bool discard) |
| Update the database. More...
|
|
Definition at line 38 of file SimpleDatabasePlugin.hxx.
◆ Close()
void SimpleDatabase::Close |
( |
| ) |
|
|
overridevirtual |
Close the database, free allocated memory.
Reimplemented from Database.
◆ Create()
◆ FileExists()
bool SimpleDatabase::FileExists |
( |
| ) |
const |
|
inline |
◆ GetRoot()
◆ GetSong()
const LightSong* SimpleDatabase::GetSong |
( |
const char * |
uri_utf8 | ) |
const |
|
overridevirtual |
Look up a song (including tag data) in the database.
When you don't need this anymore, call ReturnSong().
- Parameters
-
uri_utf8 | the URI of the song within the music directory (UTF-8) |
Implements Database.
◆ GetStats()
◆ GetUpdateStamp()
time_t SimpleDatabase::GetUpdateStamp |
( |
| ) |
const |
|
inlineoverridevirtualnoexcept |
Returns the time stamp of the last database update.
Returns 0 if that is not not known/available.
Implements Database.
Definition at line 128 of file SimpleDatabasePlugin.hxx.
◆ Mount() [1/2]
- Parameters
-
db | the Database to be mounted; must be "open"; on success, this object gains ownership of the given Database |
◆ Mount() [2/2]
gcc_nonnull_all void SimpleDatabase::Mount |
( |
const char * |
local_uri, |
|
|
const char * |
storage_uri |
|
) |
| |
Throws #std::runtime_error on error.
◆ Open()
void SimpleDatabase::Open |
( |
| ) |
|
|
overridevirtual |
Open the database.
Read it into memory if applicable.
Throws DatabaseError or std::runtime_error on error.
Reimplemented from Database.
◆ ReturnSong()
void SimpleDatabase::ReturnSong |
( |
const LightSong * |
song | ) |
const |
|
overridevirtual |
Mark the song object as "unused".
Call this on objects returned by GetSong().
Implements Database.
◆ Save()
void SimpleDatabase::Save |
( |
| ) |
|
◆ Unmount()
◆ Visit()
Visit the selected entities.
Implements Database.
◆ VisitUniqueTags()
Visit all unique tag values.
Implements Database.
The documentation for this class was generated from the following file: