00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef AXIS2_OP_CTX_H
00018 #define AXIS2_OP_CTX_H
00019
00038 #include <axis2_defines.h>
00039 #include <axis2_hash.h>
00040 #include <axis2_env.h>
00041 #include <axis2_msg_ctx.h>
00042 #include <axis2_op.h>
00043
00044 #ifdef __cplusplus
00045 extern "C"
00046 {
00047 #endif
00048
00050 typedef struct axis2_op_ctx_ops axis2_op_ctx_ops_t;
00052 typedef struct axis2_op_ctx axis2_op_ctx_t;
00053
00054 struct axis2_svc_ctx;
00055
00060 struct axis2_op_ctx_ops
00061 {
00068 axis2_ctx_t *(AXIS2_CALL *
00069 get_base)(
00070 const axis2_op_ctx_t *op_ctx,
00071 const axis2_env_t *env);
00072
00079 axis2_status_t (AXIS2_CALL *
00080 free)(
00081 struct axis2_op_ctx *op_ctx,
00082 const axis2_env_t *env);
00083
00092 axis2_status_t (AXIS2_CALL *
00093 init)(
00094 struct axis2_op_ctx *op_ctx,
00095 const axis2_env_t *env,
00096 struct axis2_conf *conf);
00097
00104 struct axis2_op *(AXIS2_CALL *
00105 get_op)(
00106 const axis2_op_ctx_t *op_ctx,
00107 const axis2_env_t *env);
00108
00116 struct axis2_svc_ctx *(AXIS2_CALL *
00117 get_parent)(
00118 const axis2_op_ctx_t *op_ctx,
00119 const axis2_env_t *env);
00120
00129 axis2_status_t (AXIS2_CALL *
00130 add_msg_ctx)(
00131 struct axis2_op_ctx *op_ctx,
00132 const axis2_env_t *env,
00133 axis2_msg_ctx_t *msg_ctx);
00134
00142 axis2_msg_ctx_t *(AXIS2_CALL *
00143 get_msg_ctx)(
00144 const axis2_op_ctx_t *op_ctx,
00145 const axis2_env_t *env,
00146 const axis2_char_t *message_id);
00147
00156 axis2_bool_t (AXIS2_CALL *
00157 get_is_complete)(
00158 const axis2_op_ctx_t *op_ctx,
00159 const axis2_env_t *env);
00160
00171 axis2_status_t (AXIS2_CALL *
00172 set_complete)(
00173 struct axis2_op_ctx *op_ctx,
00174 const axis2_env_t *env,
00175 axis2_bool_t is_complete);
00176
00184 axis2_status_t (AXIS2_CALL *
00185 cleanup)(
00186 struct axis2_op_ctx *op_ctx,
00187 const axis2_env_t *env);
00188
00197 axis2_status_t (AXIS2_CALL *
00198 set_parent)(
00199 struct axis2_op_ctx *op_ctx,
00200 const axis2_env_t *env,
00201 struct axis2_svc_ctx *svc_ctx);
00202
00209 axis2_hash_t *(AXIS2_CALL *
00210 get_msg_ctx_map)(
00211 const axis2_op_ctx_t *op_ctx,
00212 const axis2_env_t *env);
00213
00214 };
00215
00219 struct axis2_op_ctx
00220 {
00222 axis2_op_ctx_ops_t *ops;
00223 };
00224
00233 AXIS2_EXTERN axis2_op_ctx_t *AXIS2_CALL
00234 axis2_op_ctx_create(
00235 const axis2_env_t *env,
00236 struct axis2_op *op,
00237 struct axis2_svc_ctx *svc_ctx);
00238
00239
00242 #define AXIS2_OP_CTX_GET_BASE(op_ctx, env) \
00243 ((op_ctx)->ops->get_base(op_ctx, env))
00244
00247 #define AXIS2_OP_CTX_FREE(op_ctx, env)\
00248 ((op_ctx)->ops->free(op_ctx, env))
00249
00252 #define AXIS2_OP_CTX_INIT(op_ctx, env, conf) \
00253 ((op_ctx)->ops->init(op_ctx, env, conf))
00254
00257 #define AXIS2_OP_CTX_GET_OP(op_ctx, env)\
00258 ((op_ctx)->ops->get_op(op_ctx, env))
00259
00262 #define AXIS2_OP_CTX_GET_PARENT(op_ctx, env) \
00263 ((op_ctx)->ops->get_parent(op_ctx, env))
00264
00267 #define AXIS2_OP_CTX_ADD_MSG_CTX(op_ctx, env, msg_ctx) \
00268 ((op_ctx)->ops->add_msg_ctx(op_ctx, env, msg_ctx))
00269
00272 #define AXIS2_OP_CTX_GET_MSG_CTX(op_ctx, env, message_id) \
00273 ((op_ctx)->ops->get_msg_ctx(op_ctx, env, message_id))
00274
00277 #define AXIS2_OP_CTX_GET_IS_COMPLETE(op_ctx, env) \
00278 ((op_ctx)->ops->get_is_complete(op_ctx, env))
00279
00282 #define AXIS2_OP_CTX_SET_IS_COMPLETE(op_ctx, env, is_complete) \
00283 ((op_ctx)->ops->set_complete(op_ctx, env, is_complete))
00284
00287 #define AXIS2_OP_CTX_CLEANUP(op_ctx, env) \
00288 ((op_ctx)->ops->cleanup(op_ctx, env))
00289
00292 #define AXIS2_OP_CTX_SET_PARENT(op_ctx, env, svc_ctx) \
00293 ((op_ctx)->ops->set_parent(op_ctx, env, svc_ctx))
00294
00297 #define AXIS2_OP_CTX_GET_MSG_CTX_MAP(op_ctx, env) \
00298 ((op_ctx)->ops->get_msg_ctx_map(op_ctx, env))
00299
00301 #ifdef __cplusplus
00302 }
00303 #endif
00304
00305 #endif