aboutsummaryrefslogtreecommitdiffstats
path: root/src/input
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-21 18:24:26 +0100
committerMax Kellermann <max@duempel.org>2013-01-21 19:01:10 +0100
commit9ec069104f82184fbdc33bb82ead393441a41728 (patch)
treed887d486682b9f3916f84032d08812954d6b9aeb /src/input
parent7d21d60dbaefa90a2d52636766f7d060cb1cf481 (diff)
downloadmpd-9ec069104f82184fbdc33bb82ead393441a41728.tar.gz
mpd-9ec069104f82184fbdc33bb82ead393441a41728.tar.xz
mpd-9ec069104f82184fbdc33bb82ead393441a41728.zip
input,playlist/despotify: convert to C++
Diffstat (limited to 'src/input')
-rw-r--r--src/input/DespotifyInputPlugin.cxx (renamed from src/input/despotify_input_plugin.c)28
-rw-r--r--src/input/DespotifyInputPlugin.hxx (renamed from src/input/despotify_input_plugin.h)6
2 files changed, 21 insertions, 13 deletions
diff --git a/src/input/despotify_input_plugin.c b/src/input/DespotifyInputPlugin.cxx
index 200a0afd6..b42979e3b 100644
--- a/src/input/despotify_input_plugin.c
+++ b/src/input/DespotifyInputPlugin.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 The Music Player Daemon Project
+ * Copyright (C) 2011-2013 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -18,18 +18,21 @@
*/
#include "config.h"
-#include "input/despotify_input_plugin.h"
+#include "DespotifyInputPlugin.hxx"
+#include "DespotifyUtils.hxx"
#include "input_internal.h"
#include "input_plugin.h"
#include "tag.h"
-#include "despotify_utils.h"
+
+extern "C" {
+#include <despotify.h>
+}
#include <glib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
-#include <despotify.h>
#include <stdio.h>
@@ -220,11 +223,16 @@ input_despotify_tag(struct input_stream *is)
}
const struct input_plugin input_plugin_despotify = {
- .name = "spt",
- .open = input_despotify_open,
- .close = input_despotify_close,
- .read = input_despotify_read,
- .eof = input_despotify_eof,
- .seek = input_despotify_seek,
+ "spt",
+ nullptr,
+ nullptr,
+ input_despotify_open,
+ input_despotify_close,
+ nullptr,
+ nullptr,
.tag = input_despotify_tag,
+ nullptr,
+ input_despotify_read,
+ input_despotify_eof,
+ input_despotify_seek,
};
diff --git a/src/input/despotify_input_plugin.h b/src/input/DespotifyInputPlugin.hxx
index 4c070d882..00d699408 100644
--- a/src/input/despotify_input_plugin.h
+++ b/src/input/DespotifyInputPlugin.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011 The Music Player Daemon Project
+ * Copyright (C) 2011-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 INPUT_DESPOTIFY_H
-#define INPUT_DESPOTIFY_H
+#ifndef INPUT_DESPOTIFY_HXX
+#define INPUT_DESPOTIFY_HXX
extern const struct input_plugin input_plugin_despotify;