diff options
author | Max Kellermann <max@duempel.org> | 2014-05-11 17:14:49 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-05-11 17:14:49 +0200 |
commit | d4b625b48e6bbac61b4128aeeaf44911b2e3e03b (patch) | |
tree | 67389c99a559c1b65bf6465c2361a4e3c01d4287 /src/input/ThreadInputStream.hxx | |
parent | 82337dec44347017ca04fe975e85e6d9e4edb635 (diff) | |
download | mpd-d4b625b48e6bbac61b4128aeeaf44911b2e3e03b.tar.gz mpd-d4b625b48e6bbac61b4128aeeaf44911b2e3e03b.tar.xz mpd-d4b625b48e6bbac61b4128aeeaf44911b2e3e03b.zip |
InputStream: make various methods abstract
Replace InputPlugin attributes.
Diffstat (limited to 'src/input/ThreadInputStream.hxx')
-rw-r--r-- | src/input/ThreadInputStream.hxx | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/input/ThreadInputStream.hxx b/src/input/ThreadInputStream.hxx index 2354000f6..4d4ec3972 100644 --- a/src/input/ThreadInputStream.hxx +++ b/src/input/ThreadInputStream.hxx @@ -82,6 +82,12 @@ public: */ InputStream *Start(Error &error); + /* virtual methods from InputStream */ + bool Check(Error &error) override final; + bool IsEOF() override final; + bool IsAvailable() override final; + size_t Read(void *ptr, size_t size, Error &error) override final; + protected: void SetMimeType(const char *_mime) { assert(thread.IsInside()); @@ -110,7 +116,7 @@ protected: * * @return 0 on end-of-file or on error */ - virtual size_t Read(void *ptr, size_t size, Error &error) = 0; + virtual size_t ThreadRead(void *ptr, size_t size, Error &error) = 0; /** * Optional deinitialization before leaving the thread. @@ -130,19 +136,6 @@ protected: private: void ThreadFunc(); static void ThreadFunc(void *ctx); - - bool Check2(Error &error); - bool Available2(); - size_t Read2(void *ptr, size_t size, Error &error); - bool IsEOF2(); - -public: - /* InputPlugin callbacks */ - static bool Check(InputStream *is, Error &error); - static bool Available(InputStream *is); - static size_t Read(InputStream *is, void *ptr, size_t size, - Error &error); - static bool IsEOF(InputStream *is); }; #endif |