aboutsummaryrefslogtreecommitdiffstats
path: root/src/sticker
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-01-28 19:33:56 +0100
committerMax Kellermann <max@duempel.org>2015-01-28 19:33:56 +0100
commit593bb5a8a7ba4c5a846a4443fe59ddeebdc45ced (patch)
treedb35a7f10c5f9f0e01f59d928dc02c1b72db58e0 /src/sticker
parent822ac7b100e6d0ed876ec8c6dea09f3ab0809655 (diff)
downloadmpd-593bb5a8a7ba4c5a846a4443fe59ddeebdc45ced.tar.gz
mpd-593bb5a8a7ba4c5a846a4443fe59ddeebdc45ced.tar.xz
mpd-593bb5a8a7ba4c5a846a4443fe59ddeebdc45ced.zip
StickerDatabase: convert the struct name to upper case
Diffstat (limited to 'src/sticker')
-rw-r--r--src/sticker/SongSticker.cxx2
-rw-r--r--src/sticker/SongSticker.hxx4
-rw-r--r--src/sticker/StickerDatabase.cxx14
-rw-r--r--src/sticker/StickerDatabase.hxx10
-rw-r--r--src/sticker/StickerPrint.cxx2
-rw-r--r--src/sticker/StickerPrint.hxx4
6 files changed, 18 insertions, 18 deletions
diff --git a/src/sticker/SongSticker.cxx b/src/sticker/SongSticker.cxx
index d6ade9800..b4ca6a398 100644
--- a/src/sticker/SongSticker.cxx
+++ b/src/sticker/SongSticker.cxx
@@ -60,7 +60,7 @@ sticker_song_delete_value(const LightSong &song, const char *name,
return sticker_delete_value("song", uri.c_str(), name, error);
}
-struct sticker *
+Sticker *
sticker_song_get(const LightSong &song, Error &error)
{
const auto uri = song.GetURI();
diff --git a/src/sticker/SongSticker.hxx b/src/sticker/SongSticker.hxx
index e175160ab..3eaa1d776 100644
--- a/src/sticker/SongSticker.hxx
+++ b/src/sticker/SongSticker.hxx
@@ -26,7 +26,7 @@
#include <string>
struct LightSong;
-struct sticker;
+struct Sticker;
class Database;
class Error;
@@ -67,7 +67,7 @@ sticker_song_delete_value(const LightSong &song, const char *name,
* @param song the song object
* @return a sticker object, or NULL on error or if there is no sticker
*/
-sticker *
+Sticker *
sticker_song_get(const LightSong &song, Error &error);
/**
diff --git a/src/sticker/StickerDatabase.cxx b/src/sticker/StickerDatabase.cxx
index 09feb71c9..02eed362e 100644
--- a/src/sticker/StickerDatabase.cxx
+++ b/src/sticker/StickerDatabase.cxx
@@ -31,7 +31,7 @@
#include <assert.h>
-struct sticker {
+struct Sticker {
std::map<std::string, std::string> table;
};
@@ -340,13 +340,13 @@ sticker_delete_value(const char *type, const char *uri, const char *name,
}
void
-sticker_free(struct sticker *sticker)
+sticker_free(Sticker *sticker)
{
delete sticker;
}
const char *
-sticker_get_value(const struct sticker &sticker, const char *name)
+sticker_get_value(const Sticker &sticker, const char *name)
{
auto i = sticker.table.find(name);
if (i == sticker.table.end())
@@ -356,7 +356,7 @@ sticker_get_value(const struct sticker &sticker, const char *name)
}
void
-sticker_foreach(const sticker &sticker,
+sticker_foreach(const Sticker &sticker,
void (*func)(const char *name, const char *value,
void *user_data),
void *user_data)
@@ -365,10 +365,10 @@ sticker_foreach(const sticker &sticker,
func(i.first.c_str(), i.second.c_str(), user_data);
}
-struct sticker *
+Sticker *
sticker_load(const char *type, const char *uri, Error &error)
{
- sticker s;
+ Sticker s;
if (!sticker_list_values(s.table, type, uri, error))
return nullptr;
@@ -377,7 +377,7 @@ sticker_load(const char *type, const char *uri, Error &error)
/* don't return empty sticker objects */
return nullptr;
- return new sticker(std::move(s));
+ return new Sticker(std::move(s));
}
static sqlite3_stmt *
diff --git a/src/sticker/StickerDatabase.hxx b/src/sticker/StickerDatabase.hxx
index 29314d024..d9a5ecf11 100644
--- a/src/sticker/StickerDatabase.hxx
+++ b/src/sticker/StickerDatabase.hxx
@@ -49,7 +49,7 @@
class Error;
class Path;
-struct sticker;
+struct Sticker;
/**
* Opens the sticker database.
@@ -111,7 +111,7 @@ sticker_delete_value(const char *type, const char *uri, const char *name,
* @param sticker the sticker object to be freed
*/
void
-sticker_free(sticker *sticker);
+sticker_free(Sticker *sticker);
/**
* Determines a single value in a sticker.
@@ -122,7 +122,7 @@ sticker_free(sticker *sticker);
*/
gcc_pure
const char *
-sticker_get_value(const sticker &sticker, const char *name);
+sticker_get_value(const Sticker &sticker, const char *name);
/**
* Iterates over all sticker items in a sticker.
@@ -132,7 +132,7 @@ sticker_get_value(const sticker &sticker, const char *name);
* @param user_data an opaque pointer for the callback function
*/
void
-sticker_foreach(const sticker &sticker,
+sticker_foreach(const Sticker &sticker,
void (*func)(const char *name, const char *value,
void *user_data),
void *user_data);
@@ -144,7 +144,7 @@ sticker_foreach(const sticker &sticker,
* @param uri the URI of the resource, e.g. the song path
* @return a sticker object, or nullptr on error or if there is no sticker
*/
-sticker *
+Sticker *
sticker_load(const char *type, const char *uri,
Error &error);
diff --git a/src/sticker/StickerPrint.cxx b/src/sticker/StickerPrint.cxx
index b5dde512e..1682abf77 100644
--- a/src/sticker/StickerPrint.cxx
+++ b/src/sticker/StickerPrint.cxx
@@ -38,7 +38,7 @@ print_sticker_cb(const char *name, const char *value, void *data)
}
void
-sticker_print(Client &client, const sticker &sticker)
+sticker_print(Client &client, const Sticker &sticker)
{
sticker_foreach(sticker, print_sticker_cb, &client);
}
diff --git a/src/sticker/StickerPrint.hxx b/src/sticker/StickerPrint.hxx
index c927567a7..53aaca8df 100644
--- a/src/sticker/StickerPrint.hxx
+++ b/src/sticker/StickerPrint.hxx
@@ -20,7 +20,7 @@
#ifndef MPD_STICKER_PRINT_HXX
#define MPD_STICKER_PRINT_HXX
-struct sticker;
+struct Sticker;
class Client;
/**
@@ -33,6 +33,6 @@ sticker_print_value(Client &client, const char *name, const char *value);
* Sends all sticker values to the client.
*/
void
-sticker_print(Client &client, const sticker &sticker);
+sticker_print(Client &client, const Sticker &sticker);
#endif