Diffstat (limited to 'noncore/net/networksetup/interface.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/networksetup/interface.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/net/networksetup/interface.h b/noncore/net/networksetup/interface.h index 1ad71eb..5dc95a4 100644 --- a/noncore/net/networksetup/interface.h +++ b/noncore/net/networksetup/interface.h | |||
@@ -1,60 +1,61 @@ | |||
1 | #ifndef INTERFACE_H | 1 | #ifndef INTERFACE_H |
2 | #define INTERFACE_H | 2 | #define INTERFACE_H |
3 | 3 | ||
4 | #include <qstring.h> | 4 | #include <qstring.h> |
5 | 5 | ||
6 | class Module; | ||
6 | class Interface { | 7 | class Interface { |
7 | 8 | ||
8 | public: | 9 | public: |
9 | Interface(QString name = "unknown", bool status = false); | 10 | Interface(QString name = "unknown", bool status = false); |
10 | virtual ~Interface(){}; | 11 | virtual ~Interface(){}; |
11 | 12 | ||
12 | virtual bool getStatus(){ return status; }; | 13 | virtual bool getStatus(){ return status; }; |
13 | virtual void setStatus(bool newSatus){ status = newSatus; refresh(); }; | 14 | virtual void setStatus(bool newSatus){ status = newSatus; refresh(); }; |
14 | 15 | ||
15 | virtual bool isAttached(){ return attached; }; | 16 | virtual bool isAttached(){ return attached; }; |
16 | virtual void setAttached(bool isAttached=false){ attached = isAttached; }; | 17 | virtual void setAttached(bool isAttached=false){ attached = isAttached; }; |
17 | 18 | ||
18 | virtual QString getInterfaceName(){ return interfaceName; }; | 19 | virtual QString getInterfaceName(){ return interfaceName; }; |
19 | virtual void setInterfaceName(QString name="unknown"){ interfaceName = name; }; | 20 | virtual void setInterfaceName(QString name="unknown"){ interfaceName = name; }; |
20 | 21 | ||
21 | virtual QString getHardwareName(){ return hardareName; }; | 22 | virtual QString getHardwareName(){ return hardareName; }; |
22 | virtual void setHardwareName(QString name="Unknown"){ hardareName = name; }; | 23 | virtual void setHardwareName(QString name="Unknown"){ hardareName = name; }; |
23 | 24 | ||
24 | virtual QString getModuleOwner(){ return moduleOwner; }; | 25 | virtual Module* getModuleOwner(){ return moduleOwner; }; |
25 | virtual void setModuleOwner(QString owner="Default"){ moduleOwner = owner; }; | 26 | virtual void setModuleOwner(Module *owner=NULL){ moduleOwner = owner; }; |
26 | 27 | ||
27 | // inet information. | 28 | // inet information. |
28 | QString getMacAddress(){ return macAddress; }; | 29 | QString getMacAddress(){ return macAddress; }; |
29 | QString getIp(){ return ip; }; | 30 | QString getIp(){ return ip; }; |
30 | QString getSubnetMask(){ return subnetMask; }; | 31 | QString getSubnetMask(){ return subnetMask; }; |
31 | QString getBroadcast(){ return broadcast; }; | 32 | QString getBroadcast(){ return broadcast; }; |
32 | bool isDhcp(){ return dhcp; }; | 33 | bool isDhcp(){ return dhcp; }; |
33 | QString getDhcpServerIp(){ return dhcpServerIp; }; | 34 | QString getDhcpServerIp(){ return dhcpServerIp; }; |
34 | QString getLeaseObtained(){ return leaseObtained; }; | 35 | QString getLeaseObtained(){ return leaseObtained; }; |
35 | QString getLeaseExpires(){ return leaseExpires; }; | 36 | QString getLeaseExpires(){ return leaseExpires; }; |
36 | 37 | ||
37 | bool refresh(); | 38 | bool refresh(); |
38 | bool start(); | 39 | bool start(); |
39 | bool stop(); | 40 | bool stop(); |
40 | bool restart(); | 41 | bool restart(); |
41 | 42 | ||
42 | private: | 43 | private: |
43 | // Interface information | 44 | // Interface information |
44 | bool status; | 45 | bool status; |
45 | bool attached; | 46 | bool attached; |
46 | QString interfaceName; | 47 | QString interfaceName; |
47 | QString hardareName; | 48 | QString hardareName; |
48 | QString moduleOwner; | 49 | Module *moduleOwner; |
49 | 50 | ||
50 | // Network information | 51 | // Network information |
51 | QString macAddress; | 52 | QString macAddress; |
52 | QString ip; | 53 | QString ip; |
53 | QString broadcast; | 54 | QString broadcast; |
54 | QString subnetMask; | 55 | QString subnetMask; |
55 | bool dhcp; | 56 | bool dhcp; |
56 | QString dhcpServerIp; | 57 | QString dhcpServerIp; |
57 | QString leaseObtained; | 58 | QString leaseObtained; |
58 | QString leaseExpires; | 59 | QString leaseExpires; |
59 | 60 | ||
60 | }; | 61 | }; |