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
9c637df7
Commit
9c637df7
authored
Feb 04, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SongSticker: add Database reference parameter
parent
29072797
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
8 deletions
+5
-8
StickerCommands.cxx
src/command/StickerCommands.cxx
+1
-1
SongSticker.cxx
src/sticker/SongSticker.cxx
+2
-5
SongSticker.hxx
src/sticker/SongSticker.hxx
+2
-2
No files found.
src/command/StickerCommands.cxx
View file @
9c637df7
...
...
@@ -133,7 +133,7 @@ handle_sticker_song(Client &client, int argc, char *argv[])
argv
[
4
],
};
success
=
sticker_song_find
(
base_uri
,
data
.
name
,
success
=
sticker_song_find
(
*
db
,
base_uri
,
data
.
name
,
sticker_song_find_print_cb
,
&
data
);
if
(
!
success
)
{
command_error
(
client
,
ACK_ERROR_SYSTEM
,
...
...
src/sticker/SongSticker.cxx
View file @
9c637df7
...
...
@@ -21,7 +21,6 @@
#include "SongSticker.hxx"
#include "StickerDatabase.hxx"
#include "db/LightSong.hxx"
#include "db/DatabaseGlue.hxx"
#include "db/DatabasePlugin.hxx"
#include "util/Error.hxx"
...
...
@@ -95,15 +94,13 @@ sticker_song_find_cb(const char *uri, const char *value, void *user_data)
}
bool
sticker_song_find
(
const
char
*
base_uri
,
const
char
*
name
,
sticker_song_find
(
const
Database
&
db
,
const
char
*
base_uri
,
const
char
*
name
,
void
(
*
func
)(
const
LightSong
&
song
,
const
char
*
value
,
void
*
user_data
),
void
*
user_data
)
{
struct
sticker_song_find_data
data
;
data
.
db
=
GetDatabase
();
assert
(
data
.
db
!=
nullptr
);
data
.
db
=
&
db
;
data
.
func
=
func
;
data
.
user_data
=
user_data
;
...
...
src/sticker/SongSticker.hxx
View file @
9c637df7
...
...
@@ -25,8 +25,8 @@
#include <string>
struct
LightSong
;
struct
Directory
;
struct
sticker
;
class
Database
;
/**
* Returns one value from a song's sticker record. The caller must
...
...
@@ -78,7 +78,7 @@ sticker_song_get(const LightSong &song);
* failure
*/
bool
sticker_song_find
(
const
char
*
base_uri
,
const
char
*
name
,
sticker_song_find
(
const
Database
&
db
,
const
char
*
base_uri
,
const
char
*
name
,
void
(
*
func
)(
const
LightSong
&
song
,
const
char
*
value
,
void
*
user_data
),
void
*
user_data
);
...
...
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