axis2_op_ctx.h

Go to the documentation of this file.
00001 /*
00002 * Licensed to the Apache Software Foundation (ASF) under one or more
00003 * contributor license agreements.  See the NOTICE file distributed with
00004 * this work for additional information regarding copyright ownership.
00005 * The ASF licenses this file to You under the Apache License, Version 2.0
00006 * (the "License"); you may not use this file except in compliance with
00007 * the License.  You may obtain a copy of the License at
00008 *
00009 *      http://www.apache.org/licenses/LICENSE-2.0
00010 *
00011 * Unless required by applicable law or agreed to in writing, software
00012 * distributed under the License is distributed on an "AS IS" BASIS,
00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014 * See the License for the specific language governing permissions and
00015 * limitations under the License.
00016 */
00017 
00018 #ifndef AXIS2_OP_CTX_H
00019 #define AXIS2_OP_CTX_H
00020 
00039 #include <axis2_defines.h>
00040 #include <axis2_hash.h>
00041 #include <axis2_env.h>
00042 #include <axis2_msg_ctx.h>
00043 #include <axis2_op.h>
00044 
00045 #ifdef __cplusplus
00046 extern "C"
00047 {
00048 #endif
00049 
00051     typedef struct axis2_op_ctx_ops axis2_op_ctx_ops_t;
00053     typedef struct axis2_op_ctx axis2_op_ctx_t;
00054         
00055     struct axis2_svc_ctx;
00056 
00061     struct axis2_op_ctx_ops
00062     {
00069         axis2_ctx_t *(AXIS2_CALL *
00070                 get_base)(
00071                     const axis2_op_ctx_t *op_ctx,
00072                     const axis2_env_t *env);
00073 
00080         axis2_status_t (AXIS2_CALL *
00081                 free)(
00082                     struct axis2_op_ctx *op_ctx,
00083                     const axis2_env_t *env);
00084 
00093         axis2_status_t (AXIS2_CALL *
00094                 init)(
00095                     struct axis2_op_ctx *op_ctx,
00096                     const axis2_env_t *env,
00097                     struct axis2_conf *conf);
00098 
00105         struct axis2_op *(AXIS2_CALL *
00106                 get_op)(
00107                     const axis2_op_ctx_t *op_ctx,
00108                     const axis2_env_t *env);
00109 
00117         struct axis2_svc_ctx *(AXIS2_CALL *
00118                 get_parent)(
00119                     const axis2_op_ctx_t *op_ctx,
00120                     const axis2_env_t *env);
00121 
00130         axis2_status_t (AXIS2_CALL *
00131                 add_msg_ctx)(
00132                     struct axis2_op_ctx *op_ctx,
00133                     const axis2_env_t *env,
00134                     axis2_msg_ctx_t *msg_ctx);
00135 
00143         axis2_msg_ctx_t *(AXIS2_CALL *
00144                 get_msg_ctx)(
00145                     const axis2_op_ctx_t *op_ctx,
00146                     const axis2_env_t *env,
00147                     const axis2_char_t *message_id);
00148 
00157         axis2_bool_t (AXIS2_CALL *
00158                 get_is_complete)(
00159                     const axis2_op_ctx_t *op_ctx,
00160                     const axis2_env_t *env);
00161 
00172         axis2_status_t (AXIS2_CALL *
00173                 set_complete)(
00174                     struct axis2_op_ctx *op_ctx,
00175                     const axis2_env_t *env,
00176                     axis2_bool_t is_complete);
00177 
00185         axis2_status_t (AXIS2_CALL *
00186                 cleanup)(
00187                     struct axis2_op_ctx *op_ctx,
00188                     const axis2_env_t *env);
00189 
00198         axis2_status_t (AXIS2_CALL *
00199                 set_parent)(
00200                     struct axis2_op_ctx *op_ctx,
00201                     const axis2_env_t *env,
00202                     struct axis2_svc_ctx *svc_ctx);
00203 
00210         axis2_hash_t *(AXIS2_CALL *
00211                 get_msg_ctx_map)(
00212                     const axis2_op_ctx_t *op_ctx,
00213                     const axis2_env_t *env);
00214 
00215     };
00216 
00220     struct axis2_op_ctx
00221     {
00223         axis2_op_ctx_ops_t *ops;
00224     };
00225 
00234     AXIS2_EXTERN axis2_op_ctx_t *AXIS2_CALL
00235     axis2_op_ctx_create(
00236        const axis2_env_t *env,
00237        struct axis2_op *op,
00238        struct axis2_svc_ctx *svc_ctx);
00239 
00240 
00243 #define AXIS2_OP_CTX_GET_BASE(op_ctx, env) \
00244       ((op_ctx)->ops->get_base(op_ctx, env))
00245 
00248 #define AXIS2_OP_CTX_FREE(op_ctx, env)\
00249       ((op_ctx)->ops->free(op_ctx, env))
00250 
00253 #define AXIS2_OP_CTX_INIT(op_ctx, env, conf) \
00254       ((op_ctx)->ops->init(op_ctx, env, conf))
00255 
00258 #define AXIS2_OP_CTX_GET_OP(op_ctx, env)\
00259       ((op_ctx)->ops->get_op(op_ctx, env))
00260 
00263 #define AXIS2_OP_CTX_GET_PARENT(op_ctx, env) \
00264       ((op_ctx)->ops->get_parent(op_ctx, env))
00265 
00268 #define AXIS2_OP_CTX_ADD_MSG_CTX(op_ctx, env, msg_ctx) \
00269       ((op_ctx)->ops->add_msg_ctx(op_ctx, env, msg_ctx))
00270 
00273 #define AXIS2_OP_CTX_GET_MSG_CTX(op_ctx, env, message_id) \
00274       ((op_ctx)->ops->get_msg_ctx(op_ctx, env, message_id))
00275 
00278 #define AXIS2_OP_CTX_GET_IS_COMPLETE(op_ctx, env) \
00279       ((op_ctx)->ops->get_is_complete(op_ctx, env))
00280 
00283 #define AXIS2_OP_CTX_SET_IS_COMPLETE(op_ctx, env, is_complete) \
00284       ((op_ctx)->ops->set_complete(op_ctx, env, is_complete))
00285 
00288 #define AXIS2_OP_CTX_CLEANUP(op_ctx, env) \
00289       ((op_ctx)->ops->cleanup(op_ctx, env))
00290 
00293 #define AXIS2_OP_CTX_SET_PARENT(op_ctx, env, svc_ctx) \
00294       ((op_ctx)->ops->set_parent(op_ctx, env, svc_ctx))
00295 
00298 #define AXIS2_OP_CTX_GET_MSG_CTX_MAP(op_ctx, env) \
00299       ((op_ctx)->ops->get_msg_ctx_map(op_ctx, env))
00300 
00302 #ifdef __cplusplus
00303 }
00304 #endif
00305 
00306 #endif                          /* AXIS2_OP_CTX_H */

Generated on Wed Dec 20 20:14:10 2006 for Axis2/C by  doxygen 1.5.1