xorp

finder_client_xif.hh

00001 /*
00002  * obj/i686-pc-linux-gnu/xrl/interfaces/finder_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_FINDER_CLIENT_XIF_HH__
00015 #define __XRL_INTERFACES_FINDER_CLIENT_XIF_HH__
00016 
00017 #undef XORP_LIBRARY_NAME
00018 #define XORP_LIBRARY_NAME "XifFinderClient"
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 XrlFinderClientV0p2Client {
00030 public:
00031     XrlFinderClientV0p2Client(XrlSender* s) : _sender(s) {}
00032     virtual ~XrlFinderClientV0p2Client() {}
00033 
00034     typedef XorpCallback1<void, const XrlError&>::RefPtr HelloCB;
00042     bool send_hello(
00043     const char* dst_xrl_target_name,
00044     const HelloCB&  cb
00045     );
00046 
00047     typedef XorpCallback1<void, const XrlError&>::RefPtr RemoveXrlFromCacheCB;
00058     bool send_remove_xrl_from_cache(
00059     const char* dst_xrl_target_name,
00060     const string&   xrl,
00061     const RemoveXrlFromCacheCB& cb
00062     );
00063 
00064     typedef XorpCallback1<void, const XrlError&>::RefPtr RemoveXrlsForTargetFromCacheCB;
00072     bool send_remove_xrls_for_target_from_cache(
00073     const char* dst_xrl_target_name,
00074     const string&   target_name,
00075     const RemoveXrlsForTargetFromCacheCB&   cb
00076     );
00077 
00078     typedef XorpCallback3<void, const XrlError&, const uint32_t*, const string*>::RefPtr DispatchTunneledXrlCB;
00087     bool send_dispatch_tunneled_xrl(
00088     const char* dst_xrl_target_name,
00089     const string&   xrl,
00090     const DispatchTunneledXrlCB&    cb
00091     );
00092 
00093 protected:
00094     XrlSender* _sender;
00095 
00096 private:
00097     static void unmarshall_hello(
00098     const XrlError& e,
00099     XrlArgs*    a,
00100     HelloCB     cb
00101     );
00102 
00103     static void unmarshall_remove_xrl_from_cache(
00104     const XrlError& e,
00105     XrlArgs*    a,
00106     RemoveXrlFromCacheCB        cb
00107     );
00108 
00109     static void unmarshall_remove_xrls_for_target_from_cache(
00110     const XrlError& e,
00111     XrlArgs*    a,
00112     RemoveXrlsForTargetFromCacheCB      cb
00113     );
00114 
00115     static void unmarshall_dispatch_tunneled_xrl(
00116     const XrlError& e,
00117     XrlArgs*    a,
00118     DispatchTunneledXrlCB       cb
00119     );
00120 
00121 private:
00122     /* Declare cached Xrl pointers */
00123     auto_ptr<Xrl> ap_xrl_hello;
00124     auto_ptr<Xrl> ap_xrl_remove_xrl_from_cache;
00125     auto_ptr<Xrl> ap_xrl_remove_xrls_for_target_from_cache;
00126     auto_ptr<Xrl> ap_xrl_dispatch_tunneled_xrl;
00127 };
00128 
00129 #endif /* __XRL_INTERFACES_FINDER_CLIENT_XIF_HH__ */
 All Classes Namespaces Functions Variables Typedefs Enumerations