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
00020
00026 #include <axis2_defines.h>
00027 #include <axis2_env.h>
00028 #include <axis2_op_ctx.h>
00029
00030 #ifdef __cplusplus
00031 extern "C"
00032 {
00033 #endif
00034
00040 typedef struct axis2_svc_ctx_ops axis2_svc_ctx_ops_t;
00041 typedef struct axis2_svc_ctx axis2_svc_ctx_t;
00042
00043
00048 struct axis2_svc_ctx_ops
00049 {
00050 axis2_ctx_t* (AXIS2_CALL *
00051 get_base)(struct axis2_svc_ctx *svc_ctx,
00052 const axis2_env_t *env);
00053
00054
00055 struct axis2_svc_grp_ctx* (AXIS2_CALL *
00056 get_parent)(struct axis2_svc_ctx *svc_ctx,
00057 const axis2_env_t *env);
00058
00059
00060 axis2_status_t (AXIS2_CALL *
00061 free)(struct axis2_svc_ctx *svc_ctx,
00062 const axis2_env_t *env);
00063
00064
00068 axis2_status_t (AXIS2_CALL *
00069 init)(struct axis2_svc_ctx *svc_ctx,
00070 const axis2_env_t *env,
00071 struct axis2_conf *conf);
00072
00073
00077 axis2_char_t* (AXIS2_CALL *
00078 get_svc_id)(const struct axis2_svc_ctx *svc_ctx,
00079 const axis2_env_t *env);
00080
00081
00082 struct axis2_svc* (AXIS2_CALL *
00083 get_svc)(struct axis2_svc_ctx *svc_ctx,
00084 const axis2_env_t *env);
00085
00086 axis2_status_t (AXIS2_CALL *
00087 set_svc) (axis2_svc_ctx_t *svc_ctx,
00088 const axis2_env_t *env,
00089 struct axis2_svc *svc);
00090
00091
00092 struct axis2_conf_ctx* (AXIS2_CALL *
00093 get_conf_ctx)(struct axis2_svc_ctx *svc_ctx,
00094 const axis2_env_t *env);
00095
00096
00097 struct axis2_op_ctx* (AXIS2_CALL *
00098 create_op_ctx)(struct axis2_svc_ctx *svc_ctx,
00099 const axis2_env_t *env,
00100 axis2_qname_t *qname);
00101 };
00102
00107 struct axis2_svc_ctx
00108 {
00109 axis2_svc_ctx_ops_t *ops;
00110 };
00111
00112 AXIS2_EXTERN axis2_svc_ctx_t* AXIS2_CALL axis2_svc_ctx_create(const axis2_env_t *env,
00113 struct axis2_svc *svc,
00114 struct axis2_svc_grp_ctx *svc_grp_ctx);
00115
00116
00117
00118 #define AXIS2_SVC_CTX_GET_BASE(svc_ctx, env) \
00119 ((svc_ctx)->ops->get_base(svc_ctx, env))
00120
00121 #define AXIS2_SVC_CTX_GET_PARENT(svc_ctx, env) \
00122 ((svc_ctx)->ops->get_parent(svc_ctx, env))
00123
00124 #define AXIS2_SVC_CTX_FREE(svc_ctx, env) \
00125 ((svc_ctx)->ops->free(svc_ctx, env))
00126
00127 #define AXIS2_SVC_CTX_INIT(svc_ctx, env, conf) \
00128 ((svc_ctx)->ops->init(svc_ctx, env, conf))
00129
00130 #define AXIS2_SVC_CTX_GET_SVC_ID(svc_ctx, env) \
00131 ((svc_ctx)->ops->get_svc_id(svc_ctx, env))
00132
00133 #define AXIS2_SVC_CTX_GET_SVC(svc_ctx, env) \
00134 ((svc_ctx)->ops->get_svc(svc_ctx, env))
00135
00136 #define AXIS2_SVC_CTX_SET_SVC(svc_ctx, env, svc) \
00137 ((svc_ctx)->ops->set_svc(svc_ctx, env, svc))
00138
00139 #define AXIS2_SVC_CTX_GET_CONF_CTX(svc_ctx, env) \
00140 ((svc_ctx)->ops->get_conf_ctx(svc_ctx, env))
00141
00142 #define AXIS2_SVC_CTX_CREATE_OP_CTX(svc_ctx, env, qname) \
00143 ((svc_ctx)->ops->create_op_ctx(svc_ctx, env, qname))
00144
00145
00146
00148 #ifdef __cplusplus
00149 }
00150 #endif
00151
00152 #endif