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

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