playlist/*: convert to C++
This commit is contained in:
parent
ba49f20f68
commit
86b0adc82c
16
Makefile.am
16
Makefile.am
|
@ -97,14 +97,12 @@ mpd_headers = \
|
|||
src/Playlist.hxx \
|
||||
src/playlist_error.h \
|
||||
src/playlist_plugin.h \
|
||||
src/playlist_list.h \
|
||||
src/playlist/extm3u_playlist_plugin.h \
|
||||
src/playlist/m3u_playlist_plugin.h \
|
||||
src/playlist/pls_playlist_plugin.h \
|
||||
src/playlist/xspf_playlist_plugin.h \
|
||||
src/playlist/asx_playlist_plugin.h \
|
||||
src/playlist/rss_playlist_plugin.h \
|
||||
src/playlist/lastfm_playlist_plugin.h \
|
||||
src/playlist/cue_playlist_plugin.h \
|
||||
src/poison.h \
|
||||
src/riff.h \
|
||||
|
@ -928,9 +926,9 @@ libplaylist_plugins_a_SOURCES = \
|
|||
src/playlist/asx_playlist_plugin.c \
|
||||
src/playlist/rss_playlist_plugin.c \
|
||||
src/playlist/cue_playlist_plugin.c \
|
||||
src/playlist/embcue_playlist_plugin.c \
|
||||
src/playlist/embcue_playlist_plugin.h \
|
||||
src/playlist_list.c
|
||||
src/playlist/EmbeddedCuePlaylistPlugin.cxx \
|
||||
src/playlist/EmbeddedCuePlaylistPlugin.hxx \
|
||||
src/PlaylistRegistry.cxx src/PlaylistRegistry.hxx
|
||||
libplaylist_plugins_a_CPPFLAGS = $(AM_CPPFLAGS) \
|
||||
$(YAJL_CFLAGS) \
|
||||
$(patsubst -I%/FLAC,-I%,$(FLAC_CFLAGS))
|
||||
|
@ -940,7 +938,9 @@ PLAYLIST_LIBS = \
|
|||
$(FLAC_LIBS)
|
||||
|
||||
if ENABLE_LASTFM
|
||||
libplaylist_plugins_a_SOURCES += src/playlist/lastfm_playlist_plugin.c
|
||||
libplaylist_plugins_a_SOURCES += \
|
||||
src/playlist/LastFMPlaylistPlugin.cxx \
|
||||
src/playlist/LastFMPlaylistPlugin.hxx
|
||||
endif
|
||||
|
||||
if ENABLE_DESPOTIFY
|
||||
|
@ -951,8 +951,8 @@ endif
|
|||
|
||||
if ENABLE_SOUNDCLOUD
|
||||
libplaylist_plugins_a_SOURCES += \
|
||||
src/playlist/soundcloud_playlist_plugin.h \
|
||||
src/playlist/soundcloud_playlist_plugin.c
|
||||
src/playlist/SoundCloudPlaylistPlugin.cxx \
|
||||
src/playlist/SoundCloudPlaylistPlugin.hxx
|
||||
PLAYLIST_LIBS += $(YAJL_LIBS)
|
||||
endif
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include "output_plugin.h"
|
||||
#include "InputRegistry.hxx"
|
||||
#include "InputPlugin.hxx"
|
||||
#include "playlist_list.h"
|
||||
#include "PlaylistRegistry.hxx"
|
||||
#include "playlist_plugin.h"
|
||||
#include "mpd_error.h"
|
||||
#include "glib_compat.h"
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include "event/Loop.hxx"
|
||||
#include "IOThread.hxx"
|
||||
#include "fs/Path.hxx"
|
||||
#include "PlaylistRegistry.hxx"
|
||||
|
||||
extern "C" {
|
||||
#include "daemon.h"
|
||||
|
@ -55,7 +56,6 @@ extern "C" {
|
|||
#include "audio_config.h"
|
||||
#include "pcm_resample.h"
|
||||
#include "decoder_list.h"
|
||||
#include "playlist_list.h"
|
||||
#include "zeroconf.h"
|
||||
}
|
||||
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
#include "config.h"
|
||||
#include "PlaylistAny.hxx"
|
||||
#include "PlaylistMapper.hxx"
|
||||
#include "PlaylistRegistry.hxx"
|
||||
#include "input_stream.h"
|
||||
|
||||
extern "C" {
|
||||
#include "playlist_list.h"
|
||||
#include "uri.h"
|
||||
}
|
||||
|
||||
|
|
|
@ -20,11 +20,11 @@
|
|||
#include "config.h"
|
||||
#include "PlaylistMapper.hxx"
|
||||
#include "PlaylistFile.hxx"
|
||||
#include "PlaylistRegistry.hxx"
|
||||
#include "Mapper.hxx"
|
||||
#include "fs/Path.hxx"
|
||||
|
||||
extern "C" {
|
||||
#include "playlist_list.h"
|
||||
#include "uri.h"
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "PlaylistAny.hxx"
|
||||
#include "PlaylistSong.hxx"
|
||||
#include "Playlist.hxx"
|
||||
#include "PlaylistRegistry.hxx"
|
||||
#include "QueuePrint.hxx"
|
||||
#include "SongPrint.hxx"
|
||||
#include "DatabaseGlue.hxx"
|
||||
|
@ -31,7 +32,6 @@
|
|||
#include "input_stream.h"
|
||||
|
||||
extern "C" {
|
||||
#include "playlist_list.h"
|
||||
#include "playlist_plugin.h"
|
||||
#include "song.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
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
@ -18,21 +18,25 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "playlist_list.h"
|
||||
#include "PlaylistRegistry.hxx"
|
||||
#include "playlist_plugin.h"
|
||||
#include "playlist/extm3u_playlist_plugin.h"
|
||||
#include "playlist/m3u_playlist_plugin.h"
|
||||
#include "playlist/xspf_playlist_plugin.h"
|
||||
#include "playlist/lastfm_playlist_plugin.h"
|
||||
#include "playlist/LastFMPlaylistPlugin.hxx"
|
||||
#include "playlist/DespotifyPlaylistPlugin.hxx"
|
||||
#include "playlist/soundcloud_playlist_plugin.h"
|
||||
#include "playlist/SoundCloudPlaylistPlugin.hxx"
|
||||
#include "playlist/pls_playlist_plugin.h"
|
||||
#include "playlist/asx_playlist_plugin.h"
|
||||
#include "playlist/rss_playlist_plugin.h"
|
||||
#include "playlist/cue_playlist_plugin.h"
|
||||
#include "playlist/embcue_playlist_plugin.h"
|
||||
#include "playlist/EmbeddedCuePlaylistPlugin.hxx"
|
||||
#include "input_stream.h"
|
||||
|
||||
extern "C" {
|
||||
#include "uri.h"
|
||||
}
|
||||
|
||||
#include "string_util.h"
|
||||
#include "conf.h"
|
||||
#include "mpd_error.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
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef MPD_PLAYLIST_LIST_H
|
||||
#define MPD_PLAYLIST_LIST_H
|
||||
#ifndef MPD_PLAYLIST_REGISTRY_HXX
|
||||
#define MPD_PLAYLIST_REGISTRY_HXX
|
||||
|
||||
#include <glib.h>
|
||||
|
|
@ -28,6 +28,7 @@
|
|||
#include "Directory.hxx"
|
||||
#include "song.h"
|
||||
#include "PlaylistVector.hxx"
|
||||
#include "PlaylistRegistry.hxx"
|
||||
#include "Mapper.hxx"
|
||||
#include "ExcludeList.hxx"
|
||||
#include "conf.h"
|
||||
|
@ -35,7 +36,6 @@
|
|||
|
||||
extern "C" {
|
||||
#include "uri.h"
|
||||
#include "playlist_list.h"
|
||||
}
|
||||
|
||||
#include <glib.h>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "DespotifyPlaylistPlugin.hxx"
|
||||
#include "DespotifyUtils.hxx"
|
||||
#include "playlist_plugin.h"
|
||||
#include "playlist_list.h"
|
||||
#include "PlaylistRegistry.hxx"
|
||||
#include "conf.h"
|
||||
#include "uri.h"
|
||||
#include "tag.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
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
@ -24,15 +24,18 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "playlist/embcue_playlist_plugin.h"
|
||||
#include "EmbeddedCuePlaylistPlugin.hxx"
|
||||
#include "playlist_plugin.h"
|
||||
#include "tag.h"
|
||||
#include "tag_handler.h"
|
||||
#include "song.h"
|
||||
|
||||
extern "C" {
|
||||
#include "tag_file.h"
|
||||
#include "tag_ape.h"
|
||||
#include "tag_id3.h"
|
||||
#include "song.h"
|
||||
#include "cue/cue_parser.h"
|
||||
}
|
||||
|
||||
#include <glib.h>
|
||||
#include <assert.h>
|
||||
|
@ -67,7 +70,7 @@ struct embcue_playlist {
|
|||
static void
|
||||
embcue_tag_pair(const char *name, const char *value, void *ctx)
|
||||
{
|
||||
struct embcue_playlist *playlist = ctx;
|
||||
struct embcue_playlist *playlist = (struct embcue_playlist *)ctx;
|
||||
|
||||
if (playlist->cuesheet == NULL &&
|
||||
g_ascii_strcasecmp(name, "cuesheet") == 0)
|
||||
|
@ -75,7 +78,9 @@ embcue_tag_pair(const char *name, const char *value, void *ctx)
|
|||
}
|
||||
|
||||
static const struct tag_handler embcue_tag_handler = {
|
||||
.pair = embcue_tag_pair,
|
||||
nullptr,
|
||||
nullptr,
|
||||
embcue_tag_pair,
|
||||
};
|
||||
|
||||
static struct playlist_provider *
|
||||
|
@ -170,12 +175,16 @@ static const char *const embcue_playlist_suffixes[] = {
|
|||
};
|
||||
|
||||
const struct playlist_plugin embcue_playlist_plugin = {
|
||||
.name = "cue",
|
||||
"cue",
|
||||
|
||||
.open_uri = embcue_playlist_open_uri,
|
||||
.close = embcue_playlist_close,
|
||||
.read = embcue_playlist_read,
|
||||
nullptr,
|
||||
nullptr,
|
||||
embcue_playlist_open_uri,
|
||||
nullptr,
|
||||
embcue_playlist_close,
|
||||
embcue_playlist_read,
|
||||
|
||||
.suffixes = embcue_playlist_suffixes,
|
||||
.mime_types = NULL,
|
||||
embcue_playlist_suffixes,
|
||||
nullptr,
|
||||
nullptr,
|
||||
};
|
|
@ -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
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef MPD_PLAYLIST_EMBCUE_PLAYLIST_PLUGIN_H
|
||||
#define MPD_PLAYLIST_EMBCUE_PLAYLIST_PLUGIN_H
|
||||
#ifndef MPD_EMBCUE_PLAYLIST_PLUGIN_HXX
|
||||
#define MPD_EMBCUE_PLAYLIST_PLUGIN_HXX
|
||||
|
||||
extern const struct playlist_plugin embcue_playlist_plugin;
|
||||
|
|
@ -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
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
@ -18,9 +18,9 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "playlist/lastfm_playlist_plugin.h"
|
||||
#include "LastFMPlaylistPlugin.hxx"
|
||||
#include "playlist_plugin.h"
|
||||
#include "playlist_list.h"
|
||||
#include "PlaylistRegistry.hxx"
|
||||
#include "conf.h"
|
||||
#include "uri.h"
|
||||
#include "song.h"
|
||||
|
@ -284,13 +284,16 @@ static const char *const lastfm_schemes[] = {
|
|||
};
|
||||
|
||||
const struct playlist_plugin lastfm_playlist_plugin = {
|
||||
.name = "lastfm",
|
||||
"lastfm",
|
||||
|
||||
.init = lastfm_init,
|
||||
.finish = lastfm_finish,
|
||||
.open_uri = lastfm_open_uri,
|
||||
.close = lastfm_close,
|
||||
.read = lastfm_read,
|
||||
lastfm_init,
|
||||
lastfm_finish,
|
||||
lastfm_open_uri,
|
||||
nullptr,
|
||||
lastfm_close,
|
||||
lastfm_read,
|
||||
|
||||
.schemes = lastfm_schemes,
|
||||
lastfm_schemes,
|
||||
nullptr,
|
||||
nullptr,
|
||||
};
|
|
@ -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
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef MPD_PLAYLIST_LASTFM_PLAYLIST_PLUGIN_H
|
||||
#define MPD_PLAYLIST_LASTFM_PLAYLIST_PLUGIN_H
|
||||
#ifndef MPD_LASTFM_PLAYLIST_PLUGIN_HXX
|
||||
#define MPD_LASTFM_PLAYLIST_PLUGIN_HXX
|
||||
|
||||
extern const struct playlist_plugin lastfm_playlist_plugin;
|
||||
|
|
@ -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
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "playlist/soundcloud_playlist_plugin.h"
|
||||
#include "SoundCloudPlaylistPlugin.hxx"
|
||||
#include "conf.h"
|
||||
#include "input_stream.h"
|
||||
#include "playlist_plugin.h"
|
||||
|
@ -434,15 +434,18 @@ static const char *const soundcloud_schemes[] = {
|
|||
};
|
||||
|
||||
const struct playlist_plugin soundcloud_playlist_plugin = {
|
||||
.name = "soundcloud",
|
||||
"soundcloud",
|
||||
|
||||
.init = soundcloud_init,
|
||||
.finish = soundcloud_finish,
|
||||
.open_uri = soundcloud_open_uri,
|
||||
.close = soundcloud_close,
|
||||
.read = soundcloud_read,
|
||||
soundcloud_init,
|
||||
soundcloud_finish,
|
||||
soundcloud_open_uri,
|
||||
nullptr,
|
||||
soundcloud_close,
|
||||
soundcloud_read,
|
||||
|
||||
.schemes = soundcloud_schemes,
|
||||
soundcloud_schemes,
|
||||
nullptr,
|
||||
nullptr,
|
||||
};
|
||||
|
||||
|
|
@ -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
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef MPD_PLAYLIST_SOUNDCLOUD_PLAYLIST_PLUGIN_H
|
||||
#define MPD_PLAYLIST_SOUNDCLOUD_PLAYLIST_PLUGIN_H
|
||||
#ifndef MPD_SOUNDCLOUD_PLAYLIST_PLUGIN_HXX
|
||||
#define MPD_SOUNDCLOUD_PLAYLIST_PLUGIN_HXX
|
||||
|
||||
extern const struct playlist_plugin soundcloud_playlist_plugin;
|
||||
|
|
@ -26,11 +26,11 @@
|
|||
#include "decoder_api.h"
|
||||
#include "InputInit.hxx"
|
||||
#include "IOThread.hxx"
|
||||
#include "PlaylistRegistry.hxx"
|
||||
#include "playlist_plugin.h"
|
||||
|
||||
extern "C" {
|
||||
#include "decoder_list.h"
|
||||
#include "playlist_list.h"
|
||||
#include "playlist_plugin.h"
|
||||
}
|
||||
|
||||
#include <glib.h>
|
||||
|
|
Loading…
Reference in New Issue