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
6d4ca071
Commit
6d4ca071
authored
Aug 29, 2012
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dbUtils.h: eliminate this header
parent
684a3d30
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
5 additions
and
61 deletions
+5
-61
Makefile.am
Makefile.am
+0
-1
DatabasePlaylist.cxx
src/DatabasePlaylist.cxx
+0
-9
DatabaseQueue.cxx
src/DatabaseQueue.cxx
+0
-7
PlaylistCommands.cxx
src/PlaylistCommands.cxx
+3
-2
QueueCommands.cxx
src/QueueCommands.cxx
+2
-2
dbUtils.h
src/dbUtils.h
+0
-40
No files found.
Makefile.am
View file @
6d4ca071
...
...
@@ -73,7 +73,6 @@ mpd_headers = \
src/cmdline.h
\
src/conf.h
\
src/crossfade.h
\
src/dbUtils.h
\
src/decoder_thread.h
\
src/decoder_control.h
\
src/decoder_plugin.h
\
...
...
src/DatabasePlaylist.cxx
View file @
6d4ca071
...
...
@@ -22,7 +22,6 @@
#include "DatabaseSelection.hxx"
extern
"C"
{
#include "dbUtils.h"
#include "stored_playlist.h"
}
...
...
@@ -53,11 +52,3 @@ search_add_to_playlist(const char *uri, const char *playlist_path_utf8,
const
auto
f
=
std
::
bind
(
AddSong
,
playlist_path_utf8
,
_1
,
_2
);
return
db
->
Visit
(
selection
,
f
,
error_r
);
}
bool
addAllInToStoredPlaylist
(
const
char
*
uri_utf8
,
const
char
*
playlist_path_utf8
,
GError
**
error_r
)
{
return
search_add_to_playlist
(
uri_utf8
,
playlist_path_utf8
,
nullptr
,
error_r
);
}
src/DatabaseQueue.cxx
View file @
6d4ca071
...
...
@@ -22,7 +22,6 @@
#include "DatabaseSelection.hxx"
extern
"C"
{
#include "dbUtils.h"
#include "playlist.h"
}
...
...
@@ -59,9 +58,3 @@ findAddIn(struct player_control *pc, const char *uri,
const
auto
f
=
std
::
bind
(
AddToQueue
,
pc
,
_1
,
_2
);
return
db
->
Visit
(
selection
,
f
,
error_r
);
}
bool
addAllIn
(
struct
player_control
*
pc
,
const
char
*
uri
,
GError
**
error_r
)
{
return
findAddIn
(
pc
,
uri
,
nullptr
,
error_r
);
}
src/PlaylistCommands.cxx
View file @
6d4ca071
...
...
@@ -19,6 +19,7 @@
#include "config.h"
#include "PlaylistCommands.hxx"
#include "DatabasePlaylist.hxx"
#include "CommandError.h"
extern
"C"
{
...
...
@@ -32,7 +33,6 @@ extern "C" {
#include "ls.h"
#include "uri.h"
#include "stored_playlist.h"
#include "dbUtils.h"
#include "client_internal.h"
}
...
...
@@ -201,7 +201,8 @@ handle_playlistadd(struct client *client, G_GNUC_UNUSED int argc, char *argv[])
success
=
spl_append_uri
(
argv
[
1
],
playlist
,
&
error
);
}
else
success
=
addAllInToStoredPlaylist
(
uri
,
playlist
,
&
error
);
success
=
search_add_to_playlist
(
uri
,
playlist
,
nullptr
,
&
error
);
if
(
!
success
&&
error
==
NULL
)
{
command_error
(
client
,
ACK_ERROR_NO_EXIST
,
...
...
src/QueueCommands.cxx
View file @
6d4ca071
...
...
@@ -20,6 +20,7 @@
#include "config.h"
#include "QueueCommands.hxx"
#include "CommandError.h"
#include "DatabaseQueue.hxx"
extern
"C"
{
#include "protocol/argparser.h"
...
...
@@ -29,7 +30,6 @@ extern "C" {
#include "ls.h"
#include "uri.h"
#include "locate.h"
#include "dbUtils.h"
#include "client_internal.h"
#include "client_file.h"
}
...
...
@@ -70,7 +70,7 @@ handle_add(struct client *client, G_GNUC_UNUSED int argc, char *argv[])
}
GError
*
error
=
NULL
;
return
addAllIn
(
client
->
player_control
,
uri
,
&
error
)
return
findAddIn
(
client
->
player_control
,
uri
,
nullptr
,
&
error
)
?
COMMAND_RETURN_OK
:
print_error
(
client
,
error
);
}
...
...
src/dbUtils.h
deleted
100644 → 0
View file @
684a3d30
/*
* Copyright (C) 2003-2011 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MPD_DB_UTILS_H
#define MPD_DB_UTILS_H
#include "gcc.h"
#include "gerror.h"
#include <stdbool.h>
struct
locate_item_list
;
struct
player_control
;
gcc_nonnull
(
1
,
2
)
bool
addAllIn
(
struct
player_control
*
pc
,
const
char
*
uri
,
GError
**
error_r
);
gcc_nonnull
(
1
,
2
)
bool
addAllInToStoredPlaylist
(
const
char
*
uri_utf8
,
const
char
*
path_utf8
,
GError
**
error_r
);
#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