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/POP3Message.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/net/pop3/POP3Message.cpp') diff --git a/src/net/pop3/POP3Message.cpp b/src/net/pop3/POP3Message.cpp index 5b883e15..bad25cb9 100644 --- a/src/net/pop3/POP3Message.cpp +++ b/src/net/pop3/POP3Message.cpp @@ -172,28 +172,28 @@ void POP3Message::fetchPartHeader(ref /* p */) } -void POP3Message::fetch(ref msgFolder, const int options) +void POP3Message::fetch(ref msgFolder, const fetchAttributes& options) { ref folder = m_folder.acquire(); if (folder != msgFolder) throw exceptions::folder_not_found(); - // FETCH_STRUCTURE and FETCH_FLAGS are not supported by POP3. - if (options & (folder::FETCH_STRUCTURE | folder::FETCH_FLAGS)) + // STRUCTURE and FLAGS attributes are not supported by POP3 + if (options.has(fetchAttributes::STRUCTURE | fetchAttributes::FLAGS)) throw exceptions::operation_not_supported(); // Check for the real need to fetch the full header static const int optionsRequiringHeader = - folder::FETCH_ENVELOPE | folder::FETCH_CONTENT_INFO | - folder::FETCH_FULL_HEADER | folder::FETCH_IMPORTANCE; + fetchAttributes::ENVELOPE | fetchAttributes::CONTENT_INFO | + fetchAttributes::FULL_HEADER | fetchAttributes::IMPORTANCE; - if (!(options & optionsRequiringHeader)) + if (!options.has(optionsRequiringHeader)) return; - // No need to differenciate between FETCH_ENVELOPE, - // FETCH_CONTENT_INFO, ... since POP3 only permits to - // retrieve the whole header and not fields in particular. + // No need to differenciate between ENVELOPE, CONTENT_INFO, ... + // since POP3 only permits to retrieve the whole header and not + // fields in particular. // Emit the "TOP" command ref store = folder->m_store.acquire(); -- cgit v1.2.3