libcbor 0.12.0
libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format.
Loading...
Searching...
No Matches
encoders.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2014-2020 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_ENCODERS_H
9#define LIBCBOR_ENCODERS_H
10
11#include "cbor/common.h"
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
18size_t _cbor_encode_uint8(uint8_t value, unsigned char* buffer,
19 size_t buffer_size, uint8_t offset);
20
22size_t _cbor_encode_uint16(uint16_t value, unsigned char* buffer,
23 size_t buffer_size, uint8_t offset);
24
26size_t _cbor_encode_uint32(uint32_t value, unsigned char* buffer,
27 size_t buffer_size, uint8_t offset);
28
30size_t _cbor_encode_uint64(uint64_t value, unsigned char* buffer,
31 size_t buffer_size, uint8_t offset);
32
34size_t _cbor_encode_uint(uint64_t value, unsigned char* buffer,
35 size_t buffer_size, uint8_t offset);
36
37#ifdef __cplusplus
38}
39#endif
40
41#endif // LIBCBOR_ENCODERS_H
#define _CBOR_NODISCARD
Definition common.h:93
size_t _cbor_encode_uint16(uint16_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
Definition encoders.c:29
size_t _cbor_encode_uint8(uint8_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
Definition encoders.c:12
size_t _cbor_encode_uint32(uint32_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
Definition encoders.c:46
size_t _cbor_encode_uint64(uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
Definition encoders.c:65
size_t _cbor_encode_uint(uint64_t value, unsigned char *buffer, size_t buffer_size, uint8_t offset)
Definition encoders.c:88