|
VMime
|
#include <emailAddress.hpp>


Protected Attributes | |
| word | m_localName |
| word | m_domainName |
Additional Inherited Members | |
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 () |
An email address: local name and domain name (basic type).
| emailAddress | ( | ) |
| emailAddress | ( | const emailAddress & | eml | ) |
| emailAddress | ( | const string & | ) |
References vmime::dynamicCast(), and emailAddress::parse().
| emailAddress | ( | const char * | ) |
References vmime::dynamicCast(), and emailAddress::parse().
| emailAddress | ( | const string & | localName, |
| const string & | domainName | ||
| ) |
| emailAddress | ( | const word & | localName, |
| const word & | domainName | ||
| ) |
|
virtual |
Clone this component.
Implements component.
References vmime::dynamicCast().
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.
References vmime::dynamicCast(), emailAddress::m_domainName, and emailAddress::m_localName.
Referenced by emailAddress::operator=().
|
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.
References vmime::dynamicCast(), vmime::end(), and component::parseImpl().
|
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 mailbox::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.
|
virtual |
Implements component.
References vmime::dynamicCast(), text::FORCE_NO_ENCODING, word::generate(), word::getBuffer(), word::getConvertedText(), stringUtils::is7bit(), emailAddress::m_domainName, emailAddress::m_localName, text::QUOTE_IF_NEEDED, and vmime::charsets::UTF_8.
Referenced by emailAddress::toString().
|
virtual |
Return the list of children of this component.
Implements component.
Return the domain name of the address.
References emailAddress::m_domainName.
Return the local name of the address.
References emailAddress::m_localName.
| bool isEmpty | ( | ) | const |
Returns whether this email address is empty.
Address is considered as empty if the local part is not specified.
References word::isEmpty(), and emailAddress::m_localName.
Referenced by mailbox::isEmpty().
| bool operator!= | ( | const class emailAddress & | eml | ) | const |
References vmime::dynamicCast().
| emailAddress & operator= | ( | const emailAddress & | other | ) |
References emailAddress::copyFrom().
| bool operator== | ( | const class emailAddress & | eml | ) | const |
References vmime::dynamicCast(), emailAddress::m_domainName, and emailAddress::m_localName.
| void parse | ( | const parsingContext & | ctx, |
| const string & | buffer | ||
| ) |
Parse RFC-822/MIME data for this component.
| ctx | parsing context |
| buffer | input buffer |
| void parse | ( | const parsingContext & | ctx, |
| const string & | buffer, | ||
| const size_t | position, | ||
| const size_t | end, | ||
| size_t * | newPosition = NULL |
||
| ) |
Parse RFC-822/MIME data for this component.
| ctx | parsing context |
| 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 |
| void parse | ( | const parsingContext & | ctx, |
| shared_ptr< utility::inputStream > | inputStream, | ||
| const size_t | position, | ||
| const size_t | end, | ||
| size_t * | newPosition = NULL |
||
| ) |
Parse RFC-822/MIME data for this component.
If stream is not seekable, or if end position is not specified, entire contents of the stream will be loaded into memory before parsing.
| ctx | parsing context |
| inputStream | stream from which to read data |
| position | current position in the input stream |
| end | end position in the input stream |
| newPosition | will receive the new position in the input stream |
References vmime::dynamicCast(), and component::getChildComponents().
Parse RFC-822/MIME data for this component, using the default parsing context.
| buffer | input buffer |
References vmime::dynamicCast(), vmime::end(), and parsingContext::getDefaultContext().
Referenced by emailAddress::emailAddress(), emailAddress::emailAddress(), and mailbox::parseImpl().
| void parse | ( | const string & | buffer, |
| const size_t | position, | ||
| const size_t | end, | ||
| size_t * | newPosition = NULL |
||
| ) |
Parse RFC-822/MIME data for this component, using the default parsing context.
| 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 |
| void parse | ( | shared_ptr< utility::inputStream > | inputStream, |
| const size_t | length | ||
| ) |
Parse RFC-822/MIME data for this component.
If stream is not seekable, or if length is not specified, entire contents of the stream will be loaded into memory before parsing.
| inputStream | stream from which to read data |
| length | data length, in bytes (0 = unknown/not specified) |
References vmime::utility::bufferedStreamCopyRange(), vmime::dynamicCast(), and vmime::end().
| void parse | ( | shared_ptr< utility::inputStream > | inputStream, |
| const size_t | position, | ||
| const size_t | end, | ||
| size_t * | newPosition = NULL |
||
| ) |
Parse RFC-822/MIME data for this component.
If stream is not seekable, or if end position is not specified, entire contents of the stream will be loaded into memory before parsing. The default parsing context will be used.
| inputStream | stream from which to read data |
| position | current position in the input stream |
| end | end position in the input stream |
| newPosition | will receive the new position in the input stream |
References vmime::dynamicCast(), vmime::end(), parsingContext::getDefaultContext(), and component::parseImpl().
|
virtual |
Reimplemented from component.
References vmime::dynamicCast(), vmime::end(), platform::getHandler(), parserHelpers::isSpace(), emailAddress::m_domainName, emailAddress::m_localName, component::parse(), component::setParsedBounds(), and vmime::charsets::UTF_8.
Set the domain name of the address.
| domainName | domain name of the address |
References vmime::dynamicCast(), and emailAddress::m_domainName.
Set the local name of the address.
| localName | local name of the address |
References vmime::dynamicCast(), and emailAddress::m_localName.
Returns the email address as a string, by joining components.
(ie. the local name, followed by a @ then the domain name.)
References vmime::dynamicCast(), emailAddress::generateImpl(), generationContext::getDefaultContext(), and vmime::lineLengthLimits::infinite.
Returns the email address as multibyte text, by joining components.
(ie. the local name, followed by a @ then the domain name.)
References text::appendWord(), vmime::dynamicCast(), emailAddress::m_domainName, emailAddress::m_localName, and vmime::charsets::US_ASCII.
|
protected |
|
protected |