aboutsummaryrefslogtreecommitdiffstats
path: root/src/utility/inputStreamAdapter.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2012-04-16 20:32:33 +0000
committerVincent Richard <[email protected]>2012-04-16 20:32:33 +0000
commit4f33877820edee1b47d1b6f4fc800eaad273adaa (patch)
tree10d5d339f17f2561ef46993de308c2e7d8a9fd79 /src/utility/inputStreamAdapter.cpp
parentSplit stream.hpp/.cpp into multiple source files. (diff)
downloadvmime-4f33877820edee1b47d1b6f4fc800eaad273adaa.tar.gz
vmime-4f33877820edee1b47d1b6f4fc800eaad273adaa.zip
Added ability to parse directly from an input stream (eg. file). This allows very big messages to be parsed without loading the whole message data into memory.
Diffstat (limited to 'src/utility/inputStreamAdapter.cpp')
-rw-r--r--src/utility/inputStreamAdapter.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/utility/inputStreamAdapter.cpp b/src/utility/inputStreamAdapter.cpp
index b44b0841..441307b5 100644
--- a/src/utility/inputStreamAdapter.cpp
+++ b/src/utility/inputStreamAdapter.cpp
@@ -65,6 +65,18 @@ stream::size_type inputStreamAdapter::skip(const size_type count)
}
+stream::size_type inputStreamAdapter::getPosition() const
+{
+ return m_stream.tellg();
+}
+
+
+void inputStreamAdapter::seek(const size_type pos)
+{
+ m_stream.seekg(pos, std::ios_base::beg);
+}
+
+
} // utility
} // vmime