xorp

coord_xif.hh

00001 /*
00002  * obj/i386-pc-mingw32/xrl/interfaces/coord_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_COORD_XIF_HH__
00015 #define __XRL_INTERFACES_COORD_XIF_HH__
00016 
00017 #undef XORP_LIBRARY_NAME
00018 #define XORP_LIBRARY_NAME "XifCoord"
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 XrlCoordV0p1Client {
00030 public:
00031     XrlCoordV0p1Client(XrlSender* s) : _sender(s) {}
00032     virtual ~XrlCoordV0p1Client() {}
00033 
00034     typedef XorpCallback1<void, const XrlError&>::RefPtr CommandCB;
00044     bool send_command(
00045     const char* dst_xrl_target_name,
00046     const string&   command,
00047     const CommandCB&    cb
00048     );
00049 
00050     typedef XorpCallback2<void, const XrlError&, const string*>::RefPtr StatusCB;
00058     bool send_status(
00059     const char* dst_xrl_target_name,
00060     const string&   peer,
00061     const StatusCB& cb
00062     );
00063 
00064     typedef XorpCallback2<void, const XrlError&, const bool*>::RefPtr PendingCB;
00074     bool send_pending(
00075     const char* dst_xrl_target_name,
00076     const PendingCB&    cb
00077     );
00078 
00079 protected:
00080     XrlSender* _sender;
00081 
00082 private:
00083     static void unmarshall_command(
00084     const XrlError& e,
00085     XrlArgs*    a,
00086     CommandCB       cb
00087     );
00088 
00089     static void unmarshall_status(
00090     const XrlError& e,
00091     XrlArgs*    a,
00092     StatusCB        cb
00093     );
00094 
00095     static void unmarshall_pending(
00096     const XrlError& e,
00097     XrlArgs*    a,
00098     PendingCB       cb
00099     );
00100 
00101 private:
00102     /* Declare cached Xrl pointers */
00103     auto_ptr<Xrl> ap_xrl_command;
00104     auto_ptr<Xrl> ap_xrl_status;
00105     auto_ptr<Xrl> ap_xrl_pending;
00106 };
00107 
00108 #endif /* __XRL_INTERFACES_COORD_XIF_HH__ */
 All Classes Namespaces Functions Variables Typedefs Enumerations