Back to index

lightdm  1.3.2
Classes | Functions | Variables
configuration.c File Reference
#include "configuration.h"

Go to the source code of this file.

Classes

struct  ConfigurationPrivate

Functions

 G_DEFINE_TYPE (Configuration, config, G_TYPE_OBJECT)
Configurationconfig_get_instance (void)
gboolean config_load_from_file (Configuration *config, const gchar *path, GError **error)
gchar ** config_get_groups (Configuration *config)
gchar ** config_get_keys (Configuration *config, const gchar *group_name)
gboolean config_has_key (Configuration *config, const gchar *section, const gchar *key)
void config_set_string (Configuration *config, const gchar *section, const gchar *key, const gchar *value)
gchar * config_get_string (Configuration *config, const gchar *section, const gchar *key)
void config_set_integer (Configuration *config, const gchar *section, const gchar *key, gint value)
gint config_get_integer (Configuration *config, const gchar *section, const gchar *key)
void config_set_boolean (Configuration *config, const gchar *section, const gchar *key, gboolean value)
gboolean config_get_boolean (Configuration *config, const gchar *section, const gchar *key)
static void config_init (Configuration *config)
static void config_finalize (GObject *object)
static void config_class_init (ConfigurationClass *klass)

Variables

static Configurationconfiguration_instance = NULL

Class Documentation

struct ConfigurationPrivate

Definition at line 14 of file configuration.c.

Class Members
GKeyFile * key_file

Function Documentation

static void config_class_init ( ConfigurationClass klass) [static]

Definition at line 111 of file configuration.c.

{
    GObjectClass *object_class = G_OBJECT_CLASS (klass);

    object_class->finalize = config_finalize;  

    g_type_class_add_private (klass, sizeof (ConfigurationPrivate));
}

Here is the call graph for this function:

static void config_finalize ( GObject *  object) [static]

Definition at line 99 of file configuration.c.

{
    Configuration *self;

    self = CONFIGURATION (object);

    g_key_file_free (self->priv->key_file);

    G_OBJECT_CLASS (config_parent_class)->finalize (object);  
}

Here is the caller graph for this function:

gboolean config_get_boolean ( Configuration config,
const gchar *  section,
const gchar *  key 
)

Definition at line 86 of file configuration.c.

{
    return g_key_file_get_boolean (config->priv->key_file, section, key, NULL);
}

Here is the caller graph for this function:

gchar** config_get_groups ( Configuration config)

Definition at line 38 of file configuration.c.

{
    return g_key_file_get_groups (config->priv->key_file, NULL);
}

Here is the caller graph for this function:

Definition at line 24 of file configuration.c.

Here is the caller graph for this function:

gint config_get_integer ( Configuration config,
const gchar *  section,
const gchar *  key 
)

Definition at line 74 of file configuration.c.

{
    return g_key_file_get_integer (config->priv->key_file, section, key, NULL);
}

Here is the caller graph for this function:

gchar** config_get_keys ( Configuration config,
const gchar *  group_name 
)

Definition at line 44 of file configuration.c.

{
    return g_key_file_get_keys (config->priv->key_file, group_name, NULL, NULL);
}

Here is the caller graph for this function:

gchar* config_get_string ( Configuration config,
const gchar *  section,
const gchar *  key 
)

Definition at line 62 of file configuration.c.

{
    return g_key_file_get_string (config->priv->key_file, section, key, NULL);
}

Here is the caller graph for this function:

gboolean config_has_key ( Configuration config,
const gchar *  section,
const gchar *  key 
)

Definition at line 50 of file configuration.c.

{
    return g_key_file_has_key (config->priv->key_file, section, key, NULL);
}

Here is the caller graph for this function:

static void config_init ( Configuration config) [static]

Definition at line 92 of file configuration.c.

{
    config->priv = G_TYPE_INSTANCE_GET_PRIVATE (config, CONFIGURATION_TYPE, ConfigurationPrivate);
    config->priv->key_file = g_key_file_new ();  
}
gboolean config_load_from_file ( Configuration config,
const gchar *  path,
GError **  error 
)

Definition at line 32 of file configuration.c.

{
    return g_key_file_load_from_file (config->priv->key_file, path, G_KEY_FILE_NONE, error);
}

Here is the caller graph for this function:

void config_set_boolean ( Configuration config,
const gchar *  section,
const gchar *  key,
gboolean  value 
)

Definition at line 80 of file configuration.c.

{
    g_key_file_set_boolean (config->priv->key_file, section, key, value);
}

Here is the caller graph for this function:

void config_set_integer ( Configuration config,
const gchar *  section,
const gchar *  key,
gint  value 
)

Definition at line 68 of file configuration.c.

{
    g_key_file_set_integer (config->priv->key_file, section, key, value);
}

Here is the caller graph for this function:

void config_set_string ( Configuration config,
const gchar *  section,
const gchar *  key,
const gchar *  value 
)

Definition at line 56 of file configuration.c.

{
    g_key_file_set_string (config->priv->key_file, section, key, value);
}

Here is the caller graph for this function:

G_DEFINE_TYPE ( Configuration  ,
config  ,
G_TYPE_OBJECT   
)

Variable Documentation

Definition at line 21 of file configuration.c.