diff options
author | Niels Provos <provos@gmail.com> | 2007-12-29 22:45:54 +0000 |
---|---|---|
committer | Niels Provos <provos@gmail.com> | 2007-12-29 22:45:54 +0000 |
commit | 5a5609c75317a8c011b02daf3853ebd3b6bab9fc (patch) | |
tree | 36771ec975c9332fde125464ecbe06b32d5c066c /evrpc-internal.h | |
parent | 024804cce7101c5d09bb58e85d4ca7cc83f3e44d (diff) | |
download | libevent-5a5609c75317a8c011b02daf3853ebd3b6bab9fc.tar.gz |
allow association of meta data with RPC requests for hook processing
svn:r622
Diffstat (limited to 'evrpc-internal.h')
-rw-r--r-- | evrpc-internal.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/evrpc-internal.h b/evrpc-internal.h index 74183530..bffe8a2c 100644 --- a/evrpc-internal.h +++ b/evrpc-internal.h @@ -36,7 +36,9 @@ struct evrpc; struct evrpc_hook { TAILQ_ENTRY(evrpc_hook) (next); - /* returns -1; if the rpc should be aborted, is allowed to rewrite */ + /* returns EVRPC_TERMINATE; if the rpc should be aborted. + * a hook is is allowed to rewrite the evbuffer + */ int (*process)(void *, struct evhttp_request *, struct evbuffer *, void *); void *process_arg; @@ -98,4 +100,17 @@ struct evrpc_hook_ctx { void (*cb)(void *, enum EVRPC_HOOK_RESULT); }; +struct evrpc_meta { + TAILQ_ENTRY(evrpc_meta) (next); + char *key; + + void *data; + size_t data_size; +}; + +TAILQ_HEAD(evrpc_meta_list, evrpc_meta); + +/* frees the meta data associated with a request */ +static void evrpc_meta_data_free(struct evrpc_meta_list *meta_data); + #endif /* _EVRPC_INTERNAL_H_ */ |