summaryrefslogtreecommitdiff
path: root/noncore/net/networksetup/interfaces/interface.cpp
Unidiff
Diffstat (limited to 'noncore/net/networksetup/interfaces/interface.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/networksetup/interfaces/interface.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/networksetup/interfaces/interface.cpp b/noncore/net/networksetup/interfaces/interface.cpp
index 4129b3d..7ffa76f 100644
--- a/noncore/net/networksetup/interfaces/interface.cpp
+++ b/noncore/net/networksetup/interfaces/interface.cpp
@@ -1,62 +1,62 @@
1#include "interface.h" 1#include "interface.h"
2#include <qdatetime.h> 2#include <qdatetime.h>
3#include <qfile.h> 3#include <qfile.h>
4#include <qdir.h> 4#include <qdir.h>
5#include <qfileinfo.h> 5#include <qfileinfo.h>
6#include <qtextstream.h> 6#include <qtextstream.h>
7 7
8#define IFCONFIG "/sbin/ifconfig" 8#define IFCONFIG "/sbin/ifconfig"
9#define DHCP_INFO_DIR "/etc/dhcpc" 9#define DHCP_INFO_DIR "/etc/dhcpc"
10 10
11#include <stdio.h> 11#include <stdio.h>
12#include <stdlib.h> 12#include <stdlib.h>
13 13
14Interface::Interface(QObject * parent, const char * name, bool newSatus): QObject(parent, name), status(newSatus), attached(false), hardwareName("Unknown"), moduleOwner(NULL), macAddress(""), ip("0.0.0.0"), broadcast(""), subnetMask("0.0.0.0"), dhcp(false){ 14Interface::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"){
15 refresh(); 15 refresh();
16} 16}
17 17
18/** 18/**
19 * Set status 19 * Set status
20 * @param newStatus - the new status 20 * @param newStatus - the new status
21 * emit updateInterface 21 * emit updateInterface
22 */ 22 */
23void Interface::setStatus(bool newStatus){ 23void Interface::setStatus(bool newStatus){
24 if(status != newStatus){ 24 if(status != newStatus){
25 status = newStatus; 25 status = newStatus;
26 refresh(); 26 refresh();
27 } 27 }
28}; 28};
29 29
30/** 30/**
31 * Set if attached or not (802.11 card pulled out for example) 31 * Set if attached or not (802.11 card pulled out for example)
32 * @param isAttached - if attached 32 * @param isAttached - if attached
33 * emit updateInterface 33 * emit updateInterface
34 */ 34 */
35void Interface::setAttached(bool isAttached){ 35void Interface::setAttached(bool isAttached){
36 attached = isAttached; 36 attached = isAttached;
37 emit(updateInterface(this)); 37 emit(updateInterface(this));
38}; 38};
39 39
40/** 40/**
41 * Set Hardware name 41 * Set Hardware name
42 * @param name - the new name 42 * @param name - the new name
43 * emit updateInterface 43 * emit updateInterface
44 */ 44 */
45void Interface::setHardwareName(const QString &name){ 45void Interface::setHardwareName(const QString &name){
46 hardwareName = name; 46 hardwareName = name;
47 emit(updateInterface(this)); 47 emit(updateInterface(this));
48}; 48};
49 49
50/** 50/**
51 * Set Module owner 51 * Set Module owner
52 * @param owner - the new owner 52 * @param owner - the new owner
53 * emit updateInterface 53 * emit updateInterface
54 */ 54 */
55void Interface::setModuleOwner(Module *owner){ 55void Interface::setModuleOwner(Module *owner){
56 moduleOwner = owner; 56 moduleOwner = owner;
57 emit(updateInterface(this)); 57 emit(updateInterface(this));
58}; 58};
59 59
60 60
61/** 61/**
62 * Try to start the interface. 62 * Try to start the interface.