|
Defines |
#define | debug track_props |
#define | prop_assert(ps, prop, x) |
Typedefs |
typedef gint(* | prop_parse_func_t )(const gchar *name, const gchar *str, const gchar **endptr, gpointer vec, size_t i) |
Functions |
| RCSID ("$Id:prop.c, v 1.32 2005/11/13 12:00:26 cbiere Exp $") |
gint | prop_parse_guint64 (const gchar *name, const gchar *str, const gchar **endptr, gpointer vec, size_t i) |
gint | prop_parse_timestamp (const gchar *name, const gchar *str, const gchar **endptr, gpointer vec, size_t i) |
gint | prop_parse_guint32 (const gchar *name, const gchar *str, const gchar **endptr, gpointer vec, size_t i) |
gint | prop_parse_ip (const gchar *name, const gchar *str, const gchar **endptr, gpointer vec, size_t i) |
gint | prop_parse_boolean (const gchar *name, const gchar *str, const gchar **endptr, gpointer vec, size_t i) |
| Parse comma delimited boolean vector (TRUE/FALSE list).
|
void | prop_parse_vector (const gchar *name, const gchar *str, size_t size, gpointer vec, prop_parse_func_t parser) |
| Parse prop vector.
|
void | prop_parse_guint64_vector (const gchar *name, const gchar *str, size_t size, guint64 *vec) |
void | prop_parse_timestamp_vector (const gchar *name, const gchar *str, size_t size, time_t *vec) |
void | prop_parse_guint32_vector (const gchar *name, const gchar *str, size_t size, guint32 *vec) |
void | prop_parse_ip_vector (const gchar *name, const gchar *str, size_t size, guint32 *vec) |
void | prop_parse_boolean_vector (const gchar *name, const gchar *str, size_t size, gboolean *vec) |
void | prop_parse_storage (const gchar *name, const gchar *str, size_t size, gchar *t) |
| Parse a hex string into a gchar array.
|
prop_def_t * | prop_get_def (prop_set_t *ps, property_t p) |
| Copy the property definition from the property set and return it.
|
void | prop_free_def (prop_def_t *d) |
void | prop_add_prop_changed_listener (prop_set_t *ps, property_t prop, prop_changed_listener_t l, gboolean init) |
| Add a change listener to a given property.
|
void | prop_add_prop_changed_listener_full (prop_set_t *ps, property_t prop, prop_changed_listener_t l, gboolean init, enum frequency_type freq, guint32 interval) |
| Add a change listener to a given property.
|
void | prop_remove_prop_changed_listener (prop_set_t *ps, property_t prop, prop_changed_listener_t l) |
void | prop_emit_prop_changed (prop_set_t *ps, property_t prop) |
void | prop_set_boolean (prop_set_t *ps, property_t prop, const gboolean *src, size_t offset, size_t length) |
gboolean * | prop_get_boolean (prop_set_t *ps, property_t prop, gboolean *t, size_t offset, size_t length) |
void | prop_set_guint64 (prop_set_t *ps, property_t prop, const guint64 *src, size_t offset, size_t length) |
guint64 * | prop_get_guint64 (prop_set_t *ps, property_t prop, guint64 *t, size_t offset, size_t length) |
void | prop_set_guint32 (prop_set_t *ps, property_t prop, const guint32 *src, size_t offset, size_t length) |
guint32 * | prop_get_guint32 (prop_set_t *ps, property_t prop, guint32 *t, size_t offset, size_t length) |
void | prop_set_timestamp (prop_set_t *ps, property_t prop, const time_t *src, size_t offset, size_t length) |
time_t * | prop_get_timestamp (prop_set_t *ps, property_t prop, time_t *t, size_t offset, size_t length) |
void | prop_set_storage (prop_set_t *ps, property_t prop, const gchar *src, size_t length) |
gchar * | prop_get_storage (prop_set_t *ps, property_t prop, gchar *t, size_t length) |
void | prop_set_string (prop_set_t *ps, property_t prop, const gchar *val) |
gchar * | prop_get_string (prop_set_t *ps, property_t prop, gchar *t, size_t size) |
| Fetches the value of a string property.
|
const gchar * | prop_name (prop_set_t *ps, property_t prop) |
| Fetch the property name in the config files.
|
const gchar * | prop_description (prop_set_t *ps, property_t prop) |
| Fetch the property description in the config files.
|
const gchar * | prop_type_to_string (prop_set_t *ps, property_t prop) |
gboolean | prop_is_saved (prop_set_t *ps, property_t prop) |
const gchar * | prop_to_string (prop_set_t *ps, property_t prop) |
| Fetches the value of property as a string.
|
const gchar * | prop_default_to_string (prop_set_t *ps, property_t prop) |
| Fetches the default value of property as a string.
|
const gchar * | config_boolean (gboolean b) |
gchar * | config_comment (const gchar *s) |
| Creates a string containing aset of lines from with words taken from s, each line no longer than 80 chars (except when a single words is very long) and prepended with "# ".
|
void | prop_save_to_file_if_dirty (prop_set_t *ps, const gchar *dir, const gchar *filename) |
| Like prop_save_to_file(), but only perform when dirty, i.e.
|
void | prop_save_to_file (prop_set_t *ps, const gchar *dir, const gchar *filename) |
| Read the all properties from the given property set and stores them along with their description to the given file in the given directory.
|
void | prop_set_from_string (prop_set_t *ps, property_t prop, const gchar *val, gboolean saved_only) |
| Called by prop_load_from_file to actually set the properties.
|
void | load_helper (prop_set_t *ps, property_t prop, const gchar *val) |
| Called by prop_load_from_file to actually set the properties.
|
void | prop_load_from_file (prop_set_t *ps, const gchar *dir, const gchar *filename) |
property_t | prop_get_by_name (prop_set_t *ps, const gchar *name) |
GSList * | prop_get_by_regex (prop_set_t *ps, const gchar *pattern, gint *error) |
Variables |
guint32 | track_props = 0 |
| XXX need to init lib's props--RAM.
|
guint32 | common_dbg = 0 |
| XXX -- need to init lib's props --RAM.
|
struct { |
const gchar * name |
} | prop_type_str [] |