aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist/SoundCloudPlaylistPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-09-05 00:06:31 +0200
committerMax Kellermann <max@duempel.org>2013-09-05 00:23:14 +0200
commit7d0269d2cec68c7e55df5b6db3d2266741534b17 (patch)
tree613f5d7b03bc9624f15167c76f8f4309603944cc /src/playlist/SoundCloudPlaylistPlugin.cxx
parent52ffdb0a55e43153fa9fc1189316884a630df700 (diff)
downloadmpd-7d0269d2cec68c7e55df5b6db3d2266741534b17.tar.gz
mpd-7d0269d2cec68c7e55df5b6db3d2266741534b17.tar.xz
mpd-7d0269d2cec68c7e55df5b6db3d2266741534b17.zip
InputLegacy: move functions to the input_stream class
Diffstat (limited to '')
-rw-r--r--src/playlist/SoundCloudPlaylistPlugin.cxx17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/playlist/SoundCloudPlaylistPlugin.cxx b/src/playlist/SoundCloudPlaylistPlugin.cxx
index b6be4fd30..0b38caeea 100644
--- a/src/playlist/SoundCloudPlaylistPlugin.cxx
+++ b/src/playlist/SoundCloudPlaylistPlugin.cxx
@@ -21,7 +21,7 @@
#include "SoundCloudPlaylistPlugin.hxx"
#include "MemoryPlaylistProvider.hxx"
#include "conf.h"
-#include "InputLegacy.hxx"
+#include "InputStream.hxx"
#include "Song.hxx"
#include "Tag.hxx"
#include "util/Error.hxx"
@@ -249,8 +249,8 @@ soundcloud_parse_json(const char *url, yajl_handle hand,
unsigned char *ubuffer = (unsigned char *)buffer;
Error error;
- input_stream *input_stream = input_stream_open(url, mutex, cond,
- error);
+ input_stream *input_stream = input_stream::Open(url, mutex, cond,
+ error);
if (input_stream == NULL) {
if (error.IsDefined())
g_warning("%s", error.GetMessage());
@@ -258,24 +258,23 @@ soundcloud_parse_json(const char *url, yajl_handle hand,
}
mutex.lock();
- input_stream_wait_ready(input_stream);
+ input_stream->WaitReady();
yajl_status stat;
int done = 0;
while (!done) {
const size_t nbytes =
- input_stream_read(input_stream, buffer, sizeof(buffer),
- error);
+ input_stream->Read(buffer, sizeof(buffer), error);
if (nbytes == 0) {
if (error.IsDefined())
g_warning("%s", error.GetMessage());
- if (input_stream_eof(input_stream)) {
+ if (input_stream->IsEOF()) {
done = true;
} else {
mutex.unlock();
- input_stream_close(input_stream);
+ input_stream->Close();
return -1;
}
}
@@ -303,7 +302,7 @@ soundcloud_parse_json(const char *url, yajl_handle hand,
}
mutex.unlock();
- input_stream_close(input_stream);
+ input_stream->Close();
return 0;
}