00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef _KLONE_HOOK_PRV_H_
00012 #define _KLONE_HOOK_PRV_H_
00013 #include <klone/hook.h>
00014
00015 #ifdef __cplusplus
00016 extern "C" {
00017 #endif
00018
00019 #define hook_call( func, ... ) \
00020 do { if(ctx && ctx->hook && ctx->hook->func) \
00021 ctx->hook->func( __VA_ARGS__ ); \
00022 } while(0)
00023
00024 struct hook_s
00025 {
00026
00027 hook_server_init_t server_init;
00028 hook_server_term_t server_term;
00029
00030
00031 hook_child_init_t child_init;
00032 hook_child_term_t child_term;
00033
00034
00035 hook_request_t request;
00036 };
00037
00038 #ifdef __cplusplus
00039 }
00040 #endif
00041
00042 #endif
00043