woden_ext_element.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_EXT_ELEMENT_H
00018 #define WODEN_EXT_ELEMENT_H
00019 
00035 #include <axis2_allocator.h>
00036 #include <axis2_env.h>
00037 #include <axis2_error.h>
00038 #include <axis2_string.h>
00039 #include <axis2_utils.h>
00040 #include <axis2_hash.h>
00041 #include <axis2_qname.h>
00042 #include <woden.h>
00043 
00044 #ifdef __cplusplus
00045 extern "C"
00046 {
00047 #endif
00048 
00049 typedef struct woden_ext_element woden_ext_element_t;
00050 typedef struct woden_ext_element_ops woden_ext_element_ops_t;
00051 struct axis2_xml_ext_element;
00052 struct axis2_uri;
00053 
00059 struct woden_ext_element_ops
00060 {
00065     axis2_status_t (AXIS2_CALL *
00066     free) (void *ext_element,
00067             const axis2_env_t *env);
00068     
00069     woden_obj_types_t (AXIS2_CALL *
00070     type) (
00071             void *ext_element,
00072             const axis2_env_t *env);
00073 
00074 
00075     axis2_status_t (AXIS2_CALL *
00076     set_ext_type) (void *ext_element,
00077                         const axis2_env_t *env,
00078                         axis2_qname_t *qname);
00079 
00080     axis2_qname_t *(AXIS2_CALL *
00081     get_ext_type) (void *ext_element,
00082                         const axis2_env_t *env);
00083 
00084     axis2_status_t (AXIS2_CALL *
00085     set_required) (void *ext_element,
00086                         const axis2_env_t *env,
00087                         axis2_bool_t required);
00088 
00089     axis2_bool_t (AXIS2_CALL *
00090     is_required) (void *ext_element,
00091                         const axis2_env_t *env);
00092 
00093 };
00094 
00095 struct woden_ext_element
00096 {
00097     woden_ext_element_ops_t *ops;
00098 };
00099 
00100 AXIS2_EXTERN woden_ext_element_t * AXIS2_CALL
00101 woden_ext_element_create(const axis2_env_t *env);
00102 
00107 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00108 woden_ext_element_resolve_methods(
00109         woden_ext_element_t *ext_element,
00110         const axis2_env_t *env,
00111         axis2_hash_t *methods);
00112 
00113 #define WODEN_EXT_ELEMENT_FREE(ext_element, env) \
00114       (((woden_ext_element_t *) ext_element)->ops->free (ext_element, env))
00115 
00116 #define WODEN_EXT_ELEMENT_ELEMENT_TYPE(ext_element, env) \
00117       (((woden_ext_element_t *) ext_element)->ops->\
00118          type (ext_element, env))
00119 
00120 #define WODEN_EXT_ELEMENT_SET_EXT_TYPE(ext_element, env, qname) \
00121       (((woden_ext_element_t *) ext_element)->ops->set_ext_type(ext_element, env, \
00122                                                                qname))
00123 
00124 #define WODEN_EXT_ELEMENT_GET_EXT_TYPE(ext_element, env) \
00125       (((woden_ext_element_t *) ext_element)->ops->get_ext_type(ext_element, env))
00126 
00127 #define WODEN_EXT_ELEMENT_SET_REQUIRED(ext_element, env, required) \
00128       (((woden_ext_element_t *) ext_element)->ops->set_required(ext_element, env, \
00129                                                              required))
00130 
00131 #define WODEN_EXT_ELEMENT_IS_REQUIRED(ext_element, env) \
00132       (((woden_ext_element_t *) ext_element)->ops->is_required(ext_element, env))
00133 
00134 
00136 #ifdef __cplusplus
00137 }
00138 #endif
00139 #endif /* WODEN_EXT_ELEMENT_H */

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