|
VMime
|


Public Types | |
| enum | EncodingUsage { USAGE_UNKNOWN, USAGE_TEXT, USAGE_BINARY_DATA } |
Public Member Functions | |
| encoding () | |
| encoding (const string &name) | |
| encoding (const string &name, const EncodingUsage usage) | |
| encoding (const encoding &enc) | |
| const string & | getName () const |
| void | setName (const string &name) |
| EncodingUsage | getUsage () const |
| void | setUsage (const EncodingUsage usage) |
| encoding & | operator= (const encoding &other) |
| encoding & | operator= (const string &name) |
| bool | operator== (const encoding &value) const |
| bool | operator!= (const encoding &value) const |
| const std::vector< shared_ptr< component > > | getChildComponents () |
| shared_ptr< component > | clone () const |
| void | copyFrom (const component &other) |
| shared_ptr< utility::encoder::encoder > | getEncoder () const |
Public Member Functions inherited from headerFieldValue | |
| size_t | getGeneratedSize (const generationContext &ctx) |
Public Member Functions inherited from component | |
| component () | |
| virtual | ~component () |
| void | parse (const string &buffer) |
| void | parse (const parsingContext &ctx, const string &buffer) |
| void | parse (shared_ptr< utility::inputStream > inputStream, const size_t length) |
| void | parse (const string &buffer, const size_t position, const size_t end, size_t *newPosition=NULL) |
| void | parse (const parsingContext &ctx, const string &buffer, const size_t position, const size_t end, size_t *newPosition=NULL) |
| void | parse (shared_ptr< utility::inputStream > inputStream, const size_t position, const size_t end, size_t *newPosition=NULL) |
| void | parse (const parsingContext &ctx, shared_ptr< utility::inputStream > inputStream, const size_t position, const size_t end, size_t *newPosition=NULL) |
| virtual const string | generate (const size_t maxLineLength=lineLengthLimits::infinite, const size_t curLinePos=0) const |
| virtual void | generate (utility::outputStream &outputStream, const size_t curLinePos=0, size_t *newLinePos=NULL) const |
| virtual void | generate (const generationContext &ctx, utility::outputStream &outputStream, const size_t curLinePos=0, size_t *newLinePos=NULL) const |
| size_t | getParsedOffset () const |
| size_t | getParsedLength () const |
Static Public Member Functions | |
| static const encoding | decide (shared_ptr< const contentHandler > data, const EncodingUsage usage=USAGE_BINARY_DATA) |
| static const encoding | decide (shared_ptr< const contentHandler > data, const charset &chset, const EncodingUsage usage=USAGE_BINARY_DATA) |
Protected Member Functions | |
| void | parseImpl (const parsingContext &ctx, const string &buffer, const size_t position, const size_t end, size_t *newPosition=NULL) |
| void | generateImpl (const generationContext &ctx, utility::outputStream &os, const size_t curLinePos=0, size_t *newLinePos=NULL) const |
Protected Member Functions inherited from component | |
| void | setParsedBounds (const size_t start, const size_t end) |
| virtual void | parseImpl (const parsingContext &ctx, shared_ptr< utility::parserInputStreamAdapter > parser, const size_t position, const size_t end, size_t *newPosition=NULL) |
Protected Member Functions inherited from object | |
| object () | |
| object (const object &) | |
| object & | operator= (const object &) |
| virtual | ~object () |
Content encoding (basic type).
| enum EncodingUsage |
| encoding | ( | ) |
Referenced by encoding::decide(), and encoding::operator!=().
| encoding | ( | const string & | name, |
| const EncodingUsage | usage | ||
| ) |
References encoding::parseImpl().
|
virtual |
|
virtual |
Replace data in this component by data in other component.
Both components must be of the same type.
| std::bad_cast_exception | if the components are not of the same (dynamic) type |
| other | other component to copy data from |
Implements component.
Referenced by encoding::operator=().
|
static |
Decide which encoding to use based on the specified data.
| data | data used to determine encoding |
| usage | context of use of data |
References vmime::encodingTypes::BASE64, encoding::encoding(), outputStreamStringAdapter::flush(), encoding::setUsage(), and encoding::USAGE_TEXT.
Referenced by htmlTextPart::addObject(), encoding::decide(), fileAttachment::fileAttachment(), plainTextPart::generateIn(), htmlTextPart::generateIn(), and encoding::operator!=().
|
static |
Decide which encoding to use based on the specified data and charset.
| data | data used to determine encoding |
| chset | charset of data |
| usage | context of use of data |
References encoding::decide(), charset::getRecommendedEncoding(), encoding::setUsage(), and encoding::USAGE_TEXT.
|
protectedvirtual |
Implements component.
Referenced by encoding::parseImpl().
|
virtual |
Return the list of children of this component.
Implements component.
| shared_ptr< utility::encoder::encoder > getEncoder | ( | ) | const |
Use encoderFactory to obtain an encoder/decoder object for the current encoding type.
| exceptions::no_encoder_available | if no encoder is registered for the encoding |
References component::generate(), encoderFactory::getInstance(), vmime::encodingTypes::QUOTED_PRINTABLE, and encoding::USAGE_TEXT.
Referenced by IMAPMessagePartContentHandler::extract(), stringContentHandler::extract(), streamContentHandler::extract(), IMAPMessagePartContentHandler::generate(), stringContentHandler::generate(), streamContentHandler::generate(), and body::getGeneratedSize().
| const string & getName | ( | ) | const |
Return the name of the encoding.
See the constants in vmime::encodingTypes.
| encoding::EncodingUsage getUsage | ( | ) | const |
Return the type of contents this encoding is used for.
See the EncodingUsage enum.
| bool operator!= | ( | const encoding & | value | ) | const |
References encoding::copyFrom().
References stringUtils::toLower(), and encoding::USAGE_UNKNOWN.
| bool operator== | ( | const encoding & | value | ) | const |
References stringUtils::toLower().
|
protectedvirtual |
Reimplemented from component.
References vmime::end(), encoding::generateImpl(), component::setParsedBounds(), vmime::encodingTypes::SEVEN_BIT, stringUtils::toLower(), stringUtils::trim(), stringUtils::unquote(), and encoding::USAGE_UNKNOWN.
Referenced by encoding::encoding().
| void setName | ( | const string & | name | ) |
Set the name of the encoding.
See the constants in vmime::encodingTypes.
| name | name of the encoding |
| void setUsage | ( | const EncodingUsage | usage | ) |
Set the type of contents this encoding is used for.
See the EncodingUsage enum.
| usage | type of contents |
Referenced by encoding::decide().