woden_binding.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_BINDING_H
00018 #define WODEN_BINDING_H
00019 
00028 #include <woden.h>
00029 #include <woden_binding_element.h>
00030 #include <woden_configurable.h>
00031 
00037 typedef union woden_binding_base woden_binding_base_t;
00038 typedef struct woden_binding woden_binding_t;
00039 typedef struct woden_binding_ops woden_binding_ops_t;
00040 
00041 
00042 #ifdef __cplusplus
00043 extern "C"
00044 {
00045 #endif
00046 
00047 struct woden_binding_ops
00048 {
00053     axis2_status_t (AXIS2_CALL *
00054     free) (void *binding,
00055             const axis2_env_t *env);
00056 
00057     axis2_hash_t *(AXIS2_CALL *
00058     super_objs) (void *binding,
00059             const axis2_env_t *env);
00060 
00061     woden_obj_types_t (AXIS2_CALL *
00062     type) (void *binding,
00063             const axis2_env_t *env);
00067     struct woden_configurable *(AXIS2_CALL *
00068     get_base_impl) (
00069             void *binding,
00070             const axis2_env_t *env);
00071 
00072     axis2_qname_t *(AXIS2_CALL *
00073     get_qname) (
00074             void *binding,
00075             const axis2_env_t *env);
00076 
00077     void *(AXIS2_CALL *
00078     get_interface) (
00079             void *binding,
00080             const axis2_env_t *env);
00081 
00082     axis2_uri_t *(AXIS2_CALL *
00083     get_type) (
00084             void *binding,
00085             const axis2_env_t *env);
00086 
00087     axis2_array_list_t *(AXIS2_CALL *
00088     get_binding_faults) (
00089             void *binding,
00090             const axis2_env_t *env);
00091 
00092     axis2_array_list_t *(AXIS2_CALL *
00093     get_binding_ops) (
00094             void *binding,
00095             const axis2_env_t *env);
00096 
00097     void *(AXIS2_CALL *
00098     to_element)  (
00099             void *binding,
00100             const axis2_env_t *env);
00101     /**************************************************************************
00102      *                      Non-API implementation methods
00103      **************************************************************************/
00104     /* 
00105      * Get the binding fault with the specified 'ref' attribute qname.
00106      * 
00107      * TODO decide if this type of qname-based accessor is needed, either internally or on API.
00108      *  
00109      * Note that for this type of key-based access, the choice of List rather than Map makes
00110      * the implementation more complicated. However, the advantage of List is that it avoids the
00111      * null key problem that arises when the binding fault is missing its 'ref' attribute qname.
00112      */
00113     void *(AXIS2_CALL *
00114     get_binding_fault_element) (
00115             void *binding,
00116             const axis2_env_t *env,
00117             axis2_qname_t *qname);
00118 
00119     /*
00120      * Get the binding operation with the specified 'ref' attribute qname.
00121      * 
00122      * TODO decide if this type of qname-based accessor is needed, either internally or on API.
00123      * 
00124      * Note that for this type of key-based access, the choice of List rather than Map makes
00125      * the implementation more complicated. However, the advantage of List is that it avoids the
00126      * null key problem that arises when the binding operation is missing its 'ref' attribute qname.
00127      */
00128     void *(AXIS2_CALL *
00129     get_binding_op_element) (
00130             void *binding,
00131             const axis2_env_t *env,
00132             axis2_qname_t *qname);
00133 
00134     axis2_status_t (AXIS2_CALL *
00135     set_interface_element) (
00136             void *binding,
00137             const axis2_env_t *env,
00138             void *intface);
00139 };
00140 
00141 union woden_binding_base
00142 {
00143     woden_configurable_t configurable;
00144     woden_binding_element_t binding_element;
00145 };
00146 
00147 struct woden_binding
00148 {
00149     woden_binding_base_t base;
00150     woden_binding_ops_t *ops;
00151 };
00152 
00153 AXIS2_EXTERN woden_binding_t * AXIS2_CALL
00154 woden_binding_create(
00155         const axis2_env_t *env);
00156 
00157 
00158 /***************************Woden C Internal Methods***************************/
00159 AXIS2_EXTERN woden_binding_t * AXIS2_CALL
00160 woden_binding_to_binding_element(
00161         void *binding,
00162         const axis2_env_t *env);
00163 
00164 AXIS2_EXTERN woden_binding_t * AXIS2_CALL
00165 woden_binding_to_configurable_element(
00166         void *binding,
00167         const axis2_env_t *env);
00168 
00169 AXIS2_EXTERN woden_binding_t * AXIS2_CALL
00170 woden_binding_to_documentable_element(
00171         void *binding,
00172         const axis2_env_t *env);
00173 
00174 AXIS2_EXTERN woden_binding_t * AXIS2_CALL
00175 woden_binding_to_documentable(
00176         void *binding,
00177         const axis2_env_t *env);
00178 
00179 AXIS2_EXTERN woden_binding_t * AXIS2_CALL
00180 woden_binding_to_configurable(
00181         void *binding,
00182         const axis2_env_t *env);
00183 
00184 AXIS2_EXTERN woden_binding_t * AXIS2_CALL
00185 woden_binding_to_wsdl_obj(
00186         void *binding,
00187         const axis2_env_t *env);
00188 
00189 AXIS2_EXTERN woden_binding_t * AXIS2_CALL
00190 woden_binding_to_nested_element(
00191         void *binding,
00192         const axis2_env_t *env);
00193 
00194 AXIS2_EXTERN woden_binding_t * AXIS2_CALL
00195 woden_binding_to_wsdl_component(
00196         void *binding,
00197         const axis2_env_t *env);
00198 
00199 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00200 woden_binding_resolve_methods(
00201         woden_binding_t *binding,
00202         const axis2_env_t *env,
00203         woden_binding_t *binding_impl,
00204         axis2_hash_t *methods);
00205 /************************End of Woden C Internal Methods***********************/
00206 
00207 #define WODEN_BINDING_FREE(binding, env) \
00208       (((woden_binding_t *) binding)->ops->free(binding, env))
00209 
00210 #define WODEN_BINDING_SUPER_OBJS(binding, env) \
00211       (((woden_binding_t *) binding)->ops->super_objs(binding, env))
00212 
00213 #define WODEN_BINDING_TYPE(binding, env) \
00214       (((woden_binding_t *) binding)->ops->type(binding, env))
00215 
00216 #define WODEN_BINDING_GET_BASE_IMPL(binding, env) \
00217       (((woden_binding_t *) binding)->ops->get_base_impl(binding, env))
00218 
00219 #define WODEN_BINDING_GET_QNAME(binding, env) \
00220       (((woden_binding_t *) binding)->ops->\
00221          get_qname(binding, env))
00222 
00223 #define WODEN_BINDING_GET_INTERFACE(binding, env) \
00224       (((woden_binding_t *) binding)->ops->\
00225          get_interface(binding, env))
00226 
00227 #define WODEN_BINDING_GET_TYPE(binding, env) \
00228       (((woden_binding_t *) binding)->ops->\
00229          get_type(binding, env))
00230 
00231 #define WODEN_BINDING_GET_BINDING_FAULTS(binding, env, qname) \
00232       (((woden_binding_t *) binding)->ops->\
00233          get_binding_faults(binding, env, qname))
00234 
00235 #define WODEN_BINDING_GET_BINDING_OPS(binding, env) \
00236       (((woden_binding_t *) binding)->ops->\
00237          get_binding_ops(binding, env))
00238 
00239 #define WODEN_BINDING_TO_ELEMENT(binding, env) \
00240       (((woden_binding_t *) binding)->ops->\
00241          to_element(binding, env))
00242 
00243 #define WODEN_BINDING_GET_BINDING_FAULT_ELEMENT(binding, env, qname) \
00244       (((woden_binding_t *) binding)->ops->\
00245        get_binding_fault_element  (binding, env, qname))
00246 
00247 #define WODEN_BINDING_GET_BINDING_OP_ELEMENT(binding, env, qname) \
00248       (((woden_binding_t *) binding)->ops->\
00249         get_binding_op_element (binding, env, qname))
00250 
00251 #define WODEN_BINDING_SET_INTERFACE_ELEMENT(binding, env, interface) \
00252       (((woden_binding_t *) binding)->ops->\
00253         set_interface_element (binding, env, interface))
00254 
00256 #ifdef __cplusplus
00257 }
00258 #endif
00259 #endif /* WODEN_BINDING_H */

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