00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef AXIS2_CONF_CTX_H
00019 #define AXIS2_CONF_CTX_H
00020
00036 #include <axis2_defines.h>
00037 #include <axis2_hash.h>
00038 #include <axis2_env.h>
00039 #include <axis2_ctx.h>
00040 #include <axis2_svc_grp_ctx.h>
00041
00042 #ifdef __cplusplus
00043 extern "C"
00044 {
00045 #endif
00046
00047
00049 typedef struct axis2_conf_ctx_ops axis2_conf_ctx_ops_t;
00051 typedef struct axis2_conf_ctx axis2_conf_ctx_t;
00052 struct axis2_conf;
00053
00058 struct axis2_conf_ctx_ops
00059 {
00067 axis2_status_t (AXIS2_CALL *
00068 set_conf)(
00069 axis2_conf_ctx_t *conf_ctx,
00070 const axis2_env_t *env,
00071 struct axis2_conf *conf);
00079 axis2_ctx_t *(AXIS2_CALL *
00080 get_base)(
00081 const axis2_conf_ctx_t *conf_ctx,
00082 const axis2_env_t *env);
00083
00091 axis2_conf_t *(AXIS2_CALL *
00092 get_conf)(
00093 const axis2_conf_ctx_t *conf_ctx,
00094 const axis2_env_t *env);
00095
00102 axis2_hash_t *(AXIS2_CALL *
00103 get_op_ctx_map)(
00104 const axis2_conf_ctx_t *conf_ctx,
00105 const axis2_env_t *env);
00106
00113 axis2_hash_t *(AXIS2_CALL *
00114 get_svc_ctx_map)(
00115 const axis2_conf_ctx_t *conf_ctx,
00116 const axis2_env_t *env);
00117
00124 axis2_hash_t *(AXIS2_CALL *
00125 get_svc_grp_ctx_map)(
00126 const axis2_conf_ctx_t *conf_ctx,
00127 const axis2_env_t *env);
00128
00138 axis2_status_t (AXIS2_CALL *
00139 register_op_ctx)(
00140 axis2_conf_ctx_t *conf_ctx,
00141 const axis2_env_t *env,
00142 const axis2_char_t *message_id,
00143 axis2_op_ctx_t *op_ctx);
00144
00152 axis2_op_ctx_t *(AXIS2_CALL *
00153 get_op_ctx)(
00154 const axis2_conf_ctx_t *conf_ctx,
00155 const axis2_env_t *env,
00156 const axis2_char_t *message_id);
00157
00166 axis2_status_t (AXIS2_CALL *
00167 register_svc_ctx)(
00168 axis2_conf_ctx_t *conf_ctx,
00169 const axis2_env_t *env,
00170 const axis2_char_t *svc_id,
00171 axis2_svc_ctx_t *svc_ctx);
00172
00180 struct axis2_svc_ctx *(AXIS2_CALL *
00181 get_svc_ctx)(
00182 const axis2_conf_ctx_t *conf_ctx,
00183 const axis2_env_t *env,
00184 const axis2_char_t *svc_id);
00185
00194 axis2_status_t (AXIS2_CALL *
00195 register_svc_grp_ctx)(
00196 axis2_conf_ctx_t *conf_ctx,
00197 const axis2_env_t *env,
00198 const axis2_char_t *svc_grp_id,
00199 axis2_svc_grp_ctx_t *svc_grp_ctx);
00200
00208 axis2_svc_grp_ctx_t *(AXIS2_CALL *
00209 get_svc_grp_ctx)(
00210 const axis2_conf_ctx_t *conf_ctx,
00211 const axis2_env_t *env,
00212 const axis2_char_t *svc_grp_id);
00213
00222 const axis2_char_t *(AXIS2_CALL *
00223 get_root_dir)(
00224 const axis2_conf_ctx_t *conf_ctx,
00225 const axis2_env_t *env);
00226
00236 axis2_status_t (AXIS2_CALL *
00237 set_root_dir)(
00238 axis2_conf_ctx_t *conf_ctx,
00239 const axis2_env_t *env,
00240 const axis2_char_t *path);
00241
00251 axis2_status_t (AXIS2_CALL *
00252 init)(
00253 axis2_conf_ctx_t *conf_ctx,
00254 const axis2_env_t *env,
00255 axis2_conf_t *conf);
00256
00263 axis2_status_t (AXIS2_CALL *
00264 free)(
00265 axis2_conf_ctx_t *conf_ctx,
00266 const axis2_env_t *env);
00267
00280 axis2_svc_grp_ctx_t *(AXIS2_CALL *
00281 fill_ctxs)(
00282 axis2_conf_ctx_t *conf_ctx,
00283 const axis2_env_t *env,
00284 axis2_msg_ctx_t *msg_ctx);
00285 };
00286
00290 struct axis2_conf_ctx
00291 {
00293 axis2_conf_ctx_ops_t *ops;
00294 };
00295
00303 AXIS2_EXTERN axis2_conf_ctx_t *AXIS2_CALL
00304 axis2_conf_ctx_create(
00305 const axis2_env_t *env,
00306 struct axis2_conf *conf);
00307
00310 #define AXIS2_CONF_CTX_SET_CONF(conf_ctx, env, conf) \
00311 ((conf_ctx)->ops->set_conf(conf_ctx, env, conf))
00312
00315 #define AXIS2_CONF_CTX_GET_BASE(conf_ctx, env) \
00316 ((conf_ctx)->ops->get_base(conf_ctx, env))
00317
00320 #define AXIS2_CONF_CTX_GET_CONF(conf_ctx, env) \
00321 ((conf_ctx)->ops->get_conf(conf_ctx, env))
00322
00325 #define AXIS2_CONF_CTX_GET_OP_CTX_MAP(conf_ctx, env) \
00326 ((conf_ctx)->ops->get_op_ctx_map(conf_ctx, env))
00327
00330 #define AXIS2_CONF_CTX_GET_SVC_CTX_MAP(conf_ctx, env) \
00331 ((conf_ctx)->ops->get_svc_ctx_map(conf_ctx, env))
00332
00335 #define AXIS2_CONF_CTX_GET_SVC_GRP_CTX_MAP(conf_ctx, env) \
00336 ((conf_ctx)->ops->get_svc_grp_ctx_map(conf_ctx, env))
00337
00340 #define AXIS2_CONF_CTX_REGISTER_OP_CTX(conf_ctx, env, message_id, op_ctx) \
00341 ((conf_ctx)->ops->register_op_ctx(conf_ctx, env, message_id, op_ctx))
00342
00345 #define AXIS2_CONF_CTX_GET_OP_CTX(conf_ctx, env, message_id) \
00346 ((conf_ctx)->ops->get_op_ctx(conf_ctx, env, message_id))
00347
00350 #define AXIS2_CONF_CTX_REGISTER_SVC_CTX(conf_ctx, env, svc_id, svc_ctx) \
00351 ((conf_ctx)->ops->register_svc_ctx(conf_ctx, env, svc_id, svc_ctx))
00352
00355 #define AXIS2_CONF_CTX_GET_SVC_CTX(conf_ctx, env, svc_id) \
00356 ((conf_ctx)->ops->get_svc_ctx(conf_ctx, env, svc_id))
00357
00360 #define AXIS2_CONF_CTX_REGISTER_SVC_GRP_CTX(conf_ctx, env, svc_grp_id, svc_grp_ctx) \
00361 ((conf_ctx)->ops->register_svc_grp_ctx(conf_ctx, env, svc_grp_id, svc_grp_ctx))
00362
00365 #define AXIS2_CONF_CTX_GET_SVC_GRP_CTX(conf_ctx, env, svc_grp_id) \
00366 ((conf_ctx)->ops->get_svc_grp_ctx(conf_ctx, env, svc_grp_id))
00367
00370 #define AXIS2_CONF_CTX_GET_ROOT_DIR(conf_ctx, env) \
00371 ((conf_ctx)->ops->get_root_dir(conf_ctx, env))
00372
00375 #define AXIS2_CONF_CTX_SET_ROOT_DIR(conf_ctx, env, path) \
00376 ((conf_ctx)->ops->set_root_dir(conf_ctx, env, path))
00377
00380 #define AXIS2_CONF_CTX_INIT(conf_ctx, env, conf) \
00381 ((conf_ctx)->ops->init(conf_ctx, env, conf))
00382
00385 #define AXIS2_CONF_CTX_FREE(conf_ctx, env) \
00386 ((conf_ctx)->ops->free(conf_ctx, env))
00387
00391 #define AXIS2_CONF_CTX_FILL_CTXS(conf_ctx, env, msg_ctx) \
00392 ((conf_ctx)->ops->fill_ctxs(conf_ctx, env, msg_ctx))
00393
00395 #ifdef __cplusplus
00396 }
00397 #endif
00398
00399 #endif