woden_element_decl.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_ELEMENT_DECL_H
00018 #define WODEN_ELEMENT_DECL_H
00019 
00036 #include <axis2_allocator.h>
00037 #include <axis2_env.h>
00038 #include <axis2_error.h>
00039 #include <axis2_string.h>
00040 #include <axis2_utils.h>
00041 #include <axis2_hash.h>
00042 #include <axis2_qname.h>
00043 #include <axis2_uri.h>
00044 #include <axis2_array_list.h>
00045 #include <axis2_generic_obj.h>
00046 #include <woden.h>
00047 
00048 #ifdef __cplusplus
00049 extern "C"
00050 {
00051 #endif
00052 
00053 typedef struct woden_element_decl woden_element_decl_t;
00054 typedef struct woden_element_decl_ops woden_element_decl_ops_t;
00055 struct woden_ext_element;
00056 
00062 struct woden_element_decl_ops
00063 {
00068     axis2_status_t (AXIS2_CALL *
00069     free) (
00070             void *
00071             element_decl,
00072             const axis2_env_t *env);
00073     
00074     axis2_status_t (AXIS2_CALL *
00075     to_element_decl_free) (
00076             void *
00077             element_decl,
00078             const axis2_env_t *env);
00079     
00080     axis2_hash_t *(AXIS2_CALL *
00081     super_objs) (
00082             void *
00083             element_decl,
00084             const axis2_env_t *env);
00085     
00086     woden_obj_types_t (AXIS2_CALL *
00087     type) (
00088             void *element_decl,
00089             const axis2_env_t *env);
00090      
00091     /* ************************************************************
00092      *  Element Declaration interface methods (the WSDL Component model)
00093      * ************************************************************/
00099     axis2_qname_t *(AXIS2_CALL *
00100     get_qname) (
00101             void *decl,
00102             const axis2_env_t *env); 
00103 
00111     axis2_uri_t *(AXIS2_CALL *
00112     get_system) (
00113             void *decl,
00114             const axis2_env_t *env); 
00115 
00132     axis2_char_t *(AXIS2_CALL *
00133     get_content_model) (
00134             void *decl,
00135             const axis2_env_t *env); 
00136 
00145     axis2_generic_obj_t *(AXIS2_CALL *
00146     get_content) (
00147             void *decl,
00148             const axis2_env_t *env); 
00149 
00150     /* ************************************************************
00151      *  Non-API implementation methods
00152      * ************************************************************/
00153 
00154     axis2_status_t (AXIS2_CALL *
00155     set_qname) (
00156             void *decl,
00157             const axis2_env_t *env,
00158             axis2_qname_t *qname); 
00159 
00160     axis2_status_t (AXIS2_CALL *
00161     set_system) (
00162             void *decl,
00163             const axis2_env_t *env,
00164             axis2_uri_t *type_system_uri); 
00165 
00166     axis2_status_t (AXIS2_CALL *
00167     set_content_model) (
00168             void *decl,
00169             const axis2_env_t *env,
00170             axis2_char_t *content_model); 
00171 
00172     axis2_status_t (AXIS2_CALL *
00173     set_content) (
00174             void *decl,
00175             const axis2_env_t *env,
00176             axis2_generic_obj_t *element_content);
00177 
00178 
00179 };
00180 
00181 struct woden_element_decl
00182 {
00183     woden_element_decl_ops_t *ops;
00184 };
00185 
00186 AXIS2_EXTERN woden_element_decl_t * AXIS2_CALL
00187 woden_element_decl_create(const axis2_env_t *env);
00188 
00193 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00194 woden_element_decl_resolve_methods(
00195         woden_element_decl_t *decl,
00196         const axis2_env_t *env,
00197         woden_element_decl_t *decl_impl,
00198         axis2_hash_t *methods);
00199 
00200 #define WODEN_ELEMENT_DECL_FREE(decl, env) \
00201       (((woden_element_decl_t *) decl)->ops->\
00202          free (decl, env))
00203 
00204 #define WODEN_ELEMENT_DECL_TO_ELEMENT_DECL_FREE(decl, \
00205         env) \
00206       (((woden_element_decl_t *) decl)->ops->\
00207          to_element_decl_free (decl, env))
00208 
00209 #define WODEN_ELEMENT_DECL_SUPER_OBJS(decl, env) \
00210       (((woden_element_decl_t *) decl)->ops->\
00211          super_objs (decl, env))
00212 
00213 #define WODEN_ELEMENT_DECL_TYPE(decl, env) \
00214       (((woden_element_decl_t *) decl)->ops->\
00215          type (decl, env))
00216 
00217 #define WODEN_ELEMENT_DECL_GET_QNAME(decl, env) \
00218       (((woden_element_decl_t *) decl)->ops->\
00219          get_qname(decl, env))
00220 
00221 #define WODEN_ELEMENT_DECL_GET_SYSTEM(decl, env) \
00222       (((woden_element_decl_t *) decl)->ops->\
00223          get_system(decl, env))
00224 
00225 #define WODEN_ELEMENT_DECL_GET_CONTENT_MODEL(decl, env) \
00226       (((woden_element_decl_t *) decl)->ops->\
00227          get_content_model(decl, env))
00228 
00229 #define WODEN_ELEMENT_DECL_GET_CONTENT(decl, env) \
00230       (((woden_element_decl_t *) decl)->ops->\
00231          get_content(decl, env))
00232 
00233 #define WODEN_ELEMENT_DECL_SET_QNAME(decl, env, qname) \
00234       (((woden_element_decl_t *) decl)->ops->\
00235          set_qname(decl, env, qname))
00236 
00237 #define WODEN_ELEMENT_DECL_SET_SYSTEM(decl, env, type_system_uri) \
00238       (((woden_element_decl_t *) decl)->ops->\
00239          set_system(decl, env, type_system_uri))
00240 
00241 #define WODEN_ELEMENT_DECL_SET_CONTENT_MODEL(decl, env, content_model) \
00242       (((woden_element_decl_t *) decl)->ops->\
00243          set_content_model(decl, env, content_model))
00244 
00245 #define WODEN_ELEMENT_DECL_SET_CONTENT(decl, env, element_content) \
00246       (((woden_element_decl_t *) decl)->ops->\
00247          set_content(decl, env, element_content))
00248 
00249 
00251 #ifdef __cplusplus
00252 }
00253 #endif
00254 #endif /* WODEN_ELEMENT_DECL_H */

Generated on Tue Oct 3 18:21:10 2006 for Axis2/C by  doxygen 1.4.7