VMime
|
Public Member Functions | |
~parameterizedHeaderField () | |
void | copyFrom (const component &other) |
parameterizedHeaderField & | operator= (const parameterizedHeaderField &other) |
bool | hasParameter (const string ¶mName) const |
shared_ptr< parameter > | findParameter (const string ¶mName) const |
shared_ptr< parameter > | getParameter (const string ¶mName) |
void | appendParameter (shared_ptr< parameter > param) |
void | insertParameterBefore (shared_ptr< parameter > beforeParam, shared_ptr< parameter > param) |
void | insertParameterBefore (const size_t pos, shared_ptr< parameter > param) |
void | insertParameterAfter (shared_ptr< parameter > afterParam, shared_ptr< parameter > param) |
void | insertParameterAfter (const size_t pos, shared_ptr< parameter > param) |
void | removeParameter (shared_ptr< parameter > param) |
void | removeParameter (const size_t pos) |
void | removeAllParameters () |
size_t | getParameterCount () const |
bool | isEmpty () const |
const shared_ptr< parameter > | getParameterAt (const size_t pos) |
const shared_ptr< const parameter > | getParameterAt (const size_t pos) const |
const std::vector< shared_ptr < const parameter > > | getParameterList () const |
const std::vector< shared_ptr < parameter > > | getParameterList () |
const std::vector< shared_ptr < component > > | getChildComponents () |
Public Member Functions inherited from headerField | |
~headerField () | |
shared_ptr< component > | clone () const |
headerField & | operator= (const headerField &other) |
void | setName (const string &name) |
const string | getName () const |
bool | isCustom () const |
virtual shared_ptr< const headerFieldValue > | getValue () const |
template<typename T > | |
shared_ptr< const T > | getValue () const |
virtual shared_ptr < headerFieldValue > | getValue () |
template<typename T > | |
shared_ptr< T > | getValue () |
virtual void | setValue (shared_ptr< headerFieldValue > value) |
virtual void | setValueConst (shared_ptr< const headerFieldValue > value) |
virtual void | setValue (const headerFieldValue &value) |
void | setValue (const string &value) |
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 | |
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 |
Referenced by parameterizedHeaderField::copyFrom(), and parameterizedHeaderField::getParameter().
|
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 |
Reimplemented from headerField.
References parameterizedHeaderField::appendParameter(), vmime::clone(), headerField::copyFrom(), and parameterizedHeaderField::removeAllParameters().
Referenced by parameterizedHeaderField::operator=().
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 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 headerField::generateImpl().
|
virtual |
Return the list of children of this component.
Reimplemented from headerField.
References headerField::getChildComponents().
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(), and stringUtils::toLower().
Referenced by contentTypeField::setBoundary(), contentTypeField::setCharset(), contentDispositionField::setCreationDate(), contentDispositionField::setFilename(), contentDispositionField::setModificationDate(), contentDispositionField::setReadDate(), contentTypeField::setReportType(), and contentDispositionField::setSize().
Return the parameter at the specified position.
pos | position |
Return the parameter at the specified position.
pos | position |
size_t getParameterCount | ( | ) | const |
Return the number of parameters in the list.
const std::vector< shared_ptr< const parameter > > getParameterList | ( | ) | const |
Return the parameter list.
const std::vector< shared_ptr< parameter > > getParameterList | ( | ) |
Return the parameter list.
bool hasParameter | ( | const string & | paramName | ) | const |
Checks whether (at least) one parameter with this name exists.
Parameter name is case-insensitive.
paramName | parameter name |
References stringUtils::toLower().
Referenced by contentTypeField::hasBoundary(), contentTypeField::hasCharset(), contentDispositionField::hasCreationDate(), contentDispositionField::hasFilename(), contentDispositionField::hasModificationDate(), contentDispositionField::hasReadDate(), contentTypeField::hasReportType(), contentDispositionField::hasSize(), and MDNHelper::isMDN().
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 |
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 |
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 |
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 |
bool isEmpty | ( | ) | const |
Tests whether the list of parameters is empty.
parameterizedHeaderField & operator= | ( | const parameterizedHeaderField & | other | ) |
References parameterizedHeaderField::copyFrom().
|
protectedvirtual |
Reimplemented from headerField.
References vmime::end(), parserHelpers::isDigit(), parserHelpers::isSpace(), and vmime::npos.
void removeAllParameters | ( | ) |
Remove all parameters from the list.
Referenced by parameterizedHeaderField::copyFrom(), and parameterizedHeaderField::~parameterizedHeaderField().
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 |
void removeParameter | ( | const size_t | pos | ) |
Remove the parameter at the specified position.
pos | position of the parameter to remove |