diff options
author | Max Kellermann <max@duempel.org> | 2013-10-23 21:22:29 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-23 21:58:44 +0200 |
commit | f1027ed198535ce16cfb9c83ac802788ec750488 (patch) | |
tree | bc8787407538be55e8bf70d3413644a8a8f4abf4 /src/InputStream.cxx | |
parent | fe3c5e4e8e3c46d57cb49c2dd6c4c2dc814a797b (diff) | |
download | mpd-f1027ed198535ce16cfb9c83ac802788ec750488.tar.gz mpd-f1027ed198535ce16cfb9c83ac802788ec750488.tar.xz mpd-f1027ed198535ce16cfb9c83ac802788ec750488.zip |
InputStream: add method Rewind()
Diffstat (limited to '')
-rw-r--r-- | src/InputStream.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
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 <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() { |