author | benmeyer <benmeyer> | 2003-01-13 19:07:40 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2003-01-13 19:07:40 (UTC) |
commit | b5e3438b22606a00e17afd14674aa685739237c1 (patch) (unidiff) | |
tree | 4359f55ade82e06316b3b496db82fbafbdf29a15 | |
parent | 4cd81644fb2ac8cd91e4dd79c2274656f5bfe81a (diff) | |
download | opie-b5e3438b22606a00e17afd14674aa685739237c1.zip opie-b5e3438b22606a00e17afd14674aa685739237c1.tar.gz opie-b5e3438b22606a00e17afd14674aa685739237c1.tar.bz2 |
test
-rw-r--r-- | noncore/settings/networksettings/interfaces/interface.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/settings/networksettings/interfaces/interface.cpp b/noncore/settings/networksettings/interfaces/interface.cpp index 3af521c..864d9b5 100644 --- a/noncore/settings/networksettings/interfaces/interface.cpp +++ b/noncore/settings/networksettings/interfaces/interface.cpp | |||
@@ -1,48 +1,50 @@ | |||
1 | $Header$ | ||
2 | |||
1 | /** | 3 | /** |
2 | * $Author$ | 4 | * $Author$ |
3 | * $Date$ | 5 | * $Date$ |
4 | * $Name$ | 6 | * $Name$ |
5 | */ | 7 | */ |
6 | 8 | ||
7 | #include "interface.h" | 9 | #include "interface.h" |
8 | #include <qdatetime.h> | 10 | #include <qdatetime.h> |
9 | #include <qfile.h> | 11 | #include <qfile.h> |
10 | #include <qdir.h> | 12 | #include <qdir.h> |
11 | #include <qfileinfo.h> | 13 | #include <qfileinfo.h> |
12 | #include <qtextstream.h> | 14 | #include <qtextstream.h> |
13 | 15 | ||
14 | #define IFCONFIG "/sbin/ifconfig" | 16 | #define IFCONFIG "/sbin/ifconfig" |
15 | #define DHCP_INFO_DIR "/etc/dhcpc" | 17 | #define DHCP_INFO_DIR "/etc/dhcpc" |
16 | 18 | ||
17 | #include <stdio.h> | 19 | #include <stdio.h> |
18 | #include <stdlib.h> | 20 | #include <stdlib.h> |
19 | 21 | ||
20 | Interface::Interface(QObject * parent, const char * name, bool newSatus): QObject(parent, name), hardwareName("Unknown"), moduleOwner(NULL), status(newSatus), attached(false), dhcp(false), macAddress(""), ip("0.0.0.0"), broadcast(""), subnetMask("0.0.0.0"){ | 22 | Interface::Interface(QObject * parent, const char * name, bool newSatus): QObject(parent, name), hardwareName("Unknown"), moduleOwner(NULL), status(newSatus), attached(false), dhcp(false), macAddress(""), ip("0.0.0.0"), broadcast(""), subnetMask("0.0.0.0"){ |
21 | refresh(); | 23 | refresh(); |
22 | } | 24 | } |
23 | 25 | ||
24 | /** | 26 | /** |
25 | * Set status | 27 | * Set status |
26 | * @param newStatus - the new status | 28 | * @param newStatus - the new status |
27 | * emit updateInterface | 29 | * emit updateInterface |
28 | */ | 30 | */ |
29 | void Interface::setStatus(bool newStatus){ | 31 | void Interface::setStatus(bool newStatus){ |
30 | if(status != newStatus){ | 32 | if(status != newStatus){ |
31 | status = newStatus; | 33 | status = newStatus; |
32 | refresh(); | 34 | refresh(); |
33 | } | 35 | } |
34 | }; | 36 | }; |
35 | 37 | ||
36 | /** | 38 | /** |
37 | * Set if attached or not (802.11 card pulled out for example) | 39 | * Set if attached or not (802.11 card pulled out for example) |
38 | * @param isAttached - if attached | 40 | * @param isAttached - if attached |
39 | * emit updateInterface | 41 | * emit updateInterface |
40 | */ | 42 | */ |
41 | void Interface::setAttached(bool isAttached){ | 43 | void Interface::setAttached(bool isAttached){ |
42 | attached = isAttached; | 44 | attached = isAttached; |
43 | emit(updateInterface(this)); | 45 | emit(updateInterface(this)); |
44 | }; | 46 | }; |
45 | 47 | ||
46 | /** | 48 | /** |
47 | * Set Hardware name | 49 | * Set Hardware name |
48 | * @param name - the new name | 50 | * @param name - the new name |