libcbor  0.5.0
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
Functions
tags.c File Reference
#include "tags.h"

Go to the source code of this file.

Functions

cbor_item_tcbor_new_tag (uint64_t value)
 Create a new tag. More...
 
cbor_item_tcbor_tag_item (const cbor_item_t *item)
 Get the tagged item. More...
 
uint64_t cbor_tag_value (const cbor_item_t *item)
 Get tag value. More...
 
void cbor_tag_set_item (cbor_item_t *item, cbor_item_t *tagged_item)
 Set the tagged item. More...
 
cbor_item_tcbor_build_tag (uint64_t value, cbor_item_t *item)
 Build a new tag. More...
 

Function Documentation

§ cbor_build_tag()

cbor_item_t* cbor_build_tag ( uint64_t  value,
cbor_item_t item 
)

Build a new tag.

Parameters
item[incref]The tagee
valueTag value
Returns
new tag item

Definition at line 41 of file tags.c.

§ cbor_new_tag()

cbor_item_t* cbor_new_tag ( uint64_t  value)

Create a new tag.

Parameters
valueThe tag value. Please consult the tag repository
Returns
new tag. Item reference is NULL.

Definition at line 10 of file tags.c.

§ cbor_tag_item()

cbor_item_t* cbor_tag_item ( const cbor_item_t item)

Get the tagged item.

Parameters
item[borrow]A tag
Returns
incref the tagged item

Definition at line 22 of file tags.c.

§ cbor_tag_set_item()

void cbor_tag_set_item ( cbor_item_t item,
cbor_item_t tagged_item 
)

Set the tagged item.

Parameters
item[borrow]A tag
tagged_item[incref]The item to tag

Definition at line 34 of file tags.c.

§ cbor_tag_value()

uint64_t cbor_tag_value ( const cbor_item_t item)

Get tag value.

Parameters
item[borrow]A tag
Returns
The tag value. Please consult the tag repository

Definition at line 28 of file tags.c.