Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:jberkman
evolution-data-server-2.6
bnc-247703-show-freebusy-resource-eds.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bnc-247703-show-freebusy-resource-eds.diff of Package evolution-data-server-2.6
Index: calendar/backends/groupwise/e-cal-backend-groupwise-utils.c =================================================================== --- calendar/backends/groupwise/e-cal-backend-groupwise-utils.c (revision 7683) +++ calendar/backends/groupwise/e-cal-backend-groupwise-utils.c (working copy) @@ -1691,6 +1691,9 @@ ECalComponentAttendee attendee; GSList *attendee_list = NULL; icalcomponent *icalcomp = NULL; + icalproperty *icalprop; + struct icalperiodtype ipt; + icaltimetype itt; tmp = soup_soap_parameter_get_first_child_by_name (subparam, "email"); if (tmp) @@ -1731,51 +1734,59 @@ g_object_unref (msg); return E_GW_CONNECTION_STATUS_INVALID_RESPONSE; } - - for (subparam_block = soup_soap_parameter_get_first_child_by_name (param_blocks, "block"); - subparam_block != NULL; - subparam_block = soup_soap_parameter_get_next_child_by_name (subparam_block, "block")) { - /* process each block and create ECal free/busy components.*/ - SoupSoapParameter *tmp; - struct icalperiodtype ipt; - icalproperty *icalprop; - icaltimetype itt; - time_t t; - const char *start, *end, *accept_level; + if (!soup_soap_parameter_get_first_child_by_name (param_blocks, "block")) { + itt = icaltime_from_timet_with_zone (start, 0, default_zone ? default_zone : NULL); + ipt.start = itt; + itt = icaltime_from_timet_with_zone (end, 0 , default_zone ? default_zone : NULL); + ipt.end = itt; - memset (&ipt, 0, sizeof (struct icalperiodtype)); - tmp = soup_soap_parameter_get_first_child_by_name (subparam_block, "startDate"); - if (tmp) { - start = soup_soap_parameter_get_string_value (tmp); - t = e_gw_connection_get_date_from_string (start); - itt = icaltime_from_timet_with_zone (t, 0, default_zone ? default_zone : 0); - ipt.start = itt; - } - - tmp = soup_soap_parameter_get_first_child_by_name (subparam_block, "endDate"); - if (tmp) { - end = soup_soap_parameter_get_string_value (tmp); - t = e_gw_connection_get_date_from_string (end); - itt = icaltime_from_timet_with_zone (t, 0, default_zone ? default_zone : 0); - ipt.end = itt; - } icalprop = icalproperty_new_freebusy (ipt); - - tmp = soup_soap_parameter_get_first_child_by_name (subparam_block, "acceptLevel"); - if (tmp) { - accept_level = soup_soap_parameter_get_string_value (tmp); - if (!strcmp (accept_level, "Busy")) - icalproperty_set_parameter_from_string (icalprop, "FBTYPE", "BUSY"); - else if (!strcmp (accept_level, "Tentative")) - icalproperty_set_parameter_from_string (icalprop, "FBTYPE", "BUSYTENTATIVE"); - else if (!strcmp (accept_level, "OutOfOffice")) - icalproperty_set_parameter_from_string (icalprop, "FBTYPE", "BUSYUNAVAILABLE"); - else if (!strcmp (accept_level, "Free")) - icalproperty_set_parameter_from_string (icalprop, "FBTYPE", "FREE"); - } + icalproperty_set_parameter_from_string (icalprop, "FBTYPE", "FREE"); icalcomponent_add_property(icalcomp, icalprop); + } else { + for (subparam_block = soup_soap_parameter_get_first_child_by_name (param_blocks, "block"); + subparam_block != NULL; + subparam_block = soup_soap_parameter_get_next_child_by_name (subparam_block, "block")) { + /* process each block and create ECal free/busy components.*/ + SoupSoapParameter *tmp; + time_t t; + const char *start, *end, *accept_level; + + memset (&ipt, 0, sizeof (struct icalperiodtype)); + tmp = soup_soap_parameter_get_first_child_by_name (subparam_block, "startDate"); + if (tmp) { + start = soup_soap_parameter_get_string_value (tmp); + t = e_gw_connection_get_date_from_string (start); + itt = icaltime_from_timet_with_zone (t, 0, default_zone ? default_zone : NULL); + ipt.start = itt; + } + + tmp = soup_soap_parameter_get_first_child_by_name (subparam_block, "endDate"); + if (tmp) { + end = soup_soap_parameter_get_string_value (tmp); + t = e_gw_connection_get_date_from_string (end); + itt = icaltime_from_timet_with_zone (t, 0, default_zone ? default_zone : NULL); + ipt.end = itt; + } + icalprop = icalproperty_new_freebusy (ipt); + + tmp = soup_soap_parameter_get_first_child_by_name (subparam_block, "acceptLevel"); + if (tmp) { + accept_level = soup_soap_parameter_get_string_value (tmp); + if (!strcmp (accept_level, "Busy")) + icalproperty_set_parameter_from_string (icalprop, "FBTYPE", "BUSY"); + else if (!strcmp (accept_level, "Tentative")) + icalproperty_set_parameter_from_string (icalprop, "FBTYPE", "BUSYTENTATIVE"); + else if (!strcmp (accept_level, "OutOfOffice")) + icalproperty_set_parameter_from_string (icalprop, "FBTYPE", "BUSYUNAVAILABLE"); + else if (!strcmp (accept_level, "Free")) + icalproperty_set_parameter_from_string (icalprop, "FBTYPE", "FREE"); + } + icalcomponent_add_property(icalcomp, icalprop); + + } } e_cal_component_commit_sequence (comp);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor