mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-06 15:46:23 +00:00
Monotone-Parent: 23072776516ad7ec761501356d062052d748d8c7
Monotone-Revision: 0803c3f82523e76024a78031ba0e71fce02404eb Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-02-24T20:40:07 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
|
||||
#import "MAPIStoreTypes.h"
|
||||
#import "NSAutoreleasePool+MAPIStore.h"
|
||||
#import "MAPIStoreFolder.h"
|
||||
|
||||
#import "MAPIStoreGCSMessageTable.h"
|
||||
|
||||
@@ -61,66 +62,6 @@
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSArray *) _childKeysUsingRestrictions: (BOOL) useRestrictions
|
||||
{
|
||||
static NSArray *fields = nil;
|
||||
NSArray *records;
|
||||
EOQualifier *componentQualifier, *fetchQualifier;
|
||||
GCSFolder *ocsFolder;
|
||||
EOFetchSpecification *fs;
|
||||
NSArray *keys;
|
||||
|
||||
if (!fields)
|
||||
fields = [[NSArray alloc]
|
||||
initWithObjects: @"c_name", @"c_version", nil];
|
||||
|
||||
componentQualifier = [self componentQualifier];
|
||||
|
||||
if (useRestrictions
|
||||
&& restrictionState != MAPIRestrictionStateAlwaysTrue)
|
||||
{
|
||||
if (restrictionState == MAPIRestrictionStateNeedsEval)
|
||||
{
|
||||
fetchQualifier = [[EOAndQualifier alloc]
|
||||
initWithQualifiers:
|
||||
componentQualifier,
|
||||
restriction,
|
||||
nil];
|
||||
[fetchQualifier autorelease];
|
||||
}
|
||||
else
|
||||
fetchQualifier = nil;
|
||||
}
|
||||
else
|
||||
fetchQualifier = componentQualifier;
|
||||
|
||||
if (fetchQualifier)
|
||||
{
|
||||
ocsFolder = [folder ocsFolder];
|
||||
fs = [EOFetchSpecification
|
||||
fetchSpecificationWithEntityName: [ocsFolder folderName]
|
||||
qualifier: fetchQualifier
|
||||
sortOrderings: sortOrderings];
|
||||
records = [ocsFolder fetchFields: fields fetchSpecification: fs];
|
||||
keys = [records objectsForKey: @"c_name"
|
||||
notFoundMarker: nil];
|
||||
}
|
||||
else
|
||||
keys = [NSArray array];
|
||||
|
||||
return keys;
|
||||
}
|
||||
|
||||
- (NSArray *) childKeys
|
||||
{
|
||||
return [self _childKeysUsingRestrictions: NO];
|
||||
}
|
||||
|
||||
- (NSArray *) restrictedChildKeys
|
||||
{
|
||||
return [self _childKeysUsingRestrictions: YES];
|
||||
}
|
||||
|
||||
- (struct mapi_SPropertyRestriction *) _fixedDatePropertyRestriction: (struct mapi_SPropertyRestriction *) res
|
||||
{
|
||||
struct mapi_SPropertyRestriction *translatedRes;
|
||||
@@ -204,13 +145,6 @@
|
||||
|
||||
/* sorting */
|
||||
|
||||
- (NSString *) sortIdentifierForProperty: (enum MAPITAGS) property
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (EOSortOrdering *) _sortOrderingFromSortOrder: (struct SSortOrder *) sortOrder
|
||||
{
|
||||
EOSortOrdering *newSortOrdering;
|
||||
@@ -295,4 +229,12 @@
|
||||
[self logWithFormat: @"new sort orderings: %@", sortOrderings];
|
||||
}
|
||||
|
||||
/* subclasses */
|
||||
- (NSString *) sortIdentifierForProperty: (enum MAPITAGS) property
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user