summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/interfaces/interface.cpp2
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
20Interface::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"){ 22Interface::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 */
29void Interface::setStatus(bool newStatus){ 31void 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 */
41void Interface::setAttached(bool isAttached){ 43void 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