aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar silenteh <silenteh@gmail.com>2013-06-05 00:23:34 +0200
committerGravatar silenteh <silenteh@gmail.com>2013-06-05 00:23:34 +0200
commitf4ea2b37befa78edda1e5caafc2f5c3647506b05 (patch)
tree50a9b13c15dbe2c8d411ed22bb3ee5f5eb23fe1c
parent7caa935cb50e712a1ee99b61d3b0029616773f6d (diff)
changed the wrong variable name to firstUnseenUid - gets the first unseen Uid on folder SELECT imap command if the response is available
-rw-r--r--src/async/imap/MCIMAPFolderInfoOperation.cc8
-rw-r--r--src/async/imap/MCIMAPFolderInfoOperation.h4
-rw-r--r--src/core/imap/MCIMAPSession.cc10
-rw-r--r--src/core/imap/MCIMAPSession.h4
-rw-r--r--src/objc/imap/MCOIMAPFolderInfo.h4
-rw-r--r--src/objc/imap/MCOIMAPFolderInfo.m4
6 files changed, 17 insertions, 17 deletions
diff --git a/src/async/imap/MCIMAPFolderInfoOperation.cc b/src/async/imap/MCIMAPFolderInfoOperation.cc
index 8220caf0..20df52ed 100644
--- a/src/async/imap/MCIMAPFolderInfoOperation.cc
+++ b/src/async/imap/MCIMAPFolderInfoOperation.cc
@@ -19,7 +19,7 @@ IMAPFolderInfoOperation::IMAPFolderInfoOperation()
mUidValidity = 0;
mMessageCount = 0;
mModSequenceValue = 0;
- mUnseenCount = 0;
+ mFirstUnseenUid = 0;
}
IMAPFolderInfoOperation::~IMAPFolderInfoOperation()
@@ -46,9 +46,9 @@ int IMAPFolderInfoOperation::messageCount()
return mMessageCount;
}
-int IMAPFolderInfoOperation::unseenCount()
+uint32_t IMAPFolderInfoOperation::firstUnseenUid()
{
- return mUnseenCount;
+ return mFirstUnseenUid;
}
void IMAPFolderInfoOperation::main()
@@ -72,7 +72,7 @@ void IMAPFolderInfoOperation::main()
mUidValidity = session()->session()->uidValidity();
mModSequenceValue = session()->session()->modSequenceValue();
mMessageCount = session()->session()->lastFolderMessageCount();
- mUnseenCount = session()->session()->lastFolderUnseenCount();
+ mFirstUnseenUid = session()->session()->firstUnseenUid();
setError(error);
}
diff --git a/src/async/imap/MCIMAPFolderInfoOperation.h b/src/async/imap/MCIMAPFolderInfoOperation.h
index 07c7a789..2ec29be2 100644
--- a/src/async/imap/MCIMAPFolderInfoOperation.h
+++ b/src/async/imap/MCIMAPFolderInfoOperation.h
@@ -26,7 +26,7 @@ namespace mailcore {
virtual uint32_t uidValidity();
virtual uint64_t modSequenceValue();
virtual int messageCount();
- virtual int unseenCount();
+ virtual uint32_t firstUnseenUid();
public: // subclass behavior
virtual void main();
@@ -37,7 +37,7 @@ namespace mailcore {
uint32_t mUidValidity;
uint64_t mModSequenceValue;
int mMessageCount;
- int mUnseenCount;
+ uint32_t mFirstUnseenUid;
};
diff --git a/src/core/imap/MCIMAPSession.cc b/src/core/imap/MCIMAPSession.cc
index 542f7e14..207ad17c 100644
--- a/src/core/imap/MCIMAPSession.cc
+++ b/src/core/imap/MCIMAPSession.cc
@@ -329,7 +329,7 @@ void IMAPSession::init()
mUIDNext = 0;
mModSequenceValue = 0;
mFolderMsgCount = 0;
- mFolderUnseenCount = 0;
+ mFirstUnseenUid = 0;
mLastFetchedSequenceNumber = 0;
mCurrentFolder = NULL;
pthread_mutex_init(&mIdleLock, NULL);
@@ -842,9 +842,9 @@ void IMAPSession::select(String * folder, ErrorCode * pError)
}
if (mImap->imap_selection_info->sel_first_unseen) {
- mFolderUnseenCount = (unsigned int) (mImap->imap_selection_info->sel_first_unseen);
+ mFirstUnseenUid = mImap->imap_selection_info->sel_first_unseen;
} else {
- mFolderUnseenCount = -1;
+ mFirstUnseenUid = -1;
}
@@ -2702,9 +2702,9 @@ unsigned int IMAPSession::lastFolderMessageCount()
return mFolderMsgCount;
}
-unsigned int IMAPSession::lastFolderUnseenCount()
+uint32_t IMAPSession::firstUnseenUid()
{
- return mFolderUnseenCount;
+ return mFirstUnseenUid;
}
IMAPSyncResult * IMAPSession::syncMessagesByUID(String * folder, IMAPMessagesRequestKind requestKind,
diff --git a/src/core/imap/MCIMAPSession.h b/src/core/imap/MCIMAPSession.h
index 5a052744..4c651aa5 100644
--- a/src/core/imap/MCIMAPSession.h
+++ b/src/core/imap/MCIMAPSession.h
@@ -122,7 +122,7 @@ namespace mailcore {
virtual uint32_t uidNext();
virtual uint64_t modSequenceValue();
virtual unsigned int lastFolderMessageCount();
- virtual unsigned int lastFolderUnseenCount();
+ virtual uint32_t firstUnseenUid();
virtual bool isIdleEnabled();
@@ -159,7 +159,7 @@ namespace mailcore {
uint32_t mUIDNext;
uint64_t mModSequenceValue;
unsigned int mFolderMsgCount;
- unsigned int mFolderUnseenCount;
+ uint32_t mFirstUnseenUid;
unsigned int mLastFetchedSequenceNumber;
String * mCurrentFolder;
diff --git a/src/objc/imap/MCOIMAPFolderInfo.h b/src/objc/imap/MCOIMAPFolderInfo.h
index 2c51b7bb..dfff3f9f 100644
--- a/src/objc/imap/MCOIMAPFolderInfo.h
+++ b/src/objc/imap/MCOIMAPFolderInfo.h
@@ -31,8 +31,8 @@
// number of messages.
@property (nonatomic, assign) int messageCount;
-// number of unseen messages.
-@property (nonatomic, assign) int unseenCount;
+// first uid of the unseen messages.
+@property (nonatomic, assign) uint32_t firstUnseenUid;
@end
diff --git a/src/objc/imap/MCOIMAPFolderInfo.m b/src/objc/imap/MCOIMAPFolderInfo.m
index 3f90ed65..e39551a4 100644
--- a/src/objc/imap/MCOIMAPFolderInfo.m
+++ b/src/objc/imap/MCOIMAPFolderInfo.m
@@ -13,14 +13,14 @@
uint32_t _uidValidity;
uint64_t _modSequenceValue;
int _messageCount;
- int _unseenCount;
+ uint32_t _firstUnseenUid;
}
@synthesize uidNext = _uidNext;
@synthesize uidValidity = _uidValidity;
@synthesize modSequenceValue = _modSequenceValue;
@synthesize messageCount = _messageCount;
-@synthesize unseenCount = _unseenCount;
+@synthesize firstUnseenUid = _firstUnseenUid;
+ (MCOIMAPFolderInfo *) info
{