|
Data Structures |
struct | prop_def_choice |
| Container struct definitions for the different property types. More...
|
struct | prop_def_guint32 |
struct | prop_def_guint64 |
struct | prop_def_timestamp |
struct | prop_def_storage |
struct | prop_def_string |
struct | prop_def_boolean |
struct | prop_def |
| Property definition. More...
|
struct | prop_set_stub |
| Property set stub to access property set. More...
|
struct | prop_set |
| Property set definition. More...
|
Defines |
#define | NO_PROP (0) |
#define | PROP(ps, p) (* get_prop((ps), (p), G_STRLOC)) |
| Use this macro access a property instead of ps->props[prop].
|
Typedefs |
typedef guint32 | property_t |
typedef guint32 | property_set_t |
typedef gboolean(* | prop_changed_listener_t )(property_t) |
| Callback signature definition.
|
typedef void(* | prop_add_prop_changed_listener_t )(property_t, prop_changed_listener_t, gboolean) |
typedef void(* | prop_add_prop_changed_listener_full_t )(property_t, prop_changed_listener_t, gboolean, enum frequency_type, guint32) |
typedef void(* | prop_remove_prop_changed_listener_t )(property_t, prop_changed_listener_t) |
typedef prop_def_choice | prop_def_choice_t |
| Container struct definitions for the different property types.
|
typedef prop_def_guint32 | prop_def_guint32_t |
typedef void(* | prop_set_guint32_t )(property_t, const guint32 *, size_t, size_t) |
typedef guint32 *(* | prop_get_guint32_t )(property_t, guint32 *, size_t, size_t) |
typedef prop_def_guint64 | prop_def_guint64_t |
typedef void(* | prop_set_guint64_t )(property_t, const guint64 *, size_t, size_t) |
typedef guint64 *(* | prop_get_guint64_t )(property_t, guint64 *, size_t, size_t) |
typedef prop_def_timestamp | prop_def_timestamp_t |
typedef void(* | prop_set_timestamp_t )(property_t, const time_t *, size_t, size_t) |
typedef time_t *(* | prop_get_timestamp_t )(property_t, time_t *, size_t, size_t) |
typedef prop_def_storage | prop_def_storage_t |
typedef void(* | prop_set_storage_t )(property_t, const gchar *, size_t) |
typedef gchar *(* | prop_get_storage_t )(property_t, gchar *, size_t) |
typedef prop_def_string | prop_def_string_t |
typedef void(* | prop_set_string_t )(property_t, const gchar *) |
typedef gchar *(* | prop_get_string_t )(property_t, gchar *, size_t) |
typedef prop_def_boolean | prop_def_boolean_t |
typedef void(* | prop_set_boolean_t )(property_t, const gboolean *, size_t, size_t) |
typedef gboolean *(* | prop_get_boolean_t )(property_t, gboolean *, size_t, size_t) |
typedef prop_def | prop_def_t |
| Property definition.
|
typedef prop_set_stub | prop_set_stub_t |
| Property set stub to access property set.
|
typedef prop_set_stub_t *(* | prop_set_get_stub_t )(void) |
| Stub-fetcher signature.
|
typedef prop_set | prop_set_t |
| Property set definition.
|
Enumerations |
enum | prop_type_t {
PROP_TYPE_BOOLEAN,
PROP_TYPE_GUINT32,
PROP_TYPE_GUINT64,
PROP_TYPE_IP,
PROP_TYPE_MULTICHOICE,
PROP_TYPE_STORAGE,
PROP_TYPE_STRING,
PROP_TYPE_TIMESTAMP,
NUM_PROP_TYPES
} |
| Available property types. More...
|
Functions |
prop_def_t * | prop_get_def (prop_set_t *, property_t) |
| Copy the property definition from the property set and return it.
|
void | prop_free_def (prop_def_t *) |
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_to_string (prop_set_t *ps, property_t prop) |
| Fetches the value of property as a string.
|
const gchar * | prop_type_to_string (prop_set_t *ps, property_t prop) |
const gchar * | prop_default_to_string (prop_set_t *ps, property_t prop) |
| Fetches the default value of property as a string.
|
gboolean | prop_is_saved (prop_set_t *ps, property_t prop) |
void | prop_add_prop_changed_listener (prop_set_t *, property_t, prop_changed_listener_t, gboolean) |
| Add a change listener to a given property.
|
void | prop_add_prop_changed_listener_full (prop_set_t *, property_t, prop_changed_listener_t, gboolean, enum frequency_type, guint32) |
| Add a change listener to a given property.
|
void | prop_remove_prop_changed_listener (prop_set_t *, property_t, prop_changed_listener_t) |
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_load_from_file (prop_set_t *ps, const gchar *dir, const gchar *filename) |
void | prop_set_boolean (prop_set_t *, property_t, const gboolean *, size_t, size_t) |
gboolean * | prop_get_boolean (prop_set_t *, property_t, gboolean *, size_t, size_t) |
void | prop_set_string (prop_set_t *, property_t, const gchar *) |
gchar * | prop_get_string (prop_set_t *, property_t, gchar *, size_t) |
| Fetches the value of a string property.
|
void | prop_set_guint32 (prop_set_t *, property_t, const guint32 *, size_t, size_t) |
guint32 * | prop_get_guint32 (prop_set_t *, property_t, guint32 *, size_t, size_t) |
void | prop_set_guint64 (prop_set_t *, property_t, const guint64 *, size_t, size_t) |
guint64 * | prop_get_guint64 (prop_set_t *, property_t, guint64 *, size_t, size_t) |
void | prop_set_timestamp (prop_set_t *, property_t, const time_t *, size_t, size_t) |
time_t * | prop_get_timestamp (prop_set_t *, property_t, time_t *, size_t, size_t) |
void | prop_set_storage (prop_set_t *, property_t, const gchar *, size_t) |
gchar * | prop_get_storage (prop_set_t *, property_t, gchar *, size_t) |
property_t | prop_get_by_name (prop_set_t *ps, const char *name) |
GSList * | prop_get_by_regex (prop_set_t *ps, const gchar *pattern, gint *error) |
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.
|
gboolean | prop_in_range (const prop_set_t *ps, property_t prop) |
prop_def_t * | get_prop (prop_set_t *ps, property_t prop, const gchar *loc) |