summaryrefslogtreecommitdiff
path: root/apidocs/icalduration_8h_source.html
blob: 11c9cb45eb41080a6ffcd70dd5562fec11e28fc1 (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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.3"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Libical API Documentation: icalduration.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Libical API Documentation<span id="projectnumber">&#160;3.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.3 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_b7a0ea939f6e83384f3c571d31a84be9.html">libical</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">icalduration.h</div></div>
</div><!--header-->
<div class="contents">
<a href="icalduration_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*======================================================================</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> FILE: icalduration.h</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> CREATOR: eric 26 Jan 2001</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"></span> </div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment"> SPDX-FileCopyrightText: 2000, Eric Busboom &lt;eric@civicknowledge.com&gt;</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment"></span> </div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment"> SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment"></span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="comment"> The Original Code is eric. The Initial Developer of the Original</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="comment"> Code is Eric Busboom</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="comment">======================================================================*/</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="preprocessor">#ifndef ICALDURATION_H</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="preprocessor">#define ICALDURATION_H</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="preprocessor">#include &quot;libical_ical_export.h&quot;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="preprocessor">#include &quot;<a class="code" href="icaltime_8h.html">icaltime.h</a>&quot;</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span> </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span><span class="keyword">struct </span><a class="code hl_struct" href="structicaldurationtype.html">icaldurationtype</a></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span>{</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span>    <span class="keywordtype">int</span> is_neg;</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span>    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> days;</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span>    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> weeks;</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span>    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> hours;</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span>    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> minutes;</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span>    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> seconds;</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span>};</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span><span class="preprocessor">#define ICALDURATIONTYPE_INITIALIZER { 0, 0, 0, 0, 0, 0 }</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span> </div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>LIBICAL_ICAL_EXPORT <span class="keyword">struct </span><a class="code hl_struct" href="structicaldurationtype.html">icaldurationtype</a> <a class="code hl_function" href="icalduration_8h.html#a88157a8ae61263ea15af92a416889301">icaldurationtype_from_int</a>(int t);</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span> </div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>LIBICAL_ICAL_EXPORT <span class="keyword">struct </span><a class="code hl_struct" href="structicaldurationtype.html">icaldurationtype</a> <a class="code hl_function" href="icalduration_8h.html#a0d6d8cc773e19242448eaffb1368fef4">icaldurationtype_from_string</a>(const char *dur);</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span>LIBICAL_ICAL_EXPORT <span class="keywordtype">int</span> <a class="code hl_function" href="icalduration_8h.html#a1828c484b9efb3cb1f08ec5eb58c7a18">icaldurationtype_as_int</a>(<span class="keyword">struct</span> <a class="code hl_struct" href="structicaldurationtype.html">icaldurationtype</a> duration);</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span> </div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span>LIBICAL_ICAL_EXPORT <span class="keywordtype">char</span> *<a class="code hl_function" href="icalduration_8h.html#adb753c6f52d493cfa9f31c2d7730ace1">icaldurationtype_as_ical_string</a>(<span class="keyword">struct</span> <a class="code hl_struct" href="structicaldurationtype.html">icaldurationtype</a> d);</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span> </div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span>LIBICAL_ICAL_EXPORT <span class="keywordtype">char</span> *<a class="code hl_function" href="icalduration_8h.html#ab87c9958f888dba23afa2249110ca137">icaldurationtype_as_ical_string_r</a>(<span class="keyword">struct</span> <a class="code hl_struct" href="structicaldurationtype.html">icaldurationtype</a> d);</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span> </div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span>LIBICAL_ICAL_EXPORT <span class="keyword">struct </span><a class="code hl_struct" href="structicaldurationtype.html">icaldurationtype</a> <a class="code hl_function" href="icalduration_8h.html#ad716774a6570e0be2eb11868deb86595">icaldurationtype_null_duration</a>(void);</div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno">  164</span> </div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno">  180</span>LIBICAL_ICAL_EXPORT <span class="keyword">struct </span><a class="code hl_struct" href="structicaldurationtype.html">icaldurationtype</a> <a class="code hl_function" href="icalduration_8h.html#a2578535a23fc5c6d4d61c09c880f03fd">icaldurationtype_bad_duration</a>(void);</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno">  181</span> </div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno">  198</span>LIBICAL_ICAL_EXPORT <span class="keywordtype">int</span> <a class="code hl_function" href="icalduration_8h.html#afcdeddc439488d8f586db0702593c270">icaldurationtype_is_null_duration</a>(<span class="keyword">struct</span> <a class="code hl_struct" href="structicaldurationtype.html">icaldurationtype</a> d);</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno">  199</span> </div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno">  216</span>LIBICAL_ICAL_EXPORT <span class="keywordtype">int</span> <a class="code hl_function" href="icalduration_8h.html#a88c5b90b57f9e1f79c00a544746687d6">icaldurationtype_is_bad_duration</a>(<span class="keyword">struct</span> <a class="code hl_struct" href="structicaldurationtype.html">icaldurationtype</a> d);</div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno">  217</span> </div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno">  237</span>LIBICAL_ICAL_EXPORT <span class="keyword">struct </span><a class="code hl_struct" href="structicaltimetype.html">icaltimetype</a> <a class="code hl_function" href="icalduration_8h.html#aacc4e7db2c4b8dd96fd428edee73acf5">icaltime_add</a>(struct <a class="code hl_struct" href="structicaltimetype.html">icaltimetype</a> t,</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno">  238</span>                                                     struct <a class="code hl_struct" href="structicaldurationtype.html">icaldurationtype</a> d);</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno">  239</span> </div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno">  257</span>LIBICAL_ICAL_EXPORT <span class="keyword">struct </span><a class="code hl_struct" href="structicaldurationtype.html">icaldurationtype</a> <a class="code hl_function" href="icalduration_8h.html#aaafcb16e5d2aaa6eb0e20fdac419fc0d">icaltime_subtract</a>(struct <a class="code hl_struct" href="structicaltimetype.html">icaltimetype</a> t1,</div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno">  258</span>                                                              struct <a class="code hl_struct" href="structicaltimetype.html">icaltimetype</a> t2);</div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno">  259</span> </div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno">  260</span><span class="preprocessor">#endif </span><span class="comment">/* !ICALDURATION_H */</span><span class="preprocessor"></span></div>
<div class="ttc" id="aicalduration_8h_html_a0d6d8cc773e19242448eaffb1368fef4"><div class="ttname"><a href="icalduration_8h.html#a0d6d8cc773e19242448eaffb1368fef4">icaldurationtype_from_string</a></div><div class="ttdeci">struct icaldurationtype icaldurationtype_from_string(const char *dur)</div><div class="ttdoc">Creates a new icaldurationtype from a duration given as a string.</div><div class="ttdef"><b>Definition:</b> icalduration.c:53</div></div>
<div class="ttc" id="aicalduration_8h_html_a1828c484b9efb3cb1f08ec5eb58c7a18"><div class="ttname"><a href="icalduration_8h.html#a1828c484b9efb3cb1f08ec5eb58c7a18">icaldurationtype_as_int</a></div><div class="ttdeci">int icaldurationtype_as_int(struct icaldurationtype duration)</div><div class="ttdoc">Converts an icaldurationtype into the duration in seconds as int.</div><div class="ttdef"><b>Definition:</b> icalduration.c:260</div></div>
<div class="ttc" id="aicalduration_8h_html_a2578535a23fc5c6d4d61c09c880f03fd"><div class="ttname"><a href="icalduration_8h.html#a2578535a23fc5c6d4d61c09c880f03fd">icaldurationtype_bad_duration</a></div><div class="ttdeci">struct icaldurationtype icaldurationtype_bad_duration(void)</div><div class="ttdoc">Creates a bad duration (used to indicate error).</div><div class="ttdef"><b>Definition:</b> icalduration.c:295</div></div>
<div class="ttc" id="aicalduration_8h_html_a88157a8ae61263ea15af92a416889301"><div class="ttname"><a href="icalduration_8h.html#a88157a8ae61263ea15af92a416889301">icaldurationtype_from_int</a></div><div class="ttdeci">struct icaldurationtype icaldurationtype_from_int(int t)</div><div class="ttdoc">Creates a new icaldurationtype from a duration in seconds.</div><div class="ttdef"><b>Definition:</b> icalduration.c:23</div></div>
<div class="ttc" id="aicalduration_8h_html_a88c5b90b57f9e1f79c00a544746687d6"><div class="ttname"><a href="icalduration_8h.html#a88c5b90b57f9e1f79c00a544746687d6">icaldurationtype_is_bad_duration</a></div><div class="ttdeci">int icaldurationtype_is_bad_duration(struct icaldurationtype d)</div><div class="ttdoc">Checks if a duration is a bad duration.</div><div class="ttdef"><b>Definition:</b> icalduration.c:304</div></div>
<div class="ttc" id="aicalduration_8h_html_aaafcb16e5d2aaa6eb0e20fdac419fc0d"><div class="ttname"><a href="icalduration_8h.html#aaafcb16e5d2aaa6eb0e20fdac419fc0d">icaltime_subtract</a></div><div class="ttdeci">struct icaldurationtype icaltime_subtract(struct icaltimetype t1, struct icaltimetype t2)</div><div class="ttdoc">Returns the difference between two icaltimetype as a duration.</div><div class="ttdef"><b>Definition:</b> icalduration.c:330</div></div>
<div class="ttc" id="aicalduration_8h_html_aacc4e7db2c4b8dd96fd428edee73acf5"><div class="ttname"><a href="icalduration_8h.html#aacc4e7db2c4b8dd96fd428edee73acf5">icaltime_add</a></div><div class="ttdeci">struct icaltimetype icaltime_add(struct icaltimetype t, struct icaldurationtype d)</div><div class="ttdoc">Adds a duration to an icaltime object and returns the result.</div><div class="ttdef"><b>Definition:</b> icalduration.c:309</div></div>
<div class="ttc" id="aicalduration_8h_html_ab87c9958f888dba23afa2249110ca137"><div class="ttname"><a href="icalduration_8h.html#ab87c9958f888dba23afa2249110ca137">icaldurationtype_as_ical_string_r</a></div><div class="ttdeci">char * icaldurationtype_as_ical_string_r(struct icaldurationtype d)</div><div class="ttdef"><b>Definition:</b> icalduration.c:211</div></div>
<div class="ttc" id="aicalduration_8h_html_ad716774a6570e0be2eb11868deb86595"><div class="ttname"><a href="icalduration_8h.html#ad716774a6570e0be2eb11868deb86595">icaldurationtype_null_duration</a></div><div class="ttdeci">struct icaldurationtype icaldurationtype_null_duration(void)</div><div class="ttdoc">Creates a duration with zero length.</div><div class="ttdef"><b>Definition:</b> icalduration.c:270</div></div>
<div class="ttc" id="aicalduration_8h_html_adb753c6f52d493cfa9f31c2d7730ace1"><div class="ttname"><a href="icalduration_8h.html#adb753c6f52d493cfa9f31c2d7730ace1">icaldurationtype_as_ical_string</a></div><div class="ttdeci">char * icaldurationtype_as_ical_string(struct icaldurationtype d)</div><div class="ttdef"><b>Definition:</b> icalduration.c:202</div></div>
<div class="ttc" id="aicalduration_8h_html_afcdeddc439488d8f586db0702593c270"><div class="ttname"><a href="icalduration_8h.html#afcdeddc439488d8f586db0702593c270">icaldurationtype_is_null_duration</a></div><div class="ttdeci">int icaldurationtype_is_null_duration(struct icaldurationtype d)</div><div class="ttdoc">Checks if a duration is a null duration.</div><div class="ttdef"><b>Definition:</b> icalduration.c:279</div></div>
<div class="ttc" id="aicaltime_8h_html"><div class="ttname"><a href="icaltime_8h.html">icaltime.h</a></div><div class="ttdoc">struct icaltimetype is a pseudo-object that abstracts time handling.</div></div>
<div class="ttc" id="astructicaldurationtype_html"><div class="ttname"><a href="structicaldurationtype.html">icaldurationtype</a></div><div class="ttdoc">A struct representing a duration.</div><div class="ttdef"><b>Definition:</b> ical.h:492</div></div>
<div class="ttc" id="astructicaltimetype_html"><div class="ttname"><a href="structicaltimetype.html">icaltimetype</a></div><div class="ttdef"><b>Definition:</b> ical.h:141</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Jun 18 2022 10:19:40 for Libical API Documentation by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3
</small></address>
</body>
</html>