Wirepas SDK
cbor.h File Reference

Go to the source code of this file.

Typedefs

typedef uint64_t CborTag
 
typedef CborError(* CborStreamFunction) (void *token, const char *fmt,...)
 

Functions

CBOR_API const char * cbor_error_string (CborError error)
 
CBOR_API void cbor_encoder_init (CborEncoder *encoder, uint8_t *buffer, size_t size, int flags)
 
CBOR_API CborError cbor_encode_uint (CborEncoder *encoder, uint64_t value)
 
CBOR_API CborError cbor_encode_int (CborEncoder *encoder, int64_t value)
 
CBOR_API CborError cbor_encode_negative_int (CborEncoder *encoder, uint64_t absolute_value)
 
CBOR_API CborError cbor_encode_simple_value (CborEncoder *encoder, uint8_t value)
 
CBOR_API CborError cbor_encode_tag (CborEncoder *encoder, CborTag tag)
 
CBOR_API CborError cbor_encode_text_string (CborEncoder *encoder, const char *string, size_t length)
 
static CborError cbor_encode_text_stringz (CborEncoder *encoder, const char *string)
 
CBOR_API CborError cbor_encode_byte_string (CborEncoder *encoder, const uint8_t *string, size_t length)
 
CBOR_API CborError cbor_encode_floating_point (CborEncoder *encoder, CborType fpType, const void *value)
 
static CborError cbor_encode_boolean (CborEncoder *encoder, bool value)
 
static CborError cbor_encode_null (CborEncoder *encoder)
 
static CborError cbor_encode_undefined (CborEncoder *encoder)
 
static CborError cbor_encode_half_float (CborEncoder *encoder, const void *value)
 
static CborError cbor_encode_float (CborEncoder *encoder, float value)
 
static CborError cbor_encode_double (CborEncoder *encoder, double value)
 
CBOR_API CborError cbor_encoder_create_array (CborEncoder *encoder, CborEncoder *arrayEncoder, size_t length)
 
CBOR_API CborError cbor_encoder_create_map (CborEncoder *encoder, CborEncoder *mapEncoder, size_t length)
 
CBOR_API CborError cbor_encoder_close_container (CborEncoder *encoder, const CborEncoder *containerEncoder)
 
CBOR_API CborError cbor_encoder_close_container_checked (CborEncoder *encoder, const CborEncoder *containerEncoder)
 
static uint8_t * _cbor_encoder_get_buffer_pointer (const CborEncoder *encoder)
 
static size_t cbor_encoder_get_buffer_size (const CborEncoder *encoder, const uint8_t *buffer)
 
static size_t cbor_encoder_get_extra_bytes_needed (const CborEncoder *encoder)
 
CBOR_API CborError cbor_parser_init (const uint8_t *buffer, size_t size, uint32_t flags, CborParser *parser, CborValue *it)
 
CBOR_API CborError cbor_value_validate_basic (const CborValue *it)
 
static bool cbor_value_at_end (const CborValue *it)
 
static const uint8_t * cbor_value_get_next_byte (const CborValue *it)
 
CBOR_API CborError cbor_value_advance_fixed (CborValue *it)
 
CBOR_API CborError cbor_value_advance (CborValue *it)
 
static bool cbor_value_is_container (const CborValue *it)
 
CBOR_API CborError cbor_value_enter_container (const CborValue *it, CborValue *recursed)
 
CBOR_API CborError cbor_value_leave_container (CborValue *it, const CborValue *recursed)
 
uint64_t _cbor_value_decode_int64_internal (const CborValue *value)
 
static uint64_t _cbor_value_extract_int64_helper (const CborValue *value)
 
static bool cbor_value_is_valid (const CborValue *value)
 
static CborType cbor_value_get_type (const CborValue *value)
 
static bool cbor_value_is_null (const CborValue *value)
 
static bool cbor_value_is_undefined (const CborValue *value)
 
static bool cbor_value_is_boolean (const CborValue *value)
 
static CborError cbor_value_get_boolean (const CborValue *value, bool *result)
 
static bool cbor_value_is_simple_type (const CborValue *value)
 
static CborError cbor_value_get_simple_type (const CborValue *value, uint8_t *result)
 
static bool cbor_value_is_integer (const CborValue *value)
 
static bool cbor_value_is_unsigned_integer (const CborValue *value)
 
static bool cbor_value_is_negative_integer (const CborValue *value)
 
static CborError cbor_value_get_raw_integer (const CborValue *value, uint64_t *result)
 
static CborError cbor_value_get_uint64 (const CborValue *value, uint64_t *result)
 
static CborError cbor_value_get_int64 (const CborValue *value, int64_t *result)
 
static CborError cbor_value_get_int (const CborValue *value, int *result)
 
CBOR_API CborError cbor_value_get_int64_checked (const CborValue *value, int64_t *result)
 
CBOR_API CborError cbor_value_get_int_checked (const CborValue *value, int *result)
 
static bool cbor_value_is_length_known (const CborValue *value)
 
static bool cbor_value_is_tag (const CborValue *value)
 
static CborError cbor_value_get_tag (const CborValue *value, CborTag *result)
 
CBOR_API CborError cbor_value_skip_tag (CborValue *it)
 
static bool cbor_value_is_byte_string (const CborValue *value)
 
static bool cbor_value_is_text_string (const CborValue *value)
 
static CborError cbor_value_get_string_length (const CborValue *value, size_t *length)
 
CborError _cbor_value_copy_string (const CborValue *value, void *buffer, size_t *buflen, CborValue *next)
 
CborError _cbor_value_dup_string (const CborValue *value, void **buffer, size_t *buflen, CborValue *next)
 
CBOR_API CborError cbor_value_calculate_string_length (const CborValue *value, size_t *length)
 
static CborError cbor_value_copy_text_string (const CborValue *value, char *buffer, size_t *buflen, CborValue *next)
 
static CborError cbor_value_copy_byte_string (const CborValue *value, uint8_t *buffer, size_t *buflen, CborValue *next)
 
static CborError cbor_value_dup_text_string (const CborValue *value, char **buffer, size_t *buflen, CborValue *next)
 
static CborError cbor_value_dup_byte_string (const CborValue *value, uint8_t **buffer, size_t *buflen, CborValue *next)
 
CBOR_API CborError cbor_value_text_string_equals (const CborValue *value, const char *string, bool *result)
 
static bool cbor_value_is_array (const CborValue *value)
 
static bool cbor_value_is_map (const CborValue *value)
 
static CborError cbor_value_get_array_length (const CborValue *value, size_t *length)
 
static CborError cbor_value_get_map_length (const CborValue *value, size_t *length)
 
CBOR_API CborError cbor_value_map_find_value (const CborValue *map, const char *string, CborValue *element)
 
static bool cbor_value_is_half_float (const CborValue *value)
 
CBOR_API CborError cbor_value_get_half_float (const CborValue *value, void *result)
 
static bool cbor_value_is_float (const CborValue *value)
 
static CborError cbor_value_get_float (const CborValue *value, float *result)
 
static bool cbor_value_is_double (const CborValue *value)
 
static CborError cbor_value_get_double (const CborValue *value, double *result)
 
CBOR_API CborError cbor_value_validate (const CborValue *it, uint32_t flags)
 
CBOR_API CborError cbor_value_to_pretty_stream (CborStreamFunction streamFunction, void *token, CborValue *value, int flags)
 
CBOR_API CborError cbor_value_to_pretty_advance_flags (FILE *out, CborValue *value, int flags)
 
CBOR_API CborError cbor_value_to_pretty_advance (FILE *out, CborValue *value)
 
static CborError cbor_value_to_pretty (FILE *out, const CborValue *value)
 

Data Structures

struct  CborEncoder
 
struct  CborParser
 
struct  CborValue
 
union  CborEncoder.data
 

Enumerations

enum  CborType {
  CborIntegerType = 0x00 , CborByteStringType = 0x40 , CborTextStringType = 0x60 , CborArrayType = 0x80 ,
  CborMapType = 0xa0 , CborTagType = 0xc0 , CborSimpleType = 0xe0 , CborBooleanType = 0xf5 ,
  CborNullType = 0xf6 , CborUndefinedType = 0xf7 , CborHalfFloatType = 0xf9 , CborFloatType = 0xfa ,
  CborDoubleType = 0xfb , CborInvalidType = 0xff
}
 
enum  CborKnownTags {
  CborDateTimeStringTag = 0 , CborUnixTime_tTag = 1 , CborPositiveBignumTag = 2 , CborNegativeBignumTag = 3 ,
  CborDecimalTag = 4 , CborBigfloatTag = 5 , CborCOSE_Encrypt0Tag = 16 , CborCOSE_Mac0Tag = 17 ,
  CborCOSE_Sign1Tag = 18 , CborExpectedBase64urlTag = 21 , CborExpectedBase64Tag = 22 , CborExpectedBase16Tag = 23 ,
  CborEncodedCborTag = 24 , CborUrlTag = 32 , CborBase64urlTag = 33 , CborBase64Tag = 34 ,
  CborRegularExpressionTag = 35 , CborMimeMessageTag = 36 , CborCOSE_EncryptTag = 96 , CborCOSE_MacTag = 97 ,
  CborCOSE_SignTag = 98 , CborSignatureTag = 55799
}
 
enum  CborError {
  CborNoError = 0 , CborUnknownError , CborErrorUnknownLength , CborErrorAdvancePastEOF ,
  CborErrorIO , CborErrorGarbageAtEnd = 256 , CborErrorUnexpectedEOF , CborErrorUnexpectedBreak ,
  CborErrorUnknownType , CborErrorIllegalType , CborErrorIllegalNumber , CborErrorIllegalSimpleType ,
  CborErrorUnknownSimpleType = 512 , CborErrorUnknownTag , CborErrorInappropriateTagForType , CborErrorDuplicateObjectKeys ,
  CborErrorInvalidUtf8TextString , CborErrorExcludedType , CborErrorExcludedValue , CborErrorImproperValue ,
  CborErrorOverlongEncoding , CborErrorMapKeyNotString , CborErrorMapNotSorted , CborErrorMapKeysNotUnique ,
  CborErrorTooManyItems = 768 , CborErrorTooFewItems , CborErrorDataTooLarge = 1024 , CborErrorNestingTooDeep ,
  CborErrorUnsupportedType , CborErrorJsonObjectKeyIsAggregate = 1280 , CborErrorJsonObjectKeyNotString , CborErrorJsonNotImplemented ,
  CborErrorOutOfMemory = (int) (~0U / 2 + 1) , CborErrorInternalError = (int) (~0U / 2)
}
 
enum  CborParserIteratorFlags {
  CborIteratorFlag_IntegerValueTooLarge = 0x01 , CborIteratorFlag_NegativeInteger = 0x02 , CborIteratorFlag_IteratingStringChunks = 0x02 , CborIteratorFlag_UnknownLength = 0x04 ,
  CborIteratorFlag_ContainerIsMap = 0x20
}
 
enum  CborValidationFlags {
  CborValidateShortestIntegrals = 0x0001 , CborValidateShortestFloatingPoint = 0x0002 , CborValidateShortestNumbers = CborValidateShortestIntegrals | CborValidateShortestFloatingPoint , CborValidateNoIndeterminateLength = 0x0100 ,
  CborValidateMapIsSorted = 0x0200 | CborValidateNoIndeterminateLength , CborValidateCanonicalFormat = 0x0fff , CborValidateMapKeysAreUnique = 0x1000 | CborValidateMapIsSorted , CborValidateTagUse = 0x2000 ,
  CborValidateUtf8 = 0x4000 , CborValidateStrictMode = 0xfff00 , CborValidateMapKeysAreString = 0x100000 , CborValidateNoUndefined = 0x200000 ,
  CborValidateNoTags = 0x400000 , CborValidateFiniteFloatingPoint = 0x800000 , CborValidateNoUnknownSimpleTypesSA = 0x4000000 , CborValidateNoUnknownSimpleTypes = 0x8000000 | CborValidateNoUnknownSimpleTypesSA ,
  CborValidateNoUnknownTagsSA = 0x10000000 , CborValidateNoUnknownTagsSR = 0x20000000 | CborValidateNoUnknownTagsSA , CborValidateNoUnknownTags = 0x40000000 | CborValidateNoUnknownTagsSR , CborValidateCompleteData = (int)0x80000000 ,
  CborValidateStrictest = (int)~0U , CborValidateBasic = 0
}
 
enum  CborPrettyFlags {
  CborPrettyNumericEncodingIndicators = 0x01 , CborPrettyTextualEncodingIndicators = 0 , CborPrettyIndicateIndeterminateLength = 0x02 , CborPrettyIndicateIndetermineLength = CborPrettyIndicateIndeterminateLength ,
  CborPrettyIndicateOverlongNumbers = 0x04 , CborPrettyShowStringFragments = 0x100 , CborPrettyMergeStringFragments = 0 , CborPrettyDefaultFlags = CborPrettyIndicateIndeterminateLength
}
 

Macros

#define TINYCBOR_VERSION   ((TINYCBOR_VERSION_MAJOR << 16) | (TINYCBOR_VERSION_MINOR << 8) | TINYCBOR_VERSION_PATCH)
 
#define SIZE_MAX   ((size_t)-1)
 
#define CBOR_PRIVATE_API
 
#define CBOR_INLINE_API   static CBOR_INLINE
 
#define CBOR_INLINE
 
#define CborDateTimeStringTag   CborDateTimeStringTag
 
#define CborUnixTime_tTag   CborUnixTime_tTag
 
#define CborPositiveBignumTag   CborPositiveBignumTag
 
#define CborNegativeBignumTag   CborNegativeBignumTag
 
#define CborDecimalTag   CborDecimalTag
 
#define CborBigfloatTag   CborBigfloatTag
 
#define CborCOSE_Encrypt0Tag   CborCOSE_Encrypt0Tag
 
#define CborCOSE_Mac0Tag   CborCOSE_Mac0Tag
 
#define CborCOSE_Sign1Tag   CborCOSE_Sign1Tag
 
#define CborExpectedBase64urlTag   CborExpectedBase64urlTag
 
#define CborExpectedBase64Tag   CborExpectedBase64Tag
 
#define CborExpectedBase16Tag   CborExpectedBase16Tag
 
#define CborEncodedCborTag   CborEncodedCborTag
 
#define CborUrlTag   CborUrlTag
 
#define CborBase64urlTag   CborBase64urlTag
 
#define CborBase64Tag   CborBase64Tag
 
#define CborRegularExpressionTag   CborRegularExpressionTag
 
#define CborMimeMessageTag   CborMimeMessageTag
 
#define CborCOSE_EncryptTag   CborCOSE_EncryptTag
 
#define CborCOSE_MacTag   CborCOSE_MacTag
 
#define CborCOSE_SignTag   CborCOSE_SignTag
 
#define CborSignatureTag   CborSignatureTag
 

Variables

static const size_t CborIndefiniteLength = ((size_t)-1)
 

Typedef Documentation

◆ CborStreamFunction

typedef CborError(* CborStreamFunction) (void *token, const char *fmt,...)

Definition at line 582 of file cbor.h.

◆ CborTag

typedef uint64_t CborTag

Definition at line 100 of file cbor.h.

Function Documentation

◆ _cbor_encoder_get_buffer_pointer()

static uint8_t * _cbor_encoder_get_buffer_pointer ( const CborEncoder encoder)
static

Definition at line 250 of file cbor.h.

251{
252 return encoder->data.ptr;
253}
union CborEncoder::@9 data

◆ _cbor_value_copy_string()

CborError _cbor_value_copy_string ( const CborValue value,
void *  buffer,
size_t *  buflen,
CborValue next 
)

◆ _cbor_value_decode_int64_internal()

uint64_t _cbor_value_decode_int64_internal ( const CborValue value)

◆ _cbor_value_dup_string()

CborError _cbor_value_dup_string ( const CborValue value,
void **  buffer,
size_t *  buflen,
CborValue next 
)

◆ _cbor_value_extract_int64_helper()

static uint64_t _cbor_value_extract_int64_helper ( const CborValue value)
static

Definition at line 310 of file cbor.h.

311{
313 _cbor_value_decode_int64_internal(value) : value->extra;
314}
uint64_t _cbor_value_decode_int64_internal(const CborValue *value)
uint8_t flags
Definition cbor.h:290
@ CborIteratorFlag_IntegerValueTooLarge
Definition cbor.h:269

◆ cbor_encode_boolean()

static CborError cbor_encode_boolean ( CborEncoder encoder,
bool  value 
)
static

Definition at line 231 of file cbor.h.

232{ return cbor_encode_simple_value(encoder, (int)value - 1 + (CborBooleanType & 0x1f)); }
@ CborBooleanType
Definition cbor.h:90
CBOR_API CborError cbor_encode_simple_value(CborEncoder *encoder, uint8_t value)

◆ cbor_encode_byte_string()

CBOR_API CborError cbor_encode_byte_string ( CborEncoder encoder,
const uint8_t *  string,
size_t  length 
)

◆ cbor_encode_double()

static CborError cbor_encode_double ( CborEncoder encoder,
double  value 
)
static

Definition at line 242 of file cbor.h.

243{ return cbor_encode_floating_point(encoder, CborDoubleType, &value); }
@ CborDoubleType
Definition cbor.h:95
CBOR_API CborError cbor_encode_floating_point(CborEncoder *encoder, CborType fpType, const void *value)

◆ cbor_encode_float()

static CborError cbor_encode_float ( CborEncoder encoder,
float  value 
)
static

Definition at line 240 of file cbor.h.

241{ return cbor_encode_floating_point(encoder, CborFloatType, &value); }
@ CborFloatType
Definition cbor.h:94

◆ cbor_encode_floating_point()

CBOR_API CborError cbor_encode_floating_point ( CborEncoder encoder,
CborType  fpType,
const void *  value 
)

◆ cbor_encode_half_float()

static CborError cbor_encode_half_float ( CborEncoder encoder,
const void *  value 
)
static

Definition at line 238 of file cbor.h.

239{ return cbor_encode_floating_point(encoder, CborHalfFloatType, value); }
@ CborHalfFloatType
Definition cbor.h:93

◆ cbor_encode_int()

CBOR_API CborError cbor_encode_int ( CborEncoder encoder,
int64_t  value 
)

◆ cbor_encode_negative_int()

CBOR_API CborError cbor_encode_negative_int ( CborEncoder encoder,
uint64_t  absolute_value 
)

◆ cbor_encode_null()

static CborError cbor_encode_null ( CborEncoder encoder)
static

Definition at line 233 of file cbor.h.

234{ return cbor_encode_simple_value(encoder, CborNullType & 0x1f); }
@ CborNullType
Definition cbor.h:91

◆ cbor_encode_simple_value()

CBOR_API CborError cbor_encode_simple_value ( CborEncoder encoder,
uint8_t  value 
)

◆ cbor_encode_tag()

CBOR_API CborError cbor_encode_tag ( CborEncoder encoder,
CborTag  tag 
)

◆ cbor_encode_text_string()

CBOR_API CborError cbor_encode_text_string ( CborEncoder encoder,
const char *  string,
size_t  length 
)

◆ cbor_encode_text_stringz()

static CborError cbor_encode_text_stringz ( CborEncoder encoder,
const char *  string 
)
static

Definition at line 226 of file cbor.h.

227{ return cbor_encode_text_string(encoder, string, strlen(string)); }
CBOR_API CborError cbor_encode_text_string(CborEncoder *encoder, const char *string, size_t length)

◆ cbor_encode_uint()

CBOR_API CborError cbor_encode_uint ( CborEncoder encoder,
uint64_t  value 
)

◆ cbor_encode_undefined()

static CborError cbor_encode_undefined ( CborEncoder encoder)
static

Definition at line 235 of file cbor.h.

236{ return cbor_encode_simple_value(encoder, CborUndefinedType & 0x1f); }
@ CborUndefinedType
Definition cbor.h:92

◆ cbor_encoder_close_container()

CBOR_API CborError cbor_encoder_close_container ( CborEncoder encoder,
const CborEncoder containerEncoder 
)

◆ cbor_encoder_close_container_checked()

CBOR_API CborError cbor_encoder_close_container_checked ( CborEncoder encoder,
const CborEncoder containerEncoder 
)

◆ cbor_encoder_create_array()

CBOR_API CborError cbor_encoder_create_array ( CborEncoder encoder,
CborEncoder arrayEncoder,
size_t  length 
)

◆ cbor_encoder_create_map()

CBOR_API CborError cbor_encoder_create_map ( CborEncoder encoder,
CborEncoder mapEncoder,
size_t  length 
)

◆ cbor_encoder_get_buffer_size()

static size_t cbor_encoder_get_buffer_size ( const CborEncoder encoder,
const uint8_t *  buffer 
)
static

Definition at line 255 of file cbor.h.

256{
257 return (size_t)(encoder->data.ptr - buffer);
258}

◆ cbor_encoder_get_extra_bytes_needed()

static size_t cbor_encoder_get_extra_bytes_needed ( const CborEncoder encoder)
static

Definition at line 260 of file cbor.h.

261{
262 return encoder->end ? 0 : (size_t)encoder->data.bytes_needed;
263}
const uint8_t * end
Definition cbor.h:211

◆ cbor_encoder_init()

CBOR_API void cbor_encoder_init ( CborEncoder encoder,
uint8_t *  buffer,
size_t  size,
int  flags 
)

◆ cbor_error_string()

CBOR_API const char * cbor_error_string ( CborError  error)
Examples
tinycbor/app.c.

◆ cbor_parser_init()

CBOR_API CborError cbor_parser_init ( const uint8_t *  buffer,
size_t  size,
uint32_t  flags,
CborParser parser,
CborValue it 
)
Examples
tinycbor/app.c.

◆ cbor_value_advance()

CBOR_API CborError cbor_value_advance ( CborValue it)

◆ cbor_value_advance_fixed()

CBOR_API CborError cbor_value_advance_fixed ( CborValue it)
Examples
tinycbor/app.c.

◆ cbor_value_at_end()

static bool cbor_value_at_end ( const CborValue it)
static
Examples
tinycbor/app.c.

Definition at line 298 of file cbor.h.

299{ return it->remaining == 0; }
uint32_t remaining
Definition cbor.h:287

◆ cbor_value_calculate_string_length()

CBOR_API CborError cbor_value_calculate_string_length ( const CborValue value,
size_t *  length 
)

◆ cbor_value_copy_byte_string()

static CborError cbor_value_copy_byte_string ( const CborValue value,
uint8_t *  buffer,
size_t *  buflen,
CborValue next 
)
static
Examples
tinycbor/app.c.

Definition at line 436 of file cbor.h.

438{
439 assert(cbor_value_is_byte_string(value));
440 return _cbor_value_copy_string(value, buffer, buflen, next);
441}
CborError _cbor_value_copy_string(const CborValue *value, void *buffer, size_t *buflen, CborValue *next)
static bool cbor_value_is_byte_string(const CborValue *value)
Definition cbor.h:405

◆ cbor_value_copy_text_string()

static CborError cbor_value_copy_text_string ( const CborValue value,
char *  buffer,
size_t *  buflen,
CborValue next 
)
static
Examples
tinycbor/app.c.

Definition at line 430 of file cbor.h.

432{
433 assert(cbor_value_is_text_string(value));
434 return _cbor_value_copy_string(value, buffer, buflen, next);
435}
static bool cbor_value_is_text_string(const CborValue *value)
Definition cbor.h:407

◆ cbor_value_dup_byte_string()

static CborError cbor_value_dup_byte_string ( const CborValue value,
uint8_t **  buffer,
size_t *  buflen,
CborValue next 
)
static

Definition at line 449 of file cbor.h.

451{
452 assert(cbor_value_is_byte_string(value));
453 return _cbor_value_dup_string(value, (void **)buffer, buflen, next);
454}
CborError _cbor_value_dup_string(const CborValue *value, void **buffer, size_t *buflen, CborValue *next)

◆ cbor_value_dup_text_string()

static CborError cbor_value_dup_text_string ( const CborValue value,
char **  buffer,
size_t *  buflen,
CborValue next 
)
static

Definition at line 443 of file cbor.h.

445{
446 assert(cbor_value_is_text_string(value));
447 return _cbor_value_dup_string(value, (void **)buffer, buflen, next);
448}

◆ cbor_value_enter_container()

CBOR_API CborError cbor_value_enter_container ( const CborValue it,
CborValue recursed 
)
Examples
tinycbor/app.c.

◆ cbor_value_get_array_length()

static CborError cbor_value_get_array_length ( const CborValue value,
size_t *  length 
)
static

Definition at line 464 of file cbor.h.

465{
466 uint64_t v;
467 assert(cbor_value_is_array(value));
468 if (!cbor_value_is_length_known(value))
471 *length = (size_t)v;
472 if (*length != v)
474 return CborNoError;
475}
static uint64_t _cbor_value_extract_int64_helper(const CborValue *value)
Definition cbor.h:310
static bool cbor_value_is_length_known(const CborValue *value)
Definition cbor.h:390
@ CborErrorDataTooLarge
Definition cbor.h:189
@ CborErrorUnknownLength
Definition cbor.h:157
@ CborNoError
Definition cbor.h:153
static bool cbor_value_is_array(const CborValue *value)
Definition cbor.h:459

◆ cbor_value_get_boolean()

static CborError cbor_value_get_boolean ( const CborValue value,
bool *  result 
)
static
Examples
tinycbor/app.c.

Definition at line 330 of file cbor.h.

331{
332 assert(cbor_value_is_boolean(value));
333 *result = !!value->extra;
334 return CborNoError;
335}
uint16_t extra
Definition cbor.h:288
static bool cbor_value_is_boolean(const CborValue *value)
Definition cbor.h:328

◆ cbor_value_get_double()

static CborError cbor_value_get_double ( const CborValue value,
double *  result 
)
static

Definition at line 511 of file cbor.h.

512{
513 uint64_t data;
514 assert(cbor_value_is_double(value));
517 memcpy(result, &data, sizeof(*result));
518 return CborNoError;
519}
static bool cbor_value_is_double(const CborValue *value)
Definition cbor.h:509

◆ cbor_value_get_float()

static CborError cbor_value_get_float ( const CborValue value,
float *  result 
)
static

Definition at line 499 of file cbor.h.

500{
501 uint32_t data;
502 assert(cbor_value_is_float(value));
504 data = (uint32_t)_cbor_value_decode_int64_internal(value);
505 memcpy(result, &data, sizeof(*result));
506 return CborNoError;
507}
static bool cbor_value_is_float(const CborValue *value)
Definition cbor.h:497

◆ cbor_value_get_half_float()

CBOR_API CborError cbor_value_get_half_float ( const CborValue value,
void *  result 
)

◆ cbor_value_get_int()

static CborError cbor_value_get_int ( const CborValue value,
int *  result 
)
static

Definition at line 378 of file cbor.h.

379{
380 assert(cbor_value_is_integer(value));
381 *result = (int) _cbor_value_extract_int64_helper(value);
383 *result = -*result - 1;
384 return CborNoError;
385}
@ CborIteratorFlag_NegativeInteger
Definition cbor.h:270
static bool cbor_value_is_integer(const CborValue *value)
Definition cbor.h:348

◆ cbor_value_get_int64()

static CborError cbor_value_get_int64 ( const CborValue value,
int64_t *  result 
)
static

Definition at line 369 of file cbor.h.

370{
371 assert(cbor_value_is_integer(value));
372 *result = (int64_t) _cbor_value_extract_int64_helper(value);
374 *result = -*result - 1;
375 return CborNoError;
376}

◆ cbor_value_get_int64_checked()

CBOR_API CborError cbor_value_get_int64_checked ( const CborValue value,
int64_t *  result 
)

◆ cbor_value_get_int_checked()

CBOR_API CborError cbor_value_get_int_checked ( const CborValue value,
int *  result 
)
Examples
tinycbor/app.c.

◆ cbor_value_get_map_length()

static CborError cbor_value_get_map_length ( const CborValue value,
size_t *  length 
)
static

Definition at line 477 of file cbor.h.

478{
479 uint64_t v;
480 assert(cbor_value_is_map(value));
481 if (!cbor_value_is_length_known(value))
484 *length = (size_t)v;
485 if (*length != v)
487 return CborNoError;
488}
static bool cbor_value_is_map(const CborValue *value)
Definition cbor.h:461

◆ cbor_value_get_next_byte()

static const uint8_t * cbor_value_get_next_byte ( const CborValue it)
static

Definition at line 300 of file cbor.h.

301{ return it->ptr; }
const uint8_t * ptr
Definition cbor.h:286

◆ cbor_value_get_raw_integer()

static CborError cbor_value_get_raw_integer ( const CborValue value,
uint64_t *  result 
)
static

Definition at line 355 of file cbor.h.

356{
357 assert(cbor_value_is_integer(value));
358 *result = _cbor_value_extract_int64_helper(value);
359 return CborNoError;
360}

◆ cbor_value_get_simple_type()

static CborError cbor_value_get_simple_type ( const CborValue value,
uint8_t *  result 
)
static
Examples
tinycbor/app.c.

Definition at line 340 of file cbor.h.

341{
342 assert(cbor_value_is_simple_type(value));
343 *result = (uint8_t)value->extra;
344 return CborNoError;
345}
static bool cbor_value_is_simple_type(const CborValue *value)
Definition cbor.h:338

◆ cbor_value_get_string_length()

static CborError cbor_value_get_string_length ( const CborValue value,
size_t *  length 
)
static

Definition at line 410 of file cbor.h.

411{
412 uint64_t v;
414 if (!cbor_value_is_length_known(value))
417 *length = (size_t)v;
418 if (*length != v)
420 return CborNoError;
421}

◆ cbor_value_get_tag()

static CborError cbor_value_get_tag ( const CborValue value,
CborTag result 
)
static
Examples
tinycbor/app.c.

Definition at line 396 of file cbor.h.

397{
398 assert(cbor_value_is_tag(value));
399 *result = _cbor_value_extract_int64_helper(value);
400 return CborNoError;
401}
static bool cbor_value_is_tag(const CborValue *value)
Definition cbor.h:394

◆ cbor_value_get_type()

static CborType cbor_value_get_type ( const CborValue value)
static
Examples
tinycbor/app.c.

Definition at line 318 of file cbor.h.

319{ return (CborType)value->type; }
uint8_t type
Definition cbor.h:289
CborType
Definition cbor.h:82

◆ cbor_value_get_uint64()

static CborError cbor_value_get_uint64 ( const CborValue value,
uint64_t *  result 
)
static

Definition at line 362 of file cbor.h.

363{
364 assert(cbor_value_is_unsigned_integer(value));
365 *result = _cbor_value_extract_int64_helper(value);
366 return CborNoError;
367}
static bool cbor_value_is_unsigned_integer(const CborValue *value)
Definition cbor.h:350

◆ cbor_value_is_array()

static bool cbor_value_is_array ( const CborValue value)
static

Definition at line 459 of file cbor.h.

460{ return value->type == CborArrayType; }
@ CborArrayType
Definition cbor.h:86

◆ cbor_value_is_boolean()

static bool cbor_value_is_boolean ( const CborValue value)
static

Definition at line 328 of file cbor.h.

329{ return value->type == CborBooleanType; }

◆ cbor_value_is_byte_string()

static bool cbor_value_is_byte_string ( const CborValue value)
static

Definition at line 405 of file cbor.h.

406{ return value->type == CborByteStringType; }
@ CborByteStringType
Definition cbor.h:84

◆ cbor_value_is_container()

static bool cbor_value_is_container ( const CborValue it)
static

Definition at line 304 of file cbor.h.

305{ return it->type == CborArrayType || it->type == CborMapType; }
@ CborMapType
Definition cbor.h:87

◆ cbor_value_is_double()

static bool cbor_value_is_double ( const CborValue value)
static

Definition at line 509 of file cbor.h.

510{ return value->type == CborDoubleType; }

◆ cbor_value_is_float()

static bool cbor_value_is_float ( const CborValue value)
static

Definition at line 497 of file cbor.h.

498{ return value->type == CborFloatType; }

◆ cbor_value_is_half_float()

static bool cbor_value_is_half_float ( const CborValue value)
static

Definition at line 493 of file cbor.h.

494{ return value->type == CborHalfFloatType; }

◆ cbor_value_is_integer()

static bool cbor_value_is_integer ( const CborValue value)
static

Definition at line 348 of file cbor.h.

349{ return value->type == CborIntegerType; }
@ CborIntegerType
Definition cbor.h:83

◆ cbor_value_is_length_known()

static bool cbor_value_is_length_known ( const CborValue value)
static

Definition at line 390 of file cbor.h.

391{ return (value->flags & CborIteratorFlag_UnknownLength) == 0; }
@ CborIteratorFlag_UnknownLength
Definition cbor.h:272

◆ cbor_value_is_map()

static bool cbor_value_is_map ( const CborValue value)
static

Definition at line 461 of file cbor.h.

462{ return value->type == CborMapType; }

◆ cbor_value_is_negative_integer()

static bool cbor_value_is_negative_integer ( const CborValue value)
static

Definition at line 352 of file cbor.h.

353{ return cbor_value_is_integer(value) && (value->flags & CborIteratorFlag_NegativeInteger); }

◆ cbor_value_is_null()

static bool cbor_value_is_null ( const CborValue value)
static

Definition at line 322 of file cbor.h.

323{ return value->type == CborNullType; }

◆ cbor_value_is_simple_type()

static bool cbor_value_is_simple_type ( const CborValue value)
static

Definition at line 338 of file cbor.h.

339{ return value->type == CborSimpleType; }
@ CborSimpleType
Definition cbor.h:89

◆ cbor_value_is_tag()

static bool cbor_value_is_tag ( const CborValue value)
static

Definition at line 394 of file cbor.h.

395{ return value->type == CborTagType; }
@ CborTagType
Definition cbor.h:88

◆ cbor_value_is_text_string()

static bool cbor_value_is_text_string ( const CborValue value)
static

Definition at line 407 of file cbor.h.

408{ return value->type == CborTextStringType; }
@ CborTextStringType
Definition cbor.h:85

◆ cbor_value_is_undefined()

static bool cbor_value_is_undefined ( const CborValue value)
static

Definition at line 324 of file cbor.h.

325{ return value->type == CborUndefinedType; }

◆ cbor_value_is_unsigned_integer()

static bool cbor_value_is_unsigned_integer ( const CborValue value)
static

Definition at line 350 of file cbor.h.

351{ return cbor_value_is_integer(value) && (value->flags & CborIteratorFlag_NegativeInteger) == 0; }

◆ cbor_value_is_valid()

static bool cbor_value_is_valid ( const CborValue value)
static

Definition at line 316 of file cbor.h.

317{ return value && value->type != CborInvalidType; }
@ CborInvalidType
Definition cbor.h:97

◆ cbor_value_leave_container()

CBOR_API CborError cbor_value_leave_container ( CborValue it,
const CborValue recursed 
)
Examples
tinycbor/app.c.

◆ cbor_value_map_find_value()

CBOR_API CborError cbor_value_map_find_value ( const CborValue map,
const char *  string,
CborValue element 
)

◆ cbor_value_skip_tag()

CBOR_API CborError cbor_value_skip_tag ( CborValue it)

◆ cbor_value_text_string_equals()

CBOR_API CborError cbor_value_text_string_equals ( const CborValue value,
const char *  string,
bool *  result 
)

◆ cbor_value_to_pretty()

static CborError cbor_value_to_pretty ( FILE *  out,
const CborValue value 
)
static

Definition at line 594 of file cbor.h.

595{
596 CborValue copy = *value;
598}
@ CborPrettyDefaultFlags
Definition cbor.h:579
CBOR_API CborError cbor_value_to_pretty_advance_flags(FILE *out, CborValue *value, int flags)

◆ cbor_value_to_pretty_advance()

CBOR_API CborError cbor_value_to_pretty_advance ( FILE *  out,
CborValue value 
)

◆ cbor_value_to_pretty_advance_flags()

CBOR_API CborError cbor_value_to_pretty_advance_flags ( FILE *  out,
CborValue value,
int  flags 
)

◆ cbor_value_to_pretty_stream()

CBOR_API CborError cbor_value_to_pretty_stream ( CborStreamFunction  streamFunction,
void *  token,
CborValue value,
int  flags 
)

◆ cbor_value_validate()

CBOR_API CborError cbor_value_validate ( const CborValue it,
uint32_t  flags 
)
Examples
tinycbor/app.c.

◆ cbor_value_validate_basic()

CBOR_API CborError cbor_value_validate_basic ( const CborValue it)

Data Structure Documentation

◆ CborEncoder

struct CborEncoder

Definition at line 205 of file cbor.h.

Data Fields
union CborEncoder.data data
const uint8_t * end
int flags
size_t remaining

◆ CborParser

struct CborParser
Examples
tinycbor/app.c.

Definition at line 276 of file cbor.h.

Data Fields
const uint8_t * end
uint32_t flags

◆ CborValue

struct CborValue
Examples
tinycbor/app.c.

Definition at line 283 of file cbor.h.

Data Fields
uint16_t extra
uint8_t flags
const CborParser * parser
const uint8_t * ptr
uint32_t remaining
uint8_t type

◆ CborEncoder.data

union CborEncoder.data

Definition at line 207 of file cbor.h.

Data Fields
ptrdiff_t bytes_needed
uint8_t * ptr

Enumeration Type Documentation

◆ CborError

enum CborError
Enumerator
CborNoError 
CborUnknownError 
CborErrorUnknownLength 
CborErrorAdvancePastEOF 
CborErrorIO 
CborErrorGarbageAtEnd 
CborErrorUnexpectedEOF 
CborErrorUnexpectedBreak 
CborErrorUnknownType 
CborErrorIllegalType 
CborErrorIllegalNumber 
CborErrorIllegalSimpleType 
CborErrorUnknownSimpleType 
CborErrorUnknownTag 
CborErrorInappropriateTagForType 
CborErrorDuplicateObjectKeys 
CborErrorInvalidUtf8TextString 
CborErrorExcludedType 
CborErrorExcludedValue 
CborErrorImproperValue 
CborErrorOverlongEncoding 
CborErrorMapKeyNotString 
CborErrorMapNotSorted 
CborErrorMapKeysNotUnique 
CborErrorTooManyItems 
CborErrorTooFewItems 
CborErrorDataTooLarge 
CborErrorNestingTooDeep 
CborErrorUnsupportedType 
CborErrorJsonObjectKeyIsAggregate 
CborErrorJsonObjectKeyNotString 
CborErrorJsonNotImplemented 
CborErrorOutOfMemory 
CborErrorInternalError 

Definition at line 152 of file cbor.h.

152 {
153 CborNoError = 0,
154
155 /* errors in all modes */
157 CborErrorUnknownLength, /* request for length in array, map, or string with indeterminate length */
160
161 /* parser errors streaming errors */
165 CborErrorUnknownType, /* can only happen in major type 7 */
166 CborErrorIllegalType, /* type not allowed here */
168 CborErrorIllegalSimpleType, /* types of value less than 32 encoded in two bytes */
169
170 /* parser errors in strict mode parsing only */
183
184 /* encoder errors */
187
188 /* internal implementation errors */
192
193 /* errors in converting to JSON */
197
198 CborErrorOutOfMemory = (int) (~0U / 2 + 1),
199 CborErrorInternalError = (int) (~0U / 2) /* INT_MAX on two's complement machines */
200} CborError;
CborError
Definition cbor.h:152
@ CborErrorInternalError
Definition cbor.h:199
@ CborErrorUnknownType
Definition cbor.h:165
@ CborErrorIllegalSimpleType
Definition cbor.h:168
@ CborErrorInvalidUtf8TextString
Definition cbor.h:175
@ CborErrorImproperValue
Definition cbor.h:178
@ CborErrorTooFewItems
Definition cbor.h:186
@ CborErrorUnsupportedType
Definition cbor.h:191
@ CborErrorNestingTooDeep
Definition cbor.h:190
@ CborErrorOverlongEncoding
Definition cbor.h:179
@ CborErrorInappropriateTagForType
Definition cbor.h:173
@ CborErrorMapKeyNotString
Definition cbor.h:180
@ CborErrorJsonObjectKeyIsAggregate
Definition cbor.h:194
@ CborErrorAdvancePastEOF
Definition cbor.h:158
@ CborErrorUnknownTag
Definition cbor.h:172
@ CborErrorExcludedValue
Definition cbor.h:177
@ CborErrorIO
Definition cbor.h:159
@ CborErrorGarbageAtEnd
Definition cbor.h:162
@ CborErrorMapKeysNotUnique
Definition cbor.h:182
@ CborErrorDuplicateObjectKeys
Definition cbor.h:174
@ CborErrorExcludedType
Definition cbor.h:176
@ CborErrorOutOfMemory
Definition cbor.h:198
@ CborErrorJsonObjectKeyNotString
Definition cbor.h:195
@ CborUnknownError
Definition cbor.h:156
@ CborErrorUnexpectedBreak
Definition cbor.h:164
@ CborErrorMapNotSorted
Definition cbor.h:181
@ CborErrorUnknownSimpleType
Definition cbor.h:171
@ CborErrorIllegalType
Definition cbor.h:166
@ CborErrorTooManyItems
Definition cbor.h:185
@ CborErrorIllegalNumber
Definition cbor.h:167
@ CborErrorJsonNotImplemented
Definition cbor.h:196
@ CborErrorUnexpectedEOF
Definition cbor.h:163

◆ CborKnownTags

Enumerator
CborDateTimeStringTag 
CborUnixTime_tTag 
CborPositiveBignumTag 
CborNegativeBignumTag 
CborDecimalTag 
CborBigfloatTag 
CborCOSE_Encrypt0Tag 
CborCOSE_Mac0Tag 
CborCOSE_Sign1Tag 
CborExpectedBase64urlTag 
CborExpectedBase64Tag 
CborExpectedBase16Tag 
CborEncodedCborTag 
CborUrlTag 
CborBase64urlTag 
CborBase64Tag 
CborRegularExpressionTag 
CborMimeMessageTag 
CborCOSE_EncryptTag 
CborCOSE_MacTag 
CborCOSE_SignTag 
CborSignatureTag 

Definition at line 101 of file cbor.h.

101 {
106 CborDecimalTag = 4,
107 CborBigfloatTag = 5,
109 CborCOSE_Mac0Tag = 17,
115 CborUrlTag = 32,
116 CborBase64urlTag = 33,
117 CborBase64Tag = 34,
121 CborCOSE_MacTag = 97,
122 CborCOSE_SignTag = 98,
123 CborSignatureTag = 55799
#define CborBase64Tag
Definition cbor.h:142
#define CborPositiveBignumTag
Definition cbor.h:129
#define CborEncodedCborTag
Definition cbor.h:139
#define CborUrlTag
Definition cbor.h:140
#define CborNegativeBignumTag
Definition cbor.h:130
#define CborUnixTime_tTag
Definition cbor.h:128
#define CborRegularExpressionTag
Definition cbor.h:143
#define CborDateTimeStringTag
Definition cbor.h:127
#define CborSignatureTag
Definition cbor.h:148
#define CborExpectedBase64Tag
Definition cbor.h:137
#define CborCOSE_MacTag
Definition cbor.h:146
#define CborMimeMessageTag
Definition cbor.h:144
#define CborBigfloatTag
Definition cbor.h:132
#define CborExpectedBase64urlTag
Definition cbor.h:136
#define CborCOSE_EncryptTag
Definition cbor.h:145
#define CborDecimalTag
Definition cbor.h:131
#define CborBase64urlTag
Definition cbor.h:141
#define CborCOSE_Mac0Tag
Definition cbor.h:134
#define CborCOSE_SignTag
Definition cbor.h:147
CborKnownTags
Definition cbor.h:101
#define CborCOSE_Encrypt0Tag
Definition cbor.h:133
#define CborExpectedBase16Tag
Definition cbor.h:138
#define CborCOSE_Sign1Tag
Definition cbor.h:135

◆ CborParserIteratorFlags

Enumerator
CborIteratorFlag_IntegerValueTooLarge 
CborIteratorFlag_NegativeInteger 
CborIteratorFlag_IteratingStringChunks 
CborIteratorFlag_UnknownLength 
CborIteratorFlag_ContainerIsMap 

Definition at line 267 of file cbor.h.

268{
274};
@ CborIteratorFlag_ContainerIsMap
Definition cbor.h:273
@ CborIteratorFlag_IteratingStringChunks
Definition cbor.h:271

◆ CborPrettyFlags

Enumerator
CborPrettyNumericEncodingIndicators 
CborPrettyTextualEncodingIndicators 
CborPrettyIndicateIndeterminateLength 
CborPrettyIndicateIndetermineLength 
CborPrettyIndicateOverlongNumbers 
CborPrettyShowStringFragments 
CborPrettyMergeStringFragments 
CborPrettyDefaultFlags 

Definition at line 568 of file cbor.h.

568 {
571
575
578
580};
@ CborPrettyIndicateIndeterminateLength
Definition cbor.h:572
@ CborPrettyIndicateIndetermineLength
Definition cbor.h:573
@ CborPrettyMergeStringFragments
Definition cbor.h:577
@ CborPrettyNumericEncodingIndicators
Definition cbor.h:569
@ CborPrettyShowStringFragments
Definition cbor.h:576
@ CborPrettyTextualEncodingIndicators
Definition cbor.h:570
@ CborPrettyIndicateOverlongNumbers
Definition cbor.h:574

◆ CborType

enum CborType
Enumerator
CborIntegerType 
CborByteStringType 
CborTextStringType 
CborArrayType 
CborMapType 
CborTagType 
CborSimpleType 
CborBooleanType 
CborNullType 
CborUndefinedType 
CborHalfFloatType 
CborFloatType 
CborDoubleType 
CborInvalidType 

Definition at line 82 of file cbor.h.

82 {
83 CborIntegerType = 0x00,
84 CborByteStringType = 0x40,
85 CborTextStringType = 0x60,
86 CborArrayType = 0x80,
87 CborMapType = 0xa0,
88 CborTagType = 0xc0,
89 CborSimpleType = 0xe0,
90 CborBooleanType = 0xf5,
91 CborNullType = 0xf6,
92 CborUndefinedType = 0xf7,
93 CborHalfFloatType = 0xf9,
94 CborFloatType = 0xfa,
95 CborDoubleType = 0xfb,
96
97 CborInvalidType = 0xff /* equivalent to the break byte, so it will never be used */
98} CborType;

◆ CborValidationFlags

Enumerator
CborValidateShortestIntegrals 
CborValidateShortestFloatingPoint 
CborValidateShortestNumbers 
CborValidateNoIndeterminateLength 
CborValidateMapIsSorted 
CborValidateCanonicalFormat 
CborValidateMapKeysAreUnique 
CborValidateTagUse 
CborValidateUtf8 
CborValidateStrictMode 
CborValidateMapKeysAreString 
CborValidateNoUndefined 
CborValidateNoTags 
CborValidateFiniteFloatingPoint 
CborValidateNoUnknownSimpleTypesSA 
CborValidateNoUnknownSimpleTypes 
CborValidateNoUnknownTagsSA 
CborValidateNoUnknownTagsSR 
CborValidateNoUnknownTags 
CborValidateCompleteData 
CborValidateStrictest 
CborValidateBasic 

Definition at line 523 of file cbor.h.

523 {
524 /* Bit mapping:
525 * bits 0-7 (8 bits): canonical format
526 * bits 8-11 (4 bits): canonical format & strict mode
527 * bits 12-20 (8 bits): strict mode
528 * bits 21-31 (10 bits): other
529 */
530
536
538
540 CborValidateTagUse = 0x2000,
541 CborValidateUtf8 = 0x4000,
542
543 CborValidateStrictMode = 0xfff00,
544
546 CborValidateNoUndefined = 0x200000,
547 CborValidateNoTags = 0x400000,
549 /* unused = 0x1000000, */
550 /* unused = 0x2000000, */
551
554 CborValidateNoUnknownTagsSA = 0x10000000,
557
558 CborValidateCompleteData = (int)0x80000000,
559
560 CborValidateStrictest = (int)~0U,
562};
@ CborValidateShortestFloatingPoint
Definition cbor.h:532
@ CborValidateUtf8
Definition cbor.h:541
@ CborValidateBasic
Definition cbor.h:561
@ CborValidateNoUnknownSimpleTypes
Definition cbor.h:553
@ CborValidateCompleteData
Definition cbor.h:558
@ CborValidateNoUndefined
Definition cbor.h:546
@ CborValidateMapIsSorted
Definition cbor.h:535
@ CborValidateMapKeysAreUnique
Definition cbor.h:539
@ CborValidateNoUnknownSimpleTypesSA
Definition cbor.h:552
@ CborValidateNoUnknownTagsSR
Definition cbor.h:555
@ CborValidateNoUnknownTagsSA
Definition cbor.h:554
@ CborValidateStrictest
Definition cbor.h:560
@ CborValidateNoTags
Definition cbor.h:547
@ CborValidateShortestNumbers
Definition cbor.h:533
@ CborValidateCanonicalFormat
Definition cbor.h:537
@ CborValidateFiniteFloatingPoint
Definition cbor.h:548
@ CborValidateNoUnknownTags
Definition cbor.h:556
@ CborValidateShortestIntegrals
Definition cbor.h:531
@ CborValidateStrictMode
Definition cbor.h:543
@ CborValidateNoIndeterminateLength
Definition cbor.h:534
@ CborValidateTagUse
Definition cbor.h:540
@ CborValidateMapKeysAreString
Definition cbor.h:545

Macro Definition Documentation

◆ CBOR_INLINE

#define CBOR_INLINE

Definition at line 77 of file cbor.h.

◆ CBOR_INLINE_API

#define CBOR_INLINE_API   static CBOR_INLINE

Definition at line 69 of file cbor.h.

◆ CBOR_PRIVATE_API

#define CBOR_PRIVATE_API

Definition at line 62 of file cbor.h.

◆ CborBase64Tag

#define CborBase64Tag   CborBase64Tag

Definition at line 142 of file cbor.h.

◆ CborBase64urlTag

#define CborBase64urlTag   CborBase64urlTag

Definition at line 141 of file cbor.h.

◆ CborBigfloatTag

#define CborBigfloatTag   CborBigfloatTag

Definition at line 132 of file cbor.h.

◆ CborCOSE_Encrypt0Tag

#define CborCOSE_Encrypt0Tag   CborCOSE_Encrypt0Tag

Definition at line 133 of file cbor.h.

◆ CborCOSE_EncryptTag

#define CborCOSE_EncryptTag   CborCOSE_EncryptTag

Definition at line 145 of file cbor.h.

◆ CborCOSE_Mac0Tag

#define CborCOSE_Mac0Tag   CborCOSE_Mac0Tag

Definition at line 134 of file cbor.h.

◆ CborCOSE_MacTag

#define CborCOSE_MacTag   CborCOSE_MacTag

Definition at line 146 of file cbor.h.

◆ CborCOSE_Sign1Tag

#define CborCOSE_Sign1Tag   CborCOSE_Sign1Tag

Definition at line 135 of file cbor.h.

◆ CborCOSE_SignTag

#define CborCOSE_SignTag   CborCOSE_SignTag

Definition at line 147 of file cbor.h.

◆ CborDateTimeStringTag

#define CborDateTimeStringTag   CborDateTimeStringTag

Definition at line 127 of file cbor.h.

◆ CborDecimalTag

#define CborDecimalTag   CborDecimalTag

Definition at line 131 of file cbor.h.

◆ CborEncodedCborTag

#define CborEncodedCborTag   CborEncodedCborTag

Definition at line 139 of file cbor.h.

◆ CborExpectedBase16Tag

#define CborExpectedBase16Tag   CborExpectedBase16Tag

Definition at line 138 of file cbor.h.

◆ CborExpectedBase64Tag

#define CborExpectedBase64Tag   CborExpectedBase64Tag

Definition at line 137 of file cbor.h.

◆ CborExpectedBase64urlTag

#define CborExpectedBase64urlTag   CborExpectedBase64urlTag

Definition at line 136 of file cbor.h.

◆ CborMimeMessageTag

#define CborMimeMessageTag   CborMimeMessageTag

Definition at line 144 of file cbor.h.

◆ CborNegativeBignumTag

#define CborNegativeBignumTag   CborNegativeBignumTag

Definition at line 130 of file cbor.h.

◆ CborPositiveBignumTag

#define CborPositiveBignumTag   CborPositiveBignumTag

Definition at line 129 of file cbor.h.

◆ CborRegularExpressionTag

#define CborRegularExpressionTag   CborRegularExpressionTag

Definition at line 143 of file cbor.h.

◆ CborSignatureTag

#define CborSignatureTag   CborSignatureTag

Definition at line 148 of file cbor.h.

◆ CborUnixTime_tTag

#define CborUnixTime_tTag   CborUnixTime_tTag

Definition at line 128 of file cbor.h.

◆ CborUrlTag

#define CborUrlTag   CborUrlTag

Definition at line 140 of file cbor.h.

◆ SIZE_MAX

#define SIZE_MAX   ((size_t)-1)

Definition at line 55 of file cbor.h.

◆ TINYCBOR_VERSION

#define TINYCBOR_VERSION   ((TINYCBOR_VERSION_MAJOR << 16) | (TINYCBOR_VERSION_MINOR << 8) | TINYCBOR_VERSION_PATCH)

Definition at line 39 of file cbor.h.

Variable Documentation

◆ CborIndefiniteLength

const size_t CborIndefiniteLength = ((size_t)-1)
static

Definition at line 217 of file cbor.h.