diff options
author | Vincent Richard <[email protected]> | 2005-08-17 14:17:18 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2005-08-17 14:17:18 +0000 |
commit | 8de88d9e37627e41acdee2602634814d81685112 (patch) | |
tree | f521d61642bd08e2db0ca756544edbca9d330847 | |
parent | Added FETCH_IMPORTANCE flag. (diff) | |
download | vmime-8de88d9e37627e41acdee2602634814d81685112.tar.gz vmime-8de88d9e37627e41acdee2602634814d81685112.zip |
Content handler constness.
-rw-r--r-- | examples/example6.cpp | 4 | ||||
-rw-r--r-- | src/body.cpp | 2 | ||||
-rw-r--r-- | src/defaultAttachment.cpp | 4 | ||||
-rw-r--r-- | vmime/body.hpp | 4 | ||||
-rw-r--r-- | 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 <const contentHandler> body::getContents() const } -void body::setContents(ref <contentHandler> contents) +void body::setContents(ref <const contentHandler> 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 <contentHandler> data, +defaultAttachment::defaultAttachment(ref <const contentHandler> 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 <contentHandler> data, +defaultAttachment::defaultAttachment(ref <const contentHandler> 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 <contentHandler> contents); + void setContents(ref <const contentHandler> 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 <contentHandler> m_contents; + ref <const contentHandler> m_contents; weak_ref <bodyPart> m_part; weak_ref <header> 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 <contentHandler> data, const encoding& enc, const mediaType& type, const text& desc = NULL_TEXT, const word& name = NULL_WORD); - defaultAttachment(ref <contentHandler> data, const mediaType& type, const text& desc = NULL_TEXT, const word& name = NULL_WORD); + defaultAttachment(ref <const contentHandler> data, const encoding& enc, const mediaType& type, const text& desc = NULL_TEXT, const word& name = NULL_WORD); + defaultAttachment(ref <const contentHandler> 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 <contentHandler> 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 <const contentHandler> m_data; /**< Attachment data (eg. the file contents) */ + encoding m_encoding; /**< Encoding */ + word m_name; /**< Name/filename (eg. "sunset.jpg") */ private: |