VMime
contentTypeField Class Reference

#include <contentTypeField.hpp>

Inheritance diagram for contentTypeField:
Collaboration diagram for contentTypeField:

Public Member Functions

bool hasBoundary () const
const string getBoundary () const
void setBoundary (const string &boundary)
bool hasCharset () const
const charset getCharset () const
void setCharset (const charset &ch)
bool hasReportType () const
const string getReportType () const
void setReportType (const string &reportType)
Public Member Functions inherited from parameterizedHeaderField
 ~parameterizedHeaderField ()
void copyFrom (const component &other)
parameterizedHeaderFieldoperator= (const parameterizedHeaderField &other)
bool hasParameter (const string &paramName) const
shared_ptr< parameterfindParameter (const string &paramName) const
shared_ptr< parametergetParameter (const string &paramName)
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< parametergetParameterAt (const size_t pos)
const shared_ptr< const parametergetParameterAt (const size_t pos) const
const std::vector< shared_ptr< const parameter > > getParameterList () const
const std::vector< shared_ptr< parameter > > getParameterList ()
size_t getGeneratedSize (const generationContext &ctx)
const std::vector< shared_ptr< component > > getChildComponents ()
Public Member Functions inherited from headerField
 ~headerField ()
shared_ptr< componentclone () const
headerFieldoperator= (const headerField &other)
void setName (const string &name)
const string getName () const
bool isCustom () const
virtual shared_ptr< const headerFieldValuegetValue () const
template<typename T>
shared_ptr< const T > getValue () const
virtual shared_ptr< headerFieldValuegetValue ()
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)
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

 contentTypeField ()
 contentTypeField (contentTypeField &)
Protected Member Functions inherited from parameterizedHeaderField
 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 &)
objectoperator= (const object &)
virtual ~object ()

Additional Inherited Members

Static Public Member Functions inherited from headerField
static shared_ptr< headerFieldparseNext (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< headerFieldValuem_value

Constructor & Destructor Documentation

◆ contentTypeField() [1/2]

contentTypeField ( )
protected

◆ contentTypeField() [2/2]

contentTypeField ( contentTypeField & )
protected

Member Function Documentation

◆ getBoundary()

const string getBoundary ( ) const

Return the value of the "boundary" parameter.

Boundary is a random string used to separate body parts.

Returns
value of the "boundary" parameter

References parameterizedHeaderField::findParameter().

Referenced by headerFieldFactory.

◆ getCharset()

const charset getCharset ( ) const

Return the value of the "charset" parameter.

It specifies the charset used in the body part contents.

Returns
value of the "charset" parameter

References parameterizedHeaderField::findParameter().

Referenced by headerFieldFactory, htmlTextPart::parse(), and plainTextPart::parse().

◆ getReportType()

const string getReportType ( ) const

Return the value of the "report-type" parameter (RFC-1892).

Returns
value of the "report-type" parameter

References parameterizedHeaderField::findParameter().

Referenced by headerFieldFactory, and MDNHelper::isMDN().

◆ hasBoundary()

bool hasBoundary ( ) const

Test whether the "boundary" parameter is set.

Returns
true if the "boundary" parameter is set, or false otherwise

References parameterizedHeaderField::hasParameter().

Referenced by headerFieldFactory.

◆ hasCharset()

bool hasCharset ( ) const

Test whether the "charset" parameter is set.

Returns
true if the "charset" parameter is set, or false otherwise

References parameterizedHeaderField::hasParameter().

Referenced by headerFieldFactory.

◆ hasReportType()

bool hasReportType ( ) const

Test whether the "report-type" parameter is set.

Returns
true if the "report-type" parameter is set, or false otherwise

References parameterizedHeaderField::hasParameter().

Referenced by headerFieldFactory.

◆ setBoundary()

void setBoundary ( const string & boundary)

Set the value of the "boundary" parameter.

Boundary is a random string used to separate body parts. Normally, the boundary is generated automatically by VMime, you should not need to call this.

Parameters
boundarynew value for the "boundary" parameter

References parameterizedHeaderField::getParameter(), and vmime::charsets::US_ASCII.

Referenced by headerFieldFactory.

◆ setCharset()

void setCharset ( const charset & ch)

Set the value of the "charset" parameter.

It specifies the charset used in the body part contents.

Parameters
chnew value for the "charset" parameter

References parameterizedHeaderField::getParameter().

Referenced by headerFieldFactory.

◆ setReportType()

void setReportType ( const string & reportType)

Set the value of the "report-type" parameter (RFC-1892).

Parameters
reportTypenew value for the "report-type" parameter

References parameterizedHeaderField::getParameter(), and vmime::charsets::US_ASCII.

Referenced by headerFieldFactory.


The documentation for this class was generated from the following files: