XMMS2
|
The way values are represented in S4. More...
Functions | |
s4_val_t * | s4_val_new_string (const char *str) |
Creates a new string value. More... | |
s4_val_t * | s4_val_new_int (int32_t i) |
Creates a new integer value. More... | |
s4_val_t * | s4_val_copy (const s4_val_t *val) |
Copies a value. More... | |
void | s4_val_free (s4_val_t *val) |
Frees a value. More... | |
int | s4_val_is_str (const s4_val_t *val) |
Checks is a value is a string value. More... | |
int | s4_val_is_int (const s4_val_t *val) |
Checks is a value is an integer value. More... | |
int | s4_val_get_str (const s4_val_t *val, const char **str) |
Tries to get the string in a string value. More... | |
int | s4_val_get_collated_str (const s4_val_t *val, const char **str) |
Tries to get the normalized string in a string value. More... | |
int | s4_val_get_casefolded_str (const s4_val_t *val, const char **str) |
Tries to get the normalized string in a string value. More... | |
int | s4_val_get_int (const s4_val_t *val, int32_t *i) |
Tries to get the integer in an integer value. More... | |
int | s4_val_cmp (const s4_val_t *v1, const s4_val_t *v2, s4_cmp_mode_t mode) |
Compares two values. More... | |
s4_val_t * | s4_val_new_internal_string (const char *str, s4_t *s4) |
Creates a new internal string value. More... | |
The way values are represented in S4.
int s4_val_cmp | ( | const s4_val_t * | v1, |
const s4_val_t * | v2, | ||
s4_cmp_mode_t | mode | ||
) |
Compares two values.
v1 | The first value |
v2 | The second value |
mode | How to compare the values |
Referenced by CASE().
Copies a value.
val | The value to copy |
Referenced by CASE().
void s4_val_free | ( | s4_val_t * | val | ) |
Frees a value.
val | The value to free |
Referenced by _const_create_data(), CASE(), CLEANUP(), main(), xmms_medialib_entry_cleanup(), xmms_medialib_entry_property_get_int(), xmms_medialib_entry_property_get_str(), xmms_medialib_entry_property_get_value(), xmms_medialib_entry_property_set_int_source(), xmms_medialib_entry_property_set_str_source(), xmms_medialib_entry_remove(), xmms_medialib_session_property_set(), and xmms_medialib_session_property_unset().
int s4_val_get_casefolded_str | ( | const s4_val_t * | val, |
const char ** | str | ||
) |
Tries to get the normalized string in a string value.
val | The value to get the string of |
str | A pointer to a pointer where the string pointer will be stored |
Referenced by CASE(), s4_pattern_match(), and s4_val_cmp().
int s4_val_get_collated_str | ( | const s4_val_t * | val, |
const char ** | str | ||
) |
Tries to get the normalized string in a string value.
val | The value to get the string of |
str | A pointer to a pointer where the string pointer will be stored |
Referenced by s4_val_cmp().
int s4_val_get_int | ( | const s4_val_t * | val, |
int32_t * | i | ||
) |
Tries to get the integer in an integer value.
val | The value to get the integer of |
i | A pointer to an integer where the integer will be stored |
Referenced by _const_lookup(), CASE(), s4_pattern_match(), s4_val_cmp(), s4_val_copy(), value_to_string(), xmms_medialib_entry_not_resolved_get(), xmms_medialib_entry_property_get_int(), and xmms_medialib_entry_property_get_value().
int s4_val_get_str | ( | const s4_val_t * | val, |
const char ** | str | ||
) |
Tries to get the string in a string value.
val | The value to get the string of |
str | A pointer to a pointer where the string pointer will be stored |
Referenced by _const_lookup(), _string_lookup(), CASE(), s4_pattern_match(), s4_val_cmp(), s4_val_copy(), value_to_string(), xmms_medialib_entry_property_get_str(), and xmms_medialib_entry_property_get_value().
int s4_val_is_int | ( | const s4_val_t * | val | ) |
Checks is a value is an integer value.
val | The value to check |
Referenced by s4_val_get_int().
int s4_val_is_str | ( | const s4_val_t * | val | ) |
Checks is a value is a string value.
val | The value to check |
Referenced by s4_pattern_match(), s4_val_get_casefolded_str(), s4_val_get_collated_str(), and s4_val_get_str().
s4_val_t* s4_val_new_int | ( | int32_t | i | ) |
Creates a new integer value.
i | The integer to use as the value |
Referenced by _int_lookup_val(), CASE(), main(), s4_val_copy(), SETUP(), xmms_medialib_entry_cleanup(), xmms_medialib_entry_property_set_int_source(), xmms_medialib_entry_remove(), xmms_medialib_session_property_set(), and xmms_medialib_session_property_unset().
Creates a new internal string value.
Internal string values are different from normal string values in that the string is not copied.
str | The string to use as the value |
s4 | The database this value belongs to |
Referenced by _string_lookup_val().
s4_val_t* s4_val_new_string | ( | const char * | str | ) |
Creates a new string value.
str | The string to use as the value |
Referenced by CASE(), s4_val_copy(), and xmms_medialib_entry_property_set_str_source().