xorp

policy_backend_xif.hh

00001 /*
00002  * obj/i686-pc-linux-gnu/xrl/interfaces/policy_backend_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_POLICY_BACKEND_XIF_HH__
00015 #define __XRL_INTERFACES_POLICY_BACKEND_XIF_HH__
00016 
00017 #undef XORP_LIBRARY_NAME
00018 #define XORP_LIBRARY_NAME "XifPolicyBackend"
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 XrlPolicyBackendV0p1Client {
00030 public:
00031     XrlPolicyBackendV0p1Client(XrlSender* s) : _sender(s) {}
00032     virtual ~XrlPolicyBackendV0p1Client() {}
00033 
00034     typedef XorpCallback1<void, const XrlError&>::RefPtr ConfigureCB;
00046     bool send_configure(
00047     const char* dst_xrl_target_name,
00048     const uint32_t& filter,
00049     const string&   conf,
00050     const ConfigureCB&  cb
00051     );
00052 
00053     typedef XorpCallback1<void, const XrlError&>::RefPtr ResetCB;
00063     bool send_reset(
00064     const char* dst_xrl_target_name,
00065     const uint32_t& filter,
00066     const ResetCB&  cb
00067     );
00068 
00069     typedef XorpCallback1<void, const XrlError&>::RefPtr PushRoutesCB;
00077     bool send_push_routes(
00078     const char* dst_xrl_target_name,
00079     const PushRoutesCB& cb
00080     );
00081 
00082 protected:
00083     XrlSender* _sender;
00084 
00085 private:
00086     static void unmarshall_configure(
00087     const XrlError& e,
00088     XrlArgs*    a,
00089     ConfigureCB     cb
00090     );
00091 
00092     static void unmarshall_reset(
00093     const XrlError& e,
00094     XrlArgs*    a,
00095     ResetCB     cb
00096     );
00097 
00098     static void unmarshall_push_routes(
00099     const XrlError& e,
00100     XrlArgs*    a,
00101     PushRoutesCB        cb
00102     );
00103 
00104 private:
00105     /* Declare cached Xrl pointers */
00106     auto_ptr<Xrl> ap_xrl_configure;
00107     auto_ptr<Xrl> ap_xrl_reset;
00108     auto_ptr<Xrl> ap_xrl_push_routes;
00109 };
00110 
00111 #endif /* __XRL_INTERFACES_POLICY_BACKEND_XIF_HH__ */
 All Classes Namespaces Functions Variables Typedefs Enumerations