00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef AXIS2_MODULE_H
00019 #define AXIS2_MODULE_H
00020
00040 #include <axis2_const.h>
00041 #include <axutil_error.h>
00042 #include <axis2_defines.h>
00043 #include <axutil_env.h>
00044 #include <axutil_allocator.h>
00045 #include <axutil_string.h>
00046 #include <axis2_conf.h>
00047 #include <axis2_module_desc.h>
00048 #include <axutil_hash.h>
00049
00050 #ifdef __cplusplus
00051 extern "C"
00052 {
00053 #endif
00054
00056 typedef struct axis2_module_ops axis2_module_ops_t;
00057
00059 typedef struct axis2_module axis2_module_t;
00060
00061 struct axis2_conf;
00062
00063 struct axis2_module_ops
00064 {
00065
00074 axis2_status_t(
00075 AXIS2_CALL
00076 * init)(
00077 axis2_module_t * module,
00078 const axutil_env_t * env,
00079 struct axis2_conf_ctx * conf_ctx,
00080 axis2_module_desc_t * module_desc);
00081
00088 axis2_status_t(
00089 AXIS2_CALL
00090 * shutdown)(
00091 axis2_module_t * module,
00092 const axutil_env_t * env);
00093
00100 axis2_status_t(
00101 AXIS2_CALL
00102 * fill_handler_create_func_map)(
00103 axis2_module_t * module,
00104 const axutil_env_t * env);
00105
00106 };
00107
00111 struct axis2_module
00112 {
00113
00115 const axis2_module_ops_t *ops;
00116
00118 axutil_hash_t *handler_create_func_map;
00119 };
00120
00126 AXIS2_EXTERN axis2_module_t *AXIS2_CALL
00127 axis2_module_create(
00128 const axutil_env_t * env);
00129
00132 #define AXIS2_MODULE_INIT(module, env, conf_ctx, module_desc) \
00133 ((module)->ops->init (module, env, conf_ctx, module_desc))
00134
00137 #define AXIS2_MODULE_SHUTDOWN(module, env) \
00138 ((module)->ops->shutdown (module, env))
00139
00142 #define AXIS2_MODULE_FILL_HANDLER_CREATE_FUNC_MAP(module, env) \
00143 ((module)->ops->fill_handler_create_func_map (module, env))
00144
00147 #ifdef __cplusplus
00148 }
00149 #endif
00150 #endif