HDConfigFile

HDConfigFile

Synopsis


#include <libhildondesktop/libhildondesktop.h>

                    HDConfigFile;
HDConfigFile*       hd_config_file_new                  (const gchar *system_conf_dir,
                                                         const gchar *user_conf_dir,
                                                         const gchar *filename);
HDConfigFile*       hd_config_file_new_with_defaults    (const gchar *filename);
GKeyFile*           hd_config_file_load_file            (HDConfigFile *config_file,
                                                         gboolean force_system_config);
gboolean            hd_config_file_save_file            (HDConfigFile *config_file,
                                                         GKeyFile *key_file);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----HDConfigFile

Properties

  "filename"                 gchar*                : Read / Write / Construct Only
  "system-conf-dir"          gchar*                : Read / Write / Construct Only
  "user-conf-dir"            gchar*                : Read / Write / Construct Only

Signals

  "changed"                                        : Run First

Description

Details

HDConfigFile

typedef struct _HDConfigFile HDConfigFile;


hd_config_file_new ()

HDConfigFile*       hd_config_file_new                  (const gchar *system_conf_dir,
                                                         const gchar *user_conf_dir,
                                                         const gchar *filename);

system_conf_dir :
user_conf_dir :
filename :
Returns :

hd_config_file_new_with_defaults ()

HDConfigFile*       hd_config_file_new_with_defaults    (const gchar *filename);

filename :
Returns :

hd_config_file_load_file ()

GKeyFile*           hd_config_file_load_file            (HDConfigFile *config_file,
                                                         gboolean force_system_config);

Creates a new GKeyFile and loads from config file. If available and force_system_config is FALSE the user config file is used, else the system config file is used

config_file : a HDConfigFile.
force_system_config : TRUE if the user config file should not be loaded
Returns : a new GKeyFile. Should be freed with g_key_file_free.

hd_config_file_save_file ()

gboolean            hd_config_file_save_file            (HDConfigFile *config_file,
                                                         GKeyFile *key_file);

Atomically store key_file to the user config file.

config_file : a HDConfigFile.
key_file : a GKeyFile which should be stored.
Returns : TRUE if the file could be stored successful, FALSE otherwise.

Property Details

The "filename" property

  "filename"                 gchar*                : Read / Write / Construct Only

Configuration filename.

Default value: NULL


The "system-conf-dir" property

  "system-conf-dir"          gchar*                : Read / Write / Construct Only

System configuration directory.

Default value: NULL


The "user-conf-dir" property

  "user-conf-dir"            gchar*                : Read / Write / Construct Only

User configuration directory.

Default value: NULL

Signal Details

The "changed" signal

void                user_function                      (HDConfigFile *hdconfigfile,
                                                        gpointer      user_data)         : Run First

hdconfigfile : the object which received the signal.
user_data : user data set when the signal handler was connected.