|
VMime
|
#include <parameterizedHeaderField.hpp>


Protected Member Functions | |
| parameterizedHeaderField () | |
| 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 headerField | |
| headerField () | |
| headerField (const string &fieldName) | |
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 () |
Additional Inherited Members | |
Static Public Member Functions inherited from headerField | |
| static shared_ptr< headerField > | parseNext (const parsingContext &ctx, const string &buffer, const size_t position, const size_t end, size_t *newPosition=NULL) |
Protected Attributes inherited from headerField | |
| string | m_name |
| shared_ptr< headerFieldValue > | m_value |
A header field that can also contain parameters (name=value pairs).
Parameters can be created using vmime::parameterFactory.
|
protected |
References parameterizedHeaderField::removeAllParameters().
| void appendParameter | ( | shared_ptr< parameter > | param | ) |
Add a parameter at the end of the list.
| param | parameter to append |
References vmime::dynamicCast().
Referenced by parameterizedHeaderField::copyFrom(), parameterizedHeaderField::getParameter(), and parameterizedHeaderField::parseImpl().
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 |
Reimplemented from headerField.
References parameterizedHeaderField::appendParameter(), vmime::clone(), headerField::copyFrom(), vmime::dynamicCast(), and parameterizedHeaderField::removeAllParameters().
Referenced by parameterizedHeaderField::operator=().
| shared_ptr< parameter > findParameter | ( | const string & | paramName | ) | const |
Find the first parameter that matches the specified name.
Parameter name is case-insensitive. If no parameter is found, NULL is returned.
| paramName | parameter name |
References vmime::dynamicCast(), vmime::end(), and stringUtils::toLower().
Referenced by contentTypeField::getBoundary(), contentTypeField::getCharset(), contentDispositionField::getCreationDate(), contentDispositionField::getFilename(), contentDispositionField::getModificationDate(), contentDispositionField::getReadDate(), contentTypeField::getReportType(), and contentDispositionField::getSize().
|
protectedvirtual |
Reimplemented from headerField.
References vmime::dynamicCast(), and headerField::generateImpl().
|
virtual |
Return the list of children of this component.
Reimplemented from headerField.
References vmime::dynamicCast(), and headerField::getChildComponents().
|
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 headerField.
References vmime::dynamicCast(), and headerField::getGeneratedSize().
| shared_ptr< parameter > getParameter | ( | const string & | paramName | ) |
Find the first parameter that matches the specified name.
Parameter name is case-insensitive. If no parameter is found, one will be created and inserted into the parameter list.
| paramName | parameter name |
References parameterizedHeaderField::appendParameter(), vmime::dynamicCast(), vmime::end(), and stringUtils::toLower().
Referenced by contentTypeField::setBoundary(), contentTypeField::setCharset(), contentDispositionField::setCreationDate(), contentDispositionField::setFilename(), contentDispositionField::setModificationDate(), contentDispositionField::setReadDate(), contentTypeField::setReportType(), and contentDispositionField::setSize().
| const shared_ptr< parameter > getParameterAt | ( | const size_t | pos | ) |
Return the parameter at the specified position.
| pos | position |
References vmime::dynamicCast().
Return the parameter at the specified position.
| pos | position |
References vmime::dynamicCast().
| size_t getParameterCount | ( | ) | const |
Return the number of parameters in the list.
| const std::vector< shared_ptr< parameter > > getParameterList | ( | ) |
Return the parameter list.
| const std::vector< shared_ptr< const parameter > > getParameterList | ( | ) | const |
Checks whether (at least) one parameter with this name exists.
Parameter name is case-insensitive.
| paramName | parameter name |
References vmime::dynamicCast(), vmime::end(), and stringUtils::toLower().
Referenced by contentTypeField::hasBoundary(), contentTypeField::hasCharset(), contentDispositionField::hasCreationDate(), contentDispositionField::hasFilename(), contentDispositionField::hasModificationDate(), contentDispositionField::hasReadDate(), contentTypeField::hasReportType(), and contentDispositionField::hasSize().
| void insertParameterAfter | ( | const size_t | pos, |
| shared_ptr< parameter > | param | ||
| ) |
Insert a new parameter after the specified position.
| pos | position of the parameter before the new parameter |
| param | parameter to insert |
| std::out_of_range | if the position is out of range |
References vmime::dynamicCast().
| void insertParameterAfter | ( | shared_ptr< parameter > | afterParam, |
| shared_ptr< parameter > | param | ||
| ) |
Insert a new parameter after the specified parameter.
| afterParam | parameter after which the new parameter will be inserted |
| param | parameter to insert |
| std::out_of_range | if the parameter is not in the list |
References vmime::dynamicCast().
| void insertParameterBefore | ( | const size_t | pos, |
| shared_ptr< parameter > | param | ||
| ) |
Insert a new parameter before the specified position.
| pos | position at which to insert the new parameter (0 to insert at the beginning of the list) |
| param | parameter to insert |
| std::out_of_range | if the position is out of range |
References vmime::dynamicCast().
| void insertParameterBefore | ( | shared_ptr< parameter > | beforeParam, |
| shared_ptr< parameter > | param | ||
| ) |
Insert a new parameter before the specified parameter.
| beforeParam | parameter before which the new parameter will be inserted |
| param | parameter to insert |
| std::out_of_range | if the parameter is not in the list |
References vmime::dynamicCast().
| bool isEmpty | ( | ) | const |
Tests whether the list of parameters is empty.
| parameterizedHeaderField & operator= | ( | const parameterizedHeaderField & | other | ) |
References parameterizedHeaderField::copyFrom().
| void removeAllParameters | ( | ) |
Remove all parameters from the list.
Referenced by parameterizedHeaderField::copyFrom(), parameterizedHeaderField::parseImpl(), and parameterizedHeaderField::~parameterizedHeaderField().
Remove the parameter at the specified position.
| pos | position of the parameter to remove |
References vmime::dynamicCast().
| void removeParameter | ( | shared_ptr< parameter > | param | ) |
Remove the specified parameter from the list.
| param | parameter to remove |
| std::out_of_range | if the parameter is not in the list |
References vmime::dynamicCast().