17 #ifndef KAA_COMMON_SCHEMA_H_
18 #define KAA_COMMON_SCHEMA_H_
34 #define AVRO_NULL_SIZE 0
35 #define AVRO_FLOAT_SIZE 4
36 #define AVRO_DOUBLE_SIZE 8
51 typedef void *(*deserialize_fn)();
61 typedef void *(*deserialize_w_ctx_fn)(
avro_reader_t reader,
void *context);
void kaa_null_destroy(void *data)
size_t kaa_double_get_size(void *data)
destroy_fn destroy
Definition: kaa_common_schema.h:78
kaa_list_t * kaa_array_deserialize_wo_ctx(avro_reader_t reader, deserialize_wo_ctx_fn deserialize)
int8_t * kaa_boolean_deserialize(avro_reader_t reader)
void kaa_data_destroy(void *data)
kaa_bytes_t * kaa_fixed_copy_create(const uint8_t *data, size_t data_len)
Definition: kaa_common_schema.h:68
void(* destroy_fn)(void *data)
Definition: kaa_common_schema.h:64
size_t kaa_int_get_size(void *data)
void kaa_array_serialize(avro_writer_t writer, kaa_list_t *array, serialize_fn serialize)
size_t kaa_array_get_size(kaa_list_t *array, get_size_fn get_size)
double * kaa_double_deserialize(avro_reader_t reader)
int32_t * kaa_int_deserialize(avro_reader_t reader)
size_t(* get_size_fn)(void *data)
Definition: kaa_common_schema.h:63
void kaa_fixed_serialize(avro_writer_t writer, void *data)
serialize_fn serialize
Definition: kaa_common_schema.h:85
char * data
Definition: kaa_common_schema.h:76
void kaa_boolean_serialize(avro_writer_t writer, void *data)
void kaa_int_serialize(avro_writer_t writer, void *data)
void kaa_string_destroy(void *data)
kaa_string_t * kaa_string_deserialize(avro_reader_t reader)
void kaa_fixed_destroy(void *data)
get_size_fn get_size
Definition: kaa_common_schema.h:86
destroy_fn destroy
Definition: kaa_common_schema.h:87
destroy_fn destroy
Definition: kaa_common_schema.h:72
void kaa_string_serialize(avro_writer_t writer, void *data)
kaa_bytes_t * kaa_fixed_deserialize(avro_reader_t reader, void *context)
Definition: kaa_common_schema.h:81
size_t kaa_float_get_size(void *data)
struct kaa_list_t kaa_list_t
Definition: kaa_list.h:30
size_t kaa_bytes_get_size(void *data)
uint8_t type
Definition: kaa_common_schema.h:82
size_t kaa_string_get_size(void *data)
kaa_string_t * kaa_string_move_create(const char *data, destroy_fn destroy)
int32_t size
Definition: kaa_common_schema.h:70
size_t kaa_enum_get_size(void *data)
kaa_bytes_t * kaa_bytes_move_create(const uint8_t *data, size_t data_len, destroy_fn destroy)
void kaa_double_serialize(avro_writer_t writer, void *data)
int64_t * kaa_long_deserialize(avro_reader_t reader)
void *(* deserialize_w_ctx_fn)(avro_reader_t reader, void *context)
See deserialize_fn.
Definition: kaa_common_schema.h:61
void *(* deserialize_wo_ctx_fn)(avro_reader_t reader)
See deserialize_fn.
Definition: kaa_common_schema.h:56
void * data
Definition: kaa_common_schema.h:83
void kaa_enum_serialize(avro_writer_t writer, void *data)
void kaa_bytes_destroy(void *data)
kaa_bytes_t * kaa_bytes_copy_create(const uint8_t *data, size_t data_len)
void kaa_null_serialize(avro_writer_t writer, void *data)
kaa_string_t * kaa_string_copy_create(const char *data)
uint8_t * buffer
Definition: kaa_common_schema.h:69
size_t kaa_long_get_size(void *data)
kaa_list_t * kaa_array_deserialize_w_ctx(avro_reader_t reader, deserialize_w_ctx_fn deserialize, void *deserialize_context)
kaa_bytes_t * kaa_fixed_move_create(const uint8_t *data, size_t data_len, destroy_fn destroy)
void kaa_float_serialize(avro_writer_t writer, void *data)
Definition: kaa_common_schema.h:75
size_t avro_long_get_size(int64_t l)
size_t kaa_fixed_get_size(void *data)
void(* serialize_fn)(avro_writer_t writer, void *data)
Definition: kaa_common_schema.h:40
kaa_bytes_t * kaa_bytes_deserialize(avro_reader_t reader)
int * kaa_enum_deserialize(avro_reader_t reader)
size_t kaa_null_get_size(void *data)
void kaa_bytes_serialize(avro_writer_t writer, void *data)
size_t kaa_boolean_get_size(void *data)
void kaa_long_serialize(avro_writer_t writer, void *data)
void * kaa_null_deserialize(avro_reader_t reader)
float * kaa_float_deserialize(avro_reader_t reader)