Mercurial > audlegacy
annotate libaudacious/configfile.h @ 1499:959ebef04f70 trunk
[svn] - Don't show "(null)" information.
author | nhjm449 |
---|---|
date | Fri, 04 Aug 2006 02:46:05 -0700 |
parents | 705d4c089fce |
children |
rev | line source |
---|---|
0 | 1 /* XMMS - Cross-platform multimedia player |
2 * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies | |
3 * | |
4 * This program is free software; you can redistribute it and/or modify | |
5 * it under the terms of the GNU General Public License as published by | |
6 * the Free Software Foundation; either version 2 of the License, or | |
7 * (at your option) any later version. | |
8 * | |
9 * This program is distributed in the hope that it will be useful, | |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 * GNU General Public License for more details. | |
13 * | |
14 * You should have received a copy of the GNU General Public License | |
15 * along with this program; if not, write to the Free Software | |
1459 | 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
0 | 17 */ |
18 #ifndef XMMS_CONFIGFILE_H | |
19 #define XMMS_CONFIGFILE_H | |
20 | |
21 #include <glib.h> | |
22 | |
23 | |
24 typedef enum { | |
25 XMMS_CFG_INT, | |
26 XMMS_CFG_FLOAT, | |
27 XMMS_CFG_BOOLEAN, | |
28 XMMS_CFG_STRING | |
29 } XmmsCfgValueType; | |
30 | |
31 | |
32 struct _ConfigLine { | |
33 gchar *key; | |
34 gchar *value; | |
35 }; | |
36 | |
37 struct _ConfigSection { | |
38 gchar *name; | |
39 GList *lines; | |
40 }; | |
41 | |
42 struct _ConfigFile { | |
43 GList *sections; | |
44 }; | |
45 | |
46 typedef struct _ConfigLine ConfigLine; | |
47 typedef struct _ConfigSection ConfigSection; | |
48 typedef struct _ConfigFile ConfigFile; | |
49 | |
1013
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
50 /* |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
51 * Poison all of the xmms ConfigFile interfaces as we are to |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
52 * no longer use these anymore. They have been deprecated since 0.2, |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
53 * and will be REMOVED in 1.2. |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
54 * |
1014 | 55 * If you are a third party developer and you need a quick fix, add |
56 * #define I_AM_A_THIRD_PARTY_DEVELOPER_WHO_NEEDS_TO_BE_KICKED_IN_THE_HEAD_BY_CHUCK_NORRIS | |
57 * to your code. | |
58 * | |
1013
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
59 * - nenolod, 05/09/2006 |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
60 */ |
1014 | 61 #ifndef I_AM_A_THIRD_PARTY_DEVELOPER_WHO_NEEDS_TO_BE_KICKED_IN_THE_HEAD_BY_CHUCK_NORRIS |
1013
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
62 #pragma GCC poison xmms_cfg_new |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
63 #pragma GCC poison xmms_cfg_open_file |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
64 #pragma GCC poison xmms_cfg_write_file |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
65 #pragma GCC poison xmms_cfg_open_default_file |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
66 #pragma GCC poison xmms_cfg_write_default_file |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
67 #pragma GCC poison xmms_cfg_read_value |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
68 #pragma GCC poison xmms_cfg_write_value |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
69 #pragma GCC poison xmms_cfg_read_string |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
70 #pragma GCC poison xmms_cfg_read_int |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
71 #pragma GCC poison xmms_cfg_read_boolean |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
72 #pragma GCC poison xmms_cfg_read_float |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
73 #pragma GCC poison xmms_cfg_read_double |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
74 #pragma GCC poison xmms_cfg_write_string |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
75 #pragma GCC poison xmms_cfg_write_int |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
76 #pragma GCC poison xmms_cfg_write_boolean |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
77 #pragma GCC poison xmms_cfg_write_float |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
78 #pragma GCC poison xmms_cfg_write_double |
13281963f56f
[svn] Poison the XMMS ConfigFile routines. The rationale for this decision,
nenolod
parents:
0
diff
changeset
|
79 #pragma GCC poison xmms_cfg_remove_key |
1014 | 80 #endif |
0 | 81 |
82 #ifdef __cplusplus | |
83 extern "C" { | |
84 #endif | |
85 | |
86 ConfigFile *xmms_cfg_new(void); | |
87 ConfigFile *xmms_cfg_open_file(const gchar * filename); | |
88 gboolean xmms_cfg_write_file(ConfigFile * cfg, const gchar * filename); | |
89 void xmms_cfg_free(ConfigFile * cfg); | |
90 ConfigFile *xmms_cfg_open_default_file(void); | |
91 gboolean xmms_cfg_write_default_file(ConfigFile * cfg); | |
92 | |
93 gboolean xmms_cfg_read_value(ConfigFile * config_file, | |
94 const gchar * section, const gchar * key, | |
95 XmmsCfgValueType value_type, | |
96 gpointer * value); | |
97 | |
98 void xmms_cfg_write_value(ConfigFile * config_file, | |
99 const gchar * section, const gchar * key, | |
100 XmmsCfgValueType value_type, | |
101 gpointer * value); | |
102 | |
103 gboolean xmms_cfg_read_string(ConfigFile * cfg, const gchar * section, | |
104 const gchar * key, gchar ** value); | |
105 gboolean xmms_cfg_read_int(ConfigFile * cfg, const gchar * section, | |
106 const gchar * key, gint * value); | |
107 gboolean xmms_cfg_read_boolean(ConfigFile * cfg, const gchar * section, | |
108 const gchar * key, gboolean * value); | |
109 gboolean xmms_cfg_read_float(ConfigFile * cfg, const gchar * section, | |
110 const gchar * key, gfloat * value); | |
111 gboolean xmms_cfg_read_double(ConfigFile * cfg, const gchar * section, | |
112 const gchar * key, gdouble * value); | |
113 | |
114 void xmms_cfg_write_string(ConfigFile * cfg, const gchar * section, | |
115 const gchar * key, gchar * value); | |
116 void xmms_cfg_write_int(ConfigFile * cfg, const gchar * section, | |
117 const gchar * key, gint value); | |
118 void xmms_cfg_write_boolean(ConfigFile * cfg, const gchar * section, | |
119 const gchar * key, gboolean value); | |
120 void xmms_cfg_write_float(ConfigFile * cfg, const gchar * section, | |
121 const gchar * key, gfloat value); | |
122 void xmms_cfg_write_double(ConfigFile * cfg, const gchar * section, | |
123 const gchar * key, gdouble value); | |
124 | |
125 void xmms_cfg_remove_key(ConfigFile * cfg, const gchar * section, | |
126 const gchar * key); | |
127 | |
128 #ifdef __cplusplus | |
129 }; | |
130 #endif | |
131 | |
132 #endif |