doc
m4
scripts
src
AudioCompress
archive
command
cue
db
decoder
encoder
event
filter
fs
input
mixer
output
pcm
playlist
protocol
system
tag
thread
util
win
ArchiveDomain.cxx
ArchiveDomain.hxx
ArchiveFile.hxx
ArchiveList.cxx
ArchiveList.hxx
ArchiveLookup.cxx
ArchiveLookup.hxx
ArchivePlugin.cxx
ArchivePlugin.hxx
ArchiveVisitor.hxx
AudioConfig.cxx
AudioConfig.hxx
AudioFormat.cxx
AudioFormat.hxx
AudioParser.cxx
AudioParser.hxx
AvahiPoll.cxx
AvahiPoll.hxx
CheckAudioFormat.cxx
CheckAudioFormat.hxx
Client.cxx
Client.hxx
ClientEvent.cxx
ClientExpire.cxx
ClientFile.cxx
ClientFile.hxx
ClientGlobal.cxx
ClientIdle.cxx
ClientInternal.hxx
ClientList.cxx
ClientList.hxx
ClientMessage.cxx
ClientMessage.hxx
ClientNew.cxx
ClientProcess.cxx
ClientRead.cxx
ClientSubscribe.cxx
ClientWrite.cxx
CommandLine.cxx
CommandLine.hxx
Compiler.h
ConfigData.cxx
ConfigData.hxx
ConfigDefaults.hxx
ConfigError.cxx
ConfigError.hxx
ConfigFile.cxx
ConfigFile.hxx
ConfigGlobal.cxx
ConfigGlobal.hxx
ConfigOption.hxx
ConfigParser.cxx
ConfigParser.hxx
ConfigPath.cxx
ConfigPath.hxx
ConfigTemplates.cxx
ConfigTemplates.hxx
CrossFade.cxx
CrossFade.hxx
Daemon.cxx
Daemon.hxx
DatabaseError.cxx
DatabaseError.hxx
DatabaseGlue.cxx
DatabaseGlue.hxx
DatabaseHelpers.cxx
DatabaseHelpers.hxx
DatabaseListener.hxx
DatabaseLock.cxx
DatabaseLock.hxx
DatabasePlaylist.cxx
DatabasePlaylist.hxx
DatabasePlugin.hxx
DatabasePrint.cxx
DatabasePrint.hxx
DatabaseQueue.cxx
DatabaseQueue.hxx
DatabaseRegistry.cxx
DatabaseRegistry.hxx
DatabaseSave.cxx
DatabaseSave.hxx
DatabaseSelection.cxx
DatabaseSelection.hxx
DatabaseSimple.hxx
DatabaseSong.cxx
DatabaseSong.hxx
DatabaseVisitor.hxx
DecoderAPI.cxx
DecoderAPI.hxx
DecoderBuffer.cxx
DecoderBuffer.hxx
DecoderCommand.hxx
DecoderControl.cxx
DecoderControl.hxx
DecoderError.cxx
DecoderError.hxx
DecoderInternal.cxx
DecoderInternal.hxx
DecoderList.cxx
DecoderList.hxx
DecoderPlugin.cxx
DecoderPlugin.hxx
DecoderPrint.cxx
DecoderPrint.hxx
DecoderThread.cxx
DecoderThread.hxx
DespotifyUtils.cxx
DespotifyUtils.hxx
DetachedSong.cxx
DetachedSong.hxx
Directory.cxx
Directory.hxx
DirectorySave.cxx
DirectorySave.hxx
EncoderAPI.hxx
EncoderList.cxx
EncoderList.hxx
EncoderPlugin.hxx
ExcludeList.cxx
ExcludeList.hxx
Expat.cxx
Expat.hxx
FilterConfig.cxx
FilterConfig.hxx
FilterInternal.hxx
FilterPlugin.cxx
FilterPlugin.hxx
FilterRegistry.cxx
FilterRegistry.hxx
GlobalEvents.cxx
GlobalEvents.hxx
IOThread.cxx
IOThread.hxx
IcyMetaDataParser.cxx
IcyMetaDataParser.hxx
IcyMetaDataServer.cxx
IcyMetaDataServer.hxx
IdTable.hxx
Idle.cxx
Idle.hxx
InotifyDomain.cxx
InotifyDomain.hxx
InotifyQueue.cxx
InotifyQueue.hxx
InotifySource.cxx
InotifySource.hxx
InotifyUpdate.cxx
InotifyUpdate.hxx
InputInit.cxx
InputInit.hxx
InputPlugin.hxx
InputRegistry.cxx
InputRegistry.hxx
InputStream.cxx
InputStream.hxx
Instance.cxx
Instance.hxx
LightSong.cxx
LightSong.hxx
Listen.cxx
Listen.hxx
Log.cxx
Log.hxx
LogBackend.cxx
LogBackend.hxx
LogInit.cxx
LogInit.hxx
LogLevel.hxx
LogV.hxx
Main.cxx
Main.hxx
Mapper.cxx
Mapper.hxx
MemorySongEnumerator.cxx
MemorySongEnumerator.hxx
MixRampInfo.hxx
MixerAll.cxx
MixerAll.hxx
MixerControl.cxx
MixerControl.hxx
MixerInternal.hxx
MixerList.hxx
MixerPlugin.hxx
MixerType.cxx
MixerType.hxx
MusicBuffer.cxx
MusicBuffer.hxx
MusicChunk.cxx
MusicChunk.hxx
MusicPipe.cxx
MusicPipe.hxx
OutputAPI.hxx
OutputAll.cxx
OutputAll.hxx
OutputCommand.cxx
OutputCommand.hxx
OutputControl.cxx
OutputControl.hxx
OutputError.cxx
OutputError.hxx
OutputFinish.cxx
OutputInit.cxx
OutputInternal.hxx
OutputList.cxx
OutputList.hxx
OutputPlugin.cxx
OutputPlugin.hxx
OutputPrint.cxx
OutputPrint.hxx
OutputState.cxx
OutputState.hxx
OutputThread.cxx
OutputThread.hxx
Page.cxx
Page.hxx
Partition.cxx
Partition.hxx
Permission.cxx
Permission.hxx
PidFile.hxx
PlayerControl.cxx
PlayerControl.hxx
PlayerThread.cxx
PlayerThread.hxx
Playlist.cxx
Playlist.hxx
PlaylistAny.cxx
PlaylistAny.hxx
PlaylistControl.cxx
PlaylistDatabase.cxx
PlaylistDatabase.hxx
PlaylistEdit.cxx
PlaylistError.cxx
PlaylistError.hxx
PlaylistFile.cxx
PlaylistFile.hxx
PlaylistGlobal.cxx
PlaylistGlobal.hxx
PlaylistInfo.hxx
PlaylistMapper.cxx
PlaylistMapper.hxx
PlaylistPlugin.hxx
PlaylistPrint.cxx
PlaylistPrint.hxx
PlaylistQueue.cxx
PlaylistQueue.hxx
PlaylistRegistry.cxx
PlaylistRegistry.hxx
PlaylistSave.cxx
PlaylistSave.hxx
PlaylistSong.cxx
PlaylistSong.hxx
PlaylistState.cxx
PlaylistState.hxx
PlaylistTag.cxx
PlaylistUpdate.cxx
PlaylistVector.cxx
PlaylistVector.hxx
Queue.cxx
Queue.hxx
QueuePrint.cxx
QueuePrint.hxx
QueueSave.cxx
QueueSave.hxx
ReplayGainConfig.cxx
ReplayGainConfig.hxx
ReplayGainInfo.cxx
ReplayGainInfo.hxx
SignalHandlers.cxx
SignalHandlers.hxx
Song.cxx
Song.hxx
SongEnumerator.hxx
SongFilter.cxx
SongFilter.hxx
SongPrint.cxx
SongPrint.hxx
SongSave.cxx
SongSave.hxx
SongSort.cxx
SongSort.hxx
SongSticker.cxx
SongSticker.hxx
SongUpdate.cxx
StateFile.cxx
StateFile.hxx
Stats.cxx
Stats.hxx
StickerDatabase.cxx
StickerDatabase.hxx
StickerPrint.cxx
StickerPrint.hxx
TagFile.cxx
TagFile.hxx
TagPrint.cxx
TagPrint.hxx
TagSave.cxx
TagSave.hxx
TagStream.cxx
TagStream.hxx
TextInputStream.cxx
TextInputStream.hxx
TimePrint.cxx
TimePrint.hxx
Timer.cxx
Timer.hxx
UpdateArchive.cxx
UpdateArchive.hxx
UpdateContainer.cxx
UpdateContainer.hxx
UpdateDatabase.cxx
UpdateDatabase.hxx
UpdateDomain.cxx
UpdateDomain.hxx
UpdateGlue.cxx
UpdateGlue.hxx
UpdateIO.cxx
UpdateIO.hxx
UpdateInternal.hxx
UpdateQueue.cxx
UpdateQueue.hxx
UpdateRemove.cxx
UpdateRemove.hxx
UpdateSong.cxx
UpdateSong.hxx
UpdateWalk.cxx
UpdateWalk.hxx
Volume.cxx
Volume.hxx
Win32Main.cxx
ZeroconfAvahi.cxx
ZeroconfAvahi.hxx
ZeroconfBonjour.cxx
ZeroconfBonjour.hxx
ZeroconfGlue.cxx
ZeroconfGlue.hxx
ZeroconfInternal.hxx
check.h
gerror.h
ls.cxx
ls.hxx
notify.cxx
notify.hxx
open.h
poison.h
test
.gitignore
AUTHORS
COPYING
INSTALL
Makefile.am
NEWS
README
UPGRADING
autogen.sh
configure.ac
mpd.service.in
valgrind.suppressions

Detach the Song class completely from the public API, only to be used by SimpleDatabase and the update thread.
38 lines
1.3 KiB
C++
38 lines
1.3 KiB
C++
/*
|
|
* Copyright (C) 2003-2014 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_DATABASE_VISITOR_HXX
|
|
#define MPD_DATABASE_VISITOR_HXX
|
|
|
|
#include <functional>
|
|
|
|
struct Directory;
|
|
struct LightSong;
|
|
struct PlaylistInfo;
|
|
class Error;
|
|
|
|
typedef std::function<bool(const Directory &, Error &)> VisitDirectory;
|
|
typedef std::function<bool(const LightSong &, Error &)> VisitSong;
|
|
typedef std::function<bool(const PlaylistInfo &, const Directory &,
|
|
Error &)> VisitPlaylist;
|
|
|
|
typedef std::function<bool(const char *, Error &)> VisitString;
|
|
|
|
#endif
|