blob: 765aff25a21ce828a9f5ab90447626f682f2a14f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#ifndef PPPRUN_H
#define PPPRUN_H
#include <qregexp.h>
#include <asconnection.h>
#include <asdevice.h>
#include "pppdata.h"
class PPPRun : public AsConnection, public AsDevice {
public :
PPPRun( ANetNodeInstance * NNI,
PPPData & Data );
virtual QString genNic( long NicNr )
{ QString S; return S.sprintf( "ppp%ld", NicNr ); }
virtual AsDevice * asDevice( void )
{ return (AsDevice *)this; }
virtual AsConnection * asConnection( void )
{ return (AsConnection *)this; }
virtual AsDevice * device( void )
{ return (AsDevice *)this; }
virtual RuntimeInfo * runtimeInfo( void )
{ return ( AsConnection *)this; }
protected :
void detectState( NodeCollection * NC );
bool setState( NodeCollection * NC, Action_t A );
bool canSetState( State_t S, Action_t A )
{ return AsDevice::connection()->findNext(
AsDevice::netNode() )->runtime()->canSetState( S,A ); }
bool handlesInterface( const QString & I );
private :
bool isMyPPPDRunning( void );
bool isMyPPPUp( void );
PPPData_t * D;
QRegExp Pat;
};
#endif
|