See ChangeLog

Monotone-Parent: aca091adf5e547dd91cb88d06d42c6cfd3fbe7e2
Monotone-Revision: 90fa2838afb37a071037bbb22e7b90cd8d61b44b

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2011-09-19T23:33:48
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Ludovic Marcotte 2011-09-19 23:33:48 +00:00
parent 8b02e53951
commit 731a6bd1d5
3 changed files with 57 additions and 6 deletions

View File

@ -3,6 +3,9 @@
* OpenChange/MAPIStoreDraftsMessage.m: (_commitProperties)
We now correctly handle the "importance" property
* Added handling of PR_IMPORTANCE and PidLidBusyStatus
for event objects
2011-09-14 Ludovic Marcotte <lmarcotte@inverse.ca>
* SoObjects/Mailer/SOGoMailBaseObject.m: (imap4Connection):

View File

@ -332,10 +332,17 @@ static NSCharacterSet *hexCharacterSet = nil;
return MAPISTORE_SUCCESS;
}
- (int) getPidLidBusyStatus: (void **) data // TODO
- (int) getPidLidBusyStatus: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx
{
*data = MAPILongValue (memCtx, 0x02);
uint8_t value;
value = 0x2; // olBusy
if (![event isOpaque])
value = 0x0; // olFree
*data = MAPILongValue (memCtx, value);
return MAPISTORE_SUCCESS;
}

View File

@ -330,7 +330,7 @@
iCalDateTime *start, *end;
iCalTimeZone *tz;
NSCalendarDate *now;
NSString *content, *tzName;
NSString *content, *tzName, *priority;
iCalEvent *newEvent;
iCalPerson *userPerson;
NSUInteger responseStatus = 0;
@ -432,10 +432,10 @@
[start setDateTime: value];
}
// end
value = [newProperties objectForKey: MAPIPropertyKey (PR_END_DATE)];
/* end */
value = [newProperties objectForKey: MAPIPropertyKey(PR_END_DATE)];
if (!value)
value = [newProperties objectForKey: MAPIPropertyKey (PidLidAppointmentEndWhole)];
value = [newProperties objectForKey: MAPIPropertyKey(PidLidAppointmentEndWhole)];
if (value)
{
end = (iCalDateTime *) [newEvent uniqueChildWithTag: @"dtend"];
@ -443,6 +443,47 @@
[end setDateTime: value];
}
/* priority */
value = [newProperties objectForKey: MAPIPropertyKey(PR_IMPORTANCE)];
if (value)
{
switch ([value intValue])
{
case 0: // IMPORTANCE_LOW
priority = @"9";
break;
case 2: // IMPORTANCE_HIGH
priority = @"1";
break;
default: // IMPORTANCE_NORMAL
priority = @"5";
}
}
else
priority = @"0"; // None
[newEvent setPriority: priority];
/* show time as free/busy/tentative/out of office. Possible values are:
0x00000000 - olFree
0x00000001 - olTentative
0x00000002 - olBusy
0x00000003 - olOutOfOffice */
value = [newProperties objectForKey: MAPIPropertyKey(PidLidBusyStatus)];
if (value)
{
switch ([value intValue])
{
case 0:
[newEvent setTransparency: @"TRANSPARENT"];
break;
case 1:
case 2:
case 3:
default:
[newEvent setTransparency: @"OPAQUE"];
}
}
/* recurrence */
value = [newProperties
objectForKey: MAPIPropertyKey (PidLidAppointmentRecur)];