Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
593bb5a8
Commit
593bb5a8
authored
Jan 28, 2015
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
StickerDatabase: convert the struct name to upper case
parent
822ac7b1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
19 deletions
+19
-19
StickerCommands.cxx
src/command/StickerCommands.cxx
+1
-1
SongSticker.cxx
src/sticker/SongSticker.cxx
+1
-1
SongSticker.hxx
src/sticker/SongSticker.hxx
+2
-2
StickerDatabase.cxx
src/sticker/StickerDatabase.cxx
+7
-7
StickerDatabase.hxx
src/sticker/StickerDatabase.hxx
+5
-5
StickerPrint.cxx
src/sticker/StickerPrint.cxx
+1
-1
StickerPrint.hxx
src/sticker/StickerPrint.hxx
+2
-2
No files found.
src/command/StickerCommands.cxx
View file @
593bb5a8
...
...
@@ -88,7 +88,7 @@ handle_sticker_song(Client &client, ConstBuffer<const char *> args)
if
(
song
==
nullptr
)
return
print_error
(
client
,
error
);
s
ticker
*
sticker
=
sticker_song_get
(
*
song
,
error
);
S
ticker
*
sticker
=
sticker_song_get
(
*
song
,
error
);
db
->
ReturnSong
(
song
);
if
(
sticker
)
{
sticker_print
(
client
,
*
sticker
);
...
...
src/sticker/SongSticker.cxx
View file @
593bb5a8
...
...
@@ -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
s
ticker
*
S
ticker
*
sticker_song_get
(
const
LightSong
&
song
,
Error
&
error
)
{
const
auto
uri
=
song
.
GetURI
();
...
...
src/sticker/SongSticker.hxx
View file @
593bb5a8
...
...
@@ -26,7 +26,7 @@
#include <string>
struct
LightSong
;
struct
s
ticker
;
struct
S
ticker
;
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
*/
s
ticker
*
S
ticker
*
sticker_song_get
(
const
LightSong
&
song
,
Error
&
error
);
/**
...
...
src/sticker/StickerDatabase.cxx
View file @
593bb5a8
...
...
@@ -31,7 +31,7 @@
#include <assert.h>
struct
s
ticker
{
struct
S
ticker
{
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
s
ticker
*
sticker
)
sticker_free
(
S
ticker
*
sticker
)
{
delete
sticker
;
}
const
char
*
sticker_get_value
(
const
struct
s
ticker
&
sticker
,
const
char
*
name
)
sticker_get_value
(
const
S
ticker
&
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
s
ticker
&
sticker
,
sticker_foreach
(
const
S
ticker
&
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
s
ticker
*
S
ticker
*
sticker_load
(
const
char
*
type
,
const
char
*
uri
,
Error
&
error
)
{
s
ticker
s
;
S
ticker
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
s
ticker
(
std
::
move
(
s
));
return
new
S
ticker
(
std
::
move
(
s
));
}
static
sqlite3_stmt
*
...
...
src/sticker/StickerDatabase.hxx
View file @
593bb5a8
...
...
@@ -49,7 +49,7 @@
class
Error
;
class
Path
;
struct
s
ticker
;
struct
S
ticker
;
/**
* 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
(
s
ticker
*
sticker
);
sticker_free
(
S
ticker
*
sticker
);
/**
* Determines a single value in a sticker.
...
...
@@ -122,7 +122,7 @@ sticker_free(sticker *sticker);
*/
gcc_pure
const
char
*
sticker_get_value
(
const
s
ticker
&
sticker
,
const
char
*
name
);
sticker_get_value
(
const
S
ticker
&
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
s
ticker
&
sticker
,
sticker_foreach
(
const
S
ticker
&
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
*/
s
ticker
*
S
ticker
*
sticker_load
(
const
char
*
type
,
const
char
*
uri
,
Error
&
error
);
...
...
src/sticker/StickerPrint.cxx
View file @
593bb5a8
...
...
@@ -38,7 +38,7 @@ print_sticker_cb(const char *name, const char *value, void *data)
}
void
sticker_print
(
Client
&
client
,
const
s
ticker
&
sticker
)
sticker_print
(
Client
&
client
,
const
S
ticker
&
sticker
)
{
sticker_foreach
(
sticker
,
print_sticker_cb
,
&
client
);
}
src/sticker/StickerPrint.hxx
View file @
593bb5a8
...
...
@@ -20,7 +20,7 @@
#ifndef MPD_STICKER_PRINT_HXX
#define MPD_STICKER_PRINT_HXX
struct
s
ticker
;
struct
S
ticker
;
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
s
ticker
&
sticker
);
sticker_print
(
Client
&
client
,
const
S
ticker
&
sticker
);
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment