Main Page   Modules   Compound List   File List   Compound Members   File Members  

XLV Config


Compounds

struct  _XLV_Config
 XLV_Config descriptor. More...

struct  _XLV_ConfigKey
 XLV_ConfigKey descriptor. More...

struct  _XLV_ConfigOptions
struct  _XLV_ConfigOptions_Key
struct  _XLV_ConfigOptions_Section
struct  _XLV_ConfigSection
 XLV_ConfigSection descriptor. More...


Typedefs

typedef _XLV_ConfigSection XLV_ConfigSection
 XLV_ConfigSection class.

typedef _XLV_ConfigKey XLV_ConfigKey
 XLV_ConfigKey class.

typedef _XLV_Config XLV_Config
 XLV_Config class.

typedef _XLV_ConfigOptions XLV_ConfigOptions
 XLV_ConfigOptions class.

typedef _XLV_ConfigOptions_Section XLV_ConfigOptions_Section
 XLV_ConfigOptions_Section class.

typedef _XLV_ConfigOptions_Key XLV_ConfigOptions_Key
 XLV_ConfigOptions_Key class.


Functions

gchar * xlv_config_check_file (const gchar *filename, gboolean force_local)
 Build a path to the good config file. More...

XLV_Configxlv_config_file_new (const gchar *filename)
 Build a new XLV_Config object from a file. More...

void xlv_config_release (XLV_Config *config, gboolean flush)
 XLV Config destructor. More...

XLV_ConfigSectionxlv_config_get_section (XLV_Config *config, const guint8 *section_name)
 Return the section associated to section_name. More...

XLV_ConfigKeyxlv_config_get_key (XLV_ConfigSection *section, const guint8 *section_key)
 Return the key associated to section_key. More...

XLV_ConfigSectionxlv_config_next_section (XLV_Config *config, XLV_ConfigSection *section)
 Return the next section available in the configfile. More...

XLV_ConfigKeyxlv_config_next_key (XLV_ConfigSection *section, XLV_ConfigKey *key)
 Return the next key available in the section. More...

void xlv_config_get_options (XLV_Config *config, XLV_ConfigOptions *options)
 Quick way to parse a config file. More...


Function Documentation

gchar* xlv_config_check_file const gchar *    filename,
gboolean    force_local
 

Build a path to the good config file.

Parameters:
filename  configfile you want to read/write.
force_local  TRUE if you want to access a file local to user. Usually in $HOME/.xlv.
Returns:
a NULL-terminated string that you will have to free.

XLV_Config* xlv_config_file_new const gchar *    filename
 

Build a new XLV_Config object from a file.

Parameters:
filename  configfile to use to build the object.
Returns:
NULL if the file is not accessible or does not have the good format, a pointer to a valid XLV_Config object else.

XLV_ConfigKey* xlv_config_get_key XLV_ConfigSection   section,
const guint8 *    section_key
 

Return the key associated to section_key.

Parameters:
section  a valid XLV_ConfigSection object.
section_key  the name of a key owned by this section.
Returns:
a XLV_ConfigKey object.

void xlv_config_get_options XLV_Config   config,
XLV_ConfigOptions   options
 

Quick way to parse a config file.

Parameters:
config  a valid XLV_Config object.
options  a NULL-terminated array specifying the available options.

XLV_ConfigSection* xlv_config_get_section XLV_Config   config,
const guint8 *    section_name
 

Return the section associated to section_name.

Parameters:
config  a valid XLV_Config object.
section_name  the name of a section.
Returns:
a XLV_ConfigSection object.
If section_name is not the name of an existing section, a new section is created.

XLV_ConfigKey* xlv_config_next_key XLV_ConfigSection   section,
XLV_ConfigKey   key
 

Return the next key available in the section.

Parameters:
section  a valid XLV_ConfigSection object.
key  a key.
Returns:
a key.
This function returns the next key available in the section. If key is NULL then it returns the first key of the section, in the other case it returns the next key or NULL if there is no more key in the section.

XLV_ConfigSection* xlv_config_next_section XLV_Config   config,
XLV_ConfigSection   section
 

Return the next section available in the configfile.

Parameters:
config  a valid XLV_Config object.
section  a section.
Returns:
a section.
This function returns the next section available in the configfile. If section is NULL then it returns the first section of the configfile, in the other case it returns the next section or NULL if there is no more section.

void xlv_config_release XLV_Config   config,
gboolean    flush
 

XLV Config destructor.

Parameters:
config  a valid XLV_Config object.
flush  if TRUE XLV_Config will write its internal database to the opened configfile.


Generated on Mon Jul 1 19:39:10 2002 for XLV by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002