summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/wlan
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/wlan') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/wlan/wlanmodule.cpp42
-rw-r--r--noncore/settings/networksettings/wlan/wlanmodule.h3
2 files changed, 44 insertions, 1 deletions
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp
index 3979e60..3c988d5 100644
--- a/noncore/settings/networksettings/wlan/wlanmodule.cpp
+++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp
@@ -106,8 +106,48 @@ Interface *WLANModule::addNewInterface(const QString &){
106 */ 106 */
107bool WLANModule::remove(Interface*){ 107bool WLANModule::remove(Interface*){
108 // Can't remove a hardware device, you can stop it though. 108 // Can't remove a hardware device, you can stop it though.
109 return false; 109 return false;
110} 110}
111 111
112// wlanmodule.cpp 112void WLANModule::receive(const QCString &param, const QByteArray &arg)
113{
114 qDebug("WLANModule::receive "+param);
115 QStringList params = QStringList::split(",",param);
116 int count = params.count();
117 qDebug("got %i params", count );
118 if (count < 2){
119 qDebug("Erorr less than 2 parameter");
120 qDebug("RETURNING");
121 return;
122 }
123
124 QDataStream stream(arg,IO_ReadOnly);
125 QString interface;
126 QString action;
127
128 stream >> interface;
129 stream >> action;
130 qDebug("got interface %s and acion %s", interface.latin1(), action.latin1());
131
132 if (count == 2){
133 // those should call the interface
134 if ( action.contains("start" ) ){
135 qDebug("starting %s not yet implemented",interface.latin1());
136 } else if ( action.contains("restart" ) ){
137 qDebug("restarting %s not yet implemented",interface.latin1());
138 } else if ( action.contains("stop" ) ){
139 qDebug("stopping %s not yet implemented",interface.latin1());
140 }
141 }else if (count == 3){
142 QString value;
143 stream >> value;
144 qDebug("setting %s of %s to %s", action.latin1(), interface.latin1(), value.latin1() );
145 }
146 // if (param.contains("QString,QString,QString")) {
147// QDataStream stream(arg,IO_ReadOnly);
148// QString arg1, arg2, arg3;
149// stream >> arg1 >> arg2 >> arg3 ;
150// qDebug("interface >%s< setting >%s< value >%s<",arg1.latin1(),arg2.latin1(),arg3.latin1());
151// }
152}
113 153
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.h b/noncore/settings/networksettings/wlan/wlanmodule.h
index 3a54de6..a617a90 100644
--- a/noncore/settings/networksettings/wlan/wlanmodule.h
+++ b/noncore/settings/networksettings/wlan/wlanmodule.h
@@ -9,21 +9,24 @@ signals:
9 void updateInterface(Interface *i); 9 void updateInterface(Interface *i);
10 10
11public: 11public:
12 WLANModule(); 12 WLANModule();
13 ~WLANModule(); 13 ~WLANModule();
14 14
15
16 virtual const QString type() {return "wlan";};
15 void setProfile(const QString &newProfile); 17 void setProfile(const QString &newProfile);
16 bool isOwner(Interface *); 18 bool isOwner(Interface *);
17 QWidget *configure(Interface *i); 19 QWidget *configure(Interface *i);
18 QWidget *information(Interface *i); 20 QWidget *information(Interface *i);
19 QList<Interface> getInterfaces(); 21 QList<Interface> getInterfaces();
20 void possibleNewInterfaces(QMap<QString, QString> &){}; 22 void possibleNewInterfaces(QMap<QString, QString> &){};
21 Interface *addNewInterface(const QString &name); 23 Interface *addNewInterface(const QString &name);
22 bool remove(Interface* i); 24 bool remove(Interface* i);
23 QString getPixmapName(Interface* i); 25 QString getPixmapName(Interface* i);
26 virtual void receive(const QCString&, const QByteArray&);
24 27
25private: 28private:
26 QList<Interface> list; 29 QList<Interface> list;
27 QString profile; 30 QString profile;
28 31
29}; 32};