xorp

rtrmgr_client_xif.hh

00001 /*
00002  * obj/i686-pc-linux-gnu/xrl/interfaces/rtrmgr_client_xif.hh
00003  * vim:set sts=4 ts=8 ft=cpp:
00004  *
00005  * Copyright (c) 2001-2010 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 'clnt-gen'.
00012  */
00013 
00014 #ifndef __XRL_INTERFACES_RTRMGR_CLIENT_XIF_HH__
00015 #define __XRL_INTERFACES_RTRMGR_CLIENT_XIF_HH__
00016 
00017 #undef XORP_LIBRARY_NAME
00018 #define XORP_LIBRARY_NAME "XifRtrmgrClient"
00019 
00020 #include "libxorp/xlog.h"
00021 #include "libxorp/callback.hh"
00022 
00023 #include "libxipc/xrl.hh"
00024 #include "libxipc/xrl_error.hh"
00025 #include "libxipc/xrl_sender.hh"
00026 
00027 //#include <memory>
00028 
00029 class XrlRtrmgrClientV0p2Client {
00030 public:
00031     XrlRtrmgrClientV0p2Client(XrlSender* s) : _sender(s) {}
00032     virtual ~XrlRtrmgrClientV0p2Client() {}
00033 
00034     typedef XorpCallback1<void, const XrlError&>::RefPtr NewConfigUserCB;
00035 
00036     bool send_new_config_user(
00037     const char* dst_xrl_target_name,
00038     const uint32_t& userid,
00039     const NewConfigUserCB&  cb
00040     );
00041 
00042     typedef XorpCallback1<void, const XrlError&>::RefPtr ConfigSavedDoneCB;
00043 
00044     bool send_config_saved_done(
00045     const char* dst_xrl_target_name,
00046     const bool& success,
00047     const string&   errmsg,
00048     const ConfigSavedDoneCB&    cb
00049     );
00050 
00051     typedef XorpCallback1<void, const XrlError&>::RefPtr ConfigChangeDoneCB;
00052 
00053     bool send_config_change_done(
00054     const char* dst_xrl_target_name,
00055     const bool& success,
00056     const string&   errmsg,
00057     const ConfigChangeDoneCB&   cb
00058     );
00059 
00060     typedef XorpCallback1<void, const XrlError&>::RefPtr ConfigChangedCB;
00061 
00062     bool send_config_changed(
00063     const char* dst_xrl_target_name,
00064     const uint32_t& userid,
00065     const string&   deltas,
00066     const string&   deletions,
00067     const ConfigChangedCB&  cb
00068     );
00069 
00070     typedef XorpCallback1<void, const XrlError&>::RefPtr ModuleStatusCB;
00071 
00072     bool send_module_status(
00073     const char* dst_xrl_target_name,
00074     const string&   modname,
00075     const uint32_t& status,
00076     const ModuleStatusCB&   cb
00077     );
00078 
00079 protected:
00080     XrlSender* _sender;
00081 
00082 private:
00083     static void unmarshall_new_config_user(
00084     const XrlError& e,
00085     XrlArgs*    a,
00086     NewConfigUserCB     cb
00087     );
00088 
00089     static void unmarshall_config_saved_done(
00090     const XrlError& e,
00091     XrlArgs*    a,
00092     ConfigSavedDoneCB       cb
00093     );
00094 
00095     static void unmarshall_config_change_done(
00096     const XrlError& e,
00097     XrlArgs*    a,
00098     ConfigChangeDoneCB      cb
00099     );
00100 
00101     static void unmarshall_config_changed(
00102     const XrlError& e,
00103     XrlArgs*    a,
00104     ConfigChangedCB     cb
00105     );
00106 
00107     static void unmarshall_module_status(
00108     const XrlError& e,
00109     XrlArgs*    a,
00110     ModuleStatusCB      cb
00111     );
00112 
00113 private:
00114     /* Declare cached Xrl pointers */
00115     auto_ptr<Xrl> ap_xrl_new_config_user;
00116     auto_ptr<Xrl> ap_xrl_config_saved_done;
00117     auto_ptr<Xrl> ap_xrl_config_change_done;
00118     auto_ptr<Xrl> ap_xrl_config_changed;
00119     auto_ptr<Xrl> ap_xrl_module_status;
00120 };
00121 
00122 #endif /* __XRL_INTERFACES_RTRMGR_CLIENT_XIF_HH__ */
 All Classes Namespaces Functions Variables Typedefs Enumerations