|
xorp
|
00001 /* 00002 * obj/i686-pc-linux-gnu/xrl/interfaces/test_xif.hh 00003 * vim:set sts=4 ts=8 ft=cpp: 00004 * 00005 * Copyright (c) 2001-2011 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_TEST_XIF_HH__ 00015 #define __XRL_INTERFACES_TEST_XIF_HH__ 00016 00017 #undef XORP_LIBRARY_NAME 00018 #define XORP_LIBRARY_NAME "XifTest" 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 XrlTestV1p0Client { 00030 public: 00031 XrlTestV1p0Client(XrlSender* s) : _sender(s) {} 00032 virtual ~XrlTestV1p0Client() {} 00033 00034 typedef XorpCallback1<void, const XrlError&>::RefPtr PrintHelloWorldCB; 00042 bool send_print_hello_world( 00043 const char* dst_xrl_target_name, 00044 const PrintHelloWorldCB& cb 00045 ); 00046 00047 typedef XorpCallback1<void, const XrlError&>::RefPtr PrintHelloWorldAndMessageCB; 00057 bool send_print_hello_world_and_message( 00058 const char* dst_xrl_target_name, 00059 const string& msg, 00060 const PrintHelloWorldAndMessageCB& cb 00061 ); 00062 00063 typedef XorpCallback2<void, const XrlError&, const int32_t*>::RefPtr GetGreetingCountCB; 00071 bool send_get_greeting_count( 00072 const char* dst_xrl_target_name, 00073 const GetGreetingCountCB& cb 00074 ); 00075 00076 typedef XorpCallback2<void, const XrlError&, const string*>::RefPtr GetGreetingCB; 00086 bool send_get_greeting( 00087 const char* dst_xrl_target_name, 00088 const int32_t& greeting_num, 00089 const GetGreetingCB& cb 00090 ); 00091 00092 typedef XorpCallback1<void, const XrlError&>::RefPtr ShootFootCB; 00100 bool send_shoot_foot( 00101 const char* dst_xrl_target_name, 00102 const ShootFootCB& cb 00103 ); 00104 00105 typedef XorpCallback2<void, const XrlError&, const fp64_t*>::RefPtr FloatMyPointCB; 00113 bool send_float_my_point( 00114 const char* dst_xrl_target_name, 00115 const fp64_t& input, 00116 const FloatMyPointCB& cb 00117 ); 00118 00119 protected: 00120 XrlSender* _sender; 00121 00122 private: 00123 static void unmarshall_print_hello_world( 00124 const XrlError& e, 00125 XrlArgs* a, 00126 PrintHelloWorldCB cb 00127 ); 00128 00129 static void unmarshall_print_hello_world_and_message( 00130 const XrlError& e, 00131 XrlArgs* a, 00132 PrintHelloWorldAndMessageCB cb 00133 ); 00134 00135 static void unmarshall_get_greeting_count( 00136 const XrlError& e, 00137 XrlArgs* a, 00138 GetGreetingCountCB cb 00139 ); 00140 00141 static void unmarshall_get_greeting( 00142 const XrlError& e, 00143 XrlArgs* a, 00144 GetGreetingCB cb 00145 ); 00146 00147 static void unmarshall_shoot_foot( 00148 const XrlError& e, 00149 XrlArgs* a, 00150 ShootFootCB cb 00151 ); 00152 00153 static void unmarshall_float_my_point( 00154 const XrlError& e, 00155 XrlArgs* a, 00156 FloatMyPointCB cb 00157 ); 00158 00159 private: 00160 /* Declare cached Xrl pointers */ 00161 auto_ptr<Xrl> ap_xrl_print_hello_world; 00162 auto_ptr<Xrl> ap_xrl_print_hello_world_and_message; 00163 auto_ptr<Xrl> ap_xrl_get_greeting_count; 00164 auto_ptr<Xrl> ap_xrl_get_greeting; 00165 auto_ptr<Xrl> ap_xrl_shoot_foot; 00166 auto_ptr<Xrl> ap_xrl_float_my_point; 00167 }; 00168 00169 #endif /* __XRL_INTERFACES_TEST_XIF_HH__ */