diff options
author | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2016-05-03 22:47:33 -0700 |
---|---|---|
committer | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2016-05-03 22:47:33 -0700 |
commit | 9dbfc1eed668923b23ed5ed73fb42767e456fc61 (patch) | |
tree | 293c498f7674c7b56015655ff735bd9581e3b48e /src/async | |
parent | 8d1f80ed93d5c23a74705e1627b71cef103e067a (diff) |
expose isIdleEnable()
Diffstat (limited to 'src/async')
-rwxr-xr-x | src/async/imap/MCIMAPAsyncSession.cpp | 7 | ||||
-rwxr-xr-x | src/async/imap/MCIMAPAsyncSession.h | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/async/imap/MCIMAPAsyncSession.cpp b/src/async/imap/MCIMAPAsyncSession.cpp index aa7be032..af8a8dfa 100755 --- a/src/async/imap/MCIMAPAsyncSession.cpp +++ b/src/async/imap/MCIMAPAsyncSession.cpp @@ -76,6 +76,7 @@ IMAPAsyncSession::IMAPAsyncSession() #endif mGmailUserDisplayName = NULL; mQueueRunning = false; + mIdleEnabled = false; } IMAPAsyncSession::~IMAPAsyncSession() @@ -246,6 +247,11 @@ String * IMAPAsyncSession::gmailUserDisplayName() return mGmailUserDisplayName; } +bool IMAPAsyncSession::isIdleEnabled() +{ + return mIdleEnabled; +} + IMAPAsyncConnection * IMAPAsyncSession::session() { IMAPAsyncConnection * session = new IMAPAsyncConnection(); @@ -820,6 +826,7 @@ void IMAPAsyncSession::automaticConfigurationDone(IMAPSession * session) { MC_SAFE_REPLACE_COPY(IMAPIdentity, mServerIdentity, session->serverIdentity()); MC_SAFE_REPLACE_COPY(String, mGmailUserDisplayName, session->gmailUserDisplayName()); + mIdleEnabled = session->isIdleEnabled(); setDefaultNamespace(session->defaultNamespace()); mAutomaticConfigurationDone = true; } diff --git a/src/async/imap/MCIMAPAsyncSession.h b/src/async/imap/MCIMAPAsyncSession.h index 873c3dde..78ebd9b9 100755 --- a/src/async/imap/MCIMAPAsyncSession.h +++ b/src/async/imap/MCIMAPAsyncSession.h @@ -108,6 +108,8 @@ namespace mailcore { virtual void setClientIdentity(IMAPIdentity * clientIdentity); virtual String * gmailUserDisplayName() DEPRECATED_ATTRIBUTE; + + virtual bool isIdleEnabled(); virtual IMAPFolderInfoOperation * folderInfoOperation(String * folder); virtual IMAPFolderStatusOperation * folderStatusOperation(String * folder); @@ -208,7 +210,8 @@ namespace mailcore { dispatch_queue_t mDispatchQueue; #endif String * mGmailUserDisplayName; - + bool mIdleEnabled; + virtual IMAPAsyncConnection * session(); virtual IMAPAsyncConnection * matchingSessionForFolder(String * folder); virtual IMAPAsyncConnection * availableSession(); |