summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/usb/usbrun.h
blob: c9c91216140ca23bfc9fac651b64ca0556722785 (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
#ifndef USBRUN_H
#define USBRUN_H

#include <asdevice.h>
#include <qregexp.h>
#include "usbdata.h"

class USBRun  : public AsDevice {

public :

      USBRun( ANetNodeInstance * NNI, 
              USBData & Data ) : 
                AsDevice( NNI ),
                Pat( "usb[0-9abcdef]" )
        { }

      virtual long count( void )
        { return 1; }
      virtual QString genNic( long nr );
      virtual AsDevice * device( void ) 
        { return asDevice(); }

protected :

      void detectState( NodeCollection * );
      bool setState( NodeCollection * , Action_t A );
      bool canSetState( State_t , Action_t A );

      bool handlesInterface( const QString & I );

private :

      InterfaceInfo * getInterface( void );
      QRegExp Pat;

};
#endif