aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/attachmentHelper.cpp2
-rw-r--r--src/bodyPartAttachment.cpp2
-rw-r--r--src/defaultAttachment.cpp28
-rw-r--r--src/fileAttachment.cpp10
-rw-r--r--src/generatedMessageAttachment.cpp2
-rw-r--r--src/messageBuilder.cpp2
-rw-r--r--src/parsedMessageAttachment.cpp4
-rw-r--r--vmime/attachment.hpp2
-rw-r--r--vmime/bodyPartAttachment.hpp2
-rw-r--r--vmime/defaultAttachment.hpp4
-rw-r--r--vmime/fileAttachment.hpp2
-rw-r--r--vmime/generatedMessageAttachment.hpp2
-rw-r--r--vmime/parsedMessageAttachment.hpp2
13 files changed, 32 insertions, 32 deletions
diff --git a/src/attachmentHelper.cpp b/src/attachmentHelper.cpp
index 84da47a7..e8ec82c2 100644
--- a/src/attachmentHelper.cpp
+++ b/src/attachmentHelper.cpp
@@ -251,7 +251,7 @@ void attachmentHelper::addAttachment(ref <message> msg, ref <attachment> att)
}
// Generate the attachment part
- att->generateIn(*part);
+ att->generateIn(part);
}
diff --git a/src/bodyPartAttachment.cpp b/src/bodyPartAttachment.cpp
index 9780aeff..0156ab61 100644
--- a/src/bodyPartAttachment.cpp
+++ b/src/bodyPartAttachment.cpp
@@ -153,7 +153,7 @@ ref <const contentTypeField> bodyPartAttachment::getContentType() const
}
-void bodyPartAttachment::generateIn(bodyPart& /* parent */) const
+void bodyPartAttachment::generateIn(ref <bodyPart> /* parent */) const
{
// Not used
}
diff --git a/src/defaultAttachment.cpp b/src/defaultAttachment.cpp
index 2e10eb3c..8861131c 100644
--- a/src/defaultAttachment.cpp
+++ b/src/defaultAttachment.cpp
@@ -76,56 +76,56 @@ defaultAttachment& defaultAttachment::operator=(const defaultAttachment& attach)
}
-void defaultAttachment::generateIn(bodyPart& parent) const
+void defaultAttachment::generateIn(ref <bodyPart> parent) const
{
// Create and append a new part for this attachment
ref <bodyPart> part = vmime::create <bodyPart>();
- parent.getBody()->appendPart(part);
+ parent->getBody()->appendPart(part);
- generatePart(*part);
+ generatePart(part);
}
-void defaultAttachment::generatePart(bodyPart& part) const
+void defaultAttachment::generatePart(ref <bodyPart> part) const
{
// Set header fields
- part.getHeader()->ContentType()->setValue(m_type);
- if (!m_desc.isEmpty()) part.getHeader()->ContentDescription()->setValue(m_desc);
- part.getHeader()->ContentTransferEncoding()->setValue(m_encoding);
- part.getHeader()->ContentDisposition()->setValue(contentDisposition(contentDispositionTypes::ATTACHMENT));
+ part->getHeader()->ContentType()->setValue(m_type);
+ if (!m_desc.isEmpty()) part->getHeader()->ContentDescription()->setValue(m_desc);
+ part->getHeader()->ContentTransferEncoding()->setValue(m_encoding);
+ part->getHeader()->ContentDisposition()->setValue(contentDisposition(contentDispositionTypes::ATTACHMENT));
// Set contents
- part.getBody()->setContents(m_data);
+ part->getBody()->setContents(m_data);
}
const mediaType defaultAttachment::getType() const
{
- return (m_type);
+ return m_type;
}
const text defaultAttachment::getDescription() const
{
- return (m_desc);
+ return m_desc;
}
const word defaultAttachment::getName() const
{
- return (m_name);
+ return m_name;
}
const ref <const contentHandler> defaultAttachment::getData() const
{
- return (m_data);
+ return m_data;
}
const encoding defaultAttachment::getEncoding() const
{
- return (m_encoding);
+ return m_encoding;
}
diff --git a/src/fileAttachment.cpp b/src/fileAttachment.cpp
index ece0abc3..988cc0fb 100644
--- a/src/fileAttachment.cpp
+++ b/src/fileAttachment.cpp
@@ -66,7 +66,7 @@ void fileAttachment::setData(const string& filename)
if (!*file)
{
- delete (file);
+ delete file;
throw exceptions::open_file_error();
}
@@ -76,11 +76,11 @@ void fileAttachment::setData(const string& filename)
}
-void fileAttachment::generatePart(bodyPart& part) const
+void fileAttachment::generatePart(ref <bodyPart> part) const
{
defaultAttachment::generatePart(part);
- ref <contentDispositionField> cdf = part.getHeader()->ContentDisposition().
+ ref <contentDispositionField> cdf = part->getHeader()->ContentDisposition().
dynamicCast <contentDispositionField>();
if (m_fileInfo.hasSize()) cdf->setSize(utility::stringUtils::toString(m_fileInfo.getSize()));
@@ -93,13 +93,13 @@ void fileAttachment::generatePart(bodyPart& part) const
const fileAttachment::fileInfo& fileAttachment::getFileInfo() const
{
- return (m_fileInfo);
+ return m_fileInfo;
}
fileAttachment::fileInfo& fileAttachment::getFileInfo()
{
- return (m_fileInfo);
+ return m_fileInfo;
}
diff --git a/src/generatedMessageAttachment.cpp b/src/generatedMessageAttachment.cpp
index 76229fea..50ad94d1 100644
--- a/src/generatedMessageAttachment.cpp
+++ b/src/generatedMessageAttachment.cpp
@@ -95,7 +95,7 @@ ref <message> generatedMessageAttachment::getMessage() const
}
-void generatedMessageAttachment::generateIn(bodyPart& /* parent */) const
+void generatedMessageAttachment::generateIn(ref <bodyPart> /* parent */) const
{
// Not used (see 'parsedMessageAttachment')
}
diff --git a/src/messageBuilder.cpp b/src/messageBuilder.cpp
index d22d31ef..4f5d3a92 100644
--- a/src/messageBuilder.cpp
+++ b/src/messageBuilder.cpp
@@ -132,7 +132,7 @@ ref <message> messageBuilder::construct() const
for (std::vector <ref <attachment> >::const_iterator a = m_attach.begin() ;
a != m_attach.end() ; ++a)
{
- (*a)->generateIn(*msg);
+ (*a)->generateIn(msg);
}
}
diff --git a/src/parsedMessageAttachment.cpp b/src/parsedMessageAttachment.cpp
index 349f6881..b60715bb 100644
--- a/src/parsedMessageAttachment.cpp
+++ b/src/parsedMessageAttachment.cpp
@@ -95,11 +95,11 @@ ref <message> parsedMessageAttachment::getMessage() const
}
-void parsedMessageAttachment::generateIn(bodyPart& parent) const
+void parsedMessageAttachment::generateIn(ref <bodyPart> parent) const
{
// Create and append a new part for this attachment
ref <bodyPart> part = vmime::create <bodyPart>();
- parent.getBody()->appendPart(part);
+ parent->getBody()->appendPart(part);
// Set header fields
part->getHeader()->ContentType()->setValue(getType());
diff --git a/vmime/attachment.hpp b/vmime/attachment.hpp
index 67bab8d0..527a2171 100644
--- a/vmime/attachment.hpp
+++ b/vmime/attachment.hpp
@@ -108,7 +108,7 @@ protected:
*
* @param parent body part in which to generate the attachment
*/
- virtual void generateIn(bodyPart& parent) const = 0;
+ virtual void generateIn(ref <bodyPart> parent) const = 0;
};
diff --git a/vmime/bodyPartAttachment.hpp b/vmime/bodyPartAttachment.hpp
index b1b7ce6c..4138470b 100644
--- a/vmime/bodyPartAttachment.hpp
+++ b/vmime/bodyPartAttachment.hpp
@@ -62,7 +62,7 @@ public:
private:
- void generateIn(bodyPart& parent) const;
+ void generateIn(ref <bodyPart> parent) const;
ref <const contentDispositionField> getContentDisposition() const;
ref <const contentTypeField> getContentType() const;
diff --git a/vmime/defaultAttachment.hpp b/vmime/defaultAttachment.hpp
index 4e54c75f..bfa72377 100644
--- a/vmime/defaultAttachment.hpp
+++ b/vmime/defaultAttachment.hpp
@@ -74,11 +74,11 @@ protected:
private:
// No need to override "generateIn", use "generatePart" instead (see below).
- void generateIn(bodyPart& parent) const;
+ void generateIn(ref <bodyPart> parent) const;
protected:
- virtual void generatePart(bodyPart& part) const;
+ virtual void generatePart(ref <bodyPart> part) const;
};
diff --git a/vmime/fileAttachment.hpp b/vmime/fileAttachment.hpp
index 6ec686a4..50351ecb 100644
--- a/vmime/fileAttachment.hpp
+++ b/vmime/fileAttachment.hpp
@@ -166,7 +166,7 @@ private:
fileInfo m_fileInfo;
- void generatePart(bodyPart& part) const;
+ void generatePart(ref <bodyPart> part) const;
};
diff --git a/vmime/generatedMessageAttachment.hpp b/vmime/generatedMessageAttachment.hpp
index c62cdf58..f0443d38 100644
--- a/vmime/generatedMessageAttachment.hpp
+++ b/vmime/generatedMessageAttachment.hpp
@@ -60,7 +60,7 @@ public:
protected:
- void generateIn(bodyPart& parent) const;
+ void generateIn(ref <bodyPart> parent) const;
private:
diff --git a/vmime/parsedMessageAttachment.hpp b/vmime/parsedMessageAttachment.hpp
index ada88df8..5add8a0c 100644
--- a/vmime/parsedMessageAttachment.hpp
+++ b/vmime/parsedMessageAttachment.hpp
@@ -59,7 +59,7 @@ public:
protected:
- void generateIn(bodyPart& parent) const;
+ void generateIn(ref <bodyPart> parent) const;
private: