xorp

cli_base.hh

00001 /*
00002  * obj/i686-pc-linux-gnu/xrl/targets/cli_base.hh
00003  * vim:set sts=4 ts=8 ft=cpp:
00004  *
00005  * Copyright (c) 2001-2011 XORP, Inc and Others
00006  * See the XORP LICENSE.lgpl file for licensing, conditions, and warranties
00007  * on use.
00008  *
00009  * DO NOT EDIT THIS FILE - IT IS PROGRAMMATICALLY GENERATED
00010  *
00011  * Generated by 'tgt-gen'.
00012  */
00013 
00014 
00015 #ifndef __XRL_TARGETS_CLI_BASE_HH__
00016 #define __XRL_TARGETS_CLI_BASE_HH__
00017 
00018 #undef XORP_LIBRARY_NAME
00019 #define XORP_LIBRARY_NAME "XrlCliTarget"
00020 
00021 #include "libxorp/xlog.h"
00022 #include "libxipc/xrl_cmd_map.hh"
00023 
00024 class XrlCliTargetBase {
00025 protected:
00026     XrlCmdMap* _cmds;
00027 
00028 public:
00036     XrlCliTargetBase(XrlCmdMap* cmds = 0);
00037 
00043     virtual ~XrlCliTargetBase();
00044 
00055     bool set_command_map(XrlCmdMap* cmds);
00056 
00060     const string& get_name() const { return _cmds->name(); }
00061 
00065     const char* version() const { return "cli/0.0"; }
00066 
00067 protected:
00068 
00074     virtual XrlCmdError common_0_1_get_target_name(
00075     // Output values,
00076     string& name) = 0;
00077 #ifdef XORP_ENABLE_ASYNC_SERVER
00078     typedef
00079     XorpCallback2<void, const XrlCmdError &,
00080     const string*>::RefPtr
00081     Common01GetTargetNameRF;
00082 
00083     class Common01GetTargetNameCB {
00084         Common01GetTargetNameRF cb;
00085 
00086     public:
00087         operator const Common01GetTargetNameRF& () const { return cb; }
00088         const Common01GetTargetNameRF& operator ->() const { return cb; }
00089         Common01GetTargetNameCB(const Common01GetTargetNameRF& cb)
00090           : cb(cb) { }
00091 
00092         void fail(const XrlCmdError &e) const { cb->dispatch(e, NULL); }
00093 
00094         void respond(const string& arg_name) const {
00095             cb->dispatch(XrlCmdError::OKAY(),
00096                          &arg_name);
00097         }
00098     };
00099 
00100     struct Common01GetTargetNameRsp :
00101       public Common01GetTargetNameCB {
00102         struct args_str {
00103             string name;
00104         };
00105 
00106     private:
00107         args_str args;
00108 
00109     public:
00110         Common01GetTargetNameRsp(const Common01GetTargetNameRF& cb)
00111           : Common01GetTargetNameCB(cb) { }
00112 
00113         void respond() const {
00114             Common01GetTargetNameCB::
00115             respond(args.name);
00116         }
00117 
00118         args_str* operator ->() {
00119             return &args;
00120         }
00121     };
00122 
00123     virtual void async_common_0_1_get_target_name
00124        (
00125     Common01GetTargetNameCB);
00126 #endif
00127 
00133     virtual XrlCmdError common_0_1_get_version(
00134     // Output values,
00135     string& version) = 0;
00136 #ifdef XORP_ENABLE_ASYNC_SERVER
00137     typedef
00138     XorpCallback2<void, const XrlCmdError &,
00139     const string*>::RefPtr
00140     Common01GetVersionRF;
00141 
00142     class Common01GetVersionCB {
00143         Common01GetVersionRF cb;
00144 
00145     public:
00146         operator const Common01GetVersionRF& () const { return cb; }
00147         const Common01GetVersionRF& operator ->() const { return cb; }
00148         Common01GetVersionCB(const Common01GetVersionRF& cb)
00149           : cb(cb) { }
00150 
00151         void fail(const XrlCmdError &e) const { cb->dispatch(e, NULL); }
00152 
00153         void respond(const string& arg_version) const {
00154             cb->dispatch(XrlCmdError::OKAY(),
00155                          &arg_version);
00156         }
00157     };
00158 
00159     struct Common01GetVersionRsp :
00160       public Common01GetVersionCB {
00161         struct args_str {
00162             string version;
00163         };
00164 
00165     private:
00166         args_str args;
00167 
00168     public:
00169         Common01GetVersionRsp(const Common01GetVersionRF& cb)
00170           : Common01GetVersionCB(cb) { }
00171 
00172         void respond() const {
00173             Common01GetVersionCB::
00174             respond(args.version);
00175         }
00176 
00177         args_str* operator ->() {
00178             return &args;
00179         }
00180     };
00181 
00182     virtual void async_common_0_1_get_version
00183        (
00184     Common01GetVersionCB);
00185 #endif
00186 
00192     virtual XrlCmdError common_0_1_get_status(
00193     // Output values,
00194     uint32_t&   status,
00195     string& reason) = 0;
00196 #ifdef XORP_ENABLE_ASYNC_SERVER
00197     typedef
00198     XorpCallback3<void, const XrlCmdError &,
00199     const uint32_t*,
00200     const string*>::RefPtr
00201     Common01GetStatusRF;
00202 
00203     class Common01GetStatusCB {
00204         Common01GetStatusRF cb;
00205 
00206     public:
00207         operator const Common01GetStatusRF& () const { return cb; }
00208         const Common01GetStatusRF& operator ->() const { return cb; }
00209         Common01GetStatusCB(const Common01GetStatusRF& cb)
00210           : cb(cb) { }
00211 
00212         void fail(const XrlCmdError &e) const { cb->dispatch(e, NULL, NULL); }
00213 
00214         void respond(const uint32_t& arg_status,
00215                      const string& arg_reason) const {
00216             cb->dispatch(XrlCmdError::OKAY(),
00217                          &arg_status,
00218                          &arg_reason);
00219         }
00220     };
00221 
00222     struct Common01GetStatusRsp :
00223       public Common01GetStatusCB {
00224         struct args_str {
00225             uint32_t status;
00226             string reason;
00227         };
00228 
00229     private:
00230         args_str args;
00231 
00232     public:
00233         Common01GetStatusRsp(const Common01GetStatusRF& cb)
00234           : Common01GetStatusCB(cb) { }
00235 
00236         void respond() const {
00237             Common01GetStatusCB::
00238             respond(args.status,
00239                         args.reason);
00240         }
00241 
00242         args_str* operator ->() {
00243             return &args;
00244         }
00245     };
00246 
00247     virtual void async_common_0_1_get_status
00248        (
00249     Common01GetStatusCB);
00250 #endif
00251 
00257     virtual XrlCmdError common_0_1_shutdown() = 0;
00258 #ifdef XORP_ENABLE_ASYNC_SERVER
00259     typedef
00260     XorpCallback1<void, const XrlCmdError &>::RefPtr
00261     Common01ShutdownRF;
00262 
00263     class Common01ShutdownCB {
00264         Common01ShutdownRF cb;
00265 
00266     public:
00267         operator const Common01ShutdownRF& () const { return cb; }
00268         const Common01ShutdownRF& operator ->() const { return cb; }
00269         Common01ShutdownCB(const Common01ShutdownRF& cb)
00270           : cb(cb) { }
00271 
00272         void fail(const XrlCmdError &e) const { cb->dispatch(e); }
00273 
00274         void respond() const {
00275             cb->dispatch(XrlCmdError::OKAY());
00276         }
00277     };
00278 
00279     struct Common01ShutdownRsp :
00280       public Common01ShutdownCB {
00281         Common01ShutdownRsp(const Common01ShutdownRF& cb)
00282           : Common01ShutdownCB(cb) { }
00283 
00284     };
00285 
00286     virtual void async_common_0_1_shutdown
00287        (
00288     Common01ShutdownCB);
00289 #endif
00290 
00296     virtual XrlCmdError common_0_1_startup() = 0;
00297 #ifdef XORP_ENABLE_ASYNC_SERVER
00298     typedef
00299     XorpCallback1<void, const XrlCmdError &>::RefPtr
00300     Common01StartupRF;
00301 
00302     class Common01StartupCB {
00303         Common01StartupRF cb;
00304 
00305     public:
00306         operator const Common01StartupRF& () const { return cb; }
00307         const Common01StartupRF& operator ->() const { return cb; }
00308         Common01StartupCB(const Common01StartupRF& cb)
00309           : cb(cb) { }
00310 
00311         void fail(const XrlCmdError &e) const { cb->dispatch(e); }
00312 
00313         void respond() const {
00314             cb->dispatch(XrlCmdError::OKAY());
00315         }
00316     };
00317 
00318     struct Common01StartupRsp :
00319       public Common01StartupCB {
00320         Common01StartupRsp(const Common01StartupRF& cb)
00321           : Common01StartupCB(cb) { }
00322 
00323     };
00324 
00325     virtual void async_common_0_1_startup
00326        (
00327     Common01StartupCB);
00328 #endif
00329 
00337     virtual XrlCmdError cli_manager_0_1_enable_cli(
00338     // Input values,
00339     const bool& enable) = 0;
00340 #ifdef XORP_ENABLE_ASYNC_SERVER
00341     typedef
00342     XorpCallback1<void, const XrlCmdError &>::RefPtr
00343     CliManager01EnableCliRF;
00344 
00345     class CliManager01EnableCliCB {
00346         CliManager01EnableCliRF cb;
00347 
00348     public:
00349         operator const CliManager01EnableCliRF& () const { return cb; }
00350         const CliManager01EnableCliRF& operator ->() const { return cb; }
00351         CliManager01EnableCliCB(const CliManager01EnableCliRF& cb)
00352           : cb(cb) { }
00353 
00354         void fail(const XrlCmdError &e) const { cb->dispatch(e); }
00355 
00356         void respond() const {
00357             cb->dispatch(XrlCmdError::OKAY());
00358         }
00359     };
00360 
00361     struct CliManager01EnableCliRsp :
00362       public CliManager01EnableCliCB {
00363         CliManager01EnableCliRsp(const CliManager01EnableCliRF& cb)
00364           : CliManager01EnableCliCB(cb) { }
00365 
00366     };
00367 
00368     virtual void async_cli_manager_0_1_enable_cli
00369        (
00370     const bool& enable,
00371     CliManager01EnableCliCB);
00372 #endif
00373 
00374     virtual XrlCmdError cli_manager_0_1_start_cli() = 0;
00375 #ifdef XORP_ENABLE_ASYNC_SERVER
00376     typedef
00377     XorpCallback1<void, const XrlCmdError &>::RefPtr
00378     CliManager01StartCliRF;
00379 
00380     class CliManager01StartCliCB {
00381         CliManager01StartCliRF cb;
00382 
00383     public:
00384         operator const CliManager01StartCliRF& () const { return cb; }
00385         const CliManager01StartCliRF& operator ->() const { return cb; }
00386         CliManager01StartCliCB(const CliManager01StartCliRF& cb)
00387           : cb(cb) { }
00388 
00389         void fail(const XrlCmdError &e) const { cb->dispatch(e); }
00390 
00391         void respond() const {
00392             cb->dispatch(XrlCmdError::OKAY());
00393         }
00394     };
00395 
00396     struct CliManager01StartCliRsp :
00397       public CliManager01StartCliCB {
00398         CliManager01StartCliRsp(const CliManager01StartCliRF& cb)
00399           : CliManager01StartCliCB(cb) { }
00400 
00401     };
00402 
00403     virtual void async_cli_manager_0_1_start_cli
00404        (
00405     CliManager01StartCliCB);
00406 #endif
00407 
00408     virtual XrlCmdError cli_manager_0_1_stop_cli() = 0;
00409 #ifdef XORP_ENABLE_ASYNC_SERVER
00410     typedef
00411     XorpCallback1<void, const XrlCmdError &>::RefPtr
00412     CliManager01StopCliRF;
00413 
00414     class CliManager01StopCliCB {
00415         CliManager01StopCliRF cb;
00416 
00417     public:
00418         operator const CliManager01StopCliRF& () const { return cb; }
00419         const CliManager01StopCliRF& operator ->() const { return cb; }
00420         CliManager01StopCliCB(const CliManager01StopCliRF& cb)
00421           : cb(cb) { }
00422 
00423         void fail(const XrlCmdError &e) const { cb->dispatch(e); }
00424 
00425         void respond() const {
00426             cb->dispatch(XrlCmdError::OKAY());
00427         }
00428     };
00429 
00430     struct CliManager01StopCliRsp :
00431       public CliManager01StopCliCB {
00432         CliManager01StopCliRsp(const CliManager01StopCliRF& cb)
00433           : CliManager01StopCliCB(cb) { }
00434 
00435     };
00436 
00437     virtual void async_cli_manager_0_1_stop_cli
00438        (
00439     CliManager01StopCliCB);
00440 #endif
00441 
00451     virtual XrlCmdError cli_manager_0_1_add_enable_cli_access_from_subnet4(
00452     // Input values,
00453     const IPv4Net&  subnet_addr) = 0;
00454 #ifdef XORP_ENABLE_ASYNC_SERVER
00455     typedef
00456     XorpCallback1<void, const XrlCmdError &>::RefPtr
00457     CliManager01AddEnableCliAccessFromSubnet4RF;
00458 
00459     class CliManager01AddEnableCliAccessFromSubnet4CB {
00460         CliManager01AddEnableCliAccessFromSubnet4RF cb;
00461 
00462     public:
00463         operator const CliManager01AddEnableCliAccessFromSubnet4RF& () const { return cb; }
00464         const CliManager01AddEnableCliAccessFromSubnet4RF& operator ->() const { return cb; }
00465         CliManager01AddEnableCliAccessFromSubnet4CB(const CliManager01AddEnableCliAccessFromSubnet4RF& cb)
00466           : cb(cb) { }
00467 
00468         void fail(const XrlCmdError &e) const { cb->dispatch(e); }
00469 
00470         void respond() const {
00471             cb->dispatch(XrlCmdError::OKAY());
00472         }
00473     };
00474 
00475     struct CliManager01AddEnableCliAccessFromSubnet4Rsp :
00476       public CliManager01AddEnableCliAccessFromSubnet4CB {
00477         CliManager01AddEnableCliAccessFromSubnet4Rsp(const CliManager01AddEnableCliAccessFromSubnet4RF& cb)
00478           : CliManager01AddEnableCliAccessFromSubnet4CB(cb) { }
00479 
00480     };
00481 
00482     virtual void async_cli_manager_0_1_add_enable_cli_access_from_subnet4
00483        (
00484     const IPv4Net&  subnet_addr,
00485     CliManager01AddEnableCliAccessFromSubnet4CB);
00486 #endif
00487 
00488     virtual XrlCmdError cli_manager_0_1_add_enable_cli_access_from_subnet6(
00489     // Input values,
00490     const IPv6Net&  subnet_addr) = 0;
00491 #ifdef XORP_ENABLE_ASYNC_SERVER
00492     typedef
00493     XorpCallback1<void, const XrlCmdError &>::RefPtr
00494     CliManager01AddEnableCliAccessFromSubnet6RF;
00495 
00496     class CliManager01AddEnableCliAccessFromSubnet6CB {
00497         CliManager01AddEnableCliAccessFromSubnet6RF cb;
00498 
00499     public:
00500         operator const CliManager01AddEnableCliAccessFromSubnet6RF& () const { return cb; }
00501         const CliManager01AddEnableCliAccessFromSubnet6RF& operator ->() const { return cb; }
00502         CliManager01AddEnableCliAccessFromSubnet6CB(const CliManager01AddEnableCliAccessFromSubnet6RF& cb)
00503           : cb(cb) { }
00504 
00505         void fail(const XrlCmdError &e) const { cb->dispatch(e); }
00506 
00507         void respond() const {
00508             cb->dispatch(XrlCmdError::OKAY());
00509         }
00510     };
00511 
00512     struct CliManager01AddEnableCliAccessFromSubnet6Rsp :
00513       public CliManager01AddEnableCliAccessFromSubnet6CB {
00514         CliManager01AddEnableCliAccessFromSubnet6Rsp(const CliManager01AddEnableCliAccessFromSubnet6RF& cb)
00515           : CliManager01AddEnableCliAccessFromSubnet6CB(cb) { }
00516 
00517     };
00518 
00519     virtual void async_cli_manager_0_1_add_enable_cli_access_from_subnet6
00520        (
00521     const IPv6Net&  subnet_addr,
00522     CliManager01AddEnableCliAccessFromSubnet6CB);
00523 #endif
00524 
00533     virtual XrlCmdError cli_manager_0_1_delete_enable_cli_access_from_subnet4(
00534     // Input values,
00535     const IPv4Net&  subnet_addr) = 0;
00536 #ifdef XORP_ENABLE_ASYNC_SERVER
00537     typedef
00538     XorpCallback1<void, const XrlCmdError &>::RefPtr
00539     CliManager01DeleteEnableCliAccessFromSubnet4RF;
00540 
00541     class CliManager01DeleteEnableCliAccessFromSubnet4CB {
00542         CliManager01DeleteEnableCliAccessFromSubnet4RF cb;
00543 
00544     public:
00545         operator const CliManager01DeleteEnableCliAccessFromSubnet4RF& () const { return cb; }
00546         const CliManager01DeleteEnableCliAccessFromSubnet4RF& operator ->() const { return cb; }
00547         CliManager01DeleteEnableCliAccessFromSubnet4CB(const CliManager01DeleteEnableCliAccessFromSubnet4RF& cb)
00548           : cb(cb) { }
00549 
00550         void fail(const XrlCmdError &e) const { cb->dispatch(e); }
00551 
00552         void respond() const {
00553             cb->dispatch(XrlCmdError::OKAY());
00554         }
00555     };
00556 
00557     struct CliManager01DeleteEnableCliAccessFromSubnet4Rsp :
00558       public CliManager01DeleteEnableCliAccessFromSubnet4CB {
00559         CliManager01DeleteEnableCliAccessFromSubnet4Rsp(const CliManager01DeleteEnableCliAccessFromSubnet4RF& cb)
00560           : CliManager01DeleteEnableCliAccessFromSubnet4CB(cb) { }
00561 
00562     };
00563 
00564     virtual void async_cli_manager_0_1_delete_enable_cli_access_from_subnet4
00565        (
00566     const IPv4Net&  subnet_addr,
00567     CliManager01DeleteEnableCliAccessFromSubnet4CB);
00568 #endif
00569 
00570     virtual XrlCmdError cli_manager_0_1_delete_enable_cli_access_from_subnet6(
00571     // Input values,
00572     const IPv6Net&  subnet_addr) = 0;
00573 #ifdef XORP_ENABLE_ASYNC_SERVER
00574     typedef
00575     XorpCallback1<void, const XrlCmdError &>::RefPtr
00576     CliManager01DeleteEnableCliAccessFromSubnet6RF;
00577 
00578     class CliManager01DeleteEnableCliAccessFromSubnet6CB {
00579         CliManager01DeleteEnableCliAccessFromSubnet6RF cb;
00580 
00581     public:
00582         operator const CliManager01DeleteEnableCliAccessFromSubnet6RF& () const { return cb; }
00583         const CliManager01DeleteEnableCliAccessFromSubnet6RF& operator ->() const { return cb; }
00584         CliManager01DeleteEnableCliAccessFromSubnet6CB(const CliManager01DeleteEnableCliAccessFromSubnet6RF& cb)
00585           : cb(cb) { }
00586 
00587         void fail(const XrlCmdError &e) const { cb->dispatch(e); }
00588 
00589         void respond() const {
00590             cb->dispatch(XrlCmdError::OKAY());
00591         }
00592     };
00593 
00594     struct CliManager01DeleteEnableCliAccessFromSubnet6Rsp :
00595       public CliManager01DeleteEnableCliAccessFromSubnet6CB {
00596         CliManager01DeleteEnableCliAccessFromSubnet6Rsp(const CliManager01DeleteEnableCliAccessFromSubnet6RF& cb)
00597           : CliManager01DeleteEnableCliAccessFromSubnet6CB(cb) { }
00598 
00599     };
00600 
00601     virtual void async_cli_manager_0_1_delete_enable_cli_access_from_subnet6
00602        (
00603     const IPv6Net&  subnet_addr,
00604     CliManager01DeleteEnableCliAccessFromSubnet6CB);
00605 #endif
00606 
00616     virtual XrlCmdError cli_manager_0_1_add_disable_cli_access_from_subnet4(
00617     // Input values,
00618     const IPv4Net&  subnet_addr) = 0;
00619 #ifdef XORP_ENABLE_ASYNC_SERVER
00620     typedef
00621     XorpCallback1<void, const XrlCmdError &>::RefPtr
00622     CliManager01AddDisableCliAccessFromSubnet4RF;
00623 
00624     class CliManager01AddDisableCliAccessFromSubnet4CB {
00625         CliManager01AddDisableCliAccessFromSubnet4RF cb;
00626 
00627     public:
00628         operator const CliManager01AddDisableCliAccessFromSubnet4RF& () const { return cb; }
00629         const CliManager01AddDisableCliAccessFromSubnet4RF& operator ->() const { return cb; }
00630         CliManager01AddDisableCliAccessFromSubnet4CB(const CliManager01AddDisableCliAccessFromSubnet4RF& cb)
00631           : cb(cb) { }
00632 
00633         void fail(const XrlCmdError &e) const { cb->dispatch(e); }
00634 
00635         void respond() const {
00636             cb->dispatch(XrlCmdError::OKAY());
00637         }
00638     };
00639 
00640     struct CliManager01AddDisableCliAccessFromSubnet4Rsp :
00641       public CliManager01AddDisableCliAccessFromSubnet4CB {
00642         CliManager01AddDisableCliAccessFromSubnet4Rsp(const CliManager01AddDisableCliAccessFromSubnet4RF& cb)
00643           : CliManager01AddDisableCliAccessFromSubnet4CB(cb) { }
00644 
00645     };
00646 
00647     virtual void async_cli_manager_0_1_add_disable_cli_access_from_subnet4
00648        (
00649     const IPv4Net&  subnet_addr,
00650     CliManager01AddDisableCliAccessFromSubnet4CB);
00651 #endif
00652 
00653     virtual XrlCmdError cli_manager_0_1_add_disable_cli_access_from_subnet6(
00654     // Input values,
00655     const IPv6Net&  subnet_addr) = 0;
00656 #ifdef XORP_ENABLE_ASYNC_SERVER
00657     typedef
00658     XorpCallback1<void, const XrlCmdError &>::RefPtr
00659     CliManager01AddDisableCliAccessFromSubnet6RF;
00660 
00661     class CliManager01AddDisableCliAccessFromSubnet6CB {
00662         CliManager01AddDisableCliAccessFromSubnet6RF cb;
00663 
00664     public:
00665         operator const CliManager01AddDisableCliAccessFromSubnet6RF& () const { return cb; }
00666         const CliManager01AddDisableCliAccessFromSubnet6RF& operator ->() const { return cb; }
00667         CliManager01AddDisableCliAccessFromSubnet6CB(const CliManager01AddDisableCliAccessFromSubnet6RF& cb)
00668           : cb(cb) { }
00669 
00670         void fail(const XrlCmdError &e) const { cb->dispatch(e); }
00671 
00672         void respond() const {
00673             cb->dispatch(XrlCmdError::OKAY());
00674         }
00675     };
00676 
00677     struct CliManager01AddDisableCliAccessFromSubnet6Rsp :
00678       public CliManager01AddDisableCliAccessFromSubnet6CB {
00679         CliManager01AddDisableCliAccessFromSubnet6Rsp(const CliManager01AddDisableCliAccessFromSubnet6RF& cb)
00680           : CliManager01AddDisableCliAccessFromSubnet6CB(cb) { }
00681 
00682     };
00683 
00684     virtual void async_cli_manager_0_1_add_disable_cli_access_from_subnet6
00685        (
00686     const IPv6Net&  subnet_addr,
00687     CliManager01AddDisableCliAccessFromSubnet6CB);
00688 #endif
00689 
00698     virtual XrlCmdError cli_manager_0_1_delete_disable_cli_access_from_subnet4(
00699     // Input values,
00700     const IPv4Net&  subnet_addr) = 0;
00701 #ifdef XORP_ENABLE_ASYNC_SERVER
00702     typedef
00703     XorpCallback1<void, const XrlCmdError &>::RefPtr
00704     CliManager01DeleteDisableCliAccessFromSubnet4RF;
00705 
00706     class CliManager01DeleteDisableCliAccessFromSubnet4CB {
00707         CliManager01DeleteDisableCliAccessFromSubnet4RF cb;
00708 
00709     public:
00710         operator const CliManager01DeleteDisableCliAccessFromSubnet4RF& () const { return cb; }
00711         const CliManager01DeleteDisableCliAccessFromSubnet4RF& operator ->() const { return cb; }
00712         CliManager01DeleteDisableCliAccessFromSubnet4CB(const CliManager01DeleteDisableCliAccessFromSubnet4RF& cb)
00713           : cb(cb) { }
00714 
00715         void fail(const XrlCmdError &e) const { cb->dispatch(e); }
00716 
00717         void respond() const {
00718             cb->dispatch(XrlCmdError::OKAY());
00719         }
00720     };
00721 
00722     struct CliManager01DeleteDisableCliAccessFromSubnet4Rsp :
00723       public CliManager01DeleteDisableCliAccessFromSubnet4CB {
00724         CliManager01DeleteDisableCliAccessFromSubnet4Rsp(const CliManager01DeleteDisableCliAccessFromSubnet4RF& cb)
00725           : CliManager01DeleteDisableCliAccessFromSubnet4CB(cb) { }
00726 
00727     };
00728 
00729     virtual void async_cli_manager_0_1_delete_disable_cli_access_from_subnet4
00730        (
00731     const IPv4Net&  subnet_addr,
00732     CliManager01DeleteDisableCliAccessFromSubnet4CB);
00733 #endif
00734 
00735     virtual XrlCmdError cli_manager_0_1_delete_disable_cli_access_from_subnet6(
00736     // Input values,
00737     const IPv6Net&  subnet_addr) = 0;
00738 #ifdef XORP_ENABLE_ASYNC_SERVER
00739     typedef
00740     XorpCallback1<void, const XrlCmdError &>::RefPtr
00741     CliManager01DeleteDisableCliAccessFromSubnet6RF;
00742 
00743     class CliManager01DeleteDisableCliAccessFromSubnet6CB {
00744         CliManager01DeleteDisableCliAccessFromSubnet6RF cb;
00745 
00746     public:
00747         operator const CliManager01DeleteDisableCliAccessFromSubnet6RF& () const { return cb; }
00748         const CliManager01DeleteDisableCliAccessFromSubnet6RF& operator ->() const { return cb; }
00749         CliManager01DeleteDisableCliAccessFromSubnet6CB(const CliManager01DeleteDisableCliAccessFromSubnet6RF& cb)
00750           : cb(cb) { }
00751 
00752         void fail(const XrlCmdError &e) const { cb->dispatch(e); }
00753 
00754         void respond() const {
00755             cb->dispatch(XrlCmdError::OKAY());
00756         }
00757     };
00758 
00759     struct CliManager01DeleteDisableCliAccessFromSubnet6Rsp :
00760       public CliManager01DeleteDisableCliAccessFromSubnet6CB {
00761         CliManager01DeleteDisableCliAccessFromSubnet6Rsp(const CliManager01DeleteDisableCliAccessFromSubnet6RF& cb)
00762           : CliManager01DeleteDisableCliAccessFromSubnet6CB(cb) { }
00763 
00764     };
00765 
00766     virtual void async_cli_manager_0_1_delete_disable_cli_access_from_subnet6
00767        (
00768     const IPv6Net&  subnet_addr,
00769     CliManager01DeleteDisableCliAccessFromSubnet6CB);
00770 #endif
00771 
00792     virtual XrlCmdError cli_manager_0_1_add_cli_command(
00793     // Input values,
00794     const string&   processor_name,
00795     const string&   command_name,
00796     const string&   command_help,
00797     const bool& is_command_cd,
00798     const string&   command_cd_prompt,
00799     const bool& is_command_processor) = 0;
00800 #ifdef XORP_ENABLE_ASYNC_SERVER
00801     typedef
00802     XorpCallback1<void, const XrlCmdError &>::RefPtr
00803     CliManager01AddCliCommandRF;
00804 
00805     class CliManager01AddCliCommandCB {
00806         CliManager01AddCliCommandRF cb;
00807 
00808     public:
00809         operator const CliManager01AddCliCommandRF& () const { return cb; }
00810         const CliManager01AddCliCommandRF& operator ->() const { return cb; }
00811         CliManager01AddCliCommandCB(const CliManager01AddCliCommandRF& cb)
00812           : cb(cb) { }
00813 
00814         void fail(const XrlCmdError &e) const { cb->dispatch(e); }
00815 
00816         void respond() const {
00817             cb->dispatch(XrlCmdError::OKAY());
00818         }
00819     };
00820 
00821     struct CliManager01AddCliCommandRsp :
00822       public CliManager01AddCliCommandCB {
00823         CliManager01AddCliCommandRsp(const CliManager01AddCliCommandRF& cb)
00824           : CliManager01AddCliCommandCB(cb) { }
00825 
00826     };
00827 
00828     virtual void async_cli_manager_0_1_add_cli_command
00829        (
00830     const string&   processor_name,
00831     const string&   command_name,
00832     const string&   command_help,
00833     const bool& is_command_cd,
00834     const string&   command_cd_prompt,
00835     const bool& is_command_processor,
00836     CliManager01AddCliCommandCB);
00837 #endif
00838 
00848     virtual XrlCmdError cli_manager_0_1_delete_cli_command(
00849     // Input values,
00850     const string&   processor_name,
00851     const string&   command_name) = 0;
00852 #ifdef XORP_ENABLE_ASYNC_SERVER
00853     typedef
00854     XorpCallback1<void, const XrlCmdError &>::RefPtr
00855     CliManager01DeleteCliCommandRF;
00856 
00857     class CliManager01DeleteCliCommandCB {
00858         CliManager01DeleteCliCommandRF cb;
00859 
00860     public:
00861         operator const CliManager01DeleteCliCommandRF& () const { return cb; }
00862         const CliManager01DeleteCliCommandRF& operator ->() const { return cb; }
00863         CliManager01DeleteCliCommandCB(const CliManager01DeleteCliCommandRF& cb)
00864           : cb(cb) { }
00865 
00866         void fail(const XrlCmdError &e) const { cb->dispatch(e); }
00867 
00868         void respond() const {
00869             cb->dispatch(XrlCmdError::OKAY());
00870         }
00871     };
00872 
00873     struct CliManager01DeleteCliCommandRsp :
00874       public CliManager01DeleteCliCommandCB {
00875         CliManager01DeleteCliCommandRsp(const CliManager01DeleteCliCommandRF& cb)
00876           : CliManager01DeleteCliCommandCB(cb) { }
00877 
00878     };
00879 
00880     virtual void async_cli_manager_0_1_delete_cli_command
00881        (
00882     const string&   processor_name,
00883     const string&   command_name,
00884     CliManager01DeleteCliCommandCB);
00885 #endif
00886 
00887 private:
00888     XrlCmdRT handle_common_0_1_get_target_name(const XrlArgs& in, XrlCmdOT out);
00889 #ifdef XORP_ENABLE_ASYNC_SERVER
00890     void callback_common_0_1_get_target_name
00891        (const XrlCmdError &e,
00892     const string* arg_name,
00893         XrlRespCallback);
00894 #endif
00895 
00896     XrlCmdRT handle_common_0_1_get_version(const XrlArgs& in, XrlCmdOT out);
00897 #ifdef XORP_ENABLE_ASYNC_SERVER
00898     void callback_common_0_1_get_version
00899        (const XrlCmdError &e,
00900     const string* arg_version,
00901         XrlRespCallback);
00902 #endif
00903 
00904     XrlCmdRT handle_common_0_1_get_status(const XrlArgs& in, XrlCmdOT out);
00905 #ifdef XORP_ENABLE_ASYNC_SERVER
00906     void callback_common_0_1_get_status
00907        (const XrlCmdError &e,
00908     const uint32_t* arg_status,
00909     const string* arg_reason,
00910         XrlRespCallback);
00911 #endif
00912 
00913     XrlCmdRT handle_common_0_1_shutdown(const XrlArgs& in, XrlCmdOT out);
00914 #ifdef XORP_ENABLE_ASYNC_SERVER
00915     void callback_common_0_1_shutdown
00916        (const XrlCmdError &e,
00917         XrlRespCallback);
00918 #endif
00919 
00920     XrlCmdRT handle_common_0_1_startup(const XrlArgs& in, XrlCmdOT out);
00921 #ifdef XORP_ENABLE_ASYNC_SERVER
00922     void callback_common_0_1_startup
00923        (const XrlCmdError &e,
00924         XrlRespCallback);
00925 #endif
00926 
00927     XrlCmdRT handle_cli_manager_0_1_enable_cli(const XrlArgs& in, XrlCmdOT out);
00928 #ifdef XORP_ENABLE_ASYNC_SERVER
00929     void callback_cli_manager_0_1_enable_cli
00930        (const XrlCmdError &e,
00931         XrlRespCallback);
00932 #endif
00933 
00934     XrlCmdRT handle_cli_manager_0_1_start_cli(const XrlArgs& in, XrlCmdOT out);
00935 #ifdef XORP_ENABLE_ASYNC_SERVER
00936     void callback_cli_manager_0_1_start_cli
00937        (const XrlCmdError &e,
00938         XrlRespCallback);
00939 #endif
00940 
00941     XrlCmdRT handle_cli_manager_0_1_stop_cli(const XrlArgs& in, XrlCmdOT out);
00942 #ifdef XORP_ENABLE_ASYNC_SERVER
00943     void callback_cli_manager_0_1_stop_cli
00944        (const XrlCmdError &e,
00945         XrlRespCallback);
00946 #endif
00947 
00948     XrlCmdRT handle_cli_manager_0_1_add_enable_cli_access_from_subnet4(const XrlArgs& in, XrlCmdOT out);
00949 #ifdef XORP_ENABLE_ASYNC_SERVER
00950     void callback_cli_manager_0_1_add_enable_cli_access_from_subnet4
00951        (const XrlCmdError &e,
00952         XrlRespCallback);
00953 #endif
00954 
00955     XrlCmdRT handle_cli_manager_0_1_add_enable_cli_access_from_subnet6(const XrlArgs& in, XrlCmdOT out);
00956 #ifdef XORP_ENABLE_ASYNC_SERVER
00957     void callback_cli_manager_0_1_add_enable_cli_access_from_subnet6
00958        (const XrlCmdError &e,
00959         XrlRespCallback);
00960 #endif
00961 
00962     XrlCmdRT handle_cli_manager_0_1_delete_enable_cli_access_from_subnet4(const XrlArgs& in, XrlCmdOT out);
00963 #ifdef XORP_ENABLE_ASYNC_SERVER
00964     void callback_cli_manager_0_1_delete_enable_cli_access_from_subnet4
00965        (const XrlCmdError &e,
00966         XrlRespCallback);
00967 #endif
00968 
00969     XrlCmdRT handle_cli_manager_0_1_delete_enable_cli_access_from_subnet6(const XrlArgs& in, XrlCmdOT out);
00970 #ifdef XORP_ENABLE_ASYNC_SERVER
00971     void callback_cli_manager_0_1_delete_enable_cli_access_from_subnet6
00972        (const XrlCmdError &e,
00973         XrlRespCallback);
00974 #endif
00975 
00976     XrlCmdRT handle_cli_manager_0_1_add_disable_cli_access_from_subnet4(const XrlArgs& in, XrlCmdOT out);
00977 #ifdef XORP_ENABLE_ASYNC_SERVER
00978     void callback_cli_manager_0_1_add_disable_cli_access_from_subnet4
00979        (const XrlCmdError &e,
00980         XrlRespCallback);
00981 #endif
00982 
00983     XrlCmdRT handle_cli_manager_0_1_add_disable_cli_access_from_subnet6(const XrlArgs& in, XrlCmdOT out);
00984 #ifdef XORP_ENABLE_ASYNC_SERVER
00985     void callback_cli_manager_0_1_add_disable_cli_access_from_subnet6
00986        (const XrlCmdError &e,
00987         XrlRespCallback);
00988 #endif
00989 
00990     XrlCmdRT handle_cli_manager_0_1_delete_disable_cli_access_from_subnet4(const XrlArgs& in, XrlCmdOT out);
00991 #ifdef XORP_ENABLE_ASYNC_SERVER
00992     void callback_cli_manager_0_1_delete_disable_cli_access_from_subnet4
00993        (const XrlCmdError &e,
00994         XrlRespCallback);
00995 #endif
00996 
00997     XrlCmdRT handle_cli_manager_0_1_delete_disable_cli_access_from_subnet6(const XrlArgs& in, XrlCmdOT out);
00998 #ifdef XORP_ENABLE_ASYNC_SERVER
00999     void callback_cli_manager_0_1_delete_disable_cli_access_from_subnet6
01000        (const XrlCmdError &e,
01001         XrlRespCallback);
01002 #endif
01003 
01004     XrlCmdRT handle_cli_manager_0_1_add_cli_command(const XrlArgs& in, XrlCmdOT out);
01005 #ifdef XORP_ENABLE_ASYNC_SERVER
01006     void callback_cli_manager_0_1_add_cli_command
01007        (const XrlCmdError &e,
01008         XrlRespCallback);
01009 #endif
01010 
01011     XrlCmdRT handle_cli_manager_0_1_delete_cli_command(const XrlArgs& in, XrlCmdOT out);
01012 #ifdef XORP_ENABLE_ASYNC_SERVER
01013     void callback_cli_manager_0_1_delete_cli_command
01014        (const XrlCmdError &e,
01015         XrlRespCallback);
01016 #endif
01017 
01018     void add_handlers();
01019     void remove_handlers();
01020 
01021     struct handler_table {
01022         const char *name;
01023         XrlCmdRT (XrlCliTargetBase::*method)(const XrlArgs&, XrlCmdOT);
01024     };
01025 
01026     static const struct handler_table handlers[];
01027     static const size_t num_handlers;
01028 };
01029 
01030 #endif // __XRL_TARGETS_CLI_BASE_HH__
 All Classes Namespaces Functions Variables Typedefs Enumerations