diff options
author | Vincent Richard <[email protected]> | 2006-07-14 08:28:35 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2006-07-14 08:28:35 +0000 |
commit | 27840a441d2cc1c99eabe08a1d0a9f561540ce43 (patch) | |
tree | c4313edc758374995c26f26298a05414ea7dd5e6 /src/defaultAttachment.cpp | |
parent | Fixed bugs in MHTML code + unit tests. (diff) | |
download | vmime-27840a441d2cc1c99eabe08a1d0a9f561540ce43.tar.gz vmime-27840a441d2cc1c99eabe08a1d0a9f561540ce43.zip |
Replaced & with ref<> + clean up.
Diffstat (limited to 'src/defaultAttachment.cpp')
-rw-r--r-- | src/defaultAttachment.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
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; } |