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

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