summaryrefslogtreecommitdiff
path: root/src/libical-glib/api/i-cal-timezone.xml
blob: 0900e612e3e852254238b2217b93d6df49cde7a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<!--
  Copyright (C) 2015 William Yu <williamyu@gnome.org>

  This library is free software: you can redistribute it and/or modify it
  under the terms of version 2.1. of the GNU Lesser General Public License
  as published by the Free Software Foundation.

  This library is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
  for more details.

  You should have received a copy of the GNU Lesser General Public License
  along with this library. If not, see <https://www.gnu.org/licenses/>.
-->
<structure namespace="ICal" name="Timezone" native="icaltimezone" is_possible_global="true" destroy_func="i_cal_timezone_destroy">
    <method name="i_cal_timezone_new" corresponds="icaltimezone_new" kind="constructor" since="1.0">
        <returns type="ICalTimezone *" annotation="transfer full, nullable" translator="i_cal_timezone_new_full" translator_argus="NULL, FALSE" comment="The newly created object of the type #ICalTimezone." />
        <comment xml:space="preserve">The constructor of the type #ICalTimezone.</comment>
    </method>
    <method name="i_cal_timezone_destroy" corresponds="CUSTOM" annotation="skip" kind="private" since="1.0">
        <parameter type="icaltimezone *" name="zone" comment="The #ICalTimezone to be freed"/>
        <comment xml:space="preserve">The destructor of the type #ICalTimezone to fully destroy the object by providing 1 as the second argument of i_cal_time_zone_free. The method is used as a default destructor for introspection.</comment>
        <custom>        icaltimezone_free (zone, 1);</custom>
    </method>
    <method name="i_cal_timezone_copy" corresponds="icaltimezone_copy" kind="clone" since="1.0">
        <parameter type="const ICalTimezone *" name="zone" comment="The #ICalTimezone needs to be cloned"/>
        <returns type="ICalTimezone *" annotation="transfer full" translator="i_cal_timezone_new_full" translator_argus="NULL, FALSE" comment="The newly created #ICalTimezone with the same values as @zone"/>
        <comment xml:space="preserve">The clone method for #ICalTimezone.</comment>
    </method>
    <method name="i_cal_timezone_free" corresponds="icaltimezone_free" annotation="skip" kind="destructor" since="1.0">
        <parameter type="ICalTimezone *" name="zone" comment="The #ICalTimezone to be freed"/>
        <parameter type="gint" name="free_struct" autofill="1" comment="Whether to free it or reset it. 1 to free and 0 to reset"/>
        <comment xml:space="preserve">The destructor of #ICalTimezone.</comment>
    </method>
    <method name="i_cal_timezone_set_tzid_prefix" corresponds="icaltimezone_set_tzid_prefix" kind="set" since="1.0">
        <parameter type="const gchar *" name="new_prefix" comment="The #ICalTimezone to be set"/>
        <comment xml:space="preserve">Sets the prefix to be used for tzid's generated from system tzdata. Must be globally unique (such as a domain name owned by the developer of the calling application), and begin and end with forward slashes. Do not change or de-allocate the string buffer after calling this.</comment>
    </method>
    <method name="i_cal_timezone_free_builtin_timezones" corresponds="icaltimezone_free_builtin_timezones" kind="others" since="1.0">
        <comment xml:space="preserve">Frees any builtin timezone information.</comment>
    </method>
    <method name="i_cal_timezone_get_builtin_timezone" corresponds="icaltimezone_get_builtin_timezone" kind="get" since="1.0">
        <parameter type="const gchar *" name="location" annotation="nullable" comment="The location representing the timezone"/>
        <returns type="ICalTimezone *" translator="i_cal_timezone_new_full" translator_argus="NULL, TRUE" annotation="transfer none, nullable" comment="The builtin #ICalTimezone with the name of @location"/>
        <comment xml:space="preserve">Returns a single builtin timezone, given its Olson city name.</comment>
    </method>
    <method name="i_cal_timezone_get_builtin_timezone_from_offset" corresponds="icaltimezone_get_builtin_timezone_from_offset" kind="get" since="1.0">
        <parameter type="gint" name="offset" comment="The offset used to get the #ICalTimezone"/>
        <parameter type="const gchar *" name="tzname" annotation="nullable" comment="The reference #ICalTimezone name"/>
        <returns type="ICalTimezone *" translator="i_cal_timezone_new_full" translator_argus="NULL, TRUE" annotation="transfer none"/>
        <comment xml:space="preserve">Returns a single builtin timezone, given its offset.</comment>
    </method>
    <method name="i_cal_timezone_get_builtin_timezone_from_tzid" corresponds="icaltimezone_get_builtin_timezone_from_tzid" kind="get" since="1.0">
        <parameter type="const gchar *" name="tzid" annotation="nullable" comment="The tzid name"/>
        <returns type="ICalTimezone *" translator="i_cal_timezone_new_full" translator_argus="NULL, TRUE" annotation="transfer none"/>
        <comment xml:space="preserve">Returns a single builtin timezone, given its TZID.</comment>
    </method>
    <method name="i_cal_timezone_get_builtin_timezones" corresponds="icaltimezone_get_builtin_timezones" kind="get" since="1.0">
        <returns type="ICalArray *" annotation="transfer none" translator_argus="NULL, TRUE" comment="An #ICalArray of the builtin #ICalTimezone objects."/>
        <comment xml:space="preserve">Returns a list of builtin timezones.</comment>
    </method>
    <method name="i_cal_timezone_get_utc_timezone" corresponds="icaltimezone_get_utc_timezone" kind="get" since="1.0">
        <returns type="ICalTimezone *" translator="i_cal_timezone_new_full" translator_argus="NULL, TRUE" annotation="transfer none" comment="The utc #ICalTimezone"/>
        <comment xml:space="preserve">Returns the UTC timezone.</comment>
    </method>
    <method name="i_cal_timezone_get_tzid" corresponds="icaltimezone_get_tzid" kind="get" since="1.0">
        <parameter type="const ICalTimezone *" name="zone" annotation="nullable" comment="The #ICalTimezone to be queried"/>
        <returns type="const gchar *" annotation="nullable" comment="The timezone id, or %NULL"/>
        <comment xml:space="preserve">Returns the TZID of a timezone, or %NULL, when none is set or when @zone is also %NULL.</comment>
    </method>
    <method name="i_cal_timezone_get_location" corresponds="icaltimezone_get_location" kind="get" since="1.0">
        <parameter type="const ICalTimezone *" name="zone" annotation="nullable" comment="The #ICalTimezone to be queried"/>
        <returns type="const gchar *" annotation="nullable" comment="The location of the #ICalTimezone, or %NULL"/>
        <comment xml:space="preserve">Returns the city name of a timezone, or %NULL, when none is set or when @zone is also %NULL.</comment>
    </method>
    <method name="i_cal_timezone_get_tznames" corresponds="icaltimezone_get_tznames" kind="get" since="1.0">
        <parameter type="const ICalTimezone *" name="zone" annotation="nullable" comment="The #ICalTimezone to be queried"/>
        <returns type="const gchar *" annotation="nullable" comment="The timezone name"/>
        <comment xml:space="preserve">Returns the TZNAME properties used in the latest STANDARD and DAYLIGHT components. If they are the same it will return just one, e.g. "LMT". If they are different it will format them like "EST/EDT". Note that this may also return NULL.</comment>
    </method>
    <method name="i_cal_timezone_get_latitude" corresponds="icaltimezone_get_latitude" kind="get" since="1.0">
        <parameter type="const ICalTimezone *" name="zone" annotation="nullable" comment="The #ICalTimezone to be queried"/>
        <returns type="gdouble" comment="The latitude of the #ICalTimezone"/>
        <comment xml:space="preserve">Returns the latitude of a builtin timezone.</comment>
    </method>
    <method name="i_cal_timezone_get_longitude" corresponds="icaltimezone_get_longitude" kind="get" since="1.0">
        <parameter type="const ICalTimezone *" name="zone" annotation="nullable" comment="The #ICalTimezone to be queried"/>
        <returns type="gdouble" comment="The longitude of the #ICalTimezone."/>
        <comment xml:space="preserve">Returns the longitude of a builtin timezone.</comment>
    </method>
    <method name="i_cal_timezone_get_component" corresponds="icaltimezone_get_component" kind="get" since="1.0">
        <parameter type="const ICalTimezone *" name="zone" annotation="nullable" comment="The #ICalTimezone to be queried"/>
        <returns type="ICalComponent *" annotation="transfer full" translator_argus="(GObject *)zone" comment="The VTIMEZONE component of the @zone."/>
        <comment xml:space="preserve">Returns the VTIMEZONE component of a timezone.</comment>
    </method>
    <method name="i_cal_timezone_set_component" corresponds="CUSTOM" kind="set" since="1.0">
        <parameter type="ICalTimezone *" name="zone" comment="The #ICalTimezone to be set"/>
        <parameter type="ICalComponent *" name="comp" comment="The VTIMEZONE component of an #ICalTimezone, initializing the tzid, location and tzname fields"/>
        <returns type="gint" comment="Whether the action is successful. 1 for success, 0 for failure."/>
        <comment xml:space="preserve">Sets the VTIMEZONE component of #ICalTimezone, initializing the tzid, location and tzname fields. It returns 1 on success or 0 on failure, i.e. no TZID was found.
 *
 * @note The @zone assumes ownership of the @comp, thus make sure you pass an unowned #ICalComponent.</comment>
	<custom xml:space="preserve">    g_return_val_if_fail(I_CAL_IS_TIMEZONE(zone), 0);
    g_return_val_if_fail(I_CAL_IS_COMPONENT(comp), 0);

    i_cal_object_set_owner(I_CAL_OBJECT(comp), G_OBJECT(zone));

    return icaltimezone_set_component ((icaltimezone *)i_cal_object_get_native (I_CAL_OBJECT (zone)), (icalcomponent *)i_cal_object_get_native (I_CAL_OBJECT (comp)));</custom>
    </method>
    <method name="i_cal_timezone_get_display_name" corresponds="icaltimezone_get_display_name" kind="get" since="1.0">
        <parameter type="const ICalTimezone *" name="zone" annotation="nullable" comment="The #ICalTimezone to be queried"/>
        <returns type="const gchar *" comment="The display name of @zone"/>
        <comment xml:space="preserve">Gets the display name of the @zone.</comment>
    </method>
    <method name="i_cal_time_convert_timezone" corresponds="icaltimezone_convert_time" kind="other" since="1.0">
        <parameter type="ICalTime *" name="tt" native_op="POINTER" comment="The time to be converted"/>
        <parameter type="ICalTimezone *" name="from_zone" annotation="nullable" comment="From timezone"/>
        <parameter type="ICalTimezone *" name="to_zone" annotation="nullable" comment="To timezone"/>
        <comment>Convert time from one timezone to another.</comment>
    </method>
    <method name="i_cal_timezone_get_utc_offset" corresponds="icaltimezone_get_utc_offset" kind="get" since="1.0">
        <parameter type="ICalTimezone *" name="zone" annotation="nullable" comment="The given #ICalTimezone"/>
        <parameter type="ICalTime *" name="tt" annotation="nullable" native_op="POINTER" comment="The local time"/>
        <parameter type="gint *" name="is_daylight" annotation="out, optional" comment="Whether it is day light"/>
        <returns type="gint" comment="UTC offset of the @zone"/>
        <comment>Calculates the UTC offset of a given local time in the given timezone.  It is the number of seconds to add to UTC to get local time.  The is_daylight flag is set to 1 if the time is in daylight-savings time.</comment>
    </method>
    <method name="i_cal_timezone_get_utc_offset_of_utc_time" corresponds="icaltimezone_get_utc_offset_of_utc_time" kind="get" since="1.0">
        <parameter type="ICalTimezone *" name="zone" annotation="nullable" comment="The given #ICalTimezone"/>
        <parameter type="ICalTime *" name="tt" native_op="POINTER" comment="The local time"/>
        <parameter type="gint *" name="is_daylight" annotation="out, optional" comment="Whether it is day light, can be %NULL"/>
        <returns type="gint" comment="UTC offset of the @zone"/>
        <comment>Calculates the UTC offset of a given UTC time in the given timezone.  It is the number of seconds to add to UTC to get local time.  The is_daylight flag is set to 1 if the time is in daylight-savings time.</comment>
    </method>
    <method name="i_cal_timezone_array_new" corresponds="CUSTOM" kind="other" since="1.0">
        <returns type="ICalArray *" annotation="transfer full" translator_argus="NULL, FALSE" comment="Create a new array."/>
        <comment xml:space="preserve">Creates a new array of timezones.</comment>
        <custom>    ICalArray *zones_array;

    zones_array = i_cal_array_new_full(icaltimezone_array_new (), NULL, FALSE);
    i_cal_object_set_native_destroy_func(I_CAL_OBJECT (zones_array), (GDestroyNotify) i_cal_timezone_array_destroy);
    return zones_array;</custom>
    </method>
    <method name="i_cal_timezone_array_destroy" corresponds="CUSTOM" annotation="skip" kind="private" since="1.0">
        <parameter type="icalarray *" name="zones_array" annotation="nullable" comment="The icalarray created by i_cal_timezone_array_new() to be freed"/>
        <comment xml:space="preserve">The destructor of the icalarray of icaltimezone elements to fully destroy the native object.</comment>
        <custom>        icaltimezone_array_free (zones_array);</custom>
    </method>
    <method name="i_cal_timezone_array_append_from_vtimezone" corresponds="CUSTOM" kind="other" since="1.0">
        <parameter type="ICalArray *" name="timezones" comment="The timezones to be populated"/>
        <parameter type="ICalComponent *" name="child" comment="The component to be appended to @timezones"/>
        <comment>Populate the array of timezones with a component.
 *
 * @note The @timezones assumes ownership of the @child, thus make sure you pass an unowned #ICalComponent.</comment>
	<custom xml:space="preserve">    g_return_if_fail(I_CAL_IS_ARRAY(timezones));
    g_return_if_fail(I_CAL_IS_COMPONENT(child));

    i_cal_object_set_owner(I_CAL_OBJECT(child), G_OBJECT(timezones));

    icaltimezone_array_append_from_vtimezone ((icalarray *)i_cal_object_get_native (I_CAL_OBJECT (timezones)), (icalcomponent *)i_cal_object_get_native (I_CAL_OBJECT (child)));</custom>
    </method>
    <method name="i_cal_timezone_array_free" corresponds="icaltimezone_array_free" annotation="skip" kind="other" since="1.0">
        <parameter type="ICalArray *" name="timezones" native_op="STEAL" comment="Free an array"/>
        <comment xml:space="preserve">Frees an array of timezones.</comment>
    </method>
    <method name="i_cal_time_timezone_expand_vtimezone" corresponds="icaltimezone_expand_vtimezone" kind="other" since="2.0">
        <parameter type="ICalComponent *" name="comp" comment="The #ICalComponent"/>
        <parameter type="gint" name="end_year" comment="The end year"/>
        <parameter type="ICalArray *" name="changes" comment="The changes to be applies"/>
        <comment xml:space="preserve">Applies a list of timezone changes on the array of components until the end year.</comment>
    </method>
    <method name="i_cal_timezone_get_location_from_vtimezone" corresponds="icaltimezone_get_location_from_vtimezone" kind="get" since="2.0">
        <parameter type="ICalComponent *" name="component" comment="The #ICalComponent to be queried"/>
        <returns type="gchar *" comment="The location of vtimezone."/>
        <comment xml:space="preserve">Gets the location of the vtimezone in component.</comment>
    </method>
    <method name="i_cal_timezone_get_tznames_from_vtimezone" corresponds="icaltimezone_get_tznames_from_vtimezone" kind="get" since="2.0">
        <parameter type="ICalComponent *" name="component" comment="The #ICalComponent to be queried"/>
        <returns type="gchar *" comment="The name of vtimezone."/>
        <comment xml:space="preserve">Gets the name of the vtimezone in component.</comment>
    </method>
    <method name="i_cal_timezone_set_zone_directory" corresponds="set_zone_directory" kind="others" since="1.0">
        <parameter type="const gchar *" name="path" comment="The path to look for the zonefiles"/>
        <comment xml:space="preserve">Sets the directory to look for the zonefiles.</comment>
    </method>
    <method name="i_cal_timezone_free_zone_directory" corresponds="free_zone_directory" kind="others" since="1.0">
        <comment xml:space="preserve">Frees memory dedicated to the zonefile directory.</comment>
    </method>
    <method name="i_cal_timezone_release_zone_tab" corresponds="icaltimezone_release_zone_tab" kind="others" since="1.0">
        <comment xml:space="preserve">Frees memory dedicated to the zonefile directory.</comment>
    </method>
    <method name="i_cal_timezone_set_builtin_tzdata" corresponds="icaltimezone_set_builtin_tzdata" kind="set" since="2.0">
        <parameter type="gboolean" name="set" comment="Whether to use builtin timezones files"/>
        <comment xml:space="preserve">Sets whether to use builtin timezones files.</comment>
    </method>
    <method name="i_cal_timezone_get_builtin_tzdata" corresponds="icaltimezone_get_builtin_tzdata" kind="get" since="2.0">
        <returns type="gboolean" comment="Whether to use builtin timezones files."/>
        <comment xml:space="preserve">Gets whether to use builtin timezones files.</comment>
    </method>
    <method name="i_cal_timezone_dump_changes" corresponds="icaltimezone_dump_changes" kind="other" since="1.0">
        <parameter type="ICalTimezone *" name="zone" comment="The timezone to be queried"/>
        <parameter type="gint" name="max_year" comment="Max year"/>
        <parameter type="FILE *" name="fp" comment="The file handle"/>
        <returns type="gint" comment="1 if success."/>
        <comment>Outputs a list of timezone changes for the given timezone to the given file, up to the maximum year given.</comment>
    </method>
    <method name="i_cal_timezone_array_element_at" corresponds="CUSTOM" kind="other" since="1.0">
        <parameter type="ICalArray *" name="timezones" comment="The array to be visited"/>
        <parameter type="guint" name="index" comment="The index"/>
        <returns type="ICalTimezone *" annotation="transfer full" translator_argus="timezones, FALSE" comment="The #ICalTimezone at the position @index in @timezones."/>
        <comment>Gets the #ICalTimezone at specified position in array.</comment>
        <custom>        return i_cal_timezone_new_full ((gpointer)i_cal_array_element_at (timezones, index), (GObject *)timezones, FALSE);</custom>
    </method>
</structure>