diff options
author | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2013-04-15 23:12:23 -0700 |
---|---|---|
committer | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2013-04-15 23:12:23 -0700 |
commit | 9389c2ddf5742659618051a04ac6069528187808 (patch) | |
tree | 54bc6bae9ef76cd9681812ddca65de8964592c9d /src/core/rfc822 | |
parent | cc32a9b5768717ac845c907ab57f3edfb1c1fd70 (diff) |
Various fixes.
Diffstat (limited to 'src/core/rfc822')
-rw-r--r-- | src/core/rfc822/MCAttachment.cc | 1 | ||||
-rw-r--r-- | src/core/rfc822/MCMessageParser.cc | 8 | ||||
-rw-r--r-- | src/core/rfc822/MCMessageParser.h | 1 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/core/rfc822/MCAttachment.cc b/src/core/rfc822/MCAttachment.cc index 0874d300..c75e689a 100644 --- a/src/core/rfc822/MCAttachment.cc +++ b/src/core/rfc822/MCAttachment.cc @@ -482,7 +482,6 @@ Attachment * Attachment::attachmentWithSingleMIME(struct mailmime * mime) content_id = single_fields.fld_id; loc = single_fields.fld_location; - MCLog("filename %s", filename); if (filename != NULL) { result->setFilename(String::stringByDecodingMIMEHeaderValue(filename)); } diff --git a/src/core/rfc822/MCMessageParser.cc b/src/core/rfc822/MCMessageParser.cc index 335ff43f..98982e93 100644 --- a/src/core/rfc822/MCMessageParser.cc +++ b/src/core/rfc822/MCMessageParser.cc @@ -14,6 +14,12 @@ MessageParser * MessageParser::messageParserWithData(Data * data) return (MessageParser *) parser->autorelease(); } +MessageParser * MessageParser::messageParserWithContentsOfFile(String * filename) +{ + Data * data = Data::dataWithContentsOfFile(filename); + return messageParserWithData(data); +} + void MessageParser::init() { mData = NULL; @@ -31,8 +37,6 @@ MessageParser::MessageParser(Data * data) msg = data_message_init(data->bytes(), data->length()); mailmessage_get_bodystructure(msg, &mime); mMainPart = (AbstractPart *) Attachment::attachmentsWithMIME(msg->msg_mime)->retain(); - MCLog("%s:%p ", MCUTF8(mMainPart->className()), mMainPart); - MCLog("%s:%p ", MCUTF8(mMainPart->description()), mMainPart); mMainPart->setMessage(this); header()->importIMFFields(msg->msg_fields); mailmessage_free(msg); diff --git a/src/core/rfc822/MCMessageParser.h b/src/core/rfc822/MCMessageParser.h index f5d043c5..4f13299d 100644 --- a/src/core/rfc822/MCMessageParser.h +++ b/src/core/rfc822/MCMessageParser.h @@ -15,6 +15,7 @@ namespace mailcore { class MessageParser : public AbstractMessage { public: static MessageParser * messageParserWithData(Data * data); + static MessageParser * messageParserWithContentsOfFile(String * filename); MessageParser(Data * data); virtual ~MessageParser(); |