xorp

profile_client_xif.hh

00001 /*
00002  * obj/i386-pc-mingw32/xrl/interfaces/profile_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_PROFILE_CLIENT_XIF_HH__
00015 #define __XRL_INTERFACES_PROFILE_CLIENT_XIF_HH__
00016 
00017 #undef XORP_LIBRARY_NAME
00018 #define XORP_LIBRARY_NAME "XifProfileClient"
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 XrlProfileClientV0p1Client {
00030 public:
00031     XrlProfileClientV0p1Client(XrlSender* s) : _sender(s) {}
00032     virtual ~XrlProfileClientV0p1Client() {}
00033 
00034     typedef XorpCallback1<void, const XrlError&>::RefPtr LogCB;
00050     bool send_log(
00051     const char* dst_xrl_target_name,
00052     const string&   pname,
00053     const uint32_t& sec,
00054     const uint32_t& usec,
00055     const string&   comment,
00056     const LogCB&    cb
00057     );
00058 
00059     typedef XorpCallback1<void, const XrlError&>::RefPtr FinishedCB;
00069     bool send_finished(
00070     const char* dst_xrl_target_name,
00071     const string&   pname,
00072     const FinishedCB&   cb
00073     );
00074 
00075 protected:
00076     XrlSender* _sender;
00077 
00078 private:
00079     static void unmarshall_log(
00080     const XrlError& e,
00081     XrlArgs*    a,
00082     LogCB       cb
00083     );
00084 
00085     static void unmarshall_finished(
00086     const XrlError& e,
00087     XrlArgs*    a,
00088     FinishedCB      cb
00089     );
00090 
00091 private:
00092     /* Declare cached Xrl pointers */
00093     auto_ptr<Xrl> ap_xrl_log;
00094     auto_ptr<Xrl> ap_xrl_finished;
00095 };
00096 
00097 #endif /* __XRL_INTERFACES_PROFILE_CLIENT_XIF_HH__ */
 All Classes Namespaces Functions Variables Typedefs Enumerations