Directory: make the header C++ only
This commit is contained in:
parent
d65ad1bf15
commit
0c245bc271
11
Makefile.am
11
Makefile.am
@ -79,7 +79,6 @@ mpd_headers = \
|
|||||||
src/decoder_api.h \
|
src/decoder_api.h \
|
||||||
src/decoder_plugin.h \
|
src/decoder_plugin.h \
|
||||||
src/decoder_internal.h \
|
src/decoder_internal.h \
|
||||||
src/directory.h \
|
|
||||||
src/database.h \
|
src/database.h \
|
||||||
src/encoder_plugin.h \
|
src/encoder_plugin.h \
|
||||||
src/encoder_list.h \
|
src/encoder_list.h \
|
||||||
@ -223,7 +222,7 @@ src_mpd_SOURCES = \
|
|||||||
src/decoder_api.c \
|
src/decoder_api.c \
|
||||||
src/decoder_internal.c \
|
src/decoder_internal.c \
|
||||||
src/decoder_print.c \
|
src/decoder_print.c \
|
||||||
src/Directory.cxx \
|
src/Directory.cxx src/Directory.hxx \
|
||||||
src/DirectorySave.cxx src/DirectorySave.hxx \
|
src/DirectorySave.cxx src/DirectorySave.hxx \
|
||||||
src/DatabaseGlue.cxx \
|
src/DatabaseGlue.cxx \
|
||||||
src/DatabasePrint.cxx src/DatabasePrint.hxx \
|
src/DatabasePrint.cxx src/DatabasePrint.hxx \
|
||||||
@ -1021,7 +1020,7 @@ if ENABLE_TEST
|
|||||||
C_TESTS = \
|
C_TESTS = \
|
||||||
test/test_byte_reverse \
|
test/test_byte_reverse \
|
||||||
test/test_pcm \
|
test/test_pcm \
|
||||||
test/test_queue_priority
|
test/TestQueuePriority
|
||||||
|
|
||||||
TESTS = $(C_TESTS)
|
TESTS = $(C_TESTS)
|
||||||
|
|
||||||
@ -1357,10 +1356,10 @@ test_test_pcm_LDADD = \
|
|||||||
libutil.a \
|
libutil.a \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
|
|
||||||
test_test_queue_priority_SOURCES = \
|
test_TestQueuePriority_SOURCES = \
|
||||||
src/queue.c \
|
src/queue.c \
|
||||||
test/test_queue_priority.c
|
test/TestQueuePriority.c
|
||||||
test_test_queue_priority_LDADD = \
|
test_TestQueuePriority_LDADD = \
|
||||||
$(GLIB_LIBS)
|
$(GLIB_LIBS)
|
||||||
|
|
||||||
noinst_PROGRAMS += src/dsd2pcm/dsd2pcm
|
noinst_PROGRAMS += src/dsd2pcm/dsd2pcm
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "DatabaseGlue.hxx"
|
#include "DatabaseGlue.hxx"
|
||||||
#include "DatabaseRegistry.hxx"
|
#include "DatabaseRegistry.hxx"
|
||||||
#include "DatabaseSave.hxx"
|
#include "DatabaseSave.hxx"
|
||||||
|
#include "Directory.hxx"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "database.h"
|
#include "database.h"
|
||||||
@ -30,8 +31,6 @@ extern "C" {
|
|||||||
#include "glib_compat.h"
|
#include "glib_compat.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "directory.h"
|
|
||||||
|
|
||||||
#include "DatabasePlugin.hxx"
|
#include "DatabasePlugin.hxx"
|
||||||
#include "db/SimpleDatabasePlugin.hxx"
|
#include "db/SimpleDatabasePlugin.hxx"
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "PlaylistVector.hxx"
|
#include "PlaylistVector.hxx"
|
||||||
#include "SongPrint.hxx"
|
#include "SongPrint.hxx"
|
||||||
#include "TimePrint.hxx"
|
#include "TimePrint.hxx"
|
||||||
|
#include "Directory.hxx"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "database.h"
|
#include "database.h"
|
||||||
@ -32,8 +33,6 @@ extern "C" {
|
|||||||
#include "tag.h"
|
#include "tag.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "directory.h"
|
|
||||||
|
|
||||||
#include "DatabaseGlue.hxx"
|
#include "DatabaseGlue.hxx"
|
||||||
#include "DatabasePlugin.hxx"
|
#include "DatabasePlugin.hxx"
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "DatabaseSave.hxx"
|
#include "DatabaseSave.hxx"
|
||||||
#include "DatabaseLock.hxx"
|
#include "DatabaseLock.hxx"
|
||||||
#include "directory.h"
|
#include "Directory.hxx"
|
||||||
#include "DirectorySave.hxx"
|
#include "DirectorySave.hxx"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "directory.h"
|
#include "Directory.hxx"
|
||||||
#include "SongFilter.hxx"
|
#include "SongFilter.hxx"
|
||||||
#include "PlaylistVector.hxx"
|
#include "PlaylistVector.hxx"
|
||||||
#include "DatabaseLock.hxx"
|
#include "DatabaseLock.hxx"
|
||||||
|
@ -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,16 +17,13 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MPD_DIRECTORY_H
|
#ifndef MPD_DIRECTORY_HXX
|
||||||
#define MPD_DIRECTORY_H
|
#define MPD_DIRECTORY_HXX
|
||||||
|
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "util/list.h"
|
#include "util/list.h"
|
||||||
#include "gcc.h"
|
#include "gcc.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
#include "DatabaseVisitor.hxx"
|
#include "DatabaseVisitor.hxx"
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@ -55,10 +52,7 @@
|
|||||||
|
|
||||||
struct song;
|
struct song;
|
||||||
struct db_visitor;
|
struct db_visitor;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
class SongFilter;
|
class SongFilter;
|
||||||
#endif
|
|
||||||
|
|
||||||
struct directory {
|
struct directory {
|
||||||
/**
|
/**
|
||||||
@ -96,7 +90,6 @@ struct directory {
|
|||||||
bool have_stat; /* not needed if ino_t == dev_t == 0 is impossible */
|
bool have_stat; /* not needed if ino_t == dev_t == 0 is impossible */
|
||||||
char path[sizeof(long)];
|
char path[sizeof(long)];
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
/**
|
/**
|
||||||
* Caller must lock #db_mutex.
|
* Caller must lock #db_mutex.
|
||||||
*/
|
*/
|
||||||
@ -104,11 +97,8 @@ struct directory {
|
|||||||
VisitDirectory visit_directory, VisitSong visit_song,
|
VisitDirectory visit_directory, VisitSong visit_song,
|
||||||
VisitPlaylist visit_playlist,
|
VisitPlaylist visit_playlist,
|
||||||
GError **error_r) const;
|
GError **error_r) const;
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
isRootDirectory(const char *name)
|
isRootDirectory(const char *name)
|
||||||
{
|
{
|
||||||
@ -272,6 +262,4 @@ directory_lookup_song(struct directory *directory, const char *uri);
|
|||||||
void
|
void
|
||||||
directory_sort(struct directory *directory);
|
directory_sort(struct directory *directory);
|
||||||
|
|
||||||
G_END_DECLS
|
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "DirectorySave.hxx"
|
#include "DirectorySave.hxx"
|
||||||
#include "directory.h"
|
#include "Directory.hxx"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
#include "SongSave.hxx"
|
#include "SongSave.hxx"
|
||||||
#include "PlaylistDatabase.hxx"
|
#include "PlaylistDatabase.hxx"
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "Mapper.hxx"
|
#include "Mapper.hxx"
|
||||||
#include "directory.h"
|
#include "Directory.hxx"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include "DatabaseCommands.hxx"
|
#include "DatabaseCommands.hxx"
|
||||||
#include "CommandError.hxx"
|
#include "CommandError.hxx"
|
||||||
#include "UpdateGlue.hxx"
|
#include "UpdateGlue.hxx"
|
||||||
#include "directory.h"
|
#include "Directory.hxx"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
#include "SongPrint.hxx"
|
#include "SongPrint.hxx"
|
||||||
#include "TagPrint.hxx"
|
#include "TagPrint.hxx"
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
#include "directory.h"
|
#include "Directory.hxx"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "tag.h"
|
#include "tag.h"
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "SongPrint.hxx"
|
#include "SongPrint.hxx"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
#include "directory.h"
|
#include "Directory.hxx"
|
||||||
#include "TimePrint.hxx"
|
#include "TimePrint.hxx"
|
||||||
#include "TagPrint.hxx"
|
#include "TagPrint.hxx"
|
||||||
#include "Mapper.hxx"
|
#include "Mapper.hxx"
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "SongSave.hxx"
|
#include "SongSave.hxx"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
#include "TagSave.hxx"
|
#include "TagSave.hxx"
|
||||||
#include "directory.h"
|
#include "Directory.hxx"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "tag.h"
|
#include "tag.h"
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "SongSticker.hxx"
|
#include "SongSticker.hxx"
|
||||||
#include "StickerDatabase.hxx"
|
#include "StickerDatabase.hxx"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
#include "directory.h"
|
#include "Directory.hxx"
|
||||||
|
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ extern "C" {
|
|||||||
#include "uri.h"
|
#include "uri.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "directory.h"
|
#include "Directory.hxx"
|
||||||
#include "Mapper.hxx"
|
#include "Mapper.hxx"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "UpdateArchive.hxx"
|
#include "UpdateArchive.hxx"
|
||||||
#include "UpdateInternal.hxx"
|
#include "UpdateInternal.hxx"
|
||||||
#include "DatabaseLock.hxx"
|
#include "DatabaseLock.hxx"
|
||||||
#include "directory.h"
|
#include "Directory.hxx"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
#include "Mapper.hxx"
|
#include "Mapper.hxx"
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
#include "UpdateInternal.hxx"
|
#include "UpdateInternal.hxx"
|
||||||
#include "UpdateDatabase.hxx"
|
#include "UpdateDatabase.hxx"
|
||||||
#include "DatabaseLock.hxx"
|
#include "DatabaseLock.hxx"
|
||||||
#include "directory.h"
|
#include "Directory.hxx"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
#include "decoder_plugin.h"
|
#include "decoder_plugin.h"
|
||||||
#include "Mapper.hxx"
|
#include "Mapper.hxx"
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "UpdateDatabase.hxx"
|
#include "UpdateDatabase.hxx"
|
||||||
#include "UpdateRemove.hxx"
|
#include "UpdateRemove.hxx"
|
||||||
#include "PlaylistVector.hxx"
|
#include "PlaylistVector.hxx"
|
||||||
#include "directory.h"
|
#include "Directory.hxx"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
#include "DatabaseLock.hxx"
|
#include "DatabaseLock.hxx"
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#include "config.h" /* must be first for large file support */
|
#include "config.h" /* must be first for large file support */
|
||||||
#include "UpdateIO.hxx"
|
#include "UpdateIO.hxx"
|
||||||
#include "directory.h"
|
#include "Directory.hxx"
|
||||||
#include "Mapper.hxx"
|
#include "Mapper.hxx"
|
||||||
#include "glib_compat.h"
|
#include "glib_compat.h"
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include "UpdateDatabase.hxx"
|
#include "UpdateDatabase.hxx"
|
||||||
#include "UpdateContainer.hxx"
|
#include "UpdateContainer.hxx"
|
||||||
#include "DatabaseLock.hxx"
|
#include "DatabaseLock.hxx"
|
||||||
#include "directory.h"
|
#include "Directory.hxx"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
#include "decoder_plugin.h"
|
#include "decoder_plugin.h"
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include "UpdateSong.hxx"
|
#include "UpdateSong.hxx"
|
||||||
#include "UpdateArchive.hxx"
|
#include "UpdateArchive.hxx"
|
||||||
#include "DatabaseLock.hxx"
|
#include "DatabaseLock.hxx"
|
||||||
#include "directory.h"
|
#include "Directory.hxx"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
#include "PlaylistVector.hxx"
|
#include "PlaylistVector.hxx"
|
||||||
#include "Mapper.hxx"
|
#include "Mapper.hxx"
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "DatabasePlugin.hxx"
|
#include "DatabasePlugin.hxx"
|
||||||
#include "DatabaseSelection.hxx"
|
#include "DatabaseSelection.hxx"
|
||||||
#include "PlaylistVector.hxx"
|
#include "PlaylistVector.hxx"
|
||||||
|
#include "Directory.hxx"
|
||||||
#include "gcc.h"
|
#include "gcc.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -31,8 +32,6 @@ extern "C" {
|
|||||||
#include "tag.h"
|
#include "tag.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "directory.h"
|
|
||||||
|
|
||||||
#undef MPD_DIRECTORY_H
|
#undef MPD_DIRECTORY_H
|
||||||
#undef MPD_SONG_H
|
#undef MPD_SONG_H
|
||||||
#include <mpd/client.h>
|
#include <mpd/client.h>
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "SimpleDatabasePlugin.hxx"
|
#include "SimpleDatabasePlugin.hxx"
|
||||||
#include "DatabaseSelection.hxx"
|
#include "DatabaseSelection.hxx"
|
||||||
#include "DatabaseHelpers.hxx"
|
#include "DatabaseHelpers.hxx"
|
||||||
|
#include "Directory.hxx"
|
||||||
#include "SongFilter.hxx"
|
#include "SongFilter.hxx"
|
||||||
#include "DatabaseSave.hxx"
|
#include "DatabaseSave.hxx"
|
||||||
#include "DatabaseLock.hxx"
|
#include "DatabaseLock.hxx"
|
||||||
@ -30,8 +31,6 @@ extern "C" {
|
|||||||
#include "conf.h"
|
#include "conf.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "directory.h"
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "DatabaseRegistry.hxx"
|
#include "DatabaseRegistry.hxx"
|
||||||
#include "DatabasePlugin.hxx"
|
#include "DatabasePlugin.hxx"
|
||||||
#include "DatabaseSelection.hxx"
|
#include "DatabaseSelection.hxx"
|
||||||
#include "directory.h"
|
#include "Directory.hxx"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
#include "PlaylistVector.hxx"
|
#include "PlaylistVector.hxx"
|
||||||
|
|
||||||
|
@ -1,19 +1,16 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
extern "C" {
|
||||||
#include "queue.h"
|
#include "queue.h"
|
||||||
|
}
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
#include "directory.h"
|
#include "Directory.hxx"
|
||||||
|
|
||||||
struct directory detached_root;
|
struct directory detached_root;
|
||||||
|
|
||||||
struct song *
|
struct song *
|
||||||
song_dup_detached(const struct song *src)
|
song_dup_detached(const struct song *src)
|
||||||
{
|
{
|
||||||
union {
|
return const_cast<song *>(src);
|
||||||
const struct song *in;
|
|
||||||
struct song *out;
|
|
||||||
} u = { .in = src };
|
|
||||||
|
|
||||||
return u.out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
Loading…
Reference in New Issue
Block a user