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

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