author | tille <tille> | 2003-06-12 15:04:14 (UTC) |
---|---|---|
committer | tille <tille> | 2003-06-12 15:04:14 (UTC) |
commit | f0f9cf3fa486a577770e3c0e89280c66ea331e73 (patch) (unidiff) | |
tree | cdafae987efebf441b70a527a6e832333c1410e3 /noncore/settings/networksettings/wlan | |
parent | 65327026c2f26e28c76bf234f8b7943612b49b05 (diff) | |
download | opie-f0f9cf3fa486a577770e3c0e89280c66ea331e73.zip opie-f0f9cf3fa486a577770e3c0e89280c66ea331e73.tar.gz opie-f0f9cf3fa486a577770e3c0e89280c66ea331e73.tar.bz2 |
1st version of qcop call in oder to let wellenreiter copy the APs it found...
... and more later.
Diffstat (limited to 'noncore/settings/networksettings/wlan') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanmodule.cpp | 42 | ||||
-rw-r--r-- | noncore/settings/networksettings/wlan/wlanmodule.h | 3 |
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 | |||
@@ -109,5 +109,45 @@ bool WLANModule::remove(Interface*){ | |||
109 | return false; | 109 | return false; |
110 | } | 110 | } |
111 | 111 | ||
112 | // wlanmodule.cpp | 112 | void WLANModule::receive(const QCString ¶m, 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 | |||
@@ -12,6 +12,8 @@ public: | |||
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); |
@@ -21,6 +23,7 @@ public: | |||
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 | ||
25 | private: | 28 | private: |
26 | QList<Interface> list; | 29 | QList<Interface> list; |