aboutsummaryrefslogtreecommitdiffstats
path: root/src/mdn/receivedMDNInfos.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2005-07-12 22:28:02 +0000
committerVincent Richard <[email protected]>2005-07-12 22:28:02 +0000
commit681297e10b666e13cc463f6fbb16236f36c3266c (patch)
tree5d2392e2283232ed3475cd9c69e22897b03e8a97 /src/mdn/receivedMDNInfos.cpp
parentAdded contentHandler::extractRaw(). (diff)
downloadvmime-681297e10b666e13cc463f6fbb16236f36c3266c.tar.gz
vmime-681297e10b666e13cc463f6fbb16236f36c3266c.zip
Reference counting and smart pointers.
Diffstat (limited to 'src/mdn/receivedMDNInfos.cpp')
-rw-r--r--src/mdn/receivedMDNInfos.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mdn/receivedMDNInfos.cpp b/src/mdn/receivedMDNInfos.cpp
index e9a82198..7c6f2893 100644
--- a/src/mdn/receivedMDNInfos.cpp
+++ b/src/mdn/receivedMDNInfos.cpp
@@ -24,7 +24,7 @@ namespace vmime {
namespace mdn {
-receivedMDNInfos::receivedMDNInfos(const message* msg)
+receivedMDNInfos::receivedMDNInfos(const ref <const message> msg)
: m_msg(msg)
{
extract();
@@ -45,7 +45,7 @@ receivedMDNInfos& receivedMDNInfos::operator=(const receivedMDNInfos& other)
}
-const message* receivedMDNInfos::getMessage() const
+const ref <const message> receivedMDNInfos::getMessage() const
{
return (m_msg);
}
@@ -73,16 +73,16 @@ void receivedMDNInfos::copyFrom(const receivedMDNInfos& other)
void receivedMDNInfos::extract()
{
- const body* bdy = m_msg->getBody();
+ const ref <const body> bdy = m_msg->getBody();
for (int i = 0 ; i < bdy->getPartCount() ; ++i)
{
- const bodyPart* part = bdy->getPartAt(i);
+ const ref <const bodyPart> part = bdy->getPartAt(i);
if (!part->getHeader()->hasField(fields::CONTENT_TYPE))
continue;
- const mediaType& type = part->getHeader()->ContentType().getValue();
+ const mediaType& type = part->getHeader()->ContentType()->getValue();
// Extract from second part (message/disposition-notification)
if (type.getType() == vmime::mediaTypes::MESSAGE &&
@@ -91,16 +91,16 @@ void receivedMDNInfos::extract()
std::ostringstream oss;
utility::outputStreamAdapter vos(oss);
- part->getBody()->getContents().extract(vos);
+ part->getBody()->getContents()->extract(vos);
// Body actually contains fields
header fields;
fields.parse(oss.str());
- try { m_omid = fields.OriginalMessageId().getValue(); }
+ try { m_omid = fields.OriginalMessageId()->getValue(); }
catch (exceptions::no_such_field&) { /* Ignore */ }
- try { m_disp = fields.Disposition().getValue(); }
+ try { m_disp = fields.Disposition()->getValue(); }
catch (exceptions::no_such_field&) { /* Ignore */ }
}
}