aboutsummaryrefslogtreecommitdiff
path: root/src/playlist
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-26 01:04:02 +0100
committerMax Kellermann <max@duempel.org>2013-01-26 01:17:43 +0100
commit86b0adc82ce64bb08518088c35ce754dc96d7062 (patch)
treec0a4c88fa599d4091cf855849382785cf0bebef8 /src/playlist
parentba49f20f685d7e6d25fcbf2af60d389fedc67210 (diff)
playlist/*: convert to C++
Diffstat (limited to 'src/playlist')
-rw-r--r--src/playlist/DespotifyPlaylistPlugin.cxx2
-rw-r--r--src/playlist/EmbeddedCuePlaylistPlugin.cxx (renamed from src/playlist/embcue_playlist_plugin.c)35
-rw-r--r--src/playlist/EmbeddedCuePlaylistPlugin.hxx (renamed from src/playlist/embcue_playlist_plugin.h)6
-rw-r--r--src/playlist/LastFMPlaylistPlugin.cxx (renamed from src/playlist/lastfm_playlist_plugin.c)23
-rw-r--r--src/playlist/LastFMPlaylistPlugin.hxx (renamed from src/playlist/lastfm_playlist_plugin.h)6
-rw-r--r--src/playlist/SoundCloudPlaylistPlugin.cxx (renamed from src/playlist/soundcloud_playlist_plugin.c)21
-rw-r--r--src/playlist/SoundCloudPlaylistPlugin.hxx (renamed from src/playlist/soundcloud_playlist_plugin.h)6
7 files changed, 57 insertions, 42 deletions
diff --git a/src/playlist/DespotifyPlaylistPlugin.cxx b/src/playlist/DespotifyPlaylistPlugin.cxx
index 049c9499..3466d568 100644
--- a/src/playlist/DespotifyPlaylistPlugin.cxx
+++ b/src/playlist/DespotifyPlaylistPlugin.cxx
@@ -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"
diff --git a/src/playlist/embcue_playlist_plugin.c b/src/playlist/EmbeddedCuePlaylistPlugin.cxx
index 6d9a957f..2337f806 100644
--- a/src/playlist/embcue_playlist_plugin.c
+++ b/src/playlist/EmbeddedCuePlaylistPlugin.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
*
* 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",
-
- .open_uri = embcue_playlist_open_uri,
- .close = embcue_playlist_close,
- .read = embcue_playlist_read,
-
- .suffixes = embcue_playlist_suffixes,
- .mime_types = NULL,
+ "cue",
+
+ nullptr,
+ nullptr,
+ embcue_playlist_open_uri,
+ nullptr,
+ embcue_playlist_close,
+ embcue_playlist_read,
+
+ embcue_playlist_suffixes,
+ nullptr,
+ nullptr,
};
diff --git a/src/playlist/embcue_playlist_plugin.h b/src/playlist/EmbeddedCuePlaylistPlugin.hxx
index c5f21b27..e306730f 100644
--- a/src/playlist/embcue_playlist_plugin.h
+++ b/src/playlist/EmbeddedCuePlaylistPlugin.hxx
@@ -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;
diff --git a/src/playlist/lastfm_playlist_plugin.c b/src/playlist/LastFMPlaylistPlugin.cxx
index ead14dea..67192574 100644
--- a/src/playlist/lastfm_playlist_plugin.c
+++ b/src/playlist/LastFMPlaylistPlugin.cxx
@@ -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,
};
diff --git a/src/playlist/lastfm_playlist_plugin.h b/src/playlist/LastFMPlaylistPlugin.hxx
index 46a8b0ca..fe0e206d 100644
--- a/src/playlist/lastfm_playlist_plugin.h
+++ b/src/playlist/LastFMPlaylistPlugin.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
*
* 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;
diff --git a/src/playlist/soundcloud_playlist_plugin.c b/src/playlist/SoundCloudPlaylistPlugin.cxx
index 7c79f880..71a2af6c 100644
--- a/src/playlist/soundcloud_playlist_plugin.c
+++ b/src/playlist/SoundCloudPlaylistPlugin.cxx
@@ -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,
};
diff --git a/src/playlist/soundcloud_playlist_plugin.h b/src/playlist/SoundCloudPlaylistPlugin.hxx
index e09e2dd4..7c121328 100644
--- a/src/playlist/soundcloud_playlist_plugin.h
+++ b/src/playlist/SoundCloudPlaylistPlugin.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
*
* 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;