18 #ifndef __XMMSV_GENERAL_H__ 19 #define __XMMSV_GENERAL_H__ void xmmsv_unref(xmmsv_t *val)
Decreases the references for the xmmsv_t When the number of references reaches 0 it will be freed...
xmmsv_t * xmmsv_new_error(const char *errstr)
Allocates a new error xmmsv_t.
xmmsv_t * xmmsv_new_none(void)
Allocates a new empty xmmsv_t.
xmmsv_t * xmmsv_new_string(const char *s)
Allocates a new string xmmsv_t.
int xmmsv_get_int(const xmmsv_t *val, int32_t *r)
Retrieves a signed integer from the value.
int xmmsv_is_type(const xmmsv_t *val, xmmsv_type_t t)
Check if value is of specified type.
struct xmmsv_coll_St xmmsv_coll_t
xmmsv_t * xmmsv_new_coll(xmmsv_coll_t *coll)
Allocates a new collection xmmsv_t.
xmmsv_type_t xmmsv_get_type(const xmmsv_t *val)
Get the type of the value.
xmmsv_t * xmmsv_new_int(int32_t i)
Allocates a new integer xmmsv_t.
xmmsv_t * xmmsv_ref(xmmsv_t *val)
References the xmmsv_t.
int xmmsv_get_error(const xmmsv_t *val, const char **r)
Retrieves an error string describing the server error from the value.
int xmmsv_get_bin(const xmmsv_t *val, const unsigned char **r, unsigned int *rlen)
Retrieves binary data from the value.
int xmmsv_get_string(const xmmsv_t *val, const char **r)
Retrieves a string from the value.
int xmmsv_is_error(const xmmsv_t *val)
Check if the value stores an error.
xmmsv_t * xmmsv_new_bin(const unsigned char *data, unsigned int len)
Allocates a new binary data xmmsv_t.
int xmmsv_get_coll(const xmmsv_t *val, xmmsv_coll_t **coll)
Retrieves a collection from the value.