libcbor  0.5.0
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
tags.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2017 Pavel Kalvoda <me@pavelkalvoda.com>
3  *
4  * libcbor is free software; you can redistribute it and/or modify
5  * it under the terms of the MIT license. See LICENSE for details.
6  */
7 
8 #ifndef LIBCBOR_TAGS_H
9 #define LIBCBOR_TAGS_H
10 
11 #include "cbor/common.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 /*
18 * ============================================================================
19 * Tag manipulation
20 * ============================================================================
21 */
22 
28 cbor_item_t *cbor_new_tag(uint64_t value);
29 
36 
42 uint64_t cbor_tag_value(const cbor_item_t *item);
43 
49 void cbor_tag_set_item(cbor_item_t *item, cbor_item_t *tagged_item);
50 
57 cbor_item_t * cbor_build_tag(uint64_t value, cbor_item_t * item);
58 
59 #ifdef __cplusplus
60 }
61 #endif
62 
63 #endif //LIBCBOR_TAGS_H
uint64_t cbor_tag_value(const cbor_item_t *item)
Get tag value.
Definition: tags.c:28
void cbor_tag_set_item(cbor_item_t *item, cbor_item_t *tagged_item)
Set the tagged item.
Definition: tags.c:34
cbor_item_t * cbor_tag_item(const cbor_item_t *item)
Get the tagged item.
Definition: tags.c:22
cbor_item_t * cbor_new_tag(uint64_t value)
Create a new tag.
Definition: tags.c:10
cbor_item_t * cbor_build_tag(uint64_t value, cbor_item_t *item)
Build a new tag.
Definition: tags.c:41
The item handle.
Definition: data.h:149