fix case when state hook was added more than once
[lttv.git] / ltt / branches / poly / lttv / lttv / hook.h
index bd68e0966304b2af1ce455fbb8a85d29fc915762..193714c6d987407a726c707005f6d0a3c6b7a041 100644 (file)
@@ -41,7 +41,10 @@ typedef GArray LttvHooks;
  * functions. Hook removal does not change list order.
  */
 
-#define LTTV_PRIO_DEFAULT 0
+#define LTTV_PRIO_DEFAULT 50
+#define LTTV_PRIO_HIGH 0
+#define LTTV_PRIO_LOW 99
+
 typedef gint LttvHookPrio;
 
 /* Create and destroy a list of hooks */
@@ -58,7 +61,7 @@ void lttv_hooks_add(LttvHooks *h, LttvHook f, void *hook_data, LttvHookPrio p);
 
 /* Add a list of hooks to the list h */
 
-void lttv_hooks_add_list(LttvHooks *h, LttvHooks *list);
+void lttv_hooks_add_list(LttvHooks *h, const LttvHooks *list);
 
 
 /* Remove a hook from the list. Return the hook data. */
@@ -73,7 +76,7 @@ void lttv_hooks_remove_data(LttvHooks *h, LttvHook f, void *hook_data);
 
 /* Remove a list of hooks from the hooks list in h. */
 
-void lttv_hooks_remove_data_list(LttvHooks *h, LttvHooks *list);
+void lttv_hooks_remove_list(LttvHooks *h, LttvHooks *list);
 
 
 /* Return the number of hooks in the list */
@@ -89,6 +92,7 @@ void lttv_hooks_get(LttvHooks *h, unsigned i, LttvHook *f, void **hook_data,
 
 
 /* Remove the specified hook. The position of the following hooks may change */
+/* The hook is removed from the list event if its ref_count is higher than 1 */
 
 void lttv_hooks_remove_by_position(LttvHooks *h, unsigned i);
 
This page took 0.023326 seconds and 4 git commands to generate.