axiom_soap_header.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_SOAP_HEADER_H
00019  #define AXIOM_SOAP_HEADER_H
00020  
00025 #include <axis2_env.h>
00026 #include <axiom_node.h>
00027 #include <axiom_element.h>
00028 #include <axis2_array_list.h>
00029 #include <axiom_children_qname_iterator.h>
00030 #include <axiom_children_with_specific_attribute_iterator.h>
00031 #include <axis2_hash.h>
00032 #include <axiom_soap_envelope.h>
00033 
00034 #ifdef __cplusplus
00035 extern "C"
00036 {
00037 #endif
00038     
00039 typedef struct axiom_soap_header  axiom_soap_header_t;
00040 typedef struct axiom_soap_header_ops axiom_soap_header_ops_t;
00041 
00042 struct axiom_soap_header_block;   
00043 struct axiom_soap_builder; 
00044 
00045     
00056     struct axiom_soap_header_ops
00057     {
00065         axis2_status_t (AXIS2_CALL *
00066       free_fn)(axiom_soap_header_t *header,
00067                  const axis2_env_t *env);
00068                                              
00077         struct axiom_soap_header_block* (AXIS2_CALL *
00078       add_header_block)(axiom_soap_header_t* header,
00079                       const axis2_env_t *env,
00080                     const axis2_char_t *localname,
00081                     axiom_namespace_t *ns); 
00092         axis2_hash_t* (AXIS2_CALL *
00093       examine_header_blocks)(axiom_soap_header_t* header,
00094                                const axis2_env_t *env,
00095                                axis2_char_t* param_role);
00105         axis2_array_list_t* (AXIS2_CALL *
00106       get_header_blocks_with_namespace_uri)(axiom_soap_header_t* header,
00107                                               const axis2_env_t *env,
00108                                               const axis2_char_t *ns_uri);
00116         axiom_children_qname_iterator_t* (AXIS2_CALL *
00117       examine_all_header_blocks)(axiom_soap_header_t* header,
00118                                    const axis2_env_t *env);
00128         axiom_children_with_specific_attribute_iterator_t *(AXIS2_CALL *
00129       extract_header_blocks)(axiom_soap_header_t *header,
00130                                const axis2_env_t *env,
00131                                axis2_char_t *role);
00132                                          
00139         axiom_node_t* (AXIS2_CALL *
00140       get_base_node)(axiom_soap_header_t *header,
00141                        const axis2_env_t *env);
00148        int  (AXIS2_CALL *
00149       get_soap_version) (axiom_soap_header_t *header,
00150                           const axis2_env_t *env);
00151         
00152          
00157         axis2_hash_t* (AXIS2_CALL *
00158         get_all_header_blocks)(axiom_soap_header_t *header,
00159                                const axis2_env_t *env);                                                
00165         axis2_status_t (AXIS2_CALL *
00166         remove_header_block)(axiom_soap_header_t *header,
00167                              const axis2_env_t *env,
00168                              axis2_qname_t *qname);
00169         
00170         
00171     };
00172 
00177     struct axiom_soap_header
00178     {
00180         axiom_soap_header_ops_t *ops;
00181        
00182     };
00183 
00191 AXIS2_EXTERN axiom_soap_header_t * AXIS2_CALL
00192 axiom_soap_header_create_with_parent(const axis2_env_t *env,
00193                                      struct axiom_soap_envelope *envelope);
00194                                      
00195 /******************** Macros **************************************************/
00196     
00197     
00199 #define AXIOM_SOAP_HEADER_FREE(header , env) \
00200         ((header)->ops->free_fn(header, env))
00201 
00202 #define AXIOM_SOAP_HEADER_ADD_HEADER_BLOCK(header, env, localname, ns) \
00203         ((header)->ops->add_header_block(header, env, localname, ns))
00204         
00205 #define AXIOM_SOAP_HEADER_EXAMINE_HEADER_BLOCKS(header, env, param_role) \
00206         ((header)->ops->examine_header_blocks(header, env, param_role))
00207 
00208 #define AXIOM_SOAP_HEADER_EXAMINE_ALL_HEADER_BLOCKS(header, env) \
00209         ((header)->ops->examine_all_header_blocks(header, env))
00210         
00211 #define AXIOM_SOAP_HEADER_EXTRACT_HEADER_BLOCKS(header, env, role) \
00212         ((header)->ops->extract_header_blocks(header, env, role))                        
00213 
00214 #define AXIOM_SOAP_HEADER_GET_BASE_NODE(header, env) \
00215         ((header)->ops->get_base_node(header, env)) 
00216        
00217 #define AXIOM_SOAP_HEADER_GET_SOAP_VERSION(header, env) \
00218         ((header)->ops->get_soap_version(header, env))
00219 
00220 #define AXIOM_SOAP_HEADER_GET_HEADER_BLOCKS_WITH_NAMESPACE_URI(header, env, uri)\
00221         ((header)->ops->get_header_blocks_with_namespace_uri(header, env, uri))
00222 
00223 #define AXIOM_SOAP_HEADER_GET_ALL_HEADER_BLOCKS(header, env) \
00224         ((header)->ops->get_all_header_blocks(header, env))
00225         
00226 #define AXIOM_SOAP_HEADER_REMOVE_HEADER_BLOCK(header, env, qname) \
00227         ((header)->ops->remove_header_block(header, env, qname))        
00228 
00230 #ifdef __cplusplus
00231 }
00232 #endif
00233 #endif /* AXIOM_SOAP_HEADER_H */

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