summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings
Unidiff
Diffstat (limited to 'noncore/settings/networksettings') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.cpp2
-rw-r--r--noncore/settings/networksettings/main.cpp1
-rw-r--r--noncore/settings/networksettings/networksettings.pro2
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp.cpp1
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp2.cpp2
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp2.h6
6 files changed, 10 insertions, 4 deletions
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
index 05340e4..7c2f85c 100644
--- a/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
+++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.cpp
@@ -13,24 +13,26 @@
13 13
14#ifdef QWS 14#ifdef QWS
15#include <opie2/owait.h> 15#include <opie2/owait.h>
16#include <qpe/global.h> 16#include <qpe/global.h>
17#include <qapplication.h> 17#include <qapplication.h>
18#endif 18#endif
19 19
20#define DNSSCRIPT "changedns" 20#define DNSSCRIPT "changedns"
21 21
22/** 22/**
23 * Constuctor. Set up the connection. A profile must be set. 23 * Constuctor. Set up the connection. A profile must be set.
24 */ 24 */
25using namespace Opie::Ui;
26using namespace Opie::Core;
25InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, Interfaces *j, WFlags fl) : InterfaceSetup(parent, name, fl), interface(i), interfaces(j), delInterfaces(false){ 27InterfaceSetupImp::InterfaceSetupImp(QWidget* parent, const char* name, Interface *i, Interfaces *j, WFlags fl) : InterfaceSetup(parent, name, fl), interface(i), interfaces(j), delInterfaces(false){
26 if (j == 0) { 28 if (j == 0) {
27 delInterfaces = true; 29 delInterfaces = true;
28 interfaces = new Interfaces; 30 interfaces = new Interfaces;
29 } 31 }
30} 32}
31 33
32/** 34/**
33 * Destructor 35 * Destructor
34 */ 36 */
35InterfaceSetupImp::~InterfaceSetupImp(){ 37InterfaceSetupImp::~InterfaceSetupImp(){
36 if(delInterfaces) { 38 if(delInterfaces) {
diff --git a/noncore/settings/networksettings/main.cpp b/noncore/settings/networksettings/main.cpp
index bc11ab4..e4153c3 100644
--- a/noncore/settings/networksettings/main.cpp
+++ b/noncore/settings/networksettings/main.cpp
@@ -1,6 +1,7 @@
1#include "mainwindowimp.h" 1#include "mainwindowimp.h"
2#include <opie2/oapplicationfactory.h> 2#include <opie2/oapplicationfactory.h>
3 3
4using namespace Opie::Core;
4OPIE_EXPORT_APP( OApplicationFactory<MainWindowImp> ) 5OPIE_EXPORT_APP( OApplicationFactory<MainWindowImp> )
5 6
6 7
diff --git a/noncore/settings/networksettings/networksettings.pro b/noncore/settings/networksettings/networksettings.pro
index 5db2d6b..281629c 100644
--- a/noncore/settings/networksettings/networksettings.pro
+++ b/noncore/settings/networksettings/networksettings.pro
@@ -1,12 +1,12 @@
1CONFIG = qt warn_on debug quick-app 1CONFIG = qt warn_on debug quick-app
2HEADERS = mainwindowimp.h addconnectionimp.h defaultmodule.h module.h 2HEADERS = mainwindowimp.h addconnectionimp.h defaultmodule.h module.h
3SOURCES = main.cpp mainwindowimp.cpp addconnectionimp.cpp 3SOURCES = main.cpp mainwindowimp.cpp addconnectionimp.cpp
4INCLUDEPATH += $(OPIEDIR)/include interfaces/ 4INCLUDEPATH += $(OPIEDIR)/include interfaces/ .
5DEPENDPATH += $(OPIEDIR)/include interfaces/ wlan/ ppp/ 5DEPENDPATH += $(OPIEDIR)/include interfaces/ wlan/ ppp/
6LIBS += -lqpe -L$(OPIEDIR)/plugins/networksettings -Linterfaces/ -linterfaces -lopiecore2 -lopieui2 6LIBS += -lqpe -L$(OPIEDIR)/plugins/networksettings -Linterfaces/ -linterfaces -lopiecore2 -lopieui2
7INTERFACES = mainwindow.ui addconnection.ui 7INTERFACES = mainwindow.ui addconnection.ui
8TARGET = networksettings 8TARGET = networksettings
9 9
10 10
11 11
12include ( $(OPIEDIR)/include.pro ) 12include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/settings/networksettings/wlan/wlanimp.cpp b/noncore/settings/networksettings/wlan/wlanimp.cpp
index 95f4abe..80a9927 100644
--- a/noncore/settings/networksettings/wlan/wlanimp.cpp
+++ b/noncore/settings/networksettings/wlan/wlanimp.cpp
@@ -16,24 +16,25 @@
16#ifdef QWS 16#ifdef QWS
17 #include <opie2/oprocess.h> 17 #include <opie2/oprocess.h>
18#else 18#else
19 #define OProcess KProcess 19 #define OProcess KProcess
20 #include <kprocess.h> 20 #include <kprocess.h>
21#endif 21#endif
22 22
23#define WIRELESS_OPTS "/etc/pcmcia/wireless.opts" 23#define WIRELESS_OPTS "/etc/pcmcia/wireless.opts"
24 24
25/** 25/**
26 * Constructor, read in the wireless.opts file for parsing later. 26 * Constructor, read in the wireless.opts file for parsing later.
27 */ 27 */
28using namespace Opie::Core;
28WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl):WLAN(parent, name, modal, fl), currentProfile("*") { 29WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl):WLAN(parent, name, modal, fl), currentProfile("*") {
29 interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i); 30 interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i);
30 tabWidget->insertTab(interfaceSetup, "TCP/IP"); 31 tabWidget->insertTab(interfaceSetup, "TCP/IP");
31 32
32 // Read in the config file. 33 // Read in the config file.
33 QString wlanFile = WIRELESS_OPTS; 34 QString wlanFile = WIRELESS_OPTS;
34 QFile file(wlanFile); 35 QFile file(wlanFile);
35 if (file.open(IO_ReadOnly)){ 36 if (file.open(IO_ReadOnly)){
36 QTextStream stream( &file ); 37 QTextStream stream( &file );
37 QString line = ""; 38 QString line = "";
38 while ( !stream.eof() ) { 39 while ( !stream.eof() ) {
39 line += stream.readLine(); 40 line += stream.readLine();
diff --git a/noncore/settings/networksettings/wlan/wlanimp2.cpp b/noncore/settings/networksettings/wlan/wlanimp2.cpp
index dd1db28..eeebe7f 100644
--- a/noncore/settings/networksettings/wlan/wlanimp2.cpp
+++ b/noncore/settings/networksettings/wlan/wlanimp2.cpp
@@ -33,24 +33,26 @@
33 #include <opie2/opcap.h> 33 #include <opie2/opcap.h>
34#else 34#else
35 #define OProcess KProcess 35 #define OProcess KProcess
36 #include <kprocess.h> 36 #include <kprocess.h>
37#endif 37#endif
38 38
39#define WIRELESS_OPTS "/etc/pcmcia/wireless.opts" 39#define WIRELESS_OPTS "/etc/pcmcia/wireless.opts"
40#define PREUP "/etc/network/if-pre-up.d/wireless-tools" 40#define PREUP "/etc/network/if-pre-up.d/wireless-tools"
41 41
42/** 42/**
43 * Constructor, read in the wireless.opts file for parsing later. 43 * Constructor, read in the wireless.opts file for parsing later.
44 */ 44 */
45using namespace Opie::Net;
46using namespace Opie::Core;
45WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl) : WLAN(parent, name, modal, fl), interface(i), currentProfile("*") { 47WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl) : WLAN(parent, name, modal, fl), interface(i), currentProfile("*") {
46 interfaces = new Interfaces(); 48 interfaces = new Interfaces();
47 interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, interfaces); 49 interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, interfaces);
48 tabWidget->insertTab(interfaceSetup, "TCP/IP"); 50 tabWidget->insertTab(interfaceSetup, "TCP/IP");
49 51
50 // Check sanity - the existance of the wireless-tools if-pre-up script 52 // Check sanity - the existance of the wireless-tools if-pre-up script
51 QFile file(QString(PREUP)); 53 QFile file(QString(PREUP));
52 if (file.exists()) { 54 if (file.exists()) {
53 qWarning(QString("WLANImp: Unable to open /etc/network/if-pre-up.d/wireless-tools")); 55 qWarning(QString("WLANImp: Unable to open /etc/network/if-pre-up.d/wireless-tools"));
54 } 56 }
55 57
56 connect( rescanButton, SIGNAL( clicked() ), this, SLOT( rescanNeighbourhood() ) ); 58 connect( rescanButton, SIGNAL( clicked() ), this, SLOT( rescanNeighbourhood() ) );
diff --git a/noncore/settings/networksettings/wlan/wlanimp2.h b/noncore/settings/networksettings/wlan/wlanimp2.h
index a777203..c3d1eee 100644
--- a/noncore/settings/networksettings/wlan/wlanimp2.h
+++ b/noncore/settings/networksettings/wlan/wlanimp2.h
@@ -1,24 +1,24 @@
1#ifndef WLANIMP_H 1#ifndef WLANIMP_H
2#define WLANIMP_H 2#define WLANIMP_H
3 3
4#include "wlan.h" 4#include "wlan.h"
5#include "interfaces.h" 5#include "interfaces.h"
6#include <qstringlist.h> 6#include <qstringlist.h>
7#include <opie2/onetutils.h> 7#include <opie2/onetutils.h>
8 8
9class InterfaceSetupImp; 9class InterfaceSetupImp;
10class Interface; 10class Interface;
11class Config; 11class Config;
12class OPacket; 12namespace Opie {namespace Net {class OPacket;}}
13class QListViewItem; 13class QListViewItem;
14 14
15const int col_mode= 0; 15const int col_mode= 0;
16const int col_ssid = 1; 16const int col_ssid = 1;
17const int col_chn = 2; 17const int col_chn = 2;
18const int col_mac = 3; 18const int col_mac = 3;
19 19
20class WLANImp : public WLAN { 20class WLANImp : public WLAN {
21 Q_OBJECT 21 Q_OBJECT
22 22
23public: 23public:
24 WLANImp( QWidget* parent = 0, const char* name = 0, Interface *i=0, bool modal = FALSE, WFlags fl = 0 ); 24 WLANImp( QWidget* parent = 0, const char* name = 0, Interface *i=0, bool modal = FALSE, WFlags fl = 0 );
@@ -29,24 +29,24 @@ public slots:
29 void rescanNeighbourhood(); 29 void rescanNeighbourhood();
30 void selectNetwork( QListViewItem* ); 30 void selectNetwork( QListViewItem* );
31 31
32protected: 32protected:
33 void accept(); 33 void accept();
34 34
35private: 35private:
36 void parseOpts(); 36 void parseOpts();
37 void writeOpts(); 37 void writeOpts();
38 38
39 void parseKeyStr(QString keystr); 39 void parseKeyStr(QString keystr);
40 40
41 void handlePacket( OPacket* ); 41 void handlePacket( Opie::Net::OPacket* );
42 void displayFoundNetwork( const QString& mode, int channel, const QString& ssid, const OMacAddress& mac ); 42 void displayFoundNetwork( const QString& mode, int channel, const QString& ssid, const Opie::Net::OMacAddress& mac );
43 43
44 InterfaceSetupImp *interfaceSetup; 44 InterfaceSetupImp *interfaceSetup;
45 Interfaces *interfaces; 45 Interfaces *interfaces;
46 Interface *interface; 46 Interface *interface;
47 47
48 QString currentProfile; 48 QString currentProfile;
49}; 49};
50 50
51#endif 51#endif
52 52