VMime
|
Public Member Functions | |
header () | |
~header () | |
shared_ptr< headerField > | From () |
shared_ptr< const headerField > | From () const |
shared_ptr< headerField > | Sender () |
shared_ptr< const headerField > | Sender () const |
shared_ptr< headerField > | ReplyTo () |
shared_ptr< const headerField > | ReplyTo () const |
shared_ptr< headerField > | DeliveredTo () |
shared_ptr< const headerField > | DeliveredTo () const |
shared_ptr< headerField > | InReplyTo () |
shared_ptr< const headerField > | InReplyTo () const |
shared_ptr< headerField > | ReturnPath () |
shared_ptr< const headerField > | ReturnPath () const |
shared_ptr< headerField > | References () |
shared_ptr< const headerField > | References () const |
shared_ptr< headerField > | To () |
shared_ptr< const headerField > | To () const |
shared_ptr< headerField > | Cc () |
shared_ptr< const headerField > | Cc () const |
shared_ptr< headerField > | Bcc () |
shared_ptr< const headerField > | Bcc () const |
shared_ptr< headerField > | Date () |
shared_ptr< const headerField > | Date () const |
shared_ptr< headerField > | Subject () |
shared_ptr< const headerField > | Subject () const |
shared_ptr< headerField > | Organization () |
shared_ptr< const headerField > | Organization () const |
shared_ptr< headerField > | UserAgent () |
shared_ptr< const headerField > | UserAgent () const |
shared_ptr< headerField > | ContentType () |
shared_ptr< const headerField > | ContentType () const |
shared_ptr< headerField > | ContentDescription () |
shared_ptr< const headerField > | ContentDescription () const |
shared_ptr< headerField > | ContentTransferEncoding () |
shared_ptr< const headerField > | ContentTransferEncoding () const |
shared_ptr< headerField > | MimeVersion () |
shared_ptr< const headerField > | MimeVersion () const |
shared_ptr< headerField > | ContentDisposition () |
shared_ptr< const headerField > | ContentDisposition () const |
shared_ptr< headerField > | ContentId () |
shared_ptr< const headerField > | ContentId () const |
shared_ptr< headerField > | MessageId () |
shared_ptr< const headerField > | MessageId () const |
shared_ptr< headerField > | ContentLocation () |
shared_ptr< const headerField > | ContentLocation () const |
shared_ptr< headerField > | OriginalMessageId () |
shared_ptr< const headerField > | OriginalMessageId () const |
shared_ptr< headerField > | Disposition () |
shared_ptr< const headerField > | Disposition () const |
shared_ptr< headerField > | DispositionNotificationTo () |
shared_ptr< const headerField > | DispositionNotificationTo () const |
bool | hasField (const string &fieldName) const |
shared_ptr< headerField > | findField (const string &fieldName) const |
template<typename T > | |
shared_ptr< T > | findField (const string &fieldName) const |
template<typename T > | |
shared_ptr< T > | findFieldValue (const string &fieldName) const |
std::vector< shared_ptr < headerField > > | findAllFields (const string &fieldName) |
shared_ptr< headerField > | getField (const string &fieldName) |
template<typename T > | |
shared_ptr< T > | getField (const string &fieldName) |
void | appendField (shared_ptr< headerField > field) |
void | insertFieldBefore (shared_ptr< headerField > beforeField, shared_ptr< headerField > field) |
void | insertFieldBefore (const size_t pos, shared_ptr< headerField > field) |
void | insertFieldAfter (shared_ptr< headerField > afterField, shared_ptr< headerField > field) |
void | insertFieldAfter (const size_t pos, shared_ptr< headerField > field) |
void | removeField (shared_ptr< headerField > field) |
void | removeField (const size_t pos) |
void | replaceField (shared_ptr< headerField > field, shared_ptr< headerField > newField) |
void | removeAllFields () |
void | removeAllFields (const string &fieldName) |
size_t | getFieldCount () const |
bool | isEmpty () const |
const shared_ptr< headerField > | getFieldAt (const size_t pos) |
const shared_ptr< const headerField > | getFieldAt (const size_t pos) const |
const std::vector< shared_ptr < const headerField > > | getFieldList () const |
const std::vector< shared_ptr < headerField > > | getFieldList () |
shared_ptr< component > | clone () const |
void | copyFrom (const component &other) |
header & | operator= (const header &other) |
const std::vector< shared_ptr < component > > | getChildComponents () |
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 |
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 () |
Header section of a MIME part.
header | ( | ) |
~header | ( | ) |
References header::removeAllFields().
void appendField | ( | shared_ptr< headerField > | field | ) |
Add a field at the end of the list.
field | field to append |
Referenced by header::getField().
shared_ptr<const headerField> Bcc | ( | ) | const |
shared_ptr<headerField> Bcc | ( | ) |
shared_ptr<const headerField> Cc | ( | ) | const |
shared_ptr<headerField> Cc | ( | ) |
|
virtual |
Clone this component.
Implements component.
References vmime::clone().
shared_ptr<const headerField> ContentDescription | ( | ) | const |
shared_ptr<headerField> ContentDescription | ( | ) |
shared_ptr<headerField> ContentDisposition | ( | ) |
shared_ptr<const headerField> ContentDisposition | ( | ) | const |
shared_ptr<headerField> ContentId | ( | ) |
shared_ptr<const headerField> ContentId | ( | ) | const |
shared_ptr<headerField> ContentLocation | ( | ) |
shared_ptr<const headerField> ContentLocation | ( | ) | const |
shared_ptr<headerField> ContentTransferEncoding | ( | ) |
shared_ptr<const headerField> ContentTransferEncoding | ( | ) | const |
shared_ptr<headerField> ContentType | ( | ) |
shared_ptr<const headerField> ContentType | ( | ) | const |
|
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.
References vmime::clone().
Referenced by header::operator=().
shared_ptr<headerField> Date | ( | ) |
shared_ptr<const headerField> Date | ( | ) | const |
shared_ptr<headerField> DeliveredTo | ( | ) |
shared_ptr<const headerField> DeliveredTo | ( | ) | const |
shared_ptr<headerField> Disposition | ( | ) |
shared_ptr<const headerField> Disposition | ( | ) | const |
shared_ptr<headerField> DispositionNotificationTo | ( | ) |
shared_ptr<const headerField> DispositionNotificationTo | ( | ) | const |
std::vector< shared_ptr< headerField > > findAllFields | ( | const string & | fieldName | ) |
Find all fields that match the specified name.
If no field is found, an empty vector is returned.
fieldName | name of field to return (eg: "X-Mailer" or "From", common field names are available in the vmime::fields namespace) |
References stringUtils::toLower().
Referenced by header::removeAllFields().
shared_ptr< headerField > findField | ( | const string & | fieldName | ) | const |
Find the first field that matches the specified name.
Field name is case-insensitive. If no field is found, NULL is returned.
fieldName | name of field to return (eg: "X-Mailer" or "From", common field names are available in the vmime::fields namespace) |
References stringUtils::toLower().
shared_ptr<T> findField | ( | const string & | fieldName | ) | const |
Find the first field that matches the specified name, casted to the specified field type.
Field name is case-insensitive. If no field is found, or the field is not of the specified type, NULL is returned.
fieldName | name of field whose value is to be returned (eg: "X-Mailer" or "From", common field names are available in the vmime::fields namespace) |
shared_ptr<T> findFieldValue | ( | const string & | fieldName | ) | const |
Find the value of the first field that matches the specified name, casted to the specified value type.
Field name is case-insensitive. If no field is found, or the field value is not of the specified type, NULL is returned.
fieldName | name of field to return (eg: "X-Mailer" or "From", common field names are available in the vmime::fields namespace) |
shared_ptr<const headerField> From | ( | ) | const |
shared_ptr<headerField> From | ( | ) |
|
protectedvirtual |
Implements component.
References vmime::CRLF.
|
virtual |
Return the list of children of this component.
Implements component.
References vmime::copy_vector().
shared_ptr< headerField > getField | ( | const string & | fieldName | ) |
Find the first field that matches the specified name.
If no field is found, one will be created and inserted into the header.
fieldName | name of field to return (eg: "X-Mailer" or "From", common field names are available in the vmime::fields namespace) |
References header::appendField(), headerFieldFactory::getInstance(), and stringUtils::toLower().
shared_ptr<T> getField | ( | const string & | fieldName | ) |
Find the first field that matches the specified name, casted to the specified type.
If no field is found, one will be created and inserted into the header.
const shared_ptr< headerField > getFieldAt | ( | const size_t | pos | ) |
Return the field at the specified position.
pos | position |
const shared_ptr< const headerField > getFieldAt | ( | const size_t | pos | ) | const |
Return the field at the specified position.
pos | position |
size_t getFieldCount | ( | ) | const |
Return the number of fields in the list.
const std::vector< shared_ptr< const headerField > > getFieldList | ( | ) | const |
Return the field list.
const std::vector< shared_ptr< headerField > > getFieldList | ( | ) |
Return the field list.
|
virtual |
Get the number of bytes that will be used by this component when it is generated.
This may be a heuristically-derived estimate, but such an estimated size should always be larger than the actual generated size.
ctx | generation context |
Reimplemented from component.
References component::getGeneratedSize().
bool hasField | ( | const string & | fieldName | ) | const |
Checks whether (at least) one field with this name exists.
Field name is case-insensitive.
References stringUtils::toLower().
shared_ptr<const headerField> InReplyTo | ( | ) | const |
shared_ptr<headerField> InReplyTo | ( | ) |
void insertFieldAfter | ( | shared_ptr< headerField > | afterField, |
shared_ptr< headerField > | field | ||
) |
Insert a new field after the specified field.
afterField | field after which the new field will be inserted |
field | field to insert |
exceptions::no_such_field | if the field is not in the list |
void insertFieldAfter | ( | const size_t | pos, |
shared_ptr< headerField > | field | ||
) |
Insert a new field after the specified position.
pos | position of the field before the new field |
field | field to insert |
void insertFieldBefore | ( | shared_ptr< headerField > | beforeField, |
shared_ptr< headerField > | field | ||
) |
Insert a new field before the specified field.
beforeField | field before which the new field will be inserted |
field | field to insert |
exceptions::no_such_field | if the field is not in the list |
Referenced by header::replaceField().
void insertFieldBefore | ( | const size_t | pos, |
shared_ptr< headerField > | field | ||
) |
Insert a new field before the specified position.
pos | position at which to insert the new field (0 to insert at the beginning of the list) |
field | field to insert |
bool isEmpty | ( | ) | const |
Tests whether the list of fields is empty.
shared_ptr<headerField> MessageId | ( | ) |
shared_ptr<const headerField> MessageId | ( | ) | const |
shared_ptr<const headerField> MimeVersion | ( | ) | const |
shared_ptr<headerField> MimeVersion | ( | ) |
References header::copyFrom().
shared_ptr<headerField> Organization | ( | ) |
shared_ptr<const headerField> Organization | ( | ) | const |
shared_ptr<headerField> OriginalMessageId | ( | ) |
shared_ptr<const headerField> OriginalMessageId | ( | ) | const |
|
protectedvirtual |
Reimplemented from component.
References headerField::parseNext().
shared_ptr<const headerField> References | ( | ) | const |
shared_ptr<headerField> References | ( | ) |
void removeAllFields | ( | ) |
Remove all fields from the list.
Referenced by header::~header().
void removeAllFields | ( | const string & | fieldName | ) |
Remove all fields with the specified name.
References header::findAllFields(), and header::removeField().
void removeField | ( | shared_ptr< headerField > | field | ) |
Remove the specified field from the list.
field | field to remove |
exceptions::no_such_field | if the field is not in the list |
Referenced by header::removeAllFields(), and header::replaceField().
void removeField | ( | const size_t | pos | ) |
Remove the field at the specified position.
pos | position of the field to remove |
void replaceField | ( | shared_ptr< headerField > | field, |
shared_ptr< headerField > | newField | ||
) |
Replaces a field with another field.
field | field to be replaced |
newField | field to replace with |
exceptions::no_such_field | if the field is not in the list |
References header::insertFieldBefore(), and header::removeField().
shared_ptr<headerField> ReplyTo | ( | ) |
shared_ptr<const headerField> ReplyTo | ( | ) | const |
shared_ptr<headerField> ReturnPath | ( | ) |
shared_ptr<const headerField> ReturnPath | ( | ) | const |
shared_ptr<headerField> Sender | ( | ) |
shared_ptr<const headerField> Sender | ( | ) | const |
shared_ptr<const headerField> Subject | ( | ) | const |
shared_ptr<headerField> Subject | ( | ) |
shared_ptr<const headerField> To | ( | ) | const |
shared_ptr<headerField> To | ( | ) |
shared_ptr<const headerField> UserAgent | ( | ) | const |
shared_ptr<headerField> UserAgent | ( | ) |