GSignondConfig

GSignondConfig — gSSO configuration information

Functions

Object Hierarchy

    GObject
    ╰── GSignondConfig

Includes

#include <gsignond/gsignond-config.h>

Description

GSignondConfig holds configuration information as a set of keys and values (integer or strings). The key names are defined in

general config keys,

and DBus config keys.

The configuration is retrieved from the gSSO configuration file. See below for where the file is searched for.

Where the configuration file is searched for

If gSSO has been compiled with --enable-debug, then these locations are used, in decreasing order of priority:

  • GSIGNOND_CONFIG environment variable

  • g_get_user_config_dir() + "gsignond.conf"

  • path specified in --sysconfdir configure option ($(sysconfdir))

  • each of g_get_system_config_dirs() + "gsignond.conf"

Otherwise, the config file location is determined at compilation time as $(sysconfdir) + "gsignond.conf"

Example configuration file

See example configuration file here:

http://code.google.com/p/accounts-sso/source/browse/gsignond.conf.in?repo=gsignond

Functions

gsignond_config_new ()

GSignondConfig *
gsignond_config_new ();

Create a GSignondConfig object.

Returns

an instance of GSignondConfig. gSSO extensions should not use this as they're already provided with a config object when they're created.


gsignond_config_get_integer ()

gint
gsignond_config_get_integer (GSignondConfig *self,
                             const gchar *key);

Get an integer configuration value.

Parameters

self

an instance of GSignondConfig

 

key

the key name

 

Returns

the value corresponding to the key as an integer. If the key does not exist or cannot be converted to the integer, 0 is returned.


gsignond_config_set_integer ()

void
gsignond_config_set_integer (GSignondConfig *self,
                             const gchar *key,
                             gint value);

Sets the configuration value to the provided integer.

Parameters

self

an instance of GSignondConfig

 

key

the key name

 

value

the value

 

gsignond_config_get_string ()

const gchar *
gsignond_config_get_string (GSignondConfig *self,
                            const gchar *key);

Get a string configuration value.

Parameters

self

an instance of GSignondConfig

 

key

the key name

 

Returns

the value corresponding to the key as string. If the key does not exist, NULL is returned.

[transfer none]


gsignond_config_set_string ()

void
gsignond_config_set_string (GSignondConfig *self,
                            const gchar *key,
                            const gchar *value);

Sets the configuration value to the provided string.

Parameters

self

an instance of GSignondConfig

 

key

the key name

 

value

the value.

[transfer none]

Types and Values