xorp

profile_xif.hh

00001 /*
00002  * obj/i686-pc-linux-gnu/xrl/interfaces/profile_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_PROFILE_XIF_HH__
00015 #define __XRL_INTERFACES_PROFILE_XIF_HH__
00016 
00017 #undef XORP_LIBRARY_NAME
00018 #define XORP_LIBRARY_NAME "XifProfile"
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 XrlProfileV0p1Client {
00030 public:
00031     XrlProfileV0p1Client(XrlSender* s) : _sender(s) {}
00032     virtual ~XrlProfileV0p1Client() {}
00033 
00034     typedef XorpCallback1<void, const XrlError&>::RefPtr EnableCB;
00044     bool send_enable(
00045     const char* dst_xrl_target_name,
00046     const string&   pname,
00047     const EnableCB& cb
00048     );
00049 
00050     typedef XorpCallback1<void, const XrlError&>::RefPtr DisableCB;
00060     bool send_disable(
00061     const char* dst_xrl_target_name,
00062     const string&   pname,
00063     const DisableCB&    cb
00064     );
00065 
00066     typedef XorpCallback1<void, const XrlError&>::RefPtr GetEntriesCB;
00078     bool send_get_entries(
00079     const char* dst_xrl_target_name,
00080     const string&   pname,
00081     const string&   instance_name,
00082     const GetEntriesCB& cb
00083     );
00084 
00085     typedef XorpCallback1<void, const XrlError&>::RefPtr ClearCB;
00095     bool send_clear(
00096     const char* dst_xrl_target_name,
00097     const string&   pname,
00098     const ClearCB&  cb
00099     );
00100 
00101     typedef XorpCallback2<void, const XrlError&, const string*>::RefPtr ListCB;
00109     bool send_list(
00110     const char* dst_xrl_target_name,
00111     const ListCB&   cb
00112     );
00113 
00114 protected:
00115     XrlSender* _sender;
00116 
00117 private:
00118     static void unmarshall_enable(
00119     const XrlError& e,
00120     XrlArgs*    a,
00121     EnableCB        cb
00122     );
00123 
00124     static void unmarshall_disable(
00125     const XrlError& e,
00126     XrlArgs*    a,
00127     DisableCB       cb
00128     );
00129 
00130     static void unmarshall_get_entries(
00131     const XrlError& e,
00132     XrlArgs*    a,
00133     GetEntriesCB        cb
00134     );
00135 
00136     static void unmarshall_clear(
00137     const XrlError& e,
00138     XrlArgs*    a,
00139     ClearCB     cb
00140     );
00141 
00142     static void unmarshall_list(
00143     const XrlError& e,
00144     XrlArgs*    a,
00145     ListCB      cb
00146     );
00147 
00148 private:
00149     /* Declare cached Xrl pointers */
00150     auto_ptr<Xrl> ap_xrl_enable;
00151     auto_ptr<Xrl> ap_xrl_disable;
00152     auto_ptr<Xrl> ap_xrl_get_entries;
00153     auto_ptr<Xrl> ap_xrl_clear;
00154     auto_ptr<Xrl> ap_xrl_list;
00155 };
00156 
00157 #endif /* __XRL_INTERFACES_PROFILE_XIF_HH__ */
 All Classes Namespaces Functions Variables Typedefs Enumerations