00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef AXIS2_SVC_GRP_CTX_H
00019 #define AXIS2_SVC_GRP_CTX_H
00020
00034 #include <axis2_defines.h>
00035 #include <axis2_env.h>
00036 #include <axis2_svc_ctx.h>
00037 #include <axis2_svc_grp.h>
00038
00039 #ifdef __cplusplus
00040 extern "C"
00041 {
00042 #endif
00043
00044 struct axis2_svc_grp;
00046 typedef struct axis2_svc_grp_ctx_ops axis2_svc_grp_ctx_ops_t;
00048 typedef struct axis2_svc_grp_ctx axis2_svc_grp_ctx_t;
00049
00050
00055 struct axis2_svc_grp_ctx_ops
00056 {
00064 axis2_ctx_t *(AXIS2_CALL *
00065 get_base)(
00066 const axis2_svc_grp_ctx_t *svc_grp_ctx,
00067 const axis2_env_t *env);
00068
00069
00077 struct axis2_conf_ctx *(AXIS2_CALL *
00078 get_parent)(
00079 const axis2_svc_grp_ctx_t *svc_grp_ctx,
00080 const axis2_env_t *env);
00081
00082
00089 axis2_status_t (AXIS2_CALL *
00090 free)(
00091 struct axis2_svc_grp_ctx *svc_grp_ctx,
00092 const axis2_env_t *env);
00093
00103 axis2_status_t (AXIS2_CALL *
00104 init)(
00105 struct axis2_svc_grp_ctx *svc_grp_ctx,
00106 const axis2_env_t *env,
00107 struct axis2_conf *conf);
00108
00115 const axis2_char_t *(AXIS2_CALL *
00116 get_id)(
00117 const axis2_svc_grp_ctx_t *svc_grp_ctx,
00118 const axis2_env_t *env);
00119
00127 axis2_status_t (AXIS2_CALL *
00128 set_id)(
00129 struct axis2_svc_grp_ctx *svc_grp_ctx,
00130 const axis2_env_t *env,
00131 const axis2_char_t *id);
00132
00140 struct axis2_svc_ctx *(AXIS2_CALL *
00141 get_svc_ctx)(
00142 const axis2_svc_grp_ctx_t *svc_grp_ctx,
00143 const axis2_env_t *env,
00144 const axis2_char_t *svc_name);
00145
00153 axis2_status_t (AXIS2_CALL *
00154 fill_svc_ctx_map)(
00155 struct axis2_svc_grp_ctx *svc_grp_ctx,
00156 const axis2_env_t *env);
00157
00165 struct axis2_svc_grp *(AXIS2_CALL *
00166 get_svc_grp)(
00167 const axis2_svc_grp_ctx_t *svc_grp_ctx,
00168 const axis2_env_t *env);
00169
00176 axis2_hash_t *(AXIS2_CALL *
00177 get_svc_ctx_map)(
00178 const axis2_svc_grp_ctx_t *svc_grp_ctx,
00179 const axis2_env_t *env);
00180 };
00181
00185 struct axis2_svc_grp_ctx
00186 {
00188 axis2_svc_grp_ctx_ops_t *ops;
00189 };
00190
00191
00202 AXIS2_EXTERN axis2_svc_grp_ctx_t *AXIS2_CALL
00203 axis2_svc_grp_ctx_create(
00204 const axis2_env_t *env,
00205 struct axis2_svc_grp *svc_grp,
00206 struct axis2_conf_ctx *conf_ctx);
00207
00208
00211 #define AXIS2_SVC_GRP_CTX_GET_BASE(svc_grp_ctx, env) \
00212 ((svc_grp_ctx)->ops->get_base(svc_grp_ctx, env))
00213
00216 #define AXIS2_SVC_GRP_CTX_GET_PARENT(svc_grp_ctx, env) \
00217 ((svc_grp_ctx)->ops->get_parent(svc_grp_ctx, env))
00218
00221 #define AXIS2_SVC_GRP_CTX_FREE(svc_grp_ctx, env)\
00222 ((svc_grp_ctx)->ops->free(svc_grp_ctx, env))
00223
00226 #define AXIS2_SVC_GRP_CTX_INIT(svc_grp_ctx, env, conf)\
00227 ((svc_grp_ctx)->ops->init(svc_grp_ctx, env, conf))
00228
00231 #define AXIS2_SVC_GRP_CTX_GET_ID(svc_grp_ctx, env) \
00232 ((svc_grp_ctx)->ops->get_id(svc_grp_ctx, env))
00233
00236 #define AXIS2_SVC_GRP_CTX_SET_ID(svc_grp_ctx, env, id) \
00237 ((svc_grp_ctx)->ops->set_id(svc_grp_ctx, env, id))
00238
00241 #define AXIS2_SVC_GRP_CTX_GET_SVC_CTX(svc_grp_ctx, env, svc_name) \
00242 ((svc_grp_ctx)->ops->get_svc_ctx(svc_grp_ctx, env, svc_name))
00243
00246 #define AXIS2_SVC_GRP_CTX_FILL_SVC_CTX_MAP(svc_grp_ctx, env) \
00247 ((svc_grp_ctx)->ops->fill_svc_ctx_map(svc_grp_ctx, env))
00248
00251 #define AXIS2_SVC_GRP_GET_SVC_GRP(svc_grp_ctx, env) \
00252 ((svc_grp_ctx)->ops->get_svc_grp(svc_grp_ctx, env))
00253
00256 #define AXIS2_SVC_GRP_GET_SVC_CTX_MAP(svc_grp_ctx, env) \
00257 ((svc_grp_ctx)->ops->get_svc_ctx_map(svc_grp_ctx, env))
00258
00260 #ifdef __cplusplus
00261 }
00262 #endif
00263
00264 #endif