Monotone-Parent: da9c14ddfb4c9a9c929c7b84543af4ce664cfc10

Monotone-Revision: 829ccf73000a2d91a5daf67741479e395011b6a8

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-07-26T20:13:10
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2011-07-26 20:13:10 +00:00
parent b95cd69e4b
commit aad817d5ca
19 changed files with 307 additions and 150 deletions

View File

@@ -20,6 +20,8 @@
* Boston, MA 02111-1307, USA.
*/
#import <Foundation/NSArray.h>
#import <NGExtensions/NSObject+Logs.h>
#import <SOGo/SOGoFolder.h>
@@ -39,6 +41,43 @@
[self logWithFormat: @"unimplemented method: %@", NSStringFromSelector (_cmd)];
}
- (NSArray *) childKeys
{
if (!childKeys)
{
childKeys = [(MAPIStoreFolder *)
container messageKeysMatchingQualifier: nil
andSortOrderings: sortOrderings];
[childKeys retain];
}
return childKeys;
}
- (NSArray *) restrictedChildKeys
{
NSArray *keys;
if (!restrictedChildKeys)
{
if (restrictionState != MAPIRestrictionStateAlwaysTrue)
{
if (restrictionState == MAPIRestrictionStateNeedsEval)
keys = [(MAPIStoreFolder *)
container messageKeysMatchingQualifier: restriction
andSortOrderings: sortOrderings];
else
keys = [NSArray array];
}
else
keys = [self childKeys];
ASSIGN (restrictedChildKeys, keys);
}
return restrictedChildKeys;
}
- (id) lookupChild: (NSString *) childKey
{
return [(MAPIStoreFolder *) container lookupMessage: childKey];