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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
24
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
25 #include <glib.h>
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
29 /**
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
30 * RcLine:
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
31 * @key: A key for the key->value mapping.
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
32 * @value: A value for the key->value mapping.
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
33 *
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
34 * RcLine objects contain key->value mappings.
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
35 **/
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
36 typedef struct {
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
37 gchar *key;
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
38 gchar *value;
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
39 } RcLine;
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
40
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
41 /**
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
42 * RcSection:
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
43 * @name: The name for the #RcSection.
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
44 * @lines: A list of key->value mappings for the #RcSection.
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
45 *
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
46 * RcSection objects contain collections of key->value mappings.
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
47 **/
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
48 typedef struct {
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
49 gchar *name;
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
50 GList *lines;
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
51 } RcSection;
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
52
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
53 /**
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
54 * RcFile:
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
55 * @sections: A list of sections.
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
56 *
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
57 * An RcFile object contains a collection of key->value mappings organized by section.
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
58 **/
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
59 typedef struct {
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
60 GList *sections;
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
61 } RcFile;
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
62
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
79 const gchar * key, gdouble * value);
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
90 const gchar * key, gdouble value);
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
93 const gchar * key);
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
94
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
95 G_END_DECLS
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
96
4410
82f323bd68fc Rename bmp_rcfile* -> aud_rcfile*
Matti Hamalainen <ccr@tnsp.org>
parents: 3123
diff changeset
97 #endif /* __AUDACIOUS_RCFILE_H__ */