00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef AXIS2_SVC_CTX_H
00018 #define AXIS2_SVC_CTX_H
00019
00033 #include <axis2_defines.h>
00034 #include <axis2_env.h>
00035 #include <axis2_op_ctx.h>
00036
00037 #ifdef __cplusplus
00038 extern "C"
00039 {
00040 #endif
00041
00042
00044 typedef struct axis2_svc_ctx_ops axis2_svc_ctx_ops_t;
00046 typedef struct axis2_svc_ctx axis2_svc_ctx_t;
00047
00048
00053 struct axis2_svc_ctx_ops
00054 {
00061 axis2_ctx_t *(AXIS2_CALL *
00062 get_base)(
00063 const axis2_svc_ctx_t *svc_ctx,
00064 const axis2_env_t *env);
00065
00066
00073 struct axis2_svc_grp_ctx *(AXIS2_CALL *
00074 get_parent)(
00075 const axis2_svc_ctx_t *svc_ctx,
00076 const axis2_env_t *env);
00077
00078
00085 axis2_status_t (AXIS2_CALL *
00086 free)(
00087 struct axis2_svc_ctx *svc_ctx,
00088 const axis2_env_t *env);
00089
00090
00100 axis2_status_t (AXIS2_CALL *
00101 init)(
00102 struct axis2_svc_ctx *svc_ctx,
00103 const axis2_env_t *env,
00104 struct axis2_conf *conf);
00105
00113 const axis2_char_t *(AXIS2_CALL *
00114 get_svc_id)(
00115 const axis2_svc_ctx_t *svc_ctx,
00116 const axis2_env_t *env);
00117
00118
00125 struct axis2_svc *(AXIS2_CALL *
00126 get_svc)(
00127 const axis2_svc_ctx_t *svc_ctx,
00128 const axis2_env_t *env);
00129
00138 axis2_status_t (AXIS2_CALL *
00139 set_svc)(
00140 axis2_svc_ctx_t *svc_ctx,
00141 const axis2_env_t *env,
00142 struct axis2_svc *svc);
00143
00144
00152 struct axis2_conf_ctx *(AXIS2_CALL *
00153 get_conf_ctx)(
00154 const axis2_svc_ctx_t *svc_ctx,
00155 const axis2_env_t *env);
00156
00157
00167 struct axis2_op_ctx *(AXIS2_CALL *
00168 create_op_ctx)(
00169 struct axis2_svc_ctx *svc_ctx,
00170 const axis2_env_t *env,
00171 const axis2_qname_t *qname);
00172 };
00173
00177 struct axis2_svc_ctx
00178 {
00180 axis2_svc_ctx_ops_t *ops;
00181 };
00182
00194 AXIS2_EXTERN axis2_svc_ctx_t *AXIS2_CALL
00195 axis2_svc_ctx_create(
00196 const axis2_env_t *env,
00197 struct axis2_svc *svc,
00198 struct axis2_svc_grp_ctx *svc_grp_ctx);
00199
00200
00203 #define AXIS2_SVC_CTX_GET_BASE(svc_ctx, env) \
00204 ((svc_ctx)->ops->get_base(svc_ctx, env))
00205
00208 #define AXIS2_SVC_CTX_GET_PARENT(svc_ctx, env) \
00209 ((svc_ctx)->ops->get_parent(svc_ctx, env))
00210
00213 #define AXIS2_SVC_CTX_FREE(svc_ctx, env) \
00214 ((svc_ctx)->ops->free(svc_ctx, env))
00215
00218 #define AXIS2_SVC_CTX_INIT(svc_ctx, env, conf) \
00219 ((svc_ctx)->ops->init(svc_ctx, env, conf))
00220
00223 #define AXIS2_SVC_CTX_GET_SVC_ID(svc_ctx, env) \
00224 ((svc_ctx)->ops->get_svc_id(svc_ctx, env))
00225
00228 #define AXIS2_SVC_CTX_GET_SVC(svc_ctx, env) \
00229 ((svc_ctx)->ops->get_svc(svc_ctx, env))
00230
00233 #define AXIS2_SVC_CTX_SET_SVC(svc_ctx, env, svc) \
00234 ((svc_ctx)->ops->set_svc(svc_ctx, env, svc))
00235
00238 #define AXIS2_SVC_CTX_GET_CONF_CTX(svc_ctx, env) \
00239 ((svc_ctx)->ops->get_conf_ctx(svc_ctx, env))
00240
00243 #define AXIS2_SVC_CTX_CREATE_OP_CTX(svc_ctx, env, qname) \
00244 ((svc_ctx)->ops->create_op_ctx(svc_ctx, env, qname))
00245
00247 #ifdef __cplusplus
00248 }
00249 #endif
00250
00251 #endif