Mercurial > audlegacy
annotate src/audacious/rcfile.h @ 4410:82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 31 Mar 2008 06:23:31 +0300 |
parents | f1c756f39e6c |
children | 2eee464379dc |
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 */ |
4410
82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents:
3123
diff
changeset
|
22 #ifndef __AUDACIOUS_RCFILE_H__ |
82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents:
3123
diff
changeset
|
23 #define __AUDACIOUS_RCFILE_H__ |
2537 | 24 |
25 #include <glib.h> | |
26 | |
4410
82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents:
3123
diff
changeset
|
27 G_BEGIN_DECLS |
82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents:
3123
diff
changeset
|
28 |
2537 | 29 /** |
30 * RcLine: | |
31 * @key: A key for the key->value mapping. | |
32 * @value: A value for the key->value mapping. | |
33 * | |
34 * RcLine objects contain key->value mappings. | |
35 **/ | |
36 typedef struct { | |
37 gchar *key; | |
38 gchar *value; | |
39 } RcLine; | |
40 | |
41 /** | |
42 * RcSection: | |
43 * @name: The name for the #RcSection. | |
44 * @lines: A list of key->value mappings for the #RcSection. | |
45 * | |
46 * RcSection objects contain collections of key->value mappings. | |
47 **/ | |
48 typedef struct { | |
49 gchar *name; | |
50 GList *lines; | |
51 } RcSection; | |
52 | |
53 /** | |
54 * RcFile: | |
55 * @sections: A list of sections. | |
56 * | |
57 * An RcFile object contains a collection of key->value mappings organized by section. | |
58 **/ | |
59 typedef struct { | |
60 GList *sections; | |
61 } RcFile; | |
62 | |
63 | |
4410
82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents:
3123
diff
changeset
|
64 RcFile *aud_rcfile_new(void); |
82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents:
3123
diff
changeset
|
65 void aud_rcfile_free(RcFile * file); |
2537 | 66 |
4410
82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents:
3123
diff
changeset
|
67 RcFile *aud_rcfile_open(const gchar * filename); |
82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents:
3123
diff
changeset
|
68 gboolean aud_rcfile_write(RcFile * file, const gchar * filename); |
2537 | 69 |
4410
82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents:
3123
diff
changeset
|
70 gboolean aud_rcfile_read_string(RcFile * file, const gchar * section, |
2537 | 71 const gchar * key, gchar ** value); |
4410
82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents:
3123
diff
changeset
|
72 gboolean aud_rcfile_read_int(RcFile * file, const gchar * section, |
2537 | 73 const gchar * key, gint * value); |
4410
82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents:
3123
diff
changeset
|
74 gboolean aud_rcfile_read_bool(RcFile * file, const gchar * section, |
2537 | 75 const gchar * key, gboolean * value); |
4410
82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents:
3123
diff
changeset
|
76 gboolean aud_rcfile_read_float(RcFile * file, const gchar * section, |
2537 | 77 const gchar * key, gfloat * value); |
4410
82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents:
3123
diff
changeset
|
78 gboolean aud_rcfile_read_double(RcFile * file, const gchar * section, |
2537 | 79 const gchar * key, gdouble * value); |
80 | |
4410
82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents:
3123
diff
changeset
|
81 void aud_rcfile_write_string(RcFile * file, const gchar * section, |
2537 | 82 const gchar * key, const gchar * value); |
4410
82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents:
3123
diff
changeset
|
83 void aud_rcfile_write_int(RcFile * file, const gchar * section, |
2537 | 84 const gchar * key, gint value); |
4410
82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents:
3123
diff
changeset
|
85 void aud_rcfile_write_boolean(RcFile * file, const gchar * section, |
2537 | 86 const gchar * key, gboolean value); |
4410
82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents:
3123
diff
changeset
|
87 void aud_rcfile_write_float(RcFile * file, const gchar * section, |
2537 | 88 const gchar * key, gfloat value); |
4410
82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents:
3123
diff
changeset
|
89 void aud_rcfile_write_double(RcFile * file, const gchar * section, |
2537 | 90 const gchar * key, gdouble value); |
91 | |
4410
82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents:
3123
diff
changeset
|
92 void aud_rcfile_remove_key(RcFile * file, const gchar * section, |
2537 | 93 const gchar * key); |
94 | |
95 G_END_DECLS | |
96 | |
4410
82f323bd68fc
Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents:
3123
diff
changeset
|
97 #endif /* __AUDACIOUS_RCFILE_H__ */ |