summaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'common.h')
-rw-r--r--common.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/common.h b/common.h
new file mode 100644
index 0000000..6d4ca55
--- /dev/null
+++ b/common.h
@@ -0,0 +1,27 @@
+#ifndef foocanberracommonh
+#define foocanberracommonh
+
+#include "canberra.h"
+
+#define N_HASHTABLE 39
+
+typedef struct ca_prop {
+ char *key;
+ size_t nbytes;
+ struct ca_prop *next_in_slot, *next_item, *prev_item;
+} ca_prop;
+
+struct ca_context {
+ ca_bool_t opened;
+ ca_prop *prop_hashtable[N_HASHTABLE];
+ ca_prop *first_item;
+ void *private;
+};
+
+#define CA_PROP_DATA(p) ((void*) ((char*) (p) + CA_ALIGN(sizeof(ca_prop))))
+
+ca_prop* ca_context_get(ca_context *c, const char *key);
+const char* ca_context_gets(ca_context *c, const char *key);
+
+
+#endif