aboutsummaryrefslogtreecommitdiffstats
path: root/src/fileAttachment.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2005-01-28 17:50:53 +0000
committerVincent Richard <[email protected]>2005-01-28 17:50:53 +0000
commit4ae97ddb0957c626a01682e24c68710e608bcc43 (patch)
treeb81b4898dbfae5a81a6ca6820c7530bc39acf3e9 /src/fileAttachment.cpp
parentFixed bug with signed/unsigned char. (diff)
downloadvmime-4ae97ddb0957c626a01682e24c68710e608bcc43.tar.gz
vmime-4ae97ddb0957c626a01682e24c68710e608bcc43.zip
Splitted 'contentHandler' into three classes: 'emptyContentHandler', 'stringContentHandler' and 'streamContentHandler'.
Diffstat (limited to 'src/fileAttachment.cpp')
-rw-r--r--src/fileAttachment.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/fileAttachment.cpp b/src/fileAttachment.cpp
index 9eff4af9..c156eb98 100644
--- a/src/fileAttachment.cpp
+++ b/src/fileAttachment.cpp
@@ -23,6 +23,8 @@
#include "vmime/fileAttachment.hpp"
#include "vmime/exception.hpp"
+#include "vmime/streamContentHandler.hpp"
+
namespace vmime
{
@@ -35,7 +37,7 @@ fileAttachment::fileAttachment(const string& filename, const mediaType& type, co
setData(filename);
- m_encoding = encoding::decide(m_data);
+ m_encoding = encoding::decide(*m_data);
}
@@ -62,7 +64,7 @@ void fileAttachment::setData(const string& filename)
throw exceptions::open_file_error();
}
- m_data.setData(new utility::inputStreamPointerAdapter(file, true), 0, true);
+ m_data = new streamContentHandler(new utility::inputStreamPointerAdapter(file, true), 0, true);
}