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

axis2_svc_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_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 /************************** Start of function macros **************************/
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 /************************** End of function macros ****************************/    
00146 
00148 #ifdef __cplusplus
00149 }
00150 #endif
00151 
00152 #endif                          /* AXIS2_SVC_CTX_H */

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