Diffstat (limited to 'noncore/settings/networksettings2/networksettings2/asdevice.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/networksettings2/asdevice.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/networksettings2/asdevice.h b/noncore/settings/networksettings2/networksettings2/asdevice.h new file mode 100644 index 0000000..058fc4c --- a/dev/null +++ b/noncore/settings/networksettings2/networksettings2/asdevice.h @@ -0,0 +1,37 @@ +#ifndef ASDEVICE_H +#define ASDEVICE_H + +#include "system.h" +#include "netnode.h" + +// pure virtual (component oriented) interface of any +// plugin that offers a device +class AsDevice : public RuntimeInfo { + +public : + + AsDevice( ANetNodeInstance * NNI ) : + RuntimeInfo( NNI ) { + AssignedInterface = 0; + } + + // return the interface assigned to this device + // e.g eth0, wlan, ... + InterfaceInfo * assignedInterface( void ) + { return AssignedInterface; } + virtual void assignInterface( InterfaceInfo * NI ) + { AssignedInterface = NI; } + + // number of device to configure for this Device type + virtual long count( void ) + { return 1; } + // generate NIC name of device number ... + virtual QString genNic( long NicNr ) = 0; + +private : + + InterfaceInfo * AssignedInterface; + +}; + +#endif |