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

Generated on Wed Dec 20 20:34:50 2006 for Axis2/C by  doxygen 1.5.1