#include <stdbool.h>
#include <glib.h>
Go to the source code of this file.
Functions | |
char * | sticker_song_get_value (const struct song *song, const char *name) |
Returns one value from a song's sticker record. | |
bool | sticker_song_set_value (const struct song *song, const char *name, const char *value) |
Sets a sticker value in the specified song. | |
bool | sticker_song_delete (const struct song *song) |
Deletes a sticker from the database. | |
bool | sticker_song_delete_value (const struct song *song, const char *name) |
Deletes a sticker value. | |
struct sticker * | sticker_song_get (const struct song *song) |
Loads the sticker for the specified song. | |
bool | sticker_song_find (struct directory *directory, const char *name, void(*func)(struct song *song, const char *value, gpointer user_data), gpointer user_data) |
Finds stickers with the specified name below the specified directory. |
bool sticker_song_delete | ( | const struct song * | song | ) |
Deletes a sticker from the database.
All values are deleted.
bool sticker_song_delete_value | ( | const struct song * | song, | |
const char * | name | |||
) |
Deletes a sticker value.
Does nothing if the sticker did not exist.
bool sticker_song_find | ( | struct directory * | directory, | |
const char * | name, | |||
void(*)(struct song *song, const char *value, gpointer user_data) | func, | |||
gpointer | user_data | |||
) |
Finds stickers with the specified name below the specified directory.
directory | the base directory to search in | |
name | the name of the sticker |
struct sticker* sticker_song_get | ( | const struct song * | song | ) | [read] |
Loads the sticker for the specified song.
song | the song object |
char* sticker_song_get_value | ( | const struct song * | song, | |
const char * | name | |||
) |
Returns one value from a song's sticker record.
The caller must free the return value with g_free().
bool sticker_song_set_value | ( | const struct song * | song, | |
const char * | name, | |||
const char * | value | |||
) |
Sets a sticker value in the specified song.
Overwrites existing values.