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
00020
00026 #include <axis2_defines.h>
00027 #include <axis2_hash.h>
00028 #include <axis2_env.h>
00029 #include <axis2_msg_ctx.h>
00030 #include <axis2_op.h>
00031
00032 #ifdef __cplusplus
00033 extern "C"
00034 {
00035 #endif
00036
00054 typedef struct axis2_op_ctx_ops axis2_op_ctx_ops_t;
00055 typedef struct axis2_op_ctx axis2_op_ctx_t;
00056 struct axis2_svc_ctx;
00057
00062 struct axis2_op_ctx_ops
00063 {
00064 axis2_ctx_t* (AXIS2_CALL *
00065 get_base)(struct axis2_op_ctx *op_ctx,
00066 const axis2_env_t *env);
00067
00068 axis2_status_t (AXIS2_CALL *
00069 free)(struct axis2_op_ctx *op_ctx,
00070 const axis2_env_t *env);
00071
00075 axis2_status_t (AXIS2_CALL *
00076 init)(struct axis2_op_ctx *op_ctx,
00077 const axis2_env_t *env,
00078 struct axis2_conf *conf);
00079
00083 struct axis2_op* (AXIS2_CALL *
00084 get_op)(struct axis2_op_ctx *op_ctx,
00085 const axis2_env_t *env);
00086
00092 struct axis2_svc_ctx* (AXIS2_CALL *
00093 get_parent)(struct axis2_op_ctx *op_ctx,
00094 const axis2_env_t *env);
00095
00104 axis2_status_t (AXIS2_CALL *
00105 add_msg_ctx)(struct axis2_op_ctx *op_ctx,
00106 const axis2_env_t *env,
00107 axis2_msg_ctx_t *msg_ctx);
00108
00114 axis2_msg_ctx_t* (AXIS2_CALL *
00115 get_msg_ctx)(struct axis2_op_ctx *op_ctx,
00116 const axis2_env_t *env,
00117 const axis2_char_t *message_id);
00118
00124 axis2_bool_t (AXIS2_CALL *
00125 get_is_complete)(struct axis2_op_ctx *op_ctx,
00126 const axis2_env_t *env);
00127
00128 axis2_status_t (AXIS2_CALL *
00129 set_complete)(struct axis2_op_ctx *op_ctx,
00130 const axis2_env_t *env,
00131 axis2_bool_t is_complete);
00132
00143 axis2_status_t (AXIS2_CALL *
00144 cleanup)(struct axis2_op_ctx *op_ctx,
00145 const axis2_env_t *env);
00146
00147 axis2_status_t (AXIS2_CALL *
00148 set_parent)(struct axis2_op_ctx *op_ctx,
00149 const axis2_env_t *env,
00150 struct axis2_svc_ctx *svc_ctx);
00151
00152 axis2_hash_t* (AXIS2_CALL *
00153 get_msg_ctx_map)(struct axis2_op_ctx *op_ctx,
00154 const axis2_env_t *env);
00155
00156 };
00157
00162 struct axis2_op_ctx
00163 {
00164 axis2_op_ctx_ops_t *ops;
00165 };
00166
00167 AXIS2_EXTERN axis2_op_ctx_t* AXIS2_CALL
00168 axis2_op_ctx_create(const axis2_env_t *env,
00169 struct axis2_op *op,
00170 struct axis2_svc_ctx * svc_ctx);
00171
00172
00173 #define AXIS2_OP_CTX_GET_BASE(op_ctx, env) \
00174 ((op_ctx)->ops->get_base(op_ctx, env))
00175
00176 #define AXIS2_OP_CTX_FREE(op_ctx, env)\
00177 ((op_ctx)->ops->free(op_ctx, env))
00178
00179 #define AXIS2_OP_CTX_INIT(op_ctx, env, conf) \
00180 ((op_ctx)->ops->init(op_ctx, env, conf))
00181
00182 #define AXIS2_OP_CTX_GET_OP(op_ctx, env)\
00183 ((op_ctx)->ops->get_op(op_ctx, env))
00184 #define AXIS2_OP_CTX_GET_PARENT(op_ctx, env) \
00185 ((op_ctx)->ops->get_parent(op_ctx, env))
00186
00187 #define AXIS2_OP_CTX_ADD_MSG_CTX(op_ctx, env, msg_ctx) \
00188 ((op_ctx)->ops->add_msg_ctx(op_ctx, env, msg_ctx))
00189
00190 #define AXIS2_OP_CTX_GET_MSG_CTX(op_ctx, env, message_id) \
00191 ((op_ctx)->ops->get_msg_ctx(op_ctx, env, message_id))
00192
00193 #define AXIS2_OP_CTX_GET_IS_COMPLETE(op_ctx, env) \
00194 ((op_ctx)->ops->get_is_complete(op_ctx, env))
00195
00196 #define AXIS2_OP_CTX_SET_IS_COMPLETE(op_ctx, env, is_complete) \
00197 ((op_ctx)->ops->set_complete(op_ctx, env, is_complete))
00198
00199 #define AXIS2_OP_CTX_CLEANUP(op_ctx, env) \
00200 ((op_ctx)->ops->cleanup(op_ctx, env))
00201
00202 #define AXIS2_OP_CTX_SET_PARENT(op_ctx, env, svc_ctx) \
00203 ((op_ctx)->ops->set_parent(op_ctx, env, svc_ctx))
00204
00205 #define AXIS2_OP_CTX_GET_MSG_CTX_MAP(op_ctx, env) \
00206 ((op_ctx)->ops->get_msg_ctx_map(op_ctx, env))
00207
00208
00209
00211 #ifdef __cplusplus
00212 }
00213 #endif
00214
00215 #endif