Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Examples

axiom_document.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 AXIOM_DOCUMENT_H
00018 #define AXIOM_DOCUMENT_H
00019 
00020 #include <axis2_env.h>
00021 #include <axiom_node.h>
00022 #include <axis2_utils_defines.h>
00023 #include <axiom_output.h>
00024 
00025 #ifdef __cplusplus
00026 extern "C"
00027 {
00028 #endif
00029 
00030 
00036 #define CHAR_SET_ENCODING "UTF-8"
00037 #define XML_VERSION   "1.0"
00038 
00039     struct axiom_document; 
00040     struct axiom_document_ops;
00041     struct axiom_stax_builder;
00042 
00053  AXIS2_DECLARE_DATA   typedef struct axiom_document_ops
00054     {
00055 
00062         axis2_status_t (AXIS2_CALL *
00063         free) (struct axiom_document *document,
00064                const axis2_env_t *env);
00065 
00072       axiom_node_t* (AXIS2_CALL *
00073       build_next) (struct axiom_document *document,
00074                    const axis2_env_t *env);
00075 
00083         axiom_node_t* (AXIS2_CALL *
00084         get_root_element)(struct axiom_document *document,
00085                           const axis2_env_t *env);
00086 
00095         axis2_status_t (AXIS2_CALL *
00096         set_root_element)(struct axiom_document *document,
00097                           const axis2_env_t *env,
00098                           axiom_node_t *om_node);
00105         axiom_node_t* (AXIS2_CALL *
00106         build_all)(struct axiom_document *document,
00107                    const axis2_env_t *env); 
00113         struct axiom_stax_builder* (AXIS2_CALL *
00114         get_builder)(struct axiom_document *document,
00115                      const axis2_env_t *env);                                                         
00120         axis2_status_t (AXIS2_CALL *
00121         serialize)(struct axiom_document *document,
00122                    const axis2_env_t *env,
00123                    axiom_output_t *om_output);
00124                                                            
00125     } axiom_document_ops_t;
00126 
00131     typedef struct axiom_document
00132     {
00134         axiom_document_ops_t *ops;
00135       
00136     } axiom_document_t;
00137 
00145     AXIS2_EXTERN axiom_document_t * AXIS2_CALL
00146     axiom_document_create (const axis2_env_t *env,
00147                               axiom_node_t * root,
00148                               struct axiom_stax_builder *builder);
00149 
00151 #define AXIOM_DOCUMENT_FREE(document,env) \
00152         ((document)->ops->free(document,env))
00153         
00155 #define AXIOM_DOCUMENT_BUILD_NEXT(document,env) \
00156         ((document)->ops->build_next(document,env))
00157         
00159 #define AXIOM_DOCUMENT_GET_ROOT_ELEMENT(document,env) \
00160         ((document)->ops->get_root_element(document,env))
00161 
00162 #define AXIOM_DOCUMENT_SET_ROOT_ELEMENT(document,env,om_node) \
00163         ((document)->ops->set_root_element(document,env,om_node))
00164                
00166 #define AXIOM_DOCUMENT_BUILD_ALL(document,env) \
00167         ((document)->ops->build_all(document,env))
00168         
00170 #define AXIOM_DOCUMENT_GET_BUILDER(document, env) \
00171         ((document)->ops->get_builder(document, env))
00172         
00174 #define AXIOM_DOCUMENT_SERIALIZE(document, env, om_output) \
00175         ((document)->ops->serialize(document, env, om_output))                
00176 
00179 #ifdef __cplusplus
00180 }
00181 #endif
00182 
00183 #endif /* AXIOM_DOCUMENT_H */

Generated on Fri Jun 16 18:02:30 2006 for Axis2/C by  doxygen 1.4.2