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

woden_desc.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 WODEN_DESC_H
00018 #define WODEN_DESC_H
00019 
00038 #include <woden.h>
00039 #include <woden_desc_element.h>
00040 #include <woden_wsdl_obj.h>
00041 #include <woden_documentable.h>
00042 #include <woden_wsdl_component.h>
00043 
00049 typedef union woden_desc_base woden_desc_base_t;
00050 typedef struct woden_desc woden_desc_t;
00051 typedef struct woden_desc_ops woden_desc_ops_t;
00052 struct woden_documentation_element;
00053 struct woden_wsdl_component;
00054 struct woden_documentable;
00055 
00056 #ifdef __cplusplus
00057 extern "C"
00058 {
00059 #endif
00060 
00061 struct woden_desc_ops
00062 {
00067     axis2_status_t (AXIS2_CALL *
00068     free) (void *desc,
00069             const axis2_env_t *env);
00070 
00071     axis2_status_t (AXIS2_CALL *
00072     to_desc_free) (void *desc,
00073             const axis2_env_t *env);
00074     
00075     axis2_hash_t *(AXIS2_CALL *
00076     super_objs) (void *desc,
00077             const axis2_env_t *env);
00078 
00079     woden_obj_types_t (AXIS2_CALL *
00080     type) (void *desc,
00081             const axis2_env_t *env);
00085     struct woden_documentable *(AXIS2_CALL *
00086     get_base_impl) (
00087             void *desc,
00088             const axis2_env_t *env);
00089     /* ************************************************************
00090      *  Description interface methods (the WSDL Component model)
00091      * ************************************************************/
00092     axis2_array_list_t *(AXIS2_CALL *
00093     get_interfaces) (
00094             void *desc,
00095             const axis2_env_t *env);
00096 
00097     axis2_array_list_t *(AXIS2_CALL *
00098     get_bindings) (
00099             void *desc,
00100             const axis2_env_t *env);
00101 
00102     axis2_array_list_t *(AXIS2_CALL *
00103     get_svcs) (
00104             void *desc,
00105             const axis2_env_t *env);
00106 
00107     axis2_array_list_t *(AXIS2_CALL *
00108     get_element_decls) (
00109             void *desc,
00110             const axis2_env_t *env);
00111 
00112     axis2_array_list_t *(AXIS2_CALL *
00113     get_element_decl) (
00114             void *desc,
00115             const axis2_env_t *env,
00116             axis2_qname_t *qname);
00117 
00118     axis2_array_list_t *(AXIS2_CALL *
00119     get_type_defs) (
00120             void *desc,
00121             const axis2_env_t *env);
00122 
00123     axis2_array_list_t *(AXIS2_CALL *
00124     get_type_def) (
00125             void *desc,
00126             const axis2_env_t *env,
00127             axis2_qname_t *qname);
00128 
00129     void *(AXIS2_CALL *
00130     to_element) (
00131             void *desc,
00132             const axis2_env_t *env);
00133     /* ************************************************************
00134      *  Non-API implementation methods
00135      * ************************************************************/
00136 
00137     /*
00138      * The 'addAllXXX' methods are used to initialize the Description Component 
00139      * with its flattened properties - {Interfaces}, {Bindings}, {Services},
00140      * {Element Declarations}, {Type Definitions}. Currently these are non-API
00141      * public helper methods used by the implementation to convert the Element
00142      * model into the Component model (i.e. the Component model is read-only).
00143      * If we need to support programmatic creation/updating of the Component model,
00144      * we will need to consider exposing these methods on the API.
00145      */
00146 
00147     axis2_status_t (AXIS2_CALL *
00148     add_to_all_interfaces) (
00149             void *desc,
00150             const axis2_env_t *env,
00151             void *interface_);
00152 
00153     axis2_status_t (AXIS2_CALL *
00154     add_to_all_bindings) (
00155             void *desc,
00156             const axis2_env_t *env,
00157             void *binding);
00158 
00159     axis2_status_t (AXIS2_CALL *
00160     add_to_all_svcs) (
00161             void *desc,
00162             const axis2_env_t *env,
00163             void *svc);
00164 
00165     axis2_status_t (AXIS2_CALL *
00166     add_to_all_element_decls) (
00167             void *desc,
00168             const axis2_env_t *env,
00169             void *element_decl);
00170 
00171     axis2_status_t (AXIS2_CALL *
00172     add_to_all_type_defs) (
00173             void *desc,
00174             const axis2_env_t *env,
00175             void *type_def);
00176 };
00177 
00178 union woden_desc_base
00179 {
00180     woden_documentable_t documentable;
00181     woden_desc_element_t desc_element;
00182     woden_wsdl_component_t wsdl_component;
00183 };
00184 
00185 struct woden_desc
00186 {
00187     woden_desc_base_t base;
00188     woden_desc_ops_t *ops;
00189 };
00190 
00191 AXIS2_EXTERN woden_desc_t * AXIS2_CALL
00192 woden_desc_create(
00193         const axis2_env_t *env);
00194 
00195 
00196 /***************************Woden C Internal Methods***************************/
00197 AXIS2_EXTERN woden_desc_t * AXIS2_CALL
00198 woden_desc_to_desc_element(
00199         void *desc,
00200         const axis2_env_t *env);
00201 
00202 AXIS2_EXTERN woden_desc_t * AXIS2_CALL
00203 woden_desc_to_documentable_element(
00204         void *desc,
00205         const axis2_env_t *env);
00206 
00207 AXIS2_EXTERN woden_desc_t * AXIS2_CALL
00208 woden_desc_to_documentable(
00209         void *desc,
00210         const axis2_env_t *env);
00211 
00212 AXIS2_EXTERN woden_desc_t * AXIS2_CALL
00213 woden_desc_to_wsdl_obj(
00214         void *desc,
00215         const axis2_env_t *env);
00216 
00217 AXIS2_EXTERN woden_desc_t * AXIS2_CALL
00218 woden_desc_to_wsdl_component(
00219         void *desc,
00220         const axis2_env_t *env);
00221 
00222 AXIS2_EXTERN woden_desc_t * AXIS2_CALL
00223 woden_desc_to_attr_extensible(
00224         void *desc,
00225         const axis2_env_t *env);
00226 
00227 AXIS2_EXTERN woden_desc_t * AXIS2_CALL
00228 woden_desc_to_element_extensible(
00229         void *desc,
00230         const axis2_env_t *env);
00231 
00232 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00233 woden_desc_resolve_methods(
00234         woden_desc_t *desc,
00235         const axis2_env_t *env,
00236         woden_desc_t *desc_impl,
00237         axis2_hash_t *methods);
00238 /************************End of Woden C Internal Methods***********************/
00239 
00240 #define WODEN_DESC_FREE(desc, env) \
00241       (((woden_desc_t *) desc)->ops->free(desc, env))
00242 
00243 #define WODEN_DESC_TO_DESC_FREE(desc, env) \
00244       (((woden_desc_t *) desc)->ops->to_desc_free(desc, env))
00245 
00246 #define WODEN_DESC_SUPER_OBJS(desc, env) \
00247       (((woden_desc_t *) desc)->ops->super_objs(desc, env))
00248 
00249 #define WODEN_DESC_TYPE(desc, env) \
00250       (((woden_desc_t *) desc)->ops->type(desc, env))
00251 
00252 #define WODEN_DESC_GET_BASE_IMPL(desc, env) \
00253       (((woden_desc_t *) desc)->ops->get_base_impl(desc, env))
00254 
00255 #define WODEN_DESC_GET_INTERFACES(desc, env) \
00256       (((woden_desc_t *) desc)->ops->\
00257         get_interfaces (desc, env))
00258 
00259 #define WODEN_DESC_GET_BINDINGS(desc, env) \
00260       (((woden_desc_t *) desc)->ops->\
00261          get_bindings(desc, env))
00262 
00263 #define WODEN_DESC_GET_SVCS(desc, env) \
00264       (((woden_desc_t *) desc)->ops->\
00265          get_svcs(desc, env))
00266 
00267 #define WODEN_DESC_GET_ELEMENT_DECLS(desc, env) \
00268       (((woden_desc_t *) desc)->ops->\
00269          get_element_decls(desc, env))
00270 
00271 #define WODEN_DESC_GET_ELEMENT_DECL(desc, env, qname) \
00272       (((woden_desc_t *) desc)->ops->\
00273         get_element_decl (desc, env, qname))
00274 
00275 #define WODEN_DESC_GET_TYPE_DEFS(desc, env) \
00276       (((woden_desc_t *) desc)->ops->\
00277         get_type_defs (desc, env))
00278 
00279 #define WODEN_DESC_GET_TYPE_DEF(desc, env, qname) \
00280       (((woden_desc_t *) desc)->ops->\
00281         get_type_def (desc, env, qname))
00282 
00283 #define WODEN_DESC_TO_ELEMENT(desc, env) \
00284       (((woden_desc_t *) desc)->ops->\
00285         to_element (desc, env))
00286 
00287 #define WODEN_DESC_ADD_TO_ALL_INTERFACES(desc, env, interface) \
00288       (((woden_desc_t *) desc)->ops->\
00289         add_to_all_interfaces (desc, env, interface))
00290 
00291 #define WODEN_DESC_ADD_TO_ALL_BINDINGS(desc, env, binding) \
00292       (((woden_desc_t *) desc)->ops->\
00293         add_to_all_bindings (desc, env, binding))
00294 
00295 #define WODEN_DESC_ADD_TO_ALL_SVCS(desc, env, svc) \
00296       (((woden_desc_t *) desc)->ops->\
00297         add_to_all_svcs (desc, env, svc))
00298 
00299 #define WODEN_DESC_ADD_TO_ALL_ELEMENT_DECLS(desc, env, element_decl) \
00300       (((woden_desc_t *) desc)->ops->\
00301         add_to_all_element_decls (desc, env, element_decl))
00302 
00303 #define WODEN_DESC_ADD_TO_ALL_TYPE_DEFS(desc, env, type_def) \
00304       (((woden_desc_t *) desc)->ops->\
00305         add_to_all_type_defs (desc, env, type_def))
00306 
00308 #ifdef __cplusplus
00309 }
00310 #endif
00311 #endif /* WODEN_DESC_H */

Generated on Fri Jun 16 18:02:32 2006 for Axis2/C by  doxygen 1.4.2