update: convert to C++
This commit is contained in:
parent
67b46a151d
commit
a654f146d1
38
Makefile.am
38
Makefile.am
@ -91,10 +91,6 @@ mpd_headers = \
|
|||||||
src/fd_util.h \
|
src/fd_util.h \
|
||||||
src/gerror.h \
|
src/gerror.h \
|
||||||
src/glib_compat.h \
|
src/glib_compat.h \
|
||||||
src/update.h \
|
|
||||||
src/inotify_source.h \
|
|
||||||
src/inotify_queue.h \
|
|
||||||
src/inotify_update.h \
|
|
||||||
src/gcc.h \
|
src/gcc.h \
|
||||||
src/decoder_list.h \
|
src/decoder_list.h \
|
||||||
src/decoder_print.h \
|
src/decoder_print.h \
|
||||||
@ -263,15 +259,15 @@ src_mpd_SOURCES = \
|
|||||||
src/filter_config.c \
|
src/filter_config.c \
|
||||||
src/filter_plugin.c \
|
src/filter_plugin.c \
|
||||||
src/filter_registry.c \
|
src/filter_registry.c \
|
||||||
src/update.c \
|
src/UpdateGlue.cxx src/UpdateGlue.hxx \
|
||||||
src/update_queue.c src/update_queue.h \
|
src/UpdateQueue.cxx src/UpdateQueue.hxx \
|
||||||
src/update_io.c src/update_io.h \
|
src/UpdateIO.cxx src/UpdateIO.hxx \
|
||||||
src/update_db.c src/update_db.h \
|
src/UpdateDatabase.cxx src/UpdateDatabase.hxx \
|
||||||
src/update_walk.c src/update_walk.h \
|
src/UpdateWalk.cxx src/UpdateWalk.hxx \
|
||||||
src/update_song.c src/update_song.h \
|
src/UpdateSong.cxx src/UpdateSong.hxx \
|
||||||
src/update_container.c src/update_container.h \
|
src/UpdateContainer.cxx src/UpdateContainer.hxx \
|
||||||
src/update_internal.h \
|
src/UpdateInternal.hxx \
|
||||||
src/update_remove.c src/update_remove.h \
|
src/UpdateRemove.cxx src/UpdateRemove.hxx \
|
||||||
src/client.c \
|
src/client.c \
|
||||||
src/client_event.c \
|
src/client_event.c \
|
||||||
src/client_expire.c \
|
src/client_expire.c \
|
||||||
@ -374,9 +370,9 @@ endif
|
|||||||
|
|
||||||
if ENABLE_INOTIFY
|
if ENABLE_INOTIFY
|
||||||
src_mpd_SOURCES += \
|
src_mpd_SOURCES += \
|
||||||
src/inotify_source.c \
|
src/InotifySource.cxx src/InotifySource.hxx \
|
||||||
src/inotify_queue.c \
|
src/InotifyQueue.cxx src/InotifyQueue.hxx \
|
||||||
src/inotify_update.c
|
src/InotifyUpdate.cxx src/InotifyUpdate.hxx
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if ENABLE_SQLITE
|
if ENABLE_SQLITE
|
||||||
@ -449,7 +445,7 @@ if ENABLE_ARCHIVE
|
|||||||
noinst_LIBRARIES += libarchive.a
|
noinst_LIBRARIES += libarchive.a
|
||||||
|
|
||||||
src_mpd_SOURCES += \
|
src_mpd_SOURCES += \
|
||||||
src/update_archive.c src/update_archive.h
|
src/UpdateArchive.cxx src/UpdateArchive.hxx
|
||||||
|
|
||||||
libarchive_a_SOURCES = \
|
libarchive_a_SOURCES = \
|
||||||
src/archive_api.c \
|
src/archive_api.c \
|
||||||
@ -1351,12 +1347,12 @@ TESTS += test/test_archive_iso9660.sh
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if ENABLE_INOTIFY
|
if ENABLE_INOTIFY
|
||||||
noinst_PROGRAMS += test/run_inotify
|
noinst_PROGRAMS += test/RunInotify
|
||||||
test_run_inotify_SOURCES = test/run_inotify.c \
|
test_RunInotify_SOURCES = test/RunInotify.c \
|
||||||
src/fd_util.c \
|
src/fd_util.c \
|
||||||
src/fifo_buffer.c \
|
src/fifo_buffer.c \
|
||||||
src/inotify_source.c
|
src/InotifySource.cxx
|
||||||
test_run_inotify_LDADD = $(GLIB_LIBS)
|
test_RunInotify_LDADD = $(GLIB_LIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
test_test_byte_reverse_SOURCES = \
|
test_test_byte_reverse_SOURCES = \
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2011 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -18,8 +18,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "inotify_queue.h"
|
#include "InotifyQueue.hxx"
|
||||||
#include "update.h"
|
#include "UpdateGlue.hxx"
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ mpd_inotify_run_update(G_GNUC_UNUSED gpointer data)
|
|||||||
unsigned id;
|
unsigned id;
|
||||||
|
|
||||||
while (inotify_queue != NULL) {
|
while (inotify_queue != NULL) {
|
||||||
char *uri_utf8 = inotify_queue->data;
|
char *uri_utf8 = (char *)inotify_queue->data;
|
||||||
|
|
||||||
id = update_enqueue(uri_utf8, false);
|
id = update_enqueue(uri_utf8, false);
|
||||||
if (id == 0)
|
if (id == 0)
|
||||||
@ -108,7 +108,7 @@ mpd_inotify_enqueue(char *uri_utf8)
|
|||||||
|
|
||||||
inotify_queue = NULL;
|
inotify_queue = NULL;
|
||||||
while (old_queue != NULL) {
|
while (old_queue != NULL) {
|
||||||
char *current_uri = old_queue->data;
|
char *current_uri = (char *)old_queue->data;
|
||||||
|
|
||||||
if (path_in(uri_utf8, current_uri)) {
|
if (path_in(uri_utf8, current_uri)) {
|
||||||
/* already enqueued */
|
/* already enqueued */
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2011 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -17,8 +17,8 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MPD_INOTIFY_QUEUE_H
|
#ifndef MPD_INOTIFY_QUEUE_HXX
|
||||||
#define MPD_INOTIFY_QUEUE_H
|
#define MPD_INOTIFY_QUEUE_HXX
|
||||||
|
|
||||||
void
|
void
|
||||||
mpd_inotify_queue_init(void);
|
mpd_inotify_queue_init(void);
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2011 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -18,8 +18,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "inotify_source.h"
|
#include "InotifySource.hxx"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
#include "fifo_buffer.h"
|
#include "fifo_buffer.h"
|
||||||
|
}
|
||||||
|
|
||||||
#include "fd_util.h"
|
#include "fd_util.h"
|
||||||
#include "mpd_error.h"
|
#include "mpd_error.h"
|
||||||
|
|
||||||
@ -63,11 +67,10 @@ mpd_inotify_in_event(G_GNUC_UNUSED GIOChannel *_source,
|
|||||||
G_GNUC_UNUSED GIOCondition condition,
|
G_GNUC_UNUSED GIOCondition condition,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
struct mpd_inotify_source *source = data;
|
struct mpd_inotify_source *source = (struct mpd_inotify_source *)data;
|
||||||
void *dest;
|
void *dest;
|
||||||
size_t length;
|
size_t length;
|
||||||
ssize_t nbytes;
|
ssize_t nbytes;
|
||||||
const struct inotify_event *event;
|
|
||||||
|
|
||||||
dest = fifo_buffer_write(source->buffer, &length);
|
dest = fifo_buffer_write(source->buffer, &length);
|
||||||
if (dest == NULL)
|
if (dest == NULL)
|
||||||
@ -85,7 +88,9 @@ mpd_inotify_in_event(G_GNUC_UNUSED GIOChannel *_source,
|
|||||||
while (true) {
|
while (true) {
|
||||||
const char *name;
|
const char *name;
|
||||||
|
|
||||||
event = fifo_buffer_read(source->buffer, &length);
|
const struct inotify_event *event =
|
||||||
|
(const struct inotify_event *)
|
||||||
|
fifo_buffer_read(source->buffer, &length);
|
||||||
if (event == NULL || length < sizeof(*event) ||
|
if (event == NULL || length < sizeof(*event) ||
|
||||||
length < sizeof(*event) + event->len)
|
length < sizeof(*event) + event->len)
|
||||||
break;
|
break;
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2011 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -17,8 +17,8 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MPD_INOTIFY_SOURCE_H
|
#ifndef MPD_INOTIFY_SOURCE_HXX
|
||||||
#define MPD_INOTIFY_SOURCE_H
|
#define MPD_INOTIFY_SOURCE_HXX
|
||||||
|
|
||||||
#include "gerror.h"
|
#include "gerror.h"
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2011 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -18,12 +18,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h" /* must be first for large file support */
|
#include "config.h" /* must be first for large file support */
|
||||||
#include "inotify_update.h"
|
#include "InotifyUpdate.hxx"
|
||||||
#include "inotify_source.h"
|
#include "InotifySource.hxx"
|
||||||
#include "inotify_queue.h"
|
#include "InotifyQueue.hxx"
|
||||||
#include "database.h"
|
#include "database.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
#include "mapper.h"
|
#include "mapper.h"
|
||||||
#include "path.h"
|
#include "path.h"
|
||||||
|
}
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <sys/inotify.h>
|
#include <sys/inotify.h>
|
||||||
@ -90,7 +93,8 @@ tree_remove_watch_directory(struct watch_directory *directory)
|
|||||||
static struct watch_directory *
|
static struct watch_directory *
|
||||||
tree_find_watch_directory(int wd)
|
tree_find_watch_directory(int wd)
|
||||||
{
|
{
|
||||||
return g_tree_lookup(inotify_directories, GINT_TO_POINTER(wd));
|
return (struct watch_directory *)
|
||||||
|
g_tree_lookup(inotify_directories, GINT_TO_POINTER(wd));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -109,7 +113,7 @@ remove_watch_directory(struct watch_directory *directory)
|
|||||||
tree_remove_watch_directory(directory);
|
tree_remove_watch_directory(directory);
|
||||||
|
|
||||||
while (directory->children != NULL)
|
while (directory->children != NULL)
|
||||||
remove_watch_directory(directory->children->data);
|
remove_watch_directory((struct watch_directory *)directory->children->data);
|
||||||
|
|
||||||
directory->parent->children =
|
directory->parent->children =
|
||||||
g_list_remove(directory->parent->children, directory);
|
g_list_remove(directory->parent->children, directory);
|
||||||
@ -349,7 +353,7 @@ static gboolean
|
|||||||
free_watch_directory(G_GNUC_UNUSED gpointer key, gpointer value,
|
free_watch_directory(G_GNUC_UNUSED gpointer key, gpointer value,
|
||||||
G_GNUC_UNUSED gpointer data)
|
G_GNUC_UNUSED gpointer data)
|
||||||
{
|
{
|
||||||
struct watch_directory *directory = value;
|
struct watch_directory *directory = (struct watch_directory *)value;
|
||||||
|
|
||||||
g_free(directory->name);
|
g_free(directory->name);
|
||||||
g_list_free(directory->children);
|
g_list_free(directory->children);
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2011 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -17,8 +17,8 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MPD_INOTIFY_UPDATE_H
|
#ifndef MPD_INOTIFY_UPDATE_HXX
|
||||||
#define MPD_INOTIFY_UPDATE_H
|
#define MPD_INOTIFY_UPDATE_HXX
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
|
|
10
src/Main.cxx
10
src/Main.cxx
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2012 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -20,6 +20,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "Main.hxx"
|
#include "Main.hxx"
|
||||||
#include "PlaylistFile.hxx"
|
#include "PlaylistFile.hxx"
|
||||||
|
#include "UpdateGlue.hxx"
|
||||||
#include "chunk.h"
|
#include "chunk.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -31,7 +32,6 @@ extern "C" {
|
|||||||
#include "AllCommands.h"
|
#include "AllCommands.h"
|
||||||
#include "playlist.h"
|
#include "playlist.h"
|
||||||
#include "database.h"
|
#include "database.h"
|
||||||
#include "update.h"
|
|
||||||
#include "player_thread.h"
|
#include "player_thread.h"
|
||||||
#include "listen.h"
|
#include "listen.h"
|
||||||
#include "cmdline.h"
|
#include "cmdline.h"
|
||||||
@ -59,12 +59,12 @@ extern "C" {
|
|||||||
|
|
||||||
#include "mpd_error.h"
|
#include "mpd_error.h"
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
|
|
||||||
#ifdef ENABLE_INOTIFY
|
#ifdef ENABLE_INOTIFY
|
||||||
#include "inotify_update.h"
|
#include "InotifyUpdate.hxx"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
|
||||||
#ifdef ENABLE_SQLITE
|
#ifdef ENABLE_SQLITE
|
||||||
#include "sticker.h"
|
#include "sticker.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "OtherCommands.hxx"
|
#include "OtherCommands.hxx"
|
||||||
#include "DatabaseCommands.hxx"
|
#include "DatabaseCommands.hxx"
|
||||||
#include "CommandError.hxx"
|
#include "CommandError.hxx"
|
||||||
|
#include "UpdateGlue.hxx"
|
||||||
#include "directory.h"
|
#include "directory.h"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
|
|
||||||
@ -31,7 +32,6 @@ extern "C" {
|
|||||||
#include "ls.h"
|
#include "ls.h"
|
||||||
#include "uri.h"
|
#include "uri.h"
|
||||||
#include "decoder_print.h"
|
#include "decoder_print.h"
|
||||||
#include "update.h"
|
|
||||||
#include "volume.h"
|
#include "volume.h"
|
||||||
#include "stats.h"
|
#include "stats.h"
|
||||||
#include "permission.h"
|
#include "permission.h"
|
||||||
|
@ -21,13 +21,13 @@
|
|||||||
#include "PlayerCommands.hxx"
|
#include "PlayerCommands.hxx"
|
||||||
#include "CommandError.hxx"
|
#include "CommandError.hxx"
|
||||||
#include "PlaylistPrint.hxx"
|
#include "PlaylistPrint.hxx"
|
||||||
|
#include "UpdateGlue.hxx"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "protocol/argparser.h"
|
#include "protocol/argparser.h"
|
||||||
#include "protocol/result.h"
|
#include "protocol/result.h"
|
||||||
#include "player_control.h"
|
#include "player_control.h"
|
||||||
#include "playlist.h"
|
#include "playlist.h"
|
||||||
#include "update.h"
|
|
||||||
#include "volume.h"
|
#include "volume.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
#include "client_internal.h"
|
#include "client_internal.h"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2012 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -18,14 +18,17 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h" /* must be first for large file support */
|
#include "config.h" /* must be first for large file support */
|
||||||
#include "update_archive.h"
|
#include "UpdateArchive.hxx"
|
||||||
#include "update_internal.h"
|
#include "UpdateInternal.hxx"
|
||||||
#include "db_lock.h"
|
#include "db_lock.h"
|
||||||
#include "directory.h"
|
#include "directory.h"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
#include "mapper.h"
|
#include "mapper.h"
|
||||||
#include "archive_list.h"
|
#include "archive_list.h"
|
||||||
#include "archive_plugin.h"
|
#include "archive_plugin.h"
|
||||||
|
}
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2012 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -17,8 +17,8 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MPD_UPDATE_ARCHIVE_H
|
#ifndef MPD_UPDATE_ARCHIVE_HXX
|
||||||
#define MPD_UPDATE_ARCHIVE_H
|
#define MPD_UPDATE_ARCHIVE_HXX
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "gcc.h"
|
#include "gcc.h"
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2012 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -18,16 +18,19 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h" /* must be first for large file support */
|
#include "config.h" /* must be first for large file support */
|
||||||
#include "update_container.h"
|
#include "UpdateContainer.hxx"
|
||||||
#include "update_internal.h"
|
#include "UpdateInternal.hxx"
|
||||||
#include "update_db.h"
|
#include "UpdateDatabase.hxx"
|
||||||
#include "db_lock.h"
|
#include "db_lock.h"
|
||||||
#include "directory.h"
|
#include "directory.h"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
#include "mapper.h"
|
|
||||||
#include "decoder_plugin.h"
|
#include "decoder_plugin.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
#include "mapper.h"
|
||||||
#include "tag.h"
|
#include "tag.h"
|
||||||
#include "tag_handler.h"
|
#include "tag_handler.h"
|
||||||
|
}
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2012 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -17,12 +17,11 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MPD_UPDATE_CONTAINER_H
|
#ifndef MPD_UPDATE_CONTAINER_HXX
|
||||||
#define MPD_UPDATE_CONTAINER_H
|
#define MPD_UPDATE_CONTAINER_HXX
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
struct directory;
|
struct directory;
|
@ -18,13 +18,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h" /* must be first for large file support */
|
#include "config.h" /* must be first for large file support */
|
||||||
#include "update_db.h"
|
#include "UpdateDatabase.hxx"
|
||||||
#include "update_remove.h"
|
#include "UpdateRemove.hxx"
|
||||||
#include "directory.h"
|
#include "directory.h"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
#include "playlist_vector.h"
|
|
||||||
#include "db_lock.h"
|
#include "db_lock.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
#include "playlist_vector.h"
|
||||||
|
}
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2012 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -17,13 +17,11 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MPD_UPDATE_DB_H
|
#ifndef MPD_UPDATE_DATABASE_HXX
|
||||||
#define MPD_UPDATE_DB_H
|
#define MPD_UPDATE_DATABASE_HXX
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
struct directory;
|
struct directory;
|
||||||
struct song;
|
struct song;
|
||||||
|
|
@ -18,18 +18,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "update.h"
|
#include "UpdateGlue.hxx"
|
||||||
#include "update_queue.h"
|
#include "UpdateQueue.hxx"
|
||||||
#include "update_walk.h"
|
#include "UpdateWalk.hxx"
|
||||||
#include "update_remove.h"
|
#include "UpdateRemove.hxx"
|
||||||
#include "update.h"
|
|
||||||
|
extern "C" {
|
||||||
#include "database.h"
|
#include "database.h"
|
||||||
#include "mapper.h"
|
#include "mapper.h"
|
||||||
#include "playlist.h"
|
#include "playlist.h"
|
||||||
#include "event_pipe.h"
|
#include "event_pipe.h"
|
||||||
#include "update.h"
|
|
||||||
#include "idle.h"
|
#include "idle.h"
|
||||||
#include "stats.h"
|
#include "stats.h"
|
||||||
|
}
|
||||||
|
|
||||||
#include "Main.hxx"
|
#include "Main.hxx"
|
||||||
#include "mpd_error.h"
|
#include "mpd_error.h"
|
||||||
|
|
||||||
@ -65,7 +67,7 @@ isUpdatingDB(void)
|
|||||||
|
|
||||||
static void * update_task(void *_path)
|
static void * update_task(void *_path)
|
||||||
{
|
{
|
||||||
const char *path = _path;
|
const char *path = (const char *)_path;
|
||||||
|
|
||||||
if (path != NULL && *path != 0)
|
if (path != NULL && *path != 0)
|
||||||
g_debug("starting: %s", path);
|
g_debug("starting: %s", path);
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2011 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -17,10 +17,8 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MPD_UPDATE_H
|
#ifndef MPD_UPDATE_GLUE_HXX
|
||||||
#define MPD_UPDATE_H
|
#define MPD_UPDATE_GLUE_HXX
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
void update_global_init(void);
|
void update_global_init(void);
|
||||||
|
|
@ -18,11 +18,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h" /* must be first for large file support */
|
#include "config.h" /* must be first for large file support */
|
||||||
#include "update_io.h"
|
#include "UpdateIO.hxx"
|
||||||
#include "mapper.h"
|
|
||||||
#include "directory.h"
|
#include "directory.h"
|
||||||
#include "glib_compat.h"
|
#include "glib_compat.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
#include "mapper.h"
|
||||||
|
}
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2012 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -17,12 +17,11 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MPD_UPDATE_IO_H
|
#ifndef MPD_UPDATE_IO_HXX
|
||||||
#define MPD_UPDATE_IO_H
|
#define MPD_UPDATE_IO_HXX
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
struct directory;
|
struct directory;
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2011 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "update_queue.h"
|
#include "UpdateQueue.hxx"
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2012 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -17,13 +17,11 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MPD_UPDATE_QUEUE_H
|
#ifndef MPD_UPDATE_QUEUE_HXX
|
||||||
#define MPD_UPDATE_QUEUE_H
|
#define MPD_UPDATE_QUEUE_HXX
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
|
|
||||||
unsigned
|
unsigned
|
||||||
update_queue_push(const char *path, bool discard, unsigned base);
|
update_queue_push(const char *path, bool discard, unsigned base);
|
||||||
|
|
@ -18,15 +18,21 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h" /* must be first for large file support */
|
#include "config.h" /* must be first for large file support */
|
||||||
#include "update_remove.h"
|
#include "UpdateRemove.hxx"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
#include "event_pipe.h"
|
#include "event_pipe.h"
|
||||||
#include "song.h"
|
|
||||||
#include "playlist.h"
|
#include "playlist.h"
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "song.h"
|
||||||
#include "Main.hxx"
|
#include "Main.hxx"
|
||||||
|
|
||||||
#ifdef ENABLE_SQLITE
|
#ifdef ENABLE_SQLITE
|
||||||
|
extern "C" {
|
||||||
#include "sticker.h"
|
#include "sticker.h"
|
||||||
#include "song_sticker.h"
|
#include "song_sticker.h"
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2012 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -17,8 +17,8 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MPD_UPDATE_REMOVE_H
|
#ifndef MPD_UPDATE_REMOVE_HXX
|
||||||
#define MPD_UPDATE_REMOVE_H
|
#define MPD_UPDATE_REMOVE_HXX
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
|
|
@ -18,17 +18,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h" /* must be first for large file support */
|
#include "config.h" /* must be first for large file support */
|
||||||
#include "update_song.h"
|
#include "UpdateSong.hxx"
|
||||||
#include "update_internal.h"
|
#include "UpdateInternal.hxx"
|
||||||
#include "update_io.h"
|
#include "UpdateIO.hxx"
|
||||||
#include "update_db.h"
|
#include "UpdateDatabase.hxx"
|
||||||
#include "update_container.h"
|
#include "UpdateContainer.hxx"
|
||||||
#include "db_lock.h"
|
#include "db_lock.h"
|
||||||
#include "directory.h"
|
#include "directory.h"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
#include "decoder_list.h"
|
|
||||||
#include "decoder_plugin.h"
|
#include "decoder_plugin.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
#include "decoder_list.h"
|
||||||
|
}
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -104,7 +107,7 @@ update_song_file(struct directory *directory,
|
|||||||
const struct stat *st)
|
const struct stat *st)
|
||||||
{
|
{
|
||||||
const struct decoder_plugin *plugin =
|
const struct decoder_plugin *plugin =
|
||||||
decoder_plugin_from_suffix(suffix, false);
|
decoder_plugin_from_suffix(suffix, nullptr);
|
||||||
if (plugin == NULL)
|
if (plugin == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2012 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -17,12 +17,11 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MPD_UPDATE_SONG_H
|
#ifndef MPD_UPDATE_SONG_HXX
|
||||||
#define MPD_UPDATE_SONG_H
|
#define MPD_UPDATE_SONG_HXX
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
|
|
||||||
#include <stdbool.h>
|
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
struct directory;
|
struct directory;
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2012 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -18,22 +18,25 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h" /* must be first for large file support */
|
#include "config.h" /* must be first for large file support */
|
||||||
#include "update_walk.h"
|
#include "UpdateWalk.hxx"
|
||||||
#include "update_io.h"
|
#include "UpdateIO.hxx"
|
||||||
#include "update_db.h"
|
#include "UpdateDatabase.hxx"
|
||||||
#include "update_song.h"
|
#include "UpdateSong.hxx"
|
||||||
#include "update_archive.h"
|
#include "UpdateArchive.hxx"
|
||||||
#include "database.h"
|
|
||||||
#include "db_lock.h"
|
#include "db_lock.h"
|
||||||
#include "exclude.h"
|
|
||||||
#include "directory.h"
|
#include "directory.h"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
#include "exclude.h"
|
||||||
|
#include "database.h"
|
||||||
#include "playlist_vector.h"
|
#include "playlist_vector.h"
|
||||||
#include "uri.h"
|
#include "uri.h"
|
||||||
#include "mapper.h"
|
#include "mapper.h"
|
||||||
#include "path.h"
|
#include "path.h"
|
||||||
#include "playlist_list.h"
|
#include "playlist_list.h"
|
||||||
#include "conf.h"
|
#include "conf.h"
|
||||||
|
}
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2003-2012 The Music Player Daemon Project
|
* Copyright (C) 2003-2013 The Music Player Daemon Project
|
||||||
* http://www.musicpd.org
|
* http://www.musicpd.org
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -17,8 +17,8 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MPD_UPDATE_WALK_H
|
#ifndef MPD_UPDATE_WALK_HXX
|
||||||
#define MPD_UPDATE_WALK_H
|
#define MPD_UPDATE_WALK_HXX
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
|
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "inotify_source.h"
|
#include "InotifySource.hxx"
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user