Class MimeField.

Inherits HeaderField. Inherited by ContentDisposition, ContentLanguage, ContentTransferEncoding and ContentType.

This is a base class for the complex MIME header fields. It inherits from HeaderField, and provides methods to parse and maintain a list of MIME parameters.

MimeField::MimeField( HeaderField::Type t )

Constructs a new MimeField of type t. Only for use by subclasses. Users should obtain MimeFields from HeaderField::create().

Reimplements HeaderField::HeaderField().

void MimeField::addParameter( const EString & n, const EString & v )

Adds a parameter named n with value v, replacing any previous setting.

EString MimeField::baseValue() const

This pure virtual function is used by rfc822() and value() to fetch the value of this header field without any parameters(). rfc822() and value() then append the parameters().

EString MimeField::parameter( const EString & n ) const

Returns the value of the parameter named n (ignoring the case of the name). If there is no such parameter, this function returns an empty string.

EString MimeField::parameterString() const

Returns the canonical string representation of this MimeField's parameters() (including the leading ";"), or an empty string if there are no parameters.

EStringList * MimeField::parameters() const

Returns a pointer to a list of the parameters for this MimeField. This is never a null pointer.

void MimeField::parseParameters( EmailParser * p )

Parses p, which is expected to refer to a string whose next characters form the RFC 2045 production '*(";"parameter)'.

void MimeField::removeParameter( const EString & n )

Removes the parameter named n (without regard to case), or does nothing if there is no such parameter.

UString MimeField::value() const

Like HeaderField::value(), returns the contents of this MIME field in a representation suitable for storage.

Reimplements HeaderField::value().

This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.