Go to the source code of this file.
Data Structures | |
struct | as_msgpack_ext |
struct | as_packer |
struct | as_packer_buffer |
struct | as_unpacker |
Macros | |
#define | AS_PACKED_LIST_FLAG_NONE 0x00 |
#define | AS_PACKED_LIST_FLAG_ORDERED 0x01 |
#define | AS_PACKED_MAP_FLAG_K_ORDERED 0x01 |
#define | AS_PACKED_MAP_FLAG_KV_ORDERED (AS_PACKED_MAP_FLAG_K_ORDERED | AS_PACKED_MAP_FLAG_V_ORDERED) |
#define | AS_PACKED_MAP_FLAG_NONE 0x00 |
#define | AS_PACKED_MAP_FLAG_PRESERVE_ORDER 0x08 |
#define | AS_PACKED_MAP_FLAG_V_ORDERED 0x02 |
#define | AS_PACKED_PERSIST_INDEX 0x10 |
#define | AS_PACKER_BUFFER_SIZE 8192 |
Enumerations | |
enum | msgpack_compare_t { MSGPACK_COMPARE_ERROR = -2 , MSGPACK_COMPARE_END = -1 , MSGPACK_COMPARE_LESS = 0 , MSGPACK_COMPARE_EQUAL = 1 , MSGPACK_COMPARE_GREATER = 2 } |
Functions | |
AS_EXTERN as_serializer * | as_msgpack_init (as_serializer *) |
AS_EXTERN as_serializer * | as_msgpack_new (void) |
AS_EXTERN int | as_pack_append (as_packer *pk, const unsigned char *buf, uint32_t sz) |
int | as_pack_bin (as_packer *pk, const uint8_t *buf, uint32_t sz) |
uint32_t | as_pack_bin_size (uint32_t buf_sz) |
int | as_pack_bool (as_packer *pk, bool val) |
static uint32_t | as_pack_bool_size (void) |
int | as_pack_buf_ext_header (uint8_t *buf, uint32_t size, uint32_t content_size, uint8_t type) |
int | as_pack_bytes (as_packer *pk, const uint8_t *buf, uint32_t sz) |
int | as_pack_cmp_inf (as_packer *pk) |
static uint32_t | as_pack_cmp_inf_size (void) |
int | as_pack_cmp_wildcard (as_packer *pk) |
static uint32_t | as_pack_cmp_wildcard_size (void) |
int | as_pack_double (as_packer *pk, double val) |
static uint32_t | as_pack_double_size (void) |
AS_EXTERN int | as_pack_ext_header (as_packer *pk, uint32_t content_size, uint8_t type) |
uint32_t | as_pack_ext_header_get_size (uint32_t content_size) |
int | as_pack_float (as_packer *pk, float val) |
static uint32_t | as_pack_float_size (void) |
AS_EXTERN int | as_pack_int64 (as_packer *pk, int64_t val) |
uint32_t | as_pack_int64_size (int64_t val) |
AS_EXTERN int | as_pack_list_header (as_packer *pk, uint32_t ele_count) |
uint32_t | as_pack_list_header_get_size (uint32_t ele_count) |
AS_EXTERN int | as_pack_map_header (as_packer *pk, uint32_t ele_count) |
static uint32_t | as_pack_map_header_get_size (uint32_t ele_count) |
AS_EXTERN int | as_pack_nil (as_packer *pk) |
static uint32_t | as_pack_nil_size (void) |
int | as_pack_str (as_packer *pk, const uint8_t *buf, uint32_t sz) |
uint32_t | as_pack_str_size (uint32_t str_sz) |
AS_EXTERN int | as_pack_uint64 (as_packer *pk, uint64_t val) |
uint32_t | as_pack_uint64_size (uint64_t val) |
int | as_pack_val (as_packer *pk, const as_val *val) |
const uint8_t * | as_unpack_bin (as_unpacker *pk, uint32_t *sz_r) |
int64_t | as_unpack_blob_size (as_unpacker *pk) |
int | as_unpack_boolean (as_unpacker *pk, bool *value) |
msgpack_compare_t | as_unpack_buf_compare (const uint8_t *buf1, uint32_t size1, const uint8_t *buf2, uint32_t size2) |
static bool | as_unpack_buf_is_less (const uint8_t *buf1, uint32_t size1, const uint8_t *buf2, uint32_t size2) |
int64_t | as_unpack_buf_list_element_count (const uint8_t *buf, uint32_t size) |
int64_t | as_unpack_buf_map_element_count (const uint8_t *buf, uint32_t size) |
as_val_t | as_unpack_buf_peek_type (const uint8_t *buf, uint32_t size) |
msgpack_compare_t | as_unpack_compare (as_unpacker *pk1, as_unpacker *pk2) |
int | as_unpack_double (as_unpacker *pk, double *x) |
int | as_unpack_ext (as_unpacker *pk, as_msgpack_ext *ext) |
int | as_unpack_int64 (as_unpacker *pk, int64_t *i) |
int64_t | as_unpack_list_header_element_count (as_unpacker *pk) |
int64_t | as_unpack_map_header_element_count (as_unpacker *pk) |
int | as_unpack_nil (as_unpacker *pk) |
bool | as_unpack_peek_is_ext (const as_unpacker *pk) |
as_val_t | as_unpack_peek_type (const as_unpacker *pk) |
int64_t | as_unpack_size (as_unpacker *pk) |
const uint8_t * | as_unpack_str (as_unpacker *pk, uint32_t *sz_r) |
int | as_unpack_uint64 (as_unpacker *pk, uint64_t *i) |
int | as_unpack_val (as_unpacker *pk, as_val **val) |
AS_EXTERN msgpack_compare_t | as_val_cmp (const as_val *v1, const as_val *v2) |
#define AS_PACKED_LIST_FLAG_NONE 0x00 |
Definition at line 38 of file as_msgpack.h.
#define AS_PACKED_LIST_FLAG_ORDERED 0x01 |
Definition at line 39 of file as_msgpack.h.
#define AS_PACKED_MAP_FLAG_K_ORDERED 0x01 |
Definition at line 33 of file as_msgpack.h.
#define AS_PACKED_MAP_FLAG_KV_ORDERED (AS_PACKED_MAP_FLAG_K_ORDERED | AS_PACKED_MAP_FLAG_V_ORDERED) |
Definition at line 36 of file as_msgpack.h.
#define AS_PACKED_MAP_FLAG_NONE 0x00 |
Definition at line 32 of file as_msgpack.h.
#define AS_PACKED_MAP_FLAG_PRESERVE_ORDER 0x08 |
Definition at line 35 of file as_msgpack.h.
#define AS_PACKED_MAP_FLAG_V_ORDERED 0x02 |
Definition at line 34 of file as_msgpack.h.
#define AS_PACKED_PERSIST_INDEX 0x10 |
Definition at line 41 of file as_msgpack.h.
#define AS_PACKER_BUFFER_SIZE 8192 |
Definition at line 30 of file as_msgpack.h.
enum msgpack_compare_t |
Enumerator | |
---|---|
MSGPACK_COMPARE_ERROR | |
MSGPACK_COMPARE_END | |
MSGPACK_COMPARE_LESS | |
MSGPACK_COMPARE_EQUAL | |
MSGPACK_COMPARE_GREATER |
Definition at line 74 of file as_msgpack.h.
AS_EXTERN as_serializer * as_msgpack_init | ( | as_serializer * | ) |
AS_EXTERN as_serializer * as_msgpack_new | ( | void | ) |
int as_pack_bin | ( | as_packer * | pk, |
const uint8_t * | buf, | ||
uint32_t | sz ) |
uint32_t as_pack_bin_size | ( | uint32_t | buf_sz | ) |
int as_pack_bool | ( | as_packer * | pk, |
bool | val ) |
|
inlinestatic |
Definition at line 108 of file as_msgpack.h.
int as_pack_buf_ext_header | ( | uint8_t * | buf, |
uint32_t | size, | ||
uint32_t | content_size, | ||
uint8_t | type ) |
int as_pack_bytes | ( | as_packer * | pk, |
const uint8_t * | buf, | ||
uint32_t | sz ) |
int as_pack_cmp_inf | ( | as_packer * | pk | ) |
|
inlinestatic |
Definition at line 115 of file as_msgpack.h.
int as_pack_cmp_wildcard | ( | as_packer * | pk | ) |
|
inlinestatic |
Definition at line 119 of file as_msgpack.h.
int as_pack_double | ( | as_packer * | pk, |
double | val ) |
|
inlinestatic |
Definition at line 135 of file as_msgpack.h.
Pack an ext type.
uint32_t as_pack_ext_header_get_size | ( | uint32_t | content_size | ) |
Get size of an ext header.
content_size | size in bytes of ext contents |
int as_pack_float | ( | as_packer * | pk, |
float | val ) |
Pack a float.
|
inlinestatic |
Definition at line 131 of file as_msgpack.h.
uint32_t as_pack_int64_size | ( | int64_t | val | ) |
Pack a list header with ele_count.
uint32_t as_pack_list_header_get_size | ( | uint32_t | ele_count | ) |
Get packed header size for list with ele_count.
Pack a map header with ele_count.
|
inlinestatic |
Get packed header size for map with ele_count.
Definition at line 175 of file as_msgpack.h.
References as_pack_list_header_get_size().
|
inlinestatic |
Definition at line 104 of file as_msgpack.h.
int as_pack_str | ( | as_packer * | pk, |
const uint8_t * | buf, | ||
uint32_t | sz ) |
Pack a str.
uint32_t as_pack_str_size | ( | uint32_t | str_sz | ) |
uint32_t as_pack_uint64_size | ( | uint64_t | val | ) |
const uint8_t * as_unpack_bin | ( | as_unpacker * | pk, |
uint32_t * | sz_r ) |
Unpack bin (or str).
int64_t as_unpack_blob_size | ( | as_unpacker * | pk | ) |
Get size of packed blob.
int as_unpack_boolean | ( | as_unpacker * | pk, |
bool * | value ) |
Unpack boolean.
msgpack_compare_t as_unpack_buf_compare | ( | const uint8_t * | buf1, |
uint32_t | size1, | ||
const uint8_t * | buf2, | ||
uint32_t | size2 ) |
Compare two msgpack buffers.
|
inlinestatic |
Compare two msgpack buffers.
Definition at line 283 of file as_msgpack.h.
References as_unpack_buf_compare(), and MSGPACK_COMPARE_LESS.
int64_t as_unpack_buf_list_element_count | ( | const uint8_t * | buf, |
uint32_t | size ) |
Unpack list element count from buffer.
int64_t as_unpack_buf_map_element_count | ( | const uint8_t * | buf, |
uint32_t | size ) |
Unpack map element count from buffer.
as_val_t as_unpack_buf_peek_type | ( | const uint8_t * | buf, |
uint32_t | size ) |
msgpack_compare_t as_unpack_compare | ( | as_unpacker * | pk1, |
as_unpacker * | pk2 ) |
int as_unpack_double | ( | as_unpacker * | pk, |
double * | x ) |
Unpack double.
int as_unpack_ext | ( | as_unpacker * | pk, |
as_msgpack_ext * | ext ) |
Unpack extension type.
int as_unpack_int64 | ( | as_unpacker * | pk, |
int64_t * | i ) |
Unpack integer.
int64_t as_unpack_list_header_element_count | ( | as_unpacker * | pk | ) |
Get element count of packed list.
int64_t as_unpack_map_header_element_count | ( | as_unpacker * | pk | ) |
Get element count of packed map.
int as_unpack_nil | ( | as_unpacker * | pk | ) |
Unpack nil.
bool as_unpack_peek_is_ext | ( | const as_unpacker * | pk | ) |
Check next element without consuming any bytes.
as_val_t as_unpack_peek_type | ( | const as_unpacker * | pk | ) |
Check next element without consuming any bytes.
int64_t as_unpack_size | ( | as_unpacker * | pk | ) |
Get size of packed value.
const uint8_t * as_unpack_str | ( | as_unpacker * | pk, |
uint32_t * | sz_r ) |
Unpack str (or bin).
int as_unpack_uint64 | ( | as_unpacker * | pk, |
uint64_t * | i ) |
int as_unpack_val | ( | as_unpacker * | pk, |
as_val ** | val ) |
AS_EXTERN msgpack_compare_t as_val_cmp | ( | const as_val * | v1, |
const as_val * | v2 ) |