summaryrefslogtreecommitdiff
path: root/noncore/net
authorbenmeyer <benmeyer>2002-11-13 16:25:04 (UTC)
committer benmeyer <benmeyer>2002-11-13 16:25:04 (UTC)
commitd3301ad9a74fdf693551bd70bc3cf34b311eaa49 (patch) (unidiff)
treefdc7ee3650af3e7225e1a8966e12bc2c1007b986 /noncore/net
parent2bc05c54b2ff1a9b2af7d6bd4d55428cfe0d8db3 (diff)
downloadopie-d3301ad9a74fdf693551bd70bc3cf34b311eaa49.zip
opie-d3301ad9a74fdf693551bd70bc3cf34b311eaa49.tar.gz
opie-d3301ad9a74fdf693551bd70bc3cf34b311eaa49.tar.bz2
code cleanup const's placed in code
Diffstat (limited to 'noncore/net') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/networksetup/TODO6
-rw-r--r--noncore/net/networksetup/interfaces/interface.cpp2
-rw-r--r--noncore/net/networksetup/interfaces/interface.h41
-rw-r--r--noncore/net/networksetup/interfaces/interfaces.cpp6
-rw-r--r--noncore/net/networksetup/interfaces/interfaces.h8
-rw-r--r--noncore/net/networksetup/interfaces/interfaces.pro2
-rw-r--r--noncore/net/networksetup/ppp/pppmodule.cpp23
-rw-r--r--noncore/net/networksetup/wlan/infoimp.cpp3
8 files changed, 47 insertions, 44 deletions
diff --git a/noncore/net/networksetup/TODO b/noncore/net/networksetup/TODO
index 04b3a7c..020339f 100644
--- a/noncore/net/networksetup/TODO
+++ b/noncore/net/networksetup/TODO
@@ -1,5 +1,3 @@
1AndyQ - Fixed a bug in wlanimp.cpp : accept method - put braces round key 1test WEP
2 field if so that settings get saved if WEP is enabled 2WEP key in file wireless.conf is not encrypted !, therefore it is very easy to get the key out of the zaurus..
3
4CLEAN UP
5 3
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
@@ -13,3 +13,3 @@
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();
diff --git a/noncore/net/networksetup/interfaces/interface.h b/noncore/net/networksetup/interfaces/interface.h
index 989d6d8..d37834a 100644
--- a/noncore/net/networksetup/interfaces/interface.h
+++ b/noncore/net/networksetup/interfaces/interface.h
@@ -18,14 +18,14 @@ public:
18 18
19 QString getInterfaceName(){ QString n(this->name()); return n; }; 19 QString getInterfaceName() const { QString n(this->name()); return n; };
20 20
21 bool getStatus(){ return status; }; 21 bool getStatus() const { return status; };
22 void setStatus(bool newStatus); 22 void setStatus(bool newStatus);
23 23
24 bool isAttached(){ return attached; }; 24 bool isAttached() const { return attached; };
25 void setAttached(bool isAttached=false); 25 void setAttached(bool isAttached=false);
26 26
27 QString getHardwareName(){ return hardwareName; }; 27 QString getHardwareName() const { return hardwareName; };
28 void setHardwareName(const QString &name="Unknown"); 28 void setHardwareName(const QString &name="Unknown");
29 29
30 Module* getModuleOwner(){ return moduleOwner; }; 30 Module* getModuleOwner() const { return moduleOwner; };
31 void setModuleOwner(Module *owner=NULL); 31 void setModuleOwner(Module *owner=NULL);
@@ -33,10 +33,10 @@ public:
33 // inet information. 33 // inet information.
34 QString getMacAddress(){ return macAddress; }; 34 QString getMacAddress() const { return macAddress; };
35 QString getIp(){ return ip; }; 35 QString getIp() const { return ip; };
36 QString getSubnetMask(){ return subnetMask; }; 36 QString getSubnetMask() const { return subnetMask; };
37 QString getBroadcast(){ return broadcast; }; 37 QString getBroadcast() const { return broadcast; };
38 bool isDhcp(){ return dhcp; }; 38 bool isDhcp() const { return dhcp; };
39 QString getDhcpServerIp(){ return dhcpServerIp; }; 39 QString getDhcpServerIp() const { return dhcpServerIp; };
40 QString getLeaseObtained(){ return leaseObtained; }; 40 QString getLeaseObtained() const { return leaseObtained; };
41 QString getLeaseExpires(){ return leaseExpires; }; 41 QString getLeaseExpires() const { return leaseExpires; };
42 42
@@ -50,12 +50,8 @@ private:
50 // Interface information 50 // Interface information
51 bool status;
52 bool attached;
53 QString hardwareName; 51 QString hardwareName;
54 Module *moduleOwner; 52 Module *moduleOwner;
55 53 bool status;
54 bool attached;
55
56 // Network information 56 // Network information
57 QString macAddress;
58 QString ip;
59 QString broadcast;
60 QString subnetMask;
61 bool dhcp; 57 bool dhcp;
@@ -65,2 +61,7 @@ private:
65 61
62 QString macAddress;
63 QString ip;
64 QString broadcast;
65 QString subnetMask;
66
66}; 67};
diff --git a/noncore/net/networksetup/interfaces/interfaces.cpp b/noncore/net/networksetup/interfaces/interfaces.cpp
index e49998e..8f685fe 100644
--- a/noncore/net/networksetup/interfaces/interfaces.cpp
+++ b/noncore/net/networksetup/interfaces/interfaces.cpp
@@ -73,3 +73,3 @@ QStringList Interfaces::getInterfaceList(){
73 */ 73 */
74bool Interfaces::isAuto(const QString &interface){ 74bool Interfaces::isAuto(const QString &interface) const {
75 QStringList autoLines = interfaces.grep(QRegExp(AUTO)); 75 QStringList autoLines = interfaces.grep(QRegExp(AUTO));
@@ -141,4 +141,4 @@ bool Interfaces::setInterface(QString interface){
141 */ 141 */
142bool Interfaces::isInterfaceSet(){ 142bool Interfaces::isInterfaceSet() const {
143 return (currentIface != interfaces.end()); 143 return (interfaces.end() != currentIface);
144} 144}
diff --git a/noncore/net/networksetup/interfaces/interfaces.h b/noncore/net/networksetup/interfaces/interfaces.h
index d662919..bac2a7e 100644
--- a/noncore/net/networksetup/interfaces/interfaces.h
+++ b/noncore/net/networksetup/interfaces/interfaces.h
@@ -27,3 +27,3 @@ public:
27 27
28 bool isAuto(const QString &interface); 28 bool isAuto(const QString &interface) const ;
29 bool setAuto(const QString &interface, bool setAuto); 29 bool setAuto(const QString &interface, bool setAuto);
@@ -34,3 +34,3 @@ public:
34 bool setInterface(QString interface); 34 bool setInterface(QString interface);
35 bool isInterfaceSet(); 35 bool isInterfaceSet() const ;
36 QString getInterfaceName(bool &error); 36 QString getInterfaceName(bool &error);
@@ -59,7 +59,7 @@ private:
59 bool setStanza(const QString &stanza, const QString &option, QStringList::Iterator &iterator); 59 bool setStanza(const QString &stanza, const QString &option, QStringList::Iterator &iterator);
60 bool removeStanza(QStringList::Iterator &stanza);
60 bool setOption(const QStringList::Iterator &start, const QString &option, const QString &value); 61 bool setOption(const QStringList::Iterator &start, const QString &option, const QString &value);
62 bool removeAllOptions(const QStringList::Iterator &start);
61 bool removeOption(const QStringList::Iterator &start, const QString &option, const QString &value); 63 bool removeOption(const QStringList::Iterator &start, const QString &option, const QString &value);
62 QString getOption(const QStringList::Iterator &start, const QString &option, bool &error); 64 QString getOption(const QStringList::Iterator &start, const QString &option, bool &error);
63 bool removeStanza(QStringList::Iterator &stanza);
64 bool removeAllOptions(const QStringList::Iterator &start);
65 65
diff --git a/noncore/net/networksetup/interfaces/interfaces.pro b/noncore/net/networksetup/interfaces/interfaces.pro
index 9a024f6..d6b43fb 100644
--- a/noncore/net/networksetup/interfaces/interfaces.pro
+++ b/noncore/net/networksetup/interfaces/interfaces.pro
@@ -3,3 +3,3 @@ CONFIG += qt warn_on release
3 #CONFIG += qt warn_on debug 3 #CONFIG += qt warn_on debug
4 DESTDIR = $(QTDIR)/lib$(PROJMAK) 4 #DESTDIR = $(QTDIR)/lib$(PROJMAK)
5 HEADERS = interface.h interfaceinformationimp.h interfaces.h interfacesetupimp.h 5 HEADERS = interface.h interfaceinformationimp.h interfaces.h interfacesetupimp.h
diff --git a/noncore/net/networksetup/ppp/pppmodule.cpp b/noncore/net/networksetup/ppp/pppmodule.cpp
index 68bb0a0..72cd45e 100644
--- a/noncore/net/networksetup/ppp/pppmodule.cpp
+++ b/noncore/net/networksetup/ppp/pppmodule.cpp
@@ -1,2 +1,3 @@
1#include "pppmodule.h" 1#include "pppmodule.h"
2#include "pppimp.h"
2#include "interfaceinformationimp.h" 3#include "interfaceinformationimp.h"
@@ -40,4 +41,4 @@ QString PPPModule::getPixmapName(Interface* ){
40bool PPPModule::isOwner(Interface *i){ 41bool PPPModule::isOwner(Interface *i){
41 // Scan the ppp database 42 if(!i->getInterfaceName().upper().contains("PPP"))
42 return false; 43 return false;
43 44
@@ -64,8 +65,6 @@ QWidget *PPPModule::configure(Interface *i){
64QWidget *PPPModule::information(Interface *i){ 65QWidget *PPPModule::information(Interface *i){
65 return NULL; 66 // We don't have any advanced pppd information widget yet :-D
66 67 // TODO ^
67 //WlanInfoImp *info = new WlanInfoImp(0, i->getInterfaceName(), Qt::WDestructiveClose); 68 InterfaceInformationImp *information = new InterfaceInformationImp(0, "InterfaceSetupImp", i);
68 //InterfaceInformationImp *information = new InterfaceInformationImp(info->tabWidget, "InterfaceSetupImp", i); 69 return information;
69 //info->tabWidget->insertTab(information, "TCP/IP");
70 //return info;
71} 70}
@@ -78,2 +77,3 @@ QWidget *PPPModule::information(Interface *i){
78QList<Interface> PPPModule::getInterfaces(){ 77QList<Interface> PPPModule::getInterfaces(){
78 // List all of the files in the peer directory
79 return list; 79 return list;
@@ -88,4 +88,7 @@ QList<Interface> PPPModule::getInterfaces(){
88Interface *PPPModule::addNewInterface(const QString &newInterface){ 88Interface *PPPModule::addNewInterface(const QString &newInterface){
89 // We can't add a 802.11 interface, either the hardware will be there 89 // If the
90 // or it wont. 90 PPPConfigureImp imp(0, "PPPConfigImp");
91 if(imp.exec() == QDialog::Accepted ){
92
93 }
91 return NULL; 94 return NULL;
diff --git a/noncore/net/networksetup/wlan/infoimp.cpp b/noncore/net/networksetup/wlan/infoimp.cpp
index e1eef81..6d3e167 100644
--- a/noncore/net/networksetup/wlan/infoimp.cpp
+++ b/noncore/net/networksetup/wlan/infoimp.cpp
@@ -2,2 +2,3 @@
2#include "wextensions.h" 2#include "wextensions.h"
3
3#include <qtimer.h> 4#include <qtimer.h>
@@ -14,3 +15,3 @@ WlanInfoImp::WlanInfoImp( QWidget* parent, const char* name, WFlags fl): WlanInf
14 delete wExtensions; 15 delete wExtensions;
15 qDebug("No extension"); 16 qDebug("WlanInfoImp::No wireless extension");
16 return; 17 return;