From 3099c59692ad38047f113d02116e89a73e923ac2 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 30 Dec 2010 14:53:11 +0000 Subject: [PATCH] Monotone-Parent: 09b0d503bdecee3c305021b5aa23a3b7372aefb0 Monotone-Revision: 7023cb55bf9c1104e85e96a623772bbc7ded0d5b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-12-30T14:53:11 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 8 ++++++++ OpenChange/SOGoAppointmentObject+MAPIStore.m | 8 +++++++- OpenChange/SOGoTaskObject+MAPIStore.m | 9 +++++---- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index e03713bf6..62ea57cdd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2010-12-30 Wolfgang Sourdeau + * OpenChange/SOGoTaskObject+MAPIStore.m + (-setMAPIProperties:): same as below. + + * OpenChange/SOGoAppointmentObject+MAPIStore.m + (-setMAPIProperties:): make use of proper named properties macro + symbols rather than their values, now that they are handled better + in the openchange core. + * OpenChange/SOGoMAPIFSFolder.m (-initWithURL:andTableType:): accepts a new "tableType" parameter to store messages in a different place of the fs folder hierarchy. diff --git a/OpenChange/SOGoAppointmentObject+MAPIStore.m b/OpenChange/SOGoAppointmentObject+MAPIStore.m index 772e08ce8..dd79ed10b 100644 --- a/OpenChange/SOGoAppointmentObject+MAPIStore.m +++ b/OpenChange/SOGoAppointmentObject+MAPIStore.m @@ -22,6 +22,7 @@ #include #include +#include #import #import @@ -41,6 +42,7 @@ #import "SOGoAppointmentObject+MAPIStore.h" + @implementation SOGoAppointmentObject (MAPIStoreMessage) /* TODO: merge with tasks */ @@ -102,7 +104,7 @@ [vEvent setSummary: value]; // Location - value = [properties objectForKey: MAPIPropertyKey (0x810c001f)]; + value = [properties objectForKey: MAPIPropertyKey (PidLidLocation)]; if (value) [vEvent setLocation: value]; @@ -112,6 +114,8 @@ // start value = [properties objectForKey: MAPIPropertyKey (PR_START_DATE)]; + if (!value) + value = [properties objectForKey: MAPIPropertyKey (PidLidAppointmentStartWhole)]; if (value) { start = (iCalDateTime *) [vEvent uniqueChildWithTag: @"dtstart"]; @@ -121,6 +125,8 @@ // end value = [properties objectForKey: MAPIPropertyKey (PR_END_DATE)]; + if (!value) + value = [properties objectForKey: MAPIPropertyKey (PidLidAppointmentEndWhole)]; if (value) { end = (iCalDateTime *) [vEvent uniqueChildWithTag: @"dtend"]; diff --git a/OpenChange/SOGoTaskObject+MAPIStore.m b/OpenChange/SOGoTaskObject+MAPIStore.m index fd49aaf4a..60cd35ca3 100644 --- a/OpenChange/SOGoTaskObject+MAPIStore.m +++ b/OpenChange/SOGoTaskObject+MAPIStore.m @@ -22,6 +22,7 @@ #include #include +#include #import #import @@ -126,7 +127,7 @@ [vToDo setComment: value]; // Location - value = [properties objectForKey: MAPIPropertyKey (0x810c001f)]; + value = [properties objectForKey: MAPIPropertyKey (PidLidLocation)]; if (value) [vToDo setLocation: value]; @@ -148,7 +149,7 @@ [vCalendar addTimeZone: tz]; // start - value = [properties objectForKey: MAPIPropertyKey (0x811e0040)]; + value = [properties objectForKey: MAPIPropertyKey (PidLidTaskStartDate)]; if (value) { date = (iCalDateTime *) [vToDo uniqueChildWithTag: @"dtstart"]; @@ -157,7 +158,7 @@ } // due - value = [properties objectForKey: MAPIPropertyKey (0x811f0040)]; + value = [properties objectForKey: MAPIPropertyKey (PidLidTaskDueDate)]; if (value) { date = (iCalDateTime *) [vToDo uniqueChildWithTag: @"due"]; @@ -166,7 +167,7 @@ } // status - value = [properties objectForKey: MAPIPropertyKey (0x81200003)]; + value = [properties objectForKey: MAPIPropertyKey (PidLidTaskStatus)]; if (value) { switch ([value intValue])