00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef AXIS2_SVC_CTX_H
00019 #define AXIS2_SVC_CTX_H
00020
00034 #include <axis2_defines.h>
00035 #include <axis2_env.h>
00036 #include <axis2_op_ctx.h>
00037
00038 #ifdef __cplusplus
00039 extern "C"
00040 {
00041 #endif
00042
00043
00045 typedef struct axis2_svc_ctx_ops axis2_svc_ctx_ops_t;
00047 typedef struct axis2_svc_ctx axis2_svc_ctx_t;
00048
00049
00054 struct axis2_svc_ctx_ops
00055 {
00062 axis2_ctx_t *(AXIS2_CALL *
00063 get_base)(
00064 const axis2_svc_ctx_t *svc_ctx,
00065 const axis2_env_t *env);
00066
00067
00074 struct axis2_svc_grp_ctx *(AXIS2_CALL *
00075 get_parent)(
00076 const axis2_svc_ctx_t *svc_ctx,
00077 const axis2_env_t *env);
00078
00079
00086 axis2_status_t (AXIS2_CALL *
00087 free)(
00088 struct axis2_svc_ctx *svc_ctx,
00089 const axis2_env_t *env);
00090
00091
00101 axis2_status_t (AXIS2_CALL *
00102 init)(
00103 struct axis2_svc_ctx *svc_ctx,
00104 const axis2_env_t *env,
00105 struct axis2_conf *conf);
00106
00114 const axis2_char_t *(AXIS2_CALL *
00115 get_svc_id)(
00116 const axis2_svc_ctx_t *svc_ctx,
00117 const axis2_env_t *env);
00118
00119
00126 struct axis2_svc *(AXIS2_CALL *
00127 get_svc)(
00128 const axis2_svc_ctx_t *svc_ctx,
00129 const axis2_env_t *env);
00130
00139 axis2_status_t (AXIS2_CALL *
00140 set_svc)(
00141 axis2_svc_ctx_t *svc_ctx,
00142 const axis2_env_t *env,
00143 struct axis2_svc *svc);
00144
00145
00153 struct axis2_conf_ctx *(AXIS2_CALL *
00154 get_conf_ctx)(
00155 const axis2_svc_ctx_t *svc_ctx,
00156 const axis2_env_t *env);
00157
00158
00168 struct axis2_op_ctx *(AXIS2_CALL *
00169 create_op_ctx)(
00170 struct axis2_svc_ctx *svc_ctx,
00171 const axis2_env_t *env,
00172 const axis2_qname_t *qname);
00173 };
00174
00178 struct axis2_svc_ctx
00179 {
00181 axis2_svc_ctx_ops_t *ops;
00182 };
00183
00195 AXIS2_EXTERN axis2_svc_ctx_t *AXIS2_CALL
00196 axis2_svc_ctx_create(
00197 const axis2_env_t *env,
00198 struct axis2_svc *svc,
00199 struct axis2_svc_grp_ctx *svc_grp_ctx);
00200
00201
00204 #define AXIS2_SVC_CTX_GET_BASE(svc_ctx, env) \
00205 ((svc_ctx)->ops->get_base(svc_ctx, env))
00206
00209 #define AXIS2_SVC_CTX_GET_PARENT(svc_ctx, env) \
00210 ((svc_ctx)->ops->get_parent(svc_ctx, env))
00211
00214 #define AXIS2_SVC_CTX_FREE(svc_ctx, env) \
00215 ((svc_ctx)->ops->free(svc_ctx, env))
00216
00219 #define AXIS2_SVC_CTX_INIT(svc_ctx, env, conf) \
00220 ((svc_ctx)->ops->init(svc_ctx, env, conf))
00221
00224 #define AXIS2_SVC_CTX_GET_SVC_ID(svc_ctx, env) \
00225 ((svc_ctx)->ops->get_svc_id(svc_ctx, env))
00226
00229 #define AXIS2_SVC_CTX_GET_SVC(svc_ctx, env) \
00230 ((svc_ctx)->ops->get_svc(svc_ctx, env))
00231
00234 #define AXIS2_SVC_CTX_SET_SVC(svc_ctx, env, svc) \
00235 ((svc_ctx)->ops->set_svc(svc_ctx, env, svc))
00236
00239 #define AXIS2_SVC_CTX_GET_CONF_CTX(svc_ctx, env) \
00240 ((svc_ctx)->ops->get_conf_ctx(svc_ctx, env))
00241
00244 #define AXIS2_SVC_CTX_CREATE_OP_CTX(svc_ctx, env, qname) \
00245 ((svc_ctx)->ops->create_op_ctx(svc_ctx, env, qname))
00246
00248 #ifdef __cplusplus
00249 }
00250 #endif
00251
00252 #endif