Content encoding (basic type). More...


Public Member Functions | |
| encoding () | |
| encoding (const string &name) | |
| encoding (const encoding &enc) | |
| const string & | getName () const |
| void | setName (const string &name) |
| 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< ref< const component > > | getChildComponents () const |
| ref< component > | clone () const |
| void | copyFrom (const component &other) |
| ref< utility::encoder::encoder > | getEncoder () const |
| void | parse (const string &buffer, const string::size_type position, const string::size_type end, string::size_type *newPosition=NULL) |
| void | generate (utility::outputStream &os, const string::size_type maxLineLength=lineLengthLimits::infinite, const string::size_type curLinePos=0, string::size_type *newLinePos=NULL) const |
Static Public Member Functions | |
| static const encoding | decide (const string::const_iterator begin, const string::const_iterator end) |
| static const encoding | decide (ref< const contentHandler > data) |
Content encoding (basic type).
| encoding | ( | ) |
Referenced by encoding::decide().
| ref< component > clone | ( | ) | const [virtual] |
| void copyFrom | ( | const component & | other | ) | [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=().
| const encoding decide | ( | ref< const contentHandler > | data | ) | [static] |
Decide which encoding to use based on the specified data.
| data | data used to determine encoding |
References vmime::encodingTypes::BASE64, and encoding::encoding().
| const encoding decide | ( | const string::const_iterator | begin, | |
| const string::const_iterator | end | |||
| ) | [static] |
Decide which encoding to use based on the specified data.
| begin | start iterator in buffer | |
| end | end iterator in buffer |
References vmime::encodingTypes::BASE64, vmime::lineLengthLimits::convenient, vmime::count(), vmime::encodingTypes::QUOTED_PRINTABLE, and vmime::encodingTypes::SEVEN_BIT.
| void generate | ( | utility::outputStream & | os, | |
| const string::size_type | maxLineLength = lineLengthLimits::infinite, |
|||
| const string::size_type | curLinePos = 0, |
|||
| string::size_type * | newLinePos = NULL | |||
| ) | const [virtual] |
Generate RFC-2822/MIME data for this component.
| os | output stream | |
| maxLineLength | maximum line length for output | |
| curLinePos | length of the current line in the output buffer | |
| newLinePos | will receive the new line position (length of the last line written) |
Implements component.
Referenced by encoding::getEncoder().
| const std::vector< ref< const component > > getChildComponents | ( | ) | const [virtual] |
Return the list of children of this component (const version).
Implements component.
| ref< 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 encoding::generate(), and encoderFactory::getInstance().
Referenced by stringContentHandler::extract(), streamContentHandler::extract(), stringContentHandler::generate(), and streamContentHandler::generate().
| const string & getName | ( | ) | const |
Return the name of the encoding.
See the constants in vmime::encodingTypes.
| bool operator!= | ( | const encoding & | value | ) | const |
References stringUtils::toLower().
References encoding::copyFrom().
| bool operator== | ( | const encoding & | value | ) | const |
References stringUtils::toLower().
| void parse | ( | const string & | buffer, | |
| const string::size_type | position, | |||
| const string::size_type | end, | |||
| string::size_type * | newPosition = NULL | |||
| ) | [virtual] |
Parse RFC-822/MIME data for this component.
| buffer | input buffer | |
| position | current position in the input buffer | |
| end | end position in the input buffer | |
| newPosition | will receive the new position in the input buffer |
Implements component.
References component::setParsedBounds(), vmime::encodingTypes::SEVEN_BIT, stringUtils::toLower(), stringUtils::trim(), and stringUtils::unquote().
| void setName | ( | const string & | name | ) |
Set the name of the encoding.
See the constants in vmime::encodingTypes.
| name | name of the encoding |
1.6.2