X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=trunk%2Flttv%2Flttv%2Flttv%2Fhook.h;h=91f0c13f9a02d6b0d35d304781dbf87dba9685f8;hb=750eb11ac3adbb2c4c3e6cf5323a523e9da7b8ae;hp=325d218671c7a98f080a5a3df12d8b56ff2cc846;hpb=c90f61251594be2e5f43357053c213a43c4ccd2f;p=lttv.git diff --git a/trunk/lttv/lttv/lttv/hook.h b/trunk/lttv/lttv/lttv/hook.h index 325d2186..91f0c13f 100644 --- a/trunk/lttv/lttv/lttv/hook.h +++ b/trunk/lttv/lttv/lttv/hook.h @@ -130,7 +130,7 @@ typedef struct _LttvHooksById { /* Create and destroy a hooks by id list */ -LttvHooksById *lttv_hooks_by_id_new(); +LttvHooksById *lttv_hooks_by_id_new(void); void lttv_hooks_by_id_destroy(LttvHooksById *h); @@ -156,9 +156,32 @@ static inline LttvHooks *lttv_hooks_by_id_get(LttvHooksById *h, unsigned id) return ret; } - /* Remove the list of hooks associated with an id */ void lttv_hooks_by_id_remove(LttvHooksById *h, unsigned id); +void lttv_hooks_by_id_copy(LttvHooksById *dest, LttvHooksById *src); + +/* + * Hooks per channel per id. Useful for GUI to save/restore hooks + * on a per trace basis (rather than per tracefile). + */ + +/* Internal structure, contained in by the LttvHooksByIdChannelArray */ +typedef struct _LttvHooksByIdChannel { + LttvHooksById *hooks_by_id; + GQuark channel; +} LttvHooksByIdChannel; + +typedef struct _LttvHooksByIdChannelArray { + GArray *array; /* Array of LttvHooksByIdChannel */ +} LttvHooksByIdChannelArray; + +LttvHooksByIdChannelArray *lttv_hooks_by_id_channel_new(void); + +void lttv_hooks_by_id_channel_destroy(LttvHooksByIdChannelArray *h); + +LttvHooks *lttv_hooks_by_id_channel_find(LttvHooksByIdChannelArray *h, + GQuark channel, guint16 id); + #endif // HOOK_H