Diffstat (limited to 'noncore/settings/networksettings/interfaces/interface.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/interfaces/interface.h | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/noncore/settings/networksettings/interfaces/interface.h b/noncore/settings/networksettings/interfaces/interface.h index 989d6d8..d37834a 100644 --- a/noncore/settings/networksettings/interfaces/interface.h +++ b/noncore/settings/networksettings/interfaces/interface.h | |||
@@ -1,71 +1,72 @@ | |||
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 | #include <qobject.h> | 5 | #include <qobject.h> |
6 | 6 | ||
7 | class Module; | 7 | class Module; |
8 | 8 | ||
9 | class Interface : public QObject{ | 9 | class Interface : public QObject{ |
10 | Q_OBJECT | 10 | Q_OBJECT |
11 | 11 | ||
12 | signals: | 12 | 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 | ||
16 | public: | 16 | public: |
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 | ||
43 | public slots: | 43 | public 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 | ||
49 | private: | 49 | private: |
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 | ||