| [Insert name here] Reference Manual | ||||
|---|---|---|---|---|
RcLine;
RcSection;
RcFile;
RcFile* bmp_rcfile_new (void);
void bmp_rcfile_free (RcFile *file);
RcFile* bmp_rcfile_open (const gchar *filename);
gboolean bmp_rcfile_write (RcFile *file,
const gchar *filename);
gboolean bmp_rcfile_read_string (RcFile *file,
const gchar *section,
const gchar *key,
gchar **value);
gboolean bmp_rcfile_read_int (RcFile *file,
const gchar *section,
const gchar *key,
gint *value);
gboolean bmp_rcfile_read_bool (RcFile *file,
const gchar *section,
const gchar *key,
gboolean *value);
gboolean bmp_rcfile_read_float (RcFile *file,
const gchar *section,
const gchar *key,
gfloat *value);
gboolean bmp_rcfile_read_double (RcFile *file,
const gchar *section,
const gchar *key,
gdouble *value);
void bmp_rcfile_write_string (RcFile *file,
const gchar *section,
const gchar *key,
const gchar *value);
void bmp_rcfile_write_int (RcFile *file,
const gchar *section,
const gchar *key,
gint value);
void bmp_rcfile_write_boolean (RcFile *file,
const gchar *section,
const gchar *key,
gboolean value);
void bmp_rcfile_write_float (RcFile *file,
const gchar *section,
const gchar *key,
gfloat value);
void bmp_rcfile_write_double (RcFile *file,
const gchar *section,
const gchar *key,
gdouble value);
void bmp_rcfile_remove_key (RcFile *file,
const gchar *section,
const gchar *key);
typedef struct {
gchar *key;
gchar *value;
} RcLine;
RcLine objects contain key->value mappings.
key; |
A key for the key->value mapping. |
value; |
A value for the key->value mapping. |
typedef struct {
gchar *name;
GList *lines;
} RcSection;
RcSection objects contain collections of key->value mappings.
typedef struct {
GList *sections;
} RcFile;
An RcFile object contains a collection of key->value mappings organized by section.
sections; |
A list of sections. |
void bmp_rcfile_free (RcFile *file);
RcFile object destructor.
file : |
A RcFile object to destroy. |
RcFile* bmp_rcfile_open (constgchar *filename);
Opens an rcfile and returns an RcFile object representing it.
filename : |
Path to rcfile to open. |
| Returns : | An RcFile object representing the rcfile given. |
gboolean bmp_rcfile_write (RcFile *file, constgchar *filename);
Writes the contents of a RcFile object to disk.
gboolean bmp_rcfile_read_string (RcFile *file, constgchar *section, constgchar *key,gchar **value);
Looks up a value in an RcFile and places it in value
file : |
A RcFile object to write to disk. |
section : |
The section of the RcFile to look in. |
key : |
The name of the identifier to look up. |
value : |
A pointer to a memory location to place the data. |
| Returns : | TRUE on success, FALSE otherwise. |
gboolean bmp_rcfile_read_int (RcFile *file, constgchar *section, constgchar *key,gint *value);
Looks up a value in an RcFile and places it in value
file : |
A RcFile object to write to disk. |
section : |
The section of the RcFile to look in. |
key : |
The name of the identifier to look up. |
value : |
A pointer to a memory location to place the data. |
| Returns : | TRUE on success, FALSE otherwise. |
gboolean bmp_rcfile_read_bool (RcFile *file, constgchar *section, constgchar *key,gboolean *value);
Looks up a value in an RcFile and places it in value
file : |
A RcFile object to write to disk. |
section : |
The section of the RcFile to look in. |
key : |
The name of the identifier to look up. |
value : |
A pointer to a memory location to place the data. |
| Returns : | TRUE on success, FALSE otherwise. |
gboolean bmp_rcfile_read_float (RcFile *file, constgchar *section, constgchar *key,gfloat *value);
Looks up a value in an RcFile and places it in value
file : |
A RcFile object to write to disk. |
section : |
The section of the RcFile to look in. |
key : |
The name of the identifier to look up. |
value : |
A pointer to a memory location to place the data. |
| Returns : | TRUE on success, FALSE otherwise. |
gboolean bmp_rcfile_read_double (RcFile *file, constgchar *section, constgchar *key,gdouble *value);
Looks up a value in an RcFile and places it in value
file : |
A RcFile object to write to disk. |
section : |
The section of the RcFile to look in. |
key : |
The name of the identifier to look up. |
value : |
A pointer to a memory location to place the data. |
| Returns : | TRUE on success, FALSE otherwise. |
void bmp_rcfile_write_string (RcFile *file, constgchar *section, constgchar *key, constgchar *value);
Sets a value in an RcFile for key
file : |
A RcFile object to write to disk. |
section : |
The section of the RcFile to set the key in. |
key : |
The name of the identifier to set. |
value : |
The value to set for that identifier. |
void bmp_rcfile_write_int (RcFile *file, constgchar *section, constgchar *key,gint value);
Sets a value in an RcFile for key
file : |
A RcFile object to write to disk. |
section : |
The section of the RcFile to set the key in. |
key : |
The name of the identifier to set. |
value : |
The value to set for that identifier. |
void bmp_rcfile_write_boolean (RcFile *file, constgchar *section, constgchar *key,gboolean value);
Sets a value in an RcFile for key
file : |
A RcFile object to write to disk. |
section : |
The section of the RcFile to set the key in. |
key : |
The name of the identifier to set. |
value : |
The value to set for that identifier. |
void bmp_rcfile_write_float (RcFile *file, constgchar *section, constgchar *key,gfloat value);
Sets a value in an RcFile for key
file : |
A RcFile object to write to disk. |
section : |
The section of the RcFile to set the key in. |
key : |
The name of the identifier to set. |
value : |
The value to set for that identifier. |
void bmp_rcfile_write_double (RcFile *file, constgchar *section, constgchar *key,gdouble value);
Sets a value in an RcFile for key
file : |
A RcFile object to write to disk. |
section : |
The section of the RcFile to set the key in. |
key : |
The name of the identifier to set. |
value : |
The value to set for that identifier. |