summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/interfaces/interface.h
authorzecke <zecke>2004-02-08 16:31:33 (UTC)
committer zecke <zecke>2004-02-08 16:31:33 (UTC)
commit11324fcf42d984579080ebe474d50258d39adf4f (patch) (unidiff)
tree595793ee9516f93053d287a47f3933c1084035aa /noncore/settings/networksettings/interfaces/interface.h
parent1e532ba3dcf7ce963776844d8040e2fa55e70704 (diff)
downloadopie-11324fcf42d984579080ebe474d50258d39adf4f.zip
opie-11324fcf42d984579080ebe474d50258d39adf4f.tar.gz
opie-11324fcf42d984579080ebe474d50258d39adf4f.tar.bz2
More API fixes
Diffstat (limited to 'noncore/settings/networksettings/interfaces/interface.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/interfaces/interface.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/noncore/settings/networksettings/interfaces/interface.h b/noncore/settings/networksettings/interfaces/interface.h
index ec82851..83ab088 100644
--- a/noncore/settings/networksettings/interfaces/interface.h
+++ b/noncore/settings/networksettings/interfaces/interface.h
@@ -1,56 +1,63 @@
1#ifndef INTERFACE_H 1#ifndef INTERFACE_H
2#define INTERFACE_H 2#define INTERFACE_H
3 3
4#include <qstring.h> 4#include <qstring.h>
5#include <qobject.h> 5#include <qobject.h>
6 6
7class Module; 7class Module;
8 8
9/**
10 * A Interface represents a physical device. You can
11 * inherit it and create also virtual devices. Like saved
12 * ppp dial ups or vpn. Interface is used for representing
13 * your interface to the User and its actions.
14 *
15 */
9class Interface : public QObject{ 16class Interface : public QObject{
10 Q_OBJECT 17 Q_OBJECT
11 18
12signals: 19signals:
13 void updateInterface(Interface *i); 20 void updateInterface(Interface *i);
14 void updateMessage(const QString &message); 21 void updateMessage(const QString &message);
15 22
16public: 23public:
17 Interface(QObject * parent=0, const char * name= "unknown", bool status = false); 24 Interface(QObject * parent=0, const char * name= "unknown", bool status = false);
18 25
19 QString getInterfaceName() const { QString n(this->name()); return n; }; 26 QString getInterfaceName() const { QString n(this->name()); return n; };
20 void setInterfaceName( const QString &n ) { this->setName(n); }; 27 void setInterfaceName( const QString &n ) { this->setName(n); };
21 28
22 bool getStatus() const { return status; }; 29 bool getStatus() const { return status; };
23 void setStatus(bool newStatus); 30 void setStatus(bool newStatus);
24 31
25 bool isAttached() const { return attached; }; 32 bool isAttached() const { return attached; };
26 void setAttached(bool isAttached=false); 33 void setAttached(bool isAttached=false);
27 34
28 QString getHardwareName() const { return hardwareName; }; 35 QString getHardwareName() const { return hardwareName; };
29 void setHardwareName(const QString &name="Unknown"); 36 void setHardwareName(const QString &name="Unknown");
30 37
31 Module* getModuleOwner() const { return moduleOwner; }; 38 Module* getModuleOwner() const { return moduleOwner; };
32 void setModuleOwner(Module *owner=NULL); 39 void setModuleOwner(Module *owner=NULL);
33 40
34 // inet information. 41 // inet information.
35 QString getMacAddress() const { return macAddress; }; 42 QString getMacAddress() const { return macAddress; };
36 QString getIp() const { return ip; }; 43 QString getIp() const { return ip; };
37 QString getSubnetMask() const { return subnetMask; }; 44 QString getSubnetMask() const { return subnetMask; };
38 QString getBroadcast() const { return broadcast; }; 45 QString getBroadcast() const { return broadcast; };
39 bool isDhcp() const { return dhcp; }; 46 bool isDhcp() const { return dhcp; };
40 QString getDhcpServerIp() const { return dhcpServerIp; }; 47 QString getDhcpServerIp() const { return dhcpServerIp; };
41 QString getLeaseObtained() const { return leaseObtained; }; 48 QString getLeaseObtained() const { return leaseObtained; };
42 QString getLeaseExpires() const { return leaseExpires; }; 49 QString getLeaseExpires() const { return leaseExpires; };
43 50
44 public slots: 51 public slots:
45 virtual bool refresh(); 52 virtual bool refresh();
46 virtual void start(); 53 virtual void start();
47 virtual void stop(); 54 virtual void stop();
48 virtual void restart(); 55 virtual void restart();
49 56
50protected: 57protected:
51 // Interface information 58 // Interface information
52 QString hardwareName; 59 QString hardwareName;
53 Module *moduleOwner; 60 Module *moduleOwner;
54 bool status; 61 bool status;
55 bool attached; 62 bool attached;
56 63