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

Generated on Wed Dec 20 20:34:49 2006 for Axis2/C by  doxygen 1.5.1