summaryrefslogtreecommitdiff
path: root/noncore/net/networksetup/interface.h
authorbenmeyer <benmeyer>2002-09-30 14:26:33 (UTC)
committer benmeyer <benmeyer>2002-09-30 14:26:33 (UTC)
commit9965bd5c49ff2f22d640d132ac343fdec97b3fb4 (patch) (side-by-side diff)
tree45e8f1d1bf414530b637692ba43b730110611856 /noncore/net/networksetup/interface.h
parent5db3af80f392f8f063f53cbbad67bbe7c5c6eb6d (diff)
downloadopie-9965bd5c49ff2f22d640d132ac343fdec97b3fb4.zip
opie-9965bd5c49ff2f22d640d132ac343fdec97b3fb4.tar.gz
opie-9965bd5c49ff2f22d640d132ac343fdec97b3fb4.tar.bz2
Initial commit
Diffstat (limited to 'noncore/net/networksetup/interface.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/networksetup/interface.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/noncore/net/networksetup/interface.h b/noncore/net/networksetup/interface.h
new file mode 100644
index 0000000..1ad71eb
--- a/dev/null
+++ b/noncore/net/networksetup/interface.h
@@ -0,0 +1,65 @@
+#ifndef INTERFACE_H
+#define INTERFACE_H
+
+#include <qstring.h>
+
+class Interface {
+
+public:
+ Interface(QString name = "unknown", bool status = false);
+ virtual ~Interface(){};
+
+ virtual bool getStatus(){ return status; };
+ virtual void setStatus(bool newSatus){ status = newSatus; refresh(); };
+
+ virtual bool isAttached(){ return attached; };
+ virtual void setAttached(bool isAttached=false){ attached = isAttached; };
+
+ virtual QString getInterfaceName(){ return interfaceName; };
+ virtual void setInterfaceName(QString name="unknown"){ interfaceName = name; };
+
+ virtual QString getHardwareName(){ return hardareName; };
+ virtual void setHardwareName(QString name="Unknown"){ hardareName = name; };
+
+ virtual QString getModuleOwner(){ return moduleOwner; };
+ virtual void setModuleOwner(QString owner="Default"){ moduleOwner = owner; };
+
+ // inet information.
+ QString getMacAddress(){ return macAddress; };
+ QString getIp(){ return ip; };
+ QString getSubnetMask(){ return subnetMask; };
+ QString getBroadcast(){ return broadcast; };
+ bool isDhcp(){ return dhcp; };
+ QString getDhcpServerIp(){ return dhcpServerIp; };
+ QString getLeaseObtained(){ return leaseObtained; };
+ QString getLeaseExpires(){ return leaseExpires; };
+
+ bool refresh();
+ bool start();
+ bool stop();
+ bool restart();
+
+private:
+ // Interface information
+ bool status;
+ bool attached;
+ QString interfaceName;
+ QString hardareName;
+ QString moduleOwner;
+
+ // Network information
+ QString macAddress;
+ QString ip;
+ QString broadcast;
+ QString subnetMask;
+ bool dhcp;
+ QString dhcpServerIp;
+ QString leaseObtained;
+ QString leaseExpires;
+
+};
+
+#endif
+
+// interface.h
+