author | wimpie <wimpie> | 2004-04-02 18:30:55 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-04-02 18:30:55 (UTC) |
commit | 4ea2f227d3fb0d9591bb4f18555420ac47f3397d (patch) (unidiff) | |
tree | 4fdd216cf7af4a747e2ca71e35d15f3d9e646333 /noncore/settings/networksettings2/lancard/lancardrun.h | |
parent | 5334b639c9f97793bcae4f50f7b47c7a2ada4e2f (diff) | |
download | opie-4ea2f227d3fb0d9591bb4f18555420ac47f3397d.zip opie-4ea2f227d3fb0d9591bb4f18555420ac47f3397d.tar.gz opie-4ea2f227d3fb0d9591bb4f18555420ac47f3397d.tar.bz2 |
first import of NS2 app
Diffstat (limited to 'noncore/settings/networksettings2/lancard/lancardrun.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/lancard/lancardrun.h | 38 |
1 files changed, 38 insertions, 0 deletions
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 @@ | |||
1 | #ifndef LANCARDRUN_H | ||
2 | #define LANCARDRUN_H | ||
3 | |||
4 | #include <asdevice.h> | ||
5 | #include <qregexp.h> | ||
6 | #include "lancarddata.h" | ||
7 | |||
8 | class LanCardRun : public AsDevice { | ||
9 | |||
10 | public : | ||
11 | |||
12 | LanCardRun( ANetNodeInstance * NNI, | ||
13 | LanCardData & Data ) : AsDevice( NNI ), | ||
14 | Pat( "eth[0-9]" ) | ||
15 | { } | ||
16 | |||
17 | virtual long count( void ) | ||
18 | { return 2; } | ||
19 | virtual QString genNic( long nr ) | ||
20 | { QString S; return S.sprintf( "eth%ld", nr ); } | ||
21 | virtual AsDevice * device( void ) | ||
22 | { return asDevice(); } | ||
23 | |||
24 | protected : | ||
25 | |||
26 | void detectState( NodeCollection * NC ); | ||
27 | bool setState( NodeCollection * NC, Action_t A ); | ||
28 | bool canSetState( State_t Curr, Action_t A ); | ||
29 | |||
30 | bool handlesInterface( const QString & I ); | ||
31 | |||
32 | private : | ||
33 | |||
34 | InterfaceInfo * getInterface( void ); | ||
35 | QRegExp Pat; | ||
36 | |||
37 | }; | ||
38 | #endif | ||