aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2005-03-23 18:46:31 +0000
committerVincent Richard <[email protected]>2005-03-23 18:46:31 +0000
commitd0aeb41c4539373556a84f09d7665205d2b2070f (patch)
tree57cc870808e9bf5284f505970e78f35881e5000f
parentAdded POP3 notifications. (diff)
downloadvmime-d0aeb41c4539373556a84f09d7665205d2b2070f.tar.gz
vmime-d0aeb41c4539373556a84f09d7665205d2b2070f.zip
Support for content types and parameters defined in RFC-1892.
-rw-r--r--ChangeLog3
-rw-r--r--src/constants.cpp2
-rw-r--r--src/contentTypeField.cpp12
-rw-r--r--vmime/constants.hpp2
-rw-r--r--vmime/contentTypeField.hpp30
5 files changed, 49 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 62d49e1a..2c375850 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 <[email protected]>
* base.{cpp|hpp}: renamed 'MIME_VERSION' to 'SUPPORTED_MIME_VERSION'.
diff --git a/src/constants.cpp b/src/constants.cpp
index ee13e0b0..f7c52fbb 100644
--- a/src/constants.cpp
+++ b/src/constants.cpp
@@ -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";
diff --git a/src/contentTypeField.cpp b/src/contentTypeField.cpp
index 0f2dc81f..61b4e5e4 100644
--- a/src/contentTypeField.cpp
+++ b/src/contentTypeField.cpp
@@ -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
diff --git a/vmime/constants.hpp b/vmime/constants.hpp
index a13ea437..929796fd 100644
--- a/vmime/constants.hpp
+++ b/vmime/constants.hpp
@@ -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;
diff --git a/vmime/contentTypeField.hpp b/vmime/contentTypeField.hpp
index a0e222b5..442d6ba4 100644
--- a/vmime/contentTypeField.hpp
+++ b/vmime/contentTypeField.hpp
@@ -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);
};