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

axis2_op_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_OP_CTX_H
00018 #define AXIS2_OP_CTX_H
00019 
00020 
00026 #include <axis2_defines.h>
00027 #include <axis2_hash.h>
00028 #include <axis2_env.h>
00029 #include <axis2_msg_ctx.h>
00030 #include <axis2_op.h>
00031 
00032 #ifdef __cplusplus
00033 extern "C"
00034 {
00035 #endif
00036 
00054 typedef struct axis2_op_ctx_ops axis2_op_ctx_ops_t;
00055 typedef struct axis2_op_ctx axis2_op_ctx_t; 
00056 struct axis2_svc_ctx;
00057     
00062 struct axis2_op_ctx_ops
00063 {
00064     axis2_ctx_t* (AXIS2_CALL *
00065    get_base)(struct axis2_op_ctx *op_ctx, 
00066               const axis2_env_t *env);
00067     
00068     axis2_status_t (AXIS2_CALL *
00069    free)(struct axis2_op_ctx *op_ctx, 
00070           const axis2_env_t *env);
00071     
00075     axis2_status_t (AXIS2_CALL *
00076    init)(struct axis2_op_ctx *op_ctx, 
00077         const axis2_env_t *env, 
00078          struct axis2_conf *conf);
00079     
00083     struct axis2_op* (AXIS2_CALL *
00084     get_op)(struct axis2_op_ctx *op_ctx, 
00085           const axis2_env_t *env);
00086     
00092     struct axis2_svc_ctx* (AXIS2_CALL *
00093    get_parent)(struct axis2_op_ctx *op_ctx, 
00094               const axis2_env_t *env);
00095     
00104     axis2_status_t (AXIS2_CALL *
00105    add_msg_ctx)(struct axis2_op_ctx *op_ctx, 
00106                const axis2_env_t *env, 
00107                 axis2_msg_ctx_t *msg_ctx);
00108     
00114     axis2_msg_ctx_t* (AXIS2_CALL *
00115    get_msg_ctx)(struct axis2_op_ctx *op_ctx, 
00116                  const axis2_env_t *env, 
00117                 const axis2_char_t *message_id);
00118     
00124     axis2_bool_t (AXIS2_CALL *
00125    get_is_complete)(struct axis2_op_ctx *op_ctx, 
00126                      const axis2_env_t *env);
00127     
00128     axis2_status_t (AXIS2_CALL *
00129    set_complete)(struct axis2_op_ctx *op_ctx, 
00130                   const axis2_env_t *env, 
00131                   axis2_bool_t is_complete);
00132     
00143     axis2_status_t (AXIS2_CALL *
00144    cleanup)(struct axis2_op_ctx *op_ctx, 
00145              const axis2_env_t *env);
00146     
00147     axis2_status_t (AXIS2_CALL *
00148    set_parent)(struct axis2_op_ctx *op_ctx, 
00149                 const axis2_env_t *env, 
00150                 struct axis2_svc_ctx *svc_ctx);
00151     
00152     axis2_hash_t* (AXIS2_CALL *
00153    get_msg_ctx_map)(struct axis2_op_ctx *op_ctx, 
00154                      const axis2_env_t *env);
00155     
00156 };
00157 
00162 struct axis2_op_ctx
00163 {
00164     axis2_op_ctx_ops_t *ops;    
00165 };
00166 
00167 AXIS2_EXTERN axis2_op_ctx_t* AXIS2_CALL
00168 axis2_op_ctx_create(const axis2_env_t *env, 
00169                     struct axis2_op *op,
00170                     struct axis2_svc_ctx * svc_ctx);
00171     
00172 /************************** Start of function macros **************************/
00173 #define AXIS2_OP_CTX_GET_BASE(op_ctx, env) \
00174       ((op_ctx)->ops->get_base(op_ctx, env))
00175                
00176 #define AXIS2_OP_CTX_FREE(op_ctx, env)\
00177       ((op_ctx)->ops->free(op_ctx, env))
00178                
00179 #define AXIS2_OP_CTX_INIT(op_ctx, env, conf) \
00180       ((op_ctx)->ops->init(op_ctx, env, conf))
00181                
00182 #define AXIS2_OP_CTX_GET_OP(op_ctx, env)\
00183       ((op_ctx)->ops->get_op(op_ctx, env))
00184 #define AXIS2_OP_CTX_GET_PARENT(op_ctx, env) \
00185       ((op_ctx)->ops->get_parent(op_ctx, env))
00186                
00187 #define AXIS2_OP_CTX_ADD_MSG_CTX(op_ctx, env, msg_ctx) \
00188       ((op_ctx)->ops->add_msg_ctx(op_ctx, env, msg_ctx))
00189                
00190 #define AXIS2_OP_CTX_GET_MSG_CTX(op_ctx, env, message_id) \
00191       ((op_ctx)->ops->get_msg_ctx(op_ctx, env, message_id))
00192       
00193 #define AXIS2_OP_CTX_GET_IS_COMPLETE(op_ctx, env) \
00194       ((op_ctx)->ops->get_is_complete(op_ctx, env))
00195       
00196 #define AXIS2_OP_CTX_SET_IS_COMPLETE(op_ctx, env, is_complete) \
00197       ((op_ctx)->ops->set_complete(op_ctx, env, is_complete))
00198       
00199 #define AXIS2_OP_CTX_CLEANUP(op_ctx, env) \
00200       ((op_ctx)->ops->cleanup(op_ctx, env))
00201       
00202 #define AXIS2_OP_CTX_SET_PARENT(op_ctx, env, svc_ctx) \
00203       ((op_ctx)->ops->set_parent(op_ctx, env, svc_ctx))
00204       
00205 #define AXIS2_OP_CTX_GET_MSG_CTX_MAP(op_ctx, env) \
00206       ((op_ctx)->ops->get_msg_ctx_map(op_ctx, env))    
00207 
00208 /************************** End of function macros ****************************/    
00209 
00211 #ifdef __cplusplus
00212 }
00213 #endif
00214 
00215 #endif                          /* AXIS2_OP_CTX_H */

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