Monotone-Parent: 0811b557e4a5f5fb3a026bfc3e9578e656e1d32b

Monotone-Revision: cf1931cde83bb56232e35db1c1b6f4fab0c87270

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-07-26T19:06:55
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2011-07-26 19:06:55 +00:00
parent 287625af3f
commit 4e1f62a061
7 changed files with 32 additions and 18 deletions

View File

@ -1,5 +1,9 @@
2011-07-26 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/MAPIStoreTable.m (-lookupChild:)): new method that
subclasses must override and that a child object matching the
table type.
* OpenChange/MAPIStoreObject.m (-lookupChild:): removed method as
it was too generic. Each subclass has now its own set of
specialized methods.

View File

@ -20,8 +20,15 @@
* Boston, MA 02111-1307, USA.
*/
#import "MAPIStoreMessage.h"
#import "MAPIStoreAttachmentTable.h"
@implementation MAPIStoreAttachmentTable
- (id) lookupChild: (NSString *) childKey
{
return [(MAPIStoreMessage *) container lookupAttachment: childKey];
}
@end

View File

@ -57,4 +57,9 @@ static Class MAPIStoreFAIMessageK = Nil;
return [(MAPIStoreFolder *) container faiMessageKeys];
}
- (id) lookupChild: (NSString *) childKey
{
return [(MAPIStoreFolder *) container lookupFAIMessage: childKey];
}
@end

View File

@ -55,6 +55,11 @@
return [self childKeys];
}
- (id) lookupChild: (NSString *) childKey
{
return [(MAPIStoreMessage *) container lookupFolder: childKey];
}
- (NSString *) backendIdentifierForProperty: (enum MAPITAGS) property
{
return nil;

View File

@ -39,24 +39,9 @@
[self logWithFormat: @"unimplemented method: %@", NSStringFromSelector (_cmd)];
}
- (MAPIRestrictionState) evaluatePropertyRestriction: (struct mapi_SPropertyRestriction *) res
intoQualifier: (EOQualifier **) qualifier
- (id) lookupChild: (NSString *) childKey
{
MAPIRestrictionState rc;
id value;
value = NSObjectFromMAPISPropValue (&res->lpProp);
switch ((uint32_t) res->ulPropTag)
{
case PR_CHANGE_NUM:
[self warnWithFormat: @"!!!hack pending synchronisation enhancement"];
rc = MAPIRestrictionStateAlwaysTrue;
break;
default:
rc = [super evaluatePropertyRestriction: res intoQualifier: qualifier];
}
return rc;
return [(MAPIStoreFolder *) container lookupMessage: childKey];
}
@end

View File

@ -84,6 +84,7 @@ typedef enum {
- (id) childAtRowID: (uint32_t) rowId
forQueryType: (enum table_query_type) queryType;
- (id) lookupChild: (NSString *) childKey;
- (void) cleanupCaches;

View File

@ -803,7 +803,7 @@ static Class NSDataK, NSStringK;
if (queryType == MAPISTORE_PREFILTERED_QUERY
|| [restrictedChildren containsObject: childKey])
child = [container lookupChild: childKey];
child = [self lookupChild: childKey];
}
currentChild = child;
@ -818,6 +818,13 @@ static Class NSDataK, NSStringK;
return child;
}
- (id) lookupChild: (NSString *) childKey
{
[self subclassResponsibility: _cmd];
return nil;
}
- (int) getRow: (struct mapistore_property_data **) dataP
withRowID: (uint32_t) rowId
andQueryType: (enum table_query_type) queryType