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

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