Merge pull request #87 from Zentyal/ejhernandez/fixes-on-calendar-props
Calendar: PidTagSensitivity and PidTagImportance now works in Outlookpull/65/merge^2
commit
68216a7456
|
@ -1200,11 +1200,31 @@ static NSCharacterSet *hexCharacterSet = nil;
|
||||||
return [self getYes: data inMemCtx: memCtx];
|
return [self getYes: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPidTagSensitivity: (void **) data // not implemented, depends on CLASS
|
- (int) getPidTagSensitivity: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
// normal = 0, personal?? = 1, private = 2, confidential = 3
|
/* See [MS-OXCICAL] Section 2.1.3.11.20.4 */
|
||||||
return [self getLongZero: data inMemCtx: memCtx];
|
uint32_t v;
|
||||||
|
NSString *accessClass;
|
||||||
|
|
||||||
|
accessClass = [event accessClass];
|
||||||
|
if (accessClass)
|
||||||
|
{
|
||||||
|
if ([accessClass isEqualToString: @"X-PERSONAL"])
|
||||||
|
v = 0x1;
|
||||||
|
else if ([accessClass isEqualToString: @"PRIVATE"])
|
||||||
|
v = 0x2;
|
||||||
|
else if ([accessClass isEqualToString: @"CONFIDENTIAL"])
|
||||||
|
v = 0x3;
|
||||||
|
else
|
||||||
|
v = 0x0; /* PUBLIC */
|
||||||
|
}
|
||||||
|
else
|
||||||
|
v = 0x0; /* PUBLIC */
|
||||||
|
|
||||||
|
*data = MAPILongValue (memCtx, v);
|
||||||
|
|
||||||
|
return MAPISTORE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPidTagImportance: (void **) data
|
- (int) getPidTagImportance: (void **) data
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
|
|
||||||
// extern void ndr_print_AppointmentRecurrencePattern(struct ndr_print *ndr, const char *name, const struct AppointmentRecurrencePattern *r);
|
// extern void ndr_print_AppointmentRecurrencePattern(struct ndr_print *ndr, const char *name, const struct AppointmentRecurrencePattern *r);
|
||||||
|
|
||||||
static Class NSArrayK;
|
static Class NSArrayK, MAPIStoreAppointmentWrapperK;
|
||||||
|
|
||||||
@implementation SOGoAppointmentObject (MAPIStoreExtension)
|
@implementation SOGoAppointmentObject (MAPIStoreExtension)
|
||||||
|
|
||||||
|
@ -97,6 +97,7 @@ static Class NSArrayK;
|
||||||
+ (void) initialize
|
+ (void) initialize
|
||||||
{
|
{
|
||||||
NSArrayK = [NSArray class];
|
NSArrayK = [NSArray class];
|
||||||
|
MAPIStoreAppointmentWrapperK = [MAPIStoreAppointmentWrapper class];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (enum mapistore_error) getAvailableProperties: (struct SPropTagArray **) propertiesP
|
+ (enum mapistore_error) getAvailableProperties: (struct SPropTagArray **) propertiesP
|
||||||
|
@ -205,13 +206,23 @@ static Class NSArrayK;
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* getters */
|
- (MAPIStoreAppointmentWrapper *) _appointmentWrapper
|
||||||
- (int) getPidLidFInvited: (void **) data
|
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
|
||||||
{
|
{
|
||||||
return [self getYes: data inMemCtx: memCtx];
|
NSUInteger i, max;
|
||||||
|
id proxy;
|
||||||
|
max = [proxies count];
|
||||||
|
for (i = 0; i < max; i++) {
|
||||||
|
proxy = [proxies objectAtIndex: i];
|
||||||
|
if ([proxy isKindOfClass: MAPIStoreAppointmentWrapperK])
|
||||||
|
{
|
||||||
|
return proxy;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* getters */
|
||||||
- (int) getPidTagMessageClass: (void **) data
|
- (int) getPidTagMessageClass: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
|
@ -324,100 +335,63 @@ static Class NSArrayK;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* HACK: we know the first (and only) proxy is our appointment wrapper
|
[[self _appointmentWrapper] fillMessageData: msgData
|
||||||
instance, but this might not always be true */
|
inMemCtx: memCtx];
|
||||||
[[proxies objectAtIndex: 0] fillMessageData: msgData
|
|
||||||
inMemCtx: memCtx];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*dataPtr = msgData;
|
*dataPtr = msgData;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* sender representing */
|
|
||||||
// - (int) getPidTagSentRepresentingEmailAddress: (void **) data
|
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
|
||||||
// {
|
|
||||||
// return [self getPidTagSenderEmailAddress: data inMemCtx: memCtx];
|
|
||||||
// }
|
|
||||||
|
|
||||||
// - (int) getPidTagSentRepresentingAddressType: (void **) data
|
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
|
||||||
// {
|
|
||||||
// return [self getSMTPAddrType: data inMemCtx: memCtx];
|
|
||||||
// }
|
|
||||||
|
|
||||||
// - (int) getPidTagSentRepresentingName: (void **) data
|
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
|
||||||
// {
|
|
||||||
// return [self getPidTagSenderName: data inMemCtx: memCtx];
|
|
||||||
// }
|
|
||||||
|
|
||||||
// - (int) getPidTagSentRepresentingEntryId: (void **) data
|
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
|
||||||
// {
|
|
||||||
// return [self getPidTagSenderEntryId: data inMemCtx: memCtx];
|
|
||||||
// }
|
|
||||||
|
|
||||||
/* attendee */
|
|
||||||
// - (int) getPidTagReceivedByAddressType: (void **) data
|
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
|
||||||
// {
|
|
||||||
// return [appointmentWrapper getPidTagReceivedByAddressType: data
|
|
||||||
// inMemCtx: memCtx];
|
|
||||||
// }
|
|
||||||
|
|
||||||
// - (int) getPidTagReceivedByEmailAddress: (void **) data
|
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
|
||||||
// {
|
|
||||||
// return [appointmentWrapper getPidTagReceivedByEmailAddress: data
|
|
||||||
// inMemCtx: memCtx];
|
|
||||||
// }
|
|
||||||
|
|
||||||
// - (int) getPidTagReceivedByName: (void **) data
|
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
|
||||||
// {
|
|
||||||
// return [appointmentWrapper getPidTagReceivedByName: data
|
|
||||||
// inMemCtx: memCtx];
|
|
||||||
// }
|
|
||||||
|
|
||||||
// - (int) getPidTagReceivedByEntryId: (void **) data
|
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
|
||||||
// {
|
|
||||||
// return [appointmentWrapper getPidTagReceivedByEntryId: data
|
|
||||||
// inMemCtx: memCtx];
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /* attendee representing */
|
|
||||||
// - (int) getPidTagReceivedRepresentingEmailAddress: (void **) data
|
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
|
||||||
// {
|
|
||||||
// return [self getPidTagReceivedByEmailAddress: data inMemCtx: memCtx];
|
|
||||||
// }
|
|
||||||
|
|
||||||
// - (int) getPidTagReceivedRepresentingAddressType: (void **) data
|
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
|
||||||
// {
|
|
||||||
// return [self getSMTPAddrType: data inMemCtx: memCtx];
|
|
||||||
// }
|
|
||||||
|
|
||||||
// - (int) getPidTagReceivedRepresentingName: (void **) data
|
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
|
||||||
// {
|
|
||||||
// return [self getPidTagReceivedByName: data inMemCtx: memCtx];
|
|
||||||
// }
|
|
||||||
|
|
||||||
// - (int) getPidTagReceivedRepresentingEntryId: (void **) data
|
|
||||||
// inMemCtx: (TALLOC_CTX *) memCtx
|
|
||||||
// {
|
|
||||||
// return [self getPidTagReceivedByEntryId: data inMemCtx: memCtx];
|
|
||||||
// }
|
|
||||||
|
|
||||||
- (int) getPidTagResponseRequested: (void **) data
|
- (int) getPidTagResponseRequested: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getYes: data inMemCtx: memCtx];
|
return [self getYes: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This three methods: getPidTagNormalizedSubject,
|
||||||
|
getPidTagSensitivity and getPidTagImportance are implemented in
|
||||||
|
MAPIStoreMessage base class, then the proxy method is not reached
|
||||||
|
(see MAPIStoreObject).
|
||||||
|
*/
|
||||||
|
- (int) getPidTagNormalizedSubject: (void **) data
|
||||||
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
|
{
|
||||||
|
MAPIStoreAppointmentWrapper *appointmentWrapper;
|
||||||
|
|
||||||
|
appointmentWrapper = [self _appointmentWrapper];
|
||||||
|
if (appointmentWrapper)
|
||||||
|
return [appointmentWrapper getPidTagNormalizedSubject: data inMemCtx: memCtx];
|
||||||
|
|
||||||
|
return MAPISTORE_ERR_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (int) getPidTagSensitivity: (void **) data
|
||||||
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
|
{
|
||||||
|
MAPIStoreAppointmentWrapper *appointmentWrapper;
|
||||||
|
|
||||||
|
appointmentWrapper = [self _appointmentWrapper];
|
||||||
|
if (appointmentWrapper)
|
||||||
|
return [appointmentWrapper getPidTagSensitivity: data inMemCtx: memCtx];
|
||||||
|
|
||||||
|
return [self getLongZero: data inMemCtx: memCtx];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (int) getPidTagImportance: (void **) data
|
||||||
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
|
{
|
||||||
|
MAPIStoreAppointmentWrapper *appointmentWrapper;
|
||||||
|
|
||||||
|
appointmentWrapper = [self _appointmentWrapper];
|
||||||
|
if (appointmentWrapper)
|
||||||
|
return [appointmentWrapper getPidTagImportance: data inMemCtx: memCtx];
|
||||||
|
|
||||||
|
*data = MAPILongValue (memCtx, 1);
|
||||||
|
|
||||||
|
return MAPISTORE_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
- (NSString *) _uidFromGlobalObjectId: (TALLOC_CTX *) memCtx
|
- (NSString *) _uidFromGlobalObjectId: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
NSData *objectId;
|
NSData *objectId;
|
||||||
|
|
|
@ -784,7 +784,7 @@ rtf2html (NSData *compressedRTF)
|
||||||
return [self getLongZero: data inMemCtx: memCtx];
|
return [self getLongZero: data inMemCtx: memCtx];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (int) getPidTagSensitivity: (void **) data // TODO -> subclass in calendar
|
- (int) getPidTagSensitivity: (void **) data
|
||||||
inMemCtx: (TALLOC_CTX *) memCtx
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
{
|
{
|
||||||
return [self getLongZero: data inMemCtx: memCtx];
|
return [self getLongZero: data inMemCtx: memCtx];
|
||||||
|
|
|
@ -140,7 +140,7 @@
|
||||||
iCalDateTime *start, *end;
|
iCalDateTime *start, *end;
|
||||||
iCalTimeZone *tz;
|
iCalTimeZone *tz;
|
||||||
NSTimeZone *userTimeZone;
|
NSTimeZone *userTimeZone;
|
||||||
NSString *priority;
|
NSString *priority, *class = nil;
|
||||||
NSUInteger responseStatus = 0;
|
NSUInteger responseStatus = 0;
|
||||||
NSInteger tzOffset;
|
NSInteger tzOffset;
|
||||||
SOGoUser *ownerUser;
|
SOGoUser *ownerUser;
|
||||||
|
@ -281,6 +281,30 @@
|
||||||
priority = @"0"; // None
|
priority = @"0"; // None
|
||||||
[self setPriority: priority];
|
[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:
|
/* show time as free/busy/tentative/out of office. Possible values are:
|
||||||
0x00000000 - olFree
|
0x00000000 - olFree
|
||||||
0x00000001 - olTentative
|
0x00000001 - olTentative
|
||||||
|
|
Loading…
Reference in New Issue