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

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