axis2_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_CTX_H
00019 #define AXIS2_CTX_H
00020 
00042 #include <axis2_defines.h>
00043 #include <axis2_hash.h>
00044 #include <axis2_env.h>
00045 #include <axis2_property.h>
00046 
00047 #ifdef __cplusplus
00048 extern "C"
00049 {
00050 #endif
00051 
00052 
00054     typedef struct axis2_ctx_ops axis2_ctx_ops_t;
00056     typedef struct axis2_ctx axis2_ctx_t;
00057 
00058 
00063     struct axis2_ctx_ops
00064     {
00077         axis2_status_t (AXIS2_CALL *
00078                 set_property)(
00079                     struct axis2_ctx *ctx,
00080                     const axis2_env_t *env,
00081                     const axis2_char_t *key,
00082                     axis2_property_t *value,
00083                     const axis2_bool_t persistent);
00084 
00095         axis2_property_t *(AXIS2_CALL *
00096                 get_property)(
00097                     const axis2_ctx_t *ctx,
00098                     const axis2_env_t *env,
00099                     const axis2_char_t *key,
00100                     const axis2_bool_t persistent);
00101 
00109         axis2_hash_t *(AXIS2_CALL *
00110                 get_non_persistent_map)(
00111                     const axis2_ctx_t *ctx,
00112                     const axis2_env_t *env);
00113 
00121         axis2_hash_t *(AXIS2_CALL *
00122                 get_persistent_map)(
00123                     const axis2_ctx_t *ctx,
00124                     const axis2_env_t *env);
00125                     
00132         axis2_hash_t *(AXIS2_CALL *
00133                 get_all_properties)(
00134                     const axis2_ctx_t *ctx,
00135                     const axis2_env_t *env);
00136 
00137 
00144         axis2_status_t (AXIS2_CALL *
00145                 free)(
00146                     axis2_ctx_t *ctx,
00147                     const axis2_env_t *env);
00148 
00156         axis2_status_t (AXIS2_CALL *
00157                 set_non_persistent_map)(
00158                     struct axis2_ctx *ctx,
00159                     const axis2_env_t *env,
00160                     axis2_hash_t *map);
00161 
00169         axis2_status_t (AXIS2_CALL *
00170                 set_persistent_map)(
00171                     struct axis2_ctx *ctx,
00172                     const axis2_env_t *env,
00173                     axis2_hash_t *map);
00174     };
00175 
00179     struct axis2_ctx
00180     {
00182         axis2_ctx_ops_t *ops;
00183     };
00184 
00190     AXIS2_EXTERN axis2_ctx_t *AXIS2_CALL 
00191     axis2_ctx_create(
00192         const axis2_env_t *env);
00193 
00196 #define AXIS2_CTX_SET_PROPERTY(ctx, env, key, value, persistent) \
00197     ((ctx)->ops->set_property(ctx, env, key, value, persistent))
00198 
00201 #define AXIS2_CTX_GET_PROPERTY(ctx, env, key, persistent) \
00202     ((ctx)->ops->get_property(ctx, env, key, persistent))
00203 
00206 #define AXIS2_CTX_GET_NON_PERSISTANT_MAP(ctx, env) \
00207     ((ctx)->ops->get_non_persistent_map(ctx, env))
00208 
00211 #define AXIS2_CTX_GET_ALL_PROPERTIES(ctx, env) \
00212     ((ctx)->ops->get_all_properties(ctx, env))
00213 
00216 #define AXIS2_CTX_GET_PERSISTANT_MAP(ctx, env) \
00217     ((ctx)->ops->get_persistent_map(ctx, env))
00218 
00221 #define AXIS2_CTX_SET_NON_PERSISTANT_MAP(ctx, env, map) \
00222     ((ctx)->ops->set_non_persistent_map(ctx, env, map))
00223 
00226 #define AXIS2_CTX_SET_PERSISTANT_MAP(ctx, env, map) \
00227     ((ctx)->ops->set_persistent_map(ctx, env, map))
00228 
00231 #define AXIS2_CTX_FREE(ctx, env) \
00232     ((ctx)->ops->free (ctx, env))
00233 
00235 #ifdef __cplusplus
00236 }
00237 #endif
00238 
00239 #endif                          /* AXIS2_CTX_H */

Generated on Wed Dec 20 20:34:49 2006 for Axis2/C by  doxygen 1.5.1