MPD  0.20.18
SongSticker.hxx
Go to the documentation of this file.
1 /*
2  * Copyright 2003-2017 The Music Player Daemon Project
3  * http://www.musicpd.org
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef MPD_SONG_STICKER_HXX
21 #define MPD_SONG_STICKER_HXX
22 
23 #include "Match.hxx"
24 
25 #include <string>
26 
27 struct LightSong;
28 struct Sticker;
29 class Database;
30 
36 std::string
37 sticker_song_get_value(const LightSong &song, const char *name);
38 
45 void
47  const char *name, const char *value);
48 
54 bool
55 sticker_song_delete(const char *uri);
56 
57 bool
58 sticker_song_delete(const LightSong &song);
59 
66 bool
67 sticker_song_delete_value(const LightSong &song, const char *name);
68 
77 Sticker *
78 sticker_song_get(const LightSong &song);
79 
91 void
92 sticker_song_find(const Database &db, const char *base_uri, const char *name,
93  StickerOperator op, const char *value,
94  void (*func)(const LightSong &song, const char *value,
95  void *user_data),
96  void *user_data);
97 
98 #endif
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.
Sticker * sticker_song_get(const LightSong &song)
Loads the sticker for the specified song.
StickerOperator
Definition: Match.hxx:23
bool sticker_song_delete_value(const LightSong &song, const char *name)
Deletes a sticker value.
std::string sticker_song_get_value(const LightSong &song, const char *name)
Returns one value from a song's sticker record.
void sticker_song_set_value(const LightSong &song, const char *name, const char *value)
Sets a sticker value in the specified song.
bool sticker_song_delete(const char *uri)
Deletes a sticker from the database.
const Storage const char * uri
A reference to a song file.
Definition: LightSong.hxx:40
const Partition const char * name
Definition: Count.hxx:34