GSignondConfig

GSignondConfig — gSSO configuration information

Synopsis

#include <gsignond/gsignond-config.h>

struct              GSignondConfig;
struct              GSignondConfigClass;
gint                gsignond_config_get_integer         (GSignondConfig *self,
                                                         const gchar *key);
const gchar *       gsignond_config_get_string          (GSignondConfig *self,
                                                         const gchar *key);
GSignondConfig *    gsignond_config_new                 ();
void                gsignond_config_set_integer         (GSignondConfig *self,
                                                         const gchar *key,
                                                         gint value);
void                gsignond_config_set_string          (GSignondConfig *self,
                                                         const gchar *key,
                                                         const gchar *value);

Object Hierarchy

  GObject
   +----GSignondConfig

Description

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

The configuration is discovered from these sources, in decreasing order of priority:

  • environment variables, if gSSO has been compiled with --enable-debug switch. See the specific keys documentation for the variable names.

  • gSSO configuration file. See below for where the file is searched for.

  • default values. See the documentation for specific keys for those.

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:

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

Example configuration file

See example configuration file here: http://code.google.com/p/accounts-sso/source/browse/gsignond.conf?repo=gsignond

Details

struct GSignondConfig

struct GSignondConfig;

Opaque structure for the object.


struct GSignondConfigClass

struct GSignondConfigClass {
};

Opaque structure for the class.


gsignond_config_get_integer ()

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

Get an integer configuration value.

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_get_string ()

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

Get a string configuration value.

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_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_set_integer ()

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

Sets the configuration value to the provided integer.

self :

an instance of GSignondConfig

key :

the key name

value :

the value

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.

self :

an instance of GSignondConfig

key :

the key name

value :

the value. [transfer none]