00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef AXIS2_OP_CTX_H
00019 #define AXIS2_OP_CTX_H
00020
00039 #include <axis2_defines.h>
00040 #include <axis2_hash.h>
00041 #include <axis2_env.h>
00042 #include <axis2_msg_ctx.h>
00043 #include <axis2_op.h>
00044
00045 #ifdef __cplusplus
00046 extern "C"
00047 {
00048 #endif
00049
00051 typedef struct axis2_op_ctx_ops axis2_op_ctx_ops_t;
00053 typedef struct axis2_op_ctx axis2_op_ctx_t;
00054
00055 struct axis2_svc_ctx;
00056
00061 struct axis2_op_ctx_ops
00062 {
00069 axis2_ctx_t *(AXIS2_CALL *
00070 get_base)(
00071 const axis2_op_ctx_t *op_ctx,
00072 const axis2_env_t *env);
00073
00080 axis2_status_t (AXIS2_CALL *
00081 free)(
00082 struct axis2_op_ctx *op_ctx,
00083 const axis2_env_t *env);
00084
00093 axis2_status_t (AXIS2_CALL *
00094 init)(
00095 struct axis2_op_ctx *op_ctx,
00096 const axis2_env_t *env,
00097 struct axis2_conf *conf);
00098
00105 struct axis2_op *(AXIS2_CALL *
00106 get_op)(
00107 const axis2_op_ctx_t *op_ctx,
00108 const axis2_env_t *env);
00109
00117 struct axis2_svc_ctx *(AXIS2_CALL *
00118 get_parent)(
00119 const axis2_op_ctx_t *op_ctx,
00120 const axis2_env_t *env);
00121
00130 axis2_status_t (AXIS2_CALL *
00131 add_msg_ctx)(
00132 struct axis2_op_ctx *op_ctx,
00133 const axis2_env_t *env,
00134 axis2_msg_ctx_t *msg_ctx);
00135
00143 axis2_msg_ctx_t *(AXIS2_CALL *
00144 get_msg_ctx)(
00145 const axis2_op_ctx_t *op_ctx,
00146 const axis2_env_t *env,
00147 const axis2_char_t *message_id);
00148
00157 axis2_bool_t (AXIS2_CALL *
00158 get_is_complete)(
00159 const axis2_op_ctx_t *op_ctx,
00160 const axis2_env_t *env);
00161
00172 axis2_status_t (AXIS2_CALL *
00173 set_complete)(
00174 struct axis2_op_ctx *op_ctx,
00175 const axis2_env_t *env,
00176 axis2_bool_t is_complete);
00177
00185 axis2_status_t (AXIS2_CALL *
00186 cleanup)(
00187 struct axis2_op_ctx *op_ctx,
00188 const axis2_env_t *env);
00189
00198 axis2_status_t (AXIS2_CALL *
00199 set_parent)(
00200 struct axis2_op_ctx *op_ctx,
00201 const axis2_env_t *env,
00202 struct axis2_svc_ctx *svc_ctx);
00203
00210 axis2_hash_t *(AXIS2_CALL *
00211 get_msg_ctx_map)(
00212 const axis2_op_ctx_t *op_ctx,
00213 const axis2_env_t *env);
00214
00215 };
00216
00220 struct axis2_op_ctx
00221 {
00223 axis2_op_ctx_ops_t *ops;
00224 };
00225
00234 AXIS2_EXTERN axis2_op_ctx_t *AXIS2_CALL
00235 axis2_op_ctx_create(
00236 const axis2_env_t *env,
00237 struct axis2_op *op,
00238 struct axis2_svc_ctx *svc_ctx);
00239
00240
00243 #define AXIS2_OP_CTX_GET_BASE(op_ctx, env) \
00244 ((op_ctx)->ops->get_base(op_ctx, env))
00245
00248 #define AXIS2_OP_CTX_FREE(op_ctx, env)\
00249 ((op_ctx)->ops->free(op_ctx, env))
00250
00253 #define AXIS2_OP_CTX_INIT(op_ctx, env, conf) \
00254 ((op_ctx)->ops->init(op_ctx, env, conf))
00255
00258 #define AXIS2_OP_CTX_GET_OP(op_ctx, env)\
00259 ((op_ctx)->ops->get_op(op_ctx, env))
00260
00263 #define AXIS2_OP_CTX_GET_PARENT(op_ctx, env) \
00264 ((op_ctx)->ops->get_parent(op_ctx, env))
00265
00268 #define AXIS2_OP_CTX_ADD_MSG_CTX(op_ctx, env, msg_ctx) \
00269 ((op_ctx)->ops->add_msg_ctx(op_ctx, env, msg_ctx))
00270
00273 #define AXIS2_OP_CTX_GET_MSG_CTX(op_ctx, env, message_id) \
00274 ((op_ctx)->ops->get_msg_ctx(op_ctx, env, message_id))
00275
00278 #define AXIS2_OP_CTX_GET_IS_COMPLETE(op_ctx, env) \
00279 ((op_ctx)->ops->get_is_complete(op_ctx, env))
00280
00283 #define AXIS2_OP_CTX_SET_IS_COMPLETE(op_ctx, env, is_complete) \
00284 ((op_ctx)->ops->set_complete(op_ctx, env, is_complete))
00285
00288 #define AXIS2_OP_CTX_CLEANUP(op_ctx, env) \
00289 ((op_ctx)->ops->cleanup(op_ctx, env))
00290
00293 #define AXIS2_OP_CTX_SET_PARENT(op_ctx, env, svc_ctx) \
00294 ((op_ctx)->ops->set_parent(op_ctx, env, svc_ctx))
00295
00298 #define AXIS2_OP_CTX_GET_MSG_CTX_MAP(op_ctx, env) \
00299 ((op_ctx)->ops->get_msg_ctx_map(op_ctx, env))
00300
00302 #ifdef __cplusplus
00303 }
00304 #endif
00305
00306 #endif