Monotone-Parent: 06d05f5f33259193fb9c9cc279dd8c556f540318
Monotone-Revision: 4cdc350cb65e4152be392021a72b70b27c397537 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-02-10T17:54:35 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
196cef42ab
commit
316cb593b5
|
@ -1,5 +1,14 @@
|
|||
2011-02-10 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreContactsMessageTable.m
|
||||
(-getChildProperty:forKey:withTag:): added support for the
|
||||
following props: PR_SEND_INTERNET_ENCODING, PidLidFileUnderId,
|
||||
PidLidEmail1DisplayName, PidLidEmail1EmailAddress,
|
||||
PidLidEmail2EmailAddress, PR_ACCOUNT_UNICODE,
|
||||
PR_CONTACT_EMAIL_ADDRESSES_UNICODE,
|
||||
PR_EMS_AB_TARGET_ADDRESS_UNICODE, PR_SEARCH_KEY,
|
||||
PR_MAIL_PERMISSION
|
||||
|
||||
* OpenChange/MAPIStoreMessageTable.m
|
||||
(-getChildProperty:forKey:withTag:): returns a default value for
|
||||
PR_ORIG_MESSAGE_CLASS_UNICODE based of PR_MESSAGE_CLASS_UNICODE.
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
#import "MAPIStoreTypes.h"
|
||||
#import "NSCalendarDate+MAPIStore.h"
|
||||
#import "NSArray+MAPIStore.h"
|
||||
#import "NSData+MAPIStore.h"
|
||||
#import "NSString+MAPIStore.h"
|
||||
|
||||
#import "MAPIStoreContactsMessageTable.h"
|
||||
|
@ -84,10 +86,11 @@
|
|||
forKey: (NSString *) childKey
|
||||
withTag: (enum MAPITAGS) proptag
|
||||
{
|
||||
NSString *stringValue;
|
||||
NSString *stringValue, *stringValue2;
|
||||
SOGoContactGCSEntry *child;
|
||||
CardElement *element;
|
||||
uint32_t longValue;
|
||||
NGVCard *vCard;
|
||||
enum MAPISTATUS rc;
|
||||
|
||||
rc = MAPI_E_SUCCESS;
|
||||
|
@ -141,6 +144,10 @@
|
|||
}
|
||||
break;
|
||||
|
||||
case PR_SEND_INTERNET_ENCODING:
|
||||
*data = MAPILongValue (memCtx, 0x00065001);
|
||||
break;
|
||||
|
||||
case PR_SUBJECT_UNICODE:
|
||||
case PR_DISPLAY_NAME_UNICODE: // Full Name
|
||||
case PidLidFileUnder: // contact block title name
|
||||
|
@ -148,18 +155,60 @@
|
|||
forKey: childKey
|
||||
withTag: PR_DISPLAY_NAME_UNICODE];
|
||||
break;
|
||||
case PidLidEmail1OriginalDisplayName: // E-mail
|
||||
case PidLidFileUnderId:
|
||||
*data = MAPILongValue (memCtx, 0xffffffff);
|
||||
break;
|
||||
|
||||
case PidLidEmail1OriginalDisplayName:
|
||||
case PidLidEmail1DisplayName:
|
||||
child = [self lookupChild: childKey];
|
||||
vCard = [child vCard];
|
||||
stringValue = [vCard fn];
|
||||
stringValue2 = [vCard preferredEMail];
|
||||
*data = [[NSString stringWithFormat: @"%@ <%@>",
|
||||
stringValue, stringValue2]
|
||||
asUnicodeInMemCtx: memCtx];
|
||||
break;
|
||||
|
||||
case PidLidEmail1EmailAddress:
|
||||
case PR_ACCOUNT_UNICODE:
|
||||
child = [self lookupChild: childKey];
|
||||
stringValue = [[child vCard] preferredEMail];
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
break;
|
||||
|
||||
case PR_CONTACT_EMAIL_ADDRESSES_UNICODE:
|
||||
child = [self lookupChild: childKey];
|
||||
stringValue = [[child vCard] preferredEMail];
|
||||
*data = [[NSArray arrayWithObject: stringValue]
|
||||
asArrayOfUnicodeStringsInCtx: memCtx];
|
||||
break;
|
||||
|
||||
case PR_EMS_AB_TARGET_ADDRESS_UNICODE:
|
||||
child = [self lookupChild: childKey];
|
||||
stringValue = [[child vCard] preferredEMail];
|
||||
*data = [[NSString stringWithFormat: @"SMTP:%@", stringValue]
|
||||
asUnicodeInMemCtx: memCtx];
|
||||
break;
|
||||
|
||||
case PR_SEARCH_KEY: // TODO
|
||||
child = [self lookupChild: childKey];
|
||||
stringValue = [[child vCard] preferredEMail];
|
||||
*data = [[stringValue dataUsingEncoding: NSASCIIStringEncoding]
|
||||
asBinaryInMemCtx: memCtx];
|
||||
break;
|
||||
|
||||
case PR_MAIL_PERMISSION:
|
||||
*data = MAPIBoolValue (memCtx, YES);
|
||||
break;
|
||||
|
||||
//
|
||||
// TODO - same logic as -secondaryEmail in UI/Contacts/UIxContactView.m
|
||||
// We should eventually merge that in order to not duplicate the code.
|
||||
// We should also eventually handle PidLidEmail3OriginalDisplayName in
|
||||
// SOGo, Thunderbird, etc.
|
||||
//
|
||||
case PidLidEmail2EmailAddress:
|
||||
case PidLidEmail2OriginalDisplayName: // Other email
|
||||
{
|
||||
NSMutableArray *emails;
|
||||
|
|
Loading…
Reference in New Issue