26 #define QEV_CFG_GROUP "quick-event"
31 #define QEV_CFG_INCLUDE "include"
36 #define QEV_CFG_LIST_SEPARATOR ','
41 #define QEV_CFG_WRAP_AT 75
284 const gchar *group_name,
286 const guint opts_len);
324 const gchar *group_name,
guint64 qev_cfg_get_max_clients()
Gets that maximum number of clients that may be connected.
gdouble * dbl
A double.
Definition: config.h:100
A double.
Definition: config.h:65
A string.
Definition: config.h:70
void qev_cfg_set(const gchar *group_name, const gchar *name, union qev_cfg_val val, GError **error)
Dynamically change an option at run time, executing all callbacks, validators, and etc...
gchar *** strv
A value that can be freed with g_strfreev()
Definition: config.h:110
gchar * name
Name of the option.
Definition: config.h:222
gboolean * bool
A boolean.
Definition: config.h:85
void(* qev_cfg_listener_cb)(const gchar *name, const gchar *val)
Callback for listeners.
Definition: config.h:211
union qev_cfg_val defval
The default value for this option.
Definition: config.h:244
qev_cfg_validator validate
Callback for validating / parsing an option when it's set.
Definition: config.h:249
gint64 * i64
Signed, 64bit integer.
Definition: config.h:90
gint64 i64
Signed, 64bit integer.
Definition: config.h:125
gdouble dbl
A double.
Definition: config.h:135
gchar * str
A value that can be freed with g_free()
Definition: config.h:140
Signed, 64bit integer.
Definition: config.h:55
gchar * description
Short description of the option.
Definition: config.h:227
The default values for the values.
Definition: config.h:116
guint64 * ui64
Unsigned, 64bit integer.
Definition: config.h:95
void(* qev_cfg_cb)(const gchar *name, union qev_cfg_valptr curr_val, union qev_cfg_val new_val)
Callback type for after an option has been set / updated, included when it's initialized to its defau...
Definition: config.h:194
qev_cfg_type
Supported option types.
Definition: config.h:46
Unsigned, 64bit integer.
Definition: config.h:60
A boolean.
Definition: config.h:50
Where the values of the options live.
Definition: config.h:81
void qev_cfg_set_default_file(const gchar *file_pattern)
Set the default path to look for the config file(s).
void qev_cfg_listen(const gchar *group_name, const qev_cfg_listener_cb cb)
Receive a callback for every key and value found in group_name.
A string array.
Definition: config.h:75
gchar ** str
A value that can be freed with g_free()
Definition: config.h:105
void qev_cfg_validate_port(const gchar *name, union qev_cfg_val *val, GError **error)
Validating ports is a fairly common task.
guint64 ui64
Unsigned, 64bit integer.
Definition: config.h:130
Provides all the qev_* functions that are needed for creating an event loop.
A configuration option that can be parsed in a config file.
Definition: config.h:218
enum qev_cfg_type type
Type of option.
Definition: config.h:232
guint64 qev_cfg_get_timeout()
Gets the timeout.
void qev_cfg_add(const gchar *group_name, const struct qev_cfg *opts, const guint opts_len)
Add config options under the given group.
gchar ** strv
A value that can be freed with g_strfreev(), length can be found with g_strv_length().
Definition: config.h:146
gint64 bool
A boolean.
Definition: config.h:120
void(* qev_cfg_validator)(const gchar *name, union qev_cfg_val *val, GError **error)
Validation callback for options.
Definition: config.h:164
qev_cfg_cb cb
Callback after the value has been set.
Definition: config.h:254
gboolean read_only
If the config option may be modified at run time.
Definition: config.h:259