diff options
author | Dmitry Isaikin <isaikin-dmitry@yandex.ru> | 2016-05-17 05:22:59 +0400 |
---|---|---|
committer | HoĆ V. DINH <dinh.viet.hoa@gmail.com> | 2016-05-16 18:22:59 -0700 |
commit | df85a8925e4de9480a5a153f3101486743979570 (patch) | |
tree | 3f613d1da44c4fa385d1bc198bc881349fb9697a /src/async/imap/MCIMAPAsyncSession.h | |
parent | ced3f8648d116cf1bba1ff106093c7148df129ce (diff) |
Try to use IMAP connection with minimum queue size among connections that already selected into needed folder (#1404)
Diffstat (limited to 'src/async/imap/MCIMAPAsyncSession.h')
-rwxr-xr-x | src/async/imap/MCIMAPAsyncSession.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/async/imap/MCIMAPAsyncSession.h b/src/async/imap/MCIMAPAsyncSession.h index 78ebd9b9..0230deda 100755 --- a/src/async/imap/MCIMAPAsyncSession.h +++ b/src/async/imap/MCIMAPAsyncSession.h @@ -212,8 +212,18 @@ namespace mailcore { String * mGmailUserDisplayName; bool mIdleEnabled; + /*! Create new IMAP session */ virtual IMAPAsyncConnection * session(); + /*! Returns a new or an existing session, it is best suited to run the IMAP command + in the specified folder. */ virtual IMAPAsyncConnection * matchingSessionForFolder(String * folder); + /*! Returns a session with minimum operation queue among already created ones. + If @param filterByFolder is true, then function filters sessions with + predicate (lastFolder() EQUALS TO @param folder). In case of @param folder is NULL + the function would search a session among non-selected ones. */ + virtual IMAPAsyncConnection * sessionWithMinQueue(bool filterByFolder, String * folder); + /*! Returns existant or new session with empty operation queue, if it can. + Otherwise, returns the session with the minimum size of the operation queue. */ virtual IMAPAsyncConnection * availableSession(); virtual IMAPMessageRenderingOperation * renderingOperation(IMAPMessage * message, String * folder, |