axiom_soap_header_block.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_BLOCK_H
00018  #define AXIOM_SOAP_HEADER_BLOCK_H
00019 
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_soap_header.h>
00030 
00031 #ifdef __cplusplus
00032 extern "C"
00033 {
00034 #endif
00035 
00036     typedef struct axiom_soap_header_block axiom_soap_header_block_t;
00037     typedef struct axiom_soap_header_block_ops axiom_soap_header_block_ops_t;
00038     
00049     struct axiom_soap_header_block_ops
00050     {
00058         axis2_status_t (AXIS2_CALL *
00059       free_fn)(axiom_soap_header_block_t *header_block,
00060                  const axis2_env_t *env);
00061                                              
00062         axis2_status_t (AXIS2_CALL *
00063       set_role)(axiom_soap_header_block_t *header_block,
00064                   const axis2_env_t *env,
00065                   axis2_char_t *uri);  
00066         
00067         axis2_status_t (AXIS2_CALL *
00068       set_must_understand_with_bool)(axiom_soap_header_block_t *header_block,
00069                                       const axis2_env_t *env,
00070                                        axis2_bool_t must_understand);
00071                              
00072         axis2_status_t (AXIS2_CALL *
00073       set_must_understand_with_string)(axiom_soap_header_block_t *header_block,
00074                                        const axis2_env_t *env,
00075                                        axis2_char_t *must_understand);
00076                                              
00077         axis2_bool_t (AXIS2_CALL *
00078       get_must_understand)(axiom_soap_header_block_t *header_block,
00079                              const axis2_env_t *env);
00080                              
00081                              
00082         axis2_bool_t (AXIS2_CALL *
00083       is_processed)(axiom_soap_header_block_t *header_block,
00084                       const axis2_env_t *env);
00085                              
00086         axis2_status_t (AXIS2_CALL *
00087       set_processed)(axiom_soap_header_block_t *header_block,
00088                        const axis2_env_t *env);
00089                   
00090         axis2_char_t* (AXIS2_CALL *
00091       get_role)(axiom_soap_header_block_t *header_block,
00092                   const axis2_env_t *env);
00093           
00094         axis2_status_t (AXIS2_CALL *
00095       set_attribute)(axiom_soap_header_block_t *header_block,
00096                        const axis2_env_t *env,
00097                        axis2_char_t *attr_name,
00098                        axis2_char_t *attr_value,
00099                        axis2_char_t *soap_envelope_namespace_uri);
00100                   
00101                              
00102         axis2_char_t* (AXIS2_CALL *
00103       get_attribute)(axiom_soap_header_block_t *header_block,
00104                        const axis2_env_t *env,
00105                        axis2_char_t *attr_name,
00106                        axis2_char_t *soap_envelope_namespace_uri);                            
00107                                        
00108                                               
00109         axiom_node_t* (AXIS2_CALL *
00110       get_base_node)(axiom_soap_header_block_t *header_block,
00111                        const axis2_env_t *env);
00112         
00113         int (AXIS2_CALL *
00114       get_soap_version)(axiom_soap_header_block_t *header_block,
00115                           const axis2_env_t *env);
00116 
00117     };
00118 
00123     struct axiom_soap_header_block
00124     {
00126         axiom_soap_header_block_ops_t *ops;
00127        
00128     };
00129 
00137 AXIS2_EXTERN axiom_soap_header_block_t * AXIS2_CALL
00138 axiom_soap_header_block_create_with_parent(const axis2_env_t *env,
00139                                            const axis2_char_t *localname,
00140                                            axiom_namespace_t *ns,
00141                                            struct axiom_soap_header *parent);
00142                             
00143 /******************** Macros **************************************************/
00144     
00146 #define AXIOM_SOAP_HEADER_BLOCK_FREE(header_block , env) \
00147         ((header_block)->ops->free_fn(header_block, env))
00148         
00149 #define AXIOM_SOAP_HEADER_BLOCK_GET_ROLE(header_block , env) \
00150         ((header_block)->ops->get_role(header_block, env))
00151 
00152 #define AXIOM_SOAP_HEADER_BLOCK_IS_PROCESSED(header_block , env) \
00153         ((header_block)->ops->is_processed(header_block, env))
00154 
00155 #define AXIOM_SOAP_HEADER_BLOCK_SET_PRECESSED(header_block , env) \
00156         ((header_block)->ops->set_processed(header_block, env))
00157         
00158 #define AXIOM_SOAP_HEADER_BLOCK_GET_MUST_UNDERSTAND(header_block, env) \
00159         ((header_block)->ops->get_must_understand(header_block, env)) 
00160 
00161 #define AXIOM_SOAP_HEADER_BLOCK_SET_MUST_UNDERSTAND_WITH_BOOL(header_block,\
00162              env, must_understand) \
00163         ((header_block)->ops->set_must_understand_with_bool(header_block, \
00164              env, must_understand)) 
00165              
00166 #define AXIOM_SOAP_HEADER_BLOCK_SET_MUST_UNDERSTAND_WITH_STRING(header_block,\
00167              env, must_understand) \
00168         ((header_block)->ops->set_must_understand_with_string(header_block, \
00169              env, must_understand))                    
00170 
00171 #define AXIOM_SOAP_HEADER_BLOCK_GET_BASE_NODE(header_block, env) \
00172         ((header_block)->ops->get_base_node(header_block, env))   
00173         
00174 #define AXIOM_SOAP_HEADER_BLOCK_GET_SOAP_VERSION(header_block, env) \
00175         ((header_block)->ops->get_soap_version(header_block, env))
00176         
00177 #define AXIOM_SOAP_HEADER_BLOCK_GET_ATTRIBUTE(header_block, env,\
00178             attr_name, soap_envelope_namespace_uri)  \
00179         ((header_block)->ops->get_attribute(header_block, env, \
00180             attr_name, soap_envelope_namespace_uri))
00181             
00182 #define AXIOM_SOAP_HEADER_BLOCK_SET_ATTRIBUTE(header_block, env,\
00183             attr_name, soap_envelope_namespace_uri)  \
00184         ((header_block)->ops->set_attribute(header_block, env, \
00185             attr_name, soap_envelope_namespace_uri))            
00186 
00189 #ifdef __cplusplus
00190 }
00191 #endif
00192 #endif /* AXIOM_SOAP_HEADER_BLOCK_H */

Generated on Thu Oct 26 21:00:11 2006 for Axis2/C by  doxygen 1.4.7