summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/interfaces/interface.cpp3
-rw-r--r--noncore/settings/networksettings/interfaces/interfaces.cpp2
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.cpp1
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp1
4 files changed, 7 insertions, 0 deletions
diff --git a/noncore/settings/networksettings/interfaces/interface.cpp b/noncore/settings/networksettings/interfaces/interface.cpp
index d2b106a..46f3e19 100644
--- a/noncore/settings/networksettings/interfaces/interface.cpp
+++ b/noncore/settings/networksettings/interfaces/interface.cpp
@@ -1,38 +1,41 @@
1/** 1/**
2 * $Author$ 2 * $Author$
3 * $Date$ 3 * $Date$
4 */ 4 */
5 5
6#include "interface.h" 6#include "interface.h"
7
8#include <opie2/odebug.h>
9
7#include <qdatetime.h> 10#include <qdatetime.h>
8#include <qfile.h> 11#include <qfile.h>
9#include <qdir.h> 12#include <qdir.h>
10#include <qfileinfo.h> 13#include <qfileinfo.h>
11#include <qtextstream.h> 14#include <qtextstream.h>
12 15
13#define IFCONFIG "/sbin/ifconfig" 16#define IFCONFIG "/sbin/ifconfig"
14#define DHCP_INFO_DIR "/etc/dhcpc" 17#define DHCP_INFO_DIR "/etc/dhcpc"
15 18
16#include <stdio.h> 19#include <stdio.h>
17#include <stdlib.h> 20#include <stdlib.h>
18 21
19Interface::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"){
20 refresh(); 23 refresh();
21} 24}
22 25
23/** 26/**
24 * Set status 27 * Set status
25 * @param newStatus - the new status 28 * @param newStatus - the new status
26 * emit updateInterface 29 * emit updateInterface
27 */ 30 */
28void Interface::setStatus(bool newStatus){ 31void Interface::setStatus(bool newStatus){
29 if(status != newStatus){ 32 if(status != newStatus){
30 status = newStatus; 33 status = newStatus;
31 refresh(); 34 refresh();
32 } 35 }
33}; 36};
34 37
35/** 38/**
36 * 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)
37 * @param isAttached - if attached 40 * @param isAttached - if attached
38 * emit updateInterface 41 * emit updateInterface
diff --git a/noncore/settings/networksettings/interfaces/interfaces.cpp b/noncore/settings/networksettings/interfaces/interfaces.cpp
index e283926..5ce4b58 100644
--- a/noncore/settings/networksettings/interfaces/interfaces.cpp
+++ b/noncore/settings/networksettings/interfaces/interfaces.cpp
@@ -1,34 +1,36 @@
1#include "interfaces.h" 1#include "interfaces.h"
2 2
3#include <opie2/odebug.h>
4
3#include <qcheckbox.h> 5#include <qcheckbox.h>
4#include <qfile.h> 6#include <qfile.h>
5#include <qtextstream.h> 7#include <qtextstream.h>
6#include <qregexp.h> 8#include <qregexp.h>
7 9
8// The three stanza's 10// The three stanza's
9#define AUTO "auto" 11#define AUTO "auto"
10#define IFACE "iface" 12#define IFACE "iface"
11#define MAPPING "mapping" 13#define MAPPING "mapping"
12 14
13/** 15/**
14 * Constructor. Reads in the interfaces file and then split the file up by 16 * Constructor. Reads in the interfaces file and then split the file up by
15 * the \n for interfaces variable. 17 * the \n for interfaces variable.
16 * @param useInterfacesFile if an interface file other then the default is 18 * @param useInterfacesFile if an interface file other then the default is
17 * desired to be used it should be passed in. 19 * desired to be used it should be passed in.
18 */ 20 */
19Interfaces::Interfaces(QString useInterfacesFile){ 21Interfaces::Interfaces(QString useInterfacesFile){
20 acceptedFamily.append(INTERFACES_FAMILY_INET); 22 acceptedFamily.append(INTERFACES_FAMILY_INET);
21 acceptedFamily.append(INTERFACES_FAMILY_IPX); 23 acceptedFamily.append(INTERFACES_FAMILY_IPX);
22 acceptedFamily.append(INTERFACES_FAMILY_INET6); 24 acceptedFamily.append(INTERFACES_FAMILY_INET6);
23 25
24 interfacesFile = useInterfacesFile; 26 interfacesFile = useInterfacesFile;
25 QFile file(interfacesFile); 27 QFile file(interfacesFile);
26 if (!file.open(IO_ReadOnly)){ 28 if (!file.open(IO_ReadOnly)){
27 odebug << "Interfaces: Can't open file: " << interfacesFile.latin1() << " for reading." << oendl; 29 odebug << "Interfaces: Can't open file: " << interfacesFile.latin1() << " for reading." << oendl;
28 currentIface = interfaces.end(); 30 currentIface = interfaces.end();
29 currentMapping = interfaces.end(); 31 currentMapping = interfaces.end();
30 return; 32 return;
31 } 33 }
32 QTextStream stream( &file ); 34 QTextStream stream( &file );
33 QString line; 35 QString line;
34 while ( !stream.eof() ) { 36 while ( !stream.eof() ) {
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
index ec3bad3..8498759 100644
--- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
+++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
@@ -1,47 +1,48 @@
1#include "interfacesetupimp.h" 1#include "interfacesetupimp.h"
2#include "interface.h" 2#include "interface.h"
3 3
4#include <qcheckbox.h> 4#include <qcheckbox.h>
5#include <qlineedit.h> 5#include <qlineedit.h>
6#include <qspinbox.h> 6#include <qspinbox.h>
7#include <qgroupbox.h> 7#include <qgroupbox.h>
8#include <qlabel.h> 8#include <qlabel.h>
9 9
10#include <qmessagebox.h> 10#include <qmessagebox.h>
11 11
12#include <opie2/oprocess.h> 12#include <opie2/oprocess.h>
13 13
14#ifdef QWS 14#ifdef QWS
15#include <opie2/owait.h> 15#include <opie2/owait.h>
16#include <opie2/odebug.h>
16#include <qpe/global.h> 17#include <qpe/global.h>
17#include <qapplication.h> 18#include <qapplication.h>
18#endif 19#endif
19 20
20#define DNSSCRIPT "changedns" 21#define DNSSCRIPT "changedns"
21 22
22/** 23/**
23 * Constuctor. Set up the connection. A profile must be set. 24 * Constuctor. Set up the connection. A profile must be set.
24 */ 25 */
25using namespace Opie::Ui; 26using namespace Opie::Ui;
26using namespace Opie::Core; 27using namespace Opie::Core;
27InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, Interfaces *j, WFlags fl) : InterfaceSetup(parent, name, fl), interface(i), interfaces(j), delInterfaces(false){ 28InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, Interfaces *j, WFlags fl) : InterfaceSetup(parent, name, fl), interface(i), interfaces(j), delInterfaces(false){
28 if (j == 0) { 29 if (j == 0) {
29 delInterfaces = true; 30 delInterfaces = true;
30 interfaces = new Interfaces; 31 interfaces = new Interfaces;
31 } 32 }
32} 33}
33 34
34/** 35/**
35 * Destructor 36 * Destructor
36 */ 37 */
37InterfaceSetupImp::~InterfaceSetupImp(){ 38InterfaceSetupImp::~InterfaceSetupImp(){
38 if(delInterfaces) { 39 if(delInterfaces) {
39 delete interfaces; 40 delete interfaces;
40 } 41 }
41} 42}
42 43
43/** 44/**
44 * Save the current settings, then write out the interfaces file and close. 45 * Save the current settings, then write out the interfaces file and close.
45 */ 46 */
46bool InterfaceSetupImp::saveChanges(){ 47bool InterfaceSetupImp::saveChanges(){
47 bool error; 48 bool error;
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp
index 3e1a650..5184630 100644
--- a/noncore/settings/networksettings/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindowimp.cpp
@@ -1,41 +1,42 @@
1 1
2#include "mainwindowimp.h" 2#include "mainwindowimp.h"
3#include "addconnectionimp.h" 3#include "addconnectionimp.h"
4#include "interfaceinformationimp.h" 4#include "interfaceinformationimp.h"
5#include "interfacesetupimp.h" 5#include "interfacesetupimp.h"
6#include "interfaces.h" 6#include "interfaces.h"
7#include "module.h" 7#include "module.h"
8 8
9/* OPIE */ 9/* OPIE */
10#include <opie2/odebug.h>
10#include <qpe/qcopenvelope_qws.h> 11#include <qpe/qcopenvelope_qws.h>
11#include <qpe/qpeapplication.h> 12#include <qpe/qpeapplication.h>
12#include <qpe/config.h> 13#include <qpe/config.h>
13#include <qpe/qlibrary.h> 14#include <qpe/qlibrary.h>
14#include <qpe/resource.h> 15#include <qpe/resource.h>
15 16
16/* QT */ 17/* QT */
17#include <qpushbutton.h> 18#include <qpushbutton.h>
18#include <qlistbox.h> 19#include <qlistbox.h>
19#include <qlineedit.h> 20#include <qlineedit.h>
20#include <qlistview.h> 21#include <qlistview.h>
21#include <qheader.h> 22#include <qheader.h>
22#include <qlabel.h> 23#include <qlabel.h>
23#include <qtabwidget.h> // in order to disable the profiles tab 24#include <qtabwidget.h> // in order to disable the profiles tab
24#include <qmessagebox.h> 25#include <qmessagebox.h>
25 26
26 27
27#if QT_VERSION < 300 28#if QT_VERSION < 300
28#include <qlist.h> 29#include <qlist.h>
29#else 30#else
30#include <qptrlist.h> 31#include <qptrlist.h>
31#endif 32#endif
32#include <qdir.h> 33#include <qdir.h>
33#include <qfile.h> 34#include <qfile.h>
34#include <qtextstream.h> 35#include <qtextstream.h>
35#include <qregexp.h> 36#include <qregexp.h>
36 37
37/* STD */ 38/* STD */
38#include <net/if.h> 39#include <net/if.h>
39#include <sys/ioctl.h> 40#include <sys/ioctl.h>
40#include <sys/socket.h> 41#include <sys/socket.h>
41 42