Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

InterfaceCommand.cpp

Go to the documentation of this file.
00001 #ifdef TEST
00002 
00003 #include "headers.h"
00004 
00005 string
00006 InterfaceCommand::getCommandString() {
00007     return interfaceCommandString;
00008 }
00009 
00010 
00011 void
00012 InterfaceCommand::run(std::ostream& s) {
00013     if (m_args[1] == showCommandString) {
00014         s << GlobalObjects::instance()->getInterfaces()->toString();
00015     }
00016     else if (m_args[1] == publicIpCommandString) {
00017         IpAddress ip = GlobalObjects::instance()->getInterfaces()->getPublicIp();
00018         s << ip;
00019     }
00020 }
00021 
00022 
00023 void
00024 InterfaceCommand::getHtmlInterface(std::ostream& s) {
00025     s << "<h2>Interfaces</h2>";
00026     beginUl(s);
00027     generateHtmlSubcmd(s, showCommandString, "show");
00028     generateHtmlSubcmd(s, publicIpCommandString, "Get Public IP");
00029     endUl(s);
00030 }
00031 #endif
00032 

Generated at Thu Jul 11 13:31:50 2002 for Peekabooty by doxygen1.2.9 written by Dimitri van Heesch, © 1997-2001