|
MPD
0.20.18
|
Go to the source code of this file.
Functions | |
| void | sticker_global_init (Path path) |
| Opens the sticker database. More... | |
| void | sticker_global_finish () |
| Close the sticker database. More... | |
| gcc_const bool | sticker_enabled () noexcept |
| Returns true if the sticker database is configured and available. More... | |
| std::string | sticker_load_value (const char *type, const char *uri, const char *name) |
| Returns one value from an object's sticker record. More... | |
| void | sticker_store_value (const char *type, const char *uri, const char *name, const char *value) |
| Sets a sticker value in the specified object. More... | |
| bool | sticker_delete (const char *type, const char *uri) |
| Deletes a sticker from the database. More... | |
| bool | sticker_delete_value (const char *type, const char *uri, const char *name) |
| Deletes a sticker value. More... | |
| void | sticker_free (Sticker *sticker) |
| Frees resources held by the sticker object. More... | |
| gcc_pure const char * | sticker_get_value (const Sticker &sticker, const char *name) noexcept |
| Determines a single value in a sticker. More... | |
| void | sticker_foreach (const Sticker &sticker, void(*func)(const char *name, const char *value, void *user_data), void *user_data) |
| Iterates over all sticker items in a sticker. More... | |
| Sticker * | sticker_load (const char *type, const char *uri) |
| Loads the sticker for the specified resource. More... | |
| void | sticker_find (const char *type, const char *base_uri, const char *name, StickerOperator op, const char *value, void(*func)(const char *uri, const char *value, void *user_data), void *user_data) |
| Finds stickers with the specified name below the specified URI. More... | |
| bool sticker_delete | ( | const char * | type, |
| const char * | uri | ||
| ) |
Deletes a sticker from the database.
All sticker values of the specified object are deleted.
Throws SqliteError on error.
| bool sticker_delete_value | ( | const char * | type, |
| const char * | uri, | ||
| const char * | name | ||
| ) |
|
noexcept |
Returns true if the sticker database is configured and available.
| void sticker_find | ( | const char * | type, |
| const char * | base_uri, | ||
| const char * | name, | ||
| StickerOperator | op, | ||
| const char * | value, | ||
| void(*)(const char *uri, const char *value, void *user_data) | func, | ||
| void * | user_data | ||
| ) |
Finds stickers with the specified name below the specified URI.
| type | the resource type, e.g. "song" |
| base_uri | the URI prefix of the resources, or nullptr if all resources should be searched |
| name | the name of the sticker |
| op | the comparison operator |
| value | the operand |
| void sticker_foreach | ( | const Sticker & | sticker, |
| void(*)(const char *name, const char *value, void *user_data) | func, | ||
| void * | user_data | ||
| ) |
Iterates over all sticker items in a sticker.
| sticker | the sticker object |
| func | a callback function |
| user_data | an opaque pointer for the callback function |
| void sticker_free | ( | Sticker * | sticker | ) |
Frees resources held by the sticker object.
| sticker | the sticker object to be freed |
|
noexcept |
Determines a single value in a sticker.
| sticker | the sticker object |
| name | the name of the sticker |
| void sticker_global_finish | ( | ) |
Close the sticker database.
| void sticker_global_init | ( | Path | path | ) |
Opens the sticker database.
Throws std::runtime_error on error.
| Sticker* sticker_load | ( | const char * | type, |
| const char * | uri | ||
| ) |
Loads the sticker for the specified resource.
Throws SqliteError on error.
| type | the resource type, e.g. "song" |
| uri | the URI of the resource, e.g. the song path |
| std::string sticker_load_value | ( | const char * | type, |
| const char * | uri, | ||
| const char * | name | ||
| ) |
Returns one value from an object's sticker record.
Returns an empty string if the value doesn't exist.
Throws SqliteError on error.
| void sticker_store_value | ( | const char * | type, |
| const char * | uri, | ||
| const char * | name, | ||
| const char * | value | ||
| ) |
Sets a sticker value in the specified object.
Overwrites existing values.
Throws SqliteError on error.
1.8.14