blob: 4488cabfe162e4fb3a5fc36110d7c90d22932e96 [file] [log] [blame]
<!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.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TinyCBOR 0.5.2 API: cbor.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="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">TinyCBOR 0.5.2 API
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<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('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">cbor.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="a00005.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/****************************************************************************</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment">**</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment">** Copyright (C) 2017 Intel Corporation</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment">**</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment">** Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment">** of this software and associated documentation files (the &quot;Software&quot;), to deal</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment">** in the Software without restriction, including without limitation the rights</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment">** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment">** copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment">** furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment">**</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment">** The above copyright notice and this permission notice shall be included in</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment">** all copies or substantial portions of the Software.</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment">**</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment">** THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment">** IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment">** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">** AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment">** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment">** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment">** THE SOFTWARE.</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="comment">**</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment">****************************************************************************/</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#ifndef CBOR_H</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#define CBOR_H</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#ifndef assert</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#include &lt;assert.h&gt;</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &lt;limits.h&gt;</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="preprocessor">#include &lt;stddef.h&gt;</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="preprocessor">#include &lt;string.h&gt;</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;<span class="preprocessor">#include &quot;tinycbor-version.h&quot;</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="preprocessor">#define TINYCBOR_VERSION ((TINYCBOR_VERSION_MAJOR &lt;&lt; 16) | (TINYCBOR_VERSION_MINOR &lt;&lt; 8) | TINYCBOR_VERSION_PATCH)</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;<span class="preprocessor">#else</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;<span class="preprocessor">#include &lt;stdbool.h&gt;</span></div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="preprocessor">#ifndef SIZE_MAX</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;<span class="comment">/* Some systems fail to define SIZE_MAX in &lt;stdint.h&gt;, even though C99 requires it...</span></div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;<span class="comment"> * Conversion from signed to unsigned is defined in 6.3.1.3 (Signed and unsigned integers) p2,</span></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<span class="comment"> * which says: &quot;the value is converted by repeatedly adding or subtracting one more than the</span></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;<span class="comment"> * maximum value that can be represented in the new type until the value is in the range of the</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;<span class="comment"> * new type.&quot;</span></div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;<span class="comment"> * So -1 gets converted to size_t by adding SIZE_MAX + 1, which results in SIZE_MAX.</span></div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;<span class="preprocessor"># define SIZE_MAX ((size_t)-1)</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;<span class="preprocessor">#ifndef CBOR_API</span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;<span class="preprocessor"># define CBOR_API</span></div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;<span class="preprocessor">#ifndef CBOR_PRIVATE_API</span></div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;<span class="preprocessor"># define CBOR_PRIVATE_API</span></div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;<span class="preprocessor">#ifndef CBOR_INLINE_API</span></div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;<span class="preprocessor"># if defined(__cplusplus)</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;<span class="preprocessor"># define CBOR_INLINE inline</span></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;<span class="preprocessor"># define CBOR_INLINE_API inline</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;<span class="preprocessor"># else</span></div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;<span class="preprocessor"># define CBOR_INLINE_API static CBOR_INLINE</span></div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;<span class="preprocessor"># if defined(_MSC_VER)</span></div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;<span class="preprocessor"># define CBOR_INLINE __inline</span></div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;<span class="preprocessor"># elif defined(__GNUC__)</span></div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;<span class="preprocessor"># define CBOR_INLINE __inline__</span></div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160;<span class="preprocessor"># elif defined(__STDC_VERSION__) &amp;&amp; __STDC_VERSION__ &gt;= 199901L</span></div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;<span class="preprocessor"># define CBOR_INLINE inline</span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160;<span class="preprocessor"># else</span></div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;<span class="preprocessor"># define CBOR_INLINE</span></div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;<span class="preprocessor"># endif</span></div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;<span class="preprocessor"># endif</span></div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="a00045.html#ga38f51ceba8bc8a9b1cf7dd31e3f9c178"> 82</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="a00045.html#ga38f51ceba8bc8a9b1cf7dd31e3f9c178">CborType</a> {</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; CborIntegerType = 0x00,</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; CborByteStringType = 0x40,</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; CborTextStringType = 0x60,</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; CborArrayType = 0x80,</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; CborMapType = 0xa0,</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; CborTagType = 0xc0,</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; CborSimpleType = 0xe0,</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; CborBooleanType = 0xf5,</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; CborNullType = 0xf6,</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; CborUndefinedType = 0xf7,</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; CborHalfFloatType = 0xf9,</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; CborFloatType = 0xfa,</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; CborDoubleType = 0xfb,</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; CborInvalidType = 0xff <span class="comment">/* equivalent to the break byte, so it will never be used */</span></div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;} <a class="code" href="a00045.html#ga38f51ceba8bc8a9b1cf7dd31e3f9c178">CborType</a>;</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;</div><div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="a00045.html#ga46c29d9d57408740dc269d6125d37d26"> 100</a></span>&#160;<span class="keyword">typedef</span> uint64_t <a class="code" href="a00045.html#ga46c29d9d57408740dc269d6125d37d26">CborTag</a>;</div><div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="a00045.html#gade6fa23a8fb3df9db434c69ca05d5ec1"> 101</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="a00045.html#gade6fa23a8fb3df9db434c69ca05d5ec1">CborKnownTags</a> {</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; CborDateTimeStringTag = 0,</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; CborUnixTime_tTag = 1,</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; CborPositiveBignumTag = 2,</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160; CborNegativeBignumTag = 3,</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; CborDecimalTag = 4,</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; CborBigfloatTag = 5,</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; CborCOSE_Encrypt0Tag = 16,</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; CborCOSE_Mac0Tag = 17,</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; CborCOSE_Sign1Tag = 18,</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; CborExpectedBase64urlTag = 21,</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; CborExpectedBase64Tag = 22,</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; CborExpectedBase16Tag = 23,</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; CborEncodedCborTag = 24,</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; CborUrlTag = 32,</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; CborBase64urlTag = 33,</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; CborBase64Tag = 34,</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; CborRegularExpressionTag = 35,</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; CborMimeMessageTag = 36,</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; CborCOSE_EncryptTag = 96,</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; CborCOSE_MacTag = 97,</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; CborCOSE_SignTag = 98,</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; CborSignatureTag = 55799</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;} <a class="code" href="a00045.html#gade6fa23a8fb3df9db434c69ca05d5ec1">CborKnownTags</a>;</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160;</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;<span class="comment">/* #define the constants so we can check with #ifdef */</span></div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;<span class="preprocessor">#define CborDateTimeStringTag CborDateTimeStringTag</span></div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;<span class="preprocessor">#define CborUnixTime_tTag CborUnixTime_tTag</span></div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;<span class="preprocessor">#define CborPositiveBignumTag CborPositiveBignumTag</span></div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;<span class="preprocessor">#define CborNegativeBignumTag CborNegativeBignumTag</span></div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;<span class="preprocessor">#define CborDecimalTag CborDecimalTag</span></div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;<span class="preprocessor">#define CborBigfloatTag CborBigfloatTag</span></div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160;<span class="preprocessor">#define CborCOSE_Encrypt0Tag CborCOSE_Encrypt0Tag</span></div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;<span class="preprocessor">#define CborCOSE_Mac0Tag CborCOSE_Mac0Tag</span></div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;<span class="preprocessor">#define CborCOSE_Sign1Tag CborCOSE_Sign1Tag</span></div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;<span class="preprocessor">#define CborExpectedBase64urlTag CborExpectedBase64urlTag</span></div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;<span class="preprocessor">#define CborExpectedBase64Tag CborExpectedBase64Tag</span></div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;<span class="preprocessor">#define CborExpectedBase16Tag CborExpectedBase16Tag</span></div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>&#160;<span class="preprocessor">#define CborEncodedCborTag CborEncodedCborTag</span></div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;<span class="preprocessor">#define CborUrlTag CborUrlTag</span></div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160;<span class="preprocessor">#define CborBase64urlTag CborBase64urlTag</span></div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160;<span class="preprocessor">#define CborBase64Tag CborBase64Tag</span></div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;<span class="preprocessor">#define CborRegularExpressionTag CborRegularExpressionTag</span></div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160;<span class="preprocessor">#define CborMimeMessageTag CborMimeMessageTag</span></div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;<span class="preprocessor">#define CborCOSE_EncryptTag CborCOSE_EncryptTag</span></div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160;<span class="preprocessor">#define CborCOSE_MacTag CborCOSE_MacTag</span></div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160;<span class="preprocessor">#define CborCOSE_SignTag CborCOSE_SignTag</span></div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160;<span class="preprocessor">#define CborSignatureTag CborSignatureTag</span></div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160;<span class="comment">/* Error API */</span></div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5"> 152</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> {</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160; CborNoError = 0,</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="comment">/* errors in all modes */</span></div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; CborUnknownError,</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160; CborErrorUnknownLength, <span class="comment">/* request for length in array, map, or string with indeterminate length */</span></div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; CborErrorAdvancePastEOF,</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; CborErrorIO,</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; <span class="comment">/* parser errors streaming errors */</span></div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; CborErrorGarbageAtEnd = 256,</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; CborErrorUnexpectedEOF,</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; CborErrorUnexpectedBreak,</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; CborErrorUnknownType, <span class="comment">/* can only happen in major type 7 */</span></div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; CborErrorIllegalType, <span class="comment">/* type not allowed here */</span></div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; CborErrorIllegalNumber,</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; CborErrorIllegalSimpleType, <span class="comment">/* types of value less than 32 encoded in two bytes */</span></div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <span class="comment">/* parser errors in strict mode parsing only */</span></div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; CborErrorUnknownSimpleType = 512,</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; CborErrorUnknownTag,</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; CborErrorInappropriateTagForType,</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; CborErrorDuplicateObjectKeys,</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; CborErrorInvalidUtf8TextString,</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; CborErrorExcludedType,</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; CborErrorExcludedValue,</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; CborErrorImproperValue,</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; CborErrorOverlongEncoding,</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; CborErrorMapKeyNotString,</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160; CborErrorMapNotSorted,</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; CborErrorMapKeysNotUnique,</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160;</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160; <span class="comment">/* encoder errors */</span></div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; CborErrorTooManyItems = 768,</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; CborErrorTooFewItems,</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160;</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <span class="comment">/* internal implementation errors */</span></div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; CborErrorDataTooLarge = 1024,</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; CborErrorNestingTooDeep,</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; CborErrorUnsupportedType,</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160;</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; <span class="comment">/* errors in converting to JSON */</span></div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; CborErrorJsonObjectKeyIsAggregate = 1280,</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; CborErrorJsonObjectKeyNotString,</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; CborErrorJsonNotImplemented,</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160;</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; CborErrorOutOfMemory = (int) (~0U / 2 + 1),</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; CborErrorInternalError = (int) (~0U / 2) <span class="comment">/* INT_MAX on two&#39;s complement machines */</span></div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160;} <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a>;</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160;</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160;CBOR_API <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="a00045.html#gad4519e8ab62ea64773fa6dce00c361dc">cbor_error_string</a>(<a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> error);</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160;</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160;<span class="comment">/* Encoder API */</span></div><div class="line"><a name="l00205"></a><span class="lineno"><a class="line" href="a00053.html"> 205</a></span>&#160;<span class="keyword">struct </span><a class="code" href="a00053.html">CborEncoder</a></div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160;{</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; <span class="keyword">union </span>{</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; uint8_t *ptr;</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; ptrdiff_t bytes_needed;</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; } data;</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; <span class="keyword">const</span> uint8_t *end;</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; <span class="keywordtype">size_t</span> remaining;</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; <span class="keywordtype">int</span> flags;</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160;};</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00053.html">CborEncoder</a> <a class="code" href="a00053.html">CborEncoder</a>;</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160;</div><div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="a00045.html#gadc05d7725df5c9a2995580e2be0e5b57"> 217</a></span>&#160;<span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="a00045.html#gadc05d7725df5c9a2995580e2be0e5b57">CborIndefiniteLength</a> = SIZE_MAX;</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160;</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160;CBOR_API <span class="keywordtype">void</span> <a class="code" href="a00046.html#ga257051966d907f88af804f30f2e9d8e2">cbor_encoder_init</a>(<a class="code" href="a00053.html">CborEncoder</a> *encoder, uint8_t *buffer, <span class="keywordtype">size_t</span> size, <span class="keywordtype">int</span> flags);</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00046.html#ga2b898ce6f5821c5aba8b6f0020c4b5ba">cbor_encode_uint</a>(<a class="code" href="a00053.html">CborEncoder</a> *encoder, uint64_t value);</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00046.html#gabbf6e10fd963d673f5ad293dff4a67a9">cbor_encode_int</a>(<a class="code" href="a00053.html">CborEncoder</a> *encoder, int64_t value);</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00046.html#ga0e84daa854e0480f4a3758bcb46b9b60">cbor_encode_negative_int</a>(<a class="code" href="a00053.html">CborEncoder</a> *encoder, uint64_t absolute_value);</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00046.html#ga923a63a01dae47a3dd46f74a3f744008">cbor_encode_simple_value</a>(<a class="code" href="a00053.html">CborEncoder</a> *encoder, uint8_t value);</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00046.html#ga77b579b1a5a867fc0712e46bb4eb3200">cbor_encode_tag</a>(<a class="code" href="a00053.html">CborEncoder</a> *encoder, <a class="code" href="a00045.html#ga46c29d9d57408740dc269d6125d37d26">CborTag</a> tag);</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00046.html#ga4fa673c63e85b1fd6f8067aca4ccdde4">cbor_encode_text_string</a>(<a class="code" href="a00053.html">CborEncoder</a> *encoder, <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">string</span>, <span class="keywordtype">size_t</span> length);</div><div class="line"><a name="l00226"></a><span class="lineno"><a class="line" href="a00046.html#ga6df3eff486535322f66584dc5431f9e9"> 226</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00046.html#ga6df3eff486535322f66584dc5431f9e9">cbor_encode_text_stringz</a>(<a class="code" href="a00053.html">CborEncoder</a> *encoder, <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">string</span>)</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160;{ <span class="keywordflow">return</span> <a class="code" href="a00046.html#ga4fa673c63e85b1fd6f8067aca4ccdde4">cbor_encode_text_string</a>(encoder, <span class="keywordtype">string</span>, strlen(<span class="keywordtype">string</span>)); }</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00046.html#ga1260b72bb0f067fd3c68d49a6b5f58d0">cbor_encode_byte_string</a>(<a class="code" href="a00053.html">CborEncoder</a> *encoder, <span class="keyword">const</span> uint8_t *<span class="keywordtype">string</span>, <span class="keywordtype">size_t</span> length);</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00046.html#gac56f8c2ad79916f2719acb24f049cde5">cbor_encode_floating_point</a>(<a class="code" href="a00053.html">CborEncoder</a> *encoder, <a class="code" href="a00045.html#ga38f51ceba8bc8a9b1cf7dd31e3f9c178">CborType</a> fpType, <span class="keyword">const</span> <span class="keywordtype">void</span> *value);</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160;</div><div class="line"><a name="l00231"></a><span class="lineno"><a class="line" href="a00046.html#ga857154b97cad978f4afb3e2f809051bd"> 231</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00046.html#ga857154b97cad978f4afb3e2f809051bd">cbor_encode_boolean</a>(<a class="code" href="a00053.html">CborEncoder</a> *encoder, <span class="keywordtype">bool</span> value)</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160;{ <span class="keywordflow">return</span> <a class="code" href="a00046.html#ga923a63a01dae47a3dd46f74a3f744008">cbor_encode_simple_value</a>(encoder, (<span class="keywordtype">int</span>)value - 1 + (CborBooleanType &amp; 0x1f)); }</div><div class="line"><a name="l00233"></a><span class="lineno"><a class="line" href="a00046.html#ga30b769ff1da73ed8b4536f551347c5ed"> 233</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00046.html#ga30b769ff1da73ed8b4536f551347c5ed">cbor_encode_null</a>(<a class="code" href="a00053.html">CborEncoder</a> *encoder)</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160;{ <span class="keywordflow">return</span> <a class="code" href="a00046.html#ga923a63a01dae47a3dd46f74a3f744008">cbor_encode_simple_value</a>(encoder, CborNullType &amp; 0x1f); }</div><div class="line"><a name="l00235"></a><span class="lineno"><a class="line" href="a00046.html#ga9d9f0668e2cf69352a45095006efab4f"> 235</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00046.html#ga9d9f0668e2cf69352a45095006efab4f">cbor_encode_undefined</a>(<a class="code" href="a00053.html">CborEncoder</a> *encoder)</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160;{ <span class="keywordflow">return</span> <a class="code" href="a00046.html#ga923a63a01dae47a3dd46f74a3f744008">cbor_encode_simple_value</a>(encoder, CborUndefinedType &amp; 0x1f); }</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160;</div><div class="line"><a name="l00238"></a><span class="lineno"><a class="line" href="a00046.html#gad8e5a125cfaceb9a32528e620e003bc6"> 238</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00046.html#gad8e5a125cfaceb9a32528e620e003bc6">cbor_encode_half_float</a>(<a class="code" href="a00053.html">CborEncoder</a> *encoder, <span class="keyword">const</span> <span class="keywordtype">void</span> *value)</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160;{ <span class="keywordflow">return</span> <a class="code" href="a00046.html#gac56f8c2ad79916f2719acb24f049cde5">cbor_encode_floating_point</a>(encoder, CborHalfFloatType, value); }</div><div class="line"><a name="l00240"></a><span class="lineno"><a class="line" href="a00046.html#gae981ee934ef22ce4c5b52f8069e1b15c"> 240</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00046.html#gae981ee934ef22ce4c5b52f8069e1b15c">cbor_encode_float</a>(<a class="code" href="a00053.html">CborEncoder</a> *encoder, <span class="keywordtype">float</span> value)</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160;{ <span class="keywordflow">return</span> <a class="code" href="a00046.html#gac56f8c2ad79916f2719acb24f049cde5">cbor_encode_floating_point</a>(encoder, CborFloatType, &amp;value); }</div><div class="line"><a name="l00242"></a><span class="lineno"><a class="line" href="a00046.html#ga211aa80dc5b793ee8dd74d24cb9e7ca6"> 242</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00046.html#ga211aa80dc5b793ee8dd74d24cb9e7ca6">cbor_encode_double</a>(<a class="code" href="a00053.html">CborEncoder</a> *encoder, <span class="keywordtype">double</span> value)</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160;{ <span class="keywordflow">return</span> <a class="code" href="a00046.html#gac56f8c2ad79916f2719acb24f049cde5">cbor_encode_floating_point</a>(encoder, CborDoubleType, &amp;value); }</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160;</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00046.html#ga97b4d15feaa128ed900704523979bd3f">cbor_encoder_create_array</a>(<a class="code" href="a00053.html">CborEncoder</a> *encoder, <a class="code" href="a00053.html">CborEncoder</a> *arrayEncoder, <span class="keywordtype">size_t</span> length);</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00046.html#gad4a5ef2d574b5ac30d18ba696e219340">cbor_encoder_create_map</a>(<a class="code" href="a00053.html">CborEncoder</a> *encoder, <a class="code" href="a00053.html">CborEncoder</a> *mapEncoder, <span class="keywordtype">size_t</span> length);</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00046.html#gacb4352260971102dbbd2f2a20e854c57">cbor_encoder_close_container</a>(<a class="code" href="a00053.html">CborEncoder</a> *encoder, <span class="keyword">const</span> <a class="code" href="a00053.html">CborEncoder</a> *containerEncoder);</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00046.html#gaa597ba3b072473a41448e131ca20a66b">cbor_encoder_close_container_checked</a>(<a class="code" href="a00053.html">CborEncoder</a> *encoder, <span class="keyword">const</span> <a class="code" href="a00053.html">CborEncoder</a> *containerEncoder);</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160;</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160;CBOR_INLINE_API uint8_t *_cbor_encoder_get_buffer_pointer(<span class="keyword">const</span> <a class="code" href="a00053.html">CborEncoder</a> *encoder)</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160;{</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <span class="keywordflow">return</span> encoder-&gt;data.ptr;</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160;}</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160;</div><div class="line"><a name="l00255"></a><span class="lineno"><a class="line" href="a00046.html#ga753c2f9e09db7fa9317f1c1f19a16342"> 255</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">size_t</span> <a class="code" href="a00046.html#ga753c2f9e09db7fa9317f1c1f19a16342">cbor_encoder_get_buffer_size</a>(<span class="keyword">const</span> <a class="code" href="a00053.html">CborEncoder</a> *encoder, <span class="keyword">const</span> uint8_t *buffer)</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160;{</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; <span class="keywordflow">return</span> (<span class="keywordtype">size_t</span>)(encoder-&gt;data.ptr - buffer);</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160;}</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160;</div><div class="line"><a name="l00260"></a><span class="lineno"><a class="line" href="a00046.html#gafc9abf6503d40787c3fd637a86bc0fb6"> 260</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">size_t</span> <a class="code" href="a00046.html#gafc9abf6503d40787c3fd637a86bc0fb6">cbor_encoder_get_extra_bytes_needed</a>(<span class="keyword">const</span> <a class="code" href="a00053.html">CborEncoder</a> *encoder)</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160;{</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; <span class="keywordflow">return</span> encoder-&gt;end ? 0 : (size_t)encoder-&gt;data.bytes_needed;</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160;}</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160;</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160;<span class="comment">/* Parser API */</span></div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160;</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160;<span class="keyword">enum</span> CborParserIteratorFlags</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160;{</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; CborIteratorFlag_IntegerValueTooLarge = 0x01,</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; CborIteratorFlag_NegativeInteger = 0x02,</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; CborIteratorFlag_IteratingStringChunks = 0x02,</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; CborIteratorFlag_UnknownLength = 0x04,</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; CborIteratorFlag_ContainerIsMap = 0x20</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160;};</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160;</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160;<span class="keyword">struct </span>CborParser</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160;{</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; <span class="keyword">const</span> uint8_t *end;</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160; <span class="keywordtype">int</span> flags;</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160;};</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>CborParser CborParser;</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160;</div><div class="line"><a name="l00283"></a><span class="lineno"><a class="line" href="a00065.html"> 283</a></span>&#160;<span class="keyword">struct </span><a class="code" href="a00065.html">CborValue</a></div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160;{</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; <span class="keyword">const</span> CborParser *parser;</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; <span class="keyword">const</span> uint8_t *ptr;</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; uint32_t remaining;</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; uint16_t extra;</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; uint8_t type;</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160; uint8_t flags;</div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160;};</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="a00065.html">CborValue</a> <a class="code" href="a00065.html">CborValue</a>;</div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160;</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#gadb356bb705f2d8239f03b36081a43b4f">cbor_parser_init</a>(<span class="keyword">const</span> uint8_t *buffer, <span class="keywordtype">size_t</span> size, <span class="keywordtype">int</span> flags, CborParser *parser, <a class="code" href="a00065.html">CborValue</a> *it);</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160;</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#ga19b60bc2cff3d3ffcc81adbcad09fd58">cbor_value_validate_basic</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *it);</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160;</div><div class="line"><a name="l00298"></a><span class="lineno"><a class="line" href="a00047.html#ga49bd2a99edcceb72962eedc7584cd19c"> 298</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">bool</span> <a class="code" href="a00047.html#ga49bd2a99edcceb72962eedc7584cd19c">cbor_value_at_end</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *it)</div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160;{ <span class="keywordflow">return</span> it-&gt;remaining == 0; }</div><div class="line"><a name="l00300"></a><span class="lineno"><a class="line" href="a00047.html#ga06b1da795150786eb43ee83d65cd17d7"> 300</a></span>&#160;CBOR_INLINE_API <span class="keyword">const</span> uint8_t *<a class="code" href="a00047.html#ga06b1da795150786eb43ee83d65cd17d7">cbor_value_get_next_byte</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *it)</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160;{ <span class="keywordflow">return</span> it-&gt;ptr; }</div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#gac0701f791608589ddfff0bdb8acee7b4">cbor_value_advance_fixed</a>(<a class="code" href="a00065.html">CborValue</a> *it);</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#gae2ede5aacd59f04437c24ef8ca2f449a">cbor_value_advance</a>(<a class="code" href="a00065.html">CborValue</a> *it);</div><div class="line"><a name="l00304"></a><span class="lineno"><a class="line" href="a00047.html#gaf3da16a547bcb54d3ad2ca70cf0f4341"> 304</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">bool</span> <a class="code" href="a00047.html#gaf3da16a547bcb54d3ad2ca70cf0f4341">cbor_value_is_container</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *it)</div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160;{ <span class="keywordflow">return</span> it-&gt;type == CborArrayType || it-&gt;type == CborMapType; }</div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#ga0c8a61e484973272f34b00cfbef9ddfd">cbor_value_enter_container</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *it, <a class="code" href="a00065.html">CborValue</a> *recursed);</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#ga51e02f0b62bc864fe8cf290988936e15">cbor_value_leave_container</a>(<a class="code" href="a00065.html">CborValue</a> *it, <span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *recursed);</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160;</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160;CBOR_PRIVATE_API uint64_t _cbor_value_decode_int64_internal(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value);</div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160;CBOR_INLINE_API uint64_t _cbor_value_extract_int64_helper(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value)</div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160;{</div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; <span class="keywordflow">return</span> value-&gt;flags &amp; CborIteratorFlag_IntegerValueTooLarge ?</div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160; _cbor_value_decode_int64_internal(value) : value-&gt;extra;</div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160;}</div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160;</div><div class="line"><a name="l00316"></a><span class="lineno"><a class="line" href="a00047.html#gae8bf13b3880863cf5c8a0bddf52426e6"> 316</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">bool</span> <a class="code" href="a00047.html#gae8bf13b3880863cf5c8a0bddf52426e6">cbor_value_is_valid</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value)</div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160;{ <span class="keywordflow">return</span> value &amp;&amp; value-&gt;type != CborInvalidType; }</div><div class="line"><a name="l00318"></a><span class="lineno"><a class="line" href="a00047.html#ga49bb974313534553ccafb28e5eba46d5"> 318</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga38f51ceba8bc8a9b1cf7dd31e3f9c178">CborType</a> <a class="code" href="a00047.html#ga49bb974313534553ccafb28e5eba46d5">cbor_value_get_type</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value)</div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160;{ <span class="keywordflow">return</span> (<a class="code" href="a00045.html#ga38f51ceba8bc8a9b1cf7dd31e3f9c178">CborType</a>)value-&gt;type; }</div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160;</div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160;<span class="comment">/* Null &amp; undefined type */</span></div><div class="line"><a name="l00322"></a><span class="lineno"><a class="line" href="a00047.html#ga11f38fada70d371257f7b51f311e8826"> 322</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">bool</span> <a class="code" href="a00047.html#ga11f38fada70d371257f7b51f311e8826">cbor_value_is_null</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value)</div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160;{ <span class="keywordflow">return</span> value-&gt;type == CborNullType; }</div><div class="line"><a name="l00324"></a><span class="lineno"><a class="line" href="a00047.html#ga1079ce3272f905c3d4a20821507be6f6"> 324</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">bool</span> <a class="code" href="a00047.html#ga1079ce3272f905c3d4a20821507be6f6">cbor_value_is_undefined</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value)</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160;{ <span class="keywordflow">return</span> value-&gt;type == CborUndefinedType; }</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160;</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>&#160;<span class="comment">/* Booleans */</span></div><div class="line"><a name="l00328"></a><span class="lineno"><a class="line" href="a00047.html#ga0f85ec6748006a36c237a79d6f223b29"> 328</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">bool</span> <a class="code" href="a00047.html#ga0f85ec6748006a36c237a79d6f223b29">cbor_value_is_boolean</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value)</div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160;{ <span class="keywordflow">return</span> value-&gt;type == CborBooleanType; }</div><div class="line"><a name="l00330"></a><span class="lineno"><a class="line" href="a00047.html#gade7bfd61f35e448b1119d9bcfce234c0"> 330</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#gade7bfd61f35e448b1119d9bcfce234c0">cbor_value_get_boolean</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, <span class="keywordtype">bool</span> *result)</div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160;{</div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160; assert(<a class="code" href="a00047.html#ga0f85ec6748006a36c237a79d6f223b29">cbor_value_is_boolean</a>(value));</div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160; *result = !!value-&gt;extra;</div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160; <span class="keywordflow">return</span> CborNoError;</div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160;}</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160;</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160;<span class="comment">/* Simple types */</span></div><div class="line"><a name="l00338"></a><span class="lineno"><a class="line" href="a00047.html#gaae1a1b893975549d5fa74452ba4b79e8"> 338</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">bool</span> <a class="code" href="a00047.html#gaae1a1b893975549d5fa74452ba4b79e8">cbor_value_is_simple_type</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value)</div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>&#160;{ <span class="keywordflow">return</span> value-&gt;type == CborSimpleType; }</div><div class="line"><a name="l00340"></a><span class="lineno"><a class="line" href="a00047.html#ga033d3d2c9570501cf9dce099fe98e863"> 340</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#ga033d3d2c9570501cf9dce099fe98e863">cbor_value_get_simple_type</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, uint8_t *result)</div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>&#160;{</div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>&#160; assert(<a class="code" href="a00047.html#gaae1a1b893975549d5fa74452ba4b79e8">cbor_value_is_simple_type</a>(value));</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>&#160; *result = (uint8_t)value-&gt;extra;</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span>&#160; <span class="keywordflow">return</span> CborNoError;</div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span>&#160;}</div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span>&#160;</div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span>&#160;<span class="comment">/* Integers */</span></div><div class="line"><a name="l00348"></a><span class="lineno"><a class="line" href="a00047.html#ga3ea2ca067d876ca95251005f4ad696b0"> 348</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">bool</span> <a class="code" href="a00047.html#ga3ea2ca067d876ca95251005f4ad696b0">cbor_value_is_integer</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value)</div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span>&#160;{ <span class="keywordflow">return</span> value-&gt;type == CborIntegerType; }</div><div class="line"><a name="l00350"></a><span class="lineno"><a class="line" href="a00047.html#gac6aaf9010ea974034fe62b4670e44235"> 350</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">bool</span> <a class="code" href="a00047.html#gac6aaf9010ea974034fe62b4670e44235">cbor_value_is_unsigned_integer</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value)</div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>&#160;{ <span class="keywordflow">return</span> <a class="code" href="a00047.html#ga3ea2ca067d876ca95251005f4ad696b0">cbor_value_is_integer</a>(value) &amp;&amp; (value-&gt;flags &amp; CborIteratorFlag_NegativeInteger) == 0; }</div><div class="line"><a name="l00352"></a><span class="lineno"><a class="line" href="a00047.html#gaaecdd62ea0656b7c4b367b19648ac79b"> 352</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">bool</span> <a class="code" href="a00047.html#gaaecdd62ea0656b7c4b367b19648ac79b">cbor_value_is_negative_integer</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value)</div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>&#160;{ <span class="keywordflow">return</span> <a class="code" href="a00047.html#ga3ea2ca067d876ca95251005f4ad696b0">cbor_value_is_integer</a>(value) &amp;&amp; (value-&gt;flags &amp; CborIteratorFlag_NegativeInteger); }</div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>&#160;</div><div class="line"><a name="l00355"></a><span class="lineno"><a class="line" href="a00047.html#ga30c4dc9fb923feac58d962b02aeecd41"> 355</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#ga30c4dc9fb923feac58d962b02aeecd41">cbor_value_get_raw_integer</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, uint64_t *result)</div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span>&#160;{</div><div class="line"><a name="l00357"></a><span class="lineno"> 357</span>&#160; assert(<a class="code" href="a00047.html#ga3ea2ca067d876ca95251005f4ad696b0">cbor_value_is_integer</a>(value));</div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span>&#160; *result = _cbor_value_extract_int64_helper(value);</div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span>&#160; <span class="keywordflow">return</span> CborNoError;</div><div class="line"><a name="l00360"></a><span class="lineno"> 360</span>&#160;}</div><div class="line"><a name="l00361"></a><span class="lineno"> 361</span>&#160;</div><div class="line"><a name="l00362"></a><span class="lineno"><a class="line" href="a00047.html#gab4c30532c395047b62ccc7c7eeb3a51b"> 362</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#gab4c30532c395047b62ccc7c7eeb3a51b">cbor_value_get_uint64</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, uint64_t *result)</div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span>&#160;{</div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span>&#160; assert(<a class="code" href="a00047.html#gac6aaf9010ea974034fe62b4670e44235">cbor_value_is_unsigned_integer</a>(value));</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span>&#160; *result = _cbor_value_extract_int64_helper(value);</div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>&#160; <span class="keywordflow">return</span> CborNoError;</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span>&#160;}</div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span>&#160;</div><div class="line"><a name="l00369"></a><span class="lineno"><a class="line" href="a00047.html#gae16139e4a8857033b908dad98ddb2ac3"> 369</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#gae16139e4a8857033b908dad98ddb2ac3">cbor_value_get_int64</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, int64_t *result)</div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span>&#160;{</div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span>&#160; assert(<a class="code" href="a00047.html#ga3ea2ca067d876ca95251005f4ad696b0">cbor_value_is_integer</a>(value));</div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span>&#160; *result = (int64_t) _cbor_value_extract_int64_helper(value);</div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span>&#160; <span class="keywordflow">if</span> (value-&gt;flags &amp; CborIteratorFlag_NegativeInteger)</div><div class="line"><a name="l00374"></a><span class="lineno"> 374</span>&#160; *result = -*result - 1;</div><div class="line"><a name="l00375"></a><span class="lineno"> 375</span>&#160; <span class="keywordflow">return</span> CborNoError;</div><div class="line"><a name="l00376"></a><span class="lineno"> 376</span>&#160;}</div><div class="line"><a name="l00377"></a><span class="lineno"> 377</span>&#160;</div><div class="line"><a name="l00378"></a><span class="lineno"><a class="line" href="a00047.html#gabf95f402facf8436989b830f1dd4b06a"> 378</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#gabf95f402facf8436989b830f1dd4b06a">cbor_value_get_int</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, <span class="keywordtype">int</span> *result)</div><div class="line"><a name="l00379"></a><span class="lineno"> 379</span>&#160;{</div><div class="line"><a name="l00380"></a><span class="lineno"> 380</span>&#160; assert(<a class="code" href="a00047.html#ga3ea2ca067d876ca95251005f4ad696b0">cbor_value_is_integer</a>(value));</div><div class="line"><a name="l00381"></a><span class="lineno"> 381</span>&#160; *result = (int) _cbor_value_extract_int64_helper(value);</div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span>&#160; <span class="keywordflow">if</span> (value-&gt;flags &amp; CborIteratorFlag_NegativeInteger)</div><div class="line"><a name="l00383"></a><span class="lineno"> 383</span>&#160; *result = -*result - 1;</div><div class="line"><a name="l00384"></a><span class="lineno"> 384</span>&#160; <span class="keywordflow">return</span> CborNoError;</div><div class="line"><a name="l00385"></a><span class="lineno"> 385</span>&#160;}</div><div class="line"><a name="l00386"></a><span class="lineno"> 386</span>&#160;</div><div class="line"><a name="l00387"></a><span class="lineno"> 387</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#ga5bd9f8ab2b61aaeb31fd9b724622f0df">cbor_value_get_int64_checked</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, int64_t *result);</div><div class="line"><a name="l00388"></a><span class="lineno"> 388</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#gaf9b7aba18f57c255e744b874645ac9be">cbor_value_get_int_checked</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, <span class="keywordtype">int</span> *result);</div><div class="line"><a name="l00389"></a><span class="lineno"> 389</span>&#160;</div><div class="line"><a name="l00390"></a><span class="lineno"><a class="line" href="a00047.html#ga0422ed961d973d190a19e12a3fe2390f"> 390</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">bool</span> <a class="code" href="a00047.html#ga0422ed961d973d190a19e12a3fe2390f">cbor_value_is_length_known</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value)</div><div class="line"><a name="l00391"></a><span class="lineno"> 391</span>&#160;{ <span class="keywordflow">return</span> (value-&gt;flags &amp; CborIteratorFlag_UnknownLength) == 0; }</div><div class="line"><a name="l00392"></a><span class="lineno"> 392</span>&#160;</div><div class="line"><a name="l00393"></a><span class="lineno"> 393</span>&#160;<span class="comment">/* Tags */</span></div><div class="line"><a name="l00394"></a><span class="lineno"><a class="line" href="a00047.html#ga283d20b9bd9787647841dd245d486b1d"> 394</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">bool</span> <a class="code" href="a00047.html#ga283d20b9bd9787647841dd245d486b1d">cbor_value_is_tag</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value)</div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>&#160;{ <span class="keywordflow">return</span> value-&gt;type == CborTagType; }</div><div class="line"><a name="l00396"></a><span class="lineno"><a class="line" href="a00047.html#ga4ee8cd4c95df1d788f5ef8fee6ac101a"> 396</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#ga4ee8cd4c95df1d788f5ef8fee6ac101a">cbor_value_get_tag</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, <a class="code" href="a00045.html#ga46c29d9d57408740dc269d6125d37d26">CborTag</a> *result)</div><div class="line"><a name="l00397"></a><span class="lineno"> 397</span>&#160;{</div><div class="line"><a name="l00398"></a><span class="lineno"> 398</span>&#160; assert(<a class="code" href="a00047.html#ga283d20b9bd9787647841dd245d486b1d">cbor_value_is_tag</a>(value));</div><div class="line"><a name="l00399"></a><span class="lineno"> 399</span>&#160; *result = _cbor_value_extract_int64_helper(value);</div><div class="line"><a name="l00400"></a><span class="lineno"> 400</span>&#160; <span class="keywordflow">return</span> CborNoError;</div><div class="line"><a name="l00401"></a><span class="lineno"> 401</span>&#160;}</div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#ga2b805f0f440905a7ba4f93b3569bb97b">cbor_value_skip_tag</a>(<a class="code" href="a00065.html">CborValue</a> *it);</div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span>&#160;</div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span>&#160;<span class="comment">/* Strings */</span></div><div class="line"><a name="l00405"></a><span class="lineno"><a class="line" href="a00047.html#gad864d46aa7cfa3d57813da2b242380b4"> 405</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">bool</span> <a class="code" href="a00047.html#gad864d46aa7cfa3d57813da2b242380b4">cbor_value_is_byte_string</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value)</div><div class="line"><a name="l00406"></a><span class="lineno"> 406</span>&#160;{ <span class="keywordflow">return</span> value-&gt;type == CborByteStringType; }</div><div class="line"><a name="l00407"></a><span class="lineno"><a class="line" href="a00047.html#gaed463f5bf4b69d7aec41e6aca9c637ad"> 407</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">bool</span> <a class="code" href="a00047.html#gaed463f5bf4b69d7aec41e6aca9c637ad">cbor_value_is_text_string</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value)</div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>&#160;{ <span class="keywordflow">return</span> value-&gt;type == CborTextStringType; }</div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>&#160;</div><div class="line"><a name="l00410"></a><span class="lineno"><a class="line" href="a00047.html#gaf39519cfc9a8fb64a787348af835569c"> 410</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#gaf39519cfc9a8fb64a787348af835569c">cbor_value_get_string_length</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, <span class="keywordtype">size_t</span> *length)</div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span>&#160;{</div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span>&#160; assert(<a class="code" href="a00047.html#gad864d46aa7cfa3d57813da2b242380b4">cbor_value_is_byte_string</a>(value) || <a class="code" href="a00047.html#gaed463f5bf4b69d7aec41e6aca9c637ad">cbor_value_is_text_string</a>(value));</div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span>&#160; <span class="keywordflow">if</span> (!<a class="code" href="a00047.html#ga0422ed961d973d190a19e12a3fe2390f">cbor_value_is_length_known</a>(value))</div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>&#160; <span class="keywordflow">return</span> CborErrorUnknownLength;</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>&#160; uint64_t v = _cbor_value_extract_int64_helper(value);</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>&#160; *length = (size_t)v;</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span>&#160; <span class="keywordflow">if</span> (*length != v)</div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span>&#160; <span class="keywordflow">return</span> CborErrorDataTooLarge;</div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span>&#160; <span class="keywordflow">return</span> CborNoError;</div><div class="line"><a name="l00420"></a><span class="lineno"> 420</span>&#160;}</div><div class="line"><a name="l00421"></a><span class="lineno"> 421</span>&#160;</div><div class="line"><a name="l00422"></a><span class="lineno"> 422</span>&#160;CBOR_PRIVATE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> _cbor_value_copy_string(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, <span class="keywordtype">void</span> *buffer,</div><div class="line"><a name="l00423"></a><span class="lineno"> 423</span>&#160; <span class="keywordtype">size_t</span> *buflen, <a class="code" href="a00065.html">CborValue</a> *next);</div><div class="line"><a name="l00424"></a><span class="lineno"> 424</span>&#160;CBOR_PRIVATE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> _cbor_value_dup_string(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, <span class="keywordtype">void</span> **buffer,</div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span>&#160; <span class="keywordtype">size_t</span> *buflen, <a class="code" href="a00065.html">CborValue</a> *next);</div><div class="line"><a name="l00426"></a><span class="lineno"> 426</span>&#160;</div><div class="line"><a name="l00427"></a><span class="lineno"> 427</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#gad5b2dd803244946b15603e09ce147044">cbor_value_calculate_string_length</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, <span class="keywordtype">size_t</span> *length);</div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>&#160;</div><div class="line"><a name="l00429"></a><span class="lineno"><a class="line" href="a00047.html#ga02ec0b5c8346f407cf5def566ddcf5ae"> 429</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#ga02ec0b5c8346f407cf5def566ddcf5ae">cbor_value_copy_text_string</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, <span class="keywordtype">char</span> *buffer,</div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>&#160; <span class="keywordtype">size_t</span> *buflen, <a class="code" href="a00065.html">CborValue</a> *next)</div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span>&#160;{</div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>&#160; assert(<a class="code" href="a00047.html#gaed463f5bf4b69d7aec41e6aca9c637ad">cbor_value_is_text_string</a>(value));</div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>&#160; <span class="keywordflow">return</span> _cbor_value_copy_string(value, buffer, buflen, next);</div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span>&#160;}</div><div class="line"><a name="l00435"></a><span class="lineno"><a class="line" href="a00047.html#gac5204b942fd5e6e1d8064262f3ce96b3"> 435</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#gac5204b942fd5e6e1d8064262f3ce96b3">cbor_value_copy_byte_string</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, uint8_t *buffer,</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>&#160; <span class="keywordtype">size_t</span> *buflen, <a class="code" href="a00065.html">CborValue</a> *next)</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span>&#160;{</div><div class="line"><a name="l00438"></a><span class="lineno"> 438</span>&#160; assert(<a class="code" href="a00047.html#gad864d46aa7cfa3d57813da2b242380b4">cbor_value_is_byte_string</a>(value));</div><div class="line"><a name="l00439"></a><span class="lineno"> 439</span>&#160; <span class="keywordflow">return</span> _cbor_value_copy_string(value, buffer, buflen, next);</div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span>&#160;}</div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span>&#160;</div><div class="line"><a name="l00442"></a><span class="lineno"><a class="line" href="a00005.html#a4365a3a12a36871dd84006b9d19fd9ed"> 442</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00005.html#a4365a3a12a36871dd84006b9d19fd9ed">cbor_value_dup_text_string</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, <span class="keywordtype">char</span> **buffer,</div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span>&#160; <span class="keywordtype">size_t</span> *buflen, <a class="code" href="a00065.html">CborValue</a> *next)</div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>&#160;{</div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span>&#160; assert(<a class="code" href="a00047.html#gaed463f5bf4b69d7aec41e6aca9c637ad">cbor_value_is_text_string</a>(value));</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span>&#160; <span class="keywordflow">return</span> _cbor_value_dup_string(value, (<span class="keywordtype">void</span> **)buffer, buflen, next);</div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>&#160;}</div><div class="line"><a name="l00448"></a><span class="lineno"><a class="line" href="a00005.html#adf17ef706737dc8c30d7a424d6bfc4b9"> 448</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00005.html#adf17ef706737dc8c30d7a424d6bfc4b9">cbor_value_dup_byte_string</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, uint8_t **buffer,</div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span>&#160; <span class="keywordtype">size_t</span> *buflen, <a class="code" href="a00065.html">CborValue</a> *next)</div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span>&#160;{</div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span>&#160; assert(<a class="code" href="a00047.html#gad864d46aa7cfa3d57813da2b242380b4">cbor_value_is_byte_string</a>(value));</div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span>&#160; <span class="keywordflow">return</span> _cbor_value_dup_string(value, (<span class="keywordtype">void</span> **)buffer, buflen, next);</div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>&#160;}</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span>&#160;</div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#gac8f08df74d65c8454528824a667550ec">cbor_value_text_string_equals</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">string</span>, <span class="keywordtype">bool</span> *result);</div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>&#160;</div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>&#160;<span class="comment">/* Maps and arrays */</span></div><div class="line"><a name="l00458"></a><span class="lineno"><a class="line" href="a00047.html#gadf427a0fdeb50f7a94d3c3620dd36161"> 458</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">bool</span> <a class="code" href="a00047.html#gadf427a0fdeb50f7a94d3c3620dd36161">cbor_value_is_array</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value)</div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>&#160;{ <span class="keywordflow">return</span> value-&gt;type == CborArrayType; }</div><div class="line"><a name="l00460"></a><span class="lineno"><a class="line" href="a00047.html#ga1b34d5f429a4c77f451391c4f7dff497"> 460</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">bool</span> <a class="code" href="a00047.html#ga1b34d5f429a4c77f451391c4f7dff497">cbor_value_is_map</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value)</div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>&#160;{ <span class="keywordflow">return</span> value-&gt;type == CborMapType; }</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>&#160;</div><div class="line"><a name="l00463"></a><span class="lineno"><a class="line" href="a00047.html#gae3dec7120c8ce4326aea96c6eec6090c"> 463</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#gae3dec7120c8ce4326aea96c6eec6090c">cbor_value_get_array_length</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, <span class="keywordtype">size_t</span> *length)</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>&#160;{</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>&#160; assert(<a class="code" href="a00047.html#gadf427a0fdeb50f7a94d3c3620dd36161">cbor_value_is_array</a>(value));</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span>&#160; <span class="keywordflow">if</span> (!<a class="code" href="a00047.html#ga0422ed961d973d190a19e12a3fe2390f">cbor_value_is_length_known</a>(value))</div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>&#160; <span class="keywordflow">return</span> CborErrorUnknownLength;</div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span>&#160; uint64_t v = _cbor_value_extract_int64_helper(value);</div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span>&#160; *length = (size_t)v;</div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span>&#160; <span class="keywordflow">if</span> (*length != v)</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>&#160; <span class="keywordflow">return</span> CborErrorDataTooLarge;</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>&#160; <span class="keywordflow">return</span> CborNoError;</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>&#160;}</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>&#160;</div><div class="line"><a name="l00475"></a><span class="lineno"><a class="line" href="a00047.html#gad82740107f90881f83e7fb44ed74674b"> 475</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#gad82740107f90881f83e7fb44ed74674b">cbor_value_get_map_length</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, <span class="keywordtype">size_t</span> *length)</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>&#160;{</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>&#160; assert(<a class="code" href="a00047.html#ga1b34d5f429a4c77f451391c4f7dff497">cbor_value_is_map</a>(value));</div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span>&#160; <span class="keywordflow">if</span> (!<a class="code" href="a00047.html#ga0422ed961d973d190a19e12a3fe2390f">cbor_value_is_length_known</a>(value))</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>&#160; <span class="keywordflow">return</span> CborErrorUnknownLength;</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span>&#160; uint64_t v = _cbor_value_extract_int64_helper(value);</div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span>&#160; *length = (size_t)v;</div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span>&#160; <span class="keywordflow">if</span> (*length != v)</div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span>&#160; <span class="keywordflow">return</span> CborErrorDataTooLarge;</div><div class="line"><a name="l00484"></a><span class="lineno"> 484</span>&#160; <span class="keywordflow">return</span> CborNoError;</div><div class="line"><a name="l00485"></a><span class="lineno"> 485</span>&#160;}</div><div class="line"><a name="l00486"></a><span class="lineno"> 486</span>&#160;</div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#gaf145f4513ce734265d0128429cc4d5bd">cbor_value_map_find_value</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *map, <span class="keyword">const</span> <span class="keywordtype">char</span> *<span class="keywordtype">string</span>, <a class="code" href="a00065.html">CborValue</a> *element);</div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span>&#160;</div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>&#160;<span class="comment">/* Floating point */</span></div><div class="line"><a name="l00490"></a><span class="lineno"><a class="line" href="a00047.html#gab44b87547a7c5a028479354d2f66c46c"> 490</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">bool</span> <a class="code" href="a00047.html#gab44b87547a7c5a028479354d2f66c46c">cbor_value_is_half_float</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value)</div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span>&#160;{ <span class="keywordflow">return</span> value-&gt;type == CborHalfFloatType; }</div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#ga566e51dcf54db8eb43ec19e8d31b8c6f">cbor_value_get_half_float</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, <span class="keywordtype">void</span> *result);</div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span>&#160;</div><div class="line"><a name="l00494"></a><span class="lineno"><a class="line" href="a00047.html#gafda7173c376b4789887db1717ef3f1b8"> 494</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">bool</span> <a class="code" href="a00047.html#gafda7173c376b4789887db1717ef3f1b8">cbor_value_is_float</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value)</div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span>&#160;{ <span class="keywordflow">return</span> value-&gt;type == CborFloatType; }</div><div class="line"><a name="l00496"></a><span class="lineno"><a class="line" href="a00047.html#gafcb81c2eeff3cc6dab0f2da699bb564b"> 496</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#gafcb81c2eeff3cc6dab0f2da699bb564b">cbor_value_get_float</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, <span class="keywordtype">float</span> *result)</div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span>&#160;{</div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span>&#160; assert(<a class="code" href="a00047.html#gafda7173c376b4789887db1717ef3f1b8">cbor_value_is_float</a>(value));</div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span>&#160; assert(value-&gt;flags &amp; CborIteratorFlag_IntegerValueTooLarge);</div><div class="line"><a name="l00500"></a><span class="lineno"> 500</span>&#160; uint32_t data = (uint32_t)_cbor_value_decode_int64_internal(value);</div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span>&#160; memcpy(result, &amp;data, <span class="keyword">sizeof</span>(*result));</div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span>&#160; <span class="keywordflow">return</span> CborNoError;</div><div class="line"><a name="l00503"></a><span class="lineno"> 503</span>&#160;}</div><div class="line"><a name="l00504"></a><span class="lineno"> 504</span>&#160;</div><div class="line"><a name="l00505"></a><span class="lineno"><a class="line" href="a00047.html#ga911e93729874ae5a2b4560c5bfe83ec3"> 505</a></span>&#160;CBOR_INLINE_API <span class="keywordtype">bool</span> <a class="code" href="a00047.html#ga911e93729874ae5a2b4560c5bfe83ec3">cbor_value_is_double</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value)</div><div class="line"><a name="l00506"></a><span class="lineno"> 506</span>&#160;{ <span class="keywordflow">return</span> value-&gt;type == CborDoubleType; }</div><div class="line"><a name="l00507"></a><span class="lineno"> 507</span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> cbor_value_get_double(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value, <span class="keywordtype">double</span> *result)</div><div class="line"><a name="l00508"></a><span class="lineno"> 508</span>&#160;{</div><div class="line"><a name="l00509"></a><span class="lineno"> 509</span>&#160; assert(<a class="code" href="a00047.html#ga911e93729874ae5a2b4560c5bfe83ec3">cbor_value_is_double</a>(value));</div><div class="line"><a name="l00510"></a><span class="lineno"> 510</span>&#160; assert(value-&gt;flags &amp; CborIteratorFlag_IntegerValueTooLarge);</div><div class="line"><a name="l00511"></a><span class="lineno"> 511</span>&#160; uint64_t data = _cbor_value_decode_int64_internal(value);</div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span>&#160; memcpy(result, &amp;data, <span class="keyword">sizeof</span>(*result));</div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span>&#160; <span class="keywordflow">return</span> CborNoError;</div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span>&#160;}</div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>&#160;</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span>&#160;<span class="comment">/* Validation API */</span></div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span>&#160;</div><div class="line"><a name="l00518"></a><span class="lineno"><a class="line" href="a00047.html#gac7df91cad1cba43d5d0103284fc390fc"> 518</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="a00047.html#gac7df91cad1cba43d5d0103284fc390fc">CborValidationFlags</a> {</div><div class="line"><a name="l00519"></a><span class="lineno"> 519</span>&#160; <span class="comment">/* Bit mapping:</span></div><div class="line"><a name="l00520"></a><span class="lineno"> 520</span>&#160;<span class="comment"> * bits 0-7 (8 bits): canonical format</span></div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span>&#160;<span class="comment"> * bits 8-11 (4 bits): canonical format &amp; strict mode</span></div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span>&#160;<span class="comment"> * bits 12-20 (8 bits): strict mode</span></div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span>&#160;<span class="comment"> * bits 21-31 (10 bits): other</span></div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span>&#160;</div><div class="line"><a name="l00526"></a><span class="lineno"> 526</span>&#160; CborValidateShortestIntegrals = 0x0001,</div><div class="line"><a name="l00527"></a><span class="lineno"> 527</span>&#160; CborValidateShortestFloatingPoint = 0x0002,</div><div class="line"><a name="l00528"></a><span class="lineno"> 528</span>&#160; CborValidateShortestNumbers = CborValidateShortestIntegrals | CborValidateShortestFloatingPoint,</div><div class="line"><a name="l00529"></a><span class="lineno"> 529</span>&#160; CborValidateNoIndeterminateLength = 0x0100,</div><div class="line"><a name="l00530"></a><span class="lineno"> 530</span>&#160; CborValidateMapIsSorted = 0x0200 | CborValidateNoIndeterminateLength,</div><div class="line"><a name="l00531"></a><span class="lineno"> 531</span>&#160;</div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span>&#160; CborValidateCanonicalFormat = 0x0fff,</div><div class="line"><a name="l00533"></a><span class="lineno"> 533</span>&#160;</div><div class="line"><a name="l00534"></a><span class="lineno"> 534</span>&#160; CborValidateMapKeysAreUnique = 0x1000 | CborValidateMapIsSorted,</div><div class="line"><a name="l00535"></a><span class="lineno"> 535</span>&#160; CborValidateTagUse = 0x2000,</div><div class="line"><a name="l00536"></a><span class="lineno"> 536</span>&#160; CborValidateUtf8 = 0x4000,</div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span>&#160;</div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span>&#160; CborValidateStrictMode = 0xfff00,</div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span>&#160;</div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span>&#160; CborValidateMapKeysAreString = 0x100000,</div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span>&#160; CborValidateNoUndefined = 0x200000,</div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span>&#160; CborValidateNoTags = 0x400000,</div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span>&#160; CborValidateFiniteFloatingPoint = 0x800000,</div><div class="line"><a name="l00544"></a><span class="lineno"> 544</span>&#160; <span class="comment">/* unused = 0x1000000, */</span></div><div class="line"><a name="l00545"></a><span class="lineno"> 545</span>&#160; <span class="comment">/* unused = 0x2000000, */</span></div><div class="line"><a name="l00546"></a><span class="lineno"> 546</span>&#160;</div><div class="line"><a name="l00547"></a><span class="lineno"> 547</span>&#160; CborValidateNoUnknownSimpleTypesSA = 0x4000000,</div><div class="line"><a name="l00548"></a><span class="lineno"> 548</span>&#160; CborValidateNoUnknownSimpleTypes = 0x8000000 | CborValidateNoUnknownSimpleTypesSA,</div><div class="line"><a name="l00549"></a><span class="lineno"> 549</span>&#160; CborValidateNoUnknownTagsSA = 0x10000000,</div><div class="line"><a name="l00550"></a><span class="lineno"> 550</span>&#160; CborValidateNoUnknownTagsSR = 0x20000000 | CborValidateNoUnknownTagsSA,</div><div class="line"><a name="l00551"></a><span class="lineno"> 551</span>&#160; CborValidateNoUnknownTags = 0x40000000 | CborValidateNoUnknownTagsSR,</div><div class="line"><a name="l00552"></a><span class="lineno"> 552</span>&#160;</div><div class="line"><a name="l00553"></a><span class="lineno"> 553</span>&#160; CborValidateCompleteData = (int)0x80000000,</div><div class="line"><a name="l00554"></a><span class="lineno"> 554</span>&#160;</div><div class="line"><a name="l00555"></a><span class="lineno"> 555</span>&#160; CborValidateStrictest = (<span class="keywordtype">int</span>)~0U,</div><div class="line"><a name="l00556"></a><span class="lineno"> 556</span>&#160; CborValidateBasic = 0</div><div class="line"><a name="l00557"></a><span class="lineno"> 557</span>&#160;};</div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span>&#160;</div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00047.html#ga7636f480757b302845ee38227f15cef1">cbor_value_validate</a>(<span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *it, <span class="keywordtype">int</span> flags);</div><div class="line"><a name="l00560"></a><span class="lineno"> 560</span>&#160;</div><div class="line"><a name="l00561"></a><span class="lineno"> 561</span>&#160;<span class="comment">/* Human-readable (dump) API */</span></div><div class="line"><a name="l00562"></a><span class="lineno"> 562</span>&#160;</div><div class="line"><a name="l00563"></a><span class="lineno"><a class="line" href="a00048.html#gacc03414f6f6313d18ae5c56d4167d798"> 563</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="a00048.html#gacc03414f6f6313d18ae5c56d4167d798">CborPrettyFlags</a> {</div><div class="line"><a name="l00564"></a><span class="lineno"> 564</span>&#160; CborPrettyNumericEncodingIndicators = 0x01,</div><div class="line"><a name="l00565"></a><span class="lineno"> 565</span>&#160; CborPrettyTextualEncodingIndicators = 0,</div><div class="line"><a name="l00566"></a><span class="lineno"> 566</span>&#160;</div><div class="line"><a name="l00567"></a><span class="lineno"> 567</span>&#160; CborPrettyIndicateIndeterminateLength = 0x02,</div><div class="line"><a name="l00568"></a><span class="lineno"> 568</span>&#160; CborPrettyIndicateIndetermineLength = CborPrettyIndicateIndeterminateLength, <span class="comment">/* deprecated */</span></div><div class="line"><a name="l00569"></a><span class="lineno"> 569</span>&#160; CborPrettyIndicateOverlongNumbers = 0x04,</div><div class="line"><a name="l00570"></a><span class="lineno"> 570</span>&#160;</div><div class="line"><a name="l00571"></a><span class="lineno"> 571</span>&#160; CborPrettyShowStringFragments = 0x100,</div><div class="line"><a name="l00572"></a><span class="lineno"> 572</span>&#160; CborPrettyMergeStringFragments = 0,</div><div class="line"><a name="l00573"></a><span class="lineno"> 573</span>&#160;</div><div class="line"><a name="l00574"></a><span class="lineno"> 574</span>&#160; CborPrettyDefaultFlags = CborPrettyIndicateIndeterminateLength</div><div class="line"><a name="l00575"></a><span class="lineno"> 575</span>&#160;};</div><div class="line"><a name="l00576"></a><span class="lineno"> 576</span>&#160;</div><div class="line"><a name="l00577"></a><span class="lineno"> 577</span>&#160;<span class="keyword">typedef</span> <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> (*CborStreamFunction)(<span class="keywordtype">void</span> *token, <span class="keyword">const</span> <span class="keywordtype">char</span> *fmt, ...)</div><div class="line"><a name="l00578"></a><span class="lineno"> 578</span>&#160;<span class="preprocessor">#ifdef __GNUC__</span></div><div class="line"><a name="l00579"></a><span class="lineno"> 579</span>&#160; __attribute__((__format__(printf, 2, 3)))</div><div class="line"><a name="l00580"></a><span class="lineno"> 580</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00581"></a><span class="lineno"> 581</span>&#160;;</div><div class="line"><a name="l00582"></a><span class="lineno"> 582</span>&#160;</div><div class="line"><a name="l00583"></a><span class="lineno"> 583</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00048.html#gab43d4414c47f00c74262e0687e23dcda">cbor_value_to_pretty_stream</a>(CborStreamFunction streamFunction, <span class="keywordtype">void</span> *token, <a class="code" href="a00065.html">CborValue</a> *value, <span class="keywordtype">int</span> flags);</div><div class="line"><a name="l00584"></a><span class="lineno"> 584</span>&#160;</div><div class="line"><a name="l00585"></a><span class="lineno"> 585</span>&#160;<span class="comment">/* The following API requires a hosted C implementation (uses FILE*) */</span></div><div class="line"><a name="l00586"></a><span class="lineno"> 586</span>&#160;<span class="preprocessor">#if !defined(__STDC_HOSTED__) || __STDC_HOSTED__-0 == 1</span></div><div class="line"><a name="l00587"></a><span class="lineno"> 587</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00005.html#adba89091b9618b1b6daa22284321cce7">cbor_value_to_pretty_advance_flags</a>(FILE *out, <a class="code" href="a00065.html">CborValue</a> *value, <span class="keywordtype">int</span> flags);</div><div class="line"><a name="l00588"></a><span class="lineno"> 588</span>&#160;CBOR_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00005.html#aef4d5dc4b2bfaf458e82e350509f9c30">cbor_value_to_pretty_advance</a>(FILE *out, <a class="code" href="a00065.html">CborValue</a> *value);</div><div class="line"><a name="l00589"></a><span class="lineno"><a class="line" href="a00005.html#a0529f04ea9045bbd351ea03ee0a21b7b"> 589</a></span>&#160;CBOR_INLINE_API <a class="code" href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a> <a class="code" href="a00005.html#a0529f04ea9045bbd351ea03ee0a21b7b">cbor_value_to_pretty</a>(FILE *out, <span class="keyword">const</span> <a class="code" href="a00065.html">CborValue</a> *value)</div><div class="line"><a name="l00590"></a><span class="lineno"> 590</span>&#160;{</div><div class="line"><a name="l00591"></a><span class="lineno"> 591</span>&#160; <a class="code" href="a00065.html">CborValue</a> copy = *value;</div><div class="line"><a name="l00592"></a><span class="lineno"> 592</span>&#160; <span class="keywordflow">return</span> <a class="code" href="a00005.html#adba89091b9618b1b6daa22284321cce7">cbor_value_to_pretty_advance_flags</a>(out, &amp;copy, CborPrettyDefaultFlags);</div><div class="line"><a name="l00593"></a><span class="lineno"> 593</span>&#160;}</div><div class="line"><a name="l00594"></a><span class="lineno"> 594</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* __STDC_HOSTED__ check */</span><span class="preprocessor"></span></div><div class="line"><a name="l00595"></a><span class="lineno"> 595</span>&#160;</div><div class="line"><a name="l00596"></a><span class="lineno"> 596</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00597"></a><span class="lineno"> 597</span>&#160;}</div><div class="line"><a name="l00598"></a><span class="lineno"> 598</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00599"></a><span class="lineno"> 599</span>&#160;</div><div class="line"><a name="l00600"></a><span class="lineno"> 600</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* CBOR_H */</span><span class="preprocessor"></span></div><div class="line"><a name="l00601"></a><span class="lineno"> 601</span>&#160;</div><div class="ttc" id="a00047_html_gab4c30532c395047b62ccc7c7eeb3a51b"><div class="ttname"><a href="a00047.html#gab4c30532c395047b62ccc7c7eeb3a51b">cbor_value_get_uint64</a></div><div class="ttdeci">CborError cbor_value_get_uint64(const CborValue *value, uint64_t *result)</div><div class="ttdoc">Retrieves the CBOR integer value that value points to and stores it in result. </div><div class="ttdef"><b>Definition:</b> cbor.h:362</div></div>
<div class="ttc" id="a00046_html_ga923a63a01dae47a3dd46f74a3f744008"><div class="ttname"><a href="a00046.html#ga923a63a01dae47a3dd46f74a3f744008">cbor_encode_simple_value</a></div><div class="ttdeci">CBOR_API CborError cbor_encode_simple_value(CborEncoder *encoder, uint8_t value)</div><div class="ttdoc">Appends the CBOR Simple Type of value value to the CBOR stream provided by encoder. </div><div class="ttdef"><b>Definition:</b> cborencoder.c:366</div></div>
<div class="ttc" id="a00047_html_gac5204b942fd5e6e1d8064262f3ce96b3"><div class="ttname"><a href="a00047.html#gac5204b942fd5e6e1d8064262f3ce96b3">cbor_value_copy_byte_string</a></div><div class="ttdeci">CborError cbor_value_copy_byte_string(const CborValue *value, uint8_t *buffer, size_t *buflen, CborValue *next)</div><div class="ttdoc">Copies the string pointed by value into the buffer provided at buffer of buflen bytes. </div><div class="ttdef"><b>Definition:</b> cbor.h:435</div></div>
<div class="ttc" id="a00046_html_ga4fa673c63e85b1fd6f8067aca4ccdde4"><div class="ttname"><a href="a00046.html#ga4fa673c63e85b1fd6f8067aca4ccdde4">cbor_encode_text_string</a></div><div class="ttdeci">CBOR_API CborError cbor_encode_text_string(CborEncoder *encoder, const char *string, size_t length)</div><div class="ttdoc">Appends the byte string string of length length to the CBOR stream provided by encoder. </div><div class="ttdef"><b>Definition:</b> cborencoder.c:452</div></div>
<div class="ttc" id="a00047_html_gaf39519cfc9a8fb64a787348af835569c"><div class="ttname"><a href="a00047.html#gaf39519cfc9a8fb64a787348af835569c">cbor_value_get_string_length</a></div><div class="ttdeci">CborError cbor_value_get_string_length(const CborValue *value, size_t *length)</div><div class="ttdoc">Extracts the length of the byte or text string that value points to and stores it in result...</div><div class="ttdef"><b>Definition:</b> cbor.h:410</div></div>
<div class="ttc" id="a00047_html_ga49bb974313534553ccafb28e5eba46d5"><div class="ttname"><a href="a00047.html#ga49bb974313534553ccafb28e5eba46d5">cbor_value_get_type</a></div><div class="ttdeci">CborType cbor_value_get_type(const CborValue *value)</div><div class="ttdoc">Returns the type of the CBOR value that the iterator value points to. </div><div class="ttdef"><b>Definition:</b> cbor.h:318</div></div>
<div class="ttc" id="a00046_html_gae981ee934ef22ce4c5b52f8069e1b15c"><div class="ttname"><a href="a00046.html#gae981ee934ef22ce4c5b52f8069e1b15c">cbor_encode_float</a></div><div class="ttdeci">CborError cbor_encode_float(CborEncoder *encoder, float value)</div><div class="ttdoc">Appends the IEEE 754 single-precision (32-bit) floating point value value to the CBOR stream provided...</div><div class="ttdef"><b>Definition:</b> cbor.h:240</div></div>
<div class="ttc" id="a00047_html_gae16139e4a8857033b908dad98ddb2ac3"><div class="ttname"><a href="a00047.html#gae16139e4a8857033b908dad98ddb2ac3">cbor_value_get_int64</a></div><div class="ttdeci">CborError cbor_value_get_int64(const CborValue *value, int64_t *result)</div><div class="ttdoc">Retrieves the CBOR integer value that value points to and stores it in result. </div><div class="ttdef"><b>Definition:</b> cbor.h:369</div></div>
<div class="ttc" id="a00046_html_gacb4352260971102dbbd2f2a20e854c57"><div class="ttname"><a href="a00046.html#gacb4352260971102dbbd2f2a20e854c57">cbor_encoder_close_container</a></div><div class="ttdeci">CBOR_API CborError cbor_encoder_close_container(CborEncoder *encoder, const CborEncoder *containerEncoder)</div><div class="ttdoc">Closes the CBOR container (array or map) provided by containerEncoder and updates the CBOR stream pro...</div><div class="ttdef"><b>Definition:</b> cborencoder.c:540</div></div>
<div class="ttc" id="a00047_html_gac8f08df74d65c8454528824a667550ec"><div class="ttname"><a href="a00047.html#gac8f08df74d65c8454528824a667550ec">cbor_value_text_string_equals</a></div><div class="ttdeci">CBOR_API CborError cbor_value_text_string_equals(const CborValue *value, const char *string, bool *result)</div><div class="ttdoc">Compares the entry value with the string string and stores the result in result. </div><div class="ttdef"><b>Definition:</b> cborparser.c:1216</div></div>
<div class="ttc" id="a00045_html_ga46c29d9d57408740dc269d6125d37d26"><div class="ttname"><a href="a00045.html#ga46c29d9d57408740dc269d6125d37d26">CborTag</a></div><div class="ttdeci">uint64_t CborTag</div><div class="ttdoc">This typedef is an unsigned 64-bit integer. </div><div class="ttdef"><b>Definition:</b> cbor.h:100</div></div>
<div class="ttc" id="a00047_html_ga30c4dc9fb923feac58d962b02aeecd41"><div class="ttname"><a href="a00047.html#ga30c4dc9fb923feac58d962b02aeecd41">cbor_value_get_raw_integer</a></div><div class="ttdeci">CborError cbor_value_get_raw_integer(const CborValue *value, uint64_t *result)</div><div class="ttdoc">Retrieves the CBOR integer value that value points to and stores it in result. </div><div class="ttdef"><b>Definition:</b> cbor.h:355</div></div>
<div class="ttc" id="a00045_html_ga38f51ceba8bc8a9b1cf7dd31e3f9c178"><div class="ttname"><a href="a00045.html#ga38f51ceba8bc8a9b1cf7dd31e3f9c178">CborType</a></div><div class="ttdeci">CborType</div><div class="ttdoc">The CborType enum contains the types known to TinyCBOR. </div><div class="ttdef"><b>Definition:</b> cbor.h:82</div></div>
<div class="ttc" id="a00047_html_gadf427a0fdeb50f7a94d3c3620dd36161"><div class="ttname"><a href="a00047.html#gadf427a0fdeb50f7a94d3c3620dd36161">cbor_value_is_array</a></div><div class="ttdeci">bool cbor_value_is_array(const CborValue *value)</div><div class="ttdoc">Returns true if the iterator value is valid and points to a CBOR array. </div><div class="ttdef"><b>Definition:</b> cbor.h:458</div></div>
<div class="ttc" id="a00045_html_gade6fa23a8fb3df9db434c69ca05d5ec1"><div class="ttname"><a href="a00045.html#gade6fa23a8fb3df9db434c69ca05d5ec1">CborKnownTags</a></div><div class="ttdeci">CborKnownTags</div><div class="ttdoc">The CborKnownTags enum contains known tags specified in RFC 7049, for use by the application. </div><div class="ttdef"><b>Definition:</b> cbor.h:101</div></div>
<div class="ttc" id="a00046_html_ga0e84daa854e0480f4a3758bcb46b9b60"><div class="ttname"><a href="a00046.html#ga0e84daa854e0480f4a3758bcb46b9b60">cbor_encode_negative_int</a></div><div class="ttdeci">CBOR_API CborError cbor_encode_negative_int(CborEncoder *encoder, uint64_t absolute_value)</div><div class="ttdoc">Appends the negative 64-bit integer whose absolute value is absolute_value to the CBOR stream provide...</div><div class="ttdef"><b>Definition:</b> cborencoder.c:339</div></div>
<div class="ttc" id="a00047_html_ga033d3d2c9570501cf9dce099fe98e863"><div class="ttname"><a href="a00047.html#ga033d3d2c9570501cf9dce099fe98e863">cbor_value_get_simple_type</a></div><div class="ttdeci">CborError cbor_value_get_simple_type(const CborValue *value, uint8_t *result)</div><div class="ttdoc">Retrieves the CBOR Simple Type value that value points to and stores it in result. </div><div class="ttdef"><b>Definition:</b> cbor.h:340</div></div>
<div class="ttc" id="a00005_html_a4365a3a12a36871dd84006b9d19fd9ed"><div class="ttname"><a href="a00005.html#a4365a3a12a36871dd84006b9d19fd9ed">cbor_value_dup_text_string</a></div><div class="ttdeci">CborError cbor_value_dup_text_string(const CborValue *value, char **buffer, size_t *buflen, CborValue *next)</div><div class="ttdoc">Allocates memory for the string pointed by value and copies it into this buffer. </div><div class="ttdef"><b>Definition:</b> cbor.h:442</div></div>
<div class="ttc" id="a00046_html_gac56f8c2ad79916f2719acb24f049cde5"><div class="ttname"><a href="a00046.html#gac56f8c2ad79916f2719acb24f049cde5">cbor_encode_floating_point</a></div><div class="ttdeci">CBOR_API CborError cbor_encode_floating_point(CborEncoder *encoder, CborType fpType, const void *value)</div><div class="ttdoc">Appends the floating-point value of type fpType and pointed to by value to the CBOR stream provided b...</div><div class="ttdef"><b>Definition:</b> cborencoder.c:387</div></div>
<div class="ttc" id="a00048_html_gacc03414f6f6313d18ae5c56d4167d798"><div class="ttname"><a href="a00048.html#gacc03414f6f6313d18ae5c56d4167d798">CborPrettyFlags</a></div><div class="ttdeci">CborPrettyFlags</div><div class="ttdoc">The CborPrettyFlags enum contains flags that control the conversion of CBOR to text format...</div><div class="ttdef"><b>Definition:</b> cbor.h:563</div></div>
<div class="ttc" id="a00045_html_ga76e9c9acc63dd940da4ab7e91309f7b5"><div class="ttname"><a href="a00045.html#ga76e9c9acc63dd940da4ab7e91309f7b5">CborError</a></div><div class="ttdeci">CborError</div><div class="ttdoc">The CborError enum contains the possible error values used by the CBOR encoder and decoder...</div><div class="ttdef"><b>Definition:</b> cbor.h:152</div></div>
<div class="ttc" id="a00047_html_ga5bd9f8ab2b61aaeb31fd9b724622f0df"><div class="ttname"><a href="a00047.html#ga5bd9f8ab2b61aaeb31fd9b724622f0df">cbor_value_get_int64_checked</a></div><div class="ttdeci">CBOR_API CborError cbor_value_get_int64_checked(const CborValue *value, int64_t *result)</div><div class="ttdoc">Retrieves the CBOR integer value that value points to and stores it in result. </div><div class="ttdef"><b>Definition:</b> cborparser.c:816</div></div>
<div class="ttc" id="a00005_html_aef4d5dc4b2bfaf458e82e350509f9c30"><div class="ttname"><a href="a00005.html#aef4d5dc4b2bfaf458e82e350509f9c30">cbor_value_to_pretty_advance</a></div><div class="ttdeci">CBOR_API CborError cbor_value_to_pretty_advance(FILE *out, CborValue *value)</div><div class="ttdoc">Converts the current CBOR type pointed to by value to its textual representation and writes it to the...</div><div class="ttdef"><b>Definition:</b> cborpretty_stdio.c:63</div></div>
<div class="ttc" id="a00047_html_gaf9b7aba18f57c255e744b874645ac9be"><div class="ttname"><a href="a00047.html#gaf9b7aba18f57c255e744b874645ac9be">cbor_value_get_int_checked</a></div><div class="ttdeci">CBOR_API CborError cbor_value_get_int_checked(const CborValue *value, int *result)</div><div class="ttdoc">Retrieves the CBOR integer value that value points to and stores it in result. </div><div class="ttdef"><b>Definition:</b> cborparser.c:855</div></div>
<div class="ttc" id="a00047_html_ga02ec0b5c8346f407cf5def566ddcf5ae"><div class="ttname"><a href="a00047.html#ga02ec0b5c8346f407cf5def566ddcf5ae">cbor_value_copy_text_string</a></div><div class="ttdeci">CborError cbor_value_copy_text_string(const CborValue *value, char *buffer, size_t *buflen, CborValue *next)</div><div class="ttdoc">Copies the string pointed to by value into the buffer provided at buffer of buflen bytes...</div><div class="ttdef"><b>Definition:</b> cbor.h:429</div></div>
<div class="ttc" id="a00046_html_ga1260b72bb0f067fd3c68d49a6b5f58d0"><div class="ttname"><a href="a00046.html#ga1260b72bb0f067fd3c68d49a6b5f58d0">cbor_encode_byte_string</a></div><div class="ttdeci">CBOR_API CborError cbor_encode_byte_string(CborEncoder *encoder, const uint8_t *string, size_t length)</div><div class="ttdoc">Appends the text string string of length length to the CBOR stream provided by encoder. </div><div class="ttdef"><b>Definition:</b> cborencoder.c:441</div></div>
<div class="ttc" id="a00046_html_ga257051966d907f88af804f30f2e9d8e2"><div class="ttname"><a href="a00046.html#ga257051966d907f88af804f30f2e9d8e2">cbor_encoder_init</a></div><div class="ttdeci">CBOR_API void cbor_encoder_init(CborEncoder *encoder, uint8_t *buffer, size_t size, int flags)</div><div class="ttdoc">Initializes a CborEncoder structure encoder by pointing it to buffer buffer of size size...</div><div class="ttdef"><b>Definition:</b> cborencoder.c:203</div></div>
<div class="ttc" id="a00046_html_ga753c2f9e09db7fa9317f1c1f19a16342"><div class="ttname"><a href="a00046.html#ga753c2f9e09db7fa9317f1c1f19a16342">cbor_encoder_get_buffer_size</a></div><div class="ttdeci">size_t cbor_encoder_get_buffer_size(const CborEncoder *encoder, const uint8_t *buffer)</div><div class="ttdoc">Returns the total size of the buffer starting at buffer after the encoding finished without errors...</div><div class="ttdef"><b>Definition:</b> cbor.h:255</div></div>
<div class="ttc" id="a00047_html_gafda7173c376b4789887db1717ef3f1b8"><div class="ttname"><a href="a00047.html#gafda7173c376b4789887db1717ef3f1b8">cbor_value_is_float</a></div><div class="ttdeci">bool cbor_value_is_float(const CborValue *value)</div><div class="ttdoc">Returns true if the iterator value is valid and points to a CBOR single-precision floating point (32-...</div><div class="ttdef"><b>Definition:</b> cbor.h:494</div></div>
<div class="ttc" id="a00047_html_ga3ea2ca067d876ca95251005f4ad696b0"><div class="ttname"><a href="a00047.html#ga3ea2ca067d876ca95251005f4ad696b0">cbor_value_is_integer</a></div><div class="ttdeci">bool cbor_value_is_integer(const CborValue *value)</div><div class="ttdoc">Returns true if the iterator value is valid and points to a CBOR integer type. </div><div class="ttdef"><b>Definition:</b> cbor.h:348</div></div>
<div class="ttc" id="a00047_html_ga4ee8cd4c95df1d788f5ef8fee6ac101a"><div class="ttname"><a href="a00047.html#ga4ee8cd4c95df1d788f5ef8fee6ac101a">cbor_value_get_tag</a></div><div class="ttdeci">CborError cbor_value_get_tag(const CborValue *value, CborTag *result)</div><div class="ttdoc">Retrieves the CBOR tag value that value points to and stores it in result. </div><div class="ttdef"><b>Definition:</b> cbor.h:396</div></div>
<div class="ttc" id="a00047_html_ga283d20b9bd9787647841dd245d486b1d"><div class="ttname"><a href="a00047.html#ga283d20b9bd9787647841dd245d486b1d">cbor_value_is_tag</a></div><div class="ttdeci">bool cbor_value_is_tag(const CborValue *value)</div><div class="ttdoc">Returns true if the iterator value is valid and points to a CBOR tag. </div><div class="ttdef"><b>Definition:</b> cbor.h:394</div></div>
<div class="ttc" id="a00045_html_gad4519e8ab62ea64773fa6dce00c361dc"><div class="ttname"><a href="a00045.html#gad4519e8ab62ea64773fa6dce00c361dc">cbor_error_string</a></div><div class="ttdeci">CBOR_API const char * cbor_error_string(CborError error)</div><div class="ttdoc">Returns the error string corresponding to the CBOR error condition error. </div><div class="ttdef"><b>Definition:</b> cborerrorstrings.c:80</div></div>
<div class="ttc" id="a00046_html_ga2b898ce6f5821c5aba8b6f0020c4b5ba"><div class="ttname"><a href="a00046.html#ga2b898ce6f5821c5aba8b6f0020c4b5ba">cbor_encode_uint</a></div><div class="ttdeci">CBOR_API CborError cbor_encode_uint(CborEncoder *encoder, uint64_t value)</div><div class="ttdoc">Appends the unsigned 64-bit integer value to the CBOR stream provided by encoder. ...</div><div class="ttdef"><b>Definition:</b> cborencoder.c:326</div></div>
<div class="ttc" id="a00047_html_gad864d46aa7cfa3d57813da2b242380b4"><div class="ttname"><a href="a00047.html#gad864d46aa7cfa3d57813da2b242380b4">cbor_value_is_byte_string</a></div><div class="ttdeci">bool cbor_value_is_byte_string(const CborValue *value)</div><div class="ttdoc">Returns true if the iterator value is valid and points to a CBOR text string. </div><div class="ttdef"><b>Definition:</b> cbor.h:405</div></div>
<div class="ttc" id="a00046_html_ga97b4d15feaa128ed900704523979bd3f"><div class="ttname"><a href="a00046.html#ga97b4d15feaa128ed900704523979bd3f">cbor_encoder_create_array</a></div><div class="ttdeci">CBOR_API CborError cbor_encoder_create_array(CborEncoder *encoder, CborEncoder *arrayEncoder, size_t length)</div><div class="ttdoc">Creates a CBOR array in the CBOR stream provided by encoder and initializes arrayEncoder so that item...</div><div class="ttdef"><b>Definition:</b> cborencoder.c:497</div></div>
<div class="ttc" id="a00047_html_gae8bf13b3880863cf5c8a0bddf52426e6"><div class="ttname"><a href="a00047.html#gae8bf13b3880863cf5c8a0bddf52426e6">cbor_value_is_valid</a></div><div class="ttdeci">bool cbor_value_is_valid(const CborValue *value)</div><div class="ttdoc">Returns true if the iterator it contains a valid value. </div><div class="ttdef"><b>Definition:</b> cbor.h:316</div></div>
<div class="ttc" id="a00046_html_gad8e5a125cfaceb9a32528e620e003bc6"><div class="ttname"><a href="a00046.html#gad8e5a125cfaceb9a32528e620e003bc6">cbor_encode_half_float</a></div><div class="ttdeci">CborError cbor_encode_half_float(CborEncoder *encoder, const void *value)</div><div class="ttdoc">Appends the IEEE 754 half-precision (16-bit) floating point value pointed to by value to the CBOR str...</div><div class="ttdef"><b>Definition:</b> cbor.h:238</div></div>
<div class="ttc" id="a00047_html_gab44b87547a7c5a028479354d2f66c46c"><div class="ttname"><a href="a00047.html#gab44b87547a7c5a028479354d2f66c46c">cbor_value_is_half_float</a></div><div class="ttdeci">bool cbor_value_is_half_float(const CborValue *value)</div><div class="ttdoc">Returns true if the iterator value is valid and points to a CBOR single-precision floating point (16-...</div><div class="ttdef"><b>Definition:</b> cbor.h:490</div></div>
<div class="ttc" id="a00047_html_ga19b60bc2cff3d3ffcc81adbcad09fd58"><div class="ttname"><a href="a00047.html#ga19b60bc2cff3d3ffcc81adbcad09fd58">cbor_value_validate_basic</a></div><div class="ttdeci">CBOR_API CborError cbor_value_validate_basic(const CborValue *it)</div><div class="ttdoc">Performs a basic validation of the CBOR stream pointed by it and returns the error it found...</div><div class="ttdef"><b>Definition:</b> cborparser.c:450</div></div>
<div class="ttc" id="a00047_html_ga7636f480757b302845ee38227f15cef1"><div class="ttname"><a href="a00047.html#ga7636f480757b302845ee38227f15cef1">cbor_value_validate</a></div><div class="ttdeci">CBOR_API CborError cbor_value_validate(const CborValue *it, int flags)</div><div class="ttdoc">Performs a full validation, controlled by the flags options, of the CBOR stream pointed by it and ret...</div><div class="ttdef"><b>Definition:</b> cborvalidation.c:651</div></div>
<div class="ttc" id="a00047_html_gade7bfd61f35e448b1119d9bcfce234c0"><div class="ttname"><a href="a00047.html#gade7bfd61f35e448b1119d9bcfce234c0">cbor_value_get_boolean</a></div><div class="ttdeci">CborError cbor_value_get_boolean(const CborValue *value, bool *result)</div><div class="ttdoc">Retrieves the boolean value that value points to and stores it in result. </div><div class="ttdef"><b>Definition:</b> cbor.h:330</div></div>
<div class="ttc" id="a00045_html_gadc05d7725df5c9a2995580e2be0e5b57"><div class="ttname"><a href="a00045.html#gadc05d7725df5c9a2995580e2be0e5b57">CborIndefiniteLength</a></div><div class="ttdeci">static const size_t CborIndefiniteLength</div><div class="ttdoc">This variable is a constant used to indicate that the length of the map or array is not yet determine...</div><div class="ttdef"><b>Definition:</b> cbor.h:217</div></div>
<div class="ttc" id="a00047_html_gad82740107f90881f83e7fb44ed74674b"><div class="ttname"><a href="a00047.html#gad82740107f90881f83e7fb44ed74674b">cbor_value_get_map_length</a></div><div class="ttdeci">CborError cbor_value_get_map_length(const CborValue *value, size_t *length)</div><div class="ttdoc">Extracts the length of the CBOR map that value points to and stores it in result. ...</div><div class="ttdef"><b>Definition:</b> cbor.h:475</div></div>
<div class="ttc" id="a00047_html_ga0f85ec6748006a36c237a79d6f223b29"><div class="ttname"><a href="a00047.html#ga0f85ec6748006a36c237a79d6f223b29">cbor_value_is_boolean</a></div><div class="ttdeci">bool cbor_value_is_boolean(const CborValue *value)</div><div class="ttdoc">Returns true if the iterator value is valid and points to a CBOR boolean type (true or false)...</div><div class="ttdef"><b>Definition:</b> cbor.h:328</div></div>
<div class="ttc" id="a00047_html_gac6aaf9010ea974034fe62b4670e44235"><div class="ttname"><a href="a00047.html#gac6aaf9010ea974034fe62b4670e44235">cbor_value_is_unsigned_integer</a></div><div class="ttdeci">bool cbor_value_is_unsigned_integer(const CborValue *value)</div><div class="ttdoc">Returns true if the iterator value is valid and points to a CBOR unsigned integer type (positive valu...</div><div class="ttdef"><b>Definition:</b> cbor.h:350</div></div>
<div class="ttc" id="a00047_html_ga0c8a61e484973272f34b00cfbef9ddfd"><div class="ttname"><a href="a00047.html#ga0c8a61e484973272f34b00cfbef9ddfd">cbor_value_enter_container</a></div><div class="ttdeci">CBOR_API CborError cbor_value_enter_container(const CborValue *it, CborValue *recursed)</div><div class="ttdoc">Creates a CborValue iterator pointing to the first element of the container represented by it and sav...</div><div class="ttdef"><b>Definition:</b> cborparser.c:585</div></div>
<div class="ttc" id="a00047_html_gac0701f791608589ddfff0bdb8acee7b4"><div class="ttname"><a href="a00047.html#gac0701f791608589ddfff0bdb8acee7b4">cbor_value_advance_fixed</a></div><div class="ttdeci">CBOR_API CborError cbor_value_advance_fixed(CborValue *it)</div><div class="ttdoc">Advances the CBOR value it by one fixed-size position. </div><div class="ttdef"><b>Definition:</b> cborparser.c:471</div></div>
<div class="ttc" id="a00047_html_gae3dec7120c8ce4326aea96c6eec6090c"><div class="ttname"><a href="a00047.html#gae3dec7120c8ce4326aea96c6eec6090c">cbor_value_get_array_length</a></div><div class="ttdeci">CborError cbor_value_get_array_length(const CborValue *value, size_t *length)</div><div class="ttdoc">Extracts the length of the CBOR array that value points to and stores it in result. </div><div class="ttdef"><b>Definition:</b> cbor.h:463</div></div>
<div class="ttc" id="a00047_html_gaaecdd62ea0656b7c4b367b19648ac79b"><div class="ttname"><a href="a00047.html#gaaecdd62ea0656b7c4b367b19648ac79b">cbor_value_is_negative_integer</a></div><div class="ttdeci">bool cbor_value_is_negative_integer(const CborValue *value)</div><div class="ttdoc">Returns true if the iterator value is valid and points to a CBOR negative integer type...</div><div class="ttdef"><b>Definition:</b> cbor.h:352</div></div>
<div class="ttc" id="a00047_html_gac7df91cad1cba43d5d0103284fc390fc"><div class="ttname"><a href="a00047.html#gac7df91cad1cba43d5d0103284fc390fc">CborValidationFlags</a></div><div class="ttdeci">CborValidationFlags</div><div class="ttdoc"> The CborValidationFlags enum contains flags that control the validation of a CBOR stream...</div><div class="ttdef"><b>Definition:</b> cbor.h:518</div></div>
<div class="ttc" id="a00046_html_ga77b579b1a5a867fc0712e46bb4eb3200"><div class="ttname"><a href="a00046.html#ga77b579b1a5a867fc0712e46bb4eb3200">cbor_encode_tag</a></div><div class="ttdeci">CBOR_API CborError cbor_encode_tag(CborEncoder *encoder, CborTag tag)</div><div class="ttdoc">Appends the CBOR tag tag to the CBOR stream provided by encoder. </div><div class="ttdef"><b>Definition:</b> cborencoder.c:409</div></div>
<div class="ttc" id="a00048_html_gab43d4414c47f00c74262e0687e23dcda"><div class="ttname"><a href="a00048.html#gab43d4414c47f00c74262e0687e23dcda">cbor_value_to_pretty_stream</a></div><div class="ttdeci">CBOR_API CborError cbor_value_to_pretty_stream(CborStreamFunction streamFunction, void *token, CborValue *value, int flags)</div><div class="ttdoc">Converts the current CBOR type pointed by value to its textual representation and writes it to the st...</div><div class="ttdef"><b>Definition:</b> cborpretty.c:526</div></div>
<div class="ttc" id="a00005_html_a0529f04ea9045bbd351ea03ee0a21b7b"><div class="ttname"><a href="a00005.html#a0529f04ea9045bbd351ea03ee0a21b7b">cbor_value_to_pretty</a></div><div class="ttdeci">CborError cbor_value_to_pretty(FILE *out, const CborValue *value)</div><div class="ttdoc">Converts the current CBOR type pointed to by value to its textual representation and writes it to the...</div><div class="ttdef"><b>Definition:</b> cbor.h:589</div></div>
<div class="ttc" id="a00046_html_ga30b769ff1da73ed8b4536f551347c5ed"><div class="ttname"><a href="a00046.html#ga30b769ff1da73ed8b4536f551347c5ed">cbor_encode_null</a></div><div class="ttdeci">CborError cbor_encode_null(CborEncoder *encoder)</div><div class="ttdoc">Appends the CBOR type representing a null value to the CBOR stream provided by encoder. </div><div class="ttdef"><b>Definition:</b> cbor.h:233</div></div>
<div class="ttc" id="a00046_html_gad4a5ef2d574b5ac30d18ba696e219340"><div class="ttname"><a href="a00046.html#gad4a5ef2d574b5ac30d18ba696e219340">cbor_encoder_create_map</a></div><div class="ttdeci">CBOR_API CborError cbor_encoder_create_map(CborEncoder *encoder, CborEncoder *mapEncoder, size_t length)</div><div class="ttdoc">Creates a CBOR map in the CBOR stream provided by encoder and initializes mapEncoder so that items ca...</div><div class="ttdef"><b>Definition:</b> cborencoder.c:521</div></div>
<div class="ttc" id="a00046_html_gafc9abf6503d40787c3fd637a86bc0fb6"><div class="ttname"><a href="a00046.html#gafc9abf6503d40787c3fd637a86bc0fb6">cbor_encoder_get_extra_bytes_needed</a></div><div class="ttdeci">size_t cbor_encoder_get_extra_bytes_needed(const CborEncoder *encoder)</div><div class="ttdoc">Returns how many more bytes the original buffer supplied to cbor_encoder_init() needs to be extended ...</div><div class="ttdef"><b>Definition:</b> cbor.h:260</div></div>
<div class="ttc" id="a00047_html_gaf3da16a547bcb54d3ad2ca70cf0f4341"><div class="ttname"><a href="a00047.html#gaf3da16a547bcb54d3ad2ca70cf0f4341">cbor_value_is_container</a></div><div class="ttdeci">bool cbor_value_is_container(const CborValue *it)</div><div class="ttdoc">Returns true if the it value is a container and requires recursion in order to decode (maps and array...</div><div class="ttdef"><b>Definition:</b> cbor.h:304</div></div>
<div class="ttc" id="a00047_html_ga1079ce3272f905c3d4a20821507be6f6"><div class="ttname"><a href="a00047.html#ga1079ce3272f905c3d4a20821507be6f6">cbor_value_is_undefined</a></div><div class="ttdeci">bool cbor_value_is_undefined(const CborValue *value)</div><div class="ttdoc">Returns true if the iterator value is valid and points to a CBOR undefined type. </div><div class="ttdef"><b>Definition:</b> cbor.h:324</div></div>
<div class="ttc" id="a00046_html_ga211aa80dc5b793ee8dd74d24cb9e7ca6"><div class="ttname"><a href="a00046.html#ga211aa80dc5b793ee8dd74d24cb9e7ca6">cbor_encode_double</a></div><div class="ttdeci">CborError cbor_encode_double(CborEncoder *encoder, double value)</div><div class="ttdoc">Appends the IEEE 754 double-precision (64-bit) floating point value value to the CBOR stream provided...</div><div class="ttdef"><b>Definition:</b> cbor.h:242</div></div>
<div class="ttc" id="a00046_html_ga6df3eff486535322f66584dc5431f9e9"><div class="ttname"><a href="a00046.html#ga6df3eff486535322f66584dc5431f9e9">cbor_encode_text_stringz</a></div><div class="ttdeci">CborError cbor_encode_text_stringz(CborEncoder *encoder, const char *string)</div><div class="ttdoc">Appends the null-terminated text string string to the CBOR stream provided by encoder. </div><div class="ttdef"><b>Definition:</b> cbor.h:226</div></div>
<div class="ttc" id="a00046_html_ga857154b97cad978f4afb3e2f809051bd"><div class="ttname"><a href="a00046.html#ga857154b97cad978f4afb3e2f809051bd">cbor_encode_boolean</a></div><div class="ttdeci">CborError cbor_encode_boolean(CborEncoder *encoder, bool value)</div><div class="ttdoc">Appends the boolean value value to the CBOR stream provided by encoder. </div><div class="ttdef"><b>Definition:</b> cbor.h:231</div></div>
<div class="ttc" id="a00047_html_ga49bd2a99edcceb72962eedc7584cd19c"><div class="ttname"><a href="a00047.html#ga49bd2a99edcceb72962eedc7584cd19c">cbor_value_at_end</a></div><div class="ttdeci">bool cbor_value_at_end(const CborValue *it)</div><div class="ttdoc">Returns true if it has reached the end of the iteration, usually when advancing after the last item i...</div><div class="ttdef"><b>Definition:</b> cbor.h:298</div></div>
<div class="ttc" id="a00046_html_ga9d9f0668e2cf69352a45095006efab4f"><div class="ttname"><a href="a00046.html#ga9d9f0668e2cf69352a45095006efab4f">cbor_encode_undefined</a></div><div class="ttdeci">CborError cbor_encode_undefined(CborEncoder *encoder)</div><div class="ttdoc">Appends the CBOR type representing an undefined value to the CBOR stream provided by encoder...</div><div class="ttdef"><b>Definition:</b> cbor.h:235</div></div>
<div class="ttc" id="a00047_html_gabf95f402facf8436989b830f1dd4b06a"><div class="ttname"><a href="a00047.html#gabf95f402facf8436989b830f1dd4b06a">cbor_value_get_int</a></div><div class="ttdeci">CborError cbor_value_get_int(const CborValue *value, int *result)</div><div class="ttdoc">Retrieves the CBOR integer value that value points to and stores it in result. </div><div class="ttdef"><b>Definition:</b> cbor.h:378</div></div>
<div class="ttc" id="a00047_html_gadb356bb705f2d8239f03b36081a43b4f"><div class="ttname"><a href="a00047.html#gadb356bb705f2d8239f03b36081a43b4f">cbor_parser_init</a></div><div class="ttdeci">CBOR_API CborError cbor_parser_init(const uint8_t *buffer, size_t size, int flags, CborParser *parser, CborValue *it)</div><div class="ttdoc">Initializes the CBOR parser for parsing size bytes beginning at buffer. </div><div class="ttdef"><b>Definition:</b> cborparser.c:375</div></div>
<div class="ttc" id="a00047_html_ga11f38fada70d371257f7b51f311e8826"><div class="ttname"><a href="a00047.html#ga11f38fada70d371257f7b51f311e8826">cbor_value_is_null</a></div><div class="ttdeci">bool cbor_value_is_null(const CborValue *value)</div><div class="ttdoc">Returns true if the iterator value is valid and points to a CBOR null type. </div><div class="ttdef"><b>Definition:</b> cbor.h:322</div></div>
<div class="ttc" id="a00047_html_ga51e02f0b62bc864fe8cf290988936e15"><div class="ttname"><a href="a00047.html#ga51e02f0b62bc864fe8cf290988936e15">cbor_value_leave_container</a></div><div class="ttdeci">CBOR_API CborError cbor_value_leave_container(CborValue *it, const CborValue *recursed)</div><div class="ttdoc">Updates it to point to the next element after the container. </div><div class="ttdef"><b>Definition:</b> cborparser.c:634</div></div>
<div class="ttc" id="a00005_html_adba89091b9618b1b6daa22284321cce7"><div class="ttname"><a href="a00005.html#adba89091b9618b1b6daa22284321cce7">cbor_value_to_pretty_advance_flags</a></div><div class="ttdeci">CBOR_API CborError cbor_value_to_pretty_advance_flags(FILE *out, CborValue *value, int flags)</div><div class="ttdoc">Converts the current CBOR type pointed to by value to its textual representation and writes it to the...</div><div class="ttdef"><b>Definition:</b> cborpretty_stdio.c:83</div></div>
<div class="ttc" id="a00047_html_gae2ede5aacd59f04437c24ef8ca2f449a"><div class="ttname"><a href="a00047.html#gae2ede5aacd59f04437c24ef8ca2f449a">cbor_value_advance</a></div><div class="ttdeci">CBOR_API CborError cbor_value_advance(CborValue *it)</div><div class="ttdoc">Advances the CBOR value it by one element, skipping over containers. </div><div class="ttdef"><b>Definition:</b> cborparser.c:522</div></div>
<div class="ttc" id="a00047_html_ga911e93729874ae5a2b4560c5bfe83ec3"><div class="ttname"><a href="a00047.html#ga911e93729874ae5a2b4560c5bfe83ec3">cbor_value_is_double</a></div><div class="ttdeci">bool cbor_value_is_double(const CborValue *value)</div><div class="ttdoc">Returns true if the iterator value is valid and points to a CBOR double-precision floating point (64-...</div><div class="ttdef"><b>Definition:</b> cbor.h:505</div></div>
<div class="ttc" id="a00047_html_gaf145f4513ce734265d0128429cc4d5bd"><div class="ttname"><a href="a00047.html#gaf145f4513ce734265d0128429cc4d5bd">cbor_value_map_find_value</a></div><div class="ttdeci">CBOR_API CborError cbor_value_map_find_value(const CborValue *map, const char *string, CborValue *element)</div><div class="ttdoc">Attempts to find the value in map map that corresponds to the text string entry string. </div><div class="ttdef"><b>Definition:</b> cborparser.c:1303</div></div>
<div class="ttc" id="a00065_html"><div class="ttname"><a href="a00065.html">CborValue</a></div><div class="ttdoc">This type contains one value parsed from the CBOR stream. </div><div class="ttdef"><b>Definition:</b> cbor.h:283</div></div>
<div class="ttc" id="a00046_html_gaa597ba3b072473a41448e131ca20a66b"><div class="ttname"><a href="a00046.html#gaa597ba3b072473a41448e131ca20a66b">cbor_encoder_close_container_checked</a></div><div class="ttdeci">CBOR_API CborError cbor_encoder_close_container_checked(CborEncoder *encoder, const CborEncoder *containerEncoder)</div><div class="ttdef"><b>Definition:</b> cborencoder_close_container_checked.c:52</div></div>
<div class="ttc" id="a00005_html_adf17ef706737dc8c30d7a424d6bfc4b9"><div class="ttname"><a href="a00005.html#adf17ef706737dc8c30d7a424d6bfc4b9">cbor_value_dup_byte_string</a></div><div class="ttdeci">CborError cbor_value_dup_byte_string(const CborValue *value, uint8_t **buffer, size_t *buflen, CborValue *next)</div><div class="ttdoc">Allocates memory for the string pointed by value and copies it into this buffer. </div><div class="ttdef"><b>Definition:</b> cbor.h:448</div></div>
<div class="ttc" id="a00053_html"><div class="ttname"><a href="a00053.html">CborEncoder</a></div><div class="ttdoc">Structure used to encode to CBOR. </div><div class="ttdef"><b>Definition:</b> cbor.h:205</div></div>
<div class="ttc" id="a00047_html_ga0422ed961d973d190a19e12a3fe2390f"><div class="ttname"><a href="a00047.html#ga0422ed961d973d190a19e12a3fe2390f">cbor_value_is_length_known</a></div><div class="ttdeci">bool cbor_value_is_length_known(const CborValue *value)</div><div class="ttdoc">Returns true if the length of this type is known without calculation. </div><div class="ttdef"><b>Definition:</b> cbor.h:390</div></div>
<div class="ttc" id="a00047_html_gafcb81c2eeff3cc6dab0f2da699bb564b"><div class="ttname"><a href="a00047.html#gafcb81c2eeff3cc6dab0f2da699bb564b">cbor_value_get_float</a></div><div class="ttdeci">CborError cbor_value_get_float(const CborValue *value, float *result)</div><div class="ttdoc">Retrieves the CBOR single-precision floating point (32-bit) value that value points to and stores it ...</div><div class="ttdef"><b>Definition:</b> cbor.h:496</div></div>
<div class="ttc" id="a00047_html_ga566e51dcf54db8eb43ec19e8d31b8c6f"><div class="ttname"><a href="a00047.html#ga566e51dcf54db8eb43ec19e8d31b8c6f">cbor_value_get_half_float</a></div><div class="ttdeci">CBOR_API CborError cbor_value_get_half_float(const CborValue *value, void *result)</div><div class="ttdoc">Retrieves the CBOR half-precision floating point (16-bit) value that value points to and stores it in...</div><div class="ttdef"><b>Definition:</b> cborparser.c:1414</div></div>
<div class="ttc" id="a00046_html_gabbf6e10fd963d673f5ad293dff4a67a9"><div class="ttname"><a href="a00046.html#gabbf6e10fd963d673f5ad293dff4a67a9">cbor_encode_int</a></div><div class="ttdeci">CBOR_API CborError cbor_encode_int(CborEncoder *encoder, int64_t value)</div><div class="ttdoc">Appends the signed 64-bit integer value to the CBOR stream provided by encoder. </div><div class="ttdef"><b>Definition:</b> cborencoder.c:350</div></div>
<div class="ttc" id="a00047_html_gad5b2dd803244946b15603e09ce147044"><div class="ttname"><a href="a00047.html#gad5b2dd803244946b15603e09ce147044">cbor_value_calculate_string_length</a></div><div class="ttdeci">CBOR_API CborError cbor_value_calculate_string_length(const CborValue *value, size_t *length)</div><div class="ttdoc">Calculates the length of the byte or text string that value points to and stores it in len...</div><div class="ttdef"><b>Definition:</b> cborparser.c:965</div></div>
<div class="ttc" id="a00047_html_gaed463f5bf4b69d7aec41e6aca9c637ad"><div class="ttname"><a href="a00047.html#gaed463f5bf4b69d7aec41e6aca9c637ad">cbor_value_is_text_string</a></div><div class="ttdeci">bool cbor_value_is_text_string(const CborValue *value)</div><div class="ttdoc">Returns true if the iterator value is valid and points to a CBOR text string. </div><div class="ttdef"><b>Definition:</b> cbor.h:407</div></div>
<div class="ttc" id="a00047_html_ga1b34d5f429a4c77f451391c4f7dff497"><div class="ttname"><a href="a00047.html#ga1b34d5f429a4c77f451391c4f7dff497">cbor_value_is_map</a></div><div class="ttdeci">bool cbor_value_is_map(const CborValue *value)</div><div class="ttdoc">Returns true if the iterator value is valid and points to a CBOR map. </div><div class="ttdef"><b>Definition:</b> cbor.h:460</div></div>
<div class="ttc" id="a00047_html_gaae1a1b893975549d5fa74452ba4b79e8"><div class="ttname"><a href="a00047.html#gaae1a1b893975549d5fa74452ba4b79e8">cbor_value_is_simple_type</a></div><div class="ttdeci">bool cbor_value_is_simple_type(const CborValue *value)</div><div class="ttdoc">Returns true if the iterator value is valid and points to a CBOR Simple Type type (other than true...</div><div class="ttdef"><b>Definition:</b> cbor.h:338</div></div>
<div class="ttc" id="a00047_html_ga06b1da795150786eb43ee83d65cd17d7"><div class="ttname"><a href="a00047.html#ga06b1da795150786eb43ee83d65cd17d7">cbor_value_get_next_byte</a></div><div class="ttdeci">const uint8_t * cbor_value_get_next_byte(const CborValue *it)</div><div class="ttdoc">Returns a pointer to the next byte that would be decoded if this CborValue object were advanced...</div><div class="ttdef"><b>Definition:</b> cbor.h:300</div></div>
<div class="ttc" id="a00047_html_ga2b805f0f440905a7ba4f93b3569bb97b"><div class="ttname"><a href="a00047.html#ga2b805f0f440905a7ba4f93b3569bb97b">cbor_value_skip_tag</a></div><div class="ttdeci">CBOR_API CborError cbor_value_skip_tag(CborValue *it)</div><div class="ttdoc">Advances the CBOR value it until it no longer points to a tag. </div><div class="ttdef"><b>Definition:</b> cborparser.c:558</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>