xorp

common_xif.hh

00001 /*
00002  * obj/i686-pc-linux-gnu/xrl/interfaces/common_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_COMMON_XIF_HH__
00015 #define __XRL_INTERFACES_COMMON_XIF_HH__
00016 
00017 #undef XORP_LIBRARY_NAME
00018 #define XORP_LIBRARY_NAME "XifCommon"
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 XrlCommonV0p1Client {
00030 public:
00031     XrlCommonV0p1Client(XrlSender* s) : _sender(s) {}
00032     virtual ~XrlCommonV0p1Client() {}
00033 
00034     typedef XorpCallback2<void, const XrlError&, const string*>::RefPtr GetTargetNameCB;
00042     bool send_get_target_name(
00043     const char* dst_xrl_target_name,
00044     const GetTargetNameCB&  cb
00045     );
00046 
00047     typedef XorpCallback2<void, const XrlError&, const string*>::RefPtr GetVersionCB;
00055     bool send_get_version(
00056     const char* dst_xrl_target_name,
00057     const GetVersionCB& cb
00058     );
00059 
00060     typedef XorpCallback3<void, const XrlError&, const uint32_t*, const string*>::RefPtr GetStatusCB;
00068     bool send_get_status(
00069     const char* dst_xrl_target_name,
00070     const GetStatusCB&  cb
00071     );
00072 
00073     typedef XorpCallback1<void, const XrlError&>::RefPtr ShutdownCB;
00081     bool send_shutdown(
00082     const char* dst_xrl_target_name,
00083     const ShutdownCB&   cb
00084     );
00085 
00086     typedef XorpCallback1<void, const XrlError&>::RefPtr StartupCB;
00094     bool send_startup(
00095     const char* dst_xrl_target_name,
00096     const StartupCB&    cb
00097     );
00098 
00099 protected:
00100     XrlSender* _sender;
00101 
00102 private:
00103     static void unmarshall_get_target_name(
00104     const XrlError& e,
00105     XrlArgs*    a,
00106     GetTargetNameCB     cb
00107     );
00108 
00109     static void unmarshall_get_version(
00110     const XrlError& e,
00111     XrlArgs*    a,
00112     GetVersionCB        cb
00113     );
00114 
00115     static void unmarshall_get_status(
00116     const XrlError& e,
00117     XrlArgs*    a,
00118     GetStatusCB     cb
00119     );
00120 
00121     static void unmarshall_shutdown(
00122     const XrlError& e,
00123     XrlArgs*    a,
00124     ShutdownCB      cb
00125     );
00126 
00127     static void unmarshall_startup(
00128     const XrlError& e,
00129     XrlArgs*    a,
00130     StartupCB       cb
00131     );
00132 
00133 private:
00134     /* Declare cached Xrl pointers */
00135     auto_ptr<Xrl> ap_xrl_get_target_name;
00136     auto_ptr<Xrl> ap_xrl_get_version;
00137     auto_ptr<Xrl> ap_xrl_get_status;
00138     auto_ptr<Xrl> ap_xrl_shutdown;
00139     auto_ptr<Xrl> ap_xrl_startup;
00140 };
00141 
00142 #endif /* __XRL_INTERFACES_COMMON_XIF_HH__ */
 All Classes Namespaces Functions Variables Typedefs Enumerations