axis2_param.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_PARAM_H
00018 #define AXIS2_PARAM_H
00019 
00025 #include <axis2_utils_defines.h>
00026 #include <axis2_env.h>
00027 #include <axis2_hash.h>
00028 #include <axis2_array_list.h>
00029 
00030 #ifdef __cplusplus
00031 extern "C"
00032 {
00033 #endif
00034 
00035 struct axis2_param;
00036 struct axis2_param_ops;
00037 
00047   static const int AXIS2_TEXT_PARAM = 0;
00048 
00052   static const int AXIS2_DOM_PARAM = 1;
00053        
00057  typedef struct axis2_param_ops
00058     {
00059     
00064     axis2_char_t* (AXIS2_CALL *
00065    get_name)(struct axis2_param *param, 
00066            const axis2_env_t *env);
00067 
00072     void* (AXIS2_CALL *
00073    get_value)(struct axis2_param *param, 
00074              const axis2_env_t *env);
00075 
00080      axis2_status_t (AXIS2_CALL *
00081     set_name)(struct axis2_param *param, 
00082              const axis2_env_t *env, 
00083               const axis2_char_t *name);
00084 
00090      axis2_status_t (AXIS2_CALL *
00091     set_value)(struct axis2_param *param, 
00092              const axis2_env_t *env, 
00093              const void *value);
00094 
00100      axis2_bool_t (AXIS2_CALL *
00101     is_locked)(struct axis2_param *param,
00102               const axis2_env_t *env);
00103 
00109      axis2_status_t (AXIS2_CALL *
00110     set_locked)(struct axis2_param *param,
00111              const axis2_env_t *env,
00112              axis2_bool_t value);
00113 
00119      int (AXIS2_CALL *
00120     get_param_type)(struct axis2_param *param, 
00121                  const axis2_env_t *env);
00122 
00123      axis2_status_t (AXIS2_CALL *
00124     set_param_type)(struct axis2_param *param, 
00125                  const axis2_env_t *env,
00126                 int type);
00127 
00128      axis2_status_t (AXIS2_CALL *
00129     free)(struct axis2_param *param, 
00130           const axis2_env_t *env);
00131 
00132     axis2_status_t (AXIS2_CALL *
00133     set_attributes) (
00134             struct axis2_param *param,
00135             const axis2_env_t *env,
00136             axis2_hash_t *attrs);
00137 
00138     axis2_hash_t* (AXIS2_CALL *
00139     get_attributes) (
00140             struct axis2_param *param,
00141             const axis2_env_t *env);
00142          
00143     axis2_status_t (AXIS2_CALL *
00144     set_value_list) (
00145             struct axis2_param *param,
00146             const axis2_env_t *env,
00147             axis2_array_list_t *value_list);
00148 
00149     axis2_array_list_t* (AXIS2_CALL *
00150     get_value_list) (
00151             struct axis2_param *param,
00152             const axis2_env_t *env);
00153 
00154     axis2_status_t (AXIS2_CALL *
00155     value_free) (void *param_value, 
00156                  const axis2_env_t *env);
00157 }axis2_param_ops_t;
00158  
00162 typedef struct axis2_param
00163 {
00165    axis2_param_ops_t *ops;
00166 }axis2_param_t;
00167 
00171 AXIS2_EXTERN axis2_param_t* AXIS2_CALL 
00172 axis2_param_create(const axis2_env_t *env, 
00173                   axis2_char_t *name, 
00174                   void *value);
00175 
00176 #define AXIS2_PARAM_FREE(param, env) \
00177     ((param)->ops->free (param, env))
00178 
00179 #define AXIS2_PARAM_SET_NAME(param, env, name) \
00180     ((param)->ops->set_name (param, env, name))
00181 
00182 #define AXIS2_PARAM_GET_NAME(param, env) \
00183     ((param)->ops->get_name (param, env))
00184 
00185 #define AXIS2_PARAM_SET_VALUE(param, env, value) \
00186     ((param)->ops->set_value (param , env, value))
00187 
00188 #define AXIS2_PARAM_GET_VALUE(param, env) \
00189     ((param)->ops->get_value (param, env))
00190 
00191 #define AXIS2_PARAM_IS_LOCKED(param, env) \
00192     ((param)->ops->is_locked (param, env))
00193 
00194 #define AXIS2_PARAM_SET_LOCKED(param, env, locked) \
00195     ((param)->ops->set_locked (param, env, locked))
00196 
00197 #define AXIS2_PARAM_SET_PARAM_TYPE(param, env, type) \
00198     ((param)->ops->set_param_type (param, env, type))
00199  
00200 #define AXIS2_PARAM_GET_PARAM_TYPE(param, env) \
00201     ((param)->ops->get_param_type (param, env))
00202     
00203 #define AXIS2_PARAM_SET_ATTRIBUTES(param, env, attrs) \
00204     ((param)->ops->set_attributes (param , env, attrs))
00205 
00206 #define AXIS2_PARAM_GET_ATTRIBUTES(param, env) \
00207     ((param)->ops->get_attributes (param, env))
00208        
00209 #define AXIS2_PARAM_SET_VALUE_LIST(param, env, value_list) \
00210     ((param)->ops->set_value_list (param , env, value_list))
00211 
00212 #define AXIS2_PARAM_GET_VALUE_LIST(param, env) \
00213     ((param)->ops->get_value_list (param, env))
00214    
00217 #ifdef __cplusplus
00218 }
00219 #endif
00220 
00221 #endif    /* AXIS2_PARAM_H */

Generated on Thu Oct 26 21:00:11 2006 for Axis2/C by  doxygen 1.4.7