From 7d0269d2cec68c7e55df5b6db3d2266741534b17 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 5 Sep 2013 00:06:31 +0200 Subject: InputLegacy: move functions to the input_stream class --- src/input/RewindInputPlugin.cxx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/input/RewindInputPlugin.cxx') diff --git a/src/input/RewindInputPlugin.cxx b/src/input/RewindInputPlugin.cxx index 7a88d4f52..bd4f01261 100644 --- a/src/input/RewindInputPlugin.cxx +++ b/src/input/RewindInputPlugin.cxx @@ -66,7 +66,7 @@ struct RewindInputStream { } ~RewindInputStream() { - input_stream_close(input); + input->Close(); } /** @@ -114,7 +114,7 @@ input_rewind_check(struct input_stream *is, Error &error) { RewindInputStream *r = (RewindInputStream *)is; - return input_stream_check(r->input, error); + return r->input->Check(error); } static void @@ -131,7 +131,7 @@ input_rewind_tag(struct input_stream *is) { RewindInputStream *r = (RewindInputStream *)is; - return input_stream_tag(r->input); + return r->input->ReadTag(); } static bool @@ -139,7 +139,7 @@ input_rewind_available(struct input_stream *is) { RewindInputStream *r = (RewindInputStream *)is; - return input_stream_available(r->input); + return r->input->IsAvailable(); } static size_t @@ -165,7 +165,7 @@ input_rewind_read(struct input_stream *is, void *ptr, size_t size, } else { /* pass method call to underlying stream */ - size_t nbytes = input_stream_read(r->input, ptr, size, error); + size_t nbytes = r->input->Read(ptr, size, error); if (r->input->offset > (goffset)sizeof(r->buffer)) /* disable buffering */ @@ -190,7 +190,7 @@ input_rewind_eof(struct input_stream *is) { RewindInputStream *r = (RewindInputStream *)is; - return !r->ReadingFromBuffer() && input_stream_eof(r->input); + return !r->ReadingFromBuffer() && r->input->IsEOF(); } static bool @@ -213,8 +213,7 @@ input_rewind_seek(struct input_stream *is, goffset offset, int whence, return true; } else { - bool success = input_stream_seek(r->input, offset, whence, - error); + bool success = r->input->Seek(offset, whence, error); r->CopyAttributes(); /* disable the buffer, because r->input has left the -- cgit v1.2.3