aboutsummaryrefslogtreecommitdiffstats
path: root/src/bodyPartAttachment.cpp
diff options
context:
space:
mode:
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&)
{