summaryrefslogtreecommitdiffstats
path: root/wifi/interface_wireless_wirelessextensions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'wifi/interface_wireless_wirelessextensions.cpp')
-rw-r--r--wifi/interface_wireless_wirelessextensions.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/wifi/interface_wireless_wirelessextensions.cpp b/wifi/interface_wireless_wirelessextensions.cpp
index 874eefb3..878b9460 100644
--- a/wifi/interface_wireless_wirelessextensions.cpp
+++ b/wifi/interface_wireless_wirelessextensions.cpp
@@ -17,9 +17,9 @@
#include "interface_wireless_wirelessextensions.h"
#include <iwlib.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qtable.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtable.h>
#include <kmessagebox.h>
@@ -40,7 +40,7 @@
#include <kstandarddirs.h>
#include <kprocio.h>
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@ -79,7 +79,7 @@
/* ================================== FROM IWCONFIG.C ================================== */
int
-Interface_wireless_wirelessextensions::get_info (int skfd, const QString& interface,
+Interface_wireless_wirelessextensions::get_info (int skfd, const TQString& interface,
struct wireless_info& info)
{
struct iwreq wrq;
@@ -248,7 +248,7 @@ Interface_wireless_wirelessextensions::get_info (int skfd, const QString& interf
/* ================================ END IWCONFIG.C ================================ */
-Interface_wireless_wirelessextensions::Interface_wireless_wirelessextensions (QStringList * ignoreInterfaces)
+Interface_wireless_wirelessextensions::Interface_wireless_wirelessextensions (TQStringList * ignoreInterfaces)
: Interface_wireless(ignoreInterfaces)
{
}
@@ -261,7 +261,7 @@ bool Interface_wireless_wirelessextensions::isSocketOpen()
return (socket > 0);
}
-void Interface_wireless_wirelessextensions::setActiveDevice( QString device )
+void Interface_wireless_wirelessextensions::setActiveDevice( TQString device )
{
kdDebug () << "activating wireless device " << device << endl;
interface_name = device;
@@ -287,30 +287,30 @@ void Interface_wireless_wirelessextensions::setNoActiveDevice( )
has_mode = false;
mode = 0;
has_key = 0;
- key = QString::null;
+ key = TQString::null;
key_size = 0;
key_flags = 0;
- essid = QString::null;
- access_point_address = QString::null;
- ip_address = QString::null;
+ essid = TQString::null;
+ access_point_address = TQString::null;
+ ip_address = TQString::null;
bitrate = 0;
has_range = false;
has_txpower = false;
txpower_disabled = 0;
// propagate the changes
- setActiveDevice( QString::null );
+ setActiveDevice( TQString::null );
}
-QStringList Interface_wireless_wirelessextensions::available_wifi_devices()
+TQStringList Interface_wireless_wirelessextensions::available_wifi_devices()
{
- QFile procnetdev(PROC_NET_DEV);
+ TQFile procnetdev(PROC_NET_DEV);
procnetdev.open (IO_ReadOnly);
kdDebug () << "Autodetecting..." << endl;
- QStringList liste;
- QString device;
+ TQStringList liste;
+ TQString device;
while (!procnetdev.atEnd()) {
procnetdev.readLine (device, 9999);
int pos = device.find (':');
@@ -344,11 +344,11 @@ bool Interface_wireless_wirelessextensions::autodetect_device()
if (!isSocketOpen())
return false;
- QStringList liste = available_wifi_devices();
+ TQStringList liste = available_wifi_devices();
- for (QStringList::Iterator it = liste.begin (); it != liste.end (); ++it)
+ for (TQStringList::Iterator it = liste.begin (); it != liste.end (); ++it)
{
- QString device = *it;
+ TQString device = *it;
kdDebug () << "[ " << device << " ] " << endl;
wireless_info info;
int result = get_info (socket, device, info);
@@ -499,9 +499,9 @@ bool Interface_wireless_wirelessextensions::poll_device_info ()
if (sa->sa_family == AF_INET)
{
sin = (struct sockaddr_in *) sa;
- if (ip_address != (QString) inet_ntoa (sin->sin_addr))
+ if (ip_address != (TQString) inet_ntoa (sin->sin_addr))
emitStatusChanged = true;
- ip_address = (QString) inet_ntoa (sin->sin_addr);
+ ip_address = (TQString) inet_ntoa (sin->sin_addr);
}
else
{
@@ -521,17 +521,17 @@ bool Interface_wireless_wirelessextensions::poll_device_info ()
return true;
}
-QTable* Interface_wireless_wirelessextensions::get_available_networks ()
+TQTable* Interface_wireless_wirelessextensions::get_available_networks ()
{
- networks = new QTable(0,4,0);
+ networks = new TQTable(0,4,0);
networks->horizontalHeader()->setLabel( 0, i18n("Network Name") );
networks->horizontalHeader()->setLabel( 1, i18n("Mode") );
networks->horizontalHeader()->setLabel( 2, i18n("Quality") );
networks->horizontalHeader()->setLabel( 3, i18n("WEP") );
KProcIO *iwlist = new KProcIO;
- QString iwlist_bin = KStandardDirs::findExe("iwlist");
+ TQString iwlist_bin = KStandardDirs::findExe("iwlist");
if(iwlist_bin.isEmpty())
iwlist_bin = KStandardDirs::findExe("iwlist", "/usr/local/sbin:/usr/sbin:/sbin");
if(iwlist_bin.isEmpty())
@@ -539,7 +539,7 @@ QTable* Interface_wireless_wirelessextensions::get_available_networks ()
*iwlist << iwlist_bin << interface_name << "scanning";
-// connect ( iwlist, SIGNAL ( readReady ( KProcIO * ) ), this, SLOT ( parseScanData ( KProcIO * ) ) );
+// connect ( iwlist, TQT_SIGNAL ( readReady ( KProcIO * ) ), this, TQT_SLOT ( parseScanData ( KProcIO * ) ) );
if ( !iwlist->start ( KProcess::Block ) )
KMessageBox::sorry ( 0, i18n ( "Unable to perform the scan. Please make sure the executable \"iwlist\" is in your $PATH." ),
@@ -558,7 +558,7 @@ QTable* Interface_wireless_wirelessextensions::get_available_networks ()
void
Interface_wireless_wirelessextensions::parseScanData ( KProcIO * iwlist )
{
- QString data;
+ TQString data;
int cellcount = 0, iteratecount = 0;
bool ignoreRemainingBits = false;
while ( iwlist->readln ( data, true ) >= 0 )
@@ -578,16 +578,16 @@ Interface_wireless_wirelessextensions::parseScanData ( KProcIO * iwlist )
}
if ( data.contains ( "ESSID:" ) )
{
- QString ssid = data.mid ( data.find ( "\"" ) + 1, data.length ( ) - data.find ( "\"" ) - 2 );
+ TQString ssid = data.mid ( data.find ( "\"" ) + 1, data.length ( ) - data.find ( "\"" ) - 2 );
if ((ssid=="") || (ssid==" ")) ssid = "(hidden cell)";
networks->setText ( cellcount - 1, 0, ssid );
}
if ( data.contains ( "Mode:" ) )
{
if ( data.contains ( "Master" ) )
- networks->setText ( cellcount - 1, 1, QString ( i18n ( "Managed" ) ) );
+ networks->setText ( cellcount - 1, 1, TQString ( i18n ( "Managed" ) ) );
if ( data.contains ( "Ad-Hoc" ) )
- networks->setText ( cellcount - 1, 1, QString ( i18n ( "Ad-Hoc" ) ) );
+ networks->setText ( cellcount - 1, 1, TQString ( i18n ( "Ad-Hoc" ) ) );
// if could be that this cell belongs to an SSID already discovered, or that there are more than one
// hidden cells, which doesn't give any new information. So, we first search for duplicates and delete
// this row if it's a duplicate. If the same SSID is there once as Managed and once as Ad-Hoc it is no
@@ -608,30 +608,30 @@ Interface_wireless_wirelessextensions::parseScanData ( KProcIO * iwlist )
if ( !ignoreRemainingBits && data.contains ( "Encryption key:" ) )
{
if ( data.contains ( "off" ) )
- networks->setText ( cellcount - 1, 3, QString ( "off" ) );
+ networks->setText ( cellcount - 1, 3, TQString ( "off" ) );
else
- networks->setText ( cellcount - 1, 3, QString ( "on" ) );
+ networks->setText ( cellcount - 1, 3, TQString ( "on" ) );
}
if ( !ignoreRemainingBits && data.contains ( "Quality:" ) )
{
- QString quality = data.mid ( data.find ( ":" ) + 1, data.find ( "/" ) - data.find ( ":" ) - 1 );
+ TQString quality = data.mid ( data.find ( ":" ) + 1, data.find ( "/" ) - data.find ( ":" ) - 1 );
networks->setText ( cellcount - 1, 2, quality );
}
if ( !ignoreRemainingBits && data.contains ( "Quality=" ) )
{
- QString quality = data.mid ( data.find ( "=" ) + 1, data.find ( "/" ) - data.find ( "=" ) - 1 );
+ TQString quality = data.mid ( data.find ( "=" ) + 1, data.find ( "/" ) - data.find ( "=" ) - 1 );
networks->setText ( cellcount - 1, 2, quality );
}
if ( !ignoreRemainingBits && data.contains ( "wpa_ie" ) )
{
- networks->setText ( cellcount - 1, 3, QString ( "WPA" ) );
+ networks->setText ( cellcount - 1, 3, TQString ( "WPA" ) );
}
if ( !ignoreRemainingBits && data.contains ( "rsn_ie" ) )
{
- networks->setText ( cellcount - 1, 3, QString ( "WPA2" ) );
+ networks->setText ( cellcount - 1, 3, TQString ( "WPA2" ) );
}
}