InputStream: add method Rewind()

This commit is contained in:
Max Kellermann
2013-10-23 21:22:29 +02:00
parent fe3c5e4e8e
commit f1027ed198
9 changed files with 31 additions and 28 deletions

View File

@@ -27,6 +27,7 @@
#include "util/Domain.hxx"
#include <assert.h>
#include <stdio.h> /* for SEEK_SET */
static constexpr Domain input_domain("input");
@@ -113,6 +114,18 @@ input_stream::LockSeek(offset_type _offset, int whence, Error &error)
return Seek(_offset, whence, error);
}
bool
input_stream::Rewind(Error &error)
{
return Seek(0, SEEK_SET, error);
}
bool
input_stream::LockRewind(Error &error)
{
return LockSeek(0, SEEK_SET, error);
}
Tag *
input_stream::ReadTag()
{