aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/rfc822/MCAttachment.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/rfc822/MCAttachment.cc')
-rw-r--r--src/core/rfc822/MCAttachment.cc60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/core/rfc822/MCAttachment.cc b/src/core/rfc822/MCAttachment.cc
index 172881cb..eae40cb0 100644
--- a/src/core/rfc822/MCAttachment.cc
+++ b/src/core/rfc822/MCAttachment.cc
@@ -211,8 +211,6 @@ Attachment * Attachment::attachmentWithText(String * text)
void Attachment::init()
{
mData = NULL;
- mContentTypeParameters = NULL;
- mlcContentTypeParameters = NULL;
setMimeType(MCSTR("application/octet-stream"));
}
@@ -225,14 +223,11 @@ Attachment::Attachment(Attachment * other) : AbstractPart(other)
{
init();
MC_SAFE_REPLACE_RETAIN(Data, mData, other->mData);
- setContentTypeParameters(other->mContentTypeParameters);
}
Attachment::~Attachment()
{
MC_SAFE_RELEASE(mData);
- MC_SAFE_RELEASE(mContentTypeParameters);
- MC_SAFE_RELEASE(mlcContentTypeParameters);
}
String * Attachment::description()
@@ -261,11 +256,6 @@ String * Attachment::description()
else {
result->appendUTF8Format("no data\n");
}
- if (mContentTypeParameters != NULL) {
- mc_foreachhashmapKeyAndValue(String, key, String, value, mContentTypeParameters) {
- result->appendUTF8Format("%s: %s\n", key->UTF8Characters(), value->UTF8Characters());
- }
- }
result->appendUTF8Format(">");
return result;
@@ -296,56 +286,6 @@ String * Attachment::decodedString()
}
}
-void Attachment::setContentTypeParameters(HashMap * parameters)
-{
- MC_SAFE_REPLACE_COPY(HashMap, mContentTypeParameters, parameters);
- MC_SAFE_RELEASE(mlcContentTypeParameters);
- if (mContentTypeParameters != NULL) {
- mlcContentTypeParameters = new HashMap();
- mc_foreachhashmapKeyAndValue(String, key, String, value, mContentTypeParameters) {
- mlcContentTypeParameters->setObjectForKey(key->lowercaseString(), value);
- }
- }
-}
-
-Array * Attachment::allContentTypeParametersNames()
-{
- if (mContentTypeParameters == NULL)
- return Array::array();
- return mContentTypeParameters->allKeys();
-}
-
-void Attachment::setContentTypeParameter(String * name, String * object)
-{
- if (mContentTypeParameters == NULL) {
- mContentTypeParameters = new HashMap();
- }
- if (mlcContentTypeParameters == NULL) {
- mlcContentTypeParameters = new HashMap();
- }
- if (object == NULL) {
- removeContentTypeParameter(name);
- return;
- }
- mContentTypeParameters->setObjectForKey(name, object);
- mlcContentTypeParameters->setObjectForKey(name->lowercaseString(), object);
-}
-
-void Attachment::removeContentTypeParameter(String * name)
-{
- if (mContentTypeParameters == NULL)
- return;
- mContentTypeParameters->removeObjectForKey(name);
- mlcContentTypeParameters->removeObjectForKey(name);
-}
-
-String * Attachment::contentTypeParameterValueForName(String * name)
-{
- if (mlcContentTypeParameters == NULL)
- return NULL;
- return (String *) mlcContentTypeParameters->objectForKey(name->lowercaseString());
-}
-
AbstractPart * Attachment::attachmentsWithMIME(struct mailmime * mime)
{
return attachmentsWithMIMEWithMain(mime, true);