Mercurial > audlegacy
annotate src/audacious/tuple.h @ 3431:2dfd43096113 trunk
precompiled headers (part 2)
| author | William Pitcock <nenolod@atheme.org> |
|---|---|
| date | Fri, 07 Sep 2007 00:20:15 -0500 |
| parents | 86dafe2300f7 |
| children | 9580bb3e58fa |
| rev | line source |
|---|---|
| 3278 | 1 /* |
| 2 * Audacious | |
| 3 * Copyright (c) 2006-2007 Audacious team | |
| 4 * | |
| 5 * This program is free software; you can redistribute it and/or modify | |
| 6 * it under the terms of the GNU General Public License as published by | |
| 7 * the Free Software Foundation; under version 3 of the License. | |
| 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, see <http://www.gnu.org/licenses>. | |
| 16 * | |
| 17 * The Audacious team does not consider modular code linking to | |
| 18 * Audacious or using our public API to be a derived work. | |
| 19 */ | |
| 20 | |
| 21 #ifndef __AUDACIOUS_TUPLE_H__ | |
| 22 #define __AUDACIOUS_TUPLE_H__ | |
| 23 | |
| 24 #include <glib.h> | |
| 25 #include <mowgli.h> | |
| 26 | |
|
3409
86dafe2300f7
Added Tuplez compiler (not used yet, though) and some related changes in
Matti Hamalainen <ccr@tnsp.org>
parents:
3328
diff
changeset
|
27 typedef struct _Tuple { |
|
86dafe2300f7
Added Tuplez compiler (not used yet, though) and some related changes in
Matti Hamalainen <ccr@tnsp.org>
parents:
3328
diff
changeset
|
28 mowgli_object_t parent; |
|
86dafe2300f7
Added Tuplez compiler (not used yet, though) and some related changes in
Matti Hamalainen <ccr@tnsp.org>
parents:
3328
diff
changeset
|
29 mowgli_dictionary_t *dict; |
|
86dafe2300f7
Added Tuplez compiler (not used yet, though) and some related changes in
Matti Hamalainen <ccr@tnsp.org>
parents:
3328
diff
changeset
|
30 } Tuple; |
|
86dafe2300f7
Added Tuplez compiler (not used yet, though) and some related changes in
Matti Hamalainen <ccr@tnsp.org>
parents:
3328
diff
changeset
|
31 |
| 3278 | 32 |
| 33 typedef enum { | |
| 34 TUPLE_STRING, | |
| 35 TUPLE_INT, | |
| 36 TUPLE_UNKNOWN | |
| 37 } TupleValueType; | |
| 38 | |
|
3409
86dafe2300f7
Added Tuplez compiler (not used yet, though) and some related changes in
Matti Hamalainen <ccr@tnsp.org>
parents:
3328
diff
changeset
|
39 typedef struct { |
|
86dafe2300f7
Added Tuplez compiler (not used yet, though) and some related changes in
Matti Hamalainen <ccr@tnsp.org>
parents:
3328
diff
changeset
|
40 TupleValueType type; |
|
86dafe2300f7
Added Tuplez compiler (not used yet, though) and some related changes in
Matti Hamalainen <ccr@tnsp.org>
parents:
3328
diff
changeset
|
41 union { |
|
86dafe2300f7
Added Tuplez compiler (not used yet, though) and some related changes in
Matti Hamalainen <ccr@tnsp.org>
parents:
3328
diff
changeset
|
42 gchar *string; |
|
86dafe2300f7
Added Tuplez compiler (not used yet, though) and some related changes in
Matti Hamalainen <ccr@tnsp.org>
parents:
3328
diff
changeset
|
43 gint integer; |
|
86dafe2300f7
Added Tuplez compiler (not used yet, though) and some related changes in
Matti Hamalainen <ccr@tnsp.org>
parents:
3328
diff
changeset
|
44 } value; |
|
86dafe2300f7
Added Tuplez compiler (not used yet, though) and some related changes in
Matti Hamalainen <ccr@tnsp.org>
parents:
3328
diff
changeset
|
45 } TupleValue; |
|
86dafe2300f7
Added Tuplez compiler (not used yet, though) and some related changes in
Matti Hamalainen <ccr@tnsp.org>
parents:
3328
diff
changeset
|
46 |
| 3278 | 47 Tuple *tuple_new(void); |
|
3304
00286cde2485
Make filename a const
Christian Birchinger <joker@netswarm.net>
parents:
3301
diff
changeset
|
48 Tuple *tuple_new_from_filename(const gchar *filename); |
| 3278 | 49 gboolean tuple_associate_string(Tuple *tuple, const gchar *field, const gchar *string); |
| 50 gboolean tuple_associate_int(Tuple *tuple, const gchar *field, gint integer); | |
| 51 void tuple_disassociate(Tuple *tuple, const gchar *field); | |
|
3409
86dafe2300f7
Added Tuplez compiler (not used yet, though) and some related changes in
Matti Hamalainen <ccr@tnsp.org>
parents:
3328
diff
changeset
|
52 void tuple_disassociate_now(TupleValue *value); |
| 3278 | 53 TupleValueType tuple_get_value_type(Tuple *tuple, const gchar *field); |
| 54 const gchar *tuple_get_string(Tuple *tuple, const gchar *field); | |
| 55 int tuple_get_int(Tuple *tuple, const gchar *field); | |
|
3328
e20c1f720153
defined a tuple_free for tuple namespace consistency
Giacomo Lozito <james@develia.org>
parents:
3304
diff
changeset
|
56 #define tuple_free(x) mowgli_object_unref(x); |
| 3278 | 57 |
| 58 #endif |
