axiom_text.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_TEXT_H
00018 #define AXIOM_TEXT_H
00019 
00025 #include <axis2_env.h>
00026 #include <axiom_node.h>
00027 #include <axiom_output.h>
00028 #include <axiom_data_handler.h>
00029 
00030 #ifdef __cplusplus
00031 extern "C"
00032 {
00033 #endif
00034 
00035     struct axiom_text;
00036     struct axiom_text_ops;
00037 
00048     typedef struct axiom_text_ops
00049     {
00057         axis2_status_t (AXIS2_CALL *
00058         free) (struct axiom_text *om_text,
00059                const axis2_env_t *env);
00060 
00069         axis2_status_t (AXIS2_CALL *
00070         serialize) (struct axiom_text *om_text,
00071                     const axis2_env_t *env,
00072                     axiom_output_t *om_output);
00081         axis2_status_t (AXIS2_CALL *
00082         set_value)(struct axiom_text *om_text,
00083                    const axis2_env_t *env,
00084                    const axis2_char_t *value);
00091         axis2_char_t* (AXIS2_CALL *
00092         get_value)(struct axiom_text *om_text,
00093                    const axis2_env_t *env);                                               
00101         axis2_status_t (AXIS2_CALL *
00102         set_optimize)(struct axiom_text *om_text,
00103                       const axis2_env_t *env,
00104                       axis2_bool_t optimize);
00105 
00112         axis2_status_t (AXIS2_CALL *
00113         set_is_binary)(struct axiom_text *om_text,
00114                        const axis2_env_t *env,
00115                        axis2_bool_t is_binary);
00116         
00117         axiom_data_handler_t* (AXIS2_CALL *
00118         get_data_handler)(struct axiom_text *om_text,
00119                         const axis2_env_t *env);
00120         
00121         axis2_char_t* (AXIS2_CALL *
00122         get_content_id)(struct axiom_text *om_text,
00123                         const axis2_env_t *env);
00124                                                                                                 
00125     } axiom_text_ops_t;
00126 
00131     typedef struct axiom_text
00132     {
00134         axiom_text_ops_t *ops;
00135 
00136     } axiom_text_t;
00137 
00138 
00150     AXIS2_EXTERN axiom_text_t * AXIS2_CALL 
00151     axiom_text_create (const axis2_env_t *env,
00152                           axiom_node_t *parent,
00153                           const axis2_char_t *value,
00154                           axiom_node_t ** node);
00155                           
00167     AXIS2_EXTERN axiom_text_t* AXIS2_CALL
00168     axiom_text_create_with_data_handler (const axis2_env_t *env,
00169                           axiom_node_t * parent,
00170                           axiom_data_handler_t* data_handler,
00171                           axiom_node_t **node);
00172 
00174 #define AXIOM_TEXT_FREE( om_text,env) \
00175         ((om_text)->ops->free(om_text,env))                          
00176 
00178 #define AXIOM_TEXT_SERIALIZE(om_text, env, om_output) \
00179         ((om_text)->ops->serialize(om_text, env, om_output))
00180 
00181 #define AXIOM_TEXT_GET_VALUE(om_text, env) \
00182         ((om_text)->ops->get_value(om_text, env))
00183 
00184 #define AXIOM_TEXT_SET_VALUE(om_text, env, value) \
00185         ((om_text)->ops->set_value(om_text, env, value))
00186         
00188 #define AXIOM_TEXT_SET_OPTIMIZE(om_text, env, optimize) \
00189         ((om_text)->ops->set_optimize(om_text, env, optimize))
00190 
00192 #define AXIOM_TEXT_SET_IS_BINARY(om_text, env, is_binary) \
00193         ((om_text)->ops->set_is_binary(om_text, env, is_binary))    
00194 
00195 #define AXIOM_TEXT_GET_DATA_HANDLER(om_text, env) \
00196         ((om_text)->ops->get_data_handler(om_text, env))
00197         
00198 #define AXIOM_TEXT_GET_CONTENT_ID(om_text, env) \
00199         ((om_text)->ops->get_content_id(om_text, env))
00200         
00203 #ifdef __cplusplus
00204 }
00205 #endif
00206 
00207 #endif                          /* AXIOM_TEXT_H */

Generated on Thu Oct 26 21:11:23 2006 for Axis2/C by  doxygen 1.4.7