diff options
author | Milan Crha <mcrha@redhat.com> | 2019-03-22 08:51:59 +0100 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2019-03-22 08:51:59 +0100 |
commit | 7e5df164b60ddd0652529725e95a948fb7a0b0d5 (patch) | |
tree | 6d4ae44ec0d1a81039cfa23de63ed4a2a7e7dda9 /src/libical-glib/api | |
parent | 02613a2a2b4182a76f964355ef652b3d0d24d956 (diff) | |
download | libical-git-7e5df164b60ddd0652529725e95a948fb7a0b0d5.tar.gz |
[libical-glib] Introduce i_cal_time_convert_to_zone_inplace()
It modifies the inner native object, with no need to allocate a new ICalObject.
Diffstat (limited to 'src/libical-glib/api')
-rw-r--r-- | src/libical-glib/api/i-cal-time.xml | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/libical-glib/api/i-cal-time.xml b/src/libical-glib/api/i-cal-time.xml index 35448066..7ee5ac62 100644 --- a/src/libical-glib/api/i-cal-time.xml +++ b/src/libical-glib/api/i-cal-time.xml @@ -155,10 +155,25 @@ <comment xml:space="preserve">Normalize the icaltime, so that all fields are within the normal range.</comment> </method> <method name="i_cal_time_convert_to_zone" corresponds="icaltime_convert_to_zone" since="1.0"> - <parameter type="ICalTimetype *" name="t" annotation="in, transfer none" comment="The #ICalTimetype to be normalized"/> + <parameter type="ICalTimetype *" name="tt" annotation="in, transfer none" comment="The #ICalTimetype to be converted"/> <parameter type="ICalTimezone *" name="zone" annotation="transfer none, nullable" comment="The target timezone"/> <returns type="ICalTimetype *" annotation="transfer full" comment="The converted #ICalTimetype" /> - <comment xml:space="preserve">Convert tt, of timezone tzid, into a utc time. Does nothing if the time is already UTC.</comment> + <comment xml:space="preserve">Convert @tt to @zone and return new %ICalTimetype object.</comment> + </method> + <method name="i_cal_time_convert_to_zone_inplace" corresponds="CUSTOM" since="3.0.5"> + <parameter type="ICalTimetype *" name="tt" comment="The #ICalTimetype to be converted"/> + <parameter type="ICalTimezone *" name="zone" annotation="transfer none, nullable" comment="The target timezone"/> + <comment xml:space="preserve">Convert @tt to @zone and store the result into @tt.</comment> + <custom xml:space="preserve"> icaltimetype *itt; + + g_return_if_fail (I_CAL_IS_TIMETYPE (tt)); + if(zone) + g_return_if_fail (I_CAL_IS_TIMEZONE (zone)); + + itt = i_cal_object_get_native (I_CAL_OBJECT (tt)); + g_return_if_fail (itt != NULL); + + *itt = icaltime_convert_to_zone (*itt, ((zone)?((icaltimezone *)i_cal_object_get_native (I_CAL_OBJECT (zone))):NULL));</custom> </method> <method name="i_cal_time_days_in_month" corresponds="icaltime_days_in_month" since="1.0"> <parameter type="const gint" name="month" comment="The target month"/> |