woden_configurable.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 WODEN_CONFIGURABLE_H
00019 #define WODEN_CONFIGURABLE_H
00020 
00030 #include <woden.h>
00031 #include <woden_configurable_element.h>
00032 #include <woden_configurable_component.h>
00033 #include <woden_documentable.h>
00034 
00040 typedef union woden_configurable_base woden_configurable_base_t;
00041 typedef struct woden_configurable woden_configurable_t;
00042 typedef struct woden_configurable_ops woden_configurable_ops_t;
00043 struct woden_documentable;
00044 
00045 #ifdef __cplusplus
00046 extern "C"
00047 {
00048 #endif
00049 
00050 struct woden_configurable_ops
00051 {
00056     axis2_status_t (AXIS2_CALL *
00057     free) (
00058             void *configurable,
00059             const axis2_env_t *env);
00060 
00061     axis2_status_t (AXIS2_CALL *
00062     to_configurable_free) (
00063             void *configurable,
00064             const axis2_env_t *env);
00065 
00066     axis2_hash_t *(AXIS2_CALL *
00067     super_objs) (
00068             void *configurable,
00069             const axis2_env_t *env);
00070     
00074     struct woden_documentable *(AXIS2_CALL *
00075     get_base_impl) (
00076             void *configurable,
00077             const axis2_env_t *env);
00078 
00079 
00080 };
00081 
00082 union woden_configurable_base
00083 {
00084     woden_documentable_t documentable;
00085     woden_configurable_element_t configurable_element;
00086     woden_configurable_component_t configurable_component;
00087 };
00088 
00089 struct woden_configurable
00090 {
00091     woden_configurable_base_t base;
00092     woden_configurable_ops_t *ops;
00093 };
00094 
00095 AXIS2_EXTERN woden_configurable_t * AXIS2_CALL
00096 woden_configurable_create(
00097         const axis2_env_t *env);
00098 
00099 /************************Woden C Internal Methods******************************/
00100 AXIS2_EXTERN woden_configurable_t * AXIS2_CALL
00101 woden_configurable_to_configurable_element(
00102         void *configurable,
00103         const axis2_env_t *env);
00104 
00105 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00106 woden_configurable_resolve_methods(
00107         woden_configurable_t *configurable,
00108         const axis2_env_t *env,
00109         woden_configurable_t *configurable_impl,
00110         axis2_hash_t *methods);
00111 /************************End of Woden C Internal Methods***********************/
00112 
00113 #define WODEN_CONFIGURABLE_FREE(configurable, env) \
00114       (((woden_configurable_t *) configurable)->ops->\
00115          free(configurable, env))
00116 
00117 #define WODEN_CONFIGURABLE_TO_CONFIGURABLE_FREE(configurable, env) \
00118       (((woden_configurable_t *) configurable)->ops->\
00119          to_configurable_free(configurable, env))
00120 
00121 #define WODEN_CONFIGURABLE_SUPER_OBJS(configurable, env) \
00122       (((woden_configurable_t *) configurable)->ops->\
00123          super_objs(configurable, env))
00124 
00125 #define WODEN_CONFIGURABLE_GET_BASE_IMPL(configurable, env) \
00126       (((woden_configurable_t *) configurable)->ops->\
00127          get_base_impl(configurable, env))
00128 
00130 #ifdef __cplusplus
00131 }
00132 #endif
00133 #endif /* WODEN_CONFIGURABLE_H */

Generated on Wed Dec 20 20:14:10 2006 for Axis2/C by  doxygen 1.5.1