mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-19 10:25:27 +00:00
reindentation
Monotone-Parent: 215f30784ae8904703b5fa172c7a563bf8f3b464 Monotone-Revision: 2f37714ba202d0c2f6bc3c888440ea82ee601d66 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-10-01T20:35:29 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -45,22 +45,22 @@ static Class SOGoUserFolderK;
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
SOGoUserFolderK = [SOGoUserFolderK class];
|
||||
SOGoUserFolderK = [SOGoUserFolder class];
|
||||
}
|
||||
|
||||
- (void) setupModuleFolder
|
||||
{
|
||||
id userFolder;
|
||||
id userFolder;
|
||||
|
||||
userFolder = [SOGoUserFolderK objectWithName: [authenticator username]
|
||||
inContainer: MAPIApp];
|
||||
[woContext setClientObject: userFolder];
|
||||
[userFolder retain]; // LEAK
|
||||
userFolder = [SOGoUserFolderK objectWithName: [authenticator username]
|
||||
inContainer: MAPIApp];
|
||||
[woContext setClientObject: userFolder];
|
||||
[userFolder retain]; // LEAK
|
||||
|
||||
moduleFolder = [userFolder lookupName: @"Contacts"
|
||||
inContext: woContext
|
||||
acquire: NO];
|
||||
[moduleFolder retain];
|
||||
moduleFolder = [userFolder lookupName: @"Contacts"
|
||||
inContext: woContext
|
||||
acquire: NO];
|
||||
[moduleFolder retain];
|
||||
}
|
||||
|
||||
// - (int) getCommonTableChildproperty: (void **) data
|
||||
@@ -120,7 +120,7 @@ static Class SOGoUserFolderK;
|
||||
}
|
||||
|
||||
if (!phone)
|
||||
phone = @"";
|
||||
phone = @"";
|
||||
|
||||
return phone;
|
||||
}
|
||||
@@ -131,166 +131,168 @@ static Class SOGoUserFolderK;
|
||||
inFolder: (SOGoFolder *) folder
|
||||
withFID: (uint64_t) fid
|
||||
{
|
||||
NSString *stringValue;
|
||||
uint32_t *longValue;
|
||||
id child;
|
||||
int rc;
|
||||
NSString *stringValue;
|
||||
uint32_t *longValue;
|
||||
id child;
|
||||
int rc;
|
||||
|
||||
rc = MAPI_E_SUCCESS;
|
||||
switch (proptag) {
|
||||
case PR_ICON_INDEX: // TODO
|
||||
longValue = talloc_zero(memCtx, uint32_t);
|
||||
*longValue = 0x00000200; /* see http://msdn.microsoft.com/en-us/library/cc815472.aspx */
|
||||
*data = longValue;
|
||||
break;
|
||||
case PR_MESSAGE_CLASS_UNICODE:
|
||||
*data = talloc_strdup(memCtx, "IPM.Contact");
|
||||
break;
|
||||
// case PR_VD_NAME_UNICODE:
|
||||
// *data = talloc_strdup(memCtx, "PR_VD_NAME_UNICODE");
|
||||
// break;
|
||||
// case PR_EMS_AB_DXA_REMOTE_CLIENT_UNICODE: "Home:" ???
|
||||
// *data = talloc_strdup(memCtx, "PR_EMS...");
|
||||
// break;
|
||||
case PR_SUBJECT_UNICODE:
|
||||
*data = talloc_strdup(memCtx, "PR_SUBJECT...");
|
||||
break;
|
||||
case PR_OAB_NAME_UNICODE:
|
||||
*data = talloc_strdup(memCtx, "PR_OAB_NAME_UNICODE");
|
||||
break;
|
||||
case PR_OAB_LANGID:
|
||||
longValue = talloc_zero(memCtx, uint32_t);
|
||||
*longValue = 1033; /* English US */
|
||||
*data = longValue;
|
||||
break;
|
||||
rc = MAPI_E_SUCCESS;
|
||||
switch (proptag)
|
||||
{
|
||||
case PR_ICON_INDEX: // TODO
|
||||
longValue = talloc_zero(memCtx, uint32_t);
|
||||
*longValue = 0x00000200; /* see http://msdn.microsoft.com/en-us/library/cc815472.aspx */
|
||||
*data = longValue;
|
||||
break;
|
||||
case PR_MESSAGE_CLASS_UNICODE:
|
||||
*data = talloc_strdup(memCtx, "IPM.Contact");
|
||||
break;
|
||||
// case PR_VD_NAME_UNICODE:
|
||||
// *data = talloc_strdup(memCtx, "PR_VD_NAME_UNICODE");
|
||||
// break;
|
||||
// case PR_EMS_AB_DXA_REMOTE_CLIENT_UNICODE: "Home:" ???
|
||||
// *data = talloc_strdup(memCtx, "PR_EMS...");
|
||||
// break;
|
||||
case PR_SUBJECT_UNICODE:
|
||||
*data = talloc_strdup(memCtx, "PR_SUBJECT...");
|
||||
break;
|
||||
case PR_OAB_NAME_UNICODE:
|
||||
*data = talloc_strdup(memCtx, "PR_OAB_NAME_UNICODE");
|
||||
break;
|
||||
case PR_OAB_LANGID:
|
||||
longValue = talloc_zero(memCtx, uint32_t);
|
||||
*longValue = 1033; /* English US */
|
||||
*data = longValue;
|
||||
break;
|
||||
|
||||
case PR_TITLE_UNICODE:
|
||||
child = [self lookupObject: childURL];
|
||||
stringValue = [[child vCard] title];
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
break;
|
||||
case PR_TITLE_UNICODE:
|
||||
child = [self lookupObject: childURL];
|
||||
stringValue = [[child vCard] title];
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
break;
|
||||
|
||||
case PR_COMPANY_NAME_UNICODE:
|
||||
child = [self lookupObject: childURL];
|
||||
/* that's buggy but it's for the demo */
|
||||
stringValue = [[[child vCard] org] componentsJoinedByString: @", "];
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
break;
|
||||
case PR_COMPANY_NAME_UNICODE:
|
||||
child = [self lookupObject: childURL];
|
||||
/* that's buggy but it's for the demo */
|
||||
stringValue = [[[child vCard] org] componentsJoinedByString: @", "];
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
break;
|
||||
|
||||
case 0x3001001f: // Full Name
|
||||
case 0x81c2001f: // contact block title name
|
||||
rc = [super getMessageTableChildproperty: data
|
||||
atURL: childURL
|
||||
withTag: PR_DISPLAY_NAME_UNICODE
|
||||
inFolder: folder
|
||||
withFID: fid];
|
||||
break;
|
||||
case 0x81b0001f: // E-mail
|
||||
child = [self lookupObject: childURL];
|
||||
stringValue = [[child vCard] preferredEMail];
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
break;
|
||||
case PR_BODY_UNICODE:
|
||||
child = [self lookupObject: childURL];
|
||||
stringValue = [[child vCard] note];
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
break;
|
||||
case 0x3001001f: // Full Name
|
||||
case 0x81c2001f: // contact block title name
|
||||
rc = [super getMessageTableChildproperty: data
|
||||
atURL: childURL
|
||||
withTag: PR_DISPLAY_NAME_UNICODE
|
||||
inFolder: folder
|
||||
withFID: fid];
|
||||
break;
|
||||
case 0x81b0001f: // E-mail
|
||||
child = [self lookupObject: childURL];
|
||||
stringValue = [[child vCard] preferredEMail];
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
break;
|
||||
case PR_BODY_UNICODE:
|
||||
child = [self lookupObject: childURL];
|
||||
stringValue = [[child vCard] note];
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
break;
|
||||
|
||||
case PR_OFFICE_TELEPHONE_NUMBER_UNICODE:
|
||||
child = [self lookupObject: childURL];
|
||||
stringValue = [self _phoneOfType: @"work"
|
||||
excluding: @"fax"
|
||||
inCard: [child vCard]];
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
break;
|
||||
case PR_HOME_TELEPHONE_NUMBER_UNICODE:
|
||||
child = [self lookupObject: childURL];
|
||||
stringValue = [self _phoneOfType: @"home"
|
||||
excluding: @"fax"
|
||||
inCard: [child vCard]];
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
break;
|
||||
case PR_MOBILE_TELEPHONE_NUMBER_UNICODE:
|
||||
child = [self lookupObject: childURL];
|
||||
stringValue = [self _phoneOfType: @"cell"
|
||||
excluding: nil
|
||||
inCard: [child vCard]];
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
break;
|
||||
case PR_PRIMARY_TELEPHONE_NUMBER_UNICODE:
|
||||
child = [self lookupObject: childURL];
|
||||
stringValue = [self _phoneOfType: @"pref"
|
||||
excluding: nil
|
||||
inCard: [child vCard]];
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
break;
|
||||
case PR_OFFICE_TELEPHONE_NUMBER_UNICODE:
|
||||
child = [self lookupObject: childURL];
|
||||
stringValue = [self _phoneOfType: @"work"
|
||||
excluding: @"fax"
|
||||
inCard: [child vCard]];
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
break;
|
||||
case PR_HOME_TELEPHONE_NUMBER_UNICODE:
|
||||
child = [self lookupObject: childURL];
|
||||
stringValue = [self _phoneOfType: @"home"
|
||||
excluding: @"fax"
|
||||
inCard: [child vCard]];
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
break;
|
||||
case PR_MOBILE_TELEPHONE_NUMBER_UNICODE:
|
||||
child = [self lookupObject: childURL];
|
||||
stringValue = [self _phoneOfType: @"cell"
|
||||
excluding: nil
|
||||
inCard: [child vCard]];
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
break;
|
||||
case PR_PRIMARY_TELEPHONE_NUMBER_UNICODE:
|
||||
child = [self lookupObject: childURL];
|
||||
stringValue = [self _phoneOfType: @"pref"
|
||||
excluding: nil
|
||||
inCard: [child vCard]];
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
break;
|
||||
|
||||
// case PR_POSTAL_ADDRESS_UNICODE:
|
||||
// case PR_INTERNET_MESSAGE_ID_UNICODE:
|
||||
// case PR_CAR_TELEPHONE_NUMBER_UNICODE:
|
||||
// case PR_OTHER_TELEPHONE_NUMBER_UNICODE:
|
||||
// case PR_BUSINESS_FAX_NUMBER_UNICODE:
|
||||
// case PR_HOME_FAX_NUMBER_UNICODE:
|
||||
// case PR_COMPANY_MAIN_PHONE_NUMBER_UNICODE:
|
||||
// case PR_EMS_AB_GROUP_BY_ATTR_4_UNICODE:
|
||||
// case PR_CALLBACK_TELEPHONE_NUMBER_UNICODE:
|
||||
// case PR_DEPARTMENT_NAME_UNICODE:
|
||||
// case PR_OFFICE2_TELEPHONE_NUMBER_UNICODE:
|
||||
// case PR_RADIO_TELEPHONE_NUMBER_UNICODE:
|
||||
// case PR_PAGER_TELEPHONE_NUMBER_UNICODE:
|
||||
// case PR_PRIMARY_FAX_NUMBER_UNICODE:
|
||||
// case PR_TELEX_NUMBER_UNICODE:
|
||||
// case PR_ISDN_NUMBER_UNICODE:
|
||||
// case PR_ASSISTANT_TELEPHONE_NUMBER_UNICODE:
|
||||
// case PR_HOME2_TELEPHONE_NUMBER_UNICODE:
|
||||
// case PR_TTYTDD_PHONE_NUMBER_UNICODE:
|
||||
// case PR_BUSINESS_HOME_PAGE_UNICODE:
|
||||
// *data = talloc_strdup(memCtx, "[Generic and fake unicode value]");
|
||||
// break;
|
||||
// case PR_POSTAL_ADDRESS_UNICODE:
|
||||
// case PR_INTERNET_MESSAGE_ID_UNICODE:
|
||||
// case PR_CAR_TELEPHONE_NUMBER_UNICODE:
|
||||
// case PR_OTHER_TELEPHONE_NUMBER_UNICODE:
|
||||
// case PR_BUSINESS_FAX_NUMBER_UNICODE:
|
||||
// case PR_HOME_FAX_NUMBER_UNICODE:
|
||||
// case PR_COMPANY_MAIN_PHONE_NUMBER_UNICODE:
|
||||
// case PR_EMS_AB_GROUP_BY_ATTR_4_UNICODE:
|
||||
// case PR_CALLBACK_TELEPHONE_NUMBER_UNICODE:
|
||||
// case PR_DEPARTMENT_NAME_UNICODE:
|
||||
// case PR_OFFICE2_TELEPHONE_NUMBER_UNICODE:
|
||||
// case PR_RADIO_TELEPHONE_NUMBER_UNICODE:
|
||||
// case PR_PAGER_TELEPHONE_NUMBER_UNICODE:
|
||||
// case PR_PRIMARY_FAX_NUMBER_UNICODE:
|
||||
// case PR_TELEX_NUMBER_UNICODE:
|
||||
// case PR_ISDN_NUMBER_UNICODE:
|
||||
// case PR_ASSISTANT_TELEPHONE_NUMBER_UNICODE:
|
||||
// case PR_HOME2_TELEPHONE_NUMBER_UNICODE:
|
||||
// case PR_TTYTDD_PHONE_NUMBER_UNICODE:
|
||||
// case PR_BUSINESS_HOME_PAGE_UNICODE:
|
||||
// *data = talloc_strdup(memCtx, "[Generic and fake unicode value]");
|
||||
// break;
|
||||
|
||||
// (18:54:45) Wolfgang-: 0x80a7001f ( Business: ) -> don't ask me which "business"
|
||||
// (18:55:05) Wolfgang-: 0x809c001f ( Other: )
|
||||
// (18:55:58) Wolfgang-: 0x81b5001f: E-mail 2
|
||||
// (18:54:45) Wolfgang-: 0x80a7001f ( Business: ) -> don't ask me which "business"
|
||||
// (18:55:05) Wolfgang-: 0x809c001f ( Other: )
|
||||
// (18:55:58) Wolfgang-: 0x81b5001f: E-mail 2
|
||||
|
||||
|
||||
// #define PR_REPLY_TIME PROP_TAG(PT_SYSTIME , 0x0030) /* 0x00300040 */
|
||||
// #define PR_SENSITIVITY PROP_TAG(PT_LONG , 0x0036) /* 0x00360003 */
|
||||
// #define PR_FOLLOWUP_ICON PROP_TAG(PT_LONG , 0x1095) /* 0x10950003 */
|
||||
// #define PR_SEARCH_KEY PROP_TAG(PT_BINARY , 0x300b) /* 0x300b0102 */
|
||||
// #define PR_VIEW_STYLE PROP_TAG(PT_LONG , 0x6834) /* 0x68340003 */
|
||||
// #define PR_VD_VERSION PROP_TAG(PT_LONG , 0x7007) /* 0x70070003 */
|
||||
// #define PR_REPLY_TIME PROP_TAG(PT_SYSTIME , 0x0030) /* 0x00300040 */
|
||||
// #define PR_SENSITIVITY PROP_TAG(PT_LONG , 0x0036) /* 0x00360003 */
|
||||
// #define PR_FOLLOWUP_ICON PROP_TAG(PT_LONG , 0x1095) /* 0x10950003 */
|
||||
// #define PR_SEARCH_KEY PROP_TAG(PT_BINARY , 0x300b) /* 0x300b0102 */
|
||||
// #define PR_VIEW_STYLE PROP_TAG(PT_LONG , 0x6834) /* 0x68340003 */
|
||||
// #define PR_VD_VERSION PROP_TAG(PT_LONG , 0x7007) /* 0x70070003 */
|
||||
|
||||
default:
|
||||
rc = [super getMessageTableChildproperty: data
|
||||
atURL: childURL
|
||||
withTag: proptag
|
||||
inFolder: folder
|
||||
withFID: fid];
|
||||
}
|
||||
default:
|
||||
rc = [super getMessageTableChildproperty: data
|
||||
atURL: childURL
|
||||
withTag: proptag
|
||||
inFolder: folder
|
||||
withFID: fid];
|
||||
}
|
||||
|
||||
return rc;
|
||||
return rc;
|
||||
}
|
||||
|
||||
- (int) getFolderTableChildproperty: (void **) data
|
||||
atURL: (NSString *) childURL
|
||||
withTag: (uint32_t) proptag
|
||||
inFolder: (SOGoFolder *) folder
|
||||
withFID: (uint64_t) fid
|
||||
{
|
||||
int rc;
|
||||
// - (int) getFolderTableChildproperty: (void **) data
|
||||
// atURL: (NSString *) childURL
|
||||
// withTag: (uint32_t) proptag
|
||||
// inFolder: (SOGoFolder *) folder
|
||||
// withFID: (uint64_t) fid
|
||||
// {
|
||||
// int rc;
|
||||
|
||||
[self logWithFormat: @"XXXXX unexpected!!!!!!!!!"];
|
||||
rc = MAPI_E_SUCCESS;
|
||||
switch (proptag) {
|
||||
default:
|
||||
rc = [super getFolderTableChildproperty: data
|
||||
atURL: childURL
|
||||
withTag: proptag
|
||||
inFolder: folder
|
||||
withFID: fid];
|
||||
}
|
||||
// [self logWithFormat: @"XXXXX unexpected!!!!!!!!!"];
|
||||
// rc = MAPI_E_SUCCESS;
|
||||
// switch (proptag)
|
||||
// {
|
||||
// default:
|
||||
// rc = [super getFolderTableChildproperty: data
|
||||
// atURL: childURL
|
||||
// withTag: proptag
|
||||
// inFolder: folder
|
||||
// withFID: fid];
|
||||
// }
|
||||
|
||||
return rc;
|
||||
}
|
||||
// return rc;
|
||||
// }
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user