Support for content types and parameters defined in RFC-1892.

This commit is contained in:
Vincent Richard 2005-03-23 18:46:31 +00:00
parent b2df9c842b
commit d0aeb41c45
5 changed files with 49 additions and 0 deletions

View File

@ -13,6 +13,9 @@ VERSION 0.6.4cvs
* messaging/POP3*: added notifications.
* constants.{cpp|hpp}, contentTypeField.{cpp|hpp}: added support for
content types and parameters defined in RFC-1892.
2005-03-17 Vincent Richard <vincent@vincent-richard.net>
* base.{cpp|hpp}: renamed 'MIME_VERSION' to 'SUPPORTED_MIME_VERSION'.

View File

@ -41,12 +41,14 @@ namespace mediaTypes
const string::value_type* const TEXT_HTML = "html";
const string::value_type* const TEXT_RICHTEXT = "richtext";
const string::value_type* const TEXT_ENRICHED = "enriched";
const string::value_type* const TEXT_RFC822_HEADERS = "rfc822-headers"; // RFC-1892
const string::value_type* const MULTIPART_MIXED = "mixed";
const string::value_type* const MULTIPART_RELATED = "related";
const string::value_type* const MULTIPART_ALTERNATIVE = "alternative";
const string::value_type* const MULTIPART_PARALLEL = "parallel";
const string::value_type* const MULTIPART_DIGEST = "digest";
const string::value_type* const MULTIPART_REPORT = "report"; // RFC-1892
const string::value_type* const MESSAGE_RFC822 = "rfc822";
const string::value_type* const MESSAGE_PARTIAL = "partial";

View File

@ -62,4 +62,16 @@ void contentTypeField::setCharset(const charset& ch)
}
const string contentTypeField::getReportType() const
{
return (dynamic_cast <const defaultParameter&>(*findParameter("report-type")).getValue());
}
void contentTypeField::setReportType(const string& reportType)
{
dynamic_cast <defaultParameter&>(*getParameter("report-type")).setValue(reportType);
}
} // vmime

View File

@ -45,12 +45,14 @@ namespace vmime
extern const string::value_type* const TEXT_HTML;
extern const string::value_type* const TEXT_RICHTEXT;
extern const string::value_type* const TEXT_ENRICHED;
extern const string::value_type* const TEXT_RFC822_HEADERS; // RFC-1892
extern const string::value_type* const MULTIPART_MIXED;
extern const string::value_type* const MULTIPART_RELATED;
extern const string::value_type* const MULTIPART_ALTERNATIVE;
extern const string::value_type* const MULTIPART_PARALLEL;
extern const string::value_type* const MULTIPART_DIGEST;
extern const string::value_type* const MULTIPART_REPORT; // RFC-1892
extern const string::value_type* const MESSAGE_RFC822;
extern const string::value_type* const MESSAGE_PARTIAL;

View File

@ -43,11 +43,41 @@ protected:
public:
/** Return the value of the "boundary" parameter.
*
* @return value of the "boundary" parameter
*/
const string getBoundary() const;
/** Set the value of the "boundary" parameter.
*
* @param boundary new value for the "boundary" parameter
*/
void setBoundary(const string& boundary);
/** Return the value of the "charset" parameter.
*
* @return value of the "charset" parameter
*/
const charset& getCharset() const;
/** Set the value of the "charset" parameter.
*
* @param ch new value for the "charset" parameter
*/
void setCharset(const charset& ch);
/** Return the value of the "report-type" parameter (RFC-1892).
*
* @return value of the "report-type" parameter
*/
const string getReportType() const;
/** Set the value of the "report-type" parameter (RFC-1892).
*
* @param reportType new value for the "report-type" parameter
*/
void setReportType(const string& reportType);
};