Diffstat (limited to 'noncore/settings/networksettings') (more/less context) (ignore whitespace changes)
8 files changed, 47 insertions, 44 deletions
diff --git a/noncore/settings/networksettings/TODO b/noncore/settings/networksettings/TODO index 04b3a7c..020339f 100644 --- a/noncore/settings/networksettings/TODO +++ b/noncore/settings/networksettings/TODO @@ -1,5 +1,3 @@ -AndyQ - Fixed a bug in wlanimp.cpp : accept method - put braces round key - field if so that settings get saved if WEP is enabled - -CLEAN UP +test WEP +WEP key in file wireless.conf is not encrypted !, therefore it is very easy to get the key out of the zaurus.. diff --git a/noncore/settings/networksettings/interfaces/interface.cpp b/noncore/settings/networksettings/interfaces/interface.cpp index 4129b3d..7ffa76f 100644 --- a/noncore/settings/networksettings/interfaces/interface.cpp +++ b/noncore/settings/networksettings/interfaces/interface.cpp @@ -13,3 +13,3 @@ -Interface::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){ +Interface::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"){ refresh(); diff --git a/noncore/settings/networksettings/interfaces/interface.h b/noncore/settings/networksettings/interfaces/interface.h index 989d6d8..d37834a 100644 --- a/noncore/settings/networksettings/interfaces/interface.h +++ b/noncore/settings/networksettings/interfaces/interface.h @@ -18,14 +18,14 @@ public: - QString getInterfaceName(){ QString n(this->name()); return n; }; + QString getInterfaceName() const { QString n(this->name()); return n; }; - bool getStatus(){ return status; }; + bool getStatus() const { return status; }; void setStatus(bool newStatus); - bool isAttached(){ return attached; }; + bool isAttached() const { return attached; }; void setAttached(bool isAttached=false); - QString getHardwareName(){ return hardwareName; }; + QString getHardwareName() const { return hardwareName; }; void setHardwareName(const QString &name="Unknown"); - Module* getModuleOwner(){ return moduleOwner; }; + Module* getModuleOwner() const { return moduleOwner; }; void setModuleOwner(Module *owner=NULL); @@ -33,10 +33,10 @@ public: // inet information. - QString getMacAddress(){ return macAddress; }; - QString getIp(){ return ip; }; - QString getSubnetMask(){ return subnetMask; }; - QString getBroadcast(){ return broadcast; }; - bool isDhcp(){ return dhcp; }; - QString getDhcpServerIp(){ return dhcpServerIp; }; - QString getLeaseObtained(){ return leaseObtained; }; - QString getLeaseExpires(){ return leaseExpires; }; + QString getMacAddress() const { return macAddress; }; + QString getIp() const { return ip; }; + QString getSubnetMask() const { return subnetMask; }; + QString getBroadcast() const { return broadcast; }; + bool isDhcp() const { return dhcp; }; + QString getDhcpServerIp() const { return dhcpServerIp; }; + QString getLeaseObtained() const { return leaseObtained; }; + QString getLeaseExpires() const { return leaseExpires; }; @@ -50,12 +50,8 @@ private: // Interface information - bool status; - bool attached; QString hardwareName; Module *moduleOwner; - + bool status; + bool attached; + // Network information - QString macAddress; - QString ip; - QString broadcast; - QString subnetMask; bool dhcp; @@ -65,2 +61,7 @@ private: + QString macAddress; + QString ip; + QString broadcast; + QString subnetMask; + }; diff --git a/noncore/settings/networksettings/interfaces/interfaces.cpp b/noncore/settings/networksettings/interfaces/interfaces.cpp index e49998e..8f685fe 100644 --- a/noncore/settings/networksettings/interfaces/interfaces.cpp +++ b/noncore/settings/networksettings/interfaces/interfaces.cpp @@ -73,3 +73,3 @@ QStringList Interfaces::getInterfaceList(){ */ -bool Interfaces::isAuto(const QString &interface){ +bool Interfaces::isAuto(const QString &interface) const { QStringList autoLines = interfaces.grep(QRegExp(AUTO)); @@ -141,4 +141,4 @@ bool Interfaces::setInterface(QString interface){ */ -bool Interfaces::isInterfaceSet(){ - return (currentIface != interfaces.end()); +bool Interfaces::isInterfaceSet() const { + return (interfaces.end() != currentIface); } diff --git a/noncore/settings/networksettings/interfaces/interfaces.h b/noncore/settings/networksettings/interfaces/interfaces.h index d662919..bac2a7e 100644 --- a/noncore/settings/networksettings/interfaces/interfaces.h +++ b/noncore/settings/networksettings/interfaces/interfaces.h @@ -27,3 +27,3 @@ public: - bool isAuto(const QString &interface); + bool isAuto(const QString &interface) const ; bool setAuto(const QString &interface, bool setAuto); @@ -34,3 +34,3 @@ public: bool setInterface(QString interface); - bool isInterfaceSet(); + bool isInterfaceSet() const ; QString getInterfaceName(bool &error); @@ -59,7 +59,7 @@ private: bool setStanza(const QString &stanza, const QString &option, QStringList::Iterator &iterator); + bool removeStanza(QStringList::Iterator &stanza); bool setOption(const QStringList::Iterator &start, const QString &option, const QString &value); + bool removeAllOptions(const QStringList::Iterator &start); bool removeOption(const QStringList::Iterator &start, const QString &option, const QString &value); QString getOption(const QStringList::Iterator &start, const QString &option, bool &error); - bool removeStanza(QStringList::Iterator &stanza); - bool removeAllOptions(const QStringList::Iterator &start); diff --git a/noncore/settings/networksettings/interfaces/interfaces.pro b/noncore/settings/networksettings/interfaces/interfaces.pro index 9a024f6..d6b43fb 100644 --- a/noncore/settings/networksettings/interfaces/interfaces.pro +++ b/noncore/settings/networksettings/interfaces/interfaces.pro @@ -3,3 +3,3 @@ CONFIG += qt warn_on release #CONFIG += qt warn_on debug -DESTDIR = $(QTDIR)/lib$(PROJMAK) +#DESTDIR = $(QTDIR)/lib$(PROJMAK) HEADERS = interface.h interfaceinformationimp.h interfaces.h interfacesetupimp.h diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp index 68bb0a0..72cd45e 100644 --- a/noncore/settings/networksettings/ppp/pppmodule.cpp +++ b/noncore/settings/networksettings/ppp/pppmodule.cpp @@ -1,2 +1,3 @@ #include "pppmodule.h" +#include "pppimp.h" #include "interfaceinformationimp.h" @@ -40,4 +41,4 @@ QString PPPModule::getPixmapName(Interface* ){ bool PPPModule::isOwner(Interface *i){ - // Scan the ppp database - return false; + if(!i->getInterfaceName().upper().contains("PPP")) + return false; @@ -64,8 +65,6 @@ QWidget *PPPModule::configure(Interface *i){ QWidget *PPPModule::information(Interface *i){ - return NULL; - - //WlanInfoImp *info = new WlanInfoImp(0, i->getInterfaceName(), Qt::WDestructiveClose); - //InterfaceInformationImp *information = new InterfaceInformationImp(info->tabWidget, "InterfaceSetupImp", i); - //info->tabWidget->insertTab(information, "TCP/IP"); - //return info; + // We don't have any advanced pppd information widget yet :-D + // TODO ^ + InterfaceInformationImp *information = new InterfaceInformationImp(0, "InterfaceSetupImp", i); + return information; } @@ -78,2 +77,3 @@ QWidget *PPPModule::information(Interface *i){ QList<Interface> PPPModule::getInterfaces(){ + // List all of the files in the peer directory return list; @@ -88,4 +88,7 @@ QList<Interface> PPPModule::getInterfaces(){ Interface *PPPModule::addNewInterface(const QString &newInterface){ - // We can't add a 802.11 interface, either the hardware will be there - // or it wont. + // If the + PPPConfigureImp imp(0, "PPPConfigImp"); + if(imp.exec() == QDialog::Accepted ){ + + } return NULL; diff --git a/noncore/settings/networksettings/wlan/infoimp.cpp b/noncore/settings/networksettings/wlan/infoimp.cpp index e1eef81..6d3e167 100644 --- a/noncore/settings/networksettings/wlan/infoimp.cpp +++ b/noncore/settings/networksettings/wlan/infoimp.cpp @@ -2,2 +2,3 @@ #include "wextensions.h" + #include <qtimer.h> @@ -14,3 +15,3 @@ WlanInfoImp::WlanInfoImp( QWidget* parent, const char* name, WFlags fl): WlanInf delete wExtensions; - qDebug("No extension"); + qDebug("WlanInfoImp::No wireless extension"); return; |