From 9965bd5c49ff2f22d640d132ac343fdec97b3fb4 Mon Sep 17 00:00:00 2001 From: benmeyer Date: Mon, 30 Sep 2002 14:26:33 +0000 Subject: Initial commit --- (limited to 'noncore/settings/networksettings/interface.h') diff --git a/noncore/settings/networksettings/interface.h b/noncore/settings/networksettings/interface.h new file mode 100644 index 0000000..1ad71eb --- a/dev/null +++ b/noncore/settings/networksettings/interface.h @@ -0,0 +1,65 @@ +#ifndef INTERFACE_H +#define INTERFACE_H + +#include + +class Interface { + +public: + Interface(QString name = "unknown", bool status = false); + virtual ~Interface(){}; + + virtual bool getStatus(){ return status; }; + virtual void setStatus(bool newSatus){ status = newSatus; refresh(); }; + + virtual bool isAttached(){ return attached; }; + virtual void setAttached(bool isAttached=false){ attached = isAttached; }; + + virtual QString getInterfaceName(){ return interfaceName; }; + virtual void setInterfaceName(QString name="unknown"){ interfaceName = name; }; + + virtual QString getHardwareName(){ return hardareName; }; + virtual void setHardwareName(QString name="Unknown"){ hardareName = name; }; + + virtual QString getModuleOwner(){ return moduleOwner; }; + virtual void setModuleOwner(QString owner="Default"){ moduleOwner = owner; }; + + // inet information. + QString getMacAddress(){ return macAddress; }; + QString getIp(){ return ip; }; + QString getSubnetMask(){ return subnetMask; }; + QString getBroadcast(){ return broadcast; }; + bool isDhcp(){ return dhcp; }; + QString getDhcpServerIp(){ return dhcpServerIp; }; + QString getLeaseObtained(){ return leaseObtained; }; + QString getLeaseExpires(){ return leaseExpires; }; + + bool refresh(); + bool start(); + bool stop(); + bool restart(); + +private: + // Interface information + bool status; + bool attached; + QString interfaceName; + QString hardareName; + QString moduleOwner; + + // Network information + QString macAddress; + QString ip; + QString broadcast; + QString subnetMask; + bool dhcp; + QString dhcpServerIp; + QString leaseObtained; + QString leaseExpires; + +}; + +#endif + +// interface.h + -- cgit v0.9.0.2