![]() |
![]() |
![]() |
[Insert name here] Reference Manual | ![]() |
---|---|---|---|---|
RcLine; RcSection; RcFile; RcFile* bmp_rcfile_new (void);void bmp_rcfile_free (RcFile *file); RcFile* bmp_rcfile_open (constgchar *filename);gboolean bmp_rcfile_write (RcFile *file, constgchar *filename);gboolean bmp_rcfile_read_string (RcFile *file, constgchar *section, constgchar *key,gchar **value);gboolean bmp_rcfile_read_int (RcFile *file, constgchar *section, constgchar *key,gint *value);gboolean bmp_rcfile_read_bool (RcFile *file, constgchar *section, constgchar *key,gboolean *value);gboolean bmp_rcfile_read_float (RcFile *file, constgchar *section, constgchar *key,gfloat *value);gboolean bmp_rcfile_read_double (RcFile *file, constgchar *section, constgchar *key,gdouble *value);void bmp_rcfile_write_string (RcFile *file, constgchar *section, constgchar *key, constgchar *value);void bmp_rcfile_write_int (RcFile *file, constgchar *section, constgchar *key,gint value);void bmp_rcfile_write_boolean (RcFile *file, constgchar *section, constgchar *key,gboolean value);void bmp_rcfile_write_float (RcFile *file, constgchar *section, constgchar *key,gfloat value);void bmp_rcfile_write_double (RcFile *file, constgchar *section, constgchar *key,gdouble value);void bmp_rcfile_remove_key (RcFile *file, constgchar *section, constgchar *key);
typedef struct { gchar *key; gchar *value; } RcLine;
RcLine objects contain key->value mappings.
|
A key for the key->value mapping. |
|
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.
|
A list of sections. |
void bmp_rcfile_free (RcFile *file);
RcFile object destructor.
|
A RcFile object to destroy. |
RcFile* bmp_rcfile_open (constgchar *filename);
Opens an rcfile and returns an RcFile object representing it.
|
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
|
A RcFile object to write to disk. |
|
The section of the RcFile to look in. |
|
The name of the identifier to look up. |
|
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
|
A RcFile object to write to disk. |
|
The section of the RcFile to look in. |
|
The name of the identifier to look up. |
|
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
|
A RcFile object to write to disk. |
|
The section of the RcFile to look in. |
|
The name of the identifier to look up. |
|
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
|
A RcFile object to write to disk. |
|
The section of the RcFile to look in. |
|
The name of the identifier to look up. |
|
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
|
A RcFile object to write to disk. |
|
The section of the RcFile to look in. |
|
The name of the identifier to look up. |
|
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
|
A RcFile object to write to disk. |
|
The section of the RcFile to set the key in. |
|
The name of the identifier to set. |
|
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
|
A RcFile object to write to disk. |
|
The section of the RcFile to set the key in. |
|
The name of the identifier to set. |
|
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
|
A RcFile object to write to disk. |
|
The section of the RcFile to set the key in. |
|
The name of the identifier to set. |
|
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
|
A RcFile object to write to disk. |
|
The section of the RcFile to set the key in. |
|
The name of the identifier to set. |
|
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
|
A RcFile object to write to disk. |
|
The section of the RcFile to set the key in. |
|
The name of the identifier to set. |
|
The value to set for that identifier. |