|
VMime
|
#include <header.hpp>


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 | ( | ) |
Referenced by copyFrom(), message, and operator=().
| ~header | ( | ) |
References removeAllFields().
| void appendField | ( | shared_ptr< headerField > | field | ) |
| shared_ptr< headerField > Bcc | ( | ) |
References Bcc(), and FIELD_ACCESS.
Referenced by Bcc().
| shared_ptr< const headerField > Bcc | ( | ) | const |
| shared_ptr< headerField > Cc | ( | ) |
References Cc(), and FIELD_ACCESS.
Referenced by Cc().
| shared_ptr< const headerField > Cc | ( | ) | const |
|
virtual |
Clone this component.
Implements component.
References vmime::clone().
| shared_ptr< headerField > ContentDescription | ( | ) |
References ContentDescription(), and FIELD_ACCESS.
Referenced by ContentDescription().
| shared_ptr< const headerField > ContentDescription | ( | ) | const |
| shared_ptr< headerField > ContentDisposition | ( | ) |
References ContentDisposition(), and FIELD_ACCESS.
Referenced by ContentDisposition().
| shared_ptr< const headerField > ContentDisposition | ( | ) | const |
| shared_ptr< headerField > ContentId | ( | ) |
References ContentId(), and FIELD_ACCESS.
Referenced by ContentId().
| shared_ptr< const headerField > ContentId | ( | ) | const |
| shared_ptr< headerField > ContentLocation | ( | ) |
References ContentLocation(), and FIELD_ACCESS.
Referenced by ContentLocation().
| shared_ptr< const headerField > ContentLocation | ( | ) | const |
| shared_ptr< headerField > ContentTransferEncoding | ( | ) |
References ContentTransferEncoding(), and FIELD_ACCESS.
Referenced by ContentTransferEncoding().
| shared_ptr< const headerField > ContentTransferEncoding | ( | ) | const |
| shared_ptr< headerField > ContentType | ( | ) |
References ContentType(), and FIELD_ACCESS.
Referenced by 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(), component::component(), and header().
Referenced by operator=().
| shared_ptr< headerField > Date | ( | ) |
References Date(), and FIELD_ACCESS.
Referenced by Date(), and transport::processHeader().
| shared_ptr< const headerField > Date | ( | ) | const |
| shared_ptr< headerField > DeliveredTo | ( | ) |
References DeliveredTo(), and FIELD_ACCESS.
Referenced by DeliveredTo().
| shared_ptr< const headerField > DeliveredTo | ( | ) | const |
| shared_ptr< headerField > Disposition | ( | ) |
References Disposition(), and FIELD_ACCESS.
Referenced by Disposition().
| shared_ptr< const headerField > Disposition | ( | ) | const |
| shared_ptr< headerField > DispositionNotificationTo | ( | ) |
References DispositionNotificationTo(), FIELD_ACCESS, findField(), and hasField().
Referenced by 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 removeAllFields().
| 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) |
References findField().
| 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().
Referenced by DispositionNotificationTo(), findField(), and findFieldValue().
| 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) |
References findField().
| shared_ptr< headerField > From | ( | ) |
| shared_ptr< const headerField > From | ( | ) | const |
|
protectedvirtual |
Implements component.
References vmime::CRLF.
|
virtual |
Return the list of children of this component.
Implements component.
References vmime::copy_vector().
| 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.
References getField().
| 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 appendField(), vmime::end(), headerFieldFactory::getInstance(), and stringUtils::toLower().
Referenced by getField().
| const shared_ptr< headerField > getFieldAt | ( | const size_t | pos | ) |
Return the field at the specified position.
| pos | position |
Referenced by transport::processHeader().
| 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.
Referenced by transport::processHeader().
| const std::vector< shared_ptr< headerField > > getFieldList | ( | ) |
Return the field list.
| const std::vector< shared_ptr< const headerField > > getFieldList | ( | ) | const |
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().
Referenced by DispositionNotificationTo(), and transport::processHeader().
| shared_ptr< headerField > InReplyTo | ( | ) |
References FIELD_ACCESS, and InReplyTo().
Referenced by InReplyTo().
| shared_ptr< const headerField > InReplyTo | ( | ) | const |
| 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 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 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 |
| 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 replaceField().
| bool isEmpty | ( | ) | const |
Tests whether the list of fields is empty.
| shared_ptr< headerField > MessageId | ( | ) |
References FIELD_ACCESS, and MessageId().
Referenced by MessageId(), and transport::processHeader().
| shared_ptr< const headerField > MessageId | ( | ) | const |
| shared_ptr< headerField > MimeVersion | ( | ) |
References FIELD_ACCESS, and MimeVersion().
Referenced by MimeVersion(), and transport::processHeader().
| shared_ptr< const headerField > MimeVersion | ( | ) | const |
References copyFrom(), and header().
| shared_ptr< headerField > Organization | ( | ) |
References FIELD_ACCESS, and Organization().
Referenced by Organization().
| shared_ptr< const headerField > Organization | ( | ) | const |
| shared_ptr< headerField > OriginalMessageId | ( | ) |
References FIELD_ACCESS, and OriginalMessageId().
Referenced by OriginalMessageId().
| shared_ptr< const headerField > OriginalMessageId | ( | ) | const |
|
protectedvirtual |
Reimplemented from component.
References vmime::end(), headerField::parseNext(), removeAllFields(), and component::setParsedBounds().
| shared_ptr< headerField > References | ( | ) |
References FIELD_ACCESS, and References().
Referenced by References().
| shared_ptr< const headerField > References | ( | ) | const |
| void removeAllFields | ( | ) |
Remove all fields from the list.
Referenced by parseImpl(), and ~header().
| void removeAllFields | ( | const string & | fieldName | ) |
Remove all fields with the specified name.
References findAllFields(), and removeField().
| void removeField | ( | const size_t | pos | ) |
Remove the field at the specified position.
| pos | position of the field to remove |
| 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 transport::processHeader(), removeAllFields(), and replaceField().
| 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 insertFieldBefore(), and removeField().
Referenced by transport::processHeader().
| shared_ptr< headerField > ReplyTo | ( | ) |
References FIELD_ACCESS, and ReplyTo().
Referenced by ReplyTo().
| shared_ptr< const headerField > ReplyTo | ( | ) | const |
| shared_ptr< headerField > ReturnPath | ( | ) |
References FIELD_ACCESS, and ReturnPath().
Referenced by ReturnPath().
| shared_ptr< const headerField > ReturnPath | ( | ) | const |
| shared_ptr< headerField > Sender | ( | ) |
References FIELD_ACCESS, and Sender().
Referenced by Sender().
| shared_ptr< const headerField > Sender | ( | ) | const |
| shared_ptr< headerField > Subject | ( | ) |
References FIELD_ACCESS, and Subject().
Referenced by Subject().
| shared_ptr< const headerField > Subject | ( | ) | const |
| shared_ptr< headerField > To | ( | ) |
References FIELD_ACCESS, and To().
Referenced by To().
| shared_ptr< const headerField > To | ( | ) | const |
| shared_ptr< headerField > UserAgent | ( | ) |
References FIELD_ACCESS, and UserAgent().
Referenced by UserAgent().
| shared_ptr< const headerField > UserAgent | ( | ) | const |