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/pop3/POP3Folder.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/net/pop3/POP3Folder.cpp') diff --git a/src/net/pop3/POP3Folder.cpp b/src/net/pop3/POP3Folder.cpp index 6a652de0..ffff121e 100644 --- a/src/net/pop3/POP3Folder.cpp +++ b/src/net/pop3/POP3Folder.cpp @@ -308,7 +308,7 @@ std::vector > POP3Folder::getFolders(const bool /* recursive */) } -void POP3Folder::fetchMessages(std::vector >& msg, const int options, +void POP3Folder::fetchMessages(std::vector >& msg, const fetchAttributes& options, utility::progressListener* progress) { ref store = m_store.acquire(); @@ -334,7 +334,7 @@ void POP3Folder::fetchMessages(std::vector >& msg, const int opti progress->progress(++current, total); } - if (options & FETCH_SIZE) + if (options.has(fetchAttributes::SIZE)) { // Send the "LIST" command POP3Command::LIST()->send(store->getConnection()); @@ -374,7 +374,7 @@ void POP3Folder::fetchMessages(std::vector >& msg, const int opti } - if (options & FETCH_UID) + if (options.has(fetchAttributes::UID)) { // Send the "UIDL" command POP3Command::UIDL()->send(store->getConnection()); @@ -411,7 +411,7 @@ void POP3Folder::fetchMessages(std::vector >& msg, const int opti } -void POP3Folder::fetchMessage(ref msg, const int options) +void POP3Folder::fetchMessage(ref msg, const fetchAttributes& options) { ref store = m_store.acquire(); @@ -423,7 +423,7 @@ void POP3Folder::fetchMessage(ref msg, const int options) msg.dynamicCast ()->fetch (thisRef().dynamicCast (), options); - if (options & FETCH_SIZE) + if (options.has(fetchAttributes::SIZE)) { // Send the "LIST" command POP3Command::LIST(msg->getNumber())->send(store->getConnection()); @@ -456,7 +456,7 @@ void POP3Folder::fetchMessage(ref msg, const int options) } } - if (options & FETCH_UID) + if (options.has(fetchAttributes::UID)) { // Send the "UIDL" command POP3Command::UIDL(msg->getNumber())->send(store->getConnection()); @@ -489,9 +489,9 @@ void POP3Folder::fetchMessage(ref msg, const int options) int POP3Folder::getFetchCapabilities() const { - return (FETCH_ENVELOPE | FETCH_CONTENT_INFO | - FETCH_SIZE | FETCH_FULL_HEADER | FETCH_UID | - FETCH_IMPORTANCE); + return fetchAttributes::ENVELOPE | fetchAttributes::CONTENT_INFO | + fetchAttributes::SIZE | fetchAttributes::FULL_HEADER | + fetchAttributes::UID | fetchAttributes::IMPORTANCE; } -- cgit