Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Examples

axis2_options.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 AXIS2_OPTIONS_H
00018 #define AXIS2_OPTIONS_H
00019 
00020 
00026 #include <axis2_defines.h>
00027 #include <axis2_env.h>
00028 #include <axis2_transport_in_desc.h>
00029 #include <axis2_endpoint_ref.h>
00030 #include <axis2_hash.h>
00031 #include <axis2_relates_to.h>
00032 #include <axis2_transport_out_desc.h>
00033 #include <axis2_transport_receiver.h> /*still in modules/core/transports*/
00034 #include <axiom_element.h>
00035 #include <axis2_msg_info_headers.h>
00036 
00037 #define AXIS2_DEFAULT_TIMEOUT_MILLISECONDS 30000
00038 #define AXIS2_COPY_PROPERTIES   "copy_properties"
00039 
00040 #ifdef __cplusplus
00041 extern "C"
00042 {
00043 #endif
00044 
00050 typedef struct axis2_options_ops axis2_options_ops_t;
00051 typedef struct axis2_options axis2_options_t; 
00052 
00057 struct axis2_options_ops
00058 {
00059    axis2_char_t* (AXIS2_CALL *
00060    get_action)(struct axis2_options *options,
00061             const axis2_env_t *env);
00062 
00063    
00064    axis2_endpoint_ref_t* (AXIS2_CALL *
00065    get_fault_to)(struct axis2_options *options,
00066                const axis2_env_t *env);
00067 
00068    
00069    axis2_endpoint_ref_t* (AXIS2_CALL *
00070    get_from)(struct axis2_options *options,
00071          const axis2_env_t *env);
00072 
00073       axis2_transport_receiver_t* (AXIS2_CALL *
00074    get_transport_receiver)(struct axis2_options *options,
00075                      const axis2_env_t *env);
00076    
00077                      
00078    axis2_transport_in_desc_t* (AXIS2_CALL *
00079    get_transport_in)(struct axis2_options *options,
00080                      const axis2_env_t *env);      
00081 
00082    const axis2_char_t* (AXIS2_CALL *
00083    get_transport_in_protocol)(struct axis2_options *options,
00084                         const axis2_env_t *env);
00085 
00086    axis2_char_t* (AXIS2_CALL *
00087    get_message_id)(struct axis2_options *options,
00088                const axis2_env_t *env);
00089 
00090    axis2_hash_t* (AXIS2_CALL *
00091    get_properties)(struct axis2_options *options,
00092                const axis2_env_t *env);   
00093 
00098    void* (AXIS2_CALL *
00099    get_property)(struct axis2_options *options,
00100                const axis2_env_t *env,
00101                axis2_char_t *key);
00102 
00103    axis2_relates_to_t* (AXIS2_CALL *
00104    get_relates_to)(struct axis2_options *options,
00105                const axis2_env_t *env);
00106 
00107    
00108    axis2_endpoint_ref_t* (AXIS2_CALL *
00109    get_reply_to)(struct axis2_options *options,
00110                const axis2_env_t *env);
00111 
00112    axis2_transport_out_desc_t* (AXIS2_CALL *
00113    get_transport_out)(struct axis2_options *options,
00114                   const axis2_env_t *env);
00115 
00116    axis2_char_t* (AXIS2_CALL *
00117    get_sender_transport_protocol)(struct axis2_options *options,
00118                            const axis2_env_t *env);
00119 
00120    const axis2_char_t* (AXIS2_CALL *
00121    get_soap_version_uri)(struct axis2_options *options,
00122                      const axis2_env_t *env);
00123 
00124 
00131    long (AXIS2_CALL *
00132    get_timeout_in_milli_seconds)(struct axis2_options *options,
00133                            const axis2_env_t *env);
00134 
00135    axis2_endpoint_ref_t* (AXIS2_CALL *
00136    get_to)(struct axis2_options *options,
00137                const axis2_env_t *env);
00138 
00141    axis2_bool_t (AXIS2_CALL *
00142    is_use_seperate_listener)(struct axis2_options *options,
00143                         const axis2_env_t *env);
00144 
00145    struct axis2_options * (AXIS2_CALL *
00146    get_parent)(struct axis2_options *options,
00147             const axis2_env_t *env);
00148 
00149    void (AXIS2_CALL *
00150    set_parent)(struct axis2_options *options,
00151                const axis2_env_t *env,
00152                struct axis2_options *parent);
00153 
00154    void (AXIS2_CALL *
00155    set_action)(struct axis2_options *options,
00156             const axis2_env_t *env,
00157             const axis2_char_t *action);
00158 
00159    void (AXIS2_CALL *
00160    set_fault_to)(struct axis2_options *options,
00161             const axis2_env_t *env,
00162             axis2_endpoint_ref_t *fault_to);
00163 
00164    void (AXIS2_CALL *
00165    set_from)(struct axis2_options *options,
00166             const axis2_env_t *env,
00167             axis2_endpoint_ref_t *from);
00168 
00169    void (AXIS2_CALL *
00170    set_to)(struct axis2_options *options,
00171             const axis2_env_t *env,
00172             axis2_endpoint_ref_t *to);
00173 
00174       void (AXIS2_CALL *
00175    set_transport_receiver)(struct axis2_options *options,
00176                       const axis2_env_t *env,
00177                      axis2_transport_receiver_t *receiver);
00178 
00179    void (AXIS2_CALL *
00180    set_transport_in)(struct axis2_options *options,
00181                   const axis2_env_t *env,
00182                   axis2_transport_in_desc_t *transport_in);
00183 
00184    void (AXIS2_CALL *
00185    set_transport_in_protocol)(struct axis2_options *options,
00186                         const axis2_env_t *env,
00187                         axis2_char_t *transport_in_protocol);
00188 
00189       
00190    void (AXIS2_CALL *
00191    set_message_id)(struct axis2_options *options,
00192                const axis2_env_t *env,
00193                axis2_char_t *message_id);
00194 
00195    
00206    axis2_status_t (AXIS2_CALL *
00207    set_properties)(struct axis2_options *options,
00208                const axis2_env_t *env,
00209                axis2_hash_t *properties);
00210 
00220    void (AXIS2_CALL *
00221    set_property)(struct axis2_options *options,
00222                const axis2_env_t *env,
00223                const axis2_char_t *property_key,
00224                const void *property);      
00225             
00226 
00227    void (AXIS2_CALL *
00228    set_relates_to)(struct axis2_options *options,
00229                const axis2_env_t *env,
00230                axis2_relates_to_t *relates_to);
00231 
00232    void (AXIS2_CALL *
00233    set_reply_to)(struct axis2_options *options,
00234                const axis2_env_t *env,
00235                axis2_endpoint_ref_t *reply_to);
00236 
00237    void (AXIS2_CALL *
00238    set_transport_out)(struct axis2_options *options,
00239                   const axis2_env_t *env,
00240                   axis2_transport_out_desc_t *transport_out);
00241 
00242    axis2_status_t (AXIS2_CALL *
00243    set_sender_transport)(struct axis2_options *options,
00244                      const axis2_env_t *env,
00245                      axis2_char_t *sender_transport,
00246                      axis2_conf_t *conf);
00247    
00248    void (AXIS2_CALL *   
00249    set_soap_version_uri)(struct axis2_options *options,
00250                      const axis2_env_t *env,
00251                      const axis2_char_t *soap_version_uri);
00252 
00253    void (AXIS2_CALL *
00254    set_timeout_in_milli_seconds)(struct axis2_options *options,
00255                            const axis2_env_t *env,
00256                            long timeout_in_milli_seconds);
00257    
00258 
00259    axis2_status_t (AXIS2_CALL *
00260    set_transport_info)(struct axis2_options *options,
00261                   const axis2_env_t *env,
00262                   axis2_char_t *sender_transport,
00263                   axis2_char_t *receiver_transport,
00264                   axis2_bool_t use_seperate_listener);
00265 
00266    void (AXIS2_CALL *
00267    set_use_seperate_listener)(struct axis2_options *options,
00268                         const axis2_env_t *env,
00269                         axis2_bool_t use_seperate_listener);
00270 
00271    void (AXIS2_CALL *   
00272    add_reference_parameter)(struct axis2_options *options,
00273                      const axis2_env_t *env,
00274                      axiom_node_t *reference_parameter);
00275 
00276    axis2_bool_t (AXIS2_CALL *   
00277    is_manage_session)(struct axis2_options *options,
00278                      const axis2_env_t *env);
00279 
00280 
00281    void (AXIS2_CALL *   
00282    set_manage_session)(struct axis2_options *options,
00283                      const axis2_env_t *env,
00284                      axis2_bool_t manage_session);
00285 
00290    axis2_msg_info_headers_t* (AXIS2_CALL *   
00291    get_msg_info_headers)(struct axis2_options *options,
00292                      const axis2_env_t *env);
00293 
00294     int (AXIS2_CALL *
00295     get_soap_version)(
00296         struct axis2_options *options,
00297         const axis2_env_t *env);
00298 
00299     axis2_status_t (AXIS2_CALL *
00300     set_soap_version)(
00301         struct axis2_options *options,
00302         const axis2_env_t *env,
00303         int soap_version);
00304 
00305     axis2_status_t (AXIS2_CALL *
00306     set_enable_mtom)(
00307         struct axis2_options *options,
00308         const axis2_env_t *env,
00309         axis2_bool_t enable_mtom);
00310 
00311     axis2_bool_t (AXIS2_CALL *
00312     get_enable_mtom)(
00313         struct axis2_options *options,
00314         const axis2_env_t *env);
00315 
00316    axis2_status_t (AXIS2_CALL *   
00317    free)(struct axis2_options *options,
00318                      const axis2_env_t *env);
00319 };
00320 
00325 struct axis2_options
00326 {
00327     axis2_options_ops_t *ops;    
00328 };
00329 
00330 AXIS2_EXTERN axis2_options_t* AXIS2_CALL axis2_options_create(const axis2_env_t *env);
00331 
00332 AXIS2_EXTERN axis2_options_t* AXIS2_CALL axis2_options_create_with_parent(const axis2_env_t *env,
00333                                                    axis2_options_t *parent);
00334     
00335 /************************** Start of function macros **************************/
00336 
00337 #define AXIS2_OPTIONS_GET_ACTION(options, env) \
00338       ((options)->ops->get_action(options, env))
00339        
00340 #define AXIS2_OPTIONS_GET_FAULT_TO(options, env) \
00341       ((options)->ops->get_fault_to(options, env))
00342 
00343 #define AXIS2_OPTIONS_GET_FROM(options, env) \
00344       ((options)->ops->get_from(options, env))
00345 
00346 #define AXIS2_OPTIONS_GET_TRANSPORT_RECEIVER(options, env) \
00347       ((options)->ops->get_transport_receiver(options, env))
00348 
00349 #define AXIS2_OPTIONS_GET_TRANSPORT_IN(options, env) \
00350       ((options)->ops->get_transport_in(options, env))   
00351 
00352 #define AXIS2_OPTIONS_GET_TRANSPORT_IN_PROTOCOL(options, env) \
00353       ((options)->ops->get_transport_in_protocol(options, env))
00354 
00355 #define AXIS2_OPTIONS_GET_MESSAGE_ID(options, env) \
00356       ((options)->ops->get_message_id(options, env))
00357 
00358 #define AXIS2_OPTIONS_GET_PROPERTIES(options, env) \
00359       ((options)->ops->get_properties(options, env))
00360 
00361 #define AXIS2_OPTIONS_GET_PROPERTY(options, env, key) \
00362       ((options)->ops->get_property(options, env, key))
00363 
00364 #define AXIS2_OPTIONS_GET_RELATES_TO(options, env) \
00365       ((options)->ops->get_relates_to(options, env))
00366 
00367 #define AXIS2_OPTIONS_GET_REPLY_TO(options, env) \
00368       ((options)->ops->get_reply_to(options, env))
00369 
00370 #define AXIS2_OPTIONS_GET_TRANSPORT_OUT(options, env) \
00371       ((options)->ops->get_transport_out(options, env))
00372 
00373 #define AXIS2_OPTIONS_GET_SENDER_PROTOCOL(options, env) \
00374       ((options)->ops->get_sender_transport_protocol(options, env))
00375 
00376 #define AXIS2_OPTIONS_GET_SOAP_VERSION_URI(options, env) \
00377       ((options)->ops->get_soap_version_uri(options, env))
00378 
00379 #define AXIS2_OPTIONS_GET_TIMEOUT_IN_MILLI_SECONDS(options, env) \
00380       ((options)->ops->get_timeout_in_milli_seconds(options, env))
00381 
00382 #define AXIS2_OPTIONS_GET_TO(options, env) \
00383       ((options)->ops->get_to(options, env))
00384 
00385 #define AXIS2_OPTIONS_IS_USE_SEPERATE_LISTENER(options, env) \
00386       ((options)->ops->is_use_seperate_listener(options, env))
00387 
00388 #define AXIS2_OPTIONS_GET_PARENT(options, env) \
00389       ((options)->ops->get_parent(options, env))
00390 
00391 #define AXIS2_OPTIONS_SET_PARENT(options, env, parent) \
00392       ((options)->ops->set_parent(options, env, parent))
00393 
00394 #define AXIS2_OPTIONS_SET_ACTION(options, env, action) \
00395       ((options)->ops->set_action(options, env, action))
00396 
00397 #define AXIS2_OPTIONS_SET_FAULT_TO(options, env, fault_to) \
00398       ((options)->ops->set_fault_to(options, env, fault_to))
00399 
00400 #define AXIS2_OPTIONS_SET_FROM(options, env, from) \
00401       ((options)->ops->set_from(options, env, from))
00402 
00403 #define AXIS2_OPTIONS_SET_TO(options, env, to) \
00404       ((options)->ops->set_to(options, env, to))
00405 
00406 #define AXIS2_OPTIONS_SET_TRANSPORT_RECEIVER(options, env, receiver) \
00407       ((options)->ops->set_transport_receiver(options, env, receiver))
00408 
00409 #define AXIS2_OPTIONS_SET_TRANSPORT_IN(options, env, transport_in) \
00410       ((options)->ops->set_transport_in(options, env, transport_in))
00411 
00412 #define AXIS2_OPTIONS_SET_TRANSPORT_IN_PROTOCOL(options, env, transport_in_protocol) \
00413       ((options)->ops->set_transport_in_protocol(options, env, transport_in_protocol))
00414 
00415 #define AXIS2_OPTIONS_SET_MESSAGE_ID(options, env, message_id) \
00416       ((options)->ops->set_message_id(options, env, message_id))
00417 
00418 #define AXIS2_OPTIONS_SET_PROPERTIES(options, env, properties) \
00419       ((options)->ops->set_properties(options, env, properties))
00420 
00421 #define AXIS2_OPTIONS_SET_PROPERTY(options, env, key, property) \
00422       ((options)->ops->set_property(options, env, key, property))
00423 
00424 #define AXIS2_OPTIONS_SET_RELATES_TO(options, env, relates_to) \
00425       ((options)->ops->set_relates_to(options, env, relates_to))
00426 
00427 #define AXIS2_OPTIONS_SET_REPLY_TO(options, env, reply_to) \
00428       ((options)->ops->set_reply_to(options, env, reply_to))
00429       
00430 #define AXIS2_OPTIONS_SET_TRANSPORT_OUT(options, env, transport_out) \
00431       ((options)->ops->set_transport_out(options, env, transport_out))
00432 
00433 #define AXIS2_OPTIONS_SET_SENDER_TRANSPORT(options, env, sender_transport, conf) \
00434       ((options)->ops->set_sender_transport(options, env, sender_transport, conf))
00435 
00436 #define AXIS2_OPTIONS_SET_SOAP_VERSION_URI(options, env, soap_version_uri) \
00437       ((options)->ops->set_soap_version_uri(options, env, soap_version_uri))
00438 
00439 #define AXIS2_OPTIONS_SET_TIMEOUT_IN_MILLI_SECONDS(options, env, timeout_in_milli_seconds) \
00440       ((options)->ops->set_timeout_in_milli_seconds(options, env, timeout_in_milli_seconds))
00441 
00442 #define AXIS2_OPTIONS_SET_TRANSPORT_INFO(options, env, sender_transport, receiver_transport, user_seperate_listener) \
00443       ((options)->ops->set_tranport_info(options, env, sender_transport, receiver_transport, user_seperate_listener))
00444 
00445 #define AXIS2_OPTIONS_SET_USE_SEPERATE_LISTENER(options, env, use_seperate_listener) \
00446       ((options)->ops->set_use_seperate_listener(options, env, use_seperate_listener))
00447 
00448 #define AXIS2_OPTIONS_ADD_REFERENCE_PARAMETER(options, env, reference_parameter) \
00449       ((options)->ops->add_reference_parameter(options, env, reference_parameter))
00450 
00451 #define AXIS2_OPTIONS_IS_MANAGE_SESSION(options, env) \
00452       ((options)->ops->is_manage_session(options, env))
00453 
00454 #define AXIS2_OPTIONS_SET_MANAGE_SESSION(options, env, manage_session) \
00455       ((options)->ops->set_manage_session(options, env, manage_session))
00456 
00457 #define AXIS2_OPTIONS_GET_MSG_INFO_HEADERS(options, env) \
00458       ((options)->ops->get_msg_info_headers(options, env))
00459 
00460 #define AXIS2_OPTIONS_SET_SOAP_VERSION(options, env, soap_version) \
00461       ((options)->ops->set_soap_version(options, env, soap_version))
00462 
00463 #define AXIS2_OPTIONS_GET_SOAP_VERSION(options, env) \
00464       ((options)->ops->get_soap_version(options, env))
00465 
00466 #define AXIS2_OPTIONS_SET_ENABLE_MTOM(options, env, enable_mtom) \
00467       ((options)->ops->set_enable_mtom(options, env, enable_mtom))
00468 
00469 #define AXIS2_OPTIONS_GET_ENABLE_MTOM(options, env) \
00470       ((options)->ops->get_enable_mtom(options, env))
00471 
00472 #define AXIS2_OPTIONS_FREE(options, env) \
00473       ((options)->ops->free(options, env))
00474 
00475 /************************** End of function macros ****************************/    
00476 
00478 #ifdef __cplusplus
00479 }
00480 #endif
00481 
00482 #endif                          /* AXIS2_OPTIONS_H */

Generated on Fri Jun 16 18:02:31 2006 for Axis2/C by  doxygen 1.4.2