dbUtils.h: eliminate this header
This commit is contained in:
@ -73,7 +73,6 @@ mpd_headers = \
|
|||||||
src/cmdline.h \
|
src/cmdline.h \
|
||||||
src/conf.h \
|
src/conf.h \
|
||||||
src/crossfade.h \
|
src/crossfade.h \
|
||||||
src/dbUtils.h \
|
|
||||||
src/decoder_thread.h \
|
src/decoder_thread.h \
|
||||||
src/decoder_control.h \
|
src/decoder_control.h \
|
||||||
src/decoder_plugin.h \
|
src/decoder_plugin.h \
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#include "DatabaseSelection.hxx"
|
#include "DatabaseSelection.hxx"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "dbUtils.h"
|
|
||||||
#include "stored_playlist.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);
|
const auto f = std::bind(AddSong, playlist_path_utf8, _1, _2);
|
||||||
return db->Visit(selection, f, error_r);
|
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);
|
|
||||||
}
|
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#include "DatabaseSelection.hxx"
|
#include "DatabaseSelection.hxx"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "dbUtils.h"
|
|
||||||
#include "playlist.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);
|
const auto f = std::bind(AddToQueue, pc, _1, _2);
|
||||||
return db->Visit(selection, f, error_r);
|
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);
|
|
||||||
}
|
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "PlaylistCommands.hxx"
|
#include "PlaylistCommands.hxx"
|
||||||
|
#include "DatabasePlaylist.hxx"
|
||||||
#include "CommandError.h"
|
#include "CommandError.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -32,7 +33,6 @@ extern "C" {
|
|||||||
#include "ls.h"
|
#include "ls.h"
|
||||||
#include "uri.h"
|
#include "uri.h"
|
||||||
#include "stored_playlist.h"
|
#include "stored_playlist.h"
|
||||||
#include "dbUtils.h"
|
|
||||||
#include "client_internal.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);
|
success = spl_append_uri(argv[1], playlist, &error);
|
||||||
} else
|
} else
|
||||||
success = addAllInToStoredPlaylist(uri, playlist, &error);
|
success = search_add_to_playlist(uri, playlist, nullptr,
|
||||||
|
&error);
|
||||||
|
|
||||||
if (!success && error == NULL) {
|
if (!success && error == NULL) {
|
||||||
command_error(client, ACK_ERROR_NO_EXIST,
|
command_error(client, ACK_ERROR_NO_EXIST,
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "QueueCommands.hxx"
|
#include "QueueCommands.hxx"
|
||||||
#include "CommandError.h"
|
#include "CommandError.h"
|
||||||
|
#include "DatabaseQueue.hxx"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "protocol/argparser.h"
|
#include "protocol/argparser.h"
|
||||||
@ -29,7 +30,6 @@ extern "C" {
|
|||||||
#include "ls.h"
|
#include "ls.h"
|
||||||
#include "uri.h"
|
#include "uri.h"
|
||||||
#include "locate.h"
|
#include "locate.h"
|
||||||
#include "dbUtils.h"
|
|
||||||
#include "client_internal.h"
|
#include "client_internal.h"
|
||||||
#include "client_file.h"
|
#include "client_file.h"
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ handle_add(struct client *client, G_GNUC_UNUSED int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
return addAllIn(client->player_control, uri, &error)
|
return findAddIn(client->player_control, uri, nullptr, &error)
|
||||||
? COMMAND_RETURN_OK
|
? COMMAND_RETURN_OK
|
||||||
: print_error(client, error);
|
: print_error(client, error);
|
||||||
}
|
}
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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
|
|
Reference in New Issue
Block a user