00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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
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
00108
00109
00110
00113 #ifdef __cplusplus
00114 }
00115 #endif
00116
00117 #endif