summaryrefslogtreecommitdiffstats
path: root/lanbrowsing/kio_lan
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /lanbrowsing/kio_lan
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lanbrowsing/kio_lan')
-rw-r--r--lanbrowsing/kio_lan/kio_lan.cpp36
-rw-r--r--lanbrowsing/kio_lan/kio_lan.h24
2 files changed, 30 insertions, 30 deletions
diff --git a/lanbrowsing/kio_lan/kio_lan.cpp b/lanbrowsing/kio_lan/kio_lan.cpp
index 89de40da..c1d79695 100644
--- a/lanbrowsing/kio_lan/kio_lan.cpp
+++ b/lanbrowsing/kio_lan/kio_lan.cpp
@@ -28,7 +28,7 @@
#include <kglobal.h>
#include <kprocess.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <iostream>
#include <string.h>
@@ -87,7 +87,7 @@ int kdemain( int argc, char **argv )
return 0;
}
-LANProtocol::LANProtocol(int isLanIoslave, const QCString &pool, const QCString &app )
+LANProtocol::LANProtocol(int isLanIoslave, const TQCString &pool, const TQCString &app )
:TCPSlaveBase(7741,isLanIoslave?"lan":"rlan", pool, app)
,m_currentHost("")
,m_port(7741)
@@ -275,7 +275,7 @@ int LANProtocol::rlanReadDataFromServer()
sockaddr_un addr;
memset((char*)&addr,0,sizeof(addr));
addr.sun_family=AF_LOCAL;
- QCString socketname="/tmp/resLisa-";
+ TQCString socketname="/tmp/resLisa-";
struct passwd *user = getpwuid( getuid() );
if ( user )
@@ -441,11 +441,11 @@ int LANProtocol::rlanReadDataFromServer()
return 1;
}
-int LANProtocol::checkHost(const QString& host)
+int LANProtocol::checkHost(const TQString& host)
{
kdDebug(7101)<<"LAN::checkHost() "<<host<<endl;
- QString hostUpper=host.upper();
+ TQString hostUpper=host.upper();
HostInfo* hostInfo=m_hostInfoCache[hostUpper];
if (hostInfo!=0)
{
@@ -559,7 +559,7 @@ int LANProtocol::checkHost(const QString& host)
// by checking all the ports in '_ports', using a non-blocking connect.
// Right now -- assume if *any* of these ports are active,
// the service is active.
-int LANProtocol::checkPort( QValueVector<int>& _ports, in_addr ip )
+int LANProtocol::checkPort( TQValueVector<int>& _ports, in_addr ip )
{
int _port=0;
struct sockaddr_in to_scan;
@@ -567,7 +567,7 @@ int LANProtocol::checkPort( QValueVector<int>& _ports, in_addr ip )
to_scan.sin_family = AF_INET;
to_scan.sin_addr = ip;
- for (QValueVector<int>::iterator i= _ports.begin(); i != _ports.end(); i++)
+ for (TQValueVector<int>::iterator i= _ports.begin(); i != _ports.end(); i++)
{
_port=(*i);
kdDebug(7101)<<"LANProtocol::checkPort: "<<_port<<endl;
@@ -624,7 +624,7 @@ int LANProtocol::checkPort( QValueVector<int>& _ports, in_addr ip )
}
-void LANProtocol::setHost( const QString& host, int port, const QString& , const QString& )
+void LANProtocol::setHost( const TQString& host, int port, const TQString& , const TQString& )
{
if (m_isLanIoslave)
{
@@ -645,8 +645,8 @@ void LANProtocol::setHost( const QString& host, int port, const QString& , const
void LANProtocol::mimetype( const KURL& url)
{
kdDebug(7101)<<"LANProtocol::mimetype -"<<url.prettyURL()<<"-"<<endl;
- QString path( QFile::encodeName(url.path()));
- QStringList pathList=QStringList::split( "/",path);
+ TQString path( TQFile::encodeName(url.path()));
+ TQStringList pathList=TQStringList::split( "/",path);
if ((pathList.count()==2) && (pathList[1].upper()=="HTTP"))
{
//kdDebug(7101)<<"LANProtocol::mimeType text/html"<<endl;
@@ -663,7 +663,7 @@ void LANProtocol::mimetype( const KURL& url)
void LANProtocol::listDir( const KURL& _url)
{
KURL url(_url);
- QString path( QFile::encodeName(url.path()));
+ TQString path( TQFile::encodeName(url.path()));
if (path.isEmpty())
{
url.setPath("/");
@@ -679,9 +679,9 @@ void LANProtocol::listDir( const KURL& _url)
return;
}
kdDebug(7101)<<"LANProtocol::listDir: host: "<<m_currentHost<<" port: "<<m_port<<" path: "<<path<<endl;
- QStringList pathList=QStringList::split("/", path);
+ TQStringList pathList=TQStringList::split("/", path);
kdDebug(7101)<<"parts are: "<<endl;
- for (QStringList::Iterator it=pathList.begin(); it !=pathList.end(); it++)
+ for (TQStringList::Iterator it=pathList.begin(); it !=pathList.end(); it++)
kdDebug(7101)<<"-"<<(*it)<<"-"<<endl;
if (pathList.count()>2)
{
@@ -745,8 +745,8 @@ void LANProtocol::stat( const KURL & url)
entry.append(atom);
- QString path( QFile::encodeName(url.path()));
- QStringList pathList=QStringList::split( "/",path);
+ TQString path( TQFile::encodeName(url.path()));
+ TQStringList pathList=TQStringList::split( "/",path);
if ((pathList.count()==2) && (pathList[1].upper()=="HTTP"))
{
atom.m_uds = KIO::UDS_FILE_TYPE;
@@ -774,12 +774,12 @@ void LANProtocol::stat( const KURL & url)
void LANProtocol::get(const KURL& url )
{
- QString path(QFile::encodeName(url.path()));
+ TQString path(TQFile::encodeName(url.path()));
kdDebug(7101)<<"LANProtocol::get: "<<path<<endl;
- QStringList pathList=QStringList::split("/", path);
+ TQStringList pathList=TQStringList::split("/", path);
kdDebug(7101)<<"parts are: "<<endl;
- for (QStringList::Iterator it=pathList.begin(); it !=pathList.end(); it++)
+ for (TQStringList::Iterator it=pathList.begin(); it !=pathList.end(); it++)
kdDebug(7101)<<"-"<<(*it)<<"-"<<endl;
if ((pathList.count()!=2) || (pathList[1].upper()!="HTTP"))
{
diff --git a/lanbrowsing/kio_lan/kio_lan.h b/lanbrowsing/kio_lan/kio_lan.h
index 9afecceb..1969700f 100644
--- a/lanbrowsing/kio_lan/kio_lan.h
+++ b/lanbrowsing/kio_lan/kio_lan.h
@@ -24,10 +24,10 @@
#include <kio/tcpslavebase.h>
#include <kio/global.h>
-#include <qvaluevector.h>
-#include <qcstring.h>
-#include <qstring.h>
-#include <qdict.h>
+#include <tqvaluevector.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqdict.h>
#include <arpa/inet.h>
#include <sys/types.h>
@@ -44,7 +44,7 @@
struct MyProtocolInfo
{
int enabled;
- QValueVector<int> ports;
+ TQValueVector<int> ports;
//this should be large enough for things like "FTP" and so on
char name[NAMELEN];
};
@@ -58,10 +58,10 @@ struct HostInfo
class LANProtocol : public KIO::TCPSlaveBase
{
public:
- LANProtocol (int isLanIoSlave, const QCString &pool, const QCString &app );
+ LANProtocol (int isLanIoSlave, const TQCString &pool, const TQCString &app );
virtual ~LANProtocol();
- virtual void setHost( const QString& host, int port, const QString& user, const QString& pass );
+ virtual void setHost( const TQString& host, int port, const TQString& user, const TQString& pass );
virtual void mimetype( const KURL& );
virtual void listDir( const KURL& url);
@@ -69,19 +69,19 @@ class LANProtocol : public KIO::TCPSlaveBase
virtual void get( const KURL& url );
protected:
- QDict<HostInfo> m_hostInfoCache;
+ TQDict<HostInfo> m_hostInfoCache;
int readDataFromServer();
int lanReadDataFromServer();
int rlanReadDataFromServer();
- int checkHost(const QString& host);
- int checkPort(QValueVector<int>& _ports, in_addr ip);
- QString m_currentHost;
+ int checkHost(const TQString& host);
+ int checkPort(TQValueVector<int>& _ports, in_addr ip);
+ TQString m_currentHost;
unsigned short int m_port;
MyProtocolInfo m_protocolInfo[KIOLAN_MAX];
int m_maxAge;
bool m_isLanIoslave;
bool m_shortHostnames;
- QString m_defaultLisaHost;
+ TQString m_defaultLisaHost;
};
#endif