Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Examples

axis2_conf_ctx.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 2004,2005 The Apache Software Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *      http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef AXIS2_CONF_CTX_H
00018 #define AXIS2_CONF_CTX_H
00019 
00020 
00026 #include <axis2_defines.h>
00027 #include <axis2_hash.h>
00028 #include <axis2_env.h>
00029 #include <axis2_ctx.h>
00030 #include <axis2_svc_grp_ctx.h>
00031 
00032 #ifdef __cplusplus
00033 extern "C"
00034 {
00035 #endif
00036 
00042 typedef struct axis2_conf_ctx_ops axis2_conf_ctx_ops_t;
00043 typedef struct axis2_conf_ctx axis2_conf_ctx_t; 
00044 struct axis2_conf;
00045     
00050 struct axis2_conf_ctx_ops
00051 {
00055     axis2_status_t (AXIS2_CALL *set_conf)(struct axis2_conf_ctx *conf_ctx, 
00056         const axis2_env_t *env, 
00057         struct axis2_conf *conf);
00060     axis2_ctx_t* (AXIS2_CALL *get_base)(struct axis2_conf_ctx *conf_ctx, 
00061         const axis2_env_t *env);
00064     struct axis2_conf* (AXIS2_CALL *get_conf)(struct axis2_conf_ctx *conf_ctx, 
00065         const axis2_env_t *env);
00066     axis2_hash_t* (AXIS2_CALL *get_op_ctx_map)(struct axis2_conf_ctx *conf_ctx, 
00067         const axis2_env_t *env);
00068     axis2_hash_t* (AXIS2_CALL *get_svc_ctx_map)(struct axis2_conf_ctx *conf_ctx, 
00069         const axis2_env_t *env);
00070     axis2_hash_t* (AXIS2_CALL *get_svc_grp_ctx_map)(struct axis2_conf_ctx *conf_ctx, 
00071                                                                 const axis2_env_t *env);
00078     axis2_status_t (AXIS2_CALL *register_op_ctx)(struct axis2_conf_ctx *conf_ctx, 
00079                                                                     const axis2_env_t *env,
00080                                                                     axis2_char_t *message_id,
00081                                                                     struct axis2_op_ctx *op_ctx);
00088     struct axis2_op_ctx* (AXIS2_CALL *get_op_ctx)(struct axis2_conf_ctx *conf_ctx, 
00089                                                                             const axis2_env_t *env,
00090                                                                             axis2_char_t *message_id);
00097     axis2_status_t (AXIS2_CALL *register_svc_ctx)(struct axis2_conf_ctx *conf_ctx, 
00098                                                                     const axis2_env_t *env,
00099                                                                     axis2_char_t *svc_id,
00100                                                                     struct axis2_svc_ctx *svc_ctx);
00107     struct axis2_svc_ctx* (AXIS2_CALL *get_svc_ctx)(struct axis2_conf_ctx *conf_ctx, 
00108                                                                             const axis2_env_t *env,
00109                                                                             axis2_char_t *svc_id);
00116     axis2_status_t (AXIS2_CALL *register_svc_grp_ctx)(struct axis2_conf_ctx *conf_ctx, 
00117                                                                     const axis2_env_t *env,
00118                                                                     axis2_char_t *svc_grp_id,
00119                                                                     struct axis2_svc_grp_ctx *svc_grp_ctx);
00126     struct axis2_svc_grp_ctx* (AXIS2_CALL *get_svc_grp_ctx)(struct axis2_conf_ctx *conf_ctx, 
00127                                                                             const axis2_env_t *env,
00128                                                                             axis2_char_t *svc_grp_id);
00135     axis2_char_t* (AXIS2_CALL *get_root_dir)(struct axis2_conf_ctx *conf_ctx, 
00136                                                             const axis2_env_t *env);
00140     axis2_status_t (AXIS2_CALL *set_root_dir)(struct axis2_conf_ctx *conf_ctx, 
00141                                                             const axis2_env_t *env,
00142                                                             axis2_char_t *path);
00143     axis2_status_t (AXIS2_CALL *init)(struct axis2_conf_ctx *conf_ctx, 
00144                                                             const axis2_env_t *env,
00145                                                             struct axis2_conf *conf);
00146     axis2_status_t (AXIS2_CALL *free)(struct axis2_conf_ctx *conf_ctx, 
00147                                        const axis2_env_t *env);
00160     struct axis2_svc_grp_ctx* (AXIS2_CALL *fill_ctxs)(struct axis2_conf_ctx *conf_ctx, 
00161                                                    const axis2_env_t *env,
00162                                                    axis2_msg_ctx_t *msg_ctx);
00163 };
00164 
00169 struct axis2_conf_ctx
00170 {
00171     axis2_conf_ctx_ops_t *ops;    
00172 };
00173 
00174 AXIS2_EXTERN axis2_conf_ctx_t *AXIS2_CALL axis2_conf_ctx_create(const axis2_env_t *env, struct axis2_conf *conf);
00175     
00176 /************************** Start of function macros **************************/
00177 
00178 #define AXIS2_CONF_CTX_SET_CONF(conf_ctx, env, conf) ((conf_ctx)->ops->set_conf(conf_ctx, env, conf))
00179 #define AXIS2_CONF_CTX_GET_BASE(conf_ctx, env) ((conf_ctx)->ops->get_base(conf_ctx, env))
00180 #define AXIS2_CONF_CTX_GET_CONF(conf_ctx, env) ((conf_ctx)->ops->get_conf(conf_ctx, env))
00181 #define AXIS2_CONF_CTX_GET_OP_CTX_MAP(conf_ctx, env) ((conf_ctx)->ops->get_op_ctx_map(conf_ctx, env))
00182 #define AXIS2_CONF_CTX_GET_SVC_CTX_MAP(conf_ctx, env) ((conf_ctx)->ops->get_svc_ctx_map(conf_ctx, env))
00183 #define AXIS2_CONF_CTX_GET_SVC_GRP_CTX_MAP(conf_ctx, env) ((conf_ctx)->ops->get_svc_grp_ctx_map(conf_ctx, env))
00184 #define AXIS2_CONF_CTX_REGISTER_OP_CTX(conf_ctx, env, message_id, op_ctx) ((conf_ctx)->ops->register_op_ctx(conf_ctx, env, message_id, op_ctx))
00185 #define AXIS2_CONF_CTX_GET_OP_CTX(conf_ctx, env, message_id) ((conf_ctx)->ops->get_op_ctx(conf_ctx, env, message_id))
00186 #define AXIS2_CONF_CTX_REGISTER_SVC_CTX(conf_ctx, env, svc_id, svc_ctx) ((conf_ctx)->ops->register_svc_ctx(conf_ctx, env, svc_id, svc_ctx))
00187 #define AXIS2_CONF_CTX_GET_SVC_CTX(conf_ctx, env, svc_id) ((conf_ctx)->ops->get_svc_ctx(conf_ctx, env, svc_id))
00188 #define AXIS2_CONF_CTX_REGISTER_SVC_GRP_CTX(conf_ctx, env, svc_grp_id, svc_grp_ctx) ((conf_ctx)->ops->register_svc_grp_ctx(conf_ctx, env, svc_grp_id, svc_grp_ctx))
00189 #define AXIS2_CONF_CTX_GET_SVC_GRP_CTX(conf_ctx, env, svc_grp_id) ((conf_ctx)->ops->get_svc_grp_ctx(conf_ctx, env, svc_grp_id))
00190 #define AXIS2_CONF_CTX_GET_ROOT_DIR(conf_ctx, env) ((conf_ctx)->ops->get_root_dir(conf_ctx, env))
00191 #define AXIS2_CONF_CTX_SET_ROOT_DIR(conf_ctx, env, path) ((conf_ctx)->ops->set_root_dir(conf_ctx, env, path))
00192 #define AXIS2_CONF_CTX_INIT(conf_ctx, env, conf) ((conf_ctx)->ops->init(conf_ctx, env, conf))
00193 #define AXIS2_CONF_CTX_FREE(conf_ctx, env) ((conf_ctx)->ops->free(conf_ctx, env))
00194 #define AXIS2_CONF_CTX_FILL_CTXS(conf_ctx, env, msg_ctx) ((conf_ctx)->ops->fill_ctxs(conf_ctx, env, msg_ctx))
00195 
00196 /************************** End of function macros ****************************/    
00197 
00199 #ifdef __cplusplus
00200 }
00201 #endif
00202 
00203 #endif                          /* AXIS2_CONF_CTX_H */

Generated on Fri Jun 16 18:02:30 2006 for Axis2/C by  doxygen 1.4.2