oc-calendar: Implement PidTagSensitivity

As described in [MS-OXCICAL] Section 2.1.3.11.20.4 by using
access CLASS iCal field.

Although Outlook does not support confidential level, it is properly
exported and imported.
This commit is contained in:
Enrique J. Hernández Blasco
2015-02-15 18:44:47 +01:00
parent e6ba15bbae
commit 624967c60b
4 changed files with 61 additions and 5 deletions
+25 -1
View File
@@ -140,7 +140,7 @@
iCalDateTime *start, *end;
iCalTimeZone *tz;
NSTimeZone *userTimeZone;
NSString *priority;
NSString *priority, *class = nil;
NSUInteger responseStatus = 0;
NSInteger tzOffset;
SOGoUser *ownerUser;
@@ -281,6 +281,30 @@
priority = @"0"; // None
[self setPriority: priority];
/* class */
/* See [MS-OXCICAL] Section 2.1.3.11.20.4 */
value = [properties objectForKey: MAPIPropertyKey(PR_SENSITIVITY)];
if (value)
{
switch ([value intValue])
{
case 1:
class = @"X-PERSONAL";
break;
case 2:
class = @"PRIVATE";
break;
case 3:
class = @"CONFIDENTIAL";
break;
default: /* 0 as well */
class = @"PUBLIC";
}
}
if (class)
[self setAccessClass: class];
/* show time as free/busy/tentative/out of office. Possible values are:
0x00000000 - olFree
0x00000001 - olTentative