00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef AXIS2_MODULE_H
00018 #define AXIS2_MODULE_H
00019
00039 #include <axis2_const.h>
00040 #include <axutil_error.h>
00041 #include <axis2_defines.h>
00042 #include <axutil_env.h>
00043 #include <axutil_allocator.h>
00044 #include <axutil_string.h>
00045 #include <axis2_conf.h>
00046 #include <axis2_module_desc.h>
00047 #include <axutil_hash.h>
00048
00049
00050 #ifdef __cplusplus
00051 extern "C"
00052 {
00053 #endif
00054
00056 typedef struct axis2_module_ops axis2_module_ops_t;
00058 typedef struct axis2_module axis2_module_t;
00059
00060 struct axis2_conf;
00061
00062 struct axis2_module_ops
00063 {
00072 axis2_status_t (AXIS2_CALL *
00073 init) (
00074 axis2_module_t *module,
00075 const axutil_env_t *env,
00076 struct axis2_conf_ctx *conf_ctx,
00077 axis2_module_desc_t *module_desc);
00078
00085 axis2_status_t (AXIS2_CALL *
00086 shutdown)(
00087 axis2_module_t *module,
00088 const axutil_env_t *env);
00089
00096 axis2_status_t (AXIS2_CALL *
00097 fill_handler_create_func_map)(
00098 axis2_module_t *module,
00099 const axutil_env_t *env);
00100
00101
00102 };
00103
00107 struct axis2_module
00108 {
00110 const axis2_module_ops_t *ops;
00112 axutil_hash_t *handler_create_func_map;
00113 };
00114
00120 AXIS2_EXTERN axis2_module_t * AXIS2_CALL
00121 axis2_module_create (
00122 const axutil_env_t *env);
00123
00126 #define AXIS2_MODULE_INIT(module, env, conf_ctx, module_desc) \
00127 ((module)->ops->init (module, env, conf_ctx, module_desc))
00128
00131 #define AXIS2_MODULE_SHUTDOWN(module, env) \
00132 ((module)->ops->shutdown (module, env))
00133
00136 #define AXIS2_MODULE_FILL_HANDLER_CREATE_FUNC_MAP(module, env) \
00137 ((module)->ops->fill_handler_create_func_map (module, env))
00138
00141 #ifdef __cplusplus
00142 }
00143 #endif
00144 #endif