summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/wlan/wlanmodule.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/wlan/wlanmodule.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/wlan/wlanmodule.cpp42
1 files changed, 41 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
@@ -109,5 +109,45 @@ bool WLANModule::remove(Interface*){
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