diff options
author | Vincent Richard <[email protected]> | 2005-09-03 12:48:59 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2005-09-03 12:48:59 +0000 |
commit | f777b659b9bd43f90c3f8b224ad296e42d89a02b (patch) | |
tree | 20f08abf13d3f2cb3ff1bfaa83348d1f69cc20d9 /src/stringContentHandler.cpp | |
parent | Updated code to use smart pointers. (diff) | |
download | vmime-f777b659b9bd43f90c3f8b224ad296e42d89a02b.tar.gz vmime-f777b659b9bd43f90c3f8b224ad296e42d89a02b.zip |
Added progression notifications.
Diffstat (limited to 'src/stringContentHandler.cpp')
-rw-r--r-- | src/stringContentHandler.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/stringContentHandler.cpp b/src/stringContentHandler.cpp index 9c1553f4..92b7f51e 100644 --- a/src/stringContentHandler.cpp +++ b/src/stringContentHandler.cpp @@ -146,12 +146,13 @@ void stringContentHandler::generate(utility::outputStream& os, } -void stringContentHandler::extract(utility::outputStream& os) const +void stringContentHandler::extract(utility::outputStream& os, + utility::progressionListener* progress) const { // No decoding to perform if (!isEncoded()) { - m_string.extract(os); + m_string.extract(os, 0, m_string.length(), progress); } // Need to decode data else @@ -159,15 +160,17 @@ void stringContentHandler::extract(utility::outputStream& os) const ref <encoder> theDecoder = m_encoding.getEncoder(); utility::inputStreamStringProxyAdapter in(m_string); + utility::progressionListenerSizeAdapter plsa(progress, getLength()); - theDecoder->decode(in, os); + theDecoder->decode(in, os, &plsa); } } -void stringContentHandler::extractRaw(utility::outputStream& os) const +void stringContentHandler::extractRaw(utility::outputStream& os, + utility::progressionListener* progress) const { - m_string.extract(os); + m_string.extract(os, 0, m_string.length(), progress); } |