summaryrefslogtreecommitdiff
path: root/src/libical-glib/api/i-cal-time-span.xml
blob: 3576b0ef0dc1534e4316c89cd647c336d2347e9b (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
<!--
  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="TimeSpan" native="struct icaltime_span" is_bare="true" default_native="icaltime_span_new(icaltime_null_time(), icaltime_null_time(), 0)" includes="libical-glib/i-cal-time.h">
    <method name="i_cal_time_span_new_timet" corresponds="CUSTOM" kind="constructor" since="3.0.5">
        <parameter type="time_t" name="start" comment="Start of the time span"/>
        <parameter type="time_t" name="end" comment="End of the time span"/>
        <parameter type="gboolean" name="is_busy" comment="Whether the time span is busy"/>
        <returns type="ICalTimeSpan *" annotation="transfer full" comment="The newly created #ICalTimeSpan." />
        <comment xml:space="preserve">Creates a new #ICalTimeSpan. Free it with g_object_unref(), when no longer needed.</comment>
        <custom>    struct icaltime_span span;
    span.start = start;
    span.end = end;
    span.is_busy = is_busy ? 1 : 0;
    return i_cal_time_span_new_full(span);</custom>
    </method>
    <method name="i_cal_time_span_clone" corresponds="CUSTOM" kind="constructor" since="3.0.5">
        <parameter type="const ICalTimeSpan *" name="src" comment="A time span to clone"/>
        <returns type="ICalTimeSpan *" annotation="transfer full" comment="The newly created #ICalTimeSpan, clone of @src." />
        <comment xml:space="preserve">Creates a new #ICalTimeSpan, clone of @src. Free it with g_object_unref(), when no longer needed.</comment>
        <custom>    struct icaltime_span *span;
    g_return_val_if_fail(I_CAL_IS_TIME_SPAN(src), NULL);
    span = ((struct icaltime_span *)i_cal_object_get_native ((ICalObject *)src));
    g_return_val_if_fail (span != NULL, NULL);
    return i_cal_time_span_new_full(*span);</custom>
    </method>
    <method name="i_cal_time_span_get_start" corresponds="CUSTOM" kind="get" since="1.0">
        <parameter type="ICalTimeSpan *" name="timespan" comment="The #ICalTimeSpan to be queried"/>
        <returns type="time_t" comment="The start." />
        <comment xml:space="preserve">Gets the start of #ICalTimeSpan.</comment>
        <custom>	g_return_val_if_fail (timespan != NULL, 0);
	return ((struct icaltime_span *)i_cal_object_get_native ((ICalObject *)timespan))->start;</custom>
    </method>
    <method name="i_cal_time_span_set_start" corresponds="CUSTOM" kind="set" since="1.0">
        <parameter type="ICalTimeSpan *" name="timespan" comment="The #ICalTimeSpan to be set"/>
        <parameter type="time_t" name="start" comment="The start" />
        <comment xml:space="preserve">Sets the start of #ICalTimeSpan.</comment>
        <custom>	g_return_if_fail (timespan != NULL);
	((struct icaltime_span *)i_cal_object_get_native ((ICalObject *)timespan))->start = start;</custom>
    </method>
    <method name="i_cal_time_span_get_end" corresponds="CUSTOM" kind="get" since="1.0">
        <parameter type="ICalTimeSpan *" name="timespan" comment="The #ICalTimeSpan to be queried"/>
        <returns type="time_t" comment="The end." />
        <comment xml:space="preserve">Gets the end of #ICalTimeSpan.</comment>
        <custom>	g_return_val_if_fail (timespan != NULL, 0);
	return ((struct icaltime_span *)i_cal_object_get_native ((ICalObject *)timespan))->end;</custom>
    </method>
    <method name="i_cal_time_span_set_end" corresponds="CUSTOM" kind="set" since="1.0">
        <parameter type="ICalTimeSpan *" name="timespan" comment="The #ICalTimeSpan to be set"/>
        <parameter type="time_t" name="end" comment="The end" />
        <comment xml:space="preserve">Sets the end of #ICalTimeSpan.</comment>
        <custom>	g_return_if_fail (timespan != NULL);
	((struct icaltime_span *)i_cal_object_get_native ((ICalObject *)timespan))->end = end;</custom>
    </method>
    <method name="i_cal_time_span_get_is_busy" corresponds="CUSTOM" kind="get" since="1.0">
        <parameter type="ICalTimeSpan *" name="timespan" comment="The #ICalTimeSpan to be queried"/>
        <returns type="gboolean" comment="The is_busy." />
        <comment xml:space="preserve">Gets the is_busy of #ICalTimeSpan.</comment>
        <custom>	g_return_val_if_fail (timespan != NULL, FALSE);
	return ((struct icaltime_span *)i_cal_object_get_native ((ICalObject *)timespan))->is_busy != 0;</custom>
    </method>
    <method name="i_cal_time_span_set_is_busy" corresponds="CUSTOM" kind="set" since="1.0">
        <parameter type="ICalTimeSpan *" name="timespan" comment="The #ICalTimeSpan to be set"/>
        <parameter type="gboolean" name="is_busy" comment="The is_busy" />
        <comment xml:space="preserve">Sets the is_busy of #ICalTimeSpan.</comment>
        <custom>	g_return_if_fail (timespan != NULL);
	((struct icaltime_span *)i_cal_object_get_native ((ICalObject *)timespan))->is_busy = is_busy ? 1 : 0;</custom>
    </method>
</structure>