Merge pull request #72 from Zentyal/ejhernandez/wedding-anniversary
oc-contacts: Implement Wedding Anniversary
This commit is contained in:
commit
014632fddb
|
@ -723,6 +723,27 @@
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (int) getPidTagWeddingAnniversary: (void **) data
|
||||||
|
inMemCtx: (TALLOC_CTX *) memCtx
|
||||||
|
{
|
||||||
|
NSCalendarDate *dateValue;
|
||||||
|
NSString *stringValue;
|
||||||
|
int rc = MAPISTORE_SUCCESS;
|
||||||
|
|
||||||
|
stringValue = [[[sogoObject vCard] uniqueChildWithTag: @"x-ms-anniversary"]
|
||||||
|
flattenedValuesForKey: @""];
|
||||||
|
if (stringValue && ! [stringValue isEqualToString: @""])
|
||||||
|
{
|
||||||
|
dateValue = [NSCalendarDate dateWithString: stringValue
|
||||||
|
calendarFormat: @"%Y-%m-%d"];
|
||||||
|
*data = [dateValue asFileTimeInMemCtx: memCtx];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
rc = MAPISTORE_ERR_NOT_FOUND;
|
||||||
|
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Decomposed fullname getters
|
// Decomposed fullname getters
|
||||||
//
|
//
|
||||||
|
@ -1173,6 +1194,15 @@ fromProperties: (NSDictionary *) attachmentProps
|
||||||
[newCard setBday: [value descriptionWithCalendarFormat: @"%Y-%m-%d"]];
|
[newCard setBday: [value descriptionWithCalendarFormat: @"%Y-%m-%d"]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* wedding anniversary */
|
||||||
|
value = [properties objectForKey: MAPIPropertyKey(PidTagWeddingAnniversary)];
|
||||||
|
if (value)
|
||||||
|
{
|
||||||
|
[[newCard uniqueChildWithTag: @"x-ms-anniversary"]
|
||||||
|
setSingleValue: [value descriptionWithCalendarFormat: @"%Y-%m-%d"]
|
||||||
|
forKey: @""];
|
||||||
|
}
|
||||||
|
|
||||||
/* photo */
|
/* photo */
|
||||||
if ([attachmentParts count] > 0)
|
if ([attachmentParts count] > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue