hookprv.h
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 #ifndef ENABLE_HOOKS
00020 #define hook_call( func, ... )
00021 #else
00022 #define hook_call( func, ... ) \
00023 do { if(ctx && ctx->hook && ctx->hook->func) \
00024 ctx->hook->func( __VA_ARGS__ ); \
00025 } while(0)
00026
00027 struct hook_s
00028 {
00029
00030 hook_server_init_t server_init;
00031 hook_server_term_t server_term;
00032
00033
00034 hook_child_init_t child_init;
00035 hook_child_term_t child_term;
00036
00037
00038 hook_request_t request;
00039
00040
00041 hook_server_loop_t server_loop;
00042 };
00043
00044 #endif
00045
00046 #ifdef __cplusplus
00047 }
00048 #endif
00049
00050 #endif
00051