PolicyKit Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
Synopsis
PolkitBackendConfigSource; PolkitBackendConfigSource * polkit_backend_config_source_new (GFile *directory); gint polkit_backend_config_source_get_integer (PolkitBackendConfigSource *source, const gchar *group, const gchar *key, GError **error); gboolean polkit_backend_config_source_get_boolean (PolkitBackendConfigSource *source, const gchar *group, const gchar *key, GError **error); gdouble polkit_backend_config_source_get_double (PolkitBackendConfigSource *source, const gchar *group, const gchar *key, GError **error); gchar * polkit_backend_config_source_get_string (PolkitBackendConfigSource *source, const gchar *group, const gchar *key, GError **error); gchar ** polkit_backend_config_source_get_string_list (PolkitBackendConfigSource *source, const gchar *group, const gchar *key, GError **error);
Description
The PolkitBackendConfigSource class is a utility class to read configuration data from a set of prioritized key-value files in a given directory.
Details
polkit_backend_config_source_new ()
PolkitBackendConfigSource * polkit_backend_config_source_new (GFile *directory);
Creates a new PolkitBackendConfigSource object that reads
configuration from directory
. To watch for configuration changes,
connect to the "changed" signal.
|
The directory to watch. |
Returns : |
A PolkitBackendConfigSource for directory . Free with
g_object_unref() .
|
polkit_backend_config_source_get_integer ()
gint polkit_backend_config_source_get_integer (PolkitBackendConfigSource *source, const gchar *group, const gchar *key, GError **error);
Gets the value associated with key
under group_name
.
|
A PolkitBackendConfigSource. |
|
A group name. |
|
A key name. |
|
Return location for error or NULL .
|
Returns : |
The value or 0 if error is set.
|
polkit_backend_config_source_get_boolean ()
gboolean polkit_backend_config_source_get_boolean (PolkitBackendConfigSource *source, const gchar *group, const gchar *key, GError **error);
Gets the value associated with key
under group_name
.
polkit_backend_config_source_get_double ()
gdouble polkit_backend_config_source_get_double (PolkitBackendConfigSource *source, const gchar *group, const gchar *key, GError **error);
Gets the value associated with key
under group_name
.
|
A PolkitBackendConfigSource. |
|
A group name. |
|
A key name. |
|
Return location for error or NULL .
|
Returns : |
The value or 0.0 if error is set.
|
polkit_backend_config_source_get_string ()
gchar * polkit_backend_config_source_get_string (PolkitBackendConfigSource *source, const gchar *group, const gchar *key, GError **error);
Gets the value associated with key
under group_name
.
polkit_backend_config_source_get_string_list ()
gchar ** polkit_backend_config_source_get_string_list (PolkitBackendConfigSource *source, const gchar *group, const gchar *key, GError **error);
Gets the values associated with key
under group_name
.
Property Details
The "directory"
property
"directory" GFile* : Read / Write / Construct Only
The directory to watch for configuration files.
Signal Details
The "changed"
signal
void user_function (PolkitBackendConfigSource *polkitbackendconfigsource, gpointer user_data) : Run Last