

Public Member Functions | |
| virtual | ~contentHandler () |
| virtual ref< contentHandler > | clone () const =0 |
| virtual void | generate (utility::outputStream &os, const vmime::encoding &enc, const string::size_type maxLineLength=lineLengthLimits::infinite) const =0 |
| virtual void | extract (utility::outputStream &os, utility::progressListener *progress=NULL) const =0 |
| virtual void | extractRaw (utility::outputStream &os, utility::progressListener *progress=NULL) const =0 |
| virtual string::size_type | getLength () const =0 |
| virtual bool | isEncoded () const =0 |
| virtual const vmime::encoding & | getEncoding () const =0 |
| virtual bool | isEmpty () const =0 |
Static Public Attributes | |
| static const vmime::encoding | NO_ENCODING |
| ~contentHandler | ( | ) | [virtual] |
| virtual ref<contentHandler> clone | ( | ) | const [pure virtual] |
Return a copy of this object.
Implemented in emptyContentHandler, streamContentHandler, and stringContentHandler.
| virtual void extract | ( | utility::outputStream & | os, | |
| utility::progressListener * | progress = NULL | |||
| ) | const [pure 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 |
Implemented in emptyContentHandler, streamContentHandler, and stringContentHandler.
| virtual void extractRaw | ( | utility::outputStream & | os, | |
| utility::progressListener * | progress = NULL | |||
| ) | const [pure 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 |
Implemented in emptyContentHandler, streamContentHandler, and stringContentHandler.
| virtual void generate | ( | utility::outputStream & | os, | |
| const vmime::encoding & | enc, | |||
| const string::size_type | maxLineLength = lineLengthLimits::infinite | |||
| ) | const [pure 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 |
Implemented in emptyContentHandler, streamContentHandler, and stringContentHandler.
| virtual const vmime::encoding& getEncoding | ( | ) | const [pure virtual] |
Returns the encoding used for data (or "binary" if not encoded).
Implemented in emptyContentHandler, streamContentHandler, and stringContentHandler.
| virtual string::size_type getLength | ( | ) | const [pure virtual] |
Returns the actual length of data.
WARNING: this can return 0 if no length was specified when setting data of this object.
Implemented in emptyContentHandler, streamContentHandler, and stringContentHandler.
| virtual bool isEmpty | ( | ) | const [pure virtual] |
Returns 'true' if there is no data set.
Implemented in emptyContentHandler, streamContentHandler, and stringContentHandler.
| virtual bool isEncoded | ( | ) | const [pure virtual] |
Returns 'true' if data managed by this object is encoded.
Implemented in emptyContentHandler, streamContentHandler, and stringContentHandler.
const encoding NO_ENCODING [static] |
Used to specify that enclosed data is not encoded.
Referenced by emptyContentHandler::getEncoding(), stringContentHandler::isEncoded(), streamContentHandler::isEncoded(), and stringContentHandler::operator=().
1.6.2