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

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_defines.h>
00026 #include <axis2_env.h>
00027 #include <axis2_om_node.h>
00028 #include <axis2_core.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 AXIS2_DECLARE_DATA typedef struct axis2_param_ops
00058     {
00059     
00064     axis2_char_t* (AXIS2_CALL *get_name)(struct axis2_param *param, 
00065                                                                                         axis2_env_t **env);
00066 
00071     void* (AXIS2_CALL *get_value)(struct axis2_param *param, 
00072                                                                         axis2_env_t **env);
00073 
00078      axis2_status_t (AXIS2_CALL *set_name)(struct axis2_param *param, 
00079                                                                                         axis2_env_t **env, 
00080                                                                                         axis2_char_t *name);
00081 
00087      axis2_status_t (AXIS2_CALL *set_value)(struct axis2_param *param, 
00088                                                                                                 axis2_env_t **env, 
00089                                                                                                 void *value);
00090 
00096      axis2_bool_t (AXIS2_CALL *is_locked)(struct axis2_param *param,
00097                                                                                          axis2_env_t **env);
00098 
00104      axis2_status_t (AXIS2_CALL *set_locked)(struct axis2_param *param,
00105                                                                                                 axis2_env_t **env,
00106                                                                                                 axis2_bool_t value);
00107 
00113      int (AXIS2_CALL *get_param_type)(struct axis2_param *param, 
00114                                                                                         axis2_env_t **env);
00115 
00116      axis2_status_t (AXIS2_CALL *set_param_type)(struct axis2_param *param, 
00117                                                                                                                 axis2_env_t **env,
00118                                                                                                                 int type);
00119 
00130      axis2_status_t (AXIS2_CALL *set_param_element)(struct axis2_param *param, 
00131                                                                                                                 axis2_env_t **env, 
00132                                                                                                                 axis2_om_node_t *element);
00133 
00138      axis2_om_node_t* (AXIS2_CALL *get_param_element)
00139                                                                                                         (struct axis2_param *param, 
00140                                                                                                                 axis2_env_t **env);
00141          
00142      axis2_status_t (AXIS2_CALL *free)(struct axis2_param *param, 
00143                                                                                 axis2_env_t **env);
00144 }axis2_param_ops_t;
00145  
00149 typedef struct axis2_param
00150 {
00152         axis2_param_ops_t *ops;
00153 }axis2_param_t;
00154 
00158 AXIS2_DECLARE(axis2_param_t*) 
00159 axis2_param_create(axis2_env_t **env, 
00160                                                 axis2_char_t *name, 
00161                                                 void *value);
00162 
00163 #define AXIS2_PARAM_FREE(param, env) \
00164     ((param->ops)->free (param, env))
00165 
00166 #define AXIS2_PARAM_SET_NAME(param, env, name) \
00167     ((param->ops)->set_name (param, env, name))
00168 
00169 #define AXIS2_PARAM_GET_NAME(param, env) \
00170     ((param->ops)->get_name (param, env))
00171 
00172 #define AXIS2_PARAM_SET_VALUE(param, env, value) \
00173     (((param->ops)->set_value (param , env, value))
00174 
00175 #define AXIS2_PARAM_GET_VALUE(param, env) \
00176     ((param->ops)->get_value (param, env))
00177 
00178 #define AXIS2_PARAM_IS_LOCKED(param, env) \
00179     ((param->ops)->is_locked (param, env))
00180 
00181 #define AXIS2_PARAM_SET_LOCKED(param, env, locked) \
00182     ((param->ops)->set_locked (param, env, locked))
00183 
00184 #define AXIS2_PARAM_SET_ELEMENT(param, env, element) \
00185     (((param->ops)->set_param_element (param , env, element))
00186 
00187 #define AXIS2_PARAM_GET_ELEMENT(param, env) \
00188     ((param->ops)->get_param_element (param, env))
00189         
00192 #ifdef __cplusplus
00193 }
00194 #endif
00195 
00196 #endif    /* AXIS2_PARAM_H */

Generated on Wed Dec 7 07:58:25 2005 for Axis2/C by  doxygen 1.4.2