summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/interfaces/interface.h
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/interfaces/interface.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/interfaces/interface.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/settings/networksettings/interfaces/interface.h b/noncore/settings/networksettings/interfaces/interface.h
index 83ab088..e9ab0c2 100644
--- a/noncore/settings/networksettings/interfaces/interface.h
+++ b/noncore/settings/networksettings/interfaces/interface.h
@@ -10,71 +10,72 @@ class Module;
10 * A Interface represents a physical device. You can 10 * A Interface represents a physical device. You can
11 * inherit it and create also virtual devices. Like saved 11 * inherit it and create also virtual devices. Like saved
12 * ppp dial ups or vpn. Interface is used for representing 12 * ppp dial ups or vpn. Interface is used for representing
13 * your interface to the User and its actions. 13 * your interface to the User and its actions.
14 * 14 *
15 */ 15 */
16class Interface : public QObject{ 16class Interface : public QObject{
17 Q_OBJECT 17 Q_OBJECT
18 18
19signals: 19signals:
20 void updateInterface(Interface *i); 20 void updateInterface(Interface *i);
21 void updateMessage(const QString &message); 21 void updateMessage(const QString &message);
22 22
23public: 23public:
24 Interface(QObject * parent=0, const char * name= "unknown", bool status = false); 24 Interface(QObject * parent=0, const char * name= "unknown", bool status = false);
25 25
26 QString getInterfaceName() const { QString n(this->name()); return n; }; 26 QString getInterfaceName() const { QString n(this->name()); return n; };
27 void setInterfaceName( const QString &n ) { this->setName(n); }; 27 void setInterfaceName( const QString &n ) { this->setName(n); };
28 28
29 bool getStatus() const { return status; }; 29 bool getStatus() const { return status; };
30 void setStatus(bool newStatus); 30 void setStatus(bool newStatus);
31 31
32 bool isAttached() const { return attached; }; 32 bool isAttached() const { return attached; };
33 void setAttached(bool isAttached=false); 33 void setAttached(bool isAttached=false);
34 34
35 QString getHardwareName() const { return hardwareName; }; 35 QString getHardwareName() const { return hardwareName; };
36 void setHardwareName(const QString &name="Unknown"); 36 void setHardwareName(const QString &name="Unknown");
37 37
38 Module* getModuleOwner() const { return moduleOwner; }; 38 Module* getModuleOwner() const { return moduleOwner; };
39 void setModuleOwner(Module *owner=NULL); 39 void setModuleOwner(Module *owner=NULL);
40 40
41 // inet information. 41 // inet information.
42 QString getMacAddress() const { return macAddress; }; 42 QString getMacAddress() const { return macAddress; };
43 QString getIp() const { return ip; }; 43 QString getIp() const { return ip; };
44 QString getSubnetMask() const { return subnetMask; }; 44 QString getSubnetMask() const { return subnetMask; };
45 QString getBroadcast() const { return broadcast; }; 45 QString getBroadcast() const { return broadcast; };
46 bool isDhcp() const { return dhcp; }; 46 bool isDhcp() const { return dhcp; };
47 QString getDhcpServerIp() const { return dhcpServerIp; }; 47 QString getDhcpServerIp() const { return dhcpServerIp; };
48 QString getLeaseObtained() const { return leaseObtained; }; 48 QString getLeaseObtained() const { return leaseObtained; };
49 QString getLeaseExpires() const { return leaseExpires; }; 49 QString getLeaseExpires() const { return leaseExpires; };
50 50
51 public slots: 51 public slots:
52 virtual bool refresh(); 52 virtual bool refresh();
53 virtual void start(); 53 virtual void start();
54 virtual void stop(); 54 virtual void stop();
55 virtual void restart(); 55 virtual void restart();
56 56
57protected: 57protected:
58 bool callProcess( const QStringList& name );
58 // Interface information 59 // Interface information
59 QString hardwareName; 60 QString hardwareName;
60 Module *moduleOwner; 61 Module *moduleOwner;
61 bool status; 62 bool status;
62 bool attached; 63 bool attached;
63 64
64 // Network information 65 // Network information
65 bool dhcp; 66 bool dhcp;
66 QString dhcpServerIp; 67 QString dhcpServerIp;
67 QString leaseObtained; 68 QString leaseObtained;
68 QString leaseExpires; 69 QString leaseExpires;
69 70
70 QString macAddress; 71 QString macAddress;
71 QString ip; 72 QString ip;
72 QString broadcast; 73 QString broadcast;
73 QString subnetMask; 74 QString subnetMask;
74 75
75}; 76};
76 77
77#endif 78#endif
78 79
79// interface.h 80// interface.h
80 81