axis2_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_CTX_H
00018 #define AXIS2_CTX_H
00019 
00041 #include <axis2_defines.h>
00042 #include <axis2_hash.h>
00043 #include <axis2_env.h>
00044 #include <axis2_property.h>
00045 
00046 #ifdef __cplusplus
00047 extern "C"
00048 {
00049 #endif
00050 
00051 
00053     typedef struct axis2_ctx_ops axis2_ctx_ops_t;
00055     typedef struct axis2_ctx axis2_ctx_t;
00056 
00057 
00062     struct axis2_ctx_ops
00063     {
00076         axis2_status_t (AXIS2_CALL *
00077                 set_property)(
00078                     struct axis2_ctx *ctx,
00079                     const axis2_env_t *env,
00080                     const axis2_char_t *key,
00081                     axis2_property_t *value,
00082                     const axis2_bool_t persistent);
00083 
00094         axis2_property_t *(AXIS2_CALL *
00095                 get_property)(
00096                     const axis2_ctx_t *ctx,
00097                     const axis2_env_t *env,
00098                     const axis2_char_t *key,
00099                     const axis2_bool_t persistent);
00100 
00108         axis2_hash_t *(AXIS2_CALL *
00109                 get_non_persistent_map)(
00110                     const axis2_ctx_t *ctx,
00111                     const axis2_env_t *env);
00112 
00120         axis2_hash_t *(AXIS2_CALL *
00121                 get_persistent_map)(
00122                     const axis2_ctx_t *ctx,
00123                     const axis2_env_t *env);
00124                     
00131         axis2_hash_t *(AXIS2_CALL *
00132                 get_all_properties)(
00133                     const axis2_ctx_t *ctx,
00134                     const axis2_env_t *env);
00135 
00136 
00143         axis2_status_t (AXIS2_CALL *
00144                 free)(
00145                     axis2_ctx_t *ctx,
00146                     const axis2_env_t *env);
00147 
00155         axis2_status_t (AXIS2_CALL *
00156                 set_non_persistent_map)(
00157                     struct axis2_ctx *ctx,
00158                     const axis2_env_t *env,
00159                     axis2_hash_t *map);
00160 
00168         axis2_status_t (AXIS2_CALL *
00169                 set_persistent_map)(
00170                     struct axis2_ctx *ctx,
00171                     const axis2_env_t *env,
00172                     axis2_hash_t *map);
00173     };
00174 
00178     struct axis2_ctx
00179     {
00181         axis2_ctx_ops_t *ops;
00182     };
00183 
00189     AXIS2_EXTERN axis2_ctx_t *AXIS2_CALL 
00190     axis2_ctx_create(
00191         const axis2_env_t *env);
00192 
00195 #define AXIS2_CTX_SET_PROPERTY(ctx, env, key, value, persistent) \
00196     ((ctx)->ops->set_property(ctx, env, key, value, persistent))
00197 
00200 #define AXIS2_CTX_GET_PROPERTY(ctx, env, key, persistent) \
00201     ((ctx)->ops->get_property(ctx, env, key, persistent))
00202 
00205 #define AXIS2_CTX_GET_NON_PERSISTANT_MAP(ctx, env) \
00206     ((ctx)->ops->get_non_persistent_map(ctx, env))
00207 
00210 #define AXIS2_CTX_GET_ALL_PROPERTIES(ctx, env) \
00211     ((ctx)->ops->get_all_properties(ctx, env))
00212 
00215 #define AXIS2_CTX_GET_PERSISTANT_MAP(ctx, env) \
00216     ((ctx)->ops->get_persistent_map(ctx, env))
00217 
00220 #define AXIS2_CTX_SET_NON_PERSISTANT_MAP(ctx, env, map) \
00221     ((ctx)->ops->set_non_persistent_map(ctx, env, map))
00222 
00225 #define AXIS2_CTX_SET_PERSISTANT_MAP(ctx, env, map) \
00226     ((ctx)->ops->set_persistent_map(ctx, env, map))
00227 
00230 #define AXIS2_CTX_FREE(ctx, env) \
00231     ((ctx)->ops->free (ctx, env))
00232 
00234 #ifdef __cplusplus
00235 }
00236 #endif
00237 
00238 #endif                          /* AXIS2_CTX_H */

Generated on Tue Oct 3 22:35:47 2006 for Axis2/C by  doxygen 1.4.7