merge of '5b8c9a975efb96fc96a08343f310f9663d602405'
and '9c93be42dce13d70eb5f0bc31e7ff8fff3aa82c3' Monotone-Parent: 5b8c9a975efb96fc96a08343f310f9663d602405 Monotone-Parent: 9c93be42dce13d70eb5f0bc31e7ff8fff3aa82c3 Monotone-Revision: e17ff3ca502603ccbe42d56d57ebb7296305b48c Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-02-09T23:13:27 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
commit
01809f8f83
22
ChangeLog
22
ChangeLog
|
@ -1,3 +1,25 @@
|
||||||
|
2011-02-09 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreMessageTable.m
|
||||||
|
(-getChildProperty:forKey:withTag:): removed PR_MESSAGE_CODEPAGE
|
||||||
|
and PR_INTERNET_CPID.
|
||||||
|
|
||||||
|
* OpenChange/MAPIStoreMailMessageTable.m
|
||||||
|
(-getChildProperty:forKey:withTag:): removed non-unicode string
|
||||||
|
proptags. Added support for case
|
||||||
|
PR_RCVD_REPRESENTING_ADDRTYPE_UNICODE,
|
||||||
|
PR_RECEIVED_BY_ADDRTYPE_UNICODE, PR_SENDER_ADDRTYPE_UNICODE,
|
||||||
|
PR_ORIGINAL_AUTHOR_NAME_UNICODE, PR_SENDER_NAME_UNICODE,
|
||||||
|
PR_SENDER_EMAIL_ADDRESS_UNICODE,
|
||||||
|
PR_RECEIVED_BY_EMAIL_ADDRESS_UNICODE and
|
||||||
|
PR_RCVD_REPRESENTING_EMAIL_ADDRESS_UNICODE.
|
||||||
|
Removed code returning MAPI_E_NOT_ENOUGH_MEMORY when content
|
||||||
|
values where larger than 3999 bytes.
|
||||||
|
(_sortIdentifierForProperty:): enabled sorting on
|
||||||
|
PR_CLIENT_SUBMIT_TIME.
|
||||||
|
Added support for PR_INTERNET_CPID, currently returning "utf-8"
|
||||||
|
only (65001).
|
||||||
|
|
||||||
2011-02-07 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2011-02-07 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
* OpenChange/MAPIStoreNotesMessageTable.m
|
* OpenChange/MAPIStoreNotesMessageTable.m
|
||||||
|
|
|
@ -118,7 +118,7 @@ static EOQualifier *nonDeletedQualifier = nil;
|
||||||
withTag: (enum MAPITAGS) propTag
|
withTag: (enum MAPITAGS) propTag
|
||||||
{
|
{
|
||||||
SOGoMailObject *child;
|
SOGoMailObject *child;
|
||||||
NSString *childURL, *subject, *stringValue;
|
NSString *subject, *stringValue;
|
||||||
NSInteger colIdx;
|
NSInteger colIdx;
|
||||||
enum MAPISTATUS rc;
|
enum MAPISTATUS rc;
|
||||||
|
|
||||||
|
@ -145,7 +145,6 @@ static EOQualifier *nonDeletedQualifier = nil;
|
||||||
[subject substringToIndex: colIdx]];
|
[subject substringToIndex: colIdx]];
|
||||||
else
|
else
|
||||||
stringValue = @"";
|
stringValue = @"";
|
||||||
[self logWithFormat: @"subject prefix: %@", stringValue];
|
|
||||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
break;
|
break;
|
||||||
case PR_NORMALIZED_SUBJECT_UNICODE:
|
case PR_NORMALIZED_SUBJECT_UNICODE:
|
||||||
|
@ -159,7 +158,6 @@ static EOQualifier *nonDeletedQualifier = nil;
|
||||||
stringValue = subject;
|
stringValue = subject;
|
||||||
if (!stringValue)
|
if (!stringValue)
|
||||||
stringValue = @"";
|
stringValue = @"";
|
||||||
[self logWithFormat: @"normalized subject: %@", stringValue];
|
|
||||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -261,20 +259,25 @@ static EOQualifier *nonDeletedQualifier = nil;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PR_SENT_REPRESENTING_ADDRTYPE_UNICODE:
|
case PR_SENT_REPRESENTING_ADDRTYPE_UNICODE:
|
||||||
|
case PR_RCVD_REPRESENTING_ADDRTYPE_UNICODE:
|
||||||
|
case PR_RECEIVED_BY_ADDRTYPE_UNICODE:
|
||||||
|
case PR_SENDER_ADDRTYPE_UNICODE:
|
||||||
*data = [@"SMTP" asUnicodeInMemCtx: memCtx];
|
*data = [@"SMTP" asUnicodeInMemCtx: memCtx];
|
||||||
break;
|
break;
|
||||||
|
case PR_ORIGINAL_AUTHOR_NAME_UNICODE:
|
||||||
|
case PR_SENDER_NAME_UNICODE:
|
||||||
|
case PR_SENDER_EMAIL_ADDRESS_UNICODE:
|
||||||
case PR_SENT_REPRESENTING_EMAIL_ADDRESS_UNICODE:
|
case PR_SENT_REPRESENTING_EMAIL_ADDRESS_UNICODE:
|
||||||
case PR_SENT_REPRESENTING_NAME_UNICODE:
|
case PR_SENT_REPRESENTING_NAME_UNICODE:
|
||||||
child = [self lookupChild: childKey];
|
child = [self lookupChild: childKey];
|
||||||
*data = [[child from] asUnicodeInMemCtx: memCtx];
|
*data = [[child from] asUnicodeInMemCtx: memCtx];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* TODO: the following are supposed to be display names, separated by a semicolumn */
|
/* TODO: some of the following are supposed to be display names, separated by a semicolumn */
|
||||||
case PR_RECEIVED_BY_NAME:
|
|
||||||
case PR_RECEIVED_BY_NAME_UNICODE:
|
case PR_RECEIVED_BY_NAME_UNICODE:
|
||||||
case PR_RCVD_REPRESENTING_NAME:
|
case PR_RECEIVED_BY_EMAIL_ADDRESS_UNICODE:
|
||||||
case PR_RCVD_REPRESENTING_NAME_UNICODE:
|
case PR_RCVD_REPRESENTING_NAME_UNICODE:
|
||||||
case PR_DISPLAY_TO:
|
case PR_RCVD_REPRESENTING_EMAIL_ADDRESS_UNICODE:
|
||||||
case PR_DISPLAY_TO_UNICODE:
|
case PR_DISPLAY_TO_UNICODE:
|
||||||
case PR_ORIGINAL_DISPLAY_TO_UNICODE:
|
case PR_ORIGINAL_DISPLAY_TO_UNICODE:
|
||||||
child = [self lookupChild: childKey];
|
child = [self lookupChild: childKey];
|
||||||
|
@ -283,7 +286,6 @@ static EOQualifier *nonDeletedQualifier = nil;
|
||||||
stringValue = @"";
|
stringValue = @"";
|
||||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
break;
|
break;
|
||||||
case PR_DISPLAY_CC:
|
|
||||||
case PR_DISPLAY_CC_UNICODE:
|
case PR_DISPLAY_CC_UNICODE:
|
||||||
case PR_ORIGINAL_DISPLAY_CC_UNICODE:
|
case PR_ORIGINAL_DISPLAY_CC_UNICODE:
|
||||||
child = [self lookupChild: childKey];
|
child = [self lookupChild: childKey];
|
||||||
|
@ -292,7 +294,6 @@ static EOQualifier *nonDeletedQualifier = nil;
|
||||||
stringValue = @"";
|
stringValue = @"";
|
||||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
break;
|
break;
|
||||||
case PR_DISPLAY_BCC:
|
|
||||||
case PR_DISPLAY_BCC_UNICODE:
|
case PR_DISPLAY_BCC_UNICODE:
|
||||||
case PR_ORIGINAL_DISPLAY_BCC_UNICODE:
|
case PR_ORIGINAL_DISPLAY_BCC_UNICODE:
|
||||||
stringValue = @"";
|
stringValue = @"";
|
||||||
|
@ -327,7 +328,6 @@ static EOQualifier *nonDeletedQualifier = nil;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PR_BODY:
|
|
||||||
case PR_BODY_UNICODE:
|
case PR_BODY_UNICODE:
|
||||||
{
|
{
|
||||||
NSMutableArray *keys;
|
NSMutableArray *keys;
|
||||||
|
@ -364,21 +364,9 @@ static EOQualifier *nonDeletedQualifier = nil;
|
||||||
result = [[result valueForKey: @"RawResponse"] objectForKey: @"fetch"];
|
result = [[result valueForKey: @"RawResponse"] objectForKey: @"fetch"];
|
||||||
key = [[keys objectAtIndex: 0] objectForKey: @"key"];
|
key = [[keys objectAtIndex: 0] objectForKey: @"key"];
|
||||||
content = [[result objectForKey: key] objectForKey: @"data"];
|
content = [[result objectForKey: key] objectForKey: @"data"];
|
||||||
if ([content length] > 3999)
|
stringValue = [[NSString alloc] initWithData: content
|
||||||
{
|
encoding: NSISOLatin1StringEncoding];
|
||||||
childURL = [NSString stringWithFormat: @"%@%@", folderURL, childKey];
|
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||||
[context registerValue: content
|
|
||||||
asProperty: propTag
|
|
||||||
forURL: childURL];
|
|
||||||
*data = NULL;
|
|
||||||
rc = MAPI_E_NOT_ENOUGH_MEMORY;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
stringValue = [[NSString alloc] initWithData: content
|
|
||||||
encoding: NSISOLatin1StringEncoding];
|
|
||||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
rc = MAPI_E_NOT_FOUND;
|
rc = MAPI_E_NOT_FOUND;
|
||||||
|
@ -386,6 +374,18 @@ static EOQualifier *nonDeletedQualifier = nil;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case PR_INTERNET_CPID:
|
||||||
|
/* ref:
|
||||||
|
http://msdn.microsoft.com/en-us/library/dd317756%28v=vs.85%29.aspx
|
||||||
|
|
||||||
|
minimal list that should be handled:
|
||||||
|
us-ascii: 20127
|
||||||
|
iso-8859-1: 28591
|
||||||
|
iso-8859-15: 28605
|
||||||
|
utf-8: 65001 */
|
||||||
|
*data = MAPILongValue(memCtx, 65001);
|
||||||
|
break;
|
||||||
|
|
||||||
case PR_HTML:
|
case PR_HTML:
|
||||||
{
|
{
|
||||||
NSMutableArray *keys;
|
NSMutableArray *keys;
|
||||||
|
@ -409,17 +409,7 @@ static EOQualifier *nonDeletedQualifier = nil;
|
||||||
@"fetch"];
|
@"fetch"];
|
||||||
key = [[keys objectAtIndex: 0] objectForKey: @"key"];
|
key = [[keys objectAtIndex: 0] objectForKey: @"key"];
|
||||||
content = [[result objectForKey: key] objectForKey: @"data"];
|
content = [[result objectForKey: key] objectForKey: @"data"];
|
||||||
if ([content length] > 3999)
|
*data = [content asBinaryInMemCtx: memCtx];
|
||||||
{
|
|
||||||
childURL = [NSString stringWithFormat: @"%@%@", folderURL, childKey];
|
|
||||||
[context registerValue: content
|
|
||||||
asProperty: propTag
|
|
||||||
forURL: childURL];
|
|
||||||
*data = NULL;
|
|
||||||
rc = MAPI_E_NOT_ENOUGH_MEMORY;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
*data = [content asBinaryInMemCtx: memCtx];
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -436,7 +426,6 @@ static EOQualifier *nonDeletedQualifier = nil;
|
||||||
case PR_RTF_IN_SYNC:
|
case PR_RTF_IN_SYNC:
|
||||||
*data = MAPIBoolValue (memCtx, NO);
|
*data = MAPIBoolValue (memCtx, NO);
|
||||||
break;
|
break;
|
||||||
case PR_INTERNET_MESSAGE_ID:
|
|
||||||
case PR_INTERNET_MESSAGE_ID_UNICODE:
|
case PR_INTERNET_MESSAGE_ID_UNICODE:
|
||||||
child = [self lookupChild: childKey];
|
child = [self lookupChild: childKey];
|
||||||
*data = [[child messageId] asUnicodeInMemCtx: memCtx];
|
*data = [[child messageId] asUnicodeInMemCtx: memCtx];
|
||||||
|
@ -686,6 +675,8 @@ static EOQualifier *nonDeletedQualifier = nil;
|
||||||
{
|
{
|
||||||
knownProperties = [NSMutableDictionary new];
|
knownProperties = [NSMutableDictionary new];
|
||||||
/* ARRIVAL, CC */
|
/* ARRIVAL, CC */
|
||||||
|
[knownProperties setObject: @"DATE"
|
||||||
|
forKey: MAPIPropertyKey (PR_CLIENT_SUBMIT_TIME)];
|
||||||
[knownProperties setObject: @"DATE"
|
[knownProperties setObject: @"DATE"
|
||||||
forKey: MAPIPropertyKey (PR_MESSAGE_DELIVERY_TIME)];
|
forKey: MAPIPropertyKey (PR_MESSAGE_DELIVERY_TIME)];
|
||||||
[knownProperties setObject: @"FROM"
|
[knownProperties setObject: @"FROM"
|
||||||
|
|
|
@ -138,10 +138,6 @@ static MAPIStoreMapping *mapping;
|
||||||
}
|
}
|
||||||
*data = MAPILongLongValue (memCtx, mappingId);
|
*data = MAPILongLongValue (memCtx, mappingId);
|
||||||
break;
|
break;
|
||||||
case PR_MESSAGE_CODEPAGE:
|
|
||||||
case PR_INTERNET_CPID:
|
|
||||||
*data = MAPILongValue (memCtx, 1200);
|
|
||||||
break;
|
|
||||||
case PR_MESSAGE_LOCALE_ID:
|
case PR_MESSAGE_LOCALE_ID:
|
||||||
*data = MAPILongValue (memCtx, 0x0409);
|
*data = MAPILongValue (memCtx, 0x0409);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue