14#ifndef VL_MSGPACK_IO_H
15#define VL_MSGPACK_IO_H
21typedef enum vl_msgpack_io_error_
23 VL_MSGPACK_IO_ERR_NONE,
24 VL_MSGPACK_IO_ERR_STACK_UNDERFLOW,
26 VL_MSGPACK_IO_ERR_UNEXPECTED_TOKEN,
28 VL_MSGPACK_IO_ERR_UNBALANCED_MAP,
31 VL_MSGPACK_IO_ERR_UNEXPECTED_EOF,
47typedef struct vl_msgpack_encoder_
296typedef struct vl_msgpack_io_token_
398typedef struct vl_msgpack_decoder_
453 const void* key, vl_memsize_t keyLen);
A MessagePack Token.
Definition vl_msgpack_io.h:297
vl_msgpack_type type
Definition vl_msgpack_io.h:389
vl_hash_iter vl_msgpack_iter
Definition vl_msgpack.h:31
vl_msgpack_type
All MessagePack Types.
Definition vl_msgpack.h:37
MessagePack Document Object Model.
Definition vl_msgpack.h:115
VL_API void vlMsgPackIOEncodeStringLen(vl_msgpack_encoder *enc, const char *value, vl_uint32_t len)
Encodes a string's length into the MessagePack stream.
Definition vl_msgpack_io.c:257
VL_API void vlMsgPackIOEncodeMapEnd(vl_msgpack_encoder *enc)
Ends encoding a map in the MessagePack stream.
Definition vl_msgpack_io.c:210
vl_dsoffs_t srcOffset
Definition vl_msgpack_io.h:402
vl_msgpack_type errorType
Definition vl_msgpack_io.h:405
VL_API void vlMsgPackIOEncoderFree(vl_msgpack_encoder *enc)
Frees the specified MessagePack encoder.
Definition vl_msgpack_io.c:176
VL_API void vlMsgPackIOEncodeFloat64(vl_msgpack_encoder *enc, vl_float64_t value)
Encodes a 64-bit floating point value into the MessagePack stream.
Definition vl_msgpack_io.c:308
vl_dsidx_t errorDepth
Definition vl_msgpack_io.h:56
VL_API vl_msgpack_encoder * vlMsgPackIOEncoderNew(void)
Allocates and initializes a MessagePack encoder.
Definition vl_msgpack_io.c:182
VL_API void vlMsgPackIOEncodeUInt(vl_msgpack_encoder *enc, vl_ularge_t value)
Encodes an unsigned integer value into the MessagePack stream.
Definition vl_msgpack_io.c:517
VL_API void vlMsgPackIOEncoderDelete(vl_msgpack_encoder *enc)
Deletes the specified MessagePack encoder.
Definition vl_msgpack_io.c:189
vl_memsize_t srcLen
Definition vl_msgpack_io.h:401
VL_API void vlMsgPackIOEncodeInt(vl_msgpack_encoder *enc, vl_ilarge_t value)
Encodes a signed integer value into the MessagePack stream.
Definition vl_msgpack_io.c:449
VL_API void vlMsgPackIOEncodeExt(vl_msgpack_encoder *enc, vl_int8_t type, const void *value, vl_uint32_t len)
Encodes an extension type value into the MessagePack stream.
Definition vl_msgpack_io.c:353
VL_API void vlMsgPackIOEncodeArrayBegin(vl_msgpack_encoder *enc)
Begins encoding an array in the MessagePack stream.
Definition vl_msgpack_io.c:232
VL_API void vlMsgPackIOEncodeBool(vl_msgpack_encoder *enc, vl_bool_t value)
Encodes a boolean value into the MessagePack stream.
Definition vl_msgpack_io.c:250
vl_buffer buffer
Definition vl_msgpack_io.h:52
VL_API void vlMsgPackIOEncodeFloat32(vl_msgpack_encoder *enc, vl_float32_t value)
Encodes a 32-bit floating point value into the MessagePack stream.
Definition vl_msgpack_io.c:299
const vl_uint8_t * srcMem
Definition vl_msgpack_io.h:400
VL_API void vlMsgPackIOEncodeMapBegin(vl_msgpack_encoder *enc)
Begins encoding a map in the MessagePack stream.
Definition vl_msgpack_io.c:204
VL_API void vlMsgPackIOEncodeBinary(vl_msgpack_encoder *enc, const void *value, vl_uint32_t len)
Encodes a binary value into the MessagePack stream.
Definition vl_msgpack_io.c:317
VL_API vl_bool_t vlMsgPackIODecoderNext(vl_msgpack_decoder *decoder, vl_msgpack_io_token *tkPtr)
Extracts the next token from the MessagePack stream.
Definition vl_msgpack_io.c:662
vl_dsoffs_t errorOffset
Definition vl_msgpack_io.h:406
vl_stack stateStack
Definition vl_msgpack_io.h:50
VL_API void vlMsgPackIOEncoderInit(vl_msgpack_encoder *enc)
Initializes the specified MessagePack encoder.
Definition vl_msgpack_io.c:166
VL_API void vlMsgPackIOEncoderClear(vl_msgpack_encoder *enc)
Clears the state of the MessagePack encoder.
Definition vl_msgpack_io.c:195
VL_API void vlMsgPackIODecoderStart(vl_msgpack_decoder *dec, const void *srcMem, vl_memsize_t srcLen)
Starts the MessagePack decoding process.
Definition vl_msgpack_io.c:640
VL_API void vlMsgPackIOEncodeNil(vl_msgpack_encoder *enc)
Encodes a nil value into the MessagePack stream.
Definition vl_msgpack_io.c:560
vl_msgpack_type errorType
Definition vl_msgpack_io.h:55
VL_API vl_msgpack_iter vlMsgPackIODecodeToDOM(vl_msgpack_decoder *decoder, vl_msgpack *dest, vl_msgpack_iter parent, const void *key, vl_memsize_t keyLen)
Decodes MessagePack data into a DOM.
Definition vl_msgpack_io.c:1031
vl_msgpack_io_error error
Definition vl_msgpack_io.h:404
VL_API void vlMsgPackIOEncodeFromDOM(vl_msgpack_encoder *encoder, vl_msgpack *src, vl_msgpack_iter curIter)
Encodes from a MessagePack DOM.
Definition vl_msgpack_io.c:567
vl_msgpack_io_error error
Definition vl_msgpack_io.h:54
VL_API void vlMsgPackIOEncodeArrayEnd(vl_msgpack_encoder *enc)
Ends encoding an array in the MessagePack stream.
Definition vl_msgpack_io.c:238
A MessagePack decoder.
Definition vl_msgpack_io.h:399
MessagePack Format Encoder State.
Definition vl_msgpack_io.h:48
VL_BOOL_T vl_bool_t
Definition vl_numtypes.h:191
VL_STRUCTURE_INDEX_T vl_dsidx_t
Index type for data structures.
Definition vl_numtypes.h:75
VL_F32_T vl_float32_t
32-bit floating point number type.
Definition vl_numtypes.h:173
VL_ULARGE_T vl_ularge_t
Largest available unsigned integer type.
Definition vl_numtypes.h:136
VL_STRUCTURE_OFFSET_T vl_dsoffs_t
Byte offset type for data structures.
Definition vl_numtypes.h:70
VL_ILARGE_T vl_ilarge_t
Largest available signed integer type.
Definition vl_numtypes.h:140
A virtual stack allocator.
Definition vl_stack.h:38