From a853c8bd9d31d327339a75175d445c11662bf599 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 5 Oct 2010 13:54:53 +0000 Subject: [PATCH] Monotone-Parent: ab1120c810d59aad408b2dbb513497f6d67badc3 Monotone-Revision: 45d8fb39f680e94fe0299bcf69c3299afcb25b4e Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-10-05T13:54:53 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 11 ++++++ OpenChange/MAPIStoreTasksContext.m | 59 +++++++++++++++++++++++++++++- 2 files changed, 68 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9fe041d04..25b59ec7a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2010-10-05 Wolfgang Sourdeau + + * OpenChange/MAPIStoreTasksContext.m + (-getMessageTableChildproperty:atURL:withTag:inFolder:withFID:) + implemented the following properties: PR_SUBJECT_UNICODE, + PR_NORMALIZED_SUBJECT_UNICODE, PR_CONVERSATION_TOPIC_UNICODE, + 0x8124000b, 0x81250040, PR_CREATION_TIME, + PR_MESSAGE_DELIVERY_TIME, PR_CLIENT_SUBMIT_TIME, + PR_LOCAL_COMMIT_TIME, PR_LAST_MODIFICATION_TIME, 0x81200003 as + well as stubs for 0x68340003, 0x683a0003, 0x68410003. + 2010-10-01 Wolfgang Sourdeau * OpenChange/MAPIStoreTasksContext.[hm]: new mapi context class diff --git a/OpenChange/MAPIStoreTasksContext.m b/OpenChange/MAPIStoreTasksContext.m index 72d7d2600..cf08d45c9 100644 --- a/OpenChange/MAPIStoreTasksContext.m +++ b/OpenChange/MAPIStoreTasksContext.m @@ -72,9 +72,10 @@ static Class SOGoUserFolderK; withFID: (uint64_t) fid { uint32_t *longValue; - // uint8_t *boolValue; + uint8_t *boolValue; + NSString *status; // id child; - // id task; + id task; int rc; rc = MAPI_E_SUCCESS; @@ -94,6 +95,60 @@ static Class SOGoUserFolderK; case PR_MESSAGE_CLASS_UNICODE: *data = talloc_strdup(memCtx, "IPM.Task"); break; + case PR_SUBJECT_UNICODE: // SUMMARY + case PR_NORMALIZED_SUBJECT_UNICODE: + case PR_CONVERSATION_TOPIC_UNICODE: + task = [[self lookupObject: childURL] component: NO secure: NO]; + *data = [[task summary] asUnicodeInMemCtx: memCtx]; + break; + case 0x8124000b: // completed + boolValue = talloc_zero(memCtx, uint8_t); + task = [[self lookupObject: childURL] component: NO secure: NO]; + *boolValue = [[task status] isEqualToString: @"COMPLETED"]; + *data = boolValue; + break; + case 0x81250040: // completion date + task = [[self lookupObject: childURL] component: NO secure: NO]; + *data = [[task completed] asFileTimeInMemCtx: memCtx]; + break; + case PR_CREATION_TIME: + task = [[self lookupObject: childURL] component: NO secure: NO]; + *data = [[task created] asFileTimeInMemCtx: memCtx]; + break; + case PR_MESSAGE_DELIVERY_TIME: + case PR_CLIENT_SUBMIT_TIME: + case PR_LOCAL_COMMIT_TIME: + case PR_LAST_MODIFICATION_TIME: + task = [[self lookupObject: childURL] component: NO secure: NO]; + *data = [[task lastModified] asFileTimeInMemCtx: memCtx]; + break; + case 0x81200003: // status + longValue = talloc_zero(memCtx, uint32_t); + task = [[self lookupObject: childURL] component: NO secure: NO]; + status = [task status]; + if (![status length] + || [status isEqualToString: @"NEEDS-ACTIONS"]) + *longValue = 0; + else if ([status isEqualToString: @"IN-PROCESS"]) + *longValue = 1; + else if ([status isEqualToString: @"COMPLETED"]) + *longValue = 2; + *data = longValue; + break; + /* Completed */ + // - 0x81380003 = -2000 + // + 0x81380003 = -4000 + + // 68330048 + // 68420102 + case 0x68340003: + case 0x683a0003: + case 0x68410003: + longValue = talloc_zero(memCtx, uint32_t); + *longValue = 0; + *data = longValue; + break; + default: rc = [super getMessageTableChildproperty: data atURL: childURL