From f1027ed198535ce16cfb9c83ac802788ec750488 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 23 Oct 2013 21:22:29 +0200 Subject: InputStream: add method Rewind() --- src/InputStream.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/InputStream.cxx') diff --git a/src/InputStream.cxx b/src/InputStream.cxx index 52eef2caf..56ca57e55 100644 --- a/src/InputStream.cxx +++ b/src/InputStream.cxx @@ -27,6 +27,7 @@ #include "util/Domain.hxx" #include +#include /* 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() { -- cgit v1.2.3