00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef AXIS2_CONFIG_H
00019 #define AXIS2_CONFIG_H
00020
00043 #include <axis2_param_container.h>
00044 #include <axis2_svc_grp.h>
00045 #include <axis2_transport_in_desc.h>
00046 #include <axis2_transport_out_desc.h>
00047 #include <axis2_qname.h>
00048 #include <axis2_hash.h>
00049 #include <axis2_phases_info.h>
00050 #include <axis2_msg_recv.h>
00051 #include <axis2_disp_checker.h>
00052
00053 #ifdef __cplusplus
00054 extern "C"
00055 {
00056 #endif
00057
00059 typedef struct axis2_conf_ops axis2_conf_ops_t;
00061 typedef struct axis2_conf axis2_conf_t;
00062
00063 struct axis2_msg_recv;
00064 struct axis2_phases_info;
00065 struct axis2_svc_grp;
00066 struct axis2_svc;
00067 struct axis2_op;
00068 struct axis2_dep_engine;
00069 struct axis2_desp;
00070
00075 struct axis2_conf_ops
00076 {
00083 axis2_status_t (AXIS2_CALL *
00084 free)(
00085 axis2_conf_t *conf,
00086 const axis2_env_t *env);
00087
00096 axis2_status_t (AXIS2_CALL *
00097 add_svc_grp)(
00098 axis2_conf_t *conf,
00099 const axis2_env_t *env,
00100 struct axis2_svc_grp *svc_grp);
00101
00110 struct axis2_svc_grp *(AXIS2_CALL *
00111 get_svc_grp)(
00112 const axis2_conf_t *conf,
00113 const axis2_env_t *env,
00114 const axis2_char_t *svc_grp_name);
00115
00123 axis2_hash_t *(AXIS2_CALL *
00124 get_all_svc_grps)(
00125 const axis2_conf_t *conf,
00126 const axis2_env_t *env);
00127
00136 axis2_status_t (AXIS2_CALL *
00137 add_svc)(
00138 axis2_conf_t *conf,
00139 const axis2_env_t *env,
00140 struct axis2_svc* svc);
00141
00150 struct axis2_svc *(AXIS2_CALL *
00151 get_svc)(
00152 const axis2_conf_t *conf,
00153 const axis2_env_t *env,
00154 const axis2_char_t* svc_name);
00155
00163 axis2_status_t (AXIS2_CALL *
00164 remove_svc)(
00165 axis2_conf_t *conf,
00166 const axis2_env_t *env,
00167 const axis2_char_t *name);
00168
00176 axis2_status_t (AXIS2_CALL *
00177 add_param)(
00178 axis2_conf_t *conf,
00179 const axis2_env_t *env,
00180 axis2_param_t *param);
00181
00190 axis2_param_t *(AXIS2_CALL *
00191 get_param)(
00192 const axis2_conf_t *conf,
00193 const axis2_env_t *env,
00194 const axis2_char_t *name);
00195
00203 axis2_array_list_t *(AXIS2_CALL *
00204 get_all_params)(
00205 const axis2_conf_t *conf,
00206 const axis2_env_t *env);
00207
00215 axis2_bool_t (AXIS2_CALL *
00216 is_param_locked)(
00217 const axis2_conf_t *conf,
00218 const axis2_env_t *env,
00219 const axis2_char_t *param_name);
00220
00229 axis2_transport_in_desc_t *(AXIS2_CALL *
00230 get_transport_in)(
00231 const axis2_conf_t *conf,
00232 const axis2_env_t *env,
00233 const axis2_qname_t *qname);
00234
00243 axis2_status_t (AXIS2_CALL *
00244 add_transport_in)(
00245 axis2_conf_t *conf,
00246 const axis2_env_t *env,
00247 axis2_transport_in_desc_t *transport);
00248
00257 axis2_transport_out_desc_t *(AXIS2_CALL *
00258 get_transport_out)(
00259 const axis2_conf_t *conf,
00260 const axis2_env_t *env,
00261 const axis2_qname_t *qname);
00262
00271 axis2_status_t (AXIS2_CALL *
00272 add_transport_out)(
00273 axis2_conf_t *conf,
00274 const axis2_env_t *env,
00275 axis2_transport_out_desc_t *transport);
00276
00284 axis2_hash_t *(AXIS2_CALL *
00285 get_all_in_transports)(
00286 const axis2_conf_t *conf,
00287 const axis2_env_t *env);
00288
00296 axis2_hash_t *(AXIS2_CALL *
00297 get_all_out_transports)(
00298 const axis2_conf_t *conf,
00299 const axis2_env_t *env);
00300
00308 struct axis2_module_desc *(AXIS2_CALL *
00309 get_module)(
00310 const axis2_conf_t *conf,
00311 const axis2_env_t *env,
00312 const axis2_qname_t *qname);
00313
00321 axis2_array_list_t *(AXIS2_CALL *
00322 get_all_engaged_modules)(
00323 const axis2_conf_t *conf,
00324 const axis2_env_t *env);
00325
00333 axis2_array_list_t *(AXIS2_CALL *
00334 get_in_phases_upto_and_including_post_dispatch)(
00335 const axis2_conf_t *conf,
00336 const axis2_env_t *env);
00337
00346 axis2_array_list_t *(AXIS2_CALL *
00347 get_out_flow)(
00348 const axis2_conf_t *conf,
00349 const axis2_env_t *env);
00350
00351
00360 axis2_array_list_t *(AXIS2_CALL *
00361 get_in_fault_flow)(
00362 const axis2_conf_t *conf,
00363 const axis2_env_t *env);
00364
00373 axis2_array_list_t *(AXIS2_CALL *
00374 get_out_fault_flow)(
00375 const axis2_conf_t *conf,
00376 const axis2_env_t *env);
00377
00387 axis2_hash_t *(AXIS2_CALL *
00388 get_all_faulty_svcs)(
00389 const axis2_conf_t *conf,
00390 const axis2_env_t *env);
00391
00401 axis2_hash_t *(AXIS2_CALL *
00402 get_all_faulty_modules)(
00403 const axis2_conf_t *conf,
00404 const axis2_env_t *env);
00405
00413 axis2_hash_t *(AXIS2_CALL *
00414 get_all_svcs)(
00415 const axis2_conf_t *conf,
00416 const axis2_env_t *env);
00417
00425 axis2_bool_t (AXIS2_CALL *
00426 is_engaged)(
00427 axis2_conf_t *conf,
00428 const axis2_env_t *env,
00429 const axis2_qname_t *module_name);
00430
00438 struct axis2_phases_info *(AXIS2_CALL *
00439 get_phases_info)(
00440 const axis2_conf_t *conf,
00441 const axis2_env_t *env);
00442
00451 axis2_status_t (AXIS2_CALL *
00452 set_phases_info)(
00453 axis2_conf_t *conf,
00454 const axis2_env_t *env,
00455 struct axis2_phases_info *phases_info);
00456
00465 axis2_status_t (AXIS2_CALL *
00466 add_msg_recv)(
00467 axis2_conf_t *conf,
00468 const axis2_env_t *env,
00469 const axis2_char_t *key,
00470 struct axis2_msg_recv *msg_recv);
00471
00481 struct axis2_msg_recv *(AXIS2_CALL *
00482 get_msg_recv)(
00483 const axis2_conf_t *conf,
00484 const axis2_env_t *env,
00485 axis2_char_t *key);
00486
00495 axis2_status_t (AXIS2_CALL *
00496 set_out_phases)(
00497 axis2_conf_t *conf,
00498 const axis2_env_t *env,
00499 axis2_array_list_t *out_phases);
00500
00508 axis2_array_list_t *(AXIS2_CALL *
00509 get_out_phases)(
00510 const axis2_conf_t *conf,
00511 const axis2_env_t *env);
00512
00520 axis2_status_t (AXIS2_CALL *
00521 set_in_fault_phases)(
00522 axis2_conf_t *conf,
00523 const axis2_env_t *env,
00524 axis2_array_list_t *list);
00525
00533 axis2_status_t (AXIS2_CALL *
00534 set_out_fault_phases)(
00535 axis2_conf_t *conf,
00536 const axis2_env_t *env,
00537 axis2_array_list_t *list);
00538
00546 axis2_hash_t *(AXIS2_CALL *
00547 get_all_modules)(
00548 const axis2_conf_t *conf,
00549 const axis2_env_t *env);
00550
00558 axis2_status_t (AXIS2_CALL *
00559 add_module)(
00560 axis2_conf_t *conf,
00561 const axis2_env_t *env,
00562 struct axis2_module_desc *module);
00563
00570 axis2_status_t (AXIS2_CALL *
00571 set_default_dispatchers)(
00572 axis2_conf_t *conf,
00573 const axis2_env_t *env);
00574
00582 axis2_status_t (AXIS2_CALL *
00583 set_dispatch_phase)(
00584 axis2_conf_t *conf,
00585 const axis2_env_t *env,
00586 axis2_phase_t *dispatch);
00587
00594 const axis2_char_t *(AXIS2_CALL *
00595 get_repo)(
00596 const axis2_conf_t *conf,
00597 const axis2_env_t *env);
00598
00606 axis2_status_t (AXIS2_CALL *
00607 set_repo)(
00608 axis2_conf_t *conf,
00609 const axis2_env_t *env,
00610 axis2_char_t *axis2_repo);
00611
00619 axis2_status_t (AXIS2_CALL *
00620 engage_module)(
00621 axis2_conf_t *conf,
00622 const axis2_env_t *env,
00623 const axis2_qname_t *module_ref);
00624
00632 axis2_status_t (AXIS2_CALL *
00633 set_dep_engine)(
00634 axis2_conf_t *conf,
00635 const axis2_env_t *env,
00636 struct axis2_dep_engine *dep_engine);
00637
00645 const axis2_char_t *(AXIS2_CALL *
00646 get_default_module_version)(
00647 const axis2_conf_t *conf,
00648 const axis2_env_t *env,
00649 const axis2_char_t *module_name);
00650
00659 struct axis2_module_desc *(AXIS2_CALL *
00660 get_default_module)(
00661 const axis2_conf_t *conf,
00662 const axis2_env_t *env,
00663 const axis2_char_t *module_name);
00664
00673 axis2_status_t (AXIS2_CALL *
00674 add_default_module_version)(
00675 axis2_conf_t *conf,
00676 const axis2_env_t *env,
00677 const axis2_char_t *module_name,
00678 const axis2_char_t *module_version);
00679
00688 axis2_status_t (AXIS2_CALL *
00689 engage_module_with_version)(
00690 axis2_conf_t *conf,
00691 const axis2_env_t *env,
00692 const axis2_char_t *module_name,
00693 const axis2_char_t *version_id);
00694
00695 };
00696
00700 struct axis2_conf
00701 {
00703 axis2_conf_ops_t *ops;
00705 axis2_param_container_t *param_container;
00706 };
00707
00713 AXIS2_EXTERN axis2_conf_t *AXIS2_CALL
00714 axis2_conf_create(
00715 const axis2_env_t *env);
00716
00717
00720 #define AXIS2_CONF_FREE(conf, env) \
00721 ((conf)->ops->free(conf, env))
00722
00725 #define AXIS2_CONF_ADD_SVC_GRP(conf, env, svc_grp) \
00726 ((conf)->ops->add_svc_grp (conf, env, svc_grp))
00727
00730 #define AXIS2_CONF_GET_SVC_GRP(conf, env, svc_grp_name) \
00731 ((conf)->ops->get_svc_grp (conf, env, svc_grp_name))
00732
00735 #define AXIS2_CONF_GET_ALL_SVC_GRPS(conf, env) \
00736 ((conf)->ops->get_all_svc_grps (conf, env))
00737
00740 #define AXIS2_CONF_ADD_SVC(conf, env, svc) \
00741 ((conf)->ops->add_svc (conf, env, svc))
00742
00745 #define AXIS2_CONF_GET_SVC(conf, env, svc_name) \
00746 ((conf)->ops->get_svc (conf, env, svc_name))
00747
00750 #define AXIS2_CONF_REMOVE_SVC(conf, env, svc_name) \
00751 ((conf)->ops->remove_svc (conf, env, svc_name))
00752
00755 #define AXIS2_CONF_ADD_PARAM(conf, env, param) \
00756 ((conf)->ops->add_param(conf , env, param))
00757
00760 #define AXIS2_CONF_GET_PARAM(conf, env, name) \
00761 ((conf)->ops->get_param(conf , env, name))
00762
00765 #define AXIS2_CONF_GET_ALL_PARAMS(conf, env) \
00766 ((conf)->ops->get_all_params(conf , env))
00767
00770 #define AXIS2_CONF_IS_PARAM_LOCKED(conf, env, param_name) \
00771 ((conf)->ops->is_param_locked(conf, env, param_name))
00772
00775 #define AXIS2_CONF_GET_TRANSPORT_IN(conf, env, qname) \
00776 ((conf)->ops->get_transport_in(conf , env, qname))
00777
00780 #define AXIS2_CONF_ADD_TRANSPORT_IN(conf, env, transport) \
00781 ((conf)->ops->add_transport_in(conf , env, transport))
00782
00785 #define AXIS2_CONF_GET_TRANSPORT_OUT(conf, env, qname) \
00786 ((conf)->ops->get_transport_out(conf , env, qname))
00787
00790 #define AXIS2_CONF_ADD_TRANSPORT_OUT(conf, env, transport) \
00791 ((conf)->ops->add_transport_out(conf , env, transport))
00792
00795 #define AXIS2_CONF_GET_ALL_IN_TRANSPORTS(conf, env) \
00796 ((conf)->ops->get_all_in_transports(conf , env))
00797
00800 #define AXIS2_CONF_GET_ALL_OUT_TRANSPORTS(conf, env) \
00801 ((conf)->ops->get_all_out_transports(conf , env))
00802
00805 #define AXIS2_CONF_GET_MODULE(conf, env, qname) \
00806 ((conf)->ops->get_module(conf , env, qname))
00807
00810 #define AXIS2_CONF_GET_ALL_ENGAGED_MODULES(conf, env) \
00811 ((conf)->ops->get_all_engaged_modules(conf , env))
00812
00815 #define AXIS2_CONF_GET_IN_PHASES_UPTO_AND_INCLUDING_POST_DISPATCH(conf, env) \
00816 ((conf)->ops->get_in_phases_upto_and_including_post_dispatch(conf , env))
00817
00820 #define AXIS2_CONF_GET_OUT_FLOW(conf, env) \
00821 ((conf)->ops->get_out_flow(conf , env))
00822
00825 #define AXIS2_CONF_GET_IN_FAULT_FLOW(conf, env) \
00826 ((conf)->ops->get_in_fault_flow(conf , env))
00827
00830 #define AXIS2_CONF_GET_OUT_FAULT_FLOW(conf, env) \
00831 ((conf)->ops->get_out_fault_flow(conf , env))
00832
00835 #define AXIS2_CONF_GET_ALL_FAULTY_SVCS(conf, env) \
00836 ((conf)->ops->get_all_faulty_svcs(conf , env))
00837
00840 #define AXIS2_CONF_GET_ALL_FAULTY_MODULES(conf, env) \
00841 ((conf)->ops->get_all_faulty_modules(conf , env))
00842
00845 #define AXIS2_CONF_GET_ALL_SVCS(conf, env) \
00846 ((conf)->ops->get_all_svcs(conf , env))
00847
00850 #define AXIS2_CONF_IS_ENGAGED(conf, env, module_name) \
00851 ((conf)->ops->is_engaged(conf , env, module_name))
00852
00855 #define AXIS2_CONF_GET_PHASES_INFO(conf, env) \
00856 ((conf)->ops->get_phases_info(conf , env))
00857
00860 #define AXIS2_CONF_SET_PHASES_INFO(conf, env, phases_info) \
00861 ((conf)->ops->set_phases_info(conf , env, phases_info))
00862
00865 #define AXIS2_CONF_ADD_MSG_RECV(conf, env, key, msg_recv) \
00866 ((conf)->ops->add_msg_recv(conf , env, key, msg_recv))
00867
00870 #define AXIS2_CONF_GET_MSG_RECV(conf, env, key) \
00871 ((conf)->ops->get_msg_recv(conf , env, key))
00872
00875 #define AXIS2_CONF_SET_OUT_PHASES(conf, env, out_phases) \
00876 ((conf)->ops->set_out_phases(conf , env, out_phases))
00877
00880 #define AXIS2_CONF_GET_OUT_PHASES(conf, env) \
00881 ((conf)->ops->get_out_phases(conf , env))
00882
00885 #define AXIS2_CONF_SET_IN_FAULT_PHASES(conf, env, list) \
00886 ((conf)->ops->set_in_fault_phases(conf , env, list))
00887
00890 #define AXIS2_CONF_SET_OUT_FAULT_PHASES(conf, env, list) \
00891 ((conf)->ops->set_out_fault_phases(conf , env, list))
00892
00895 #define AXIS2_CONF_GET_ALL_MODULES(conf, env) \
00896 ((conf)->ops->get_all_modules(conf , env))
00897
00900 #define AXIS2_CONF_ADD_MODULE(conf, env, module) \
00901 ((conf)->ops->add_module(conf , env, module))
00902
00905 #define AXIS2_CONF_SET_DEFAULT_DISPATCHERS(conf, env) \
00906 ((conf)->ops->set_default_dispatchers(conf , env))
00907
00910 #define AXIS2_CONF_SET_DISPATCH_PHASE(conf, env, dispatch) \
00911 ((conf)->ops->set_dispatch_phase(conf , env, dispatch))
00912
00915 #define AXIS2_CONF_GET_REPO(conf, env) \
00916 ((conf)->ops->get_repo(conf , env))
00917
00920 #define AXIS2_CONF_SET_REPO(conf, env, axis2_repos) \
00921 ((conf)->ops->set_repo(conf , env, axis2_repos))
00922
00925 #define AXIS2_CONF_ENGAGE_MODULE(conf, env, module_ref) \
00926 ((conf)->ops->engage_module(conf , env, module_ref))
00927
00930 #define AXIS2_CONF_SET_DEP_ENGINE(conf, env, dep_engine) \
00931 ((conf)->ops->set_dep_engine(conf, env, dep_engine))
00932
00935 #define AXIS2_CONF_GET_DEFAULT_MODULE_VERSION(conf, env, module_name)\
00936 ((conf)->ops->get_default_module_version(conf, env, module_name))
00937
00940 #define AXIS2_CONF_GET_DEFAULT_MODULE(conf, env, module_name)\
00941 ((conf)->ops->get_default_module(conf, env, module_name))
00942
00945 #define AXIS2_CONF_ADD_DEFAULT_MODULE_VERSION(conf, env, mod_name, mod_ver)\
00946 ((conf)->ops->add_default_module_version(conf, env, mod_name, mod_ver))
00947
00950 #define AXIS2_CONF_ENGAGE_MODULE_WITH_VERSION(conf, env, mod_name, mod_ver)\
00951 ((conf)->ops->engage_module_with_version(conf, env, mod_name, mod_ver))
00952
00954 #ifdef __cplusplus
00955 }
00956 #endif
00957 #endif