xorp

rtrmgr_xif.hh

00001 /*
00002  * obj/i386-pc-mingw32/xrl/interfaces/rtrmgr_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_XIF_HH__
00015 #define __XRL_INTERFACES_RTRMGR_XIF_HH__
00016 
00017 #undef XORP_LIBRARY_NAME
00018 #define XORP_LIBRARY_NAME "XifRtrmgr"
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 XrlRtrmgrV0p1Client {
00030 public:
00031     XrlRtrmgrV0p1Client(XrlSender* s) : _sender(s) {}
00032     virtual ~XrlRtrmgrV0p1Client() {}
00033 
00034     typedef XorpCallback2<void, const XrlError&, const uint32_t*>::RefPtr GetPidCB;
00035 
00036     bool send_get_pid(
00037     const char* dst_xrl_target_name,
00038     const GetPidCB& cb
00039     );
00040 
00041     typedef XorpCallback4<void, const XrlError&, const string*, const uint32_t*, const uint32_t*>::RefPtr RegisterClientCB;
00052     bool send_register_client(
00053     const char* dst_xrl_target_name,
00054     const uint32_t& userid,
00055     const string&   clientname,
00056     const RegisterClientCB& cb
00057     );
00058 
00059     typedef XorpCallback1<void, const XrlError&>::RefPtr UnregisterClientCB;
00060 
00061     bool send_unregister_client(
00062     const char* dst_xrl_target_name,
00063     const string&   token,
00064     const UnregisterClientCB&   cb
00065     );
00066 
00067     typedef XorpCallback1<void, const XrlError&>::RefPtr AuthenticateClientCB;
00068 
00069     bool send_authenticate_client(
00070     const char* dst_xrl_target_name,
00071     const uint32_t& userid,
00072     const string&   clientname,
00073     const string&   token,
00074     const AuthenticateClientCB& cb
00075     );
00076 
00077     typedef XorpCallback1<void, const XrlError&>::RefPtr EnterConfigModeCB;
00078 
00079     bool send_enter_config_mode(
00080     const char* dst_xrl_target_name,
00081     const string&   token,
00082     const bool& exclusive,
00083     const EnterConfigModeCB&    cb
00084     );
00085 
00086     typedef XorpCallback1<void, const XrlError&>::RefPtr LeaveConfigModeCB;
00087 
00088     bool send_leave_config_mode(
00089     const char* dst_xrl_target_name,
00090     const string&   token,
00091     const LeaveConfigModeCB&    cb
00092     );
00093 
00094     typedef XorpCallback2<void, const XrlError&, const XrlAtomList*>::RefPtr GetConfigUsersCB;
00095 
00096     bool send_get_config_users(
00097     const char* dst_xrl_target_name,
00098     const string&   token,
00099     const GetConfigUsersCB& cb
00100     );
00101 
00102     typedef XorpCallback3<void, const XrlError&, const bool*, const string*>::RefPtr GetRunningConfigCB;
00103 
00104     bool send_get_running_config(
00105     const char* dst_xrl_target_name,
00106     const string&   token,
00107     const GetRunningConfigCB&   cb
00108     );
00109 
00110     typedef XorpCallback1<void, const XrlError&>::RefPtr ApplyConfigChangeCB;
00111 
00112     bool send_apply_config_change(
00113     const char* dst_xrl_target_name,
00114     const string&   token,
00115     const string&   target,
00116     const string&   deltas,
00117     const string&   deletions,
00118     const ApplyConfigChangeCB&  cb
00119     );
00120 
00121     typedef XorpCallback3<void, const XrlError&, const bool*, const uint32_t*>::RefPtr LockConfigCB;
00122 
00123     bool send_lock_config(
00124     const char* dst_xrl_target_name,
00125     const string&   token,
00126     const uint32_t& timeout,
00127     const LockConfigCB& cb
00128     );
00129 
00130     typedef XorpCallback1<void, const XrlError&>::RefPtr UnlockConfigCB;
00131 
00132     bool send_unlock_config(
00133     const char* dst_xrl_target_name,
00134     const string&   token,
00135     const UnlockConfigCB&   cb
00136     );
00137 
00138     typedef XorpCallback3<void, const XrlError&, const bool*, const uint32_t*>::RefPtr LockNodeCB;
00139 
00140     bool send_lock_node(
00141     const char* dst_xrl_target_name,
00142     const string&   token,
00143     const string&   node,
00144     const uint32_t& timeout,
00145     const LockNodeCB&   cb
00146     );
00147 
00148     typedef XorpCallback1<void, const XrlError&>::RefPtr UnlockNodeCB;
00149 
00150     bool send_unlock_node(
00151     const char* dst_xrl_target_name,
00152     const string&   token,
00153     const string&   node,
00154     const UnlockNodeCB& cb
00155     );
00156 
00157     typedef XorpCallback1<void, const XrlError&>::RefPtr SaveConfigCB;
00158 
00159     bool send_save_config(
00160     const char* dst_xrl_target_name,
00161     const string&   token,
00162     const string&   target,
00163     const string&   filename,
00164     const SaveConfigCB& cb
00165     );
00166 
00167     typedef XorpCallback1<void, const XrlError&>::RefPtr LoadConfigCB;
00168 
00169     bool send_load_config(
00170     const char* dst_xrl_target_name,
00171     const string&   token,
00172     const string&   target,
00173     const string&   filename,
00174     const LoadConfigCB& cb
00175     );
00176 
00177     typedef XorpCallback1<void, const XrlError&>::RefPtr SetConfigDirectoryCB;
00188     bool send_set_config_directory(
00189     const char* dst_xrl_target_name,
00190     const string&   config_directory,
00191     const SetConfigDirectoryCB& cb
00192     );
00193 
00194 protected:
00195     XrlSender* _sender;
00196 
00197 private:
00198     static void unmarshall_get_pid(
00199     const XrlError& e,
00200     XrlArgs*    a,
00201     GetPidCB        cb
00202     );
00203 
00204     static void unmarshall_register_client(
00205     const XrlError& e,
00206     XrlArgs*    a,
00207     RegisterClientCB        cb
00208     );
00209 
00210     static void unmarshall_unregister_client(
00211     const XrlError& e,
00212     XrlArgs*    a,
00213     UnregisterClientCB      cb
00214     );
00215 
00216     static void unmarshall_authenticate_client(
00217     const XrlError& e,
00218     XrlArgs*    a,
00219     AuthenticateClientCB        cb
00220     );
00221 
00222     static void unmarshall_enter_config_mode(
00223     const XrlError& e,
00224     XrlArgs*    a,
00225     EnterConfigModeCB       cb
00226     );
00227 
00228     static void unmarshall_leave_config_mode(
00229     const XrlError& e,
00230     XrlArgs*    a,
00231     LeaveConfigModeCB       cb
00232     );
00233 
00234     static void unmarshall_get_config_users(
00235     const XrlError& e,
00236     XrlArgs*    a,
00237     GetConfigUsersCB        cb
00238     );
00239 
00240     static void unmarshall_get_running_config(
00241     const XrlError& e,
00242     XrlArgs*    a,
00243     GetRunningConfigCB      cb
00244     );
00245 
00246     static void unmarshall_apply_config_change(
00247     const XrlError& e,
00248     XrlArgs*    a,
00249     ApplyConfigChangeCB     cb
00250     );
00251 
00252     static void unmarshall_lock_config(
00253     const XrlError& e,
00254     XrlArgs*    a,
00255     LockConfigCB        cb
00256     );
00257 
00258     static void unmarshall_unlock_config(
00259     const XrlError& e,
00260     XrlArgs*    a,
00261     UnlockConfigCB      cb
00262     );
00263 
00264     static void unmarshall_lock_node(
00265     const XrlError& e,
00266     XrlArgs*    a,
00267     LockNodeCB      cb
00268     );
00269 
00270     static void unmarshall_unlock_node(
00271     const XrlError& e,
00272     XrlArgs*    a,
00273     UnlockNodeCB        cb
00274     );
00275 
00276     static void unmarshall_save_config(
00277     const XrlError& e,
00278     XrlArgs*    a,
00279     SaveConfigCB        cb
00280     );
00281 
00282     static void unmarshall_load_config(
00283     const XrlError& e,
00284     XrlArgs*    a,
00285     LoadConfigCB        cb
00286     );
00287 
00288     static void unmarshall_set_config_directory(
00289     const XrlError& e,
00290     XrlArgs*    a,
00291     SetConfigDirectoryCB        cb
00292     );
00293 
00294 private:
00295     /* Declare cached Xrl pointers */
00296     auto_ptr<Xrl> ap_xrl_get_pid;
00297     auto_ptr<Xrl> ap_xrl_register_client;
00298     auto_ptr<Xrl> ap_xrl_unregister_client;
00299     auto_ptr<Xrl> ap_xrl_authenticate_client;
00300     auto_ptr<Xrl> ap_xrl_enter_config_mode;
00301     auto_ptr<Xrl> ap_xrl_leave_config_mode;
00302     auto_ptr<Xrl> ap_xrl_get_config_users;
00303     auto_ptr<Xrl> ap_xrl_get_running_config;
00304     auto_ptr<Xrl> ap_xrl_apply_config_change;
00305     auto_ptr<Xrl> ap_xrl_lock_config;
00306     auto_ptr<Xrl> ap_xrl_unlock_config;
00307     auto_ptr<Xrl> ap_xrl_lock_node;
00308     auto_ptr<Xrl> ap_xrl_unlock_node;
00309     auto_ptr<Xrl> ap_xrl_save_config;
00310     auto_ptr<Xrl> ap_xrl_load_config;
00311     auto_ptr<Xrl> ap_xrl_set_config_directory;
00312 };
00313 
00314 #endif /* __XRL_INTERFACES_RTRMGR_XIF_HH__ */
 All Classes Namespaces Functions Variables Typedefs Enumerations