From 4ea2f227d3fb0d9591bb4f18555420ac47f3397d Mon Sep 17 00:00:00 2001 From: wimpie Date: Fri, 02 Apr 2004 18:30:55 +0000 Subject: first import of NS2 app --- (limited to 'noncore/settings/networksettings2/lancard/lancardrun.h') diff --git a/noncore/settings/networksettings2/lancard/lancardrun.h b/noncore/settings/networksettings2/lancard/lancardrun.h new file mode 100644 index 0000000..5f004e0 --- a/dev/null +++ b/noncore/settings/networksettings2/lancard/lancardrun.h @@ -0,0 +1,38 @@ +#ifndef LANCARDRUN_H +#define LANCARDRUN_H + +#include +#include +#include "lancarddata.h" + +class LanCardRun : public AsDevice { + +public : + + LanCardRun( ANetNodeInstance * NNI, + LanCardData & Data ) : AsDevice( NNI ), + Pat( "eth[0-9]" ) + { } + + virtual long count( void ) + { return 2; } + virtual QString genNic( long nr ) + { QString S; return S.sprintf( "eth%ld", nr ); } + virtual AsDevice * device( void ) + { return asDevice(); } + +protected : + + void detectState( NodeCollection * NC ); + bool setState( NodeCollection * NC, Action_t A ); + bool canSetState( State_t Curr, Action_t A ); + + bool handlesInterface( const QString & I ); + +private : + + InterfaceInfo * getInterface( void ); + QRegExp Pat; + +}; +#endif -- cgit v0.9.0.2