* *f and *hook_data are NULL if no hook exists at that position. */
void lttv_hooks_get(LttvHooks *h, unsigned i, LttvHook *f, void **hook_data,
- LttvHookPrio *p);
+ LttvHookPrio *p);
/* Remove the specified hook. The position of the following hooks may change */
* hooks from h1 are called first. */
gboolean lttv_hooks_call_merge(LttvHooks *h1, void *call_data1,
- LttvHooks *h2, void *call_data2);
+ LttvHooks *h2, void *call_data2);
gboolean lttv_hooks_call_check_merge(LttvHooks *h1, void *call_data1,
- LttvHooks *h2, void *call_data2);
+ LttvHooks *h2, void *call_data2);
/* Sometimes different hooks need to be called based on the case. The
case is represented by an unsigned integer id */
typedef struct _LttvHooksById {
- GPtrArray *index;
- GArray *array;
+ GPtrArray *index;
+ GArray *array;
} LttvHooksById;
/* Create and destroy a hooks by id list */
static inline LttvHooks *lttv_hooks_by_id_get(LttvHooksById *h, unsigned id)
{
- LttvHooks *ret;
- if(likely(id < h->index->len)) ret = h->index->pdata[id];
- else ret = NULL;
+ LttvHooks *ret;
+ if(likely(id < h->index->len)) ret = h->index->pdata[id];
+ else ret = NULL;
- return ret;
+ return ret;
}
/* Remove the list of hooks associated with an id */
/* Internal structure, contained in by the LttvHooksByIdChannelArray */
typedef struct _LttvHooksByIdChannel {
- LttvHooksById *hooks_by_id;
- GQuark channel;
+ LttvHooksById *hooks_by_id;
+ GQuark channel;
} LttvHooksByIdChannel;
typedef struct _LttvHooksByIdChannelArray {
- GArray *array; /* Array of LttvHooksByIdChannel */
+ 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);
+ GQuark channel, guint16 id);
#endif // HOOK_H