axiom_processing_instruction.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_PI_H
00018 #define AXIOM_PI_H
00019 
00025 #include <axiom_node.h>
00026 #include <axiom_output.h>
00027 
00028 #ifdef __cplusplus
00029 extern "C"
00030 {
00031 #endif
00032 
00033     struct axiom_processing_instruction;
00034     struct axiom_processing_instruction_ops;
00035     
00036     
00048    AXIS2_DECLARE_DATA  typedef struct axiom_processing_instruction_ops
00049     {
00056         axis2_status_t (AXIS2_CALL *
00057         free)(struct axiom_processing_instruction * om_pi,
00058               const axis2_env_t *env);
00066         axis2_status_t (AXIS2_CALL *
00067         set_value)(struct axiom_processing_instruction *om_pi,
00068                    const axis2_env_t *env,
00069                    const axis2_char_t* value);
00079         axis2_status_t (AXIS2_CALL *
00080         set_target)(struct axiom_processing_instruction *om_pi,
00081                     const axis2_env_t *env,
00082                     const axis2_char_t* target);
00089         axis2_char_t* (AXIS2_CALL *
00090         get_target)(struct axiom_processing_instruction *om_pi,
00091                     const axis2_env_t *env);
00098         axis2_char_t* (AXIS2_CALL *
00099         get_value)(struct axiom_processing_instruction *om_pi,
00100                    const axis2_env_t *env);                                                                                                                           
00101                            
00110         axis2_status_t (AXIS2_CALL *
00111         serialize)(struct axiom_processing_instruction *om_pi,
00112                   const axis2_env_t *env, 
00113                   axiom_output_t *om_output);
00114                                     
00115                                           
00116     } axiom_processing_instruction_ops_t;
00117 
00122     typedef struct axiom_processing_instruction
00123     {
00125         axiom_processing_instruction_ops_t *ops;
00126 
00127     } axiom_processing_instruction_t;
00128 
00140     AXIS2_EXTERN axiom_processing_instruction_t * AXIS2_CALL 
00141         axiom_processing_instruction_create (const axis2_env_t *env,
00142                                                 axiom_node_t * parent,
00143                                                 const axis2_char_t * target,
00144                                                 const axis2_char_t * value,
00145                                                 axiom_node_t ** node);
00146 
00147 
00149 #define AXIOM_PROCESSING_INSTRUCTION_FREE(pi, env) \
00150         ((pi)->ops->free(pi, env))
00151 
00152 #define AXIOM_PROCESSING_INSTRUCION_SET_VALUE(pi, env, value) \
00153         ((pi)->ops->set_value(pi,env,value))
00154 
00155 #define AXIOM_PROCESSING_INSTRUCTION_GET_VALUE(pi, env) \
00156         ((pi)->ops->get_value(pi, env))        
00157 
00158 #define AXIOM_PROCESSING_INSTRUCION_SET_TARGET(pi, env, value) \
00159         ((pi)->ops->set_target(pi, env, value))
00160 
00161 #define AXIOM_PROCESSING_INSTRUCTION_GET_TARGET(pi, env) \
00162         ((pi)->ops->get_target(pi, env))
00163 
00164 #define AXIOM_PROCESSING_INSTRUCTION_SERIALIZE(pi, env, om_output) \
00165         ((pi)->ops->serialize(pi, env, om_output))
00166 
00168 #ifdef __cplusplus
00169 }
00170 #endif
00171 
00172 #endif                          /* AXIOM_PI_H */

Generated on Thu Aug 31 17:32:35 2006 for Axis2/C by  doxygen 1.4.6