diff --git a/ChangeLog b/ChangeLog index 59ee2278f..e54040f76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-09-12 Ludovic Marcotte + + * OpenChange/MAPIStoreTasksMessage.m: added a way to get + the PidTagBody of a task. This could be generalized eventually + with the code in MAPIStoreAppointmentWrapper. + 2012-09-07 Francis Lachapelle * UI/WebServerResources/SchedulerUI.js (tasksListCallback): list diff --git a/OpenChange/MAPIStoreTasksMessage.m b/OpenChange/MAPIStoreTasksMessage.m index 93d73cfd6..1487e6382 100644 --- a/OpenChange/MAPIStoreTasksMessage.m +++ b/OpenChange/MAPIStoreTasksMessage.m @@ -102,6 +102,24 @@ return MAPISTORE_SUCCESS; } +- (int) getPidTagBody: (void **) data + inMemCtx: (TALLOC_CTX *) memCtx +{ + int rc = MAPISTORE_SUCCESS; + NSString *stringValue; + iCalToDo *task; + + /* FIXME: there is a confusion in NGCards around "comment" and "description" */ + task = [sogoObject component: NO secure: YES]; + stringValue = [task comment]; + if ([stringValue length] > 0) + *data = [stringValue asUnicodeInMemCtx: memCtx]; + else + *data = [@"" asUnicodeInMemCtx: memCtx]; + + return rc; +} + - (int) getPidTagImportance: (void **) data inMemCtx: (TALLOC_CTX *) memCtx {