annotate src/audacious/rcfile.h @ 3993:8d8699eb659d

say goodbye to libglade
author Tomasz Mon <desowin@gmail.com>
date Sat, 24 Nov 2007 17:09:11 +0100
parents f1c756f39e6c
children 15c491f342eb
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 */
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
22 #ifndef RCFILE_H
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
23 #define RCFILE_H
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
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
27 /**
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
28 * RcLine:
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
29 * @key: A key for the key->value mapping.
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
30 * @value: A value for the key->value mapping.
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
31 *
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
32 * RcLine objects contain key->value mappings.
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
33 **/
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
34 typedef struct {
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
35 gchar *key;
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
36 gchar *value;
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
37 } RcLine;
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
38
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
39 /**
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
40 * RcSection:
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
41 * @name: The name for the #RcSection.
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
42 * @lines: A list of key->value mappings for the #RcSection.
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
43 *
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
44 * RcSection objects contain collections of key->value mappings.
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
45 **/
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
46 typedef struct {
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
47 gchar *name;
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
48 GList *lines;
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
49 } RcSection;
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
50
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
51 /**
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
52 * RcFile:
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
53 * @sections: A list of sections.
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
54 *
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
55 * An RcFile object contains a collection of key->value mappings organized by section.
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
56 **/
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
57 typedef struct {
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
58 GList *sections;
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
59 } RcFile;
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
60
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
61 G_BEGIN_DECLS
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
62
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
63 RcFile *bmp_rcfile_new(void);
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
64 void bmp_rcfile_free(RcFile * file);
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
65
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
66 RcFile *bmp_rcfile_open(const gchar * filename);
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
67 gboolean bmp_rcfile_write(RcFile * file, const gchar * filename);
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
68
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
69 gboolean bmp_rcfile_read_string(RcFile * file, const gchar * section,
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
70 const gchar * key, gchar ** value);
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
71 gboolean bmp_rcfile_read_int(RcFile * file, const gchar * section,
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
72 const gchar * key, gint * value);
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
73 gboolean bmp_rcfile_read_bool(RcFile * file, const gchar * section,
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
74 const gchar * key, gboolean * value);
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
75 gboolean bmp_rcfile_read_float(RcFile * file, const gchar * section,
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
76 const gchar * key, gfloat * value);
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
77 gboolean bmp_rcfile_read_double(RcFile * file, const gchar * section,
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
78 const gchar * key, gdouble * value);
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
79
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
80 void bmp_rcfile_write_string(RcFile * file, const gchar * section,
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
81 const gchar * key, const gchar * value);
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
82 void bmp_rcfile_write_int(RcFile * file, const gchar * section,
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
83 const gchar * key, gint value);
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
84 void bmp_rcfile_write_boolean(RcFile * file, const gchar * section,
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
85 const gchar * key, gboolean value);
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
86 void bmp_rcfile_write_float(RcFile * file, const gchar * section,
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
87 const gchar * key, gfloat value);
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
88 void bmp_rcfile_write_double(RcFile * file, const gchar * section,
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
89 const gchar * key, gdouble value);
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
90
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
91 void bmp_rcfile_remove_key(RcFile * file, const gchar * section,
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
92 const gchar * key);
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
93
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
94 G_END_DECLS
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
95
7aac1b5ef85d [svn] - reinstate rcfile class for now
nenolod
parents:
diff changeset
96 #endif // RCFILE_H