woden_qname_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_ATTR_H
00019 #define WODEN_QNAME_ATTR_H
00020 
00027 #include <woden.h>
00028 #include <woden_xml_attr.h>
00029 
00035 typedef struct woden_qname_attr woden_qname_attr_t;
00036 typedef struct woden_qname_attr_ops woden_qname_attr_ops_t;
00037 struct axiom_element;
00038 struct axiom_node;
00039 
00040 #ifdef __cplusplus
00041 extern "C"
00042 {
00043 #endif
00044 
00045 struct woden_qname_attr_ops
00046 {
00051     axis2_status_t (AXIS2_CALL *
00052     free) (
00053             void *qname_attr,
00054             const axis2_env_t *env);
00055     
00056     axis2_status_t (AXIS2_CALL *
00057     to_qname_attr_free) (
00058             void *qname_attr,
00059             const axis2_env_t *env);
00060     
00061     woden_obj_types_t (AXIS2_CALL *
00062     type) (
00063             void *qname_attr,
00064             const axis2_env_t *env);
00065 
00069     woden_xml_attr_t *(AXIS2_CALL *
00070     get_base_impl) (
00071             void *qname_attr,
00072             const axis2_env_t *env);
00073 
00074     /* ************************************************************
00075      *  QNameAttr interface declared methods 
00076      * ************************************************************/
00077 
00078     axis2_qname_t *(AXIS2_CALL *
00079     get_qname) (
00080             void *qname_attr,
00081             const axis2_env_t *env);
00082 
00083     /* ************************************************************
00084      *  Non-API implementation methods 
00085      * ************************************************************/
00086 
00087     /*
00088      * Convert a string of type xs:QName to a axis2_qname_t.
00089      * A a null argument will return a null value.
00090      * Any conversion error will be reported and a null value will be returned.
00091      */
00092     void *(AXIS2_CALL *
00093     convert) (
00094             void *qname_attr,
00095             const axis2_env_t *env,
00096             struct axiom_element *owner_el,
00097             struct axiom_node *owner_node,
00098             axis2_char_t *attr_value);
00099 
00100   
00101 };
00102 
00103 struct woden_qname_attr
00104 {
00105     woden_xml_attr_t base;
00106     woden_qname_attr_ops_t *ops;
00107 };
00108 
00109 /*
00110  * TODO This constructor is not used for extension attributes, but may be useful if
00111  * parsing of native WSDL attributes is changed to use the XMLAttr interface.
00112  */
00113 AXIS2_EXTERN woden_qname_attr_t * AXIS2_CALL
00114 woden_qname_attr_create(
00115         const axis2_env_t *env,
00116         struct axiom_element *owner_el,
00117         struct axiom_node *owner_node,
00118         axis2_qname_t *attr_type,
00119         axis2_char_t *attr_value);
00120 
00121 
00122 /************************Woden C Internal Methods******************************/
00123 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00124 woden_qname_attr_resolve_methods(
00125         woden_qname_attr_t *qname_attr,
00126         const axis2_env_t *env,
00127         axis2_hash_t *methods);
00128 /************************End of Woden C Internal Methods***********************/
00129 
00130 #define WODEN_QNAME_ATTR_FREE(qname_attr, env) \
00131       (((woden_qname_attr_t *) qname_attr)->ops->free(qname_attr, env))
00132 
00133 #define WODEN_QNAME_ATTR_TO_QNAME_ATTR_FREE(qname_attr, env) \
00134       (((woden_qname_attr_t *) qname_attr)->ops->\
00135          to_qname_attr_free(qname_attr, env))
00136 
00137 #define WODEN_QNAME_ATTR_TYPE(qname_attr, env) \
00138       (((woden_qname_attr_t *) qname_attr)->ops->type(qname_attr, env))
00139 
00140 #define WODEN_QNAME_ATTR_GET_BASE_IMPL(qname_attr, env) \
00141       (((woden_qname_attr_t *) qname_attr)->ops->get_base_impl(qname_attr, \
00142                                                                         env))
00143 
00144 #define WODEN_QNAME_ATTR_GET_QNAME(qname_attr, env) \
00145       (((woden_qname_attr_t *) qname_attr)->ops->get_qname(qname_attr, \
00146                                                                     env))
00147 
00148 #define WODEN_QNAME_ATTR_CONVERT(qname_attr, env) \
00149       (((woden_qname_attr_t *) qname_attr)->ops->convert(qname_attr, \
00150                                                                        env))
00151 
00153 #ifdef __cplusplus
00154 }
00155 #endif
00156 #endif /* WODEN_QNAME_ATTR_H */

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