aboutsummaryrefslogtreecommitdiffstats
path: root/src/bodyPartAttachment.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2005-11-04 23:21:22 +0000
committerVincent Richard <[email protected]>2005-11-04 23:21:22 +0000
commitacfa9ffc64f56de42049bf5049810c15477729ed (patch)
tree3bb84a7319fb209c00f656927c83965f03bd5329 /src/bodyPartAttachment.cpp
parentFixed typo for 'ac_cv_sizeof_long'. (diff)
downloadvmime-acfa9ffc64f56de42049bf5049810c15477729ed.tar.gz
vmime-acfa9ffc64f56de42049bf5049810c15477729ed.zip
Refactored header field values and parameters.
Diffstat (limited to 'src/bodyPartAttachment.cpp')
-rw-r--r--src/bodyPartAttachment.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/bodyPartAttachment.cpp b/src/bodyPartAttachment.cpp
index adf605d3..c40b84b2 100644
--- a/src/bodyPartAttachment.cpp
+++ b/src/bodyPartAttachment.cpp
@@ -40,7 +40,7 @@ const mediaType bodyPartAttachment::getType() const
try
{
- type = getContentType()->getValue();
+ type = *getContentType()->getValue().dynamicCast <const mediaType>();
}
catch (exceptions::no_such_field&)
{
@@ -76,8 +76,7 @@ const word bodyPartAttachment::getName() const
{
try
{
- ref <defaultParameter> prm = getContentType()->
- findParameter("name").dynamicCast <defaultParameter>();
+ ref <parameter> prm = getContentType()->findParameter("name");
if (prm != NULL)
name = prm->getValue();
@@ -102,10 +101,10 @@ const text bodyPartAttachment::getDescription() const
try
{
- const textField& cd = dynamic_cast <textField&>
- (*getHeader()->findField(fields::CONTENT_DESCRIPTION));
+ ref <const headerField> cd =
+ getHeader()->findField(fields::CONTENT_DESCRIPTION);
- description = cd.getValue();
+ description = *cd->getValue().dynamicCast <const text>();
}
catch (exceptions::no_such_field&)
{