<!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.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libcbor: src/cbor/serialization.c 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" />
<link href="customdoxygen.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">libcbor
 <span id="projectnumber">0.5.0</span>
</div>
<div id="projectbrief">libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<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_cb565ba51d82ea933604984cbab6233d.html">cbor</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">serialization.c File Reference</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include "<a class="el" href="serialization_8h_source.html">serialization.h</a>"</code><br />
<code>#include "<a class="el" href="encoding_8h_source.html">encoding.h</a>"</code><br />
<code>#include "<a class="el" href="arrays_8h_source.html">cbor/arrays.h</a>"</code><br />
<code>#include "<a class="el" href="bytestrings_8h_source.html">cbor/bytestrings.h</a>"</code><br />
<code>#include "<a class="el" href="floats__ctrls_8h_source.html">cbor/floats_ctrls.h</a>"</code><br />
<code>#include "<a class="el" href="ints_8h_source.html">cbor/ints.h</a>"</code><br />
<code>#include "<a class="el" href="maps_8h_source.html">cbor/maps.h</a>"</code><br />
<code>#include "<a class="el" href="strings_8h_source.html">cbor/strings.h</a>"</code><br />
<code>#include "<a class="el" href="tags_8h_source.html">cbor/tags.h</a>"</code><br />
<code>#include "<a class="el" href="memory__utils_8h_source.html">internal/memory_utils.h</a>"</code><br />
<code>#include <string.h></code><br />
</div>
<p><a href="serialization_8c_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="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a56d372b02323e8df3a37eba69acafd31"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="serialization_8c.html#a56d372b02323e8df3a37eba69acafd31">cbor_serialize</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item, unsigned char *buffer, size_t buffer_size)</td></tr>
<tr class="memdesc:a56d372b02323e8df3a37eba69acafd31"><td class="mdescLeft"> </td><td class="mdescRight">Serialize the given item. <a href="#a56d372b02323e8df3a37eba69acafd31">More...</a><br /></td></tr>
<tr class="separator:a56d372b02323e8df3a37eba69acafd31"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae995c0fac946cf851f4b37899a2e59e7"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="serialization_8c.html#ae995c0fac946cf851f4b37899a2e59e7">cbor_serialize_alloc</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item, unsigned char **buffer, size_t *buffer_size)</td></tr>
<tr class="memdesc:ae995c0fac946cf851f4b37899a2e59e7"><td class="mdescLeft"> </td><td class="mdescRight">Serialize the given item, allocating buffers as needed. <a href="#ae995c0fac946cf851f4b37899a2e59e7">More...</a><br /></td></tr>
<tr class="separator:ae995c0fac946cf851f4b37899a2e59e7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad0411e741dcb5352b9bc4198f0f18fbe"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="serialization_8c.html#ad0411e741dcb5352b9bc4198f0f18fbe">cbor_serialize_uint</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item, unsigned char *buffer, size_t buffer_size)</td></tr>
<tr class="memdesc:ad0411e741dcb5352b9bc4198f0f18fbe"><td class="mdescLeft"> </td><td class="mdescRight">Serialize an uint. <a href="#ad0411e741dcb5352b9bc4198f0f18fbe">More...</a><br /></td></tr>
<tr class="separator:ad0411e741dcb5352b9bc4198f0f18fbe"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6f00ef0ca5354471214894c2e21ff19b"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="serialization_8c.html#a6f00ef0ca5354471214894c2e21ff19b">cbor_serialize_negint</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item, unsigned char *buffer, size_t buffer_size)</td></tr>
<tr class="memdesc:a6f00ef0ca5354471214894c2e21ff19b"><td class="mdescLeft"> </td><td class="mdescRight">Serialize a negint. <a href="#a6f00ef0ca5354471214894c2e21ff19b">More...</a><br /></td></tr>
<tr class="separator:a6f00ef0ca5354471214894c2e21ff19b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab4d54170870c473fe361d91740751487"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="serialization_8c.html#ab4d54170870c473fe361d91740751487">cbor_serialize_bytestring</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item, unsigned char *buffer, size_t buffer_size)</td></tr>
<tr class="memdesc:ab4d54170870c473fe361d91740751487"><td class="mdescLeft"> </td><td class="mdescRight">Serialize a bytestring. <a href="#ab4d54170870c473fe361d91740751487">More...</a><br /></td></tr>
<tr class="separator:ab4d54170870c473fe361d91740751487"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a23ba67d9759dc522924ff8ee6297babd"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="serialization_8c.html#a23ba67d9759dc522924ff8ee6297babd">cbor_serialize_string</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item, unsigned char *buffer, size_t buffer_size)</td></tr>
<tr class="memdesc:a23ba67d9759dc522924ff8ee6297babd"><td class="mdescLeft"> </td><td class="mdescRight">Serialize a string. <a href="#a23ba67d9759dc522924ff8ee6297babd">More...</a><br /></td></tr>
<tr class="separator:a23ba67d9759dc522924ff8ee6297babd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac8cc5befd865dd3a48ccd19730000bb3"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="serialization_8c.html#ac8cc5befd865dd3a48ccd19730000bb3">cbor_serialize_array</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item, unsigned char *buffer, size_t buffer_size)</td></tr>
<tr class="memdesc:ac8cc5befd865dd3a48ccd19730000bb3"><td class="mdescLeft"> </td><td class="mdescRight">Serialize an array. <a href="#ac8cc5befd865dd3a48ccd19730000bb3">More...</a><br /></td></tr>
<tr class="separator:ac8cc5befd865dd3a48ccd19730000bb3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad6b755769880739cf33e6bd5e5ba0733"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="serialization_8c.html#ad6b755769880739cf33e6bd5e5ba0733">cbor_serialize_map</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item, unsigned char *buffer, size_t buffer_size)</td></tr>
<tr class="memdesc:ad6b755769880739cf33e6bd5e5ba0733"><td class="mdescLeft"> </td><td class="mdescRight">Serialize a map. <a href="#ad6b755769880739cf33e6bd5e5ba0733">More...</a><br /></td></tr>
<tr class="separator:ad6b755769880739cf33e6bd5e5ba0733"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6b946d5f299822b6b0e6d187ed36f4fa"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="serialization_8c.html#a6b946d5f299822b6b0e6d187ed36f4fa">cbor_serialize_tag</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item, unsigned char *buffer, size_t buffer_size)</td></tr>
<tr class="memdesc:a6b946d5f299822b6b0e6d187ed36f4fa"><td class="mdescLeft"> </td><td class="mdescRight">Serialize a tag. <a href="#a6b946d5f299822b6b0e6d187ed36f4fa">More...</a><br /></td></tr>
<tr class="separator:a6b946d5f299822b6b0e6d187ed36f4fa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a31bacc1eadd9f671eec5554ae658aca6"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="serialization_8c.html#a31bacc1eadd9f671eec5554ae658aca6">cbor_serialize_float_ctrl</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item, unsigned char *buffer, size_t buffer_size)</td></tr>
<tr class="memdesc:a31bacc1eadd9f671eec5554ae658aca6"><td class="mdescLeft"> </td><td class="mdescRight">Serialize a. <a href="#a31bacc1eadd9f671eec5554ae658aca6">More...</a><br /></td></tr>
<tr class="separator:a31bacc1eadd9f671eec5554ae658aca6"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a56d372b02323e8df3a37eba69acafd31"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a56d372b02323e8df3a37eba69acafd31">§ </a></span>cbor_serialize()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t cbor_serialize </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname"><em>item</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="data_8h.html#aabb40e458ece40477e134a69c76693e8">cbor_mutable_data</a> </td>
<td class="paramname"><em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>buffer_size</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Serialize the given item. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>A data item </td></tr>
<tr><td class="paramname">buffer</td><td>Buffer to serialize to </td></tr>
<tr><td class="paramname">buffer_size</td><td>Size of the <code>buffer</code> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Length of the result. 0 on failure. </dd></dl>
<p>Definition at line <a class="el" href="serialization_8c_source.html#l00020">20</a> of file <a class="el" href="serialization_8c_source.html">serialization.c</a>.</p>
</div>
</div>
<a id="ae995c0fac946cf851f4b37899a2e59e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae995c0fac946cf851f4b37899a2e59e7">§ </a></span>cbor_serialize_alloc()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t cbor_serialize_alloc </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname"><em>item</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="data_8h.html#aabb40e458ece40477e134a69c76693e8">cbor_mutable_data</a> * </td>
<td class="paramname"><em>buffer</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t * </td>
<td class="paramname"><em>buffer_size</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Serialize the given item, allocating buffers as needed. </p>
<pre class="fragment">embed:rst:leading-asterisk
* .. warning:: It is your responsibility to free the buffer using an appropriate ``free`` implementation.
* </pre><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>A data item </td></tr>
<tr><td class="paramname">buffer[out]</td><td>Buffer containing the result </td></tr>
<tr><td class="paramname">buffer_size[out]</td><td>Size of the <code>buffer</code> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Length of the result. 0 on failure, in which case <code>buffer</code> is <code>NULL</code>. </dd></dl>
<p>Definition at line <a class="el" href="serialization_8c_source.html#l00044">44</a> of file <a class="el" href="serialization_8c_source.html">serialization.c</a>.</p>
</div>
</div>
<a id="ac8cc5befd865dd3a48ccd19730000bb3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac8cc5befd865dd3a48ccd19730000bb3">§ </a></span>cbor_serialize_array()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t cbor_serialize_array </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="data_8h.html#aabb40e458ece40477e134a69c76693e8">cbor_mutable_data</a> </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Serialize an array. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>An array </td></tr>
<tr><td class="paramname">buffer</td><td>Buffer to serialize to </td></tr>
<tr><td class="paramname">buffer_size</td><td>Size of the <code>buffer</code> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Length of the result. 0 on failure. </dd></dl>
<p>Definition at line <a class="el" href="serialization_8c_source.html#l00178">178</a> of file <a class="el" href="serialization_8c_source.html">serialization.c</a>.</p>
</div>
</div>
<a id="ab4d54170870c473fe361d91740751487"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab4d54170870c473fe361d91740751487">§ </a></span>cbor_serialize_bytestring()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t cbor_serialize_bytestring </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="data_8h.html#aabb40e458ece40477e134a69c76693e8">cbor_mutable_data</a> </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Serialize a bytestring. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>A bytestring </td></tr>
<tr><td class="paramname">buffer</td><td>Buffer to serialize to </td></tr>
<tr><td class="paramname">buffer_size</td><td>Size of the <code>buffer</code> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Length of the result. 0 on failure. </dd></dl>
<p>Definition at line <a class="el" href="serialization_8c_source.html#l00110">110</a> of file <a class="el" href="serialization_8c_source.html">serialization.c</a>.</p>
</div>
</div>
<a id="a31bacc1eadd9f671eec5554ae658aca6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a31bacc1eadd9f671eec5554ae658aca6">§ </a></span>cbor_serialize_float_ctrl()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t cbor_serialize_float_ctrl </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="data_8h.html#aabb40e458ece40477e134a69c76693e8">cbor_mutable_data</a> </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Serialize a. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>A float or ctrl </td></tr>
<tr><td class="paramname">buffer</td><td>Buffer to serialize to </td></tr>
<tr><td class="paramname">buffer_size</td><td>Size of the <code>buffer</code> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Length of the result. 0 on failure. </dd></dl>
<p>Definition at line <a class="el" href="serialization_8c_source.html#l00270">270</a> of file <a class="el" href="serialization_8c_source.html">serialization.c</a>.</p>
</div>
</div>
<a id="ad6b755769880739cf33e6bd5e5ba0733"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad6b755769880739cf33e6bd5e5ba0733">§ </a></span>cbor_serialize_map()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t cbor_serialize_map </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="data_8h.html#aabb40e458ece40477e134a69c76693e8">cbor_mutable_data</a> </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Serialize a map. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>A map </td></tr>
<tr><td class="paramname">buffer</td><td>Buffer to serialize to </td></tr>
<tr><td class="paramname">buffer_size</td><td>Size of the <code>buffer</code> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Length of the result. 0 on failure. </dd></dl>
<p>Definition at line <a class="el" href="serialization_8c_source.html#l00214">214</a> of file <a class="el" href="serialization_8c_source.html">serialization.c</a>.</p>
</div>
</div>
<a id="a6f00ef0ca5354471214894c2e21ff19b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6f00ef0ca5354471214894c2e21ff19b">§ </a></span>cbor_serialize_negint()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t cbor_serialize_negint </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="data_8h.html#aabb40e458ece40477e134a69c76693e8">cbor_mutable_data</a> </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Serialize a negint. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>A neging </td></tr>
<tr><td class="paramname">buffer</td><td>Buffer to serialize to </td></tr>
<tr><td class="paramname">buffer_size</td><td>Size of the <code>buffer</code> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Length of the result. 0 on failure. </dd></dl>
<p>Definition at line <a class="el" href="serialization_8c_source.html#l00093">93</a> of file <a class="el" href="serialization_8c_source.html">serialization.c</a>.</p>
</div>
</div>
<a id="a23ba67d9759dc522924ff8ee6297babd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a23ba67d9759dc522924ff8ee6297babd">§ </a></span>cbor_serialize_string()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t cbor_serialize_string </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="data_8h.html#aabb40e458ece40477e134a69c76693e8">cbor_mutable_data</a> </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Serialize a string. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>A string </td></tr>
<tr><td class="paramname">buffer</td><td>Buffer to serialize to </td></tr>
<tr><td class="paramname">buffer_size</td><td>Size of the <code>buffer</code> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Length of the result. 0 on failure. </dd></dl>
<p>Definition at line <a class="el" href="serialization_8c_source.html#l00144">144</a> of file <a class="el" href="serialization_8c_source.html">serialization.c</a>.</p>
</div>
</div>
<a id="a6b946d5f299822b6b0e6d187ed36f4fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6b946d5f299822b6b0e6d187ed36f4fa">§ </a></span>cbor_serialize_tag()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t cbor_serialize_tag </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="data_8h.html#aabb40e458ece40477e134a69c76693e8">cbor_mutable_data</a> </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Serialize a tag. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>A tag </td></tr>
<tr><td class="paramname">buffer</td><td>Buffer to serialize to </td></tr>
<tr><td class="paramname">buffer_size</td><td>Size of the <code>buffer</code> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Length of the result. 0 on failure. </dd></dl>
<p>Definition at line <a class="el" href="serialization_8c_source.html#l00256">256</a> of file <a class="el" href="serialization_8c_source.html">serialization.c</a>.</p>
</div>
</div>
<a id="ad0411e741dcb5352b9bc4198f0f18fbe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0411e741dcb5352b9bc4198f0f18fbe">§ </a></span>cbor_serialize_uint()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t cbor_serialize_uint </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> * </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="data_8h.html#aabb40e458ece40477e134a69c76693e8">cbor_mutable_data</a> </td>
<td class="paramname">, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Serialize an uint. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">item[borrow]</td><td>A uint </td></tr>
<tr><td class="paramname">buffer</td><td>Buffer to serialize to </td></tr>
<tr><td class="paramname">buffer_size</td><td>Size of the <code>buffer</code> </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Length of the result. 0 on failure. </dd></dl>
<p>Definition at line <a class="el" href="serialization_8c_source.html#l00076">76</a> of file <a class="el" href="serialization_8c_source.html">serialization.c</a>.</p>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Feb 6 2017 00:26:19 for libcbor by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.12
</small></address>
</body>
</html>