|
VMime
|
#include <word.hpp>


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 () |
| 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 |
| 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) |
| 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.
Referenced by copyFrom(), isEquivalent(), operator!=(), operator=(), operator=(), operator==(), text, and word().
| word | ( | const word & | w | ) |
Construct a word by copying another word.
References word().
|
explicit |
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 |
|
virtual |
|
virtual |
|
virtual |
Generate RFC-2822/MIME data for this component, using the default generation context.
| ctx | generation context |
| outputStream | output stream |
| curLinePos | length of the current line in the output buffer |
| newLinePos | will receive the new line position (length of the last line written) |
Reimplemented from component.
|
virtual |
Generate RFC-2822/MIME data for this component.
| maxLineLength | maximum line length for output |
| curLinePos | length of the current line in the output buffer |
Reimplemented from component.
Referenced by emailAddress::generateImpl(), and generateImpl().
|
virtual |
Generate RFC-2822/MIME data for this component, using the default generation context.
| outputStream | output stream |
| curLinePos | length of the current line in the output buffer |
| newLinePos | will receive the new line position (length of the last line written) |
Reimplemented from component.
|
protectedvirtual |
Implements component.
References generate().
| string & getBuffer | ( | ) |
Return the raw data for this encoded word.
| const string & getBuffer | ( | ) | const |
Return the raw data for this encoded word.
Referenced by kmailMaildirFormat::folderPathToFileSystemPath(), courierMaildirFormat::isSubfolderDirectory(), kmailMaildirFormat::isSubfolderDirectory(), maildirStore::isValidFolderName(), and text.
| const charset & getCharset | ( | ) | const |
|
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 isEquivalent(), and text.
| const string getLanguage | ( | ) | const |
Return the language used in this word (optional).
If not specified, the value is empty.
Referenced by text.
| bool isEmpty | ( | ) | const |
Tests whether this word is empty.
Referenced by fileAttachment::fileAttachment(), fileAttachment::fileAttachment(), fileAttachment::fileAttachment(), and text.
| 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 getConvertedText(), vmime::charsets::UTF_8, and word().
Referenced by text.
References charset::getLocalCharset(), and word().
|
protectedvirtual |
Reimplemented from component.
References vmime::end(), and parseWithState().
|
protected |
References vmime::end(), context::getInternationalizedEmailSupport(), component::setParsedBounds(), vmime::charsets::US_ASCII, and vmime::charsets::UTF_8.
Referenced by parseImpl().
| void setBuffer | ( | const string & | buffer | ) |
Set the raw data for this encoded word.
| buffer | raw data buffer |
Referenced by kmailMaildirFormat::folderPathToFileSystemPath(), parameter::parseImpl(), and text.
| void setCharset | ( | const charset & | ch | ) |
| void setLanguage | ( | const string & | lang | ) |
Set the language used in this word (optional).
| lang | language tag, in the format specified by RFC-1766 |
Referenced by text.