cxxtools::MimeHeader Class Reference

The class implements a base class for mime entities, with headers as specified in rfc2045. More...

#include <cxxtools/mime.h>

Inheritance diagram for cxxtools::MimeHeader:
cxxtools::MimeEntity cxxtools::MimeMultipart

Public Member Functions

std::string getHeader (const std::string &key, const std::string &def=std::string()) const
 returns the header value or a default value
void setHeader (const std::string &key, const std::string &value, bool replace=true)
 Set a header line to the mime entity.
void addHeader (const std::string &key, const std::string &value)
 Adds a header line to the mime entity.
void unsetHeader (const std::string &key)
 Removes the header.
bool isMultipart () const
 Returns true, if the content type is multipart/*.

Friends

std::ostream & operator<< (std::ostream &out, const MimeHeader &mimeHeader)
void operator<<= (SerializationInfo &si, const MimeHeader &mh)
void operator>>= (const SerializationInfo &si, MimeHeader &mh)

Detailed Description

The class implements a base class for mime entities, with headers as specified in rfc2045.

Member Function Documentation

void cxxtools::MimeHeader::addHeader ( const std::string &  key,
const std::string &  value 
)
inline

Adds a header line to the mime entity.

std::string cxxtools::MimeHeader::getHeader ( const std::string &  key,
const std::string &  def = std::string() 
) const

returns the header value or a default value

bool cxxtools::MimeHeader::isMultipart ( ) const

Returns true, if the content type is multipart/*.

void cxxtools::MimeHeader::setHeader ( const std::string &  key,
const std::string &  value,
bool  replace = true 
)

Set a header line to the mime entity.

Reimplemented in cxxtools::MimeEntity.

void cxxtools::MimeHeader::unsetHeader ( const std::string &  key)

Removes the header.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const MimeHeader mimeHeader 
)
friend
void operator<<= ( SerializationInfo si,
const MimeHeader mh 
)
friend
void operator>>= ( const SerializationInfo si,
MimeHeader mh 
)
friend

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