aboutsummaryrefslogtreecommitdiffstats
path: root/src/bodyPart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bodyPart.cpp')
-rw-r--r--src/bodyPart.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/bodyPart.cpp b/src/bodyPart.cpp
index 009a7b8c..fbe9f1ed 100644
--- a/src/bodyPart.cpp
+++ b/src/bodyPart.cpp
@@ -121,6 +121,12 @@ ref <header> bodyPart::getHeader()
}
+void bodyPart::setHeader(ref <header> h)
+{
+ m_header = h;
+}
+
+
const ref <const body> bodyPart::getBody() const
{
return (m_body);
@@ -133,6 +139,19 @@ ref <body> bodyPart::getBody()
}
+void bodyPart::setBody(ref <body> b)
+{
+ ref <bodyPart> oldPart = b->m_part.acquire();
+
+ m_body = b;
+ m_body->setParentPart(thisRef().dynamicCast <bodyPart>());
+
+ // A body is associated to one and only one part
+ if (oldPart != NULL)
+ oldPart->setBody(vmime::create <body>());
+}
+
+
ref <bodyPart> bodyPart::getParentPart()
{
return m_parent.acquire();