summaryrefslogtreecommitdiff
path: root/src/libical-glib/api/i-cal-duration.xml
blob: 053cbee538d81779854ffc40c72add5073d293bd (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
<!--
  SPDX-FileCopyrightText: 2015 William Yu <williamyu@gnome.org>

  SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0


-->
<structure namespace="ICal" name="Duration" native="struct icaldurationtype" is_bare="true" default_native="icaldurationtype_null_duration()">
    <method name="i_cal_duration_is_neg" corresponds="CUSTOM" kind="get" since="1.0">
        <parameter type="ICalDuration *" name="duration" comment="The #ICalDuration to be queried"/>
        <returns type="gboolean" comment="The is_neg." />
        <comment xml:space="preserve">Gets the is_neg of #ICalDuration.</comment>
        <custom>	g_return_val_if_fail (duration != NULL, 0);
	return (((struct icaldurationtype *)i_cal_object_get_native ((ICalObject *)duration))->is_neg) ? TRUE : FALSE;</custom>
    </method>
    <method name="i_cal_duration_set_is_neg" corresponds="CUSTOM" kind="set" since="1.0">
        <parameter type="ICalDuration *" name="duration" comment="The #ICalDuration to be set"/>
        <parameter type="gboolean" name="is_neg" comment="The is_neg"/>
        <comment>Sets the is_neg of #ICalDuration.</comment>
        <custom>	g_return_if_fail (duration != NULL &amp;&amp; I_CAL_IS_DURATION (duration));
	((struct icaldurationtype *)i_cal_object_get_native ((ICalObject *)duration))->is_neg = is_neg ? 1 : 0;</custom>
    </method>
    <method name="i_cal_duration_get_days" corresponds="CUSTOM" kind="get" since="1.0">
	<parameter type="ICalDuration *" name="duration" comment="The #ICalDuration to be queried"/>
        <returns type="guint" comment="The days." />
        <comment xml:space="preserve">Gets the days of #ICalDuration.</comment>
        <custom>	g_return_val_if_fail (duration != NULL, 0);
	return ((struct icaldurationtype *)i_cal_object_get_native ((ICalObject *)duration))->days;</custom>
    </method>
    <method name="i_cal_duration_set_days" corresponds="CUSTOM" kind="set" since="1.0">
        <parameter type="ICalDuration *" name="duration" comment="The #ICalDuration to be set"/>
        <parameter type="guint" name="days" comment="The days"/>
        <comment>Sets the days of #ICalDuration.</comment>
        <custom>	g_return_if_fail (duration != NULL &amp;&amp; I_CAL_IS_DURATION (duration));
	((struct icaldurationtype *)i_cal_object_get_native ((ICalObject *)duration))->days = days;</custom>
    </method>
    <method name="i_cal_duration_get_weeks" corresponds="CUSTOM" kind="get" since="1.0">
	<parameter type="ICalDuration *" name="duration" comment="The #ICalDuration to be queried"/>
        <returns type="guint" comment="The weeks." />
        <comment xml:space="preserve">Gets the weeks of #ICalDuration.</comment>
        <custom>	g_return_val_if_fail (duration != NULL, 0);
	return ((struct icaldurationtype *)i_cal_object_get_native ((ICalObject *)duration))->weeks;</custom>
    </method>
    <method name="i_cal_duration_set_weeks" corresponds="CUSTOM" kind="set" since="1.0">
        <parameter type="ICalDuration *" name="duration" comment="The #ICalDuration to be set"/>
        <parameter type="guint" name="weeks" comment="The weeks"/>
        <comment>Sets the weeks of #ICalDuration.</comment>
        <custom>	g_return_if_fail (duration != NULL &amp;&amp; I_CAL_IS_DURATION (duration));
	((struct icaldurationtype *)i_cal_object_get_native ((ICalObject *)duration))->weeks = weeks;</custom>
    </method>
    <method name="i_cal_duration_get_hours" corresponds="CUSTOM" kind="get" since="1.0">
	<parameter type="ICalDuration *" name="duration" comment="The #ICalDuration to be queried"/>
        <returns type="guint" comment="The hours." />
        <comment xml:space="preserve">Gets the hours of #ICalDuration.</comment>
        <custom>	g_return_val_if_fail (duration != NULL, 0);
	return ((struct icaldurationtype *)i_cal_object_get_native ((ICalObject *)duration))->hours;</custom>
    </method>
    <method name="i_cal_duration_set_hours" corresponds="CUSTOM" kind="set" since="1.0">
        <parameter type="ICalDuration *" name="duration" comment="The #ICalDuration to be set"/>
        <parameter type="guint" name="hours" comment="The hours"/>
        <comment>Sets the hours of #ICalDuration.</comment>
        <custom>	g_return_if_fail (duration != NULL &amp;&amp; I_CAL_IS_DURATION (duration));
	((struct icaldurationtype *)i_cal_object_get_native ((ICalObject *)duration))->hours = hours;</custom>
    </method>
    <method name="i_cal_duration_get_minutes" corresponds="CUSTOM" kind="get" since="1.0">
	<parameter type="ICalDuration *" name="duration" comment="The #ICalDuration to be queried"/>
        <returns type="guint" comment="The minutes." />
        <comment xml:space="preserve">Gets the minutes of #ICalDuration.</comment>
        <custom>	g_return_val_if_fail (duration != NULL, 0);
	return ((struct icaldurationtype *)i_cal_object_get_native ((ICalObject *)duration))->minutes;</custom>
    </method>
    <method name="i_cal_duration_set_minutes" corresponds="CUSTOM" kind="set" since="1.0">
        <parameter type="ICalDuration *" name="duration" comment="The #ICalDuration to be set"/>
        <parameter type="guint" name="minutes" comment="The minutes"/>
        <comment>Sets the minutes of #ICalDuration.</comment>
        <custom>	g_return_if_fail (duration != NULL &amp;&amp; I_CAL_IS_DURATION (duration));
	((struct icaldurationtype *)i_cal_object_get_native ((ICalObject *)duration))->minutes = minutes;</custom>
    </method>
    <method name="i_cal_duration_get_seconds" corresponds="CUSTOM" kind="get" since="1.0">
	<parameter type="ICalDuration *" name="duration" comment="The #ICalDuration to be queried"/>
        <returns type="guint" comment="The seconds." />
        <comment xml:space="preserve">Gets the seconds of #ICalDuration.</comment>
        <custom>	g_return_val_if_fail (duration != NULL, 0);
	return ((struct icaldurationtype *)i_cal_object_get_native ((ICalObject *)duration))->seconds;</custom>
    </method>
    <method name="i_cal_duration_set_seconds" corresponds="CUSTOM" kind="set" since="1.0">
        <parameter type="ICalDuration *" name="duration" comment="The #ICalDuration to be set"/>
        <parameter type="guint" name="seconds" comment="The seconds"/>
        <comment>Sets the seconds of #ICalDuration.</comment>
        <custom>	g_return_if_fail (duration != NULL &amp;&amp; I_CAL_IS_DURATION (duration));
	((struct icaldurationtype *)i_cal_object_get_native ((ICalObject *)duration))->seconds = seconds;</custom>
    </method>
    <method name="i_cal_duration_new_from_int" corresponds="icaldurationtype_from_int" kind="constructor" since="1.0">
        <parameter type="gint" name="t" comment="The duration in second"/>
        <returns type="ICalDuration *" annotation="transfer full" comment="The newly created #ICalDuration" />
        <comment xml:space="preserve">Creates a #ICalDuration from the duration in second.</comment>
    </method>
    <method name="i_cal_duration_new_from_string" corresponds="icaldurationtype_from_string" kind="constructor" since="1.0">
        <parameter type="const gchar *" name="str" comment="The string representation of the duration"/>
        <returns type="ICalDuration *" annotation="transfer full" comment="The newly created #ICalDuration" />
        <comment xml:space="preserve">Creates a #ICalDuration from the duration in string.</comment>
    </method>
    <method name="i_cal_duration_as_int" corresponds="icaldurationtype_as_int" kind="others" since="1.0">
        <parameter type="ICalDuration *" name="duration" comment="The #ICalDuration to be converted"/>
        <returns type="gint" comment="The duration in second" />
        <comment xml:space="preserve">Converts the #ICalDuration to the representation in second.</comment>
    </method>
    <method name="i_cal_duration_as_ical_string" corresponds="icaldurationtype_as_ical_string_r" kind="others" since="1.0">
        <parameter type="ICalDuration *" name="duration" comment="The #ICalDuration to be converted"/>
        <returns type="gchar *" annotation="transfer full" comment="The duration in string" />
        <comment xml:space="preserve">Converts the #ICalDuration to the representation in string</comment>
    </method>
    <method name="i_cal_duration_new_null_duration" corresponds="icaldurationtype_null_duration" kind="constructor" since="1.0">
        <returns type="ICalDuration *" annotation="transfer full" comment="The newly created #ICalDuration" />
        <comment xml:space="preserve">Creates a #ICalDuration with all the fields to be zero.</comment>
    </method>
    <method name="i_cal_duration_new_bad_duration" corresponds="icaldurationtype_bad_duration" kind="constructor" since="1.0">
        <returns type="ICalDuration *" annotation="transfer full" comment="The newly created #ICalDuration" />
        <comment xml:space="preserve">Creates a bad #ICalDuration.</comment>
    </method>
    <method name="i_cal_duration_is_null_duration" corresponds="icaldurationtype_is_null_duration" kind="others" since="1.0">
        <parameter type="ICalDuration *" name="duration" comment="The #ICalDuration to be checked"/>
        <returns type="gboolean" comment="1 if @duration is the null_duration, 0 if not." />
        <comment xml:space="preserve">Checks whether the #ICalDuration is the null_duration.</comment>
    </method>
    <method name="i_cal_duration_is_bad_duration" corresponds="icaldurationtype_is_bad_duration" kind="others" since="1.0">
        <parameter type="ICalDuration *" name="duration" comment="The #ICalDuration to be checked"/>
        <returns type="gboolean" comment="1 if @duration is the bad_duration, 0 if not." />
        <comment xml:space="preserve">Checks whether the #ICalDuration is the bad_duration.</comment>
    </method>
</structure>