HTP
0.3
|
#include "hooks.h"
Functions | |
htp_hook_t * | hook_create (void) |
htp_hook_t * | hook_copy (htp_hook_t *hook) |
void | hook_destroy (htp_hook_t *hook) |
int | hook_register (htp_hook_t **hook, htp_callback_fn_t callback_fn) |
int | hook_run_all (htp_hook_t *hook, void *data) |
int | hook_run_one (htp_hook_t *hook, void *data) |
htp_hook_t* hook_copy | ( | htp_hook_t * | hook | ) |
Creates a copy of the provided hook. The hook is allowed to be NULL, in which case this function simply returns a NULL.
hook |
htp_hook_t* hook_create | ( | void | ) |
Creates a new hook.
void hook_destroy | ( | htp_hook_t * | hook | ) |
Destroys an existing hook. It is all right to send a NULL to this method because it will simply return straight away.
hook |
int hook_register | ( | htp_hook_t ** | hook, |
htp_callback_fn_t | callback_fn | ||
) |
Registers a new callback with the hook.
hook | |
callback_fn |
int hook_run_all | ( | htp_hook_t * | hook, |
void * | data | ||
) |
Runs all the callbacks associated with a given hook. Only stops if one of the callbacks returns an error (HOOK_ERROR).
hook | |
data |
int hook_run_one | ( | htp_hook_t * | hook, |
void * | data | ||
) |
Run callbacks until one of them accepts to service the hook.
hook | |
data |