diff src/audacious/tuple.h @ 3409:86dafe2300f7 trunk

Added Tuplez compiler (not used yet, though) and some related changes in tuple code.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 30 Aug 2007 23:41:33 +0300
parents e20c1f720153
children 9580bb3e58fa
line wrap: on
line diff
--- a/src/audacious/tuple.h	Thu Aug 30 17:41:40 2007 +0200
+++ b/src/audacious/tuple.h	Thu Aug 30 23:41:33 2007 +0300
@@ -24,8 +24,11 @@
 #include <glib.h>
 #include <mowgli.h>
 
-struct _Tuple;
-typedef struct _Tuple Tuple;
+typedef struct _Tuple {
+    mowgli_object_t parent;
+    mowgli_dictionary_t *dict;
+} Tuple;
+
 
 typedef enum {
     TUPLE_STRING,
@@ -33,11 +36,20 @@
     TUPLE_UNKNOWN
 } TupleValueType;
 
+typedef struct {
+    TupleValueType type;
+    union {
+        gchar *string;
+        gint integer;
+    } value;
+} TupleValue;
+
 Tuple *tuple_new(void);
 Tuple *tuple_new_from_filename(const gchar *filename);
 gboolean tuple_associate_string(Tuple *tuple, const gchar *field, const gchar *string);
 gboolean tuple_associate_int(Tuple *tuple, const gchar *field, gint integer);
 void tuple_disassociate(Tuple *tuple, const gchar *field);
+void tuple_disassociate_now(TupleValue *value);
 TupleValueType tuple_get_value_type(Tuple *tuple, const gchar *field);
 const gchar *tuple_get_string(Tuple *tuple, const gchar *field);
 int tuple_get_int(Tuple *tuple, const gchar *field);