author | benmeyer <benmeyer> | 2002-09-30 14:26:33 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-09-30 14:26:33 (UTC) |
commit | 9965bd5c49ff2f22d640d132ac343fdec97b3fb4 (patch) (unidiff) | |
tree | 45e8f1d1bf414530b637692ba43b730110611856 /noncore/settings/networksettings/interface.h | |
parent | 5db3af80f392f8f063f53cbbad67bbe7c5c6eb6d (diff) | |
download | opie-9965bd5c49ff2f22d640d132ac343fdec97b3fb4.zip opie-9965bd5c49ff2f22d640d132ac343fdec97b3fb4.tar.gz opie-9965bd5c49ff2f22d640d132ac343fdec97b3fb4.tar.bz2 |
Initial commit
Diffstat (limited to 'noncore/settings/networksettings/interface.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/interface.h | 65 |
1 files changed, 65 insertions, 0 deletions
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 @@ | |||
1 | #ifndef INTERFACE_H | ||
2 | #define INTERFACE_H | ||
3 | |||
4 | #include <qstring.h> | ||
5 | |||
6 | class Interface { | ||
7 | |||
8 | public: | ||
9 | Interface(QString name = "unknown", bool status = false); | ||
10 | virtual ~Interface(){}; | ||
11 | |||
12 | virtual bool getStatus(){ return status; }; | ||
13 | virtual void setStatus(bool newSatus){ status = newSatus; refresh(); }; | ||
14 | |||
15 | virtual bool isAttached(){ return attached; }; | ||
16 | virtual void setAttached(bool isAttached=false){ attached = isAttached; }; | ||
17 | |||
18 | virtual QString getInterfaceName(){ return interfaceName; }; | ||
19 | virtual void setInterfaceName(QString name="unknown"){ interfaceName = name; }; | ||
20 | |||
21 | virtual QString getHardwareName(){ return hardareName; }; | ||
22 | virtual void setHardwareName(QString name="Unknown"){ hardareName = name; }; | ||
23 | |||
24 | virtual QString getModuleOwner(){ return moduleOwner; }; | ||
25 | virtual void setModuleOwner(QString owner="Default"){ moduleOwner = owner; }; | ||
26 | |||
27 | // inet information. | ||
28 | QString getMacAddress(){ return macAddress; }; | ||
29 | QString getIp(){ return ip; }; | ||
30 | QString getSubnetMask(){ return subnetMask; }; | ||
31 | QString getBroadcast(){ return broadcast; }; | ||
32 | bool isDhcp(){ return dhcp; }; | ||
33 | QString getDhcpServerIp(){ return dhcpServerIp; }; | ||
34 | QString getLeaseObtained(){ return leaseObtained; }; | ||
35 | QString getLeaseExpires(){ return leaseExpires; }; | ||
36 | |||
37 | bool refresh(); | ||
38 | bool start(); | ||
39 | bool stop(); | ||
40 | bool restart(); | ||
41 | |||
42 | private: | ||
43 | // Interface information | ||
44 | bool status; | ||
45 | bool attached; | ||
46 | QString interfaceName; | ||
47 | QString hardareName; | ||
48 | QString moduleOwner; | ||
49 | |||
50 | // Network information | ||
51 | QString macAddress; | ||
52 | QString ip; | ||
53 | QString broadcast; | ||
54 | QString subnetMask; | ||
55 | bool dhcp; | ||
56 | QString dhcpServerIp; | ||
57 | QString leaseObtained; | ||
58 | QString leaseExpires; | ||
59 | |||
60 | }; | ||
61 | |||
62 | #endif | ||
63 | |||
64 | // interface.h | ||
65 | |||