annotate libaudacious/rcfile.h @ 2095:855bba3f364e trunk

[svn] - update playlist UI
author nenolod
date Mon, 11 Dec 2006 05:09:02 -0800
parents 53a3d5db6b58
children f18a5b617c34
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
2060
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 1459
diff changeset
23 /**
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 1459
diff changeset
24 * RcLine:
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 1459
diff changeset
25 * @key: A key for the key->value mapping.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 1459
diff changeset
26 * @value: A value for the key->value mapping.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 1459
diff changeset
27 *
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 1459
diff changeset
28 * RcLine objects contain key->value mappings.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 1459
diff changeset
29 **/
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
30 typedef struct {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
31 gchar *key;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
32 gchar *value;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
33 } RcLine;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
34
2060
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 1459
diff changeset
35 /**
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 1459
diff changeset
36 * RcSection:
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 1459
diff changeset
37 * @name: The name for the #RcSection.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 1459
diff changeset
38 * @lines: A list of key->value mappings for the #RcSection.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 1459
diff changeset
39 *
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 1459
diff changeset
40 * RcSection objects contain collections of key->value mappings.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 1459
diff changeset
41 **/
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
42 typedef struct {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
43 gchar *name;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
44 GList *lines;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
45 } RcSection;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
46
2060
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 1459
diff changeset
47 /**
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 1459
diff changeset
48 * RcFile:
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 1459
diff changeset
49 * @sections: A list of sections.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 1459
diff changeset
50 *
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 1459
diff changeset
51 * An RcFile object contains a collection of key->value mappings organized by section.
53a3d5db6b58 [svn] - finish documenting the libaudacious API
nenolod
parents: 1459
diff changeset
52 **/
0
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
53 typedef struct {
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
54 GList *sections;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
55 } RcFile;
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
56
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
57 G_BEGIN_DECLS
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
58
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
59 RcFile *bmp_rcfile_new(void);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
60 void bmp_rcfile_free(RcFile * file);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
61
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
62 RcFile *bmp_rcfile_open(const gchar * filename);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
63 gboolean bmp_rcfile_write(RcFile * file, const gchar * filename);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
64
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
65 gboolean bmp_rcfile_read_string(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
66 const gchar * key, gchar ** value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
67 gboolean bmp_rcfile_read_int(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
68 const gchar * key, gint * value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
69 gboolean bmp_rcfile_read_bool(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
70 const gchar * key, gboolean * value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
71 gboolean bmp_rcfile_read_float(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
72 const gchar * key, gfloat * value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
73 gboolean bmp_rcfile_read_double(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
74 const gchar * key, gdouble * value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
75
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
76 void bmp_rcfile_write_string(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
77 const gchar * key, const gchar * value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
78 void bmp_rcfile_write_int(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
79 const gchar * key, gint value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
80 void bmp_rcfile_write_boolean(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
81 const gchar * key, gboolean value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
82 void bmp_rcfile_write_float(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
83 const gchar * key, gfloat value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
84 void bmp_rcfile_write_double(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
85 const gchar * key, gdouble value);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
86
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
87 void bmp_rcfile_remove_key(RcFile * file, const gchar * section,
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
88 const gchar * key);
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
89
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
90 G_END_DECLS
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
91
cb178e5ad177 [svn] Import audacious source.
nenolod
parents:
diff changeset
92 #endif // RCFILE_H