Monotone-Parent: 0ee8784402fef54ab5a1a4812b44c00372e7da2f

Monotone-Revision: 341e6e2a2c5d1fda9e10359bcd2c9a3afa7b8766

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-12-30T19:39:57
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau 2010-12-30 19:39:57 +00:00
parent 2b3a13e5d8
commit 10fcfbfce6
2 changed files with 38 additions and 22 deletions

View file

@ -1,5 +1,15 @@
2010-12-30 Wolfgang Sourdeau <wsourdeau@inverse.ca> 2010-12-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/MAPIStoreMailMessageTable.m
(-getChildProperty:forKey:withTag:): return "NO" for
PR_REPLY_REQUESTED and PR_RESPONSE_REQUESTED. Commented out
responses for "PidLidHeaderItem" and "PidLidRemoteTransferSize".
Return "PR_ORIGINAL_DISPLAY_TO/CC/BCC_UNICODE" based on their
non-"ORIGINAL" counterpart and return an empty string when
missing.
Modified the return code of "PR_RTF_COMPRESSED" to
"MAPI_E_NOT_FOUND".
* OpenChange/MAPIStoreTypes.m (NSObjectFromSPropValue) * OpenChange/MAPIStoreTypes.m (NSObjectFromSPropValue)
(NSObjectFromMAPISPropValue): force booleans to be int to avoid (NSObjectFromMAPISPropValue): force booleans to be int to avoid
creating EOQualifier values where the strings "YES" or "NO" appear creating EOQualifier values where the strings "YES" or "NO" appear

View file

@ -107,16 +107,18 @@ static Class NSDataK, NSStringK;
break; break;
case PidLidRemoteAttachment: // TODO case PidLidRemoteAttachment: // TODO
case PR_HASATTACH: // TODO case PR_HASATTACH: // TODO
case PR_REPLY_REQUESTED: // TODO
case PR_RESPONSE_REQUESTED: // TODO
*data = MAPIBoolValue (memCtx, NO); *data = MAPIBoolValue (memCtx, NO);
break; break;
case PidLidHeaderItem: // case PidLidHeaderItem:
*data = MAPILongValue (memCtx, 0x00000000); // *data = MAPILongValue (memCtx, 0x00000001);
break; // break;
case PidLidRemoteTransferSize: // case PidLidRemoteTransferSize:
rc = [self getChildProperty: data // rc = [self getChildProperty: data
forKey: childKey // forKey: childKey
withTag: PR_MESSAGE_SIZE]; // withTag: PR_MESSAGE_SIZE];
break; // break;
case PR_CREATION_TIME: // DOUBT case PR_CREATION_TIME: // DOUBT
case PR_LAST_MODIFICATION_TIME: // DOUBT case PR_LAST_MODIFICATION_TIME: // DOUBT
case PR_LATEST_DELIVERY_TIME: // DOUBT case PR_LATEST_DELIVERY_TIME: // DOUBT
@ -163,18 +165,27 @@ static Class NSDataK, NSStringK;
case PR_RECEIVED_BY_NAME: case PR_RECEIVED_BY_NAME:
case PR_DISPLAY_TO: case PR_DISPLAY_TO:
case PR_DISPLAY_TO_UNICODE: case PR_DISPLAY_TO_UNICODE:
case PR_ORIGINAL_DISPLAY_TO_UNICODE:
child = [self lookupChild: childKey]; child = [self lookupChild: childKey];
*data = [[child to] asUnicodeInMemCtx: memCtx]; stringValue = [child to];
if (!stringValue)
stringValue = @"";
*data = [stringValue asUnicodeInMemCtx: memCtx];
break; break;
case PR_DISPLAY_CC: case PR_DISPLAY_CC:
case PR_DISPLAY_CC_UNICODE: case PR_DISPLAY_CC_UNICODE:
case PR_ORIGINAL_DISPLAY_CC_UNICODE:
child = [self lookupChild: childKey]; child = [self lookupChild: childKey];
*data = [[child cc] asUnicodeInMemCtx: memCtx]; stringValue = [child cc];
if (!stringValue)
stringValue = @"";
*data = [stringValue asUnicodeInMemCtx: memCtx];
break; break;
case PR_DISPLAY_BCC: case PR_DISPLAY_BCC:
case PR_DISPLAY_BCC_UNICODE: case PR_DISPLAY_BCC_UNICODE:
*data = NULL; case PR_ORIGINAL_DISPLAY_BCC_UNICODE:
rc = MAPI_E_NOT_FOUND; stringValue = @"";
*data = [stringValue asUnicodeInMemCtx: memCtx];
break; break;
case PidNameContentType: case PidNameContentType:
@ -211,7 +222,7 @@ static Class NSDataK, NSStringK;
{ {
id result; id result;
NSData *content; NSData *content;
NSString *key, *stringContent; NSString *key;
result = [child fetchParts: [keys objectsForKey: @"key" result = [child fetchParts: [keys objectsForKey: @"key"
notFoundMarker: nil]]; notFoundMarker: nil]];
@ -229,18 +240,13 @@ static Class NSDataK, NSStringK;
} }
else else
{ {
stringContent = [[NSString alloc] initWithData: content stringValue = [[NSString alloc] initWithData: content
encoding: NSISOLatin1StringEncoding]; encoding: NSISOLatin1StringEncoding];
*data = [stringValue asUnicodeInMemCtx: memCtx];
// *data = NULL;
// rc = MAPI_E_NOT_FOUND;
*data = [stringContent asUnicodeInMemCtx: memCtx];
} }
} }
else else
{ rc = MAPI_E_NOT_FOUND;
rc = MAPI_E_NOT_FOUND;
}
} }
} }
break; break;
@ -290,7 +296,7 @@ static Class NSDataK, NSStringK;
/* We don't handle any RTF content. */ /* We don't handle any RTF content. */
case PR_RTF_COMPRESSED: case PR_RTF_COMPRESSED:
rc = MAPI_E_NOT_ENOUGH_MEMORY; rc = MAPI_E_NOT_FOUND;
break; break;
case PR_RTF_IN_SYNC: case PR_RTF_IN_SYNC:
*data = MAPIBoolValue (memCtx, NO); *data = MAPIBoolValue (memCtx, NO);