X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Finclude%2Fnotification.h;h=750ad6ab512e56158a4225fe54d32a49d762e6d9;hb=a31fcc3fcdb8e38a562abf7a42c974225d60ba01;hp=79161901bf6f5e6ca163e664e9fee214ab934a9b;hpb=633d206d652087e0b170535a6e7fd0b33c8dc816;p=cilux diff --git a/src/include/notification.h b/src/include/notification.h index 7916190..750ad6a 100644 --- a/src/include/notification.h +++ b/src/include/notification.h @@ -5,18 +5,37 @@ /* -------------------------------------------------------------------------- */ 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 void n_open(n_object* o, char* uid, char* options); 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*); /* -------------------------------------------------------------------------- */