## PolkitBackendConfigSource PolkitBackendConfigSource — Access configuration files |

## 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);

## Object Hierarchy

      GObject
       +----PolkitBackendConfigSource

## Properties

      "directory"                GFile*                : Read / Write / Construct Only

## Signals

      "changed"                                        : Run Last

## 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

### PolkitBackendConfigSource

    typedef struct _PolkitBackendConfigSource PolkitBackendConfigSource;

### 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.

`directory` : | 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`.

`source` : | A PolkitBackendConfigSource.
`group` : | A group name.
`key` : | A key name.
`error` : | 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`.

`source` : | A PolkitBackendConfigSource.
`group` : | A group name.
`key` : | A key name.
`error` : | Return location for error or `NULL`.
Returns : | The value or `FALSE` if `error` is set.

### 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`.

`source` : | A PolkitBackendConfigSource.
`group` : | A group name.
`key` : | A key name.
`error` : | 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`.

`source` : | A PolkitBackendConfigSource.
`group` : | A group name.
`key` : | A key name.
`error` : | Return location for error or `NULL`.
Returns : | The value or `NULL` if `error` is set.

### 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`.

`source` : | A PolkitBackendConfigSource.
`group` : | A group name.
`key` : | A key name.
`error` : | Return location for error or `NULL`.
Returns : | The value or `NULL` if `error` is set.

## 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