annotate libaudacious/rcfile.h @ 1812:3be14eb7b44e trunk

[svn] - Default skin updated
author nhjm449
date Wed, 04 Oct 2006 23:25:57 -0700
parents 705d4c089fce
children 53a3d5db6b58
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
1 /* XMMS - Cross-platform multimedia player
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
2 * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
3 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
4 * This program is free software; you can redistribute it and/or modify
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
5 * it under the terms of the GNU General Public License as published by
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
7 * (at your option) any later version.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
8 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
9 * This program is distributed in the hope that it will be useful,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
12 * GNU General Public License for more details.
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
13 *
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
15 * along with this program; if not, write to the Free Software
1459
705d4c089fce [svn] Fix postal code.
chainsaw
parents: 1458
diff changeset
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
17 */
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
18 #ifndef RCFILE_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
19 #define RCFILE_H
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
20
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
21 #include <glib.h>
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
22
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
23 typedef struct {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
24 gchar *key;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
25 gchar *value;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
26 } RcLine;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
27
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
28 typedef struct {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
29 gchar *name;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
30 GList *lines;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
31 } RcSection;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
32
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
33 typedef struct {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
34 GList *sections;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
35 } RcFile;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
36
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
37 G_BEGIN_DECLS
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
38
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
39 RcFile *bmp_rcfile_new(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
40 void bmp_rcfile_free(RcFile * file);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
41
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
42 RcFile *bmp_rcfile_open(const gchar * filename);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
43 gboolean bmp_rcfile_write(RcFile * file, const gchar * filename);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
44
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
45 gboolean bmp_rcfile_read_string(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
46 const gchar * key, gchar ** value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
47 gboolean bmp_rcfile_read_int(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
48 const gchar * key, gint * value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
49 gboolean bmp_rcfile_read_bool(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
50 const gchar * key, gboolean * value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
51 gboolean bmp_rcfile_read_float(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
52 const gchar * key, gfloat * value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
53 gboolean bmp_rcfile_read_double(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
54 const gchar * key, gdouble * value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
55
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
56 void bmp_rcfile_write_string(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
57 const gchar * key, const gchar * value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
58 void bmp_rcfile_write_int(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
59 const gchar * key, gint value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
60 void bmp_rcfile_write_boolean(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
61 const gchar * key, gboolean value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
62 void bmp_rcfile_write_float(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
63 const gchar * key, gfloat value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
64 void bmp_rcfile_write_double(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
65 const gchar * key, gdouble value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
66
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
67 void bmp_rcfile_remove_key(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
68 const gchar * key);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
69
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
70 G_END_DECLS
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
71
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
72 #endif // RCFILE_H