aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Dmitry Isaikin <isaikin@corp.mail.ru>2016-02-25 15:34:14 +0300
committerGravatar Dmitry Isaikin <isaikin@corp.mail.ru>2016-02-26 12:38:33 +0300
commit326fd4f79ab9e1ac6714a5a662611c5ecc7afc05 (patch)
tree9d53ed89d9a84c4cd10e185c4fbe1a667273a109 /src
parent006346a36c0c12497cd82708d58bb7018ee9e11c (diff)
Add support for Yahoo XYMHIGHESTMODSEQ extension (use for HIGHESTMODSEQ feature on mailbox STATUS)
Diffstat (limited to 'src')
-rw-r--r--src/core/abstract/MCMessageConstants.h1
-rwxr-xr-xsrc/core/imap/MCIMAPSession.cpp10
-rwxr-xr-xsrc/core/imap/MCIMAPSession.h1
3 files changed, 10 insertions, 2 deletions
diff --git a/src/core/abstract/MCMessageConstants.h b/src/core/abstract/MCMessageConstants.h
index c6671bc7..10a52d5b 100644
--- a/src/core/abstract/MCMessageConstants.h
+++ b/src/core/abstract/MCMessageConstants.h
@@ -132,6 +132,7 @@ namespace mailcore {
IMAPCapabilityAuthSKey,
IMAPCapabilityAuthSRP,
IMAPCapabilityXOAuth2,
+ IMAPCapabilityXYMHighestModseq,
IMAPCapabilityGmail,
};
diff --git a/src/core/imap/MCIMAPSession.cpp b/src/core/imap/MCIMAPSession.cpp
index 9fb80711..79993ea8 100755
--- a/src/core/imap/MCIMAPSession.cpp
+++ b/src/core/imap/MCIMAPSession.cpp
@@ -323,6 +323,7 @@ void IMAPSession::init()
mXListEnabled = false;
mQResyncEnabled = false;
mCondstoreEnabled = false;
+ mXYMHighestModseqEnabled = false;
mIdentityEnabled = false;
mNamespaceEnabled = false;
mCompressionEnabled = false;
@@ -1111,7 +1112,7 @@ IMAPFolderStatus * IMAPSession::folderStatus(String * folder, ErrorCode * pError
mailimap_status_att_list_add(status_att_list, MAILIMAP_STATUS_ATT_RECENT);
mailimap_status_att_list_add(status_att_list, MAILIMAP_STATUS_ATT_UIDNEXT);
mailimap_status_att_list_add(status_att_list, MAILIMAP_STATUS_ATT_UIDVALIDITY);
- if (mCondstoreEnabled) {
+ if (mCondstoreEnabled || mXYMHighestModseqEnabled) {
mailimap_status_att_list_add(status_att_list, MAILIMAP_STATUS_ATT_HIGHESTMODSEQ);
}
@@ -3850,7 +3851,9 @@ void IMAPSession::capabilitySetWithSessionState(IndexSet * capabilities)
if (mailimap_has_extension(mImap, (char *)"MOVE")) {
capabilities->addIndex(IMAPCapabilityMove);
}
-
+ if (mailimap_has_extension(mImap, (char *)"XYMHIGHESTMODSEQ")) {
+ capabilities->addIndex(IMAPCapabilityXYMHighestModseq);
+ }
applyCapabilities(capabilities);
}
@@ -3887,6 +3890,9 @@ void IMAPSession::applyCapabilities(IndexSet * capabilities)
if (capabilities->containsIndex(IMAPCapabilityQResync)) {
mQResyncEnabled = true;
}
+ if (capabilities->containsIndex(IMAPCapabilityXYMHighestModseq)) {
+ mXYMHighestModseqEnabled = true;
+ }
if (capabilities->containsIndex(IMAPCapabilityXOAuth2)) {
mXOauth2Enabled = true;
}
diff --git a/src/core/imap/MCIMAPSession.h b/src/core/imap/MCIMAPSession.h
index 6ce895f6..effa0fe8 100755
--- a/src/core/imap/MCIMAPSession.h
+++ b/src/core/imap/MCIMAPSession.h
@@ -239,6 +239,7 @@ namespace mailcore {
bool mXListEnabled;
bool mCondstoreEnabled;
bool mQResyncEnabled;
+ bool mXYMHighestModseqEnabled;
bool mIdentityEnabled;
bool mXOauth2Enabled;
bool mNamespaceEnabled;