Mercurial > audlegacy
annotate libaudacious/rcfile.h @ 2269:18228302c204 trunk
[svn] Make a string in ui_playist.c translatable, and update po/
author | kiyoshi |
---|---|
date | Thu, 04 Jan 2007 13:56:51 -0800 |
parents | f363009b7410 |
children |
rev | line source |
---|---|
2255 | 1 /* Audacious - Cross-platform multimedia player |
2 * Copyright (C) 2005-2007 Audacious development team | |
3 * | |
4 * Based on XMMS: | |
0 | 5 * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies |
6 * | |
7 * This program is free software; you can redistribute it and/or modify | |
8 * it under the terms of the GNU General Public License as published by | |
2105
f18a5b617c34
[svn] - move to GPLv2-only. Based on my interpretation of the license, we are
nenolod
parents:
2060
diff
changeset
|
9 * the Free Software Foundation; under version 2 of the License. |
0 | 10 * |
11 * This program is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
1459 | 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
0 | 19 */ |
20 #ifndef RCFILE_H | |
21 #define RCFILE_H | |
22 | |
23 #include <glib.h> | |
24 | |
2060 | 25 /** |
26 * RcLine: | |
27 * @key: A key for the key->value mapping. | |
28 * @value: A value for the key->value mapping. | |
29 * | |
30 * RcLine objects contain key->value mappings. | |
31 **/ | |
0 | 32 typedef struct { |
33 gchar *key; | |
34 gchar *value; | |
35 } RcLine; | |
36 | |
2060 | 37 /** |
38 * RcSection: | |
39 * @name: The name for the #RcSection. | |
40 * @lines: A list of key->value mappings for the #RcSection. | |
41 * | |
42 * RcSection objects contain collections of key->value mappings. | |
43 **/ | |
0 | 44 typedef struct { |
45 gchar *name; | |
46 GList *lines; | |
47 } RcSection; | |
48 | |
2060 | 49 /** |
50 * RcFile: | |
51 * @sections: A list of sections. | |
52 * | |
53 * An RcFile object contains a collection of key->value mappings organized by section. | |
54 **/ | |
0 | 55 typedef struct { |
56 GList *sections; | |
57 } RcFile; | |
58 | |
59 G_BEGIN_DECLS | |
60 | |
61 RcFile *bmp_rcfile_new(void); | |
62 void bmp_rcfile_free(RcFile * file); | |
63 | |
64 RcFile *bmp_rcfile_open(const gchar * filename); | |
65 gboolean bmp_rcfile_write(RcFile * file, const gchar * filename); | |
66 | |
67 gboolean bmp_rcfile_read_string(RcFile * file, const gchar * section, | |
68 const gchar * key, gchar ** value); | |
69 gboolean bmp_rcfile_read_int(RcFile * file, const gchar * section, | |
70 const gchar * key, gint * value); | |
71 gboolean bmp_rcfile_read_bool(RcFile * file, const gchar * section, | |
72 const gchar * key, gboolean * value); | |
73 gboolean bmp_rcfile_read_float(RcFile * file, const gchar * section, | |
74 const gchar * key, gfloat * value); | |
75 gboolean bmp_rcfile_read_double(RcFile * file, const gchar * section, | |
76 const gchar * key, gdouble * value); | |
77 | |
78 void bmp_rcfile_write_string(RcFile * file, const gchar * section, | |
79 const gchar * key, const gchar * value); | |
80 void bmp_rcfile_write_int(RcFile * file, const gchar * section, | |
81 const gchar * key, gint value); | |
82 void bmp_rcfile_write_boolean(RcFile * file, const gchar * section, | |
83 const gchar * key, gboolean value); | |
84 void bmp_rcfile_write_float(RcFile * file, const gchar * section, | |
85 const gchar * key, gfloat value); | |
86 void bmp_rcfile_write_double(RcFile * file, const gchar * section, | |
87 const gchar * key, gdouble value); | |
88 | |
89 void bmp_rcfile_remove_key(RcFile * file, const gchar * section, | |
90 const gchar * key); | |
91 | |
92 G_END_DECLS | |
93 | |
94 #endif // RCFILE_H |