Mercurial > audlegacy
annotate src/audacious/rcfile.h @ 3165:8775dfc57ead trunk
Remove mainwin_set_info_text() craq. Still some work to do.
author | William Pitcock <nenolod@atheme-project.org> |
---|---|
date | Wed, 25 Jul 2007 15:46:00 -0500 |
parents | f1c756f39e6c |
children | 15c491f342eb |
rev | line source |
---|---|
3112
4c758281fe8f
Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents:
2865
diff
changeset
|
1 /* Audacious - Cross-platform multimedia player |
4c758281fe8f
Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents:
2865
diff
changeset
|
2 * Copyright (C) 2005-2007 Audacious development team |
2537 | 3 * |
3112
4c758281fe8f
Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents:
2865
diff
changeset
|
4 * Based on XMMS: |
4c758281fe8f
Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents:
2865
diff
changeset
|
5 * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies |
2537 | 6 * |
3112
4c758281fe8f
Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents:
2865
diff
changeset
|
7 * This program is free software; you can redistribute it and/or modify |
4c758281fe8f
Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents:
2865
diff
changeset
|
8 * it under the terms of the GNU General Public License as published by |
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
3112
diff
changeset
|
9 * the Free Software Foundation; under version 3 of the License. |
2537 | 10 * |
3112
4c758281fe8f
Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents:
2865
diff
changeset
|
11 * This program is distributed in the hope that it will be useful, |
4c758281fe8f
Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents:
2865
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
4c758281fe8f
Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents:
2865
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4c758281fe8f
Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents:
2865
diff
changeset
|
14 * GNU General Public License for more details. |
2537 | 15 * |
3112
4c758281fe8f
Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents:
2865
diff
changeset
|
16 * You should have received a copy of the GNU General Public License |
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
3112
diff
changeset
|
17 * along with this program. If not, see <http://www.gnu.org/licenses>. |
3123
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
18 * |
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
19 * The Audacious team does not consider modular code linking to |
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
20 * Audacious or using our public API to be a derived work. |
2537 | 21 */ |
22 #ifndef RCFILE_H | |
23 #define RCFILE_H | |
24 | |
25 #include <glib.h> | |
26 | |
27 /** | |
28 * RcLine: | |
29 * @key: A key for the key->value mapping. | |
30 * @value: A value for the key->value mapping. | |
31 * | |
32 * RcLine objects contain key->value mappings. | |
33 **/ | |
34 typedef struct { | |
35 gchar *key; | |
36 gchar *value; | |
37 } RcLine; | |
38 | |
39 /** | |
40 * RcSection: | |
41 * @name: The name for the #RcSection. | |
42 * @lines: A list of key->value mappings for the #RcSection. | |
43 * | |
44 * RcSection objects contain collections of key->value mappings. | |
45 **/ | |
46 typedef struct { | |
47 gchar *name; | |
48 GList *lines; | |
49 } RcSection; | |
50 | |
51 /** | |
52 * RcFile: | |
53 * @sections: A list of sections. | |
54 * | |
55 * An RcFile object contains a collection of key->value mappings organized by section. | |
56 **/ | |
57 typedef struct { | |
58 GList *sections; | |
59 } RcFile; | |
60 | |
61 G_BEGIN_DECLS | |
62 | |
63 RcFile *bmp_rcfile_new(void); | |
64 void bmp_rcfile_free(RcFile * file); | |
65 | |
66 RcFile *bmp_rcfile_open(const gchar * filename); | |
67 gboolean bmp_rcfile_write(RcFile * file, const gchar * filename); | |
68 | |
69 gboolean bmp_rcfile_read_string(RcFile * file, const gchar * section, | |
70 const gchar * key, gchar ** value); | |
71 gboolean bmp_rcfile_read_int(RcFile * file, const gchar * section, | |
72 const gchar * key, gint * value); | |
73 gboolean bmp_rcfile_read_bool(RcFile * file, const gchar * section, | |
74 const gchar * key, gboolean * value); | |
75 gboolean bmp_rcfile_read_float(RcFile * file, const gchar * section, | |
76 const gchar * key, gfloat * value); | |
77 gboolean bmp_rcfile_read_double(RcFile * file, const gchar * section, | |
78 const gchar * key, gdouble * value); | |
79 | |
80 void bmp_rcfile_write_string(RcFile * file, const gchar * section, | |
81 const gchar * key, const gchar * value); | |
82 void bmp_rcfile_write_int(RcFile * file, const gchar * section, | |
83 const gchar * key, gint value); | |
84 void bmp_rcfile_write_boolean(RcFile * file, const gchar * section, | |
85 const gchar * key, gboolean value); | |
86 void bmp_rcfile_write_float(RcFile * file, const gchar * section, | |
87 const gchar * key, gfloat value); | |
88 void bmp_rcfile_write_double(RcFile * file, const gchar * section, | |
89 const gchar * key, gdouble value); | |
90 | |
91 void bmp_rcfile_remove_key(RcFile * file, const gchar * section, | |
92 const gchar * key); | |
93 | |
94 G_END_DECLS | |
95 | |
96 #endif // RCFILE_H |