MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- File List
- Globals

Functions
SongSticker.hxx File Reference
`#include "Match.hxx"`
`#include "Compiler.h"`
`#include <string>`
Include dependency graph for SongSticker.hxx:

Go to the source code of this file.

## Functions
gcc_pure std::string | sticker_song_get_value (const LightSong &song, const char *name)
| Returns one value from a song's sticker record. More...
void | sticker_song_set_value (const LightSong &song, const char *name, const char *value)
| Sets a sticker value in the specified song. More...
bool | sticker_song_delete (const char *uri)
| Deletes a sticker from the database. More...
bool | sticker_song_delete (const LightSong &song)
bool | sticker_song_delete_value (const LightSong &song, const char *name)
| Deletes a sticker value. More...
Sticker * | sticker_song_get (const LightSong &song)
| Loads the sticker for the specified song. More...
void | sticker_song_find (const Database &db, const char *base_uri, const char *name, StickerOperator op, const char *value, void(*func)(const LightSong &song, const char *value, void *user_data), void *user_data)
| Finds stickers with the specified name below the specified directory. More...

## Function Documentation

bool sticker_song_delete | ( | const char * | uri | ) |

Deletes a sticker from the database.

All values are deleted.

Throws SqliteError on error.

bool sticker_song_delete | ( | const LightSong & | song | ) |

bool sticker_song_delete_value | ( | const LightSong & | song,
|  | const char * | name
| ) |  |

Deletes a sticker value.

Does nothing if the sticker did not exist.

Throws SqliteError on error.

void sticker_song_find | ( | const Database & | db,
|  | const char * | base_uri,
|  | const char * | name,
|  | StickerOperator | op,
|  | const char * | value,
|  | void(*)(const LightSong &song, const char *value, void *user_data) | func,
|  | void * | user_data
| ) |  |

Finds stickers with the specified name below the specified directory.

Caller must lock the db_mutex.

Throws SqliteError on error.

Parameters

  base_uri | the base directory to search in
  name | the name of the sticker

Sticker* sticker_song_get | ( | const LightSong & | song | ) |

Loads the sticker for the specified song.

Throws SqliteError on error.

Parameters

  song | the song object

Returns
  a sticker object, or nullptr if there is no sticker

gcc_pure std::string sticker_song_get_value | ( | const LightSong & | song,
|  | const char * | name
| ) |  |

Returns one value from a song's sticker record.

Throws SqliteError on error.

void sticker_song_set_value | ( | const LightSong & | song,
|  | const char * | name,
|  | const char * | value
| ) |  |

Sets a sticker value in the specified song.

Overwrites existing values.

Throws SqliteError on error.