diff options
| author | Vincent Richard <[email protected]> | 2005-06-16 21:26:26 +0200 |
|---|---|---|
| committer | Vincent Richard <[email protected]> | 2005-06-16 21:26:26 +0200 |
| commit | 4661d7b735c4c188a68df151ec03835e298c5dfe (patch) | |
| tree | 1d3beba52385427dbbe99b9f947fc97735d372f5 /src/utility/stream.cpp | |
| parent | Added dotFilteredInputStream + fixed CRLFToLFFilteredOutputStream + added uni... (diff) | |
| download | vmime-4661d7b735c4c188a68df151ec03835e298c5dfe.tar.gz vmime-4661d7b735c4c188a68df151ec03835e298c5dfe.zip | |
Added 'inputStreamSocketAdapter' and 'stopSequenceFilteredInputStream'.
Diffstat (limited to 'src/utility/stream.cpp')
| -rw-r--r-- | src/utility/stream.cpp | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/src/utility/stream.cpp b/src/utility/stream.cpp index 3899eb52..94be1447 100644 --- a/src/utility/stream.cpp +++ b/src/utility/stream.cpp @@ -319,11 +319,11 @@ const stream::size_type inputStreamPointerAdapter::skip(const size_type count) } -// outputStreamSocketAdapter - #ifdef VMIME_HAVE_MESSAGING_FEATURES +// outputStreamSocketAdapter + outputStreamSocketAdapter::outputStreamSocketAdapter(messaging::socket& sok) : m_socket(sok) { @@ -337,6 +337,42 @@ void outputStreamSocketAdapter::write } +// inputStreamSocketAdapter + +inputStreamSocketAdapter::inputStreamSocketAdapter(messaging::socket& sok) + : m_socket(sok) +{ +} + + +const bool inputStreamSocketAdapter::eof() const +{ + // Can't know... + return false; +} + + +void inputStreamSocketAdapter::reset() +{ + // Not supported +} + + +const stream::size_type inputStreamSocketAdapter::read + (value_type* const data, const size_type count) +{ + return m_socket.receiveRaw(data, count); +} + + +const stream::size_type inputStreamSocketAdapter::skip + (const size_type /* count */) +{ + // Not supported + return 0; +} + + #endif // VMIME_HAVE_MESSAGING_FEATURES |
