From 8de88d9e37627e41acdee2602634814d81685112 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Wed, 17 Aug 2005 14:17:18 +0000 Subject: [PATCH] Content handler constness. --- examples/example6.cpp | 4 ++-- src/body.cpp | 2 +- src/defaultAttachment.cpp | 4 ++-- vmime/body.hpp | 4 ++-- vmime/defaultAttachment.hpp | 14 +++++++------- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/example6.cpp b/examples/example6.cpp index 3368e59c..eec80d72 100644 --- a/examples/example6.cpp +++ b/examples/example6.cpp @@ -417,7 +417,7 @@ static void connectStore() case 3: f->fetchMessage(msg, vmime::messaging::folder::FETCH_FULL_HEADER); - std::cout << msg->getHeader().generate() << std::endl; + std::cout << msg->getHeader()->generate() << std::endl; break; // Show message envelope @@ -426,7 +426,7 @@ static void connectStore() f->fetchMessage(msg, vmime::messaging::folder::FETCH_ENVELOPE); #define ENV_HELPER(x) \ - try { std::cout << msg->getHeader().x()->generate() << std::endl; } \ + try { std::cout << msg->getHeader()->x()->generate() << std::endl; } \ catch (vmime::exception) { /* In case the header field does not exist. */ } ENV_HELPER(From) diff --git a/src/body.cpp b/src/body.cpp index 135b1e14..9f6a235e 100644 --- a/src/body.cpp +++ b/src/body.cpp @@ -515,7 +515,7 @@ const ref body::getContents() const } -void body::setContents(ref contents) +void body::setContents(ref contents) { m_contents = contents; } diff --git a/src/defaultAttachment.cpp b/src/defaultAttachment.cpp index 118a301a..0fe45c96 100644 --- a/src/defaultAttachment.cpp +++ b/src/defaultAttachment.cpp @@ -30,14 +30,14 @@ defaultAttachment::defaultAttachment() } -defaultAttachment::defaultAttachment(ref data, +defaultAttachment::defaultAttachment(ref data, const encoding& enc, const mediaType& type, const text& desc, const word& name) : m_type(type), m_desc(desc), m_data(data), m_encoding(enc), m_name(name) { } -defaultAttachment::defaultAttachment(ref data, +defaultAttachment::defaultAttachment(ref data, const mediaType& type, const text& desc, const word& name) : m_type(type), m_desc(desc), m_data(data), m_encoding(encoding::decide(data)), m_name(name) diff --git a/vmime/body.hpp b/vmime/body.hpp index 46d53f50..d0f7063f 100644 --- a/vmime/body.hpp +++ b/vmime/body.hpp @@ -178,7 +178,7 @@ public: * * @param contents new body contents */ - void setContents(ref contents); + void setContents(ref contents); /** Return the media type of the data contained in the body contents. * This is a shortcut for getHeader()->ContentType()->getValue() @@ -231,7 +231,7 @@ private: string m_prologText; string m_epilogText; - ref m_contents; + ref m_contents; weak_ref m_part; weak_ref
m_header; diff --git a/vmime/defaultAttachment.hpp b/vmime/defaultAttachment.hpp index d938cb46..a2172507 100644 --- a/vmime/defaultAttachment.hpp +++ b/vmime/defaultAttachment.hpp @@ -41,8 +41,8 @@ protected: public: - defaultAttachment(ref data, const encoding& enc, const mediaType& type, const text& desc = NULL_TEXT, const word& name = NULL_WORD); - defaultAttachment(ref data, const mediaType& type, const text& desc = NULL_TEXT, const word& name = NULL_WORD); + defaultAttachment(ref data, const encoding& enc, const mediaType& type, const text& desc = NULL_TEXT, const word& name = NULL_WORD); + defaultAttachment(ref data, const mediaType& type, const text& desc = NULL_TEXT, const word& name = NULL_WORD); defaultAttachment(const defaultAttachment& attach); ~defaultAttachment(); @@ -57,11 +57,11 @@ public: protected: - mediaType m_type; // Media type (eg. "application/octet-stream") - text m_desc; // Description (eg. "The image you requested") - ref m_data; // Attachment data (eg. the file contents) - encoding m_encoding; // Encoding - word m_name; // Name/filename (eg. "sunset.jpg") + mediaType m_type; /**< Media type (eg. "application/octet-stream") */ + text m_desc; /**< Description (eg. "The image you requested") */ + ref m_data; /**< Attachment data (eg. the file contents) */ + encoding m_encoding; /**< Encoding */ + word m_name; /**< Name/filename (eg. "sunset.jpg") */ private: