Mercurial > audlegacy
annotate libaudacious/rcfile.h @ 2203:60bd49189fde trunk
[svn] - two realcolour modes for voiceprint vis: Fire and Ice
- removed duplicate code from vis.c
author | marvin |
---|---|
date | Fri, 22 Dec 2006 20:10:22 -0800 |
parents | f18a5b617c34 |
children | f363009b7410 |
rev | line source |
---|---|
0 | 1 /* XMMS - Cross-platform multimedia player |
2 * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies | |
3 * | |
4 * This program is free software; you can redistribute it and/or modify | |
5 * it under the terms of the GNU General Public License as published by | |
2105
f18a5b617c34
[svn] - move to GPLv2-only. Based on my interpretation of the license, we are
nenolod
parents:
2060
diff
changeset
|
6 * the Free Software Foundation; under version 2 of the License. |
0 | 7 * |
8 * This program is distributed in the hope that it will be useful, | |
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 * GNU General Public License for more details. | |
12 * | |
13 * You should have received a copy of the GNU General Public License | |
14 * along with this program; if not, write to the Free Software | |
1459 | 15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
0 | 16 */ |
17 #ifndef RCFILE_H | |
18 #define RCFILE_H | |
19 | |
20 #include <glib.h> | |
21 | |
2060 | 22 /** |
23 * RcLine: | |
24 * @key: A key for the key->value mapping. | |
25 * @value: A value for the key->value mapping. | |
26 * | |
27 * RcLine objects contain key->value mappings. | |
28 **/ | |
0 | 29 typedef struct { |
30 gchar *key; | |
31 gchar *value; | |
32 } RcLine; | |
33 | |
2060 | 34 /** |
35 * RcSection: | |
36 * @name: The name for the #RcSection. | |
37 * @lines: A list of key->value mappings for the #RcSection. | |
38 * | |
39 * RcSection objects contain collections of key->value mappings. | |
40 **/ | |
0 | 41 typedef struct { |
42 gchar *name; | |
43 GList *lines; | |
44 } RcSection; | |
45 | |
2060 | 46 /** |
47 * RcFile: | |
48 * @sections: A list of sections. | |
49 * | |
50 * An RcFile object contains a collection of key->value mappings organized by section. | |
51 **/ | |
0 | 52 typedef struct { |
53 GList *sections; | |
54 } RcFile; | |
55 | |
56 G_BEGIN_DECLS | |
57 | |
58 RcFile *bmp_rcfile_new(void); | |
59 void bmp_rcfile_free(RcFile * file); | |
60 | |
61 RcFile *bmp_rcfile_open(const gchar * filename); | |
62 gboolean bmp_rcfile_write(RcFile * file, const gchar * filename); | |
63 | |
64 gboolean bmp_rcfile_read_string(RcFile * file, const gchar * section, | |
65 const gchar * key, gchar ** value); | |
66 gboolean bmp_rcfile_read_int(RcFile * file, const gchar * section, | |
67 const gchar * key, gint * value); | |
68 gboolean bmp_rcfile_read_bool(RcFile * file, const gchar * section, | |
69 const gchar * key, gboolean * value); | |
70 gboolean bmp_rcfile_read_float(RcFile * file, const gchar * section, | |
71 const gchar * key, gfloat * value); | |
72 gboolean bmp_rcfile_read_double(RcFile * file, const gchar * section, | |
73 const gchar * key, gdouble * value); | |
74 | |
75 void bmp_rcfile_write_string(RcFile * file, const gchar * section, | |
76 const gchar * key, const gchar * value); | |
77 void bmp_rcfile_write_int(RcFile * file, const gchar * section, | |
78 const gchar * key, gint value); | |
79 void bmp_rcfile_write_boolean(RcFile * file, const gchar * section, | |
80 const gchar * key, gboolean value); | |
81 void bmp_rcfile_write_float(RcFile * file, const gchar * section, | |
82 const gchar * key, gfloat value); | |
83 void bmp_rcfile_write_double(RcFile * file, const gchar * section, | |
84 const gchar * key, gdouble value); | |
85 | |
86 void bmp_rcfile_remove_key(RcFile * file, const gchar * section, | |
87 const gchar * key); | |
88 | |
89 G_END_DECLS | |
90 | |
91 #endif // RCFILE_H |