author | benmeyer <benmeyer> | 2002-10-25 19:32:57 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-25 19:32:57 (UTC) |
commit | 9adbe632ec54bf155b9882e4e0b51c293259cdf2 (patch) (unidiff) | |
tree | 5bd90a1d9d0178b157f0b70bc0144b839501271c /noncore/settings/networksettings/interfaces/interface.h | |
parent | a2275295f506dca663b545eda17b4b4dc2e4ad40 (diff) | |
download | opie-9adbe632ec54bf155b9882e4e0b51c293259cdf2.zip opie-9adbe632ec54bf155b9882e4e0b51c293259cdf2.tar.gz opie-9adbe632ec54bf155b9882e4e0b51c293259cdf2.tar.bz2 |
Initial
Diffstat (limited to 'noncore/settings/networksettings/interfaces/interface.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/interfaces/interface.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/noncore/settings/networksettings/interfaces/interface.h b/noncore/settings/networksettings/interfaces/interface.h new file mode 100644 index 0000000..dc9c6d3 --- a/dev/null +++ b/noncore/settings/networksettings/interfaces/interface.h | |||
@@ -0,0 +1,71 @@ | |||
1 | #ifndef INTERFACE_H | ||
2 | #define INTERFACE_H | ||
3 | |||
4 | #include <qstring.h> | ||
5 | #include <qobject.h> | ||
6 | |||
7 | class Module; | ||
8 | |||
9 | class Interface : public QObject{ | ||
10 | Q_OBJECT | ||
11 | |||
12 | signals: | ||
13 | void updateInterface(Interface *i); | ||
14 | |||
15 | public: | ||
16 | Interface(QObject * parent=0, const char * name= "unknown", bool status = false); | ||
17 | virtual ~Interface(){}; | ||
18 | |||
19 | virtual QString getInterfaceName(){ QString n(this->name()); return n; }; | ||
20 | |||
21 | virtual bool getStatus(){ return status; }; | ||
22 | virtual void setStatus(bool newStatus); | ||
23 | |||
24 | virtual bool isAttached(){ return attached; }; | ||
25 | virtual void setAttached(bool isAttached=false); | ||
26 | |||
27 | virtual QString getHardwareName(){ return hardwareName; }; | ||
28 | virtual void setHardwareName(QString name="Unknown"); | ||
29 | |||
30 | virtual Module* getModuleOwner(){ return moduleOwner; }; | ||
31 | virtual void setModuleOwner(Module *owner=NULL); | ||
32 | |||
33 | // inet information. | ||
34 | QString getMacAddress(){ return macAddress; }; | ||
35 | QString getIp(){ return ip; }; | ||
36 | QString getSubnetMask(){ return subnetMask; }; | ||
37 | QString getBroadcast(){ return broadcast; }; | ||
38 | bool isDhcp(){ return dhcp; }; | ||
39 | QString getDhcpServerIp(){ return dhcpServerIp; }; | ||
40 | QString getLeaseObtained(){ return leaseObtained; }; | ||
41 | QString getLeaseExpires(){ return leaseExpires; }; | ||
42 | |||
43 | public slots: | ||
44 | bool refresh(); | ||
45 | void start(); | ||
46 | void stop(); | ||
47 | void restart(); | ||
48 | |||
49 | private: | ||
50 | // Interface information | ||
51 | bool status; | ||
52 | bool attached; | ||
53 | QString hardwareName; | ||
54 | Module *moduleOwner; | ||
55 | |||
56 | // Network information | ||
57 | QString macAddress; | ||
58 | QString ip; | ||
59 | QString broadcast; | ||
60 | QString subnetMask; | ||
61 | bool dhcp; | ||
62 | QString dhcpServerIp; | ||
63 | QString leaseObtained; | ||
64 | QString leaseExpires; | ||
65 | |||
66 | }; | ||
67 | |||
68 | #endif | ||
69 | |||
70 | // interface.h | ||
71 | |||