From 7d9b3a97b32f03c8b763d540bb3bc8dc150f2a36 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 17 Dec 2010 19:39:21 +0000 Subject: [PATCH] Monotone-Parent: 81dcdd47102e86aa7051a10cbd7a7183b374d07a Monotone-Revision: dcee22693d3a16ba20dcd9824bd2cfd39c0cf369 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-12-17T19:39:21 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 + OpenChange/MAPIStoreCalendarContext.m | 15 ++ OpenChange/MAPIStoreContactsContext.m | 6 + OpenChange/MAPIStoreContext.m | 87 ++++++------ OpenChange/MAPIStoreFileSystemBaseContext.m | 45 +++--- OpenChange/MAPIStoreMailContext.m | 143 +++++++++++--------- OpenChange/MAPIStoreOutboxContext.m | 23 ++++ OpenChange/MAPIStoreSOGo.m | 2 +- OpenChange/MAPIStoreTasksContext.m | 30 +++- OpenChange/SOGoDraftObject+MAPIStore.m | 3 + OpenChange/SOGoMAPIFSFolder.m | 2 +- 11 files changed, 243 insertions(+), 119 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9fa481ca3..6aa8d0357 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-12-17 Wolfgang Sourdeau + + * OpenChange/MAPIStore*Context.m: added handling of a few more + filters and a few more properties, in particular "named + properties". + 2010-12-14 Wolfgang Sourdeau * OpenChange/MAPIStoreContext.m diff --git a/OpenChange/MAPIStoreCalendarContext.m b/OpenChange/MAPIStoreCalendarContext.m index cb03b3616..4f52f9761 100644 --- a/OpenChange/MAPIStoreCalendarContext.m +++ b/OpenChange/MAPIStoreCalendarContext.m @@ -241,6 +241,9 @@ else rc = MAPIRestrictionStateAlwaysFalse; break; + case 0x81930003: /* PidLidBusyStatus (named prop) */ + rc = MAPIRestrictionStateAlwaysTrue; // should be based on c_isopaque + break; default: rc = [super evaluatePropertyRestriction: res intoQualifier: qualifier]; } @@ -255,6 +258,18 @@ if (!knownProperties) { knownProperties = [NSMutableDictionary new]; + // [knownProperties setObject: @"c_startdate" + // forKey: MAPIPropertyKey (PidLidAppointmentStartWhole)]; + [knownProperties setObject: @"c_startdate" + forKey: MAPIPropertyKey (0x818f0040)]; + // [knownProperties setObject: @"c_enddate" + // forKey: MAPIPropertyKey (PidLidAppointmentEndWhole)]; + [knownProperties setObject: @"c_enddate" + forKey: MAPIPropertyKey (0x818a0040)]; + // [knownProperties setObject: @"c_iscycle" + // forKey: MAPIPropertyKey (PidLidRecurring)]; + [knownProperties setObject: @"c_iscycle" + forKey: MAPIPropertyKey (0x81e70040)]; } return [knownProperties objectForKey: MAPIPropertyKey (property)]; diff --git a/OpenChange/MAPIStoreContactsContext.m b/OpenChange/MAPIStoreContactsContext.m index 3e6fa1522..b61b35189 100644 --- a/OpenChange/MAPIStoreContactsContext.m +++ b/OpenChange/MAPIStoreContactsContext.m @@ -262,6 +262,12 @@ *data = [stringValue asUnicodeInMemCtx: memCtx]; break; + // case 0x81ad001f: /* PidLidEmail1AddressType */ + // case 0x81b2001f: /* PidLidEmail2AddressType */ + // case 0x81b7001f: /* PidLidEmail3AddressType */ + // *data = [@"SMTP" asUnicodeInMemCtx: memCtx]; + // break; + // case PR_POSTAL_ADDRESS_UNICODE: // case PR_INTERNET_MESSAGE_ID_UNICODE: // case PR_CAR_TELEPHONE_NUMBER_UNICODE: diff --git a/OpenChange/MAPIStoreContext.m b/OpenChange/MAPIStoreContext.m index b39257920..4f10f7da6 100644 --- a/OpenChange/MAPIStoreContext.m +++ b/OpenChange/MAPIStoreContext.m @@ -210,7 +210,7 @@ MAPIStringForPropertyRestriction (struct mapi_SPropertyRestriction *resProperty) if (!propName) propName = ""; - if (resProperty->relop > 0 && resProperty->relop < 6) + if (resProperty->relop >= 0 && resProperty->relop < 7) operator = operators[resProperty->relop]; else operator = [NSString stringWithFormat: @"", resProperty->relop]; @@ -775,27 +775,28 @@ _prepareContextClass (struct mapistore_context *newMemCtx, - (NSArray *) _subfolderKeysForFolderURL: (NSString *) folderURL { - NSArray *keys; - SOGoFolder *folder; + // NSArray *keys; + // SOGoFolder *folder; - keys = [subfolderCache objectForKey: folderURL]; - if (!keys) - { - folder = [self lookupObject: folderURL]; - if (folder) - { - keys = [folder toManyRelationshipKeys]; - if (!keys) - keys = [NSArray array]; - } - else - keys = [NSArray array]; - [subfolderCache setObject: keys forKey: folderURL]; - } + return [NSArray array]; + // keys = [subfolderCache objectForKey: folderURL]; + // if (!keys) + // { + // folder = [self lookupObject: folderURL]; + // if (folder) + // { + // keys = [folder toManyRelationshipKeys]; + // if (!keys) + // keys = [NSArray array]; + // } + // else + // keys = [NSArray array]; + // [subfolderCache setObject: keys forKey: folderURL]; + // } - [self logWithFormat: @"folder keys for '%@': %@", folderURL, keys]; + // [self logWithFormat: @"folder keys for '%@': %@", folderURL, keys]; - return keys; + // return keys; } /** @@ -1278,6 +1279,7 @@ _prepareContextClass (struct mapistore_context *newMemCtx, } - (void) _raiseUnhandledPropertyException: (enum MAPITAGS) property + inFunction: (const char *) function { const char *propName; @@ -1285,8 +1287,9 @@ _prepareContextClass (struct mapistore_context *newMemCtx, if (!propName) propName = ""; [NSException raise: @"MAPIStoreUnhandledPropertyException" - format: @"property %s (%.8x) has no matching field name (%@)", - propName, property, self]; + format: @"property %s (%.8x) has no matching field name (%@)" + @" in '%s'", + propName, property, self, function]; } - (MAPIRestrictionState) evaluateContentRestriction: (struct mapi_SContentRestriction *) res @@ -1298,7 +1301,8 @@ _prepareContextClass (struct mapistore_context *newMemCtx, property = [self backendIdentifierForProperty: res->ulPropTag]; if (!property) - [self _raiseUnhandledPropertyException: res->ulPropTag]; + [self _raiseUnhandledPropertyException: res->ulPropTag + inFunction: __FUNCTION__]; value = NSObjectFromMAPISPropValue (&res->lpProp); if ([value isKindOfClass: NSDataK]) @@ -1357,15 +1361,16 @@ _prepareContextClass (struct mapistore_context *newMemCtx, property = [self backendIdentifierForProperty: res->ulPropTag]; if (!property) - [self _raiseUnhandledPropertyException: res->ulPropTag]; + [self _raiseUnhandledPropertyException: res->ulPropTag + inFunction: __FUNCTION__]; - if (res->relop > 0 && res->relop < 6) + if (res->relop >= 0 && res->relop < 7) operator = operators[res->relop]; else { operator = NULL; [NSException raise: @"MAPIStoreRestrictionException" - format: @"unhandled operator type"]; + format: @"unhandled operator type number %d", res->relop]; } value = NSObjectFromMAPISPropValue (&res->lpProp); @@ -1384,7 +1389,8 @@ _prepareContextClass (struct mapistore_context *newMemCtx, property = [self backendIdentifierForProperty: res->ulPropTag]; if (!property) - [self _raiseUnhandledPropertyException: res->ulPropTag]; + [self _raiseUnhandledPropertyException: res->ulPropTag + inFunction: __FUNCTION__]; *qualifier = [[EOBitmaskQualifier alloc] initWithKey: property mask: res->ulMask @@ -1401,7 +1407,8 @@ _prepareContextClass (struct mapistore_context *newMemCtx, property = [self backendIdentifierForProperty: res->ulPropTag]; if (!property) - [self _raiseUnhandledPropertyException: res->ulPropTag]; + [self _raiseUnhandledPropertyException: res->ulPropTag + inFunction: __FUNCTION__]; *qualifier = [[EOKeyValueQualifier alloc] initWithKey: property operatorSelector: EOQualifierOperatorNotEqual @@ -1459,9 +1466,9 @@ _prepareContextClass (struct mapistore_context *newMemCtx, propName = get_proptag_name (proptag); if (!propName) propName = ""; - [self logWithFormat: @"METHOD '%s' (%d) -- proptag: %s (0x%.8x), pos: %.8x," - @" tableType: %d, queryType: %d, fid: %.16x", - __FUNCTION__, __LINE__, propName, proptag, pos, tableType, queryType, fid]; + // [self logWithFormat: @"METHOD '%s' (%d) -- proptag: %s (0x%.8x), pos: %.8x," + // @" tableType: %d, queryType: %d, fid: %.16x", + // __FUNCTION__, __LINE__, propName, proptag, pos, tableType, queryType, fid]; // [self logWithFormat: @"context restriction state is: %@", // MAPIStringForRestrictionState (restrictionState)]; @@ -1506,7 +1513,7 @@ _prepareContextClass (struct mapistore_context *newMemCtx, if (tableType == MAPISTORE_FOLDER_TABLE) { - [self logWithFormat: @" querying child folder at URL: %@", childURL]; + // [self logWithFormat: @" querying child folder at URL: %@", childURL]; rc = [self getFolderTableChildproperty: data atURL: childURL withTag: proptag @@ -1529,9 +1536,9 @@ _prepareContextClass (struct mapistore_context *newMemCtx, } else { - [self logWithFormat: - @"child '%@' does not match active restriction", - childURL]; + // [self logWithFormat: + // @"child '%@' does not match active restriction", + // childURL]; rc = MAPI_E_INVALID_OBJECT; } } @@ -1545,10 +1552,10 @@ _prepareContextClass (struct mapistore_context *newMemCtx, } else { - [self errorWithFormat: - @"Invalid row position %d for table type %d" - @" in FID: %lld", - pos, tableType, fid]; + // [self errorWithFormat: + // @"Invalid row position %d for table type %d" + // @" in FID: %lld", + // pos, tableType, fid]; rc = MAPI_E_INVALID_OBJECT; } } @@ -2036,6 +2043,10 @@ _prepareContextClass (struct mapistore_context *newMemCtx, // } // else case MAPISTORE_FOLDER: + [self errorWithFormat: @"%s: folder properties not handled yet", + __FUNCTION__]; + rc = MAPI_E_NOT_FOUND; + break; default: [self errorWithFormat: @"%s: value of tableType not handled: %d", __FUNCTION__, tableType]; diff --git a/OpenChange/MAPIStoreFileSystemBaseContext.m b/OpenChange/MAPIStoreFileSystemBaseContext.m index fcbc89433..f3a083465 100644 --- a/OpenChange/MAPIStoreFileSystemBaseContext.m +++ b/OpenChange/MAPIStoreFileSystemBaseContext.m @@ -190,6 +190,11 @@ } *data = MAPILongLongValue (memCtx, mappingId); } + else if (proptag == PR_SUBJECT_UNICODE) + { + rc = MAPI_E_SUCCESS; + *data = [@"No subject" asUnicodeInMemCtx: memCtx]; + } else rc = [super getMessageTableChildproperty: data atURL: childURL @@ -207,25 +212,10 @@ return rc; } -- (MAPIRestrictionState) evaluateBitmaskRestriction: (struct mapi_SBitmaskRestriction *) res - intoQualifier: (EOQualifier **) qualifier -{ - [self errorWithFormat: @"%s: UNIMPLEMENTED METHOD, returning true", - __PRETTY_FUNCTION__]; - // ^PR_VIEW_STYLE(0x68340003) & 0x00000001 - - return MAPIRestrictionStateAlwaysTrue; -} - - (int) openMessage: (struct mapistore_message *) msg atURL: (NSString *) childURL { - static enum MAPITAGS tags[] = { PR_SUBJECT_UNICODE, PR_HASATTACH, - PR_MESSAGE_DELIVERY_TIME, PR_MESSAGE_FLAGS, - PR_FLAG_STATUS, PR_SENSITIVITY, - PR_SENT_REPRESENTING_NAME_UNICODE, - PR_INTERNET_MESSAGE_ID_UNICODE, - PR_READ_RECEIPT_REQUESTED }; + static enum MAPITAGS tags[] = { PR_SUBJECT_UNICODE }; id child; struct SRowSet *recipients; struct SRow *properties; @@ -243,7 +233,7 @@ recipients->aRow = NULL; msg->recipients = recipients; - max = 9; + max = 1; properties = talloc_zero (memCtx, struct SRow); properties->cValues = 0; @@ -275,4 +265,25 @@ return rc; } +- (enum MAPISTATUS) getTableProperty: (void **) data + withTag: (enum MAPITAGS) proptag + atPosition: (uint32_t) pos + withTableType: (uint8_t) tableType + andQueryType: (enum table_query_type) queryType + inFID: (uint64_t) fid +{ + enum MAPISTATUS rc; + + rc = [super getTableProperty: data + withTag: proptag + atPosition: pos + withTableType: tableType + andQueryType: queryType + inFID: fid]; + if (rc) + NSLog (@"returning code for prop"); + + return rc; +} + @end diff --git a/OpenChange/MAPIStoreMailContext.m b/OpenChange/MAPIStoreMailContext.m index 9841648be..2e4078c64 100644 --- a/OpenChange/MAPIStoreMailContext.m +++ b/OpenChange/MAPIStoreMailContext.m @@ -103,11 +103,8 @@ static Class NSDataK, NSStringK; NSArray *keys; if (qualifier) - { - [self errorWithFormat: @"we need to support qualifiers: %@", - qualifier]; - keys = nil; - } + keys = [(SOGoMailFolder *) folder fetchUIDsMatchingQualifier: qualifier + sortOrdering: @"ARRIVAL"]; else keys = [(SOGoMailFolder *) folder toOneRelationshipKeys]; @@ -345,66 +342,66 @@ static Class NSDataK, NSStringK; *data = MAPIBoolValue (memCtx, NO); break; - /* BOOL */ - case PR_ALTERNATE_RECIPIENT_ALLOWED: - case PR_AUTO_FORWARDED: - case PR_DL_EXPANSION_PROHIBITED: - case PR_RESPONSE_REQUESTED: - case PR_REPLY_REQUESTED: - case PR_DELETE_AFTER_SUBMIT: - case PR_PROCESSED: - case PR_ORIGINATOR_DELIVERY_REPORT_REQUESTED: - case PR_RECIPIENT_REASSIGNMENT_PROHIBITED: - rc = MAPI_E_NOT_FOUND; - break; + // /* BOOL */ + // case PR_ALTERNATE_RECIPIENT_ALLOWED: + // case PR_AUTO_FORWARDED: + // case PR_DL_EXPANSION_PROHIBITED: + // case PR_RESPONSE_REQUESTED: + // case PR_REPLY_REQUESTED: + // case PR_DELETE_AFTER_SUBMIT: + // case PR_PROCESSED: + // case PR_ORIGINATOR_DELIVERY_REPORT_REQUESTED: + // case PR_RECIPIENT_REASSIGNMENT_PROHIBITED: + // rc = MAPI_E_NOT_FOUND; + // break; - /* PT_SYSTIME */ - case PR_START_DATE: - case PR_END_DATE: - case PR_ACTION_DATE: - case PR_FLAG_COMPLETE: - case PR_DEFERRED_DELIVERY_TIME: - case PR_REPORT_TIME: - case PR_CLIENT_SUBMIT_TIME: - case PR_DEFERRED_SEND_TIME: - case PR_ORIGINAL_SUBMIT_TIME: - rc = MAPI_E_NOT_FOUND; - break; + // /* PT_SYSTIME */ + // case PR_START_DATE: + // case PR_END_DATE: + // case PR_ACTION_DATE: + // case PR_FLAG_COMPLETE: + // case PR_DEFERRED_DELIVERY_TIME: + // case PR_REPORT_TIME: + // case PR_CLIENT_SUBMIT_TIME: + // case PR_DEFERRED_SEND_TIME: + // case PR_ORIGINAL_SUBMIT_TIME: + // rc = MAPI_E_NOT_FOUND; + // break; - /* PT_BINARY */ - case PR_CONVERSATION_KEY: - case PR_ORIGINALLY_INTENDED_RECIPIENT_NAME: - case PR_PARENT_KEY: - case PR_REPORT_TAG: - case PR_SENT_REPRESENTING_SEARCH_KEY: - case PR_RECEIVED_BY_ENTRYID: - case PR_SENT_REPRESENTING_ENTRYID: - case PR_RCVD_REPRESENTING_ENTRYID: - case PR_ORIGINAL_AUTHOR_ENTRYID: - case PR_REPLY_RECIPIENT_ENTRIES: - case PR_RECEIVED_BY_SEARCH_KEY: - case PR_RCVD_REPRESENTING_SEARCH_KEY: - case PR_SEARCH_KEY: - case PR_CHANGE_KEY: - case PR_ORIGINAL_AUTHOR_SEARCH_KEY: - case PR_CONVERSATION_INDEX: - case PR_SENDER_ENTRYID: - case PR_SENDER_SEARCH_KEY: - rc = MAPI_E_NOT_FOUND; - break; + // /* PT_BINARY */ + // case PR_CONVERSATION_KEY: + // case PR_ORIGINALLY_INTENDED_RECIPIENT_NAME: + // case PR_PARENT_KEY: + // case PR_REPORT_TAG: + // case PR_SENT_REPRESENTING_SEARCH_KEY: + // case PR_RECEIVED_BY_ENTRYID: + // case PR_SENT_REPRESENTING_ENTRYID: + // case PR_RCVD_REPRESENTING_ENTRYID: + // case PR_ORIGINAL_AUTHOR_ENTRYID: + // case PR_REPLY_RECIPIENT_ENTRIES: + // case PR_RECEIVED_BY_SEARCH_KEY: + // case PR_RCVD_REPRESENTING_SEARCH_KEY: + // case PR_SEARCH_KEY: + // case PR_CHANGE_KEY: + // case PR_ORIGINAL_AUTHOR_SEARCH_KEY: + // case PR_CONVERSATION_INDEX: + // case PR_SENDER_ENTRYID: + // case PR_SENDER_SEARCH_KEY: + // rc = MAPI_E_NOT_FOUND; + // break; - /* PT_SVREID*/ - case PR_SENT_MAILSVR_EID: - rc = MAPI_E_NOT_FOUND; - break; + // /* PT_SVREID*/ + // case PR_SENT_MAILSVR_EID: + // rc = MAPI_E_NOT_FOUND; + // break; - /* PR_LONG */ - case PR_OWNER_APPT_ID: - case PR_ACTION_FLAG: - case PR_INTERNET_CPID: - case PR_INET_MAIL_OVERRIDE_FORMAT: - rc = MAPI_E_NOT_FOUND; - break; + // /* PR_LONG */ + // case PR_OWNER_APPT_ID: + // case PR_ACTION_FLAG: + // case PR_INTERNET_CPID: + // case PR_INET_MAIL_OVERRIDE_FORMAT: + // rc = MAPI_E_NOT_FOUND; + // break; case PR_MSG_EDITOR_FORMAT: { @@ -590,6 +587,24 @@ static Class NSDataK, NSStringK; else rc = MAPIRestrictionStateAlwaysFalse; break; + + case 0x0ff600fb: + /* resProperty: struct mapi_SPropertyRestriction + relop : 0x04 (4) + ulPropTag : UNKNOWN_ENUM_VALUE (0xFF600FB) + lpProp: struct mapi_SPropValue + ulPropTag : UNKNOWN_ENUM_VALUE (0xFF600FB) + value : union mapi_SPropValue_CTR(case 251) + bin : SBinary_short cb=21 +[0000] 01 01 00 1A 00 00 00 00 00 9C 83 E8 0F 00 00 00 ........ ........ +[0010] 00 00 00 00 00 ..... */ + rc = MAPIRestrictionStateAlwaysFalse; + break; + + case PR_CONVERSATION_KEY: + rc = MAPIRestrictionStateAlwaysFalse; + break; + default: rc = [super evaluatePropertyRestriction: res intoQualifier: qualifier]; } @@ -623,6 +638,9 @@ static Class NSDataK, NSStringK; else rc = MAPIRestrictionStateAlwaysFalse; break; + case PR_CONVERSATION_KEY: + rc = MAPIRestrictionStateAlwaysFalse; + break; default: rc = [super evaluateContentRestriction: res intoQualifier: qualifier]; } @@ -643,6 +661,9 @@ static Class NSDataK, NSStringK; case PR_MESSAGE_DELIVERY_TIME: rc = MAPIRestrictionStateAlwaysTrue; break; + case PR_PROCESSED: + rc = MAPIRestrictionStateAlwaysFalse; + break; default: rc = [super evaluateExistRestriction: res intoQualifier: qualifier]; } diff --git a/OpenChange/MAPIStoreOutboxContext.m b/OpenChange/MAPIStoreOutboxContext.m index 1506402da..3ca57132d 100644 --- a/OpenChange/MAPIStoreOutboxContext.m +++ b/OpenChange/MAPIStoreOutboxContext.m @@ -35,6 +35,8 @@ #import "MAPIStoreMapping.h" #import "MAPIStoreTypes.h" +#import "NSData+MAPIStore.h" + #import "MAPIStoreOutboxContext.h" @implementation MAPIStoreOutboxContext @@ -89,4 +91,25 @@ return [moduleFolder newDraft]; } +- (enum MAPISTATUS) getMessageTableChildproperty: (void **) data + atURL: (NSString *) childURL + withTag: (enum MAPITAGS) proptag + inFolder: (SOGoFolder *) folder + withFID: (uint64_t) fid +{ + enum MAPISTATUS rc; + + if (proptag == PR_CHANGE_KEY) + { + *data = [[@"openchangedraft" dataUsingEncoding: NSASCIIStringEncoding] + asShortBinaryInMemCtx: memCtx]; + rc = MAPI_E_SUCCESS; + } + else + rc = [super getMessageTableChildproperty: data atURL: childURL withTag: + proptag inFolder: folder withFID: fid]; + + return rc; +} + @end diff --git a/OpenChange/MAPIStoreSOGo.m b/OpenChange/MAPIStoreSOGo.m index 5e5fa14e0..49fa78ef9 100644 --- a/OpenChange/MAPIStoreSOGo.m +++ b/OpenChange/MAPIStoreSOGo.m @@ -431,7 +431,7 @@ sogo_op_get_table_property(void *private_data, MAPIStoreContext *context; int rc; - DEBUG (5, ("[SOGo: %s:%d]\n", __FUNCTION__, __LINE__)); + // DEBUG (5, ("[SOGo: %s:%d]\n", __FUNCTION__, __LINE__)); pool = [NSAutoreleasePool new]; diff --git a/OpenChange/MAPIStoreTasksContext.m b/OpenChange/MAPIStoreTasksContext.m index 73e6ecd6f..fb52ac8cd 100644 --- a/OpenChange/MAPIStoreTasksContext.m +++ b/OpenChange/MAPIStoreTasksContext.m @@ -234,7 +234,10 @@ case PR_RULE_PROVIDER_UNICODE: // TODO: what's this? rc = MAPIRestrictionStateAlwaysTrue; break; - case 0x81200003: // seems to be PR_CE_CHECK_INTERVAL + case 0x81200003: // PidLidTaskStatus + rc = MAPIRestrictionStateAlwaysTrue; + break; + case 0x81250040: // PidLidTaskDateCompleted rc = MAPIRestrictionStateAlwaysTrue; break; @@ -245,4 +248,29 @@ return rc; } +- (MAPIRestrictionState) evaluateExistRestriction: (struct mapi_SExistRestriction *) res + intoQualifier: (EOQualifier **) qualifier +{ + MAPIRestrictionState rc; + + switch (res->ulPropTag) + { + case 0x81250040: // PidLidTaskDateCompleted + /* since we don't store the completion date in the quick table, we only + checks whether the task has been completed */ + *qualifier = [[EOKeyValueQualifier alloc] + initWithKey: @"c_status" + operatorSelector: EOQualifierOperatorEqual + value: [NSNumber numberWithInt: 1]]; + [*qualifier autorelease]; + rc = MAPIRestrictionStateNeedsEval; + break; + + default: + rc = [super evaluateExistRestriction: res intoQualifier: qualifier]; + } + + return rc; +} + @end diff --git a/OpenChange/SOGoDraftObject+MAPIStore.m b/OpenChange/SOGoDraftObject+MAPIStore.m index 1b8db5dc9..e541149c1 100644 --- a/OpenChange/SOGoDraftObject+MAPIStore.m +++ b/OpenChange/SOGoDraftObject+MAPIStore.m @@ -75,6 +75,9 @@ e) 2010-11-24 13:45:38.715 samba[25685] 0x0e62000b (PR_URL_COMP_NAME_SET): 0 (NSIntNumber) */ + value = [properties + objectForKey: MAPIPropertyKey (PR_NORMALIZED_SUBJECT_UNICODE)]; + if (!value) value = [properties objectForKey: MAPIPropertyKey (PR_SUBJECT_UNICODE)]; if (value) [newHeaders setObject: value forKey: @"subject"]; diff --git a/OpenChange/SOGoMAPIFSFolder.m b/OpenChange/SOGoMAPIFSFolder.m index 29156553a..783205a3b 100644 --- a/OpenChange/SOGoMAPIFSFolder.m +++ b/OpenChange/SOGoMAPIFSFolder.m @@ -93,7 +93,7 @@ static NSString *privateDir = nil; path = [url path]; if (![path hasSuffix: @"/"]) path = [NSString stringWithFormat: @"%@/", path]; - directory = [NSString stringWithFormat: @"%@/SOGo/%@/%@%@", + directory = [NSString stringWithFormat: @"%@/mapistore/SOGo/%@/%@%@", privateDir, [url user], [url host], path]; [self logWithFormat: @"directory: %@", directory]; [directory retain];