Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libcbor: src/cbor/bytestrings.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libcbor
   &#160;<span id="projectnumber">0.5.0</span>
   </div>
   <div id="projectbrief">libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

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

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_cb565ba51d82ea933604984cbab6233d.html">cbor</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">bytestrings.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="common_8h_source.html">cbor/common.h</a>&quot;</code><br />
</div>
<p><a href="bytestrings_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a7c15a63fdc3830707eac0877a261f1cd"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bytestrings_8h.html#a7c15a63fdc3830707eac0877a261f1cd">cbor_bytestring_length</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:a7c15a63fdc3830707eac0877a261f1cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the length of the binary data.  <a href="#a7c15a63fdc3830707eac0877a261f1cd">More...</a><br /></td></tr>
<tr class="separator:a7c15a63fdc3830707eac0877a261f1cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a368222dbbcea25e06469524e26587e2a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bytestrings_8h.html#a368222dbbcea25e06469524e26587e2a">cbor_bytestring_is_definite</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:a368222dbbcea25e06469524e26587e2a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is the byte string definite?  <a href="#a368222dbbcea25e06469524e26587e2a">More...</a><br /></td></tr>
<tr class="separator:a368222dbbcea25e06469524e26587e2a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a6c450f105bb18b6b56d20f0de4786a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bytestrings_8h.html#a3a6c450f105bb18b6b56d20f0de4786a">cbor_bytestring_is_indefinite</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:a3a6c450f105bb18b6b56d20f0de4786a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is the byte string indefinite?  <a href="#a3a6c450f105bb18b6b56d20f0de4786a">More...</a><br /></td></tr>
<tr class="separator:a3a6c450f105bb18b6b56d20f0de4786a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05c09e147b0a244abc481b0b078ebcb9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="data_8h.html#aabb40e458ece40477e134a69c76693e8">cbor_mutable_data</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bytestrings_8h.html#a05c09e147b0a244abc481b0b078ebcb9">cbor_bytestring_handle</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:a05c09e147b0a244abc481b0b078ebcb9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the handle to the binary data.  <a href="#a05c09e147b0a244abc481b0b078ebcb9">More...</a><br /></td></tr>
<tr class="separator:a05c09e147b0a244abc481b0b078ebcb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a513fd06374cb4faa9e909c85e4248199"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bytestrings_8h.html#a513fd06374cb4faa9e909c85e4248199">cbor_bytestring_set_handle</a> (<a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item, <a class="el" href="data_8h.html#aabb40e458ece40477e134a69c76693e8">cbor_mutable_data</a> <a class="el" href="common_8h.html#a9ac79315ed2dcf2c9587e8e3a9a6bc97">CBOR_RESTRICT_POINTER</a> data, size_t length)</td></tr>
<tr class="memdesc:a513fd06374cb4faa9e909c85e4248199"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the handle to the binary data.  <a href="#a513fd06374cb4faa9e909c85e4248199">More...</a><br /></td></tr>
<tr class="separator:a513fd06374cb4faa9e909c85e4248199"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ab6255d6f8f209149bdf794dffed849"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bytestrings_8h.html#a8ab6255d6f8f209149bdf794dffed849">cbor_bytestring_chunks_handle</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:a8ab6255d6f8f209149bdf794dffed849"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the handle to the array of chunks.  <a href="#a8ab6255d6f8f209149bdf794dffed849">More...</a><br /></td></tr>
<tr class="separator:a8ab6255d6f8f209149bdf794dffed849"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad02102832d452fd5a5cfa96272b1095d"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bytestrings_8h.html#ad02102832d452fd5a5cfa96272b1095d">cbor_bytestring_chunk_count</a> (const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item)</td></tr>
<tr class="memdesc:ad02102832d452fd5a5cfa96272b1095d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the number of chunks this string consist of.  <a href="#ad02102832d452fd5a5cfa96272b1095d">More...</a><br /></td></tr>
<tr class="separator:ad02102832d452fd5a5cfa96272b1095d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5dc8c27d6e7acfdd05fdc15c01e25b47"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bytestrings_8h.html#a5dc8c27d6e7acfdd05fdc15c01e25b47">cbor_bytestring_add_chunk</a> (<a class="el" href="structcbor__item__t.html">cbor_item_t</a> *item, <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *chunk)</td></tr>
<tr class="memdesc:a5dc8c27d6e7acfdd05fdc15c01e25b47"><td class="mdescLeft">&#160;</td><td class="mdescRight">Appends a chunk to the bytestring.  <a href="#a5dc8c27d6e7acfdd05fdc15c01e25b47">More...</a><br /></td></tr>
<tr class="separator:a5dc8c27d6e7acfdd05fdc15c01e25b47"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86fc646f4520b90c85a704d27b46e69e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bytestrings_8h.html#a86fc646f4520b90c85a704d27b46e69e">cbor_new_definite_bytestring</a> ()</td></tr>
<tr class="memdesc:a86fc646f4520b90c85a704d27b46e69e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new definite byte string.  <a href="#a86fc646f4520b90c85a704d27b46e69e">More...</a><br /></td></tr>
<tr class="separator:a86fc646f4520b90c85a704d27b46e69e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6de9d6387e856c33d2ef8e8e9fdac0ac"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bytestrings_8h.html#a6de9d6387e856c33d2ef8e8e9fdac0ac">cbor_new_indefinite_bytestring</a> ()</td></tr>
<tr class="memdesc:a6de9d6387e856c33d2ef8e8e9fdac0ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new indefinite byte string.  <a href="#a6de9d6387e856c33d2ef8e8e9fdac0ac">More...</a><br /></td></tr>
<tr class="separator:a6de9d6387e856c33d2ef8e8e9fdac0ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab76bd5ff62831739cd9a8d7ec2768c1a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="bytestrings_8h.html#ab76bd5ff62831739cd9a8d7ec2768c1a">cbor_build_bytestring</a> (<a class="el" href="data_8h.html#a121c5944682215e742475f12f07c0a72">cbor_data</a> handle, size_t length)</td></tr>
<tr class="memdesc:ab76bd5ff62831739cd9a8d7ec2768c1a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new byte string and initializes it.  <a href="#ab76bd5ff62831739cd9a8d7ec2768c1a">More...</a><br /></td></tr>
<tr class="separator:ab76bd5ff62831739cd9a8d7ec2768c1a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="ab76bd5ff62831739cd9a8d7ec2768c1a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab76bd5ff62831739cd9a8d7ec2768c1a">&sect;&nbsp;</a></span>cbor_build_bytestring()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcbor__item__t.html">cbor_item_t</a>* cbor_build_bytestring </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="data_8h.html#a121c5944682215e742475f12f07c0a72">cbor_data</a>&#160;</td>
          <td class="paramname"><em>handle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a new byte string and initializes it. </p>
<p>The <code>handle</code> will be copied to a newly allocated block</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>Block of binary data </td></tr>
    <tr><td class="paramname">length</td><td>Length of <code>data</code> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A <b>new</b> byte string with content <code>handle</code>. <code>NULL</code> on malloc failure. </dd></dl>

<p>Definition at line <a class="el" href="bytestrings_8c_source.html#l00063">63</a> of file <a class="el" href="bytestrings_8c_source.html">bytestrings.c</a>.</p>

</div>
</div>
<a id="a5dc8c27d6e7acfdd05fdc15c01e25b47"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5dc8c27d6e7acfdd05fdc15c01e25b47">&sect;&nbsp;</a></span>cbor_bytestring_add_chunk()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool cbor_bytestring_add_chunk </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> *&#160;</td>
          <td class="paramname"><em>item</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> *&#160;</td>
          <td class="paramname"><em>chunk</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Appends a chunk to the bytestring. </p>
<p>Indefinite byte strings only.</p>
<p>May realloc the chunk storage.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">item[borrow]</td><td>An indefinite byte string </td></tr>
    <tr><td class="paramname">item[incref]</td><td>A definite byte string </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true on success, false on realloc failure. In that case, the refcount of <code>chunk</code> is not increased and the <code>item</code> is left intact. </dd></dl>

<p>Definition at line <a class="el" href="bytestrings_8c_source.html#l00095">95</a> of file <a class="el" href="bytestrings_8c_source.html">bytestrings.c</a>.</p>

</div>
</div>
<a id="ad02102832d452fd5a5cfa96272b1095d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad02102832d452fd5a5cfa96272b1095d">&sect;&nbsp;</a></span>cbor_bytestring_chunk_count()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t cbor_bytestring_chunk_count </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *&#160;</td>
          <td class="paramname"><em>item</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the number of chunks this string consist of. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">item[borrow]</td><td>A indefinite bytestring </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The chunk count. 0 for freshly created items. </dd></dl>

<p>Definition at line <a class="el" href="bytestrings_8c_source.html#l00087">87</a> of file <a class="el" href="bytestrings_8c_source.html">bytestrings.c</a>.</p>

</div>
</div>
<a id="a8ab6255d6f8f209149bdf794dffed849"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ab6255d6f8f209149bdf794dffed849">&sect;&nbsp;</a></span>cbor_bytestring_chunks_handle()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcbor__item__t.html">cbor_item_t</a>** cbor_bytestring_chunks_handle </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *&#160;</td>
          <td class="paramname"><em>item</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the handle to the array of chunks. </p>
<p>Manipulations with the memory block (e.g. sorting it) are allowed, but the validity and the number of chunks must be retained.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">item[borrow]</td><td>A indefinite byte string </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>array of <a class="el" href="bytestrings_8h.html#ad02102832d452fd5a5cfa96272b1095d" title="Get the number of chunks this string consist of. ">cbor_bytestring_chunk_count</a> definite bytestrings </dd></dl>

<p>Definition at line <a class="el" href="bytestrings_8c_source.html#l00080">80</a> of file <a class="el" href="bytestrings_8c_source.html">bytestrings.c</a>.</p>

</div>
</div>
<a id="a05c09e147b0a244abc481b0b078ebcb9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05c09e147b0a244abc481b0b078ebcb9">&sect;&nbsp;</a></span>cbor_bytestring_handle()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="data_8h.html#aabb40e458ece40477e134a69c76693e8">cbor_mutable_data</a> cbor_bytestring_handle </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *&#160;</td>
          <td class="paramname"><em>item</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the handle to the binary data. </p>
<p>Definite items only. Modifying the data is allowed. In that case, the caller takes responsibility for the effect on items this item might be a part of</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">item[borrow]</td><td>A definite byte string </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The address of the binary data. <code>NULL</code> if no data have been assigned yet. </dd></dl>

<p>Definition at line <a class="el" href="bytestrings_8c_source.html#l00018">18</a> of file <a class="el" href="bytestrings_8c_source.html">bytestrings.c</a>.</p>

</div>
</div>
<a id="a368222dbbcea25e06469524e26587e2a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a368222dbbcea25e06469524e26587e2a">&sect;&nbsp;</a></span>cbor_bytestring_is_definite()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool cbor_bytestring_is_definite </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *&#160;</td>
          <td class="paramname"><em>item</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Is the byte string definite? </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">item[borrow]</td><td>a byte string </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Is the byte string definite? </dd></dl>

<p>Definition at line <a class="el" href="bytestrings_8c_source.html#l00024">24</a> of file <a class="el" href="bytestrings_8c_source.html">bytestrings.c</a>.</p>

</div>
</div>
<a id="a3a6c450f105bb18b6b56d20f0de4786a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a6c450f105bb18b6b56d20f0de4786a">&sect;&nbsp;</a></span>cbor_bytestring_is_indefinite()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool cbor_bytestring_is_indefinite </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *&#160;</td>
          <td class="paramname"><em>item</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Is the byte string indefinite? </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">item[borrow]</td><td>a byte string </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Is the byte string indefinite? </dd></dl>

<p>Definition at line <a class="el" href="bytestrings_8c_source.html#l00030">30</a> of file <a class="el" href="bytestrings_8c_source.html">bytestrings.c</a>.</p>

</div>
</div>
<a id="a7c15a63fdc3830707eac0877a261f1cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7c15a63fdc3830707eac0877a261f1cd">&sect;&nbsp;</a></span>cbor_bytestring_length()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t cbor_bytestring_length </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structcbor__item__t.html">cbor_item_t</a> *&#160;</td>
          <td class="paramname"><em>item</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the length of the binary data. </p>
<p>For definite byte strings only</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">item[borrow]</td><td>a definite bytestring </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>length of the binary data. Zero if no chunk has been attached yet </dd></dl>

<p>Definition at line <a class="el" href="bytestrings_8c_source.html#l00012">12</a> of file <a class="el" href="bytestrings_8c_source.html">bytestrings.c</a>.</p>

</div>
</div>
<a id="a513fd06374cb4faa9e909c85e4248199"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a513fd06374cb4faa9e909c85e4248199">&sect;&nbsp;</a></span>cbor_bytestring_set_handle()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cbor_bytestring_set_handle </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcbor__item__t.html">cbor_item_t</a> *&#160;</td>
          <td class="paramname"><em>item</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="data_8h.html#aabb40e458ece40477e134a69c76693e8">cbor_mutable_data</a> <a class="el" href="common_8h.html#a9ac79315ed2dcf2c9587e8e3a9a6bc97">CBOR_RESTRICT_POINTER</a>&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the handle to the binary data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">item[borrow]</td><td>A definite byte string </td></tr>
    <tr><td class="paramname">data</td><td>The memory block. The caller gives up the ownership of the block. libcbor will deallocate it when appropriate using its free function </td></tr>
    <tr><td class="paramname">length</td><td>Length of the data block </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="bytestrings_8c_source.html#l00072">72</a> of file <a class="el" href="bytestrings_8c_source.html">bytestrings.c</a>.</p>

</div>
</div>
<a id="a86fc646f4520b90c85a704d27b46e69e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a86fc646f4520b90c85a704d27b46e69e">&sect;&nbsp;</a></span>cbor_new_definite_bytestring()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcbor__item__t.html">cbor_item_t</a>* cbor_new_definite_bytestring </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a new definite byte string. </p>
<p>The handle is initialized to <code>NULL</code> and length to 0</p>
<dl class="section return"><dt>Returns</dt><dd><b>new</b> definite bytestring. <code>NULL</code> on malloc failure. </dd></dl>

<p>Definition at line <a class="el" href="bytestrings_8c_source.html#l00035">35</a> of file <a class="el" href="bytestrings_8c_source.html">bytestrings.c</a>.</p>

</div>
</div>
<a id="a6de9d6387e856c33d2ef8e8e9fdac0ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6de9d6387e856c33d2ef8e8e9fdac0ac">&sect;&nbsp;</a></span>cbor_new_indefinite_bytestring()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcbor__item__t.html">cbor_item_t</a>* cbor_new_indefinite_bytestring </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a new indefinite byte string. </p>
<p>The chunks array is initialized to <code>NULL</code> and chunkcount to 0</p>
<dl class="section return"><dt>Returns</dt><dd><b>new</b> indefinite bytestring. <code>NULL</code> on malloc failure. </dd></dl>

<p>Definition at line <a class="el" href="bytestrings_8c_source.html#l00046">46</a> of file <a class="el" href="bytestrings_8c_source.html">bytestrings.c</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Feb 6 2017 00:26:19 for libcbor by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.12
</small></address>
</body>
</html>