diff options
Diffstat (limited to 'apidocs/icalattach_8h.html')
-rw-r--r-- | apidocs/icalattach_8h.html | 392 |
1 files changed, 392 insertions, 0 deletions
diff --git a/apidocs/icalattach_8h.html b/apidocs/icalattach_8h.html new file mode 100644 index 00000000..5c612a62 --- /dev/null +++ b/apidocs/icalattach_8h.html @@ -0,0 +1,392 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.8.13"/> +<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 +  <span id="projectnumber">2.99</span> + </div> + </td> + </tr> + </tbody> +</table> +</div> +<!-- end header part --> +<!-- Generated by Doxygen 1.8.13 --> +<script type="text/javascript"> +var searchBox = new SearchBox("searchBox", "search",false,'Search'); +</script> +<script type="text/javascript" src="menudata.js"></script> +<script type="text/javascript" src="menu.js"></script> +<script type="text/javascript"> +$(function() { + initMenu('',true,false,'search.php','Search'); + $(document).ready(function() { init_search(); }); +}); +</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> | +<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> </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"> </td><td class="mdescRight">An iCal attach object representing a link to a document object. <a href="#a56d5623c8bd51231d464b50cc69a72c5">More...</a><br /></td></tr> +<tr class="separator:a56d5623c8bd51231d464b50cc69a72c5"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a5594d24dde2b625bf4bf299f7e579190"><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="icalattach_8h.html#a5594d24dde2b625bf4bf299f7e579190">icalattach_free_fn_t</a>) (unsigned char *data, void *user_data)</td></tr> +<tr class="memdesc:a5594d24dde2b625bf4bf299f7e579190"><td class="mdescLeft"> </td><td class="mdescRight">(<em>unused</em>) 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. Currently not used <a href="#a5594d24dde2b625bf4bf299f7e579190">More...</a><br /></td></tr> +<tr class="separator:a5594d24dde2b625bf4bf299f7e579190"><td class="memSeparator" colspan="2"> </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 * </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"> </td><td class="mdescRight">Returns the data of the <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="#a04b7e2f7106af21ca2cc03b9040f9487">More...</a><br /></td></tr> +<tr class="separator:a04b7e2f7106af21ca2cc03b9040f9487"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a87aa30954aa1f901d90ab816abdfebd1"><td class="memItemLeft" align="right" valign="top">int </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"> </td><td class="mdescRight">Determines if <em>attach</em> is an URL. <a href="#a87aa30954aa1f901d90ab816abdfebd1">More...</a><br /></td></tr> +<tr class="separator:a87aa30954aa1f901d90ab816abdfebd1"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ace086024b7d9e24e0052ccd7a6fc1d60"><td class="memItemLeft" align="right" valign="top">const char * </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"> </td><td class="mdescRight">Returns the URL of the <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="#ace086024b7d9e24e0052ccd7a6fc1d60">More...</a><br /></td></tr> +<tr class="separator:ace086024b7d9e24e0052ccd7a6fc1d60"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:ab6274ba5df22dde512aaa5bb07f08464"><td class="memItemLeft" align="right" valign="top"><a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5">icalattach</a> * </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#a5594d24dde2b625bf4bf299f7e579190">icalattach_free_fn_t</a> free_fn, void *free_fn_data)</td></tr> +<tr class="memdesc:ab6274ba5df22dde512aaa5bb07f08464"><td class="mdescLeft"> </td><td class="mdescRight">Create new <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object. ">icalattach</a> object from data. <a href="#ab6274ba5df22dde512aaa5bb07f08464">More...</a><br /></td></tr> +<tr class="separator:ab6274ba5df22dde512aaa5bb07f08464"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a8fd3cb99bf67d17f3f11cc7b5f78f13b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5">icalattach</a> * </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"> </td><td class="mdescRight">Create new <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object. ">icalattach</a> object from a URL. <a href="#a8fd3cb99bf67d17f3f11cc7b5f78f13b">More...</a><br /></td></tr> +<tr class="separator:a8fd3cb99bf67d17f3f11cc7b5f78f13b"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:aa442cd17e95dd605f5df40194d910002"><td class="memItemLeft" align="right" valign="top">void </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"> </td><td class="mdescRight">Increments reference count of the <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object. ">icalattach</a>. <a href="#aa442cd17e95dd605f5df40194d910002">More...</a><br /></td></tr> +<tr class="separator:aa442cd17e95dd605f5df40194d910002"><td class="memSeparator" colspan="2"> </td></tr> +<tr class="memitem:a4f9e8fe048e58d1035f82ca47e51024f"><td class="memItemLeft" align="right" valign="top">void </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"> </td><td class="mdescRight">Decrements reference count of the <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object. ">icalattach</a>. <a href="#a4f9e8fe048e58d1035f82ca47e51024f">More...</a><br /></td></tr> +<tr class="separator:a4f9e8fe048e58d1035f82ca47e51024f"><td class="memSeparator" colspan="2"> </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 <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object. ">icalattach</a> 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">◆ </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. <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object. ">icalattach</a> 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="a5594d24dde2b625bf4bf299f7e579190"></a> +<h2 class="memtitle"><span class="permalink"><a href="#a5594d24dde2b625bf4bf299f7e579190">◆ </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>(<em>unused</em>) 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. Currently not used </p> +<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="Create 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">◆ </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> * </td> + <td class="paramname"><em>attach</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>Returns the data of the <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="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 <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 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">◆ </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> * </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 <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object. ">icalattach</a> 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> +<h3>Usage</h3> +<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">"http://example.com"</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><!-- fragment --> +</div> +</div> +<a id="ace086024b7d9e24e0052ccd7a6fc1d60"></a> +<h2 class="memtitle"><span class="permalink"><a href="#ace086024b7d9e24e0052ccd7a6fc1d60">◆ </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> * </td> + <td class="paramname"><em>attach</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>Returns the URL of the <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="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 <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 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> +<h1>Usage</h1> +<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">"http://example.com"</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">"http://example.com"</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 --> +</div> +</div> +<a id="ab6274ba5df22dde512aaa5bb07f08464"></a> +<h2 class="memtitle"><span class="permalink"><a href="#ab6274ba5df22dde512aaa5bb07f08464">◆ </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 * </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#a5594d24dde2b625bf4bf299f7e579190">icalattach_free_fn_t</a> </td> + <td class="paramname"><em>free_fn</em>, </td> + </tr> + <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">void * </td> + <td class="paramname"><em>free_fn_data</em> </td> + </tr> + <tr> + <td></td> + <td>)</td> + <td></td><td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>Create new <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object. ">icalattach</a> 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 <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object. ">icalattach</a> from </td></tr> + <tr><td class="paramname">free_fn</td><td>(<em>unused</em>) The function to free the data </td></tr> + <tr><td class="paramname">free_fn_data</td><td>(<em>unused</em>) Data to pass to the <em>free_fn</em> </td></tr> + </table> + </dd> +</dl> +<dl class="section return"><dt>Returns</dt><dd>An <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object. ">icalattach</a> 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 <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object. ">icalattach</a> object is owned by the caller of the function. <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object. ">icalattach</a> 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">◆ </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 * </td> + <td class="paramname"><em>url</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>Create new <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object. ">icalattach</a> 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 <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object. ">icalattach</a> 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 <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object. ">icalattach</a> object is owned by the caller of the function. <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object. ">icalattach</a> 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> +<h3>Usage</h3> +<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">"http://example.com"</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">"http://example.com"</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 --> +</div> +</div> +<a id="aa442cd17e95dd605f5df40194d910002"></a> +<h2 class="memtitle"><span class="permalink"><a href="#aa442cd17e95dd605f5df40194d910002">◆ </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> * </td> + <td class="paramname"><em>attach</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>Increments reference count of the <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object. ">icalattach</a>. </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">◆ </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> * </td> + <td class="paramname"><em>attach</em></td><td>)</td> + <td></td> + </tr> + </table> +</div><div class="memdoc"> + +<p>Decrements reference count of the <a class="el" href="icalattach_8h.html#a56d5623c8bd51231d464b50cc69a72c5" title="An iCal attach object representing a link to a document object. ">icalattach</a>. </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> +<h3>Usage</h3> +<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">"http://example.com"</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 --> +</div> +</div> +</div><!-- contents --> +<!-- start footer part --> +<hr class="footer"/><address class="footer"><small> +Generated by  <a href="http://www.doxygen.org/index.html"> +<img class="footer" src="doxygen.png" alt="doxygen"/> +</a> 1.8.13 +</small></address> +</body> +</html> |