?? xorp_if_mib_base.hh
字號:
/* * Copyright (c) 2001-2003 International Computer Science Institute * See LICENSE file for licensing, conditions, and warranties on use. * * DO NOT EDIT THIS FILE - IT IS PROGRAMMATICALLY GENERATED * * Generated by 'tgt-gen'. * * $XORP: xorp/xrl/targets/xorp_if_mib_base.hh,v 1.4 2003/06/19 00:44:49 hodson Exp $ */#ifndef __XRL_INTERFACES_XORP_IF_MIB_BASE_HH__#define __XRL_INTERFACES_XORP_IF_MIB_BASE_HH__#undef XORP_LIBRARY_NAME#define XORP_LIBRARY_NAME "XrlXorpIfMibTarget"#include "libxorp/xlog.h"#include "libxipc/xrl_cmd_map.hh"class XrlXorpIfMibTargetBase {protected: XrlCmdMap* _cmds;public: XrlXorpIfMibTargetBase(XrlCmdMap* cmds) : _cmds(cmds) { add_handlers(); } virtual ~XrlXorpIfMibTargetBase() { remove_handlers(); } inline const string& name() const { return _cmds->name(); } inline const char* version() const { return "xorp_if_mib/0.0"; }protected: /** * Pure-virtual function that needs to be implemented to: * * Get name of Xrl Target */ virtual XrlCmdError common_0_1_get_target_name( // Output values, string& name) = 0; /** * Pure-virtual function that needs to be implemented to: * * Get version string from Xrl Target */ virtual XrlCmdError common_0_1_get_version( // Output values, string& version) = 0; /** * Pure-virtual function that needs to be implemented to: * * Get status of Xrl Target */ virtual XrlCmdError common_0_1_get_status( // Output values, uint32_t& status, string& reason) = 0; /** * Pure-virtual function that needs to be implemented to: * * Request clean shutdown of Xrl Target */ virtual XrlCmdError common_0_1_shutdown() = 0; /** * Pure-virtual function that needs to be implemented to: * * Load a MIB module * * @param mod_name the mib module file name (without extension) * * @param abs_path absolute path to the module file */ virtual XrlCmdError xorp_if_mib_0_1_load_mib( // Input values, const string& mod_name, const string& abs_path, // Output values, uint32_t& mib_index) = 0; /** * Pure-virtual function that needs to be implemented to: * * Unload a MIB module * * @param unloaded true if mib not loaded or successfully unloaded */ virtual XrlCmdError xorp_if_mib_0_1_unload_mib( // Input values, const uint32_t& mib_index, // Output values, bool& unloaded) = 0;private: const XrlCmdError handle_common_0_1_get_target_name(const XrlArgs& in, XrlArgs* out); const XrlCmdError handle_common_0_1_get_version(const XrlArgs& in, XrlArgs* out); const XrlCmdError handle_common_0_1_get_status(const XrlArgs& in, XrlArgs* out); const XrlCmdError handle_common_0_1_shutdown(const XrlArgs& in, XrlArgs* out); const XrlCmdError handle_xorp_if_mib_0_1_load_mib(const XrlArgs& in, XrlArgs* out); const XrlCmdError handle_xorp_if_mib_0_1_unload_mib(const XrlArgs& in, XrlArgs* out); void add_handlers() { if (_cmds->add_handler("common/0.1/get_target_name", callback(this, &XrlXorpIfMibTargetBase::handle_common_0_1_get_target_name)) == false) { XLOG_ERROR("Failed to xrl handler finder://xorp_if_mib/common/0.1/get_target_name"); } if (_cmds->add_handler("common/0.1/get_version", callback(this, &XrlXorpIfMibTargetBase::handle_common_0_1_get_version)) == false) { XLOG_ERROR("Failed to xrl handler finder://xorp_if_mib/common/0.1/get_version"); } if (_cmds->add_handler("common/0.1/get_status", callback(this, &XrlXorpIfMibTargetBase::handle_common_0_1_get_status)) == false) { XLOG_ERROR("Failed to xrl handler finder://xorp_if_mib/common/0.1/get_status"); } if (_cmds->add_handler("common/0.1/shutdown", callback(this, &XrlXorpIfMibTargetBase::handle_common_0_1_shutdown)) == false) { XLOG_ERROR("Failed to xrl handler finder://xorp_if_mib/common/0.1/shutdown"); } if (_cmds->add_handler("xorp_if_mib/0.1/load_mib", callback(this, &XrlXorpIfMibTargetBase::handle_xorp_if_mib_0_1_load_mib)) == false) { XLOG_ERROR("Failed to xrl handler finder://xorp_if_mib/xorp_if_mib/0.1/load_mib"); } if (_cmds->add_handler("xorp_if_mib/0.1/unload_mib", callback(this, &XrlXorpIfMibTargetBase::handle_xorp_if_mib_0_1_unload_mib)) == false) { XLOG_ERROR("Failed to xrl handler finder://xorp_if_mib/xorp_if_mib/0.1/unload_mib"); } _cmds->finalize(); } void remove_handlers() { _cmds->remove_handler("common/0.1/get_target_name"); _cmds->remove_handler("common/0.1/get_version"); _cmds->remove_handler("common/0.1/get_status"); _cmds->remove_handler("common/0.1/shutdown"); _cmds->remove_handler("xorp_if_mib/0.1/load_mib"); _cmds->remove_handler("xorp_if_mib/0.1/unload_mib"); }};#endif /* __XRL_INTERFACES_XORP_IF_MIB_BASE_HH__ */
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -