14#ifndef qcbor_spiffy_decode_h
15#define qcbor_spiffy_decode_h
803 uint8_t *puSimpleValue);
809 uint8_t *puSimpleValue);
861 MapSearchInfo *pInfo,
862 MapSearchCallBack *pCallBack);
867 const uint32_t uEndOffset);
874 const uint8_t uQcborType,
881 const int64_t nLabel,
882 const uint8_t uQcborType,
889 QCBORDecode_Private_EnterBoundedMapOrArray(pMe,
QCBOR_TYPE_MAP, pItem);
916 QCBORDecode_Private_GetArrayOrMap(pMe,
QCBOR_TYPE_ARRAY, pItem, pEncodedCBOR);
922 const int64_t nLabel,
932 QCBORDecode_Private_SearchAndGetArrayOrMap(pMe, OneItemSeach, pItem, pEncodedCBOR);
942#ifndef QCBOR_DISABLE_NON_INTEGER_LABELS
949 QCBORDecode_Private_SearchAndGetArrayOrMap(pMe, OneItemSeach, pItem, pEncodedCBOR);
963 QCBORDecode_Private_GetArrayOrMap(pMe,
QCBOR_TYPE_MAP, pItem, pEncodedCBOR);
969 const int64_t nLabel,
979 QCBORDecode_Private_SearchAndGetArrayOrMap(pMe, OneItemSeach, pItem, pEncodedCBOR);
989#ifndef QCBOR_DISABLE_NON_INTEGER_LABELS
996 QCBORDecode_Private_SearchAndGetArrayOrMap(pMe, OneItemSeach, pItem, pEncodedCBOR);
1024 const int64_t nLabel,
1040 const char *szLabel,
1071 const int64_t nLabel,
1087 const char *szLabel,
1115 const int64_t nLabel)
1123 const char *szLabel)
1142 const int64_t nLabel)
1150 const char *szLabel)
static UsefulBufC UsefulBuf_FromSZ(const char *szString)
Convert a NULL-terminated string to a UsefulBufC.
Definition UsefulBuf.h:1995
#define NULLUsefulBufC
Definition UsefulBuf.h:321
QCBORError
Definition qcbor_common.h:260
@ QCBOR_ERR_MAP_LABEL_TYPE
Definition qcbor_common.h:410
@ QCBOR_ERR_UNEXPECTED_TYPE
Definition qcbor_common.h:465
@ QCBOR_SUCCESS
Definition qcbor_common.h:262
void QCBORDecode_VGetNext(QCBORDecodeContext *pCtx, QCBORItem *pDecodedItem)
Get the next item (integer, byte string, array...) in the preorder traversal of the CBOR tree.
#define QCBOR_TYPE_NONE
Definition qcbor_main_decode.h:305
#define QCBOR_TYPE_NULL
Definition qcbor_main_decode.h:428
#define QCBOR_TYPE_TEXT_STRING
Definition qcbor_main_decode.h:331
#define QCBOR_TYPE_ARRAY
Definition qcbor_main_decode.h:320
#define QCBOR_TYPE_INT64
Definition qcbor_main_decode.h:313
#define QCBOR_TYPE_UNDEF
Definition qcbor_main_decode.h:431
#define QCBOR_TYPE_MAP
Definition qcbor_main_decode.h:323
struct _QCBORDecodeContext QCBORDecodeContext
Definition qcbor_main_decode.h:785
#define QCBOR_TYPE_BYTE_STRING
Definition qcbor_main_decode.h:326
void QCBORDecode_GetSimpleInMapN(QCBORDecodeContext *pCtx, int64_t nLabel, uint8_t *puSimpleValue)
void QCBORDecode_GetItemInMapSZ(QCBORDecodeContext *pCtx, const char *szLabel, uint8_t uQcborType, QCBORItem *pItem)
void QCBORDecode_GetItemsInMap(QCBORDecodeContext *pCtx, QCBORItem *pItemList)
Get a group of labeled items all at once from a map.
static void QCBORDecode_GetUndefined(QCBORDecodeContext *pCtx)
Decode the next item as a CBOR "undefined" item.
Definition qcbor_spiffy_decode.h:1130
static void QCBORDecode_EnterArray(QCBORDecodeContext *pCtx, QCBORItem *pItem)
Enter an array for decoding in bounded mode.
Definition qcbor_spiffy_decode.h:893
static void QCBORDecode_GetArrayFromMapN(QCBORDecodeContext *pCtx, int64_t nLabel, QCBORItem *pItem, UsefulBufC *pEncodedCBOR)
Definition qcbor_spiffy_decode.h:921
void QCBORDecode_SeekToLabelN(QCBORDecodeContext *pCtx, int64_t nLabel)
Position traversal cursor by map label.
static void QCBORDecode_GetArray(QCBORDecodeContext *pCtx, QCBORItem *pItem, UsefulBufC *pEncodedCBOR)
Get the encoded bytes that make up an array.
Definition qcbor_spiffy_decode.h:912
void QCBORDecode_GetSimpleInMapSZ(QCBORDecodeContext *pCtx, const char *szLabel, uint8_t *puSimpleValue)
void QCBORDecode_GetItemInMapN(QCBORDecodeContext *pCtx, int64_t nLabel, uint8_t uQcborType, QCBORItem *pItem)
Get an item in map by label and type.
void QCBORDecode_EnterMapFromMapN(QCBORDecodeContext *pCtx, int64_t nLabel)
void QCBORDecode_GetBool(QCBORDecodeContext *pCtx, bool *pbBool)
Decode the next item as a Boolean.
void QCBORDecode_GetBoolInMapSZ(QCBORDecodeContext *pCtx, const char *szLabel, bool *pbBool)
static void QCBORDecode_GetNull(QCBORDecodeContext *pCtx)
Decode the next item as a null.
Definition qcbor_spiffy_decode.h:1103
void QCBORDecode_Rewind(QCBORDecodeContext *pCtx)
Reset traversal cursor to start of map, array, byte-string wrapped CBOR or start of input.
static void QCBORDecode_GetByteStringInMapN(QCBORDecodeContext *pCtx, int64_t nLabel, UsefulBufC *pBytes)
Definition qcbor_spiffy_decode.h:1023
static void QCBORDecode_ExitArray(QCBORDecodeContext *pCtx)
Exit an array that has been enetered.
Definition qcbor_spiffy_decode.h:899
static void QCBORDecode_GetArrayFromMapSZ(QCBORDecodeContext *pCtx, const char *szLabel, QCBORItem *pItem, UsefulBufC *pEncodedCBOR)
Definition qcbor_spiffy_decode.h:937
void QCBORDecode_GetSimple(QCBORDecodeContext *pCtx, uint8_t *puSimpleValue)
Decode the next item as a CBOR simple value.
static void QCBORDecode_GetTextStringInMapSZ(QCBORDecodeContext *pCtx, const char *szLabel, UsefulBufC *pText)
Definition qcbor_spiffy_decode.h:1086
static void QCBORDecode_GetTextStringInMapN(QCBORDecodeContext *pCtx, int64_t nLabel, UsefulBufC *pText)
Definition qcbor_spiffy_decode.h:1070
void QCBORDecode_EnterArrayFromMapN(QCBORDecodeContext *pMe, int64_t uLabel)
void QCBORDecode_GetItemsInMapWithCallback(QCBORDecodeContext *pCtx, QCBORItem *pItemList, void *pCallbackCtx, QCBORItemCallback pfCB)
Get a group of labeled items all at once from a map with a callback.
void QCBORDecode_SeekToLabelSZ(QCBORDecodeContext *pMe, const char *szLabel)
Position traversal cursor by map label.
static void QCBORDecode_GetByteString(QCBORDecodeContext *pCtx, UsefulBufC *pBytes)
Decode the next item as a byte string.
Definition qcbor_spiffy_decode.h:1009
static void QCBORDecode_EnterMap(QCBORDecodeContext *pCtx, QCBORItem *pItem)
Enter a map for decoding and searching.
Definition qcbor_spiffy_decode.h:888
static void QCBORDecode_GetNullInMapSZ(QCBORDecodeContext *pCtx, const char *szLabel)
Definition qcbor_spiffy_decode.h:1122
static void QCBORDecode_GetUndefinedInMapN(QCBORDecodeContext *pCtx, int64_t nLabel)
Definition qcbor_spiffy_decode.h:1141
static void QCBORDecode_GetNullInMapN(QCBORDecodeContext *pCtx, int64_t nLabel)
Definition qcbor_spiffy_decode.h:1114
static void QCBORDecode_GetTextString(QCBORDecodeContext *pCtx, UsefulBufC *pText)
Decode the next item as a text string.
Definition qcbor_spiffy_decode.h:1056
static void QCBORDecode_GetMap(QCBORDecodeContext *pCtx, QCBORItem *pItem, UsefulBufC *pEncodedCBOR)
Get the bytes that make up a map.
Definition qcbor_spiffy_decode.h:959
static void QCBORDecode_GetMapFromMapN(QCBORDecodeContext *pCtx, int64_t nLabel, QCBORItem *pItem, UsefulBufC *pEncodedCBOR)
Definition qcbor_spiffy_decode.h:968
void QCBORDecode_EnterMapFromMapSZ(QCBORDecodeContext *pCtx, const char *szLabel)
void QCBORDecode_GetBoolInMapN(QCBORDecodeContext *pCtx, int64_t nLabel, bool *pbBool)
QCBORError(* QCBORItemCallback)(void *pCallbackCtx, const QCBORItem *pItem)
Per-item callback for map searching.
Definition qcbor_spiffy_decode.h:673
static void QCBORDecode_ExitMap(QCBORDecodeContext *pCtx)
Exit a map that has been enetered.
Definition qcbor_spiffy_decode.h:905
static void QCBORDecode_GetMapFromMapSZ(QCBORDecodeContext *pCtx, const char *szLabel, QCBORItem *pItem, UsefulBufC *pEncodedCBOR)
Definition qcbor_spiffy_decode.h:984
static void QCBORDecode_GetByteStringInMapSZ(QCBORDecodeContext *pCtx, const char *szLabel, UsefulBufC *pBytes)
Definition qcbor_spiffy_decode.h:1039
void QCBORDecode_EnterArrayFromMapSZ(QCBORDecodeContext *pMe, const char *szLabel)
static void QCBORDecode_GetUndefinedInMapSZ(QCBORDecodeContext *pCtx, const char *szLabel)
Definition qcbor_spiffy_decode.h:1149
Definition qcbor_main_decode.h:574
union _QCBORItem::@2 label
UsefulBufC string
Definition qcbor_main_decode.h:615
int64_t int64
Definition qcbor_main_decode.h:608
uint8_t uDataType
Definition qcbor_main_decode.h:577
uint8_t uLabelType
Definition qcbor_main_decode.h:581
Definition UsefulBuf.h:280