mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-11 18:01:23 +00:00
Monotone-Parent: e84bf5143c772f6a25ca10b0bb98c3669df4fde6
Monotone-Revision: 58749c14c4e65b3991fa8ffd498965821ad031ce Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-02-14T17:26:48 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -22,6 +22,12 @@
|
||||
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
|
||||
#import <EOControl/EOQualifier.h>
|
||||
|
||||
#import <Mailer/SOGoMailFolder.h>
|
||||
|
||||
#import "NSString+MAPIStore.h"
|
||||
#import "NSValue+MAPIStore.h"
|
||||
#import "MAPIStoreTypes.h"
|
||||
@@ -35,12 +41,22 @@
|
||||
withTag: (enum MAPITAGS) propTag
|
||||
{
|
||||
enum MAPISTATUS rc;
|
||||
|
||||
SOGoMailFolder *child;
|
||||
EOQualifier *searchQualifier;
|
||||
uint32_t intValue;
|
||||
|
||||
rc = MAPI_E_SUCCESS;
|
||||
switch (propTag)
|
||||
{
|
||||
case PR_CONTENT_UNREAD:
|
||||
*data = MAPILongValue (memCtx, 0);
|
||||
child = [self lookupChild: childKey];
|
||||
searchQualifier
|
||||
= [EOQualifier qualifierWithQualifierFormat: @"flags = %@ AND not flags = %@",
|
||||
@"unseen", @"deleted"];
|
||||
intValue = [[child fetchUIDsMatchingQualifier: searchQualifier
|
||||
sortOrdering: nil] count];
|
||||
[self logWithFormat: @"unread count for %@: %u\n", childKey, intValue];
|
||||
*data = MAPILongValue (memCtx, intValue);
|
||||
break;
|
||||
case PR_CONTAINER_CLASS_UNICODE:
|
||||
*data = [@"IPF.Note" asUnicodeInMemCtx: memCtx];
|
||||
|
||||
Reference in New Issue
Block a user