summaryrefslogtreecommitdiff
path: root/noncore/net/networksetup/interfaces/interface.h
Unidiff
Diffstat (limited to 'noncore/net/networksetup/interfaces/interface.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/networksetup/interfaces/interface.h41
1 files changed, 21 insertions, 20 deletions
diff --git a/noncore/net/networksetup/interfaces/interface.h b/noncore/net/networksetup/interfaces/interface.h
index 989d6d8..d37834a 100644
--- a/noncore/net/networksetup/interfaces/interface.h
+++ b/noncore/net/networksetup/interfaces/interface.h
@@ -13,59 +13,60 @@ signals:
13 void updateInterface(Interface *i); 13 void updateInterface(Interface *i);
14 void updateMessage(const QString &message); 14 void updateMessage(const QString &message);
15 15
16public: 16public:
17 Interface(QObject * parent=0, const char * name= "unknown", bool status = false); 17 Interface(QObject * parent=0, const char * name= "unknown", bool status = false);
18 18
19 QString getInterfaceName(){ QString n(this->name()); return n; }; 19 QString getInterfaceName() const { QString n(this->name()); return n; };
20 20
21 bool getStatus(){ return status; }; 21 bool getStatus() const { return status; };
22 void setStatus(bool newStatus); 22 void setStatus(bool newStatus);
23 23
24 bool isAttached(){ return attached; }; 24 bool isAttached() const { return attached; };
25 void setAttached(bool isAttached=false); 25 void setAttached(bool isAttached=false);
26 26
27 QString getHardwareName(){ return hardwareName; }; 27 QString getHardwareName() const { return hardwareName; };
28 void setHardwareName(const QString &name="Unknown"); 28 void setHardwareName(const QString &name="Unknown");
29 29
30 Module* getModuleOwner(){ return moduleOwner; }; 30 Module* getModuleOwner() const { return moduleOwner; };
31 void setModuleOwner(Module *owner=NULL); 31 void setModuleOwner(Module *owner=NULL);
32 32
33 // inet information. 33 // inet information.
34 QString getMacAddress(){ return macAddress; }; 34 QString getMacAddress() const { return macAddress; };
35 QString getIp(){ return ip; }; 35 QString getIp() const { return ip; };
36 QString getSubnetMask(){ return subnetMask; }; 36 QString getSubnetMask() const { return subnetMask; };
37 QString getBroadcast(){ return broadcast; }; 37 QString getBroadcast() const { return broadcast; };
38 bool isDhcp(){ return dhcp; }; 38 bool isDhcp() const { return dhcp; };
39 QString getDhcpServerIp(){ return dhcpServerIp; }; 39 QString getDhcpServerIp() const { return dhcpServerIp; };
40 QString getLeaseObtained(){ return leaseObtained; }; 40 QString getLeaseObtained() const { return leaseObtained; };
41 QString getLeaseExpires(){ return leaseExpires; }; 41 QString getLeaseExpires() const { return leaseExpires; };
42 42
43public slots: 43public slots:
44 bool refresh(); 44 bool refresh();
45 void start(); 45 void start();
46 void stop(); 46 void stop();
47 void restart(); 47 void restart();
48 48
49private: 49private:
50 // Interface information 50 // Interface information
51 bool status;
52 bool attached;
53 QString hardwareName; 51 QString hardwareName;
54 Module *moduleOwner; 52 Module *moduleOwner;
55 53 bool status;
54 bool attached;
55
56 // Network information 56 // Network information
57 QString macAddress;
58 QString ip;
59 QString broadcast;
60 QString subnetMask;
61 bool dhcp; 57 bool dhcp;
62 QString dhcpServerIp; 58 QString dhcpServerIp;
63 QString leaseObtained; 59 QString leaseObtained;
64 QString leaseExpires; 60 QString leaseExpires;
65 61
62 QString macAddress;
63 QString ip;
64 QString broadcast;
65 QString subnetMask;
66
66}; 67};
67 68
68#endif 69#endif
69 70
70// interface.h 71// interface.h
71 72