Motr
M0
|
#include <xcode.h>
Data Fields | |
int(* | xto_length )(struct m0_xcode_ctx *ctx, const void *obj) |
int(* | xto_encode )(struct m0_xcode_ctx *ctx, const void *obj) |
int(* | xto_decode )(struct m0_xcode_ctx *ctx, void *obj) |
int(* | xto_read )(const struct m0_xcode_cursor *it, struct m0_xcode_obj *obj, const char *str) |
Custom xcoding functions.
User provides these functions (which are all optional) to use non-standard xcoding.
int(* xto_decode) (struct m0_xcode_ctx *ctx, void *obj) |
int(* xto_encode) (struct m0_xcode_ctx *ctx, const void *obj) |
int(* xto_length) (struct m0_xcode_ctx *ctx, const void *obj) |
int(* xto_read) (const struct m0_xcode_cursor *it, struct m0_xcode_obj *obj, const char *str) |
Call-back invoked by m0_xcode_read() to read custom object representation.
Returns number of bytes consumed from the string, or negative error code. obj->xo_ptr of suitable size is allocated by m0_xcode_read(), obj->xo_type is assigned. The call-back should fill obj->xo_ptr fields.