|
VMime
|


Public Member Functions | |
| word () | |
| word (const word &w) | |
| word (const string &buffer) | |
| word (const string &buffer, const charset &charset) | |
| word (const string &buffer, const charset &charset, const string &lang) | |
| const string & | getBuffer () const |
| string & | getBuffer () |
| bool | isEmpty () const |
| void | setBuffer (const string &buffer) |
| const charset & | getCharset () const |
| void | setCharset (const charset &ch) |
| const string | getLanguage () const |
| void | setLanguage (const string &lang) |
| bool | isEquivalent (const word &other) const |
| word & | operator= (const word &w) |
| word & | operator= (const string &s) |
| bool | operator== (const word &w) const |
| bool | operator!= (const word &w) const |
| const string | getConvertedText (const charset &dest, const charsetConverterOptions &opts=charsetConverterOptions()) const |
| void | copyFrom (const component &other) |
| shared_ptr< component > | clone () const |
| const std::vector< shared_ptr< component > > | getChildComponents () |
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 |
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 |
| void | parseWithState (const parsingContext &ctx, const string &buffer, const size_t position, const size_t end, size_t *newPosition, parserState *state) |
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 () |
A class that encapsulates an encoded-word (RFC-2047): some text encoded into one specified charset.
| word | ( | ) |
Construct an empty word.
Charset is set to the current locale charset.
Construct a word using a string buffer.
Charset is set to the current locale charset.
Construct a word using a string buffer and a specified charset.
| buffer | string buffer |
| charset | charset in which the string is encoded |
Construct a word using a string buffer and a specified charset and language tag (RFC-1766).
| buffer | string buffer |
| charset | charset in which the string is encoded |
| lang | language tag, in the format specified by RFC-1766 |
References vmime::end(), context::getInternationalizedEmailSupport(), parserHelpers::isSpace(), word::parseImpl(), vmime::charsets::US_ASCII, and vmime::charsets::UTF_8.
|
virtual |
|
virtual |
Replace data in this word by data in other word.
| other | other word to copy data from |
Implements component.
|
protectedvirtual |
Implements component.
References charset::convert(), vmime::CRLF, wordEncoder::ENCODING_B64, vmime::end(), text::FORCE_ENCODING, text::FORCE_NO_ENCODING, component::generate(), wordEncoder::getEncoding(), context::getInternationalizedEmailSupport(), generationContext::getMaxLineLength(), charset::getName(), wordEncoder::getNextChunk(), vmime::lineLengthLimits::infinite, wordEncoder::isEncodingNeeded(), parserHelpers::isSpace(), vmime::lineLengthLimits::max, stringUtils::needQuoting(), vmime::NEW_LINE_SEQUENCE, vmime::NEW_LINE_SEQUENCE_LENGTH, text::NO_NEW_LINE_SEQUENCE, vmime::npos, stringUtils::quote(), text::QUOTE_IF_NEEDED, text::QUOTE_IF_POSSIBLE, and vmime::charsets::UTF_8.
| const string & getBuffer | ( | ) | const |
Return the raw data for this encoded word.
Referenced by kmailMaildirFormat::folderPathToFileSystemPath(), emailAddress::generateImpl(), kmailMaildirFormat::isSubfolderDirectory(), courierMaildirFormat::isSubfolderDirectory(), and maildirStore::isValidFolderName().
| string & getBuffer | ( | ) |
Return the raw data for this encoded word.
| const charset & getCharset | ( | ) | const |
Return the charset of this word.
|
virtual |
Return the list of children of this component.
Implements component.
| const string getConvertedText | ( | const charset & | dest, |
| const charsetConverterOptions & | opts = charsetConverterOptions() |
||
| ) | const |
Return the contained text converted to the specified charset.
| dest | output charset |
| opts | options for charset conversion |
References charset::convert().
Referenced by emailAddress::generateImpl(), word::isEquivalent(), and courierMaildirFormat::toModifiedUTF7().
| const string getLanguage | ( | ) | const |
Return the language used in this word (optional).
If not specified, the value is empty.
| bool isEmpty | ( | ) | const |
Tests whether this word is empty.
Referenced by fileAttachment::fileAttachment(), and emailAddress::isEmpty().
| bool isEquivalent | ( | const word & | other | ) | const |
Returns whether two words actually represent the same text, regardless of their charset.
| other | word to compare to |
References word::getConvertedText(), and vmime::charsets::UTF_8.
| bool operator!= | ( | const word & | w | ) | const |
References charset::getLocalCharset().
| bool operator== | ( | const word & | w | ) | const |
|
protectedvirtual |
|
protected |
References vmime::end(), context::getInternationalizedEmailSupport(), vmime::npos, component::setParsedBounds(), vmime::charsets::US_ASCII, and vmime::charsets::UTF_8.
Referenced by word::parseImpl().
| void setBuffer | ( | const string & | buffer | ) |
Set the raw data for this encoded word.
| buffer | raw data buffer |
Referenced by kmailMaildirFormat::folderPathToFileSystemPath().
| void setCharset | ( | const charset & | ch | ) |
Set the charset of this word.
| ch | charset of this word |
| void setLanguage | ( | const string & | lang | ) |
Set the language used in this word (optional).
| lang | language tag, in the format specified by RFC-1766 |