diff options
author | Jan Kalab <pitlicek@gmail.com> | 2010-09-03 12:58:52 +0000 |
---|---|---|
committer | Jan Kalab <pitlicek@gmail.com> | 2010-09-03 12:58:52 +0000 |
commit | a7505c0b91c9333c8968e98e57c8cb1142378190 (patch) | |
tree | 5c7bcfe2b2c8238f51d3f9f60f2207fa8eb5a245 /res/res_calendar_icalendar.c | |
parent | 3403dbf3741bb3d5f057289a204ea2d11d41b9df (diff) |
Support for calendar events priorities and categories (with ISO C90 fix)
See RFC 5545 ch. 3.8.1.2 and 9.
(closes issue #17837)
Review: https://reviewboard.asterisk.org/r/880/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@284851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_calendar_icalendar.c')
-rw-r--r-- | res/res_calendar_icalendar.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/res/res_calendar_icalendar.c b/res/res_calendar_icalendar.c index 2eda35245..300da2ac9 100644 --- a/res/res_calendar_icalendar.c +++ b/res/res_calendar_icalendar.c @@ -224,6 +224,14 @@ static void icalendar_add_event(icalcomponent *comp, struct icaltime_span *span, ast_string_field_set(event, location, icalproperty_get_value_as_string(prop)); } + if ((prop = icalcomponent_get_first_property(comp, ICAL_CATEGORIES_PROPERTY))) { + ast_string_field_set(event, categories, icalproperty_get_value_as_string(prop)); + } + + if ((prop = icalcomponent_get_first_property(comp, ICAL_PRIORITY_PROPERTY))) { + event->priority = icalvalue_get_integer(icalproperty_get_value(prop)); + } + if ((prop = icalcomponent_get_first_property(comp, ICAL_UID_PROPERTY))) { ast_string_field_set(event, uid, icalproperty_get_value_as_string(prop)); } else { |