summaryrefslogtreecommitdiff
path: root/apidocs/icalattach_8h.html
blob: 9e44aa65872517fe693e2b20b51af7479dfb36ee (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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
<!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=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Libical API Documentation: icalattach.h File Reference</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 style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Libical API Documentation
   &#160;<span id="projectnumber">3.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'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:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(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="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">icalattach.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A set of functions to handle iCal attachments.  
<a href="#details">More...</a></p>

<p><a href="icalattach_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a56d5623c8bd51231d464b50cc69a72c5"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structicalattach__impl.html">icalattach_impl</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5">icalattach</a></td></tr>
<tr class="memdesc:a56d5623c8bd51231d464b50cc69a72c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">An iCal attach object representing a link to a document object.  <a href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5">More...</a><br /></td></tr>
<tr class="separator:a56d5623c8bd51231d464b50cc69a72c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a331647f68081555d5dad37e6ebb96f41"><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="icalattach_8h.html#a331647f68081555d5dad37e6ebb96f41">icalattach_free_fn_t</a>) (char *data, void *user_data)</td></tr>
<tr class="memdesc:a331647f68081555d5dad37e6ebb96f41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to be called to free the data of an <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object.">icalattach</a> object.  <a href="icalattach_8h.html#a331647f68081555d5dad37e6ebb96f41">More...</a><br /></td></tr>
<tr class="separator:a331647f68081555d5dad37e6ebb96f41"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a04b7e2f7106af21ca2cc03b9040f9487"><td class="memItemLeft" align="right" valign="top">unsigned char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="icalattach_8h.html#a04b7e2f7106af21ca2cc03b9040f9487">icalattach_get_data</a> (<a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5">icalattach</a> *attach)</td></tr>
<tr class="memdesc:a04b7e2f7106af21ca2cc03b9040f9487"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the data of the icalattach object.  <a href="icalattach_8h.html#a04b7e2f7106af21ca2cc03b9040f9487">More...</a><br /></td></tr>
<tr class="separator:a04b7e2f7106af21ca2cc03b9040f9487"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87aa30954aa1f901d90ab816abdfebd1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="icalattach_8h.html#a87aa30954aa1f901d90ab816abdfebd1">icalattach_get_is_url</a> (<a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5">icalattach</a> *attach)</td></tr>
<tr class="memdesc:a87aa30954aa1f901d90ab816abdfebd1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines if <em>attach</em> is an URL.  <a href="icalattach_8h.html#a87aa30954aa1f901d90ab816abdfebd1">More...</a><br /></td></tr>
<tr class="separator:a87aa30954aa1f901d90ab816abdfebd1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace086024b7d9e24e0052ccd7a6fc1d60"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="icalattach_8h.html#ace086024b7d9e24e0052ccd7a6fc1d60">icalattach_get_url</a> (<a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5">icalattach</a> *attach)</td></tr>
<tr class="memdesc:ace086024b7d9e24e0052ccd7a6fc1d60"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the URL of the icalattach object.  <a href="icalattach_8h.html#ace086024b7d9e24e0052ccd7a6fc1d60">More...</a><br /></td></tr>
<tr class="separator:ace086024b7d9e24e0052ccd7a6fc1d60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6274ba5df22dde512aaa5bb07f08464"><td class="memItemLeft" align="right" valign="top"><a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5">icalattach</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="icalattach_8h.html#ab6274ba5df22dde512aaa5bb07f08464">icalattach_new_from_data</a> (const char *data, <a class="el" href="icalattach_8h.html#a331647f68081555d5dad37e6ebb96f41">icalattach_free_fn_t</a> free_fn, void *free_fn_data)</td></tr>
<tr class="memdesc:ab6274ba5df22dde512aaa5bb07f08464"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates new icalattach object from data.  <a href="icalattach_8h.html#ab6274ba5df22dde512aaa5bb07f08464">More...</a><br /></td></tr>
<tr class="separator:ab6274ba5df22dde512aaa5bb07f08464"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fd3cb99bf67d17f3f11cc7b5f78f13b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5">icalattach</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="icalattach_8h.html#a8fd3cb99bf67d17f3f11cc7b5f78f13b">icalattach_new_from_url</a> (const char *url)</td></tr>
<tr class="memdesc:a8fd3cb99bf67d17f3f11cc7b5f78f13b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates new icalattach object from a URL.  <a href="icalattach_8h.html#a8fd3cb99bf67d17f3f11cc7b5f78f13b">More...</a><br /></td></tr>
<tr class="separator:a8fd3cb99bf67d17f3f11cc7b5f78f13b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa442cd17e95dd605f5df40194d910002"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="icalattach_8h.html#aa442cd17e95dd605f5df40194d910002">icalattach_ref</a> (<a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5">icalattach</a> *attach)</td></tr>
<tr class="memdesc:aa442cd17e95dd605f5df40194d910002"><td class="mdescLeft">&#160;</td><td class="mdescRight">Increments reference count of the icalattach.  <a href="icalattach_8h.html#aa442cd17e95dd605f5df40194d910002">More...</a><br /></td></tr>
<tr class="separator:aa442cd17e95dd605f5df40194d910002"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f9e8fe048e58d1035f82ca47e51024f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="icalattach_8h.html#a4f9e8fe048e58d1035f82ca47e51024f">icalattach_unref</a> (<a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5">icalattach</a> *attach)</td></tr>
<tr class="memdesc:a4f9e8fe048e58d1035f82ca47e51024f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decrements reference count of the icalattach.  <a href="icalattach_8h.html#a4f9e8fe048e58d1035f82ca47e51024f">More...</a><br /></td></tr>
<tr class="separator:a4f9e8fe048e58d1035f82ca47e51024f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A set of functions to handle iCal attachments. </p>
<p>With the <code>ATTACH</code> property, the iCal standard defines a way to associate a document object with a calendar component.</p>
<p>These are represented with icalattach objects in libical. This file contains functions to create and work with these objects. </p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a id="a56d5623c8bd51231d464b50cc69a72c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a56d5623c8bd51231d464b50cc69a72c5">&#9670;&nbsp;</a></span>icalattach</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5">icalattach</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>An iCal attach object representing a link to a document object. </p>
<p>Represents an association with a document object. icalattach objects are reference counted, meaning that if the last reference to them is removed (with <a class="el" href="icalattach_8h.html#a4f9e8fe048e58d1035f82ca47e51024f" title="Decrements reference count of the icalattach.">icalattach_unref()</a>), they are destroyed. </p>

</div>
</div>
<a id="a331647f68081555d5dad37e6ebb96f41"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a331647f68081555d5dad37e6ebb96f41">&#9670;&nbsp;</a></span>icalattach_free_fn_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">icalattach_free_fn_t</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Function to be called to free the data of an <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object.">icalattach</a> object. </p>
<dl class="section warning"><dt>Warning</dt><dd>Currently not used</dd></dl>
<p>This function type is used to free the data from an <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object.">icalattach</a> object created with <a class="el" href="icalattach_8h.html#ab6274ba5df22dde512aaa5bb07f08464" title="Creates new icalattach object from data.">icalattach_new_from_data()</a>. It is currently not used </p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a04b7e2f7106af21ca2cc03b9040f9487"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a04b7e2f7106af21ca2cc03b9040f9487">&#9670;&nbsp;</a></span>icalattach_get_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned char* icalattach_get_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5">icalattach</a> *&#160;</td>
          <td class="paramname"><em>attach</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the data of the icalattach object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">attach</td><td>The object from which to return the data </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The data of the object </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="icalattach_8h.html#a87aa30954aa1f901d90ab816abdfebd1" title="Determines if attach is an URL.">icalattach_get_is_url()</a></dd></dl>
<p>Returns the URL of the icalattach object.</p>
<dl class="section user"><dt>Error handling</dt><dd>Returns <code>NULL</code> and set <a class="el" href="icalerror_8h.html#ad2562706150f5c5a4d9b0ca149d78e37" title="Access the current icalerrno value.">icalerrno</a> to <a class="el" href="icalerror_8h.html#a601c122fcea522513b1b7732fa23e833a2cc8bbcd8c07fc9a16e36f7aae5757b1">ICAL_BADARG_ERROR</a> if <em>attach</em> is <code>NULL</code>. Undefined behaviour if the object is a URL (check with <a class="el" href="icalattach_8h.html#a87aa30954aa1f901d90ab816abdfebd1" title="Determines if attach is an URL.">icalattach_get_is_url()</a>).</dd></dl>
<dl class="section user"><dt>Ownership</dt><dd>The string returned is owned by libical and must not be freed by the caller. </dd></dl>

</div>
</div>
<a id="a87aa30954aa1f901d90ab816abdfebd1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a87aa30954aa1f901d90ab816abdfebd1">&#9670;&nbsp;</a></span>icalattach_get_is_url()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int icalattach_get_is_url </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5">icalattach</a> *&#160;</td>
          <td class="paramname"><em>attach</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Determines if <em>attach</em> is an URL. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">attach</td><td>the icalattach object to check </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if it is a URL, otherwise 0. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="icalattach_8h.html#ace086024b7d9e24e0052ccd7a6fc1d60" title="Returns the URL of the icalattach object.">icalattach_get_url()</a></dd></dl>
<dl class="section user"><dt>Error handling</dt><dd>Returns <code>NULL</code> and sets <a class="el" href="icalerror_8h.html#ad2562706150f5c5a4d9b0ca149d78e37" title="Access the current icalerrno value.">icalerrno</a> to <a class="el" href="icalerror_8h.html#a601c122fcea522513b1b7732fa23e833a2cc8bbcd8c07fc9a16e36f7aae5757b1">ICAL_BADARG_ERROR</a> if <em>attach</em> is <code>NULL</code>.</dd></dl>
<dl class="section user"><dt>Usage</dt><dd><div class="fragment"><div class="line"><span class="comment">// creates new</span></div>
<div class="line"><a class="code" href="structicalattach__impl.html">icalattach</a> *attach = <a class="code" href="icalattach_8h.html#a8fd3cb99bf67d17f3f11cc7b5f78f13b">icalattach_new_from_url</a>(<span class="stringliteral">&quot;http://example.com&quot;</span>);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// checks if it is a URL</span></div>
<div class="line">assert(<a class="code" href="icalattach_8h.html#a87aa30954aa1f901d90ab816abdfebd1">icalattach_get_is_url</a>(attach));</div>
<div class="line"> </div>
<div class="line"><span class="comment">// release it</span></div>
<div class="line"><a class="code" href="icalattach_8h.html#a4f9e8fe048e58d1035f82ca47e51024f">icalattach_unref</a>(attach);</div>
<div class="ttc" id="aicalattach_8h_html_a4f9e8fe048e58d1035f82ca47e51024f"><div class="ttname"><a href="icalattach_8h.html#a4f9e8fe048e58d1035f82ca47e51024f">icalattach_unref</a></div><div class="ttdeci">void icalattach_unref(icalattach *attach)</div><div class="ttdoc">Decrements reference count of the icalattach.</div><div class="ttdef"><b>Definition:</b> icalattach.c:99</div></div>
<div class="ttc" id="aicalattach_8h_html_a87aa30954aa1f901d90ab816abdfebd1"><div class="ttname"><a href="icalattach_8h.html#a87aa30954aa1f901d90ab816abdfebd1">icalattach_get_is_url</a></div><div class="ttdeci">int icalattach_get_is_url(icalattach *attach)</div><div class="ttdoc">Determines if attach is an URL.</div><div class="ttdef"><b>Definition:</b> icalattach.c:118</div></div>
<div class="ttc" id="aicalattach_8h_html_a8fd3cb99bf67d17f3f11cc7b5f78f13b"><div class="ttname"><a href="icalattach_8h.html#a8fd3cb99bf67d17f3f11cc7b5f78f13b">icalattach_new_from_url</a></div><div class="ttdeci">icalattach * icalattach_new_from_url(const char *url)</div><div class="ttdoc">Creates new icalattach object from a URL.</div><div class="ttdef"><b>Definition:</b> icalattach.c:29</div></div>
<div class="ttc" id="astructicalattach__impl_html"><div class="ttname"><a href="structicalattach__impl.html">icalattach_impl</a></div><div class="ttdef"><b>Definition:</b> icalattachimpl.h:26</div></div>
</div><!-- fragment --> </dd></dl>

</div>
</div>
<a id="ace086024b7d9e24e0052ccd7a6fc1d60"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ace086024b7d9e24e0052ccd7a6fc1d60">&#9670;&nbsp;</a></span>icalattach_get_url()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* icalattach_get_url </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5">icalattach</a> *&#160;</td>
          <td class="paramname"><em>attach</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the URL of the icalattach object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">attach</td><td>The object from which to return the URL </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The URL of the object </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="icalattach_8h.html#a87aa30954aa1f901d90ab816abdfebd1" title="Determines if attach is an URL.">icalattach_get_is_url()</a></dd></dl>
<p>Returns the URL of the icalattach object.</p>
<dl class="section user"><dt>Error handling</dt><dd>Returns <code>NULL</code> and set <a class="el" href="icalerror_8h.html#ad2562706150f5c5a4d9b0ca149d78e37" title="Access the current icalerrno value.">icalerrno</a> to <a class="el" href="icalerror_8h.html#a601c122fcea522513b1b7732fa23e833a2cc8bbcd8c07fc9a16e36f7aae5757b1">ICAL_BADARG_ERROR</a> if <em>attach</em> is <code>NULL</code>. Undefined behaviour if the object is not a URL (check with <a class="el" href="icalattach_8h.html#a87aa30954aa1f901d90ab816abdfebd1" title="Determines if attach is an URL.">icalattach_get_is_url()</a>).</dd></dl>
<dl class="section user"><dt>Ownership</dt><dd>The string returned is owned by libical and must not be freed by the caller.</dd></dl>
<dl class="section user"><dt>Usage</dt><dd><div class="fragment"><div class="line"><span class="comment">// creates new</span></div>
<div class="line"><a class="code" href="structicalattach__impl.html">icalattach</a> *attach = <a class="code" href="icalattach_8h.html#a8fd3cb99bf67d17f3f11cc7b5f78f13b">icalattach_new_from_url</a>(<span class="stringliteral">&quot;http://example.com&quot;</span>);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// checks it</span></div>
<div class="line">assert(<a class="code" href="icalattach_8h.html#a87aa30954aa1f901d90ab816abdfebd1">icalattach_get_is_url</a>(attach));</div>
<div class="line">assert(0 == strcmp(<a class="code" href="icalattach_8h.html#ace086024b7d9e24e0052ccd7a6fc1d60">icalattach_get_url</a>(attach), <span class="stringliteral">&quot;http://example.com&quot;</span>));</div>
<div class="line"> </div>
<div class="line"><span class="comment">// release it</span></div>
<div class="line"><a class="code" href="icalattach_8h.html#a4f9e8fe048e58d1035f82ca47e51024f">icalattach_unref</a>(attach);</div>
<div class="ttc" id="aicalattach_8h_html_ace086024b7d9e24e0052ccd7a6fc1d60"><div class="ttname"><a href="icalattach_8h.html#ace086024b7d9e24e0052ccd7a6fc1d60">icalattach_get_url</a></div><div class="ttdeci">const char * icalattach_get_url(icalattach *attach)</div><div class="ttdoc">Returns the URL of the icalattach object.</div><div class="ttdef"><b>Definition:</b> icalattach.c:125</div></div>
</div><!-- fragment --> </dd></dl>

</div>
</div>
<a id="ab6274ba5df22dde512aaa5bb07f08464"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab6274ba5df22dde512aaa5bb07f08464">&#9670;&nbsp;</a></span>icalattach_new_from_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5">icalattach</a>* icalattach_new_from_data </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="icalattach_8h.html#a331647f68081555d5dad37e6ebb96f41">icalattach_free_fn_t</a>&#160;</td>
          <td class="paramname"><em>free_fn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>free_fn_data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates new icalattach object from data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>The data to create the icalattach from </td></tr>
    <tr><td class="paramname">free_fn</td><td>The function to free the data </td></tr>
    <tr><td class="paramname">free_fn_data</td><td>Data to pass to the <em>free_fn</em> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An icalattach object with the given data </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="icalattach_8h.html#a4f9e8fe048e58d1035f82ca47e51024f" title="Decrements reference count of the icalattach.">icalattach_unref()</a></dd></dl>
<dl class="section user"><dt>Error handling</dt><dd>If <em>url</em> is <code>NULL</code>, it returns <code>NULL</code> and sets <a class="el" href="icalerror_8h.html#ad2562706150f5c5a4d9b0ca149d78e37" title="Access the current icalerrno value.">icalerrno</a> to <a class="el" href="icalerror_8h.html#a601c122fcea522513b1b7732fa23e833a2cc8bbcd8c07fc9a16e36f7aae5757b1">ICAL_BADARG_ERROR</a>. If there was an error allocating memory, it returns <code>NULL</code> and sets <code>errno</code> to <code>ENOMEM</code>.</dd></dl>
<dl class="section user"><dt>Ownership</dt><dd>The returned icalattach object is owned by the caller of the function. icalattach objects are reference counted, which means that after use, <a class="el" href="icalattach_8h.html#a4f9e8fe048e58d1035f82ca47e51024f" title="Decrements reference count of the icalattach.">icalattach_unref()</a> needs to be called to signal that they are not used anymore. </dd></dl>

</div>
</div>
<a id="a8fd3cb99bf67d17f3f11cc7b5f78f13b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8fd3cb99bf67d17f3f11cc7b5f78f13b">&#9670;&nbsp;</a></span>icalattach_new_from_url()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5">icalattach</a>* icalattach_new_from_url </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>url</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates new icalattach object from a URL. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>The URL to create the object from </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An icalattach object with the given URL as association </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="icalattach_8h.html#a4f9e8fe048e58d1035f82ca47e51024f" title="Decrements reference count of the icalattach.">icalattach_unref()</a></dd></dl>
<dl class="section user"><dt>Error handling</dt><dd>If <em>url</em> is <code>NULL</code>, it returns <code>NULL</code> and sets <a class="el" href="icalerror_8h.html#ad2562706150f5c5a4d9b0ca149d78e37" title="Access the current icalerrno value.">icalerrno</a> to <a class="el" href="icalerror_8h.html#a601c122fcea522513b1b7732fa23e833a2cc8bbcd8c07fc9a16e36f7aae5757b1">ICAL_BADARG_ERROR</a>. If there was an error allocating memory, it returns <code>NULL</code> and sets <code>errno</code> to <code>ENOMEM</code>.</dd></dl>
<dl class="section user"><dt>Ownership</dt><dd>The returned icalattach object is owned by the caller of the function. icalattach objects are reference counted, which means that after use, <a class="el" href="icalattach_8h.html#a4f9e8fe048e58d1035f82ca47e51024f" title="Decrements reference count of the icalattach.">icalattach_unref()</a> needs to be called to signal that they are not used anymore.</dd></dl>
<dl class="section user"><dt>Usage</dt><dd><div class="fragment"><div class="line"><span class="comment">// creates new</span></div>
<div class="line"><a class="code" href="structicalattach__impl.html">icalattach</a> *attach = <a class="code" href="icalattach_8h.html#a8fd3cb99bf67d17f3f11cc7b5f78f13b">icalattach_new_from_url</a>(<span class="stringliteral">&quot;http://example.com&quot;</span>);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// checks it</span></div>
<div class="line">assert(<a class="code" href="icalattach_8h.html#a87aa30954aa1f901d90ab816abdfebd1">icalattach_get_is_url</a>(attach));</div>
<div class="line">assert(0 == strcmp(<a class="code" href="icalattach_8h.html#ace086024b7d9e24e0052ccd7a6fc1d60">icalattach_get_url</a>(attach), <span class="stringliteral">&quot;http://example.com&quot;</span>));</div>
<div class="line"> </div>
<div class="line"><span class="comment">// release it</span></div>
<div class="line"><a class="code" href="icalattach_8h.html#a4f9e8fe048e58d1035f82ca47e51024f">icalattach_unref</a>(attach);</div>
</div><!-- fragment --> </dd></dl>

</div>
</div>
<a id="aa442cd17e95dd605f5df40194d910002"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa442cd17e95dd605f5df40194d910002">&#9670;&nbsp;</a></span>icalattach_ref()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void icalattach_ref </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5">icalattach</a> *&#160;</td>
          <td class="paramname"><em>attach</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Increments reference count of the icalattach. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">attach</td><td>The object to increase the reference count of </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="icalattach_8h.html#a4f9e8fe048e58d1035f82ca47e51024f" title="Decrements reference count of the icalattach.">icalattach_unref()</a></dd></dl>
<dl class="section user"><dt>Error handling</dt><dd>If <em>attach</em> is <code>NULL</code>, or the reference count is smaller than 0, it sets <a class="el" href="icalerror_8h.html#ad2562706150f5c5a4d9b0ca149d78e37" title="Access the current icalerrno value.">icalerrno</a> to <a class="el" href="icalerror_8h.html#a601c122fcea522513b1b7732fa23e833a2cc8bbcd8c07fc9a16e36f7aae5757b1">ICAL_BADARG_ERROR</a>.</dd></dl>
<dl class="section user"><dt>Ownership</dt><dd>By increasing the refcount of <em>attach</em>, you are signaling that you are using it, and it is the owner's responsibility to call <a class="el" href="icalattach_8h.html#a4f9e8fe048e58d1035f82ca47e51024f" title="Decrements reference count of the icalattach.">icalattach_unref()</a> after it's no longer used. </dd></dl>

</div>
</div>
<a id="a4f9e8fe048e58d1035f82ca47e51024f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f9e8fe048e58d1035f82ca47e51024f">&#9670;&nbsp;</a></span>icalattach_unref()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void icalattach_unref </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5">icalattach</a> *&#160;</td>
          <td class="paramname"><em>attach</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Decrements reference count of the icalattach. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">attach</td><td>The object to decrease the reference count of </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="icalattach_8h.html#aa442cd17e95dd605f5df40194d910002" title="Increments reference count of the icalattach.">icalattach_ref()</a></dd></dl>
<p>Decreases the reference count of <em>attach</em>. If this was the last user of the object, it is freed.</p>
<dl class="section user"><dt>Error handling</dt><dd>If <em>attach</em> is <code>NULL</code>, or the reference count is smaller than 0, it sets <a class="el" href="icalerror_8h.html#ad2562706150f5c5a4d9b0ca149d78e37" title="Access the current icalerrno value.">icalerrno</a> to <a class="el" href="icalerror_8h.html#a601c122fcea522513b1b7732fa23e833a2cc8bbcd8c07fc9a16e36f7aae5757b1">ICAL_BADARG_ERROR</a>.</dd></dl>
<dl class="section user"><dt>Ownership</dt><dd>Calling this function releases the icalattach back to the library, and it must not be used afterwards.</dd></dl>
<dl class="section user"><dt>Usage</dt><dd><div class="fragment"><div class="line"><span class="comment">// creates new</span></div>
<div class="line"><a class="code" href="structicalattach__impl.html">icalattach</a> *attach = <a class="code" href="icalattach_8h.html#a8fd3cb99bf67d17f3f11cc7b5f78f13b">icalattach_new_from_url</a>(<span class="stringliteral">&quot;http://example.com&quot;</span>);</div>
<div class="line"> </div>
<div class="line"><span class="comment">// release it</span></div>
<div class="line"><a class="code" href="icalattach_8h.html#a4f9e8fe048e58d1035f82ca47e51024f">icalattach_unref</a>(attach);</div>
</div><!-- fragment --> </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Oct 6 2022 14:47:01 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.1
</small></address>
</body>
</html>