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

axis2_conf.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_CONFIG_H
00018 #define AXIS2_CONFIG_H
00019 
00026 #include <axis2_param_container.h>
00027 #include <axis2_svc_grp.h>
00028 #include <axis2_transport_in_desc.h>
00029 #include <axis2_transport_out_desc.h>
00030 #include <axis2_qname.h>
00031 #include <axis2_hash.h>
00032 #include <axis2_phases_info.h>
00033 #include <axis2_msg_recv.h>
00034 #include <axis2_disp.h>
00035 #include <axis2_disp_checker.h>
00036 
00037 #ifdef __cplusplus
00038 extern "C" 
00039 {
00040 #endif
00041 
00046 struct axis2_msg_recv;
00047 struct axis2_phases_info;    
00048 typedef struct axis2_conf_ops axis2_conf_ops_t;
00049 typedef struct axis2_conf axis2_conf_t;
00050     
00051 struct axis2_svc_grp;
00052 struct axis2_svc;
00053 struct axis2_op;    
00054     
00055 struct axis2_dep_engine;
00056 
00061 struct axis2_conf_ops
00062 {
00063    axis2_status_t (AXIS2_CALL *
00064     free) (axis2_conf_t *conf, 
00065            const axis2_env_t *env);
00066     
00067    axis2_status_t (AXIS2_CALL *
00068     add_svc_grp) (axis2_conf_t *conf, 
00069                     const axis2_env_t *env, 
00070                     struct axis2_svc_grp *svc_grp);
00071     
00072    struct axis2_svc_grp *(AXIS2_CALL *
00073     get_svc_grp) (  axis2_conf_t *conf, 
00074                     const axis2_env_t *env, 
00075                     axis2_char_t *svc_grp_name);
00076  
00077     axis2_hash_t * (AXIS2_CALL *
00078     get_svc_grps) (axis2_conf_t *conf, 
00079                    const axis2_env_t *env);
00080     
00081    axis2_status_t (AXIS2_CALL *
00082     add_svc) (axis2_conf_t *conf, 
00083                 const axis2_env_t *env, 
00084                 struct axis2_svc* svc);
00085     
00086    struct axis2_svc *(AXIS2_CALL *
00087     get_svc) (axis2_conf_t *conf, 
00088                 const axis2_env_t *env, 
00089                 axis2_char_t* svc_name);
00090     
00091    axis2_status_t (AXIS2_CALL *
00092     remove_svc) (axis2_conf_t *conf, 
00093                     const axis2_env_t *env, 
00094                     const axis2_char_t *name);
00095     
00096     axis2_status_t (AXIS2_CALL *
00097     add_param) (axis2_conf_t *conf, 
00098                     const axis2_env_t *env,
00099                     axis2_param_t *param);
00100 
00101    axis2_param_t *(AXIS2_CALL *
00102     get_param) (axis2_conf_t *conf, 
00103                 const axis2_env_t *env,
00104                 const axis2_char_t *name);
00105 
00106    axis2_array_list_t *(AXIS2_CALL *
00107     get_params) (axis2_conf_t *conf, 
00108                  const axis2_env_t *env);
00109    
00110    axis2_bool_t (AXIS2_CALL *
00111     is_param_locked) (axis2_conf_t *conf, 
00112                         const axis2_env_t *env,
00113                         axis2_char_t *param_name);
00114                                                 
00115     struct axis2_transport_in_desc * (AXIS2_CALL *
00116     get_transport_in)(axis2_conf_t *conf,
00117                         const axis2_env_t *env,
00118                         axis2_qname_t *qname);
00119     
00126     axis2_status_t (AXIS2_CALL *
00127     add_transport_in) (axis2_conf_t *conf,
00128                         const axis2_env_t *env,
00129                         struct axis2_transport_in_desc *transport);
00130     
00131     struct axis2_transport_out_desc * (AXIS2_CALL *
00132     get_transport_out) (axis2_conf_t *conf,
00133                         const axis2_env_t *env,
00134                         axis2_qname_t *qname);
00135     
00142     axis2_status_t (AXIS2_CALL *
00143     add_transport_out) (axis2_conf_t *conf,
00144                         const axis2_env_t *env,
00145                         struct axis2_transport_out_desc *transport);
00146     
00147     axis2_hash_t * (AXIS2_CALL *
00148     get_transports_in) (axis2_conf_t *conf,
00149                         const axis2_env_t *env);
00150     
00151     axis2_hash_t * (AXIS2_CALL *
00152     get_transports_out) (axis2_conf_t *conf,
00153                          const axis2_env_t *env);
00160     struct axis2_module_desc *(AXIS2_CALL *
00161     get_module) (axis2_conf_t *conf,
00162                     const axis2_env_t *env,
00163                     axis2_qname_t *qname);
00164    
00170     axis2_array_list_t * (AXIS2_CALL *
00171     get_engaged_modules) (axis2_conf_t *conf,
00172                           const axis2_env_t *env);
00173     
00174     axis2_array_list_t * (AXIS2_CALL *
00175     get_in_phases_upto_and_including_post_dispatch) (axis2_conf_t *conf,
00176                                                         const axis2_env_t *env);
00177     
00178     axis2_array_list_t * (AXIS2_CALL *
00179     get_outflow) (axis2_conf_t *conf,
00180                     const axis2_env_t *env);
00181     
00182     
00186     axis2_array_list_t * (AXIS2_CALL *
00187     get_in_faultflow) (axis2_conf_t *conf,
00188                         const axis2_env_t *env);
00189     
00193     axis2_array_list_t * (AXIS2_CALL *
00194     get_out_faultflow) (axis2_conf_t *conf,
00195                             const axis2_env_t *env);
00196 
00197     axis2_hash_t *(AXIS2_CALL *
00198     get_faulty_svcs) (axis2_conf_t *conf,
00199                         const axis2_env_t *env);
00200     
00201     axis2_hash_t *(AXIS2_CALL *
00202     get_faulty_modules) (axis2_conf_t *conf,
00203                          const axis2_env_t *env);
00204         
00205     /*to get all the services in the system */
00206     axis2_hash_t *(AXIS2_CALL *
00207     get_svcs) (axis2_conf_t *conf,
00208                const axis2_env_t *env);
00209     
00210     axis2_bool_t (AXIS2_CALL *
00211     is_engaged) (axis2_conf_t *conf,
00212                     const axis2_env_t *env,
00213                     axis2_qname_t *module_name);
00214     
00215     struct axis2_phases_info *(AXIS2_CALL *
00216     get_phases_info) (axis2_conf_t *conf,
00217                       const axis2_env_t *env);
00218     
00219     axis2_status_t (AXIS2_CALL *
00220     set_phases_info) (axis2_conf_t *conf,
00221                         const axis2_env_t *env,
00222                         struct axis2_phases_info *phases_info);
00223     axis2_status_t (AXIS2_CALL *
00224     add_msg_recv) (axis2_conf_t *conf,
00225                     const axis2_env_t *env,
00226                     axis2_char_t *key,
00227                     struct axis2_msg_recv *msg_recv);
00228     
00229     struct axis2_msg_recv *(AXIS2_CALL *
00230     get_msg_recv) (axis2_conf_t *conf,
00231                     const axis2_env_t *env,
00232                     axis2_char_t *key);
00233     
00234     axis2_status_t (AXIS2_CALL *
00235     set_out_phases) (axis2_conf_t *conf,
00236                         const axis2_env_t *env,
00237                         axis2_array_list_t *out_phases);
00238     axis2_array_list_t* (AXIS2_CALL *
00239     get_out_phases) (axis2_conf_t *conf, 
00240                         const axis2_env_t *env);
00241     
00245     axis2_status_t (AXIS2_CALL *
00246     set_in_faultphases) (axis2_conf_t *conf,
00247                             const axis2_env_t *env,
00248                             axis2_array_list_t *list);
00249     
00253     axis2_status_t (AXIS2_CALL *
00254     set_out_faultphases) (axis2_conf_t *conf,
00255                             const axis2_env_t *env,
00256                             axis2_array_list_t *list);
00257         
00261     axis2_hash_t *(AXIS2_CALL *
00262     get_modules) (axis2_conf_t *conf,
00263                   const axis2_env_t *env); 
00264     
00270     axis2_status_t (AXIS2_CALL *
00271     add_module) (axis2_conf_t *conf,
00272                     const axis2_env_t *env,
00273                     struct axis2_module_desc *module);
00274                                         
00278     axis2_status_t (AXIS2_CALL *
00279     set_default_dispatchers) (axis2_conf_t *conf,
00280                               const axis2_env_t *env); 
00281     
00286     axis2_status_t (AXIS2_CALL *
00287     set_dispatch_phase) (axis2_conf_t *conf,
00288                             const axis2_env_t *env,
00289                             axis2_phase_t *dispatch);
00290                             
00291     axis2_char_t *(AXIS2_CALL *
00292     get_repos) (axis2_conf_t *conf,
00293                     const axis2_env_t *env);
00294 
00295     axis2_status_t (AXIS2_CALL *
00296     set_repos) (axis2_conf_t *conf,
00297                     const axis2_env_t *env,
00298                     axis2_char_t *axis2_repos);
00299 
00300     axis2_status_t (AXIS2_CALL *
00301     engage_module) (axis2_conf_t *conf,
00302                             const axis2_env_t *env,
00303                             axis2_qname_t *module_ref);
00304                             
00305     axis2_status_t (AXIS2_CALL *
00306     set_dep_engine)(axis2_conf_t *conf,
00307                                 const axis2_env_t *env,
00308                                 struct axis2_dep_engine *dep_engine);
00309     
00310     axis2_char_t * (AXIS2_CALL *
00311     get_default_module_version)(axis2_conf_t *conf, 
00312                                 const axis2_env_t *env, 
00313                                 const axis2_char_t* module_name);
00314                                 
00315     struct axis2_module_desc * (AXIS2_CALL *
00316     get_default_module)(axis2_conf_t *conf,const axis2_env_t *env, 
00317                                 const axis2_char_t *module_name);
00318 
00319     axis2_status_t (AXIS2_CALL *
00320     add_default_module_version)(axis2_conf_t *conf, const axis2_env_t *env,
00321                                 axis2_char_t *module_name, 
00322                                 axis2_char_t *module_version);
00323 
00324     axis2_status_t (AXIS2_CALL *
00325     engage_module_with_version)(axis2_conf_t *conf, const axis2_env_t *env,
00326                                             const axis2_char_t *module_name,
00327                                             const axis2_char_t *version_id);
00328                                 
00329 };
00330 
00339 struct axis2_conf
00340 {
00341    axis2_conf_ops_t *ops;
00342     axis2_param_container_t *param_container;
00343 };
00344 
00348 AXIS2_EXTERN axis2_conf_t * AXIS2_CALL 
00349 axis2_conf_create(const axis2_env_t *env);
00350 
00351 /************************* Start of function macros   ***************************/
00352    
00353 #define AXIS2_CONF_FREE(conf, env) \
00354       ((conf)->ops->free(conf, env))
00355    
00356 #define AXIS2_CONF_ADD_SVC_GRP(conf, env, svc_grp) \
00357         ((conf)->ops->add_svc_grp (conf, env, svc_grp))
00358 
00359 #define AXIS2_CONF_GET_SVC_GRP(conf, env, svc_grp_name) \
00360         ((conf)->ops->get_svc_grp (conf, env, svc_grp_name))
00361 
00362 #define AXIS2_CONF_GET_SVC_GRPS(conf, env) \
00363         ((conf)->ops->get_svc_grps (conf, env))
00364 
00365 #define AXIS2_CONF_ADD_SVC(conf, env, svc) \
00366       ((conf)->ops->add_svc (conf, env, svc))
00367       
00368 #define AXIS2_CONF_GET_SVC(conf, env, svc_name) \
00369       ((conf)->ops->get_svc (conf, env, svc_name))
00370 
00371 #define AXIS2_CONF_REMOVE_SVC(conf, env, svc_name) \
00372       ((conf)->ops->remove_svc (conf, env, svc_name))
00373         
00374 #define AXIS2_CONF_ADD_PARAM(conf, env, param) \
00375         ((conf)->ops->add_param(conf , env, param))
00376       
00377 #define AXIS2_CONF_GET_PARAM(conf, env, name) \
00378         ((conf)->ops->get_param(conf , env, name))
00379       
00380 #define AXIS2_CONF_GET_PARAMS(conf, env) \
00381         ((conf)->ops->get_params(conf , env))
00382       
00383 #define AXIS2_CONF_IS_PARAM_LOCKED(conf, env, param_name) \
00384         ((conf)->ops->is_param_locked(conf, env, param_name))
00385 
00386 #define AXIS2_CONF_GET_TRANSPORT_IN(conf, env, qname) \
00387         ((conf)->ops->get_transport_in(conf , env, qname))
00388 
00389 #define AXIS2_CONF_ADD_TRANSPORT_IN(conf, env, transport) \
00390         ((conf)->ops->add_transport_in(conf , env, transport))
00391 
00392 #define AXIS2_CONF_GET_TRANSPORT_OUT(conf, env, qname) \
00393         ((conf)->ops->get_transport_out(conf , env, qname))
00394 
00395 #define AXIS2_CONF_ADD_TRANSPORT_OUT(conf, env, transport) \
00396         ((conf)->ops->add_transport_out(conf , env, transport))
00397  
00398 #define AXIS2_CONF_GET_TRANSPORTS_IN(conf, env) \
00399         ((conf)->ops->get_transports_in(conf , env)) 
00400  
00401 #define AXIS2_CONF_GET_TRANSPORTS_OUT(conf, env) \
00402         ((conf)->ops->get_transports_out(conf , env)) 
00403  
00404 #define AXIS2_CONF_GET_MODULE(conf, env, qname) \
00405         ((conf)->ops->get_module(conf , env, qname)) 
00406 
00407 #define AXIS2_CONF_GET_ENGAGED_MODULES(conf, env) \
00408         ((conf)->ops->get_engaged_modules(conf , env)) 
00409         
00410 #define AXIS2_CONF_GET_IN_PHASES_UPTO_AND_INCLUDING_POST_DISPATCH(conf, env) \
00411         ((conf)->ops->get_in_phases_upto_and_including_post_dispatch(conf , env)) 
00412 
00413 #define AXIS2_CONF_GET_OUTFLOW(conf, env) \
00414         ((conf)->ops->get_outflow(conf , env)) 
00415         
00416 #define AXIS2_CONF_GET_IN_FAULT_FLOW(conf, env) \
00417         ((conf)->ops->get_in_faultflow(conf , env)) 
00418 
00419 #define AXIS2_CONF_GET_OUT_FAULT_FLOW(conf, env) \
00420         ((conf)->ops->get_out_faultflow(conf , env)) 
00421 
00422 #define AXIS2_CONF_GET_FAULTY_SVCS(conf, env) \
00423         ((conf)->ops->get_faulty_svcs(conf , env)) 
00424 
00425 #define AXIS2_CONF_GET_FAULTY_MODULES(conf, env) \
00426         ((conf)->ops->get_faulty_modules(conf , env)) 
00427 
00428 #define AXIS2_CONF_GET_SVCS(conf, env) \
00429         ((conf)->ops->get_svcs(conf , env)) 
00430 
00431 #define AXIS2_CONF_IS_ENGAGED(conf, env, module_name) \
00432         ((conf)->ops->is_engaged(conf , env, module_name)) 
00433 
00434 #define AXIS2_CONF_GET_PHASESINFO(conf, env) \
00435         ((conf)->ops->get_phases_info(conf , env)) 
00436 
00437 #define AXIS2_CONF_SET_PHASESINFO(conf, env, phases_info) \
00438         ((conf)->ops->set_phases_info(conf , env, phases_info)) 
00439 
00440 #define AXIS2_CONF_ADD_MSG_RECV(conf, env, key, msg_recv) \
00441         ((conf)->ops->add_msg_recv(conf , env, key, msg_recv)) 
00442 
00443 #define AXIS2_CONF_GET_MSG_RECV(conf, env, key) \
00444         ((conf)->ops->get_msg_recv(conf , env, key)) 
00445 
00446 #define AXIS2_CONF_SET_OUT_PHASES(conf, env, out_phases) \
00447         ((conf)->ops->set_out_phases(conf , env, out_phases)) 
00448 
00449 #define AXIS2_CONF_GET_OUT_PHASES(conf, env) \
00450         ((conf)->ops->get_out_phases(conf , env)) 
00451 
00452 #define AXIS2_CONF_SET_IN_FAULTPHASES(conf, env, list) \
00453         ((conf)->ops->set_in_faultphases(conf , env, list)) 
00454 
00455 #define AXIS2_CONF_SET_OUT_FAULTPHASES(conf, env, list) \
00456         ((conf)->ops->set_out_faultphases(conf , env, list)) 
00457 
00458 #define AXIS2_CONF_GET_MODULES(conf, env) \
00459         ((conf)->ops->get_modules(conf , env)) 
00460 
00461 #define AXIS2_CONF_ADD_MODULE(conf, env, module) \
00462         ((conf)->ops->add_module(conf , env, module)) 
00463  
00464 #define AXIS2_CONF_SET_DEFAULT_DISPATCHERS(conf, env) \
00465         ((conf)->ops->set_default_dispatchers(conf , env)) 
00466  
00467 #define AXIS2_CONF_SET_DISPATCH_PHASE(conf, env, dispatch) \
00468         ((conf)->ops->set_dispatch_phase(conf , env, dispatch)) 
00469 
00470 #define AXIS2_CONF_GET_REPOS(conf, env) \
00471         ((conf)->ops->get_repos(conf , env))
00472         
00473 #define AXIS2_CONF_SET_REPOS(conf, env, axis2_repos) \
00474         ((conf)->ops->set_repos(conf , env, axis2_repos))
00475         
00476 #define AXIS2_CONF_ENGAGE_MODULE(conf, env, module_ref) \
00477         ((conf)->ops->engage_module(conf , env, module_ref))        
00478     
00479 #define AXIS2_CONF_SET_DEP_ENGINE(conf, env, dep_engine) \
00480         ((conf)->ops->set_dep_engine(conf, env, dep_engine))
00481 
00482 #define AXIS2_CONF_GET_DEFAULT_MODULE_VERSION(conf, env, module_name)\
00483         ((conf)->ops->get_default_module_version(conf, env, module_name))
00484 
00485 #define AXIS2_CONF_GET_DEFAULT_MODULE(conf, env, module_name)\
00486         ((conf)->ops->get_default_module(conf, env, module_name))
00487         
00488 #define AXIS2_CONF_ADD_DEFAULT_MODULE_VERSION(conf, env, mod_name, mod_ver)\
00489         ((conf)->ops->add_default_module_version(conf, env, mod_name, mod_ver))
00490         
00491 #define AXIS2_CONF_ENGAGE_MODULE_WITH_VERSION(conf, env, mod_name, mod_ver)\
00492         ((conf)->ops->engage_module_with_version(conf, env, mod_name, mod_ver))       
00493         
00494 /************************* End of function macros *****************************/
00495 
00497 #ifdef __cplusplus
00498 }
00499 #endif
00500 #endif /* AXIS2_CONFIG_H */

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