XMMS2
|
Modules | |
Bitbuffer | |
Easier building of lists and dictionaries | |
Deprecated | |
Dictionaries | |
Lists | |
Utilities | |
Typedefs | |
typedef struct xmmsv_St | xmmsv_t |
Functions | |
xmmsv_t * | xmmsv_new_none (void) |
Allocates a new empty xmmsv_t. More... | |
xmmsv_t * | xmmsv_new_error (const char *errstr) |
Allocates a new error xmmsv_t. More... | |
xmmsv_t * | xmmsv_new_int (int32_t i) |
Allocates a new integer xmmsv_t. More... | |
xmmsv_t * | xmmsv_new_string (const char *s) |
Allocates a new string xmmsv_t. More... | |
xmmsv_t * | xmmsv_new_coll (xmmsv_coll_t *coll) |
Allocates a new collection xmmsv_t. More... | |
xmmsv_t * | xmmsv_new_bin (const unsigned char *data, unsigned int len) |
Allocates a new binary data xmmsv_t. More... | |
xmmsv_t * | xmmsv_ref (xmmsv_t *val) |
References the xmmsv_t. More... | |
void | xmmsv_unref (xmmsv_t *val) |
Decreases the references for the xmmsv_t When the number of references reaches 0 it will be freed. More... | |
xmmsv_type_t | xmmsv_get_type (const xmmsv_t *val) |
Get the type of the value. More... | |
int | xmmsv_is_type (const xmmsv_t *val, xmmsv_type_t t) |
Check if value is of specified type. More... | |
int | xmmsv_get_error (const xmmsv_t *val, const char **r) |
Retrieves an error string describing the server error from the value. More... | |
int | xmmsv_get_int (const xmmsv_t *val, int32_t *r) |
Retrieves a signed integer from the value. More... | |
int | xmmsv_get_string (const xmmsv_t *val, const char **r) |
Retrieves a string from the value. More... | |
int | xmmsv_get_coll (const xmmsv_t *val, xmmsv_coll_t **coll) |
Retrieves a collection from the value. More... | |
int | xmmsv_get_bin (const xmmsv_t *val, const unsigned char **r, unsigned int *rlen) |
Retrieves binary data from the value. More... | |
int | xmmsv_is_error (const xmmsv_t *val) |
Check if the value stores an error. More... | |
typedef struct xmmsv_St xmmsv_t |
Definition at line 48 of file xmmsv_general.h.
enum xmmsv_type_t |
Enumerator | |
---|---|
XMMSV_TYPE_NONE | |
XMMSV_TYPE_ERROR | |
XMMSV_TYPE_INT32 | |
XMMSV_TYPE_STRING | |
XMMSV_TYPE_COLL | |
XMMSV_TYPE_BIN | |
XMMSV_TYPE_LIST | |
XMMSV_TYPE_DICT | |
XMMSV_TYPE_BITBUFFER | |
XMMSV_TYPE_END |
Definition at line 35 of file xmmsv_general.h.
int xmmsv_get_bin | ( | const xmmsv_t * | val, |
const unsigned char ** | r, | ||
unsigned int * | rlen | ||
) |
Retrieves binary data from the value.
val | a xmmsv_t containing a string. |
r | the return data. This data is owned by the value and will be freed when the value is freed. |
rlen | the return length of data. |
Definition at line 904 of file value.c.
Referenced by xmms_bin_to_gstring(), and xmmsv_deserialize().
int xmmsv_get_coll | ( | const xmmsv_t * | val, |
xmmsv_coll_t ** | c | ||
) |
int xmmsv_get_error | ( | const xmmsv_t * | val, |
const char ** | r | ||
) |
int xmmsv_get_int | ( | const xmmsv_t * | val, |
int32_t * | r | ||
) |
Retrieves a signed integer from the value.
val | a xmmsv_t containing an integer. |
r | the return integer. |
Definition at line 823 of file value.c.
Referenced by xmms_collection_get_random_media(), xmms_playlist_changed_msg_send(), and xmmsv_dict_format().
int xmmsv_get_string | ( | const xmmsv_t * | val, |
const char ** | r | ||
) |
Retrieves a string from the value.
val | a xmmsv_t containing a string. |
r | the return string. This string is owned by the value and will be freed when the value is freed. |
Definition at line 863 of file value.c.
Referenced by xmms_playlist_changed_msg_send(), xmmsv_decode_url(), xmmsv_dict_format(), xmmsv_dict_iter_find(), and xmmsv_dict_iter_pair().
xmmsv_type_t xmmsv_get_type | ( | const xmmsv_t * | val | ) |
Get the type of the value.
val | a xmmsv_t to get the type from. |
Definition at line 392 of file value.c.
Referenced by check_string_list(), xmmsv_bitbuffer_serialize_value(), xmmsv_dict_entry_get_type(), xmmsv_dict_format(), and xmmsv_is_type().
int xmmsv_is_error | ( | const xmmsv_t * | val | ) |
int xmmsv_is_type | ( | const xmmsv_t * | val, |
xmmsv_type_t | t | ||
) |
Check if value is of specified type.
val | xmmsv_t to check. |
t | xmmsv_type_t to check for. |
Definition at line 408 of file value.c.
Referenced by xmmsv_dict_clear(), xmmsv_dict_foreach(), xmmsv_dict_get(), xmmsv_dict_get_size(), xmmsv_dict_remove(), xmmsv_dict_set(), xmmsv_is_dict(), xmmsv_is_error(), xmmsv_is_list(), xmmsv_list_append(), xmmsv_list_clear(), xmmsv_list_foreach(), xmmsv_list_get(), xmmsv_list_get_size(), xmmsv_list_insert(), xmmsv_list_move(), xmmsv_list_remove(), xmmsv_list_restrict_type(), and xmmsv_list_set().
xmmsv_t* xmmsv_new_bin | ( | const unsigned char * | data, |
unsigned int | len | ||
) |
Allocates a new binary data xmmsv_t.
data | The data to store in the xmmsv_t. |
len | The size of the data. |
Definition at line 225 of file value.c.
Referenced by xmms_xform_auxdata_set_bin(), xmmsv_decode_url(), and xmmsv_serialize().
xmmsv_t* xmmsv_new_coll | ( | xmmsv_coll_t * | c | ) |
xmmsv_t* xmmsv_new_error | ( | const char * | errstr | ) |
xmmsv_t* xmmsv_new_int | ( | int32_t | i | ) |
Allocates a new integer xmmsv_t.
i | The value to store in the xmmsv_t. |
Definition at line 161 of file value.c.
Referenced by xmms_collection_changed_msg_new(), xmms_medialib_entry_property_get_value(), xmms_object_emit_f(), xmms_playlist_changed_msg_new(), xmms_xform_auxdata_set_int(), xmms_xform_browse_add_entry_property_int(), and xmms_xform_metadata_set_int().
xmmsv_t* xmmsv_new_none | ( | void | ) |
Allocates a new empty xmmsv_t.
Definition at line 129 of file value.c.
Referenced by xmms_object_emit_f(), and xmms_xform_auxdata_barrier().
xmmsv_t* xmmsv_new_string | ( | const char * | s | ) |
Allocates a new string xmmsv_t.
s | The value to store in the xmmsv_t. The string is copied in the value. |
Definition at line 180 of file value.c.
Referenced by xmms_collection_changed_msg_new(), xmms_collection_get_random_media(), xmms_collection_query_ids(), xmms_convert_and_kill_string(), xmms_object_emit_f(), xmms_xform_auxdata_set_str(), xmms_xform_browse_add_entry_property_str(), xmms_xform_metadata_set_str(), xmmsv_coll_attribute_set(), xmmsv_dict_set(), and xmmsv_make_stringlist().
void xmmsv_unref | ( | xmmsv_t * | val | ) |
Decreases the references for the xmmsv_t When the number of references reaches 0 it will be freed.
And thus all data you extracted from it will be deallocated.
Definition at line 303 of file value.c.
Referenced by xmms_collection_changed_msg_new(), xmms_collection_get_random_media(), xmms_ipc_msg_destroy(), xmms_playlist_changed_msg_new(), xmms_xform_browse_add_entry_property_int(), xmms_xform_browse_add_entry_property_str(), xmmsv_build_dict(), xmmsv_build_list_va(), xmmsv_coll_attribute_set(), xmmsv_deserialize(), xmmsv_dict_set(), xmmsv_make_stringlist(), and xmmsv_serialize().