|
VMime
|
#include <stringContentHandler.hpp>


Additional Inherited Members | |
Static Public Attributes inherited from contentHandler | |
| static const vmime::encoding | NO_ENCODING |
Protected Member Functions inherited from object | |
| object () | |
| object (const object &) | |
| object & | operator= (const object &) |
| virtual | ~object () |
| stringContentHandler | ( | const string & | buffer, |
| const vmime::encoding & | enc = NO_ENCODING |
||
| ) |
| stringContentHandler | ( | const utility::stringProxy & | str, |
| const vmime::encoding & | enc = NO_ENCODING |
||
| ) |
| stringContentHandler | ( | const string & | buffer, |
| const size_t | start, | ||
| const size_t | end, | ||
| const vmime::encoding & | enc = NO_ENCODING |
||
| ) |
| ~stringContentHandler | ( | ) |
|
virtual |
Return a copy of this object.
Implements contentHandler.
References vmime::dynamicCast().
|
virtual |
Extract the contents into the specified stream.
If needed, data will be decoded before being written into the stream.
| exceptions::no_encoder_available | if the encoding is not supported |
| os | output stream |
| progress | progress listener, or NULL if you do not want to receive progress notifications |
Implements contentHandler.
References vmime::dynamicCast(), stringProxy::extract(), encoding::getEncoder(), stringContentHandler::getLength(), stringContentHandler::isEncoded(), and stringProxy::length().
|
virtual |
Extract the contents into the specified stream, without decoding it.
It may be useful in case the encoding is not supported and you want to extract raw data.
| os | output stream |
| progress | progress listener, or NULL if you do not want to receive progress notifications |
Implements contentHandler.
References vmime::dynamicCast(), stringProxy::extract(), and stringProxy::length().
|
virtual |
Output the contents into the specified stream.
Data will be encoded before being written into the stream. This is used internally by the body object to generate the message, you may not need to use this (see contentHandler::extract() if you want to get the contents).
| os | output stream |
| enc | encoding for output |
| maxLineLength | maximum line length for output |
Implements contentHandler.
References vmime::dynamicCast(), stringProxy::extract(), encoding::getEncoder(), mediaType::getType(), stringContentHandler::isEncoded(), and vmime::mediaTypes::TEXT.
Returns a hint about the kind of data managed by this object.
Implements contentHandler.
|
virtual |
Returns the encoding used for data (or "binary" if not encoded).
Implements contentHandler.
|
virtual |
Returns the actual length of data.
WARNING: this can return 0 if no length was specified when setting data of this object, or if the length is not known).
Implements contentHandler.
References stringProxy::length().
Referenced by stringContentHandler::extract().
|
virtual |
Indicates whether the extract() method can be called multiple times.
Implements contentHandler.
|
virtual |
Returns 'true' if there is no data set.
Implements contentHandler.
References stringProxy::length().
|
virtual |
Returns 'true' if data managed by this object is encoded.
Implements contentHandler.
References contentHandler::NO_ENCODING.
Referenced by stringContentHandler::extract(), and stringContentHandler::generate().
| stringContentHandler & operator= | ( | const string & | buffer | ) |
References vmime::dynamicCast(), contentHandler::NO_ENCODING, and stringContentHandler::setData().
| stringContentHandler & operator= | ( | const stringContentHandler & | cts | ) |
References vmime::dynamicCast().
Gives a hint about the kind of data managed by this object.
| type | content media type |
Implements contentHandler.
| void setData | ( | const string & | buffer, |
| const size_t | start, | ||
| const size_t | end, | ||
| const vmime::encoding & | enc = NO_ENCODING |
||
| ) |
References vmime::dynamicCast(), vmime::end(), and stringProxy::set().
| void setData | ( | const string & | buffer, |
| const vmime::encoding & | enc = NO_ENCODING |
||
| ) |
References vmime::dynamicCast(), and stringProxy::set().
| void setData | ( | const utility::stringProxy & | str, |
| const vmime::encoding & | enc = NO_ENCODING |
||
| ) |
References vmime::dynamicCast().
Referenced by stringContentHandler::operator=().