summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/ppp/ppprun.h
blob: abb91761158da3a8b2317d2e06b6f8bc82333945 (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
#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 * device( void ) 
        { return AsDevice::asDevice(); }
      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