Mercurial > audlegacy
annotate src/audacious/rcfile.h @ 2987:7f17c37db82b trunk
Log a warning if an adequate transport was not found.
author | William Pitcock <nenolod@atheme-project.org> |
---|---|
date | Thu, 05 Jul 2007 01:25:56 -0500 |
parents | d226b83fa329 |
children | 4c758281fe8f |
rev | line source |
---|---|
2865
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
1 /* |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
2 * audacious: Cross-platform multimedia player. |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
3 * rcfile.h: Reading and manipulation of .ini-like files. |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
4 * |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
5 * Copyright (c) 2005-2007 Audacious development team. |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
6 * Copyright (c) 2003-2005 BMP development team. |
2537 | 7 * |
2865
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
8 * Redistribution and use in source and binary forms, with or without |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
9 * modification, are permitted provided that the following conditions are |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
10 * met: |
2537 | 11 * |
2865
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
12 * 1. Redistributions of source code must retain the above copyright notice, |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
13 * this list of conditions and the following disclaimer. |
2537 | 14 * |
2865
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
15 * 2. Redistributions in binary form must reproduce the above copyright |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
16 * notice, this list of conditions and the following disclaimer in the |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
17 * documentation and/or other materials provided with the distribution. |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
18 * |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
19 * 3. The name of the author may not be used to endorse or promote products |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
20 * derived from this software without specific prior written permission. |
2537 | 21 * |
2865
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
24 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
25 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
26 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
30 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
31 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
32 * POSSIBILITY OF SUCH DAMAGE. |
2537 | 33 */ |
2865
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2537
diff
changeset
|
34 |
2537 | 35 #ifndef RCFILE_H |
36 #define RCFILE_H | |
37 | |
38 #include <glib.h> | |
39 | |
40 /** | |
41 * RcLine: | |
42 * @key: A key for the key->value mapping. | |
43 * @value: A value for the key->value mapping. | |
44 * | |
45 * RcLine objects contain key->value mappings. | |
46 **/ | |
47 typedef struct { | |
48 gchar *key; | |
49 gchar *value; | |
50 } RcLine; | |
51 | |
52 /** | |
53 * RcSection: | |
54 * @name: The name for the #RcSection. | |
55 * @lines: A list of key->value mappings for the #RcSection. | |
56 * | |
57 * RcSection objects contain collections of key->value mappings. | |
58 **/ | |
59 typedef struct { | |
60 gchar *name; | |
61 GList *lines; | |
62 } RcSection; | |
63 | |
64 /** | |
65 * RcFile: | |
66 * @sections: A list of sections. | |
67 * | |
68 * An RcFile object contains a collection of key->value mappings organized by section. | |
69 **/ | |
70 typedef struct { | |
71 GList *sections; | |
72 } RcFile; | |
73 | |
74 G_BEGIN_DECLS | |
75 | |
76 RcFile *bmp_rcfile_new(void); | |
77 void bmp_rcfile_free(RcFile * file); | |
78 | |
79 RcFile *bmp_rcfile_open(const gchar * filename); | |
80 gboolean bmp_rcfile_write(RcFile * file, const gchar * filename); | |
81 | |
82 gboolean bmp_rcfile_read_string(RcFile * file, const gchar * section, | |
83 const gchar * key, gchar ** value); | |
84 gboolean bmp_rcfile_read_int(RcFile * file, const gchar * section, | |
85 const gchar * key, gint * value); | |
86 gboolean bmp_rcfile_read_bool(RcFile * file, const gchar * section, | |
87 const gchar * key, gboolean * value); | |
88 gboolean bmp_rcfile_read_float(RcFile * file, const gchar * section, | |
89 const gchar * key, gfloat * value); | |
90 gboolean bmp_rcfile_read_double(RcFile * file, const gchar * section, | |
91 const gchar * key, gdouble * value); | |
92 | |
93 void bmp_rcfile_write_string(RcFile * file, const gchar * section, | |
94 const gchar * key, const gchar * value); | |
95 void bmp_rcfile_write_int(RcFile * file, const gchar * section, | |
96 const gchar * key, gint value); | |
97 void bmp_rcfile_write_boolean(RcFile * file, const gchar * section, | |
98 const gchar * key, gboolean value); | |
99 void bmp_rcfile_write_float(RcFile * file, const gchar * section, | |
100 const gchar * key, gfloat value); | |
101 void bmp_rcfile_write_double(RcFile * file, const gchar * section, | |
102 const gchar * key, gdouble value); | |
103 | |
104 void bmp_rcfile_remove_key(RcFile * file, const gchar * section, | |
105 const gchar * key); | |
106 | |
107 G_END_DECLS | |
108 | |
109 #endif // RCFILE_H |