Merge pull request #88 from Zentyal/ejhernandez/add-categories-calendar-events

oc-calendar: Implement categories to share the colour
pull/65/merge^2
Jesús García Sáez 2015-02-24 14:23:36 +01:00
commit b645b4187d
2 changed files with 23 additions and 0 deletions

View File

@ -45,6 +45,7 @@
#import "MAPIStoreRecurrenceUtils.h"
#import "MAPIStoreSamDBUtils.h"
#import "MAPIStoreTypes.h"
#import "NSArray+MAPIStore.h"
#import "NSData+MAPIStore.h"
#import "NSDate+MAPIStore.h"
#import "NSObject+MAPIStore.h"
@ -1243,6 +1244,22 @@ static NSCharacterSet *hexCharacterSet = nil;
return MAPISTORE_SUCCESS;
}
- (int) getPidNameKeywords: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx
{
/* See [MS-OXCICAL] Section 2.1.3.1.1.20.3 */
NSArray *categories;
categories = [event categories];
if (categories)
{
*data = [categories asMVUnicodeInMemCtx: memCtx];
return MAPISTORE_SUCCESS;
}
else
return MAPISTORE_ERR_NOT_FOUND;
}
- (int) getPidTagBody: (void **) data
inMemCtx: (TALLOC_CTX *) memCtx
{

View File

@ -305,6 +305,12 @@
if (class)
[self setAccessClass: class];
/* Categories */
/* See [MS-OXCICAL] Section 2.1.3.1.1.20.3 */
value = [properties objectForKey: MAPIPropertyKey (PidNameKeywords)];
if (value)
[self setCategories: value];
/* show time as free/busy/tentative/out of office. Possible values are:
0x00000000 - olFree
0x00000001 - olTentative