summaryrefslogtreecommitdiff
path: root/noncore/net/networksetup/interface.h
Unidiff
Diffstat (limited to 'noncore/net/networksetup/interface.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/networksetup/interface.h29
1 files changed, 17 insertions, 12 deletions
diff --git a/noncore/net/networksetup/interface.h b/noncore/net/networksetup/interface.h
index 1406e99..980171a 100644
--- a/noncore/net/networksetup/interface.h
+++ b/noncore/net/networksetup/interface.h
@@ -2,29 +2,33 @@
2#define INTERFACE_H 2#define INTERFACE_H
3 3
4#include <qstring.h> 4#include <qstring.h>
5#include <qobject.h>
5 6
6class Module; 7class Module;
7 8
8class Interface { 9class Interface : public QObject{
10 Q_OBJECT
11
12signals:
13 void updateInterface(Interface *i);
9 14
10public: 15public:
11 Interface(QString name = "unknown", bool status = false); 16 Interface(QObject * parent=0, const char * name= "unknown", bool status = false);
12 virtual ~Interface(){}; 17 virtual ~Interface(){};
13 18
19 virtual QString getInterfaceName(){ QString n(this->name()); return n; };
20
14 virtual bool getStatus(){ return status; }; 21 virtual bool getStatus(){ return status; };
15 virtual void setStatus(bool newSatus){ status = newSatus; refresh(); }; 22 virtual void setStatus(bool newStatus);
16 23
17 virtual bool isAttached(){ return attached; }; 24 virtual bool isAttached(){ return attached; };
18 virtual void setAttached(bool isAttached=false){ attached = isAttached; }; 25 virtual void setAttached(bool isAttached=false);
19
20 virtual QString getInterfaceName(){ return interfaceName; };
21 virtual void setInterfaceName(QString name="unknown"){ interfaceName = name; };
22 26
23 virtual QString getHardwareName(){ return hardareName; }; 27 virtual QString getHardwareName(){ return hardareName; };
24 virtual void setHardwareName(QString name="Unknown"){ hardareName = name; }; 28 virtual void setHardwareName(QString name="Unknown");
25 29
26 virtual Module* getModuleOwner(){ return moduleOwner; }; 30 virtual Module* getModuleOwner(){ return moduleOwner; };
27 virtual void setModuleOwner(Module *owner=NULL){ moduleOwner = owner; }; 31 virtual void setModuleOwner(Module *owner=NULL);
28 32
29 // inet information. 33 // inet information.
30 QString getMacAddress(){ return macAddress; }; 34 QString getMacAddress(){ return macAddress; };
@@ -36,10 +40,11 @@ public:
36 QString getLeaseObtained(){ return leaseObtained; }; 40 QString getLeaseObtained(){ return leaseObtained; };
37 QString getLeaseExpires(){ return leaseExpires; }; 41 QString getLeaseExpires(){ return leaseExpires; };
38 42
43public slots:
39 bool refresh(); 44 bool refresh();
40 bool start(); 45 void start();
41 bool stop(); 46 void stop();
42 bool restart(); 47 void restart();
43 48
44private: 49private:
45 // Interface information 50 // Interface information