comparison src/audacious/tuple.h @ 3278:04df6bd984ad trunk

Tuple API try 1.
author William Pitcock <nenolod@atheme-project.org>
date Thu, 09 Aug 2007 03:13:01 -0500
parents
children 008530664ba1
comparison
equal deleted inserted replaced
3273:f24fe60cce1c 3278:04df6bd984ad
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
27 struct _Tuple;
28 typedef struct _Tuple Tuple;
29
30 typedef enum {
31 TUPLE_STRING,
32 TUPLE_INT,
33 TUPLE_UNKNOWN
34 } TupleValueType;
35
36 Tuple *tuple_new(void);
37 gboolean tuple_associate_string(Tuple *tuple, const gchar *field, const gchar *string);
38 gboolean tuple_associate_int(Tuple *tuple, const gchar *field, gint integer);
39 void tuple_disassociate(Tuple *tuple, const gchar *field);
40 TupleValueType tuple_get_value_type(Tuple *tuple, const gchar *field);
41 const gchar *tuple_get_string(Tuple *tuple, const gchar *field);
42 int tuple_get_int(Tuple *tuple, const gchar *field);
43
44 #endif