axis2_property.h

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_PROPERTY_H
00018 #define AXIS2_PROPERTY_H
00019 
00020 #include <axis2_utils_defines.h>
00021 #include <axis2_error.h>
00022 #include <axis2_env.h>
00023 #include <axis2_utils.h>
00024 
00025 
00026 #ifdef __cplusplus
00027 extern "C"
00028 {
00029 #endif
00030     
00031 typedef struct axis2_property axis2_property_t;
00032 typedef struct axis2_property_ops axis2_property_ops_t;
00033     
00044  struct axis2_property_ops
00045 {
00046 
00047     axis2_status_t (AXIS2_CALL *
00048     free) (axis2_property_t *property, 
00049             const axis2_env_t *env);
00050 
00054     axis2_status_t (AXIS2_CALL *
00055     set_scope) (axis2_property_t *property,
00056                 const axis2_env_t *env,
00057                 axis2_scope_t scope);
00058 
00059     axis2_status_t (AXIS2_CALL *
00060     set_free_func) (axis2_property_t *property,
00061                     const axis2_env_t *env,
00062                     AXIS2_FREE_VOID_ARG free_func);
00063 
00064     axis2_status_t (AXIS2_CALL *
00065     set_value) (axis2_property_t *property,
00066                 const axis2_env_t *env,
00067                 void *value);
00068     void *(AXIS2_CALL *
00069     get_value) (axis2_property_t *property,
00070                             const axis2_env_t *env);
00071 
00072 };
00073     
00074      
00078  struct axis2_property
00079 {
00080    axis2_property_ops_t *ops;
00081 };
00082 
00087 AXIS2_EXTERN axis2_property_t * AXIS2_CALL
00088 axis2_property_create(const axis2_env_t *env);
00089 
00090 /*************************** Function macros **********************************/
00091 
00092 #define AXIS2_PROPERTY_FREE(property, env) \
00093       ((property)->ops->free (property, env))
00094 
00095 #define AXIS2_PROPERTY_SET_FREE_FUNC(property, env, free_func) \
00096       ((property)->ops->set_free_func (property, env, free_func))  
00097 
00098 #define AXIS2_PROPERTY_SET_SCOPE(property, env, scope) \
00099       ((property)->ops->set_scope (property, env, scope)) 
00100 
00101 #define AXIS2_PROPERTY_SET_VALUE(property, env, value) \
00102       ((property)->ops->set_value (property, env, value))
00103 
00104 #define AXIS2_PROPERTY_GET_VALUE(property, env) \
00105         ((property)->ops->get_value(property, env))
00106                                         
00107 /*************************** End of function macros ***************************/
00108 
00109 
00110 
00113 #ifdef __cplusplus
00114 }
00115 #endif
00116 
00117 #endif  /* AXIS2_PROPERTY_H */

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