From 5915ca4e34d2192cb3ef06c8f47aaa4b16cf7f53 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Thu, 14 Nov 2013 23:17:40 +0100 Subject: Custom fetch attributes. --- src/net/imap/IMAPMessage.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/net/imap/IMAPMessage.cpp') diff --git a/src/net/imap/IMAPMessage.cpp b/src/net/imap/IMAPMessage.cpp index 33599689..d512e752 100644 --- a/src/net/imap/IMAPMessage.cpp +++ b/src/net/imap/IMAPMessage.cpp @@ -366,7 +366,7 @@ void IMAPMessage::extractImpl(ref p, utility::outputStream& int IMAPMessage::processFetchResponse - (const int options, const IMAPParser::message_data* msgData) + (const fetchAttributes& options, const IMAPParser::message_data* msgData) { ref folder = m_folder.acquire(); @@ -403,7 +403,7 @@ int IMAPMessage::processFetchResponse } case IMAPParser::msg_att_item::ENVELOPE: { - if (!(options & folder::FETCH_FULL_HEADER)) + if (!options.has(fetchAttributes::FULL_HEADER)) { const IMAPParser::envelope* env = (*it)->envelope(); ref hdr = getOrCreateHeader(); @@ -478,7 +478,7 @@ int IMAPMessage::processFetchResponse } case IMAPParser::msg_att_item::BODY_SECTION: { - if (!(options & folder::FETCH_FULL_HEADER)) + if (!options.has(fetchAttributes::FULL_HEADER)) { if ((*it)->section()->section_text1() && (*it)->section()->section_text1()->type() @@ -599,7 +599,8 @@ ref IMAPMessage::getParsedMessage() std::vector > msgs; msgs.push_back(thisRef().dynamicCast ()); - m_folder.acquire()->fetchMessages(msgs, IMAPFolder::FETCH_STRUCTURE, /* progress */ NULL); + m_folder.acquire()->fetchMessages + (msgs, fetchAttributes(fetchAttributes::STRUCTURE), /* progress */ NULL); structure = getStructure(); } -- cgit v1.2.3