diff options
Diffstat (limited to '')
-rw-r--r-- | src/playlist/M3uPlaylistPlugin.cxx (renamed from src/playlist/m3u_playlist_plugin.c) | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/src/playlist/m3u_playlist_plugin.c b/src/playlist/M3uPlaylistPlugin.cxx index 45b70d2b1..eeecd2779 100644 --- a/src/playlist/m3u_playlist_plugin.c +++ b/src/playlist/M3uPlaylistPlugin.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,15 +18,17 @@ */ #include "config.h" -#include "playlist/m3u_playlist_plugin.h" -#include "playlist_plugin.h" -#include "text_input_stream.h" -#include "uri.h" +#include "M3uPlaylistPlugin.hxx" +#include "PlaylistPlugin.hxx" #include "song.h" +extern "C" { +#include "text_input_stream.h" +} + #include <glib.h> -struct m3u_playlist { +struct M3uPlaylist { struct playlist_provider base; struct text_input_stream *tis; @@ -35,7 +37,7 @@ struct m3u_playlist { static struct playlist_provider * m3u_open_stream(struct input_stream *is) { - struct m3u_playlist *playlist = g_new(struct m3u_playlist, 1); + M3uPlaylist *playlist = g_new(M3uPlaylist, 1); playlist_provider_init(&playlist->base, &m3u_playlist_plugin); playlist->tis = text_input_stream_new(is); @@ -46,7 +48,7 @@ m3u_open_stream(struct input_stream *is) static void m3u_close(struct playlist_provider *_playlist) { - struct m3u_playlist *playlist = (struct m3u_playlist *)_playlist; + M3uPlaylist *playlist = (M3uPlaylist *)_playlist; text_input_stream_free(playlist->tis); g_free(playlist); @@ -55,7 +57,7 @@ m3u_close(struct playlist_provider *_playlist) static struct song * m3u_read(struct playlist_provider *_playlist) { - struct m3u_playlist *playlist = (struct m3u_playlist *)_playlist; + M3uPlaylist *playlist = (M3uPlaylist *)_playlist; const char *line; do { @@ -81,12 +83,16 @@ static const char *const m3u_mime_types[] = { }; const struct playlist_plugin m3u_playlist_plugin = { - .name = "m3u", + "m3u", - .open_stream = m3u_open_stream, - .close = m3u_close, - .read = m3u_read, + nullptr, + nullptr, + nullptr, + m3u_open_stream, + m3u_close, + m3u_read, - .suffixes = m3u_suffixes, - .mime_types = m3u_mime_types, + nullptr, + m3u_suffixes, + m3u_mime_types, }; |