woden_qname_list_attr.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_QNAME_LIST_ATTR_H
00019 #define WODEN_QNAME_LIST_ATTR_H
00020 
00028 #include <woden.h>
00029 #include <woden_xml_attr.h>
00030 #include <axis2_array_list.h>
00031 
00037 typedef struct woden_qname_list_attr woden_qname_list_attr_t;
00038 typedef struct woden_qname_list_attr_ops woden_qname_list_attr_ops_t;
00039 struct axiom_element;
00040 struct axiom_node;
00041 
00042 #ifdef __cplusplus
00043 extern "C"
00044 {
00045 #endif
00046 
00047 struct woden_qname_list_attr_ops
00048 {
00053     axis2_status_t (AXIS2_CALL *
00054     free) (
00055             void *qname_list_attr,
00056             const axis2_env_t *env);
00057     
00058     axis2_status_t (AXIS2_CALL *
00059     to_qname_list_attr_free) (
00060             void *qname_list_attr,
00061             const axis2_env_t *env);
00062     
00063     woden_obj_types_t (AXIS2_CALL *
00064     type) (
00065             void *qname_list_attr,
00066             const axis2_env_t *env);
00067 
00071     woden_xml_attr_t *(AXIS2_CALL *
00072     get_base_impl) (
00073             void *qname_list_attr,
00074             const axis2_env_t *env);
00075 
00076     /* ************************************************************
00077      *  QNameAttr interface declared methods 
00078      * ************************************************************/
00079 
00080     axis2_array_list_t *(AXIS2_CALL *
00081     get_qnames) (
00082             void *qname_list_attr,
00083             const axis2_env_t *env);
00084 
00085     /* ************************************************************
00086      *  Non-API implementation methods 
00087      * ************************************************************/
00088 
00089     /*
00090      * Convert a string of type 'xs:list of QNames' to a java.xml.namespace.QName[].
00091      * A a null argument will return a null value.
00092      * If a QName string in the list causes a conversion error, it will be reported 
00093      * and that QName will not appear in the array. Valid QName strings will still
00094      * be converted, but the object will be marked invalid. If no QName strings can
00095      * be converted, a null value will be returned.
00096      */
00097     void *(AXIS2_CALL *
00098     convert) (
00099             void *qname_list_attr,
00100             const axis2_env_t *env,
00101             struct axiom_element *owner_el,
00102             struct axiom_node *owner_node,
00103             axis2_char_t *attr_value);
00104 
00105   
00106 };
00107 
00108 struct woden_qname_list_attr
00109 {
00110     woden_xml_attr_t base;
00111     woden_qname_list_attr_ops_t *ops;
00112 };
00113 
00114 /*
00115  * TODO This constructor is not used for extension attributes, but may be useful if
00116  * parsing of native WSDL attributes is changed to use the XMLAttr interface.
00117  */
00118 AXIS2_EXTERN woden_qname_list_attr_t * AXIS2_CALL
00119 woden_qname_list_attr_create(
00120         const axis2_env_t *env,
00121         struct axiom_element *owner_el,
00122         struct axiom_node *owner_node,
00123         axis2_qname_t *attr_type,
00124         axis2_char_t *attr_value);
00125 
00126 
00127 /************************Woden C Internal Methods******************************/
00128 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00129 woden_qname_list_attr_resolve_methods(
00130         woden_qname_list_attr_t *qname_list_attr,
00131         const axis2_env_t *env,
00132         axis2_hash_t *methods);
00133 /************************End of Woden C Internal Methods***********************/
00134 
00135 #define WODEN_QNAME_LIST_ATTR_FREE(qname_list_attr, env) \
00136       (((woden_qname_list_attr_t *) qname_list_attr)->ops->free(qname_list_attr, env))
00137 
00138 #define WODEN_QNAME_LIST_ATTR_TO_QNAME_LIST_ATTR_FREE(qname_list_attr, env) \
00139       (((woden_qname_list_attr_t *) qname_list_attr)->ops->\
00140          to_qname_list_attr_free(qname_list_attr, env))
00141 
00142 #define WODEN_QNAME_LIST_ATTR_TYPE(qname_list_attr, env) \
00143       (((woden_qname_list_attr_t *) qname_list_attr)->ops->\
00144          type(qname_list_attr, env))
00145 
00146 #define WODEN_QNAME_LIST_ATTR_GET_BASE_IMPL(qname_list_attr, env) \
00147       (((woden_qname_list_attr_t *) qname_list_attr)->ops->\
00148          get_base_impl(qname_list_attr, env))
00149 
00150 #define WODEN_QNAME_LIST_ATTR_GET_QNAMES(qname_list_attr, env) \
00151       (((woden_qname_list_attr_t *) qname_list_attr)->ops->\
00152          get_qnames(qname_list_attr, env))
00153 
00154 #define WODEN_QNAME_LIST_ATTR_CONVERT(qname_list_attr, env) \
00155       (((woden_qname_list_attr_t *) qname_list_attr)->ops->\
00156          convert(qname_list_attr, env))
00157 
00159 #ifdef __cplusplus
00160 }
00161 #endif
00162 #endif /* WODEN_QNAME_LIST_ATTR_H */

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