xorp

test_tgt.hh

00001 // -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*-
00002 
00003 // Copyright (c) 2001-2011 XORP, Inc and Others
00004 //
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU Lesser General Public License, Version
00007 // 2.1, June 1999 as published by the Free Software Foundation.
00008 // Redistribution and/or modification of this program under the terms of
00009 // any other version of the GNU Lesser General Public License is not
00010 // permitted.
00011 // 
00012 // This program is distributed in the hope that it will be useful, but
00013 // WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For more details,
00015 // see the GNU Lesser General Public License, Version 2.1, a copy of
00016 // which can be found in the XORP LICENSE.lgpl file.
00017 // 
00018 // XORP, Inc, 2953 Bunker Hill Lane, Suite 204, Santa Clara, CA 95054, USA;
00019 // http://xorp.net
00020 
00021 // $XORP: xorp/xrl/tests/test_tgt.hh,v 1.12 2008/10/02 21:58:55 bms Exp $
00022 
00023 
00024 
00025 #include "libxipc/xrl_router.hh"
00026 #include "xrl/targets/test_base.hh"
00027 
00028 class XrlTestTarget: public XrlTestTargetBase {
00029 public:
00030     XrlTestTarget(XrlRouter* r) : XrlTestTargetBase(r) {}
00031 
00032 protected:
00033     // Methods to be implemented by derived classes supporting this interface.
00034     virtual XrlCmdError common_0_1_get_target_name(
00035     // Output values, 
00036     string& name);
00037 
00038     virtual XrlCmdError common_0_1_get_version(
00039     // Output values, 
00040     string& version);
00041 
00042     virtual XrlCmdError common_0_1_get_status(
00043     // Output values,
00044         uint32_t& status,
00045     string& reason);
00046 
00047     virtual XrlCmdError common_0_1_shutdown();
00048 
00049     virtual XrlCmdError test_1_0_print_hello_world();
00050 
00051     virtual XrlCmdError test_1_0_print_hello_world_and_message(
00052     // Input values, 
00053     const string&   msg);
00054 
00055     virtual XrlCmdError test_1_0_get_greeting_count(
00056     // Output values, 
00057     int32_t&    num_msgs);
00058 
00059     virtual XrlCmdError test_1_0_get_greeting(
00060     // Input Values,
00061     const int32_t&  greeting_no,
00062     // Output values, 
00063     string&     greeting);
00064 
00065     virtual XrlCmdError test_1_0_shoot_foot();
00066 
00067 private:
00068     static const string  greetings[];
00069     static const int32_t n_greetings;
00070 };
 All Classes Namespaces Functions Variables Typedefs Enumerations