QtBase  v6.3.1
Classes | Macros | Typedefs | Enumerations | Functions
cbor.h File Reference
#include <assert.h>
#include <limits.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include "tinycbor-version.h"
#include <stdbool.h>
Include dependency graph for cbor.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  CborEncoder
 
struct  CborParserOperations
 
struct  CborParser
 
struct  CborValue
 

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
 

Typedefs

typedef enum CborType CborType
 
typedef uint64_t CborTag
 
typedef enum CborKnownTags CborKnownTags
 
typedef enum CborError CborError
 
typedef enum CborEncoderAppendType CborEncoderAppendType
 
typedef CborError(* CborEncoderWriteFunction) (void *, const void *, size_t, CborEncoderAppendType)
 
typedef struct CborEncoder CborEncoder
 
typedef struct CborParser CborParser
 
typedef struct CborValue CborValue
 
typedef CborError(* CborStreamFunction) (void *token, const char *fmt,...)
 

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 ,
  CborErrorNoMoreStringChunks , CborErrorUnknownSimpleType = 512 , CborErrorUnknownTag , CborErrorInappropriateTagForType ,
  CborErrorDuplicateObjectKeys , CborErrorInvalidUtf8TextString , CborErrorExcludedType , CborErrorExcludedValue ,
  CborErrorImproperValue , CborErrorOverlongEncoding , CborErrorMapKeyNotString , CborErrorMapNotSorted ,
  CborErrorMapKeysNotUnique , CborErrorTooManyItems = 768 , CborErrorTooFewItems , CborErrorDataTooLarge = 1024 ,
  CborErrorNestingTooDeep , CborErrorUnsupportedType , CborErrorUnimplementedValidation , CborErrorJsonObjectKeyIsAggregate = 1280 ,
  CborErrorJsonObjectKeyNotString , CborErrorJsonNotImplemented , CborErrorOutOfMemory = (int) (~0U / 2 + 1) , CborErrorInternalError = (int) (~0U / 2)
}
 
enum  CborEncoderAppendType { CborEncoderAppendCborData = 0 , CborEncoderAppendStringData = 1 }
 
enum  CborEncoderFlags { CborIteratorFlag_WriterFunction = 0x01 , CborIteratorFlag_ContainerIsMap_ = 0x20 }
 
enum  CborParserGlobalFlags { CborParserFlag_ExternalSource = 0x01 }
 
enum  CborParserIteratorFlags {
  CborIteratorFlag_IntegerValueIs64Bit = 0x01 , CborIteratorFlag_IntegerValueTooLarge = 0x02 , CborIteratorFlag_NegativeInteger = 0x04 , CborIteratorFlag_BeforeFirstStringChunk = 0x04 ,
  CborIteratorFlag_IteratingStringChunks = 0x08 , CborIteratorFlag_UnknownLength = 0x10 , CborIteratorFlag_ContainerIsMap = 0x20 , CborIteratorFlag_NextIsMapKey = 0x40
}
 
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
}
 

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 void cbor_encoder_init_writer (CborEncoder *encoder, CborEncoderWriteFunction writer, void *)
 
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)
 
CBOR_INLINE_API 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)
 
CBOR_INLINE_API CborError cbor_encode_boolean (CborEncoder *encoder, bool value)
 
CBOR_INLINE_API CborError cbor_encode_null (CborEncoder *encoder)
 
CBOR_INLINE_API CborError cbor_encode_undefined (CborEncoder *encoder)
 
CBOR_INLINE_API CborError cbor_encode_half_float (CborEncoder *encoder, const void *value)
 
CBOR_API CborError cbor_encode_float_as_half_float (CborEncoder *encoder, float value)
 
CBOR_INLINE_API CborError cbor_encode_float (CborEncoder *encoder, float value)
 
CBOR_INLINE_API CborError cbor_encode_double (CborEncoder *encoder, double value)
 
CBOR_API CborError cbor_encoder_create_array (CborEncoder *parentEncoder, CborEncoder *arrayEncoder, size_t length)
 
CBOR_API CborError cbor_encoder_create_map (CborEncoder *parentEncoder, CborEncoder *mapEncoder, size_t length)
 
CBOR_API CborError cbor_encoder_close_container (CborEncoder *parentEncoder, const CborEncoder *containerEncoder)
 
CBOR_API CborError cbor_encoder_close_container_checked (CborEncoder *parentEncoder, const CborEncoder *containerEncoder)
 
CBOR_INLINE_API uint8_t * _cbor_encoder_get_buffer_pointer (const CborEncoder *encoder)
 
CBOR_INLINE_API size_t cbor_encoder_get_buffer_size (const CborEncoder *encoder, const uint8_t *buffer)
 
CBOR_INLINE_API 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_parser_init_reader (const struct CborParserOperations *ops, CborParser *parser, CborValue *it, void *token)
 
CBOR_API CborError cbor_value_validate_basic (const CborValue *it)
 
CBOR_INLINE_API bool cbor_value_at_end (const CborValue *it)
 
CBOR_INLINE_API const uint8_t * cbor_value_get_next_byte (const CborValue *it)
 
CBOR_API CborError cbor_value_reparse (CborValue *it)
 
CBOR_API CborError cbor_value_advance_fixed (CborValue *it)
 
CBOR_API CborError cbor_value_advance (CborValue *it)
 
CBOR_INLINE_API 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)
 
CBOR_PRIVATE_API uint64_t _cbor_value_decode_int64_internal (const CborValue *value)
 
CBOR_INLINE_API uint64_t _cbor_value_extract_int64_helper (const CborValue *value)
 
CBOR_INLINE_API bool cbor_value_is_valid (const CborValue *value)
 
CBOR_INLINE_API CborType cbor_value_get_type (const CborValue *value)
 
CBOR_INLINE_API bool cbor_value_is_null (const CborValue *value)
 
CBOR_INLINE_API bool cbor_value_is_undefined (const CborValue *value)
 
CBOR_INLINE_API bool cbor_value_is_boolean (const CborValue *value)
 
CBOR_INLINE_API CborError cbor_value_get_boolean (const CborValue *value, bool *result)
 
CBOR_INLINE_API bool cbor_value_is_simple_type (const CborValue *value)
 
CBOR_INLINE_API CborError cbor_value_get_simple_type (const CborValue *value, uint8_t *result)
 
CBOR_INLINE_API bool cbor_value_is_integer (const CborValue *value)
 
CBOR_INLINE_API bool cbor_value_is_unsigned_integer (const CborValue *value)
 
CBOR_INLINE_API bool cbor_value_is_negative_integer (const CborValue *value)
 
CBOR_INLINE_API CborError cbor_value_get_raw_integer (const CborValue *value, uint64_t *result)
 
CBOR_INLINE_API CborError cbor_value_get_uint64 (const CborValue *value, uint64_t *result)
 
CBOR_INLINE_API CborError cbor_value_get_int64 (const CborValue *value, int64_t *result)
 
CBOR_INLINE_API 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)
 
CBOR_INLINE_API bool cbor_value_is_length_known (const CborValue *value)
 
CBOR_INLINE_API bool cbor_value_is_tag (const CborValue *value)
 
CBOR_INLINE_API CborError cbor_value_get_tag (const CborValue *value, CborTag *result)
 
CBOR_API CborError cbor_value_skip_tag (CborValue *it)
 
CBOR_INLINE_API bool cbor_value_is_byte_string (const CborValue *value)
 
CBOR_INLINE_API bool cbor_value_is_text_string (const CborValue *value)
 
CBOR_INLINE_API CborError cbor_value_get_string_length (const CborValue *value, size_t *length)
 
CBOR_PRIVATE_API CborError _cbor_value_copy_string (const CborValue *value, void *buffer, size_t *buflen, CborValue *next)
 
CBOR_PRIVATE_API 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)
 
CBOR_INLINE_API CborError cbor_value_copy_text_string (const CborValue *value, char *buffer, size_t *buflen, CborValue *next)
 
CBOR_INLINE_API CborError cbor_value_copy_byte_string (const CborValue *value, uint8_t *buffer, size_t *buflen, CborValue *next)
 
CBOR_INLINE_API CborError cbor_value_dup_text_string (const CborValue *value, char **buffer, size_t *buflen, CborValue *next)
 
CBOR_INLINE_API CborError cbor_value_dup_byte_string (const CborValue *value, uint8_t **buffer, size_t *buflen, CborValue *next)
 
CBOR_PRIVATE_API CborError _cbor_value_get_string_chunk_size (const CborValue *value, size_t *len)
 
CBOR_INLINE_API CborError cbor_value_get_string_chunk_size (const CborValue *value, size_t *len)
 
CBOR_INLINE_API bool cbor_value_string_iteration_at_end (const CborValue *value)
 
CBOR_PRIVATE_API CborError _cbor_value_begin_string_iteration (CborValue *value)
 
CBOR_INLINE_API CborError cbor_value_begin_string_iteration (CborValue *value)
 
CBOR_PRIVATE_API CborError _cbor_value_finish_string_iteration (CborValue *value)
 
CBOR_INLINE_API CborError cbor_value_finish_string_iteration (CborValue *value)
 
CBOR_PRIVATE_API CborError _cbor_value_get_string_chunk (const CborValue *value, const void **bufferptr, size_t *len, CborValue *next)
 
CBOR_INLINE_API CborError cbor_value_get_text_string_chunk (const CborValue *value, const char **bufferptr, size_t *len, CborValue *next)
 
CBOR_INLINE_API CborError cbor_value_get_byte_string_chunk (const CborValue *value, const uint8_t **bufferptr, size_t *len, CborValue *next)
 
CBOR_API CborError cbor_value_text_string_equals (const CborValue *value, const char *string, bool *result)
 
CBOR_INLINE_API bool cbor_value_is_array (const CborValue *value)
 
CBOR_INLINE_API bool cbor_value_is_map (const CborValue *value)
 
CBOR_INLINE_API CborError cbor_value_get_array_length (const CborValue *value, size_t *length)
 
CBOR_INLINE_API 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)
 
CBOR_INLINE_API bool cbor_value_is_half_float (const CborValue *value)
 
CBOR_API CborError cbor_value_get_half_float_as_float (const CborValue *value, float *result)
 
CBOR_INLINE_API CborError cbor_value_get_half_float (const CborValue *value, void *result)
 
CBOR_INLINE_API bool cbor_value_is_float (const CborValue *value)
 
CBOR_INLINE_API CborError cbor_value_get_float (const CborValue *value, float *result)
 
CBOR_INLINE_API bool cbor_value_is_double (const CborValue *value)
 
CBOR_INLINE_API 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)
 
CBOR_INLINE_API CborError cbor_value_to_pretty (FILE *out, const CborValue *value)
 

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.

Typedef Documentation

◆ CborEncoder

typedef struct CborEncoder CborEncoder

Definition at line 214 of file cbor.h.

◆ CborEncoderAppendType

◆ CborEncoderWriteFunction

typedef CborError(* CborEncoderWriteFunction) (void *, const void *, size_t, CborEncoderAppendType)

Definition at line 214 of file cbor.h.

◆ CborError

typedef enum CborError CborError

◆ CborKnownTags

◆ CborParser

typedef struct CborParser CborParser

Definition at line 281 of file cbor.h.

◆ CborStreamFunction

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

Definition at line 696 of file cbor.h.

◆ CborTag

typedef uint64_t CborTag

Definition at line 100 of file cbor.h.

◆ CborType

typedef enum CborType CborType

◆ CborValue

typedef struct CborValue CborValue

Definition at line 281 of file cbor.h.

Enumeration Type Documentation

◆ CborEncoderAppendType

Enumerator
CborEncoderAppendCborData 
CborEncoderAppendStringData 

Definition at line 208 of file cbor.h.

◆ CborEncoderFlags

Enumerator
CborIteratorFlag_WriterFunction 
CborIteratorFlag_ContainerIsMap_ 

Definition at line 216 of file cbor.h.

◆ CborError

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

Definition at line 152 of file cbor.h.

◆ 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.

◆ CborParserGlobalFlags

Enumerator
CborParserFlag_ExternalSource 

Definition at line 289 of file cbor.h.

◆ CborParserIteratorFlags

Enumerator
CborIteratorFlag_IntegerValueIs64Bit 
CborIteratorFlag_IntegerValueTooLarge 
CborIteratorFlag_NegativeInteger 
CborIteratorFlag_BeforeFirstStringChunk 
CborIteratorFlag_IteratingStringChunks 
CborIteratorFlag_UnknownLength 
CborIteratorFlag_ContainerIsMap 
CborIteratorFlag_NextIsMapKey 

Definition at line 294 of file cbor.h.

◆ CborPrettyFlags

Enumerator
CborPrettyNumericEncodingIndicators 
CborPrettyTextualEncodingIndicators 
CborPrettyIndicateIndeterminateLength 
CborPrettyIndicateIndetermineLength 
CborPrettyIndicateOverlongNumbers 
CborPrettyShowStringFragments 
CborPrettyMergeStringFragments 
CborPrettyDefaultFlags 

Definition at line 682 of file cbor.h.

◆ 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.

◆ 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 635 of file cbor.h.

Function Documentation

◆ _cbor_encoder_get_buffer_pointer()

CBOR_INLINE_API uint8_t* _cbor_encoder_get_buffer_pointer ( const CborEncoder encoder)

Definition at line 271 of file cbor.h.

◆ _cbor_value_dup_string()

CBOR_PRIVATE_API CborError _cbor_value_dup_string ( const CborValue value,
void **  buffer,
size_t *  buflen,
CborValue next 
)
Here is the caller graph for this function:

◆ _cbor_value_extract_int64_helper()

CBOR_INLINE_API uint64_t _cbor_value_extract_int64_helper ( const CborValue value)

Definition at line 369 of file cbor.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cbor_encoder_close_container_checked()

CBOR_API CborError cbor_encoder_close_container_checked ( CborEncoder parentEncoder,
const CborEncoder containerEncoder 
)

◆ cbor_error_string()

CBOR_API const char* cbor_error_string ( CborError  error)

Returns the error string corresponding to the CBOR error condition error.

Definition at line 80 of file cborerrorstrings.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cbor_value_begin_string_iteration()

CBOR_INLINE_API CborError cbor_value_begin_string_iteration ( CborValue value)

Definition at line 529 of file cbor.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cbor_value_dup_byte_string()

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

Definition at line 508 of file cbor.h.

Here is the call graph for this function:

◆ cbor_value_dup_text_string()

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

Definition at line 502 of file cbor.h.

Here is the call graph for this function:

◆ cbor_value_finish_string_iteration()

CBOR_INLINE_API CborError cbor_value_finish_string_iteration ( CborValue value)

Definition at line 537 of file cbor.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cbor_value_get_byte_string_chunk()

CBOR_INLINE_API CborError cbor_value_get_byte_string_chunk ( const CborValue value,
const uint8_t **  bufferptr,
size_t *  len,
CborValue next 
)

Definition at line 551 of file cbor.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cbor_value_get_double()

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

Definition at line 622 of file cbor.h.

Here is the call graph for this function:

◆ cbor_value_get_half_float_as_float()

CBOR_API CborError cbor_value_get_half_float_as_float ( const CborValue value,
float *  result 
)

◆ cbor_value_get_string_chunk_size()

CBOR_INLINE_API CborError cbor_value_get_string_chunk_size ( const CborValue value,
size_t *  len 
)

Definition at line 516 of file cbor.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cbor_value_string_iteration_at_end()

CBOR_INLINE_API bool cbor_value_string_iteration_at_end ( const CborValue value)

Definition at line 522 of file cbor.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cbor_value_to_pretty()

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

Definition at line 708 of file cbor.h.

◆ 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 
)
Here is the caller graph for this function:

◆ cbor_value_validate()

CBOR_API CborError cbor_value_validate ( const CborValue it,
uint32_t  flags 
)