more test and api stuff
[cilux] / src / include / notification.h
index 7916190..14a3030 100644 (file)
@@ -5,18 +5,36 @@
 /* -------------------------------------------------------------------------- */
 
 typedef struct n_object{
-       k_hashtable* headers;
-       k_hashtable* content;
+    k_hashtable* headers;
+    k_hashtable* content;
 } n_object;
 
+typedef struct n_event {
+    n_object* from;
+    n_object* to;
+} n_event;
+
+typedef int  (*n_handles_object)(char*);
+typedef void (*n_view_event)(n_object*, n_object*);
+typedef void (*n_cast_event)(n_object*, n_object*);
+typedef void (*n_sync_object)(n_object*);
+
+PUBLIC void n_register_driver(char*            name,
+                              n_handles_object handles_object,
+                              n_view_event     view_event,
+                              n_cast_event     cast_event,
+                              n_sync_object    sync_object );
+
 PUBLIC n_object*    n_object_new(char* s);
 PUBLIC void         n_commit(n_object* o);
-PUBLIC n_object*    n_see(n_object* o, char* uid);
+PUBLIC n_object*    n_view(n_object* o, char* uid);
 PUBLIC char*        n_to_string(n_object* o);
 PUBLIC char*        n_uid(n_object* o);
+PUBLIC int          n_uid_is(n_object* o, char* uid);
 PUBLIC char*        n_header(n_object* o, char* name);
 PUBLIC k_hashtable* n_headers(n_object* o);
 PUBLIC k_hashtable* n_content(n_object* o);
+PUBLIC void         n_dispatch(n_event*);
 
 /* -------------------------------------------------------------------------- */