summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/jabber/libiris
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 /kopete/protocols/jabber/libiris
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 'kopete/protocols/jabber/libiris')
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp74
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h20
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp68
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h10
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp158
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h22
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp68
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/ndns.h24
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp12
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/servsock.h6
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp234
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/socks.h46
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp70
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h14
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/base64.cpp36
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/base64.h12
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/bytestream.cpp34
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/bytestream.h28
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/cipher.cpp68
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/cipher.h24
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/qrandom.cpp6
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/qrandom.h4
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/safedelete.cpp16
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/safedelete.h16
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp16
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/sha1.h8
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.cpp32
-rw-r--r--kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.h4
-rw-r--r--kopete/protocols/jabber/libiris/iris/include/im.h388
-rw-r--r--kopete/protocols/jabber/libiris/iris/include/xmpp.h224
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp190
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h34
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp386
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/s5b.h112
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp134
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h58
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.cpp34
-rw-r--r--kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h10
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp88
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp8
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp102
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp174
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h32
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp322
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h132
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h92
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp116
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h24
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp122
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp298
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/td.h12
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp24
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp108
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h54
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp304
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp414
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp406
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h114
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp294
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.h178
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp176
-rw-r--r--kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h60
-rw-r--r--kopete/protocols/jabber/libiris/qca/src/qca.cpp298
-rw-r--r--kopete/protocols/jabber/libiris/qca/src/qca.h150
-rw-r--r--kopete/protocols/jabber/libiris/qca/src/qcaprovider.h92
65 files changed, 3447 insertions, 3447 deletions
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp
index 75b1fe2a..33c5ec8a 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.cpp
@@ -1,5 +1,5 @@
/*
- * bsocket.cpp - QSocket wrapper based on Bytestream with SRV DNS support
+ * bsocket.cpp - TQSocket wrapper based on Bytestream with SRV DNS support
* Copyright (C) 2003 Justin Karneges
*
* This library is free software; you can redistribute it and/or
@@ -20,10 +20,10 @@
#include"bsocket.h"
-#include<qcstring.h>
-#include<qsocket.h>
-#include<qdns.h>
-#include<qguardedptr.h>
+#include<tqcstring.h>
+#include<tqsocket.h>
+#include<tqdns.h>
+#include<tqguardedptr.h>
#include"safedelete.h"
#ifndef NO_NDNS
#include"ndns.h"
@@ -46,26 +46,26 @@ public:
qsock = 0;
}
- QSocket *qsock;
+ TQSocket *qsock;
int state;
#ifndef NO_NDNS
NDns ndns;
#endif
SrvResolver srv;
- QString host;
+ TQString host;
int port;
SafeDelete sd;
};
-BSocket::BSocket(QObject *parent)
+BSocket::BSocket(TQObject *parent)
:ByteStream(parent)
{
d = new Private;
#ifndef NO_NDNS
- connect(&d->ndns, SIGNAL(resultsReady()), SLOT(ndns_done()));
+ connect(&d->ndns, TQT_SIGNAL(resultsReady()), TQT_SLOT(ndns_done()));
#endif
- connect(&d->srv, SIGNAL(resultsReady()), SLOT(srv_done()));
+ connect(&d->srv, TQT_SIGNAL(resultsReady()), TQT_SLOT(srv_done()));
reset();
}
@@ -83,7 +83,7 @@ void BSocket::reset(bool clear)
if(!clear && d->qsock->isOpen()) {
// move remaining into the local queue
- QByteArray block(d->qsock->bytesAvailable());
+ TQByteArray block(d->qsock->bytesAvailable());
d->qsock->readBlock(block.data(), block.size());
appendRead(block);
}
@@ -112,17 +112,17 @@ void BSocket::ensureSocket()
#if QT_VERSION >= 0x030200
d->qsock->setReadBufferSize(READBUFSIZE);
#endif
- connect(d->qsock, SIGNAL(hostFound()), SLOT(qs_hostFound()));
- connect(d->qsock, SIGNAL(connected()), SLOT(qs_connected()));
- connect(d->qsock, SIGNAL(connectionClosed()), SLOT(qs_connectionClosed()));
- connect(d->qsock, SIGNAL(delayedCloseFinished()), SLOT(qs_delayedCloseFinished()));
- connect(d->qsock, SIGNAL(readyRead()), SLOT(qs_readyRead()));
- connect(d->qsock, SIGNAL(bytesWritten(int)), SLOT(qs_bytesWritten(int)));
- connect(d->qsock, SIGNAL(error(int)), SLOT(qs_error(int)));
+ connect(d->qsock, TQT_SIGNAL(hostFound()), TQT_SLOT(qs_hostFound()));
+ connect(d->qsock, TQT_SIGNAL(connected()), TQT_SLOT(qs_connected()));
+ connect(d->qsock, TQT_SIGNAL(connectionClosed()), TQT_SLOT(qs_connectionClosed()));
+ connect(d->qsock, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(qs_delayedCloseFinished()));
+ connect(d->qsock, TQT_SIGNAL(readyRead()), TQT_SLOT(qs_readyRead()));
+ connect(d->qsock, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(qs_bytesWritten(int)));
+ connect(d->qsock, TQT_SIGNAL(error(int)), TQT_SLOT(qs_error(int)));
}
}
-void BSocket::connectToHost(const QString &host, Q_UINT16 port)
+void BSocket::connectToHost(const TQString &host, Q_UINT16 port)
{
reset(true);
d->host = host;
@@ -136,7 +136,7 @@ void BSocket::connectToHost(const QString &host, Q_UINT16 port)
#endif
}
-void BSocket::connectToServer(const QString &srv, const QString &type)
+void BSocket::connectToServer(const TQString &srv, const TQString &type)
{
reset(true);
d->state = HostLookup;
@@ -188,23 +188,23 @@ void BSocket::close()
}
}
-void BSocket::write(const QByteArray &a)
+void BSocket::write(const TQByteArray &a)
{
if(d->state != Connected)
return;
#ifdef BS_DEBUG
- QCString cs;
+ TQCString cs;
cs.resize(a.size()+1);
memcpy(cs.data(), a.data(), a.size());
- QString s = QString::fromUtf8(cs);
+ TQString s = TQString::fromUtf8(cs);
fprintf(stderr, "BSocket: writing [%d]: {%s}\n", a.size(), cs.data());
#endif
d->qsock->writeBlock(a.data(), a.size());
}
-QByteArray BSocket::read(int bytes)
+TQByteArray BSocket::read(int bytes)
{
- QByteArray block;
+ TQByteArray block;
if(d->qsock) {
int max = bytesAvailable();
if(bytes <= 0 || bytes > max)
@@ -216,10 +216,10 @@ QByteArray BSocket::read(int bytes)
block = ByteStream::read(bytes);
#ifdef BS_DEBUG
- QCString cs;
+ TQCString cs;
cs.resize(block.size()+1);
memcpy(cs.data(), block.data(), block.size());
- QString s = QString::fromUtf8(cs);
+ TQString s = TQString::fromUtf8(cs);
fprintf(stderr, "BSocket: read [%d]: {%s}\n", block.size(), s.latin1());
#endif
return block;
@@ -240,12 +240,12 @@ int BSocket::bytesToWrite() const
return d->qsock->bytesToWrite();
}
-QHostAddress BSocket::address() const
+TQHostAddress BSocket::address() const
{
if(d->qsock)
return d->qsock->address();
else
- return QHostAddress();
+ return TQHostAddress();
}
Q_UINT16 BSocket::port() const
@@ -256,12 +256,12 @@ Q_UINT16 BSocket::port() const
return 0;
}
-QHostAddress BSocket::peerAddress() const
+TQHostAddress BSocket::peerAddress() const
{
if(d->qsock)
return d->qsock->peerAddress();
else
- return QHostAddress();
+ return TQHostAddress();
}
Q_UINT16 BSocket::peerPort() const
@@ -285,7 +285,7 @@ void BSocket::srv_done()
d->host = d->srv.resultAddress().toString();
d->port = d->srv.resultPort();
do_connect();
- //QTimer::singleShot(0, this, SLOT(do_connect()));
+ //TQTimer::singleShot(0, this, TQT_SLOT(do_connect()));
//hostFound();
}
@@ -296,7 +296,7 @@ void BSocket::ndns_done()
d->host = d->ndns.resultString();
d->state = Connecting;
do_connect();
- //QTimer::singleShot(0, this, SLOT(do_connect()));
+ //TQTimer::singleShot(0, this, TQT_SLOT(do_connect()));
//hostFound();
}
else {
@@ -375,17 +375,17 @@ void BSocket::qs_error(int x)
SafeDeleteLock s(&d->sd);
// connection error during SRV host connect? try next
- if(d->state == HostLookup && (x == QSocket::ErrConnectionRefused || x == QSocket::ErrHostNotFound)) {
+ if(d->state == HostLookup && (x == TQSocket::ErrConnectionRefused || x == TQSocket::ErrHostNotFound)) {
d->srv.next();
return;
}
reset();
- if(x == QSocket::ErrConnectionRefused)
+ if(x == TQSocket::ErrConnectionRefused)
error(ErrConnectionRefused);
- else if(x == QSocket::ErrHostNotFound)
+ else if(x == TQSocket::ErrHostNotFound)
error(ErrHostNotFound);
- else if(x == QSocket::ErrSocketRead)
+ else if(x == TQSocket::ErrSocketRead)
error(ErrRead);
}
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h b/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h
index f51b3470..7887b9c0 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/bsocket.h
@@ -1,5 +1,5 @@
/*
- * bsocket.h - QSocket wrapper based on Bytestream with SRV DNS support
+ * bsocket.h - TQSocket wrapper based on Bytestream with SRV DNS support
* Copyright (C) 2003 Justin Karneges
*
* This library is free software; you can redistribute it and/or
@@ -21,8 +21,8 @@
#ifndef CS_BSOCKET_H
#define CS_BSOCKET_H
-#include<qobject.h>
-#include<qhostaddress.h>
+#include<tqobject.h>
+#include<tqhostaddress.h>
#include"bytestream.h"
// CS_NAMESPACE_BEGIN
@@ -33,11 +33,11 @@ class BSocket : public ByteStream
public:
enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound };
enum State { Idle, HostLookup, Connecting, Connected, Closing };
- BSocket(QObject *parent=0);
+ BSocket(TQObject *parent=0);
~BSocket();
- void connectToHost(const QString &host, Q_UINT16 port);
- void connectToServer(const QString &srv, const QString &type);
+ void connectToHost(const TQString &host, Q_UINT16 port);
+ void connectToServer(const TQString &srv, const TQString &type);
int socket() const;
void setSocket(int);
int state() const;
@@ -45,17 +45,17 @@ public:
// from ByteStream
bool isOpen() const;
void close();
- void write(const QByteArray &);
- QByteArray read(int bytes=0);
+ void write(const TQByteArray &);
+ TQByteArray read(int bytes=0);
int bytesAvailable() const;
int bytesToWrite() const;
// local
- QHostAddress address() const;
+ TQHostAddress address() const;
Q_UINT16 port() const;
// remote
- QHostAddress peerAddress() const;
+ TQHostAddress peerAddress() const;
Q_UINT16 peerPort() const;
signals:
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp
index 76550db0..6abeb556 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.cpp
@@ -20,7 +20,7 @@
#include"httpconnect.h"
-#include<qstringlist.h>
+#include<tqstringlist.h>
#include"bsocket.h"
#include"base64.h"
@@ -30,20 +30,20 @@
// CS_NAMESPACE_BEGIN
-static QString extractLine(QByteArray *buf, bool *found)
+static TQString extractLine(TQByteArray *buf, bool *found)
{
// scan for newline
int n;
for(n = 0; n < (int)buf->size()-1; ++n) {
if(buf->at(n) == '\r' && buf->at(n+1) == '\n') {
- QCString cstr;
+ TQCString cstr;
cstr.resize(n+1);
memcpy(cstr.data(), buf->data(), n);
n += 2; // hack off CR/LF
memmove(buf->data(), buf->data() + n, buf->size() - n);
buf->resize(buf->size() - n);
- QString s = QString::fromUtf8(cstr);
+ TQString s = TQString::fromUtf8(cstr);
if(found)
*found = true;
@@ -56,7 +56,7 @@ static QString extractLine(QByteArray *buf, bool *found)
return "";
}
-static bool extractMainHeader(const QString &line, QString *proto, int *code, QString *msg)
+static bool extractMainHeader(const TQString &line, TQString *proto, int *code, TQString *msg)
{
int n = line.find(' ');
if(n == -1)
@@ -81,31 +81,31 @@ public:
Private() {}
BSocket sock;
- QString host;
+ TQString host;
int port;
- QString user, pass;
- QString real_host;
+ TQString user, pass;
+ TQString real_host;
int real_port;
- QByteArray recvBuf;
+ TQByteArray recvBuf;
bool inHeader;
- QStringList headerLines;
+ TQStringList headerLines;
int toWrite;
bool active;
};
-HttpConnect::HttpConnect(QObject *parent)
+HttpConnect::HttpConnect(TQObject *parent)
:ByteStream(parent)
{
d = new Private;
- connect(&d->sock, SIGNAL(connected()), SLOT(sock_connected()));
- connect(&d->sock, SIGNAL(connectionClosed()), SLOT(sock_connectionClosed()));
- connect(&d->sock, SIGNAL(delayedCloseFinished()), SLOT(sock_delayedCloseFinished()));
- connect(&d->sock, SIGNAL(readyRead()), SLOT(sock_readyRead()));
- connect(&d->sock, SIGNAL(bytesWritten(int)), SLOT(sock_bytesWritten(int)));
- connect(&d->sock, SIGNAL(error(int)), SLOT(sock_error(int)));
+ connect(&d->sock, TQT_SIGNAL(connected()), TQT_SLOT(sock_connected()));
+ connect(&d->sock, TQT_SIGNAL(connectionClosed()), TQT_SLOT(sock_connectionClosed()));
+ connect(&d->sock, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(sock_delayedCloseFinished()));
+ connect(&d->sock, TQT_SIGNAL(readyRead()), TQT_SLOT(sock_readyRead()));
+ connect(&d->sock, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sock_bytesWritten(int)));
+ connect(&d->sock, TQT_SIGNAL(error(int)), TQT_SLOT(sock_error(int)));
reset(true);
}
@@ -127,13 +127,13 @@ void HttpConnect::reset(bool clear)
d->active = false;
}
-void HttpConnect::setAuth(const QString &user, const QString &pass)
+void HttpConnect::setAuth(const TQString &user, const TQString &pass)
{
d->user = user;
d->pass = pass;
}
-void HttpConnect::connectToHost(const QString &proxyHost, int proxyPort, const QString &host, int port)
+void HttpConnect::connectToHost(const TQString &proxyHost, int proxyPort, const TQString &host, int port)
{
reset(true);
@@ -164,13 +164,13 @@ void HttpConnect::close()
reset();
}
-void HttpConnect::write(const QByteArray &buf)
+void HttpConnect::write(const TQByteArray &buf)
{
if(d->active)
d->sock.write(buf);
}
-QByteArray HttpConnect::read(int bytes)
+TQByteArray HttpConnect::read(int bytes)
{
return ByteStream::read(bytes);
}
@@ -197,18 +197,18 @@ void HttpConnect::sock_connected()
d->headerLines.clear();
// connected, now send the request
- QString s;
- s += QString("CONNECT ") + d->real_host + ':' + QString::number(d->real_port) + " HTTP/1.0\r\n";
+ TQString s;
+ s += TQString("CONNECT ") + d->real_host + ':' + TQString::number(d->real_port) + " HTTP/1.0\r\n";
if(!d->user.isEmpty()) {
- QString str = d->user + ':' + d->pass;
- s += QString("Proxy-Authorization: Basic ") + Base64::encodeString(str) + "\r\n";
+ TQString str = d->user + ':' + d->pass;
+ s += TQString("Proxy-Authorization: Basic ") + Base64::encodeString(str) + "\r\n";
}
s += "Proxy-Connection: Keep-Alive\r\n";
s += "Pragma: no-cache\r\n";
s += "\r\n";
- QCString cs = s.utf8();
- QByteArray block(cs.length());
+ TQCString cs = s.utf8();
+ TQByteArray block(cs.length());
memcpy(block.data(), cs.data(), block.size());
d->toWrite = block.size();
d->sock.write(block);
@@ -235,7 +235,7 @@ void HttpConnect::sock_delayedCloseFinished()
void HttpConnect::sock_readyRead()
{
- QByteArray block = d->sock.read();
+ TQByteArray block = d->sock.read();
if(!d->active) {
ByteStream::appendArray(&d->recvBuf, block);
@@ -244,7 +244,7 @@ void HttpConnect::sock_readyRead()
// grab available lines
while(1) {
bool found;
- QString line = extractLine(&d->recvBuf, &found);
+ TQString line = extractLine(&d->recvBuf, &found);
if(!found)
break;
if(line.isEmpty()) {
@@ -256,12 +256,12 @@ void HttpConnect::sock_readyRead()
// done with grabbing the header?
if(!d->inHeader) {
- QString str = d->headerLines.first();
+ TQString str = d->headerLines.first();
d->headerLines.remove(d->headerLines.begin());
- QString proto;
+ TQString proto;
int code;
- QString msg;
+ TQString msg;
if(!extractMainHeader(str, &proto, &code, &msg)) {
#ifdef PROX_DEBUG
fprintf(stderr, "HttpConnect: invalid header!\n");
@@ -273,7 +273,7 @@ void HttpConnect::sock_readyRead()
else {
#ifdef PROX_DEBUG
fprintf(stderr, "HttpConnect: header proto=[%s] code=[%d] msg=[%s]\n", proto.latin1(), code, msg.latin1());
- for(QStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it)
+ for(TQStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it)
fprintf(stderr, "HttpConnect: * [%s]\n", (*it).latin1());
#endif
}
@@ -294,7 +294,7 @@ void HttpConnect::sock_readyRead()
}
else {
int err;
- QString errStr;
+ TQString errStr;
if(code == 407) { // Authentication failed
err = ErrProxyAuth;
errStr = tr("Authentication failed");
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h b/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h
index e383969b..2acef809 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/httpconnect.h
@@ -30,17 +30,17 @@ class HttpConnect : public ByteStream
Q_OBJECT
public:
enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth };
- HttpConnect(QObject *parent=0);
+ HttpConnect(TQObject *parent=0);
~HttpConnect();
- void setAuth(const QString &user, const QString &pass="");
- void connectToHost(const QString &proxyHost, int proxyPort, const QString &host, int port);
+ void setAuth(const TQString &user, const TQString &pass="");
+ void connectToHost(const TQString &proxyHost, int proxyPort, const TQString &host, int port);
// from ByteStream
bool isOpen() const;
void close();
- void write(const QByteArray &);
- QByteArray read(int bytes=0);
+ void write(const TQByteArray &);
+ TQByteArray read(int bytes=0);
int bytesAvailable() const;
int bytesToWrite() const;
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp
index 605d44e9..3a182457 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.cpp
@@ -20,10 +20,10 @@
#include"httppoll.h"
-#include<qstringlist.h>
-#include<qurl.h>
-#include<qtimer.h>
-#include<qguardedptr.h>
+#include<tqstringlist.h>
+#include<tqurl.h>
+#include<tqtimer.h>
+#include<tqguardedptr.h>
#include<qca.h>
#include<stdlib.h>
#include"bsocket.h"
@@ -37,9 +37,9 @@
// CS_NAMESPACE_BEGIN
-static QByteArray randomArray(int size)
+static TQByteArray randomArray(int size)
{
- QByteArray a(size);
+ TQByteArray a(size);
for(int n = 0; n < size; ++n)
a[n] = (char)(256.0*rand()/(RAND_MAX+1.0));
return a;
@@ -48,12 +48,12 @@ static QByteArray randomArray(int size)
//----------------------------------------------------------------------------
// HttpPoll
//----------------------------------------------------------------------------
-static QString hpk(int n, const QString &s)
+static TQString hpk(int n, const TQString &s)
{
if(n == 0)
return s;
else
- return Base64::arrayToString( QCA::SHA1::hash( QCString(hpk(n - 1, s).latin1()) ) );
+ return Base64::arrayToString( QCA::SHA1::hash( TQCString(hpk(n - 1, s).latin1()) ) );
}
class HttpPoll::Private
@@ -62,37 +62,37 @@ public:
Private() {}
HttpProxyPost http;
- QString host;
+ TQString host;
int port;
- QString user, pass;
- QString url;
+ TQString user, pass;
+ TQString url;
bool use_proxy;
- QByteArray out;
+ TQByteArray out;
int state;
bool closing;
- QString ident;
+ TQString ident;
- QTimer *t;
+ TQTimer *t;
- QString key[POLL_KEYS];
+ TQString key[POLL_KEYS];
int key_n;
int polltime;
};
-HttpPoll::HttpPoll(QObject *parent)
+HttpPoll::HttpPoll(TQObject *parent)
:ByteStream(parent)
{
d = new Private;
d->polltime = 30;
d->t = new QTimer;
- connect(d->t, SIGNAL(timeout()), SLOT(do_sync()));
+ connect(d->t, TQT_SIGNAL(timeout()), TQT_SLOT(do_sync()));
- connect(&d->http, SIGNAL(result()), SLOT(http_result()));
- connect(&d->http, SIGNAL(error(int)), SLOT(http_error(int)));
+ connect(&d->http, TQT_SIGNAL(result()), TQT_SLOT(http_result()));
+ connect(&d->http, TQT_SIGNAL(error(int)), TQT_SLOT(http_error(int)));
reset(true);
}
@@ -117,18 +117,18 @@ void HttpPoll::reset(bool clear)
d->t->stop();
}
-void HttpPoll::setAuth(const QString &user, const QString &pass)
+void HttpPoll::setAuth(const TQString &user, const TQString &pass)
{
d->user = user;
d->pass = pass;
}
-void HttpPoll::connectToUrl(const QString &url)
+void HttpPoll::connectToUrl(const TQString &url)
{
connectToHost("", 0, url);
}
-void HttpPoll::connectToHost(const QString &proxyHost, int proxyPort, const QString &url)
+void HttpPoll::connectToHost(const TQString &proxyHost, int proxyPort, const TQString &url)
{
reset(true);
@@ -140,7 +140,7 @@ void HttpPoll::connectToHost(const QString &proxyHost, int proxyPort, const QStr
d->use_proxy = true;
}
else {
- QUrl u = url;
+ TQUrl u = url;
d->host = u.host();
if(u.hasPort())
d->port = u.port();
@@ -152,7 +152,7 @@ void HttpPoll::connectToHost(const QString &proxyHost, int proxyPort, const QStr
resetKey();
bool last;
- QString key = getKey(&last);
+ TQString key = getKey(&last);
#ifdef PROX_DEBUG
fprintf(stderr, "HttpPoll: Connecting to %s:%d [%s]", d->host.latin1(), d->port, d->url.latin1());
@@ -161,19 +161,19 @@ void HttpPoll::connectToHost(const QString &proxyHost, int proxyPort, const QStr
else
fprintf(stderr, ", auth {%s,%s}\n", d->user.latin1(), d->pass.latin1());
#endif
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
syncStarted();
if(!self)
return;
d->state = 1;
d->http.setAuth(d->user, d->pass);
- d->http.post(d->host, d->port, d->url, makePacket("0", key, "", QByteArray()), d->use_proxy);
+ d->http.post(d->host, d->port, d->url, makePacket("0", key, "", TQByteArray()), d->use_proxy);
}
-QByteArray HttpPoll::makePacket(const QString &ident, const QString &key, const QString &newkey, const QByteArray &block)
+TQByteArray HttpPoll::makePacket(const TQString &ident, const TQString &key, const TQString &newkey, const TQByteArray &block)
{
- QString str = ident;
+ TQString str = ident;
if(!key.isEmpty()) {
str += ';';
str += key;
@@ -183,10 +183,10 @@ QByteArray HttpPoll::makePacket(const QString &ident, const QString &key, const
str += newkey;
}
str += ',';
- QCString cs = str.latin1();
+ TQCString cs = str.latin1();
int len = cs.length();
- QByteArray a(len + block.size());
+ TQByteArray a(len + block.size());
memcpy(a.data(), cs.data(), len);
memcpy(a.data() + len, block.data(), block.size());
return a;
@@ -221,14 +221,14 @@ void HttpPoll::close()
void HttpPoll::http_result()
{
// check for death :)
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
syncFinished();
if(!self)
return;
// get id and packet
- QString id;
- QString cookie = d->http.getHeader("Set-Cookie");
+ TQString id;
+ TQString cookie = d->http.getHeader("Set-Cookie");
int n = cookie.find("ID=");
if(n == -1) {
reset();
@@ -241,7 +241,7 @@ void HttpPoll::http_result()
id = cookie.mid(n, n2-n);
else
id = cookie.mid(n);
- QByteArray block = d->http.body();
+ TQByteArray block = d->http.body();
// session error?
if(id.right(2) == ":0") {
@@ -337,14 +337,14 @@ void HttpPoll::do_sync()
d->out = takeWrite(0, false);
bool last;
- QString key = getKey(&last);
- QString newkey;
+ TQString key = getKey(&last);
+ TQString newkey;
if(last) {
resetKey();
newkey = getKey(&last);
}
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
syncStarted();
if(!self)
return;
@@ -357,15 +357,15 @@ void HttpPoll::resetKey()
#ifdef PROX_DEBUG
fprintf(stderr, "HttpPoll: reset key!\n");
#endif
- QByteArray a = randomArray(64);
- QString str = QString::fromLatin1(a.data(), a.size());
+ TQByteArray a = randomArray(64);
+ TQString str = TQString::fromLatin1(a.data(), a.size());
d->key_n = POLL_KEYS;
for(int n = 0; n < POLL_KEYS; ++n)
d->key[n] = hpk(n+1, str);
}
-const QString & HttpPoll::getKey(bool *last)
+const TQString & HttpPoll::getKey(bool *last)
{
*last = false;
--(d->key_n);
@@ -378,20 +378,20 @@ const QString & HttpPoll::getKey(bool *last)
//----------------------------------------------------------------------------
// HttpProxyPost
//----------------------------------------------------------------------------
-static QString extractLine(QByteArray *buf, bool *found)
+static TQString extractLine(TQByteArray *buf, bool *found)
{
// scan for newline
int n;
for(n = 0; n < (int)buf->size()-1; ++n) {
if(buf->at(n) == '\r' && buf->at(n+1) == '\n') {
- QCString cstr;
+ TQCString cstr;
cstr.resize(n+1);
memcpy(cstr.data(), buf->data(), n);
n += 2; // hack off CR/LF
memmove(buf->data(), buf->data() + n, buf->size() - n);
buf->resize(buf->size() - n);
- QString s = QString::fromUtf8(cstr);
+ TQString s = TQString::fromUtf8(cstr);
if(found)
*found = true;
@@ -404,7 +404,7 @@ static QString extractLine(QByteArray *buf, bool *found)
return "";
}
-static bool extractMainHeader(const QString &line, QString *proto, int *code, QString *msg)
+static bool extractMainHeader(const TQString &line, TQString *proto, int *code, TQString *msg)
{
int n = line.find(' ');
if(n == -1)
@@ -429,23 +429,23 @@ public:
Private() {}
BSocket sock;
- QByteArray postdata, recvBuf, body;
- QString url;
- QString user, pass;
+ TQByteArray postdata, recvBuf, body;
+ TQString url;
+ TQString user, pass;
bool inHeader;
- QStringList headerLines;
+ TQStringList headerLines;
bool asProxy;
- QString host;
+ TQString host;
};
-HttpProxyPost::HttpProxyPost(QObject *parent)
-:QObject(parent)
+HttpProxyPost::HttpProxyPost(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
- connect(&d->sock, SIGNAL(connected()), SLOT(sock_connected()));
- connect(&d->sock, SIGNAL(connectionClosed()), SLOT(sock_connectionClosed()));
- connect(&d->sock, SIGNAL(readyRead()), SLOT(sock_readyRead()));
- connect(&d->sock, SIGNAL(error(int)), SLOT(sock_error(int)));
+ connect(&d->sock, TQT_SIGNAL(connected()), TQT_SLOT(sock_connected()));
+ connect(&d->sock, TQT_SIGNAL(connectionClosed()), TQT_SLOT(sock_connectionClosed()));
+ connect(&d->sock, TQT_SIGNAL(readyRead()), TQT_SLOT(sock_readyRead()));
+ connect(&d->sock, TQT_SIGNAL(error(int)), TQT_SLOT(sock_error(int)));
reset(true);
}
@@ -464,7 +464,7 @@ void HttpProxyPost::reset(bool clear)
d->body.resize(0);
}
-void HttpProxyPost::setAuth(const QString &user, const QString &pass)
+void HttpProxyPost::setAuth(const TQString &user, const TQString &pass)
{
d->user = user;
d->pass = pass;
@@ -475,7 +475,7 @@ bool HttpProxyPost::isActive() const
return (d->sock.state() == BSocket::Idle ? false: true);
}
-void HttpProxyPost::post(const QString &proxyHost, int proxyPort, const QString &url, const QByteArray &data, bool asProxy)
+void HttpProxyPost::post(const TQString &proxyHost, int proxyPort, const TQString &url, const TQByteArray &data, bool asProxy)
{
reset(true);
@@ -499,19 +499,19 @@ void HttpProxyPost::stop()
reset();
}
-QByteArray HttpProxyPost::body() const
+TQByteArray HttpProxyPost::body() const
{
return d->body;
}
-QString HttpProxyPost::getHeader(const QString &var) const
+TQString HttpProxyPost::getHeader(const TQString &var) const
{
- for(QStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it) {
- const QString &s = *it;
+ for(TQStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it) {
+ const TQString &s = *it;
int n = s.find(": ");
if(n == -1)
continue;
- QString v = s.mid(0, n);
+ TQString v = s.mid(0, n);
if(v == var)
return s.mid(n+2);
}
@@ -526,30 +526,30 @@ void HttpProxyPost::sock_connected()
d->inHeader = true;
d->headerLines.clear();
- QUrl u = d->url;
+ TQUrl u = d->url;
// connected, now send the request
- QString s;
- s += QString("POST ") + d->url + " HTTP/1.0\r\n";
+ TQString s;
+ s += TQString("POST ") + d->url + " HTTP/1.0\r\n";
if(d->asProxy) {
if(!d->user.isEmpty()) {
- QString str = d->user + ':' + d->pass;
- s += QString("Proxy-Authorization: Basic ") + Base64::encodeString(str) + "\r\n";
+ TQString str = d->user + ':' + d->pass;
+ s += TQString("Proxy-Authorization: Basic ") + Base64::encodeString(str) + "\r\n";
}
s += "Proxy-Connection: Keep-Alive\r\n";
s += "Pragma: no-cache\r\n";
- s += QString("Host: ") + u.host() + "\r\n";
+ s += TQString("Host: ") + u.host() + "\r\n";
}
else {
- s += QString("Host: ") + d->host + "\r\n";
+ s += TQString("Host: ") + d->host + "\r\n";
}
s += "Content-Type: application/x-www-form-urlencoded\r\n";
- s += QString("Content-Length: ") + QString::number(d->postdata.size()) + "\r\n";
+ s += TQString("Content-Length: ") + TQString::number(d->postdata.size()) + "\r\n";
s += "\r\n";
// write request
- QCString cs = s.utf8();
- QByteArray block(cs.length());
+ TQCString cs = s.utf8();
+ TQByteArray block(cs.length());
memcpy(block.data(), cs.data(), block.size());
d->sock.write(block);
@@ -566,14 +566,14 @@ void HttpProxyPost::sock_connectionClosed()
void HttpProxyPost::sock_readyRead()
{
- QByteArray block = d->sock.read();
+ TQByteArray block = d->sock.read();
ByteStream::appendArray(&d->recvBuf, block);
if(d->inHeader) {
// grab available lines
while(1) {
bool found;
- QString line = extractLine(&d->recvBuf, &found);
+ TQString line = extractLine(&d->recvBuf, &found);
if(!found)
break;
if(line.isEmpty()) {
@@ -585,12 +585,12 @@ void HttpProxyPost::sock_readyRead()
// done with grabbing the header?
if(!d->inHeader) {
- QString str = d->headerLines.first();
+ TQString str = d->headerLines.first();
d->headerLines.remove(d->headerLines.begin());
- QString proto;
+ TQString proto;
int code;
- QString msg;
+ TQString msg;
if(!extractMainHeader(str, &proto, &code, &msg)) {
#ifdef PROX_DEBUG
fprintf(stderr, "HttpProxyPost: invalid header!\n");
@@ -602,7 +602,7 @@ void HttpProxyPost::sock_readyRead()
else {
#ifdef PROX_DEBUG
fprintf(stderr, "HttpProxyPost: header proto=[%s] code=[%d] msg=[%s]\n", proto.latin1(), code, msg.latin1());
- for(QStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it)
+ for(TQStringList::ConstIterator it = d->headerLines.begin(); it != d->headerLines.end(); ++it)
fprintf(stderr, "HttpProxyPost: * [%s]\n", (*it).latin1());
#endif
}
@@ -614,7 +614,7 @@ void HttpProxyPost::sock_readyRead()
}
else {
int err;
- QString errStr;
+ TQString errStr;
if(code == 407) { // Authentication failed
err = ErrProxyAuth;
errStr = tr("Authentication failed");
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h b/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h
index 4c02ead2..c38b7a8a 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/httppoll.h
@@ -30,12 +30,12 @@ class HttpPoll : public ByteStream
Q_OBJECT
public:
enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth };
- HttpPoll(QObject *parent=0);
+ HttpPoll(TQObject *parent=0);
~HttpPoll();
- void setAuth(const QString &user, const QString &pass="");
- void connectToUrl(const QString &url);
- void connectToHost(const QString &proxyHost, int proxyPort, const QString &url);
+ void setAuth(const TQString &user, const TQString &pass="");
+ void connectToUrl(const TQString &url);
+ void connectToHost(const TQString &proxyHost, int proxyPort, const TQString &url);
int pollInterval() const;
void setPollInterval(int seconds);
@@ -62,9 +62,9 @@ private:
Private *d;
void reset(bool clear=false);
- QByteArray makePacket(const QString &ident, const QString &key, const QString &newkey, const QByteArray &block);
+ TQByteArray makePacket(const TQString &ident, const TQString &key, const TQString &newkey, const TQByteArray &block);
void resetKey();
- const QString & getKey(bool *);
+ const TQString & getKey(bool *);
};
class HttpProxyPost : public QObject
@@ -72,15 +72,15 @@ class HttpProxyPost : public QObject
Q_OBJECT
public:
enum Error { ErrConnectionRefused, ErrHostNotFound, ErrSocket, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth };
- HttpProxyPost(QObject *parent=0);
+ HttpProxyPost(TQObject *parent=0);
~HttpProxyPost();
- void setAuth(const QString &user, const QString &pass="");
+ void setAuth(const TQString &user, const TQString &pass="");
bool isActive() const;
- void post(const QString &proxyHost, int proxyPort, const QString &url, const QByteArray &data, bool asProxy=true);
+ void post(const TQString &proxyHost, int proxyPort, const TQString &url, const TQByteArray &data, bool asProxy=true);
void stop();
- QByteArray body() const;
- QString getHeader(const QString &) const;
+ TQByteArray body() const;
+ TQString getHeader(const TQString &) const;
signals:
void result();
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp
index 1203315a..748db248 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/ndns.cpp
@@ -21,9 +21,9 @@
//! \class NDns ndns.h
//! \brief Simple DNS resolution using native system calls
//!
-//! This class is to be used when Qt's QDns is not good enough. Because QDns
+//! This class is to be used when Qt's TQDns is not good enough. Because QDns
//! does not use threads, it cannot make a system call asyncronously. Thus,
-//! QDns tries to imitate the behavior of each platform's native behavior, and
+//! TQDns tries to imitate the behavior of each platform's native behavior, and
//! generally falls short.
//!
//! NDns uses a thread to make the system call happen in the background. This
@@ -45,15 +45,15 @@
//!
//! // or if you want to get the IP address as a string:
//!
-//! QString ip_address = dns.resultString();
+//! TQString ip_address = dns.resultString();
//! \endcode
#include"ndns.h"
-#include<qapplication.h>
-#include<qsocketdevice.h>
-#include<qptrlist.h>
-#include<qeventloop.h>
+#include<tqapplication.h>
+#include<tqsocketdevice.h>
+#include<tqptrlist.h>
+#include<tqeventloop.h>
#ifdef Q_OS_UNIX
#include<netdb.h>
@@ -72,7 +72,7 @@
class NDnsWorkerEvent : public QCustomEvent
{
public:
- enum Type { WorkerEvent = QEvent::User + 100 };
+ enum Type { WorkerEvent = TQEvent::User + 100 };
NDnsWorkerEvent(NDnsWorker *);
NDnsWorker *worker;
@@ -81,18 +81,18 @@ public:
class NDnsWorker : public QThread
{
public:
- NDnsWorker(QObject *, const QCString &);
+ NDnsWorker(TQObject *, const TQCString &);
bool success;
bool cancelled;
- QHostAddress addr;
+ TQHostAddress addr;
protected:
void run();
private:
- QCString host;
- QObject *par;
+ TQCString host;
+ TQObject *par;
};
//! \endif
@@ -100,8 +100,8 @@ private:
// NDnsManager
//----------------------------------------------------------------------------
#ifndef HAVE_GETHOSTBYNAME_R
-static QMutex *workerMutex = 0;
-static QMutex *workerCancelled = 0;
+static TQMutex *workerMutex = 0;
+static TQMutex *workerCancelled = 0;
#endif
static NDnsManager *man = 0;
bool winsock_init = false;
@@ -118,7 +118,7 @@ class NDnsManager::Private
public:
Item *find(const NDns *n)
{
- QPtrListIterator<Item> it(list);
+ TQPtrListIterator<Item> it(list);
for(Item *i; (i = it.current()); ++it) {
if(i->ndns == n)
return i;
@@ -128,7 +128,7 @@ public:
Item *find(const NDnsWorker *w)
{
- QPtrListIterator<Item> it(list);
+ TQPtrListIterator<Item> it(list);
for(Item *i; (i = it.current()); ++it) {
if(i->worker == w)
return i;
@@ -136,7 +136,7 @@ public:
return 0;
}
- QPtrList<Item> list;
+ TQPtrList<Item> list;
};
NDnsManager::NDnsManager()
@@ -149,7 +149,7 @@ NDnsManager::NDnsManager()
#ifdef Q_OS_WIN32
if(!winsock_init) {
winsock_init = true;
- QSocketDevice *sd = new QSocketDevice;
+ TQSocketDevice *sd = new QSocketDevice;
delete sd;
}
#endif
@@ -157,7 +157,7 @@ NDnsManager::NDnsManager()
d = new Private;
d->list.setAutoDelete(true);
- connect(qApp, SIGNAL(aboutToQuit()), SLOT(app_aboutToQuit()));
+ connect(qApp, TQT_SIGNAL(aboutToQuit()), TQT_SLOT(app_aboutToQuit()));
}
NDnsManager::~NDnsManager()
@@ -172,7 +172,7 @@ NDnsManager::~NDnsManager()
#endif
}
-void NDnsManager::resolve(NDns *self, const QString &name)
+void NDnsManager::resolve(NDns *self, const TQString &name)
{
Item *i = new Item;
i->ndns = self;
@@ -204,7 +204,7 @@ bool NDnsManager::isBusy(const NDns *self) const
return (i ? true: false);
}
-bool NDnsManager::event(QEvent *e)
+bool NDnsManager::event(TQEvent *e)
{
if((int)e->type() == (int)NDnsWorkerEvent::WorkerEvent) {
NDnsWorkerEvent *we = static_cast<NDnsWorkerEvent*>(e);
@@ -215,7 +215,7 @@ bool NDnsManager::event(QEvent *e)
// should NOT happen
return true;
}
- QHostAddress addr = i->worker->addr;
+ TQHostAddress addr = i->worker->addr;
NDns *ndns = i->ndns;
delete i->worker;
d->list.removeRef(i);
@@ -242,8 +242,8 @@ void NDnsManager::tryDestroy()
void NDnsManager::app_aboutToQuit()
{
while(man) {
- QEventLoop *e = qApp->eventLoop();
- e->processEvents(QEventLoop::WaitForMore);
+ TQEventLoop *e = qApp->eventLoop();
+ e->processEvents(TQEventLoop::WaitForMore);
}
}
@@ -257,8 +257,8 @@ void NDnsManager::app_aboutToQuit()
//!
//! Constructs an NDns object with parent \a parent.
-NDns::NDns(QObject *parent)
-:QObject(parent)
+NDns::NDns(TQObject *parent)
+:TQObject(parent)
{
}
@@ -271,7 +271,7 @@ NDns::~NDns()
//!
//! Resolves hostname \a host (eg. psi.affinix.com)
-void NDns::resolve(const QString &host)
+void NDns::resolve(const TQString &host)
{
stop();
if(!man)
@@ -299,7 +299,7 @@ uint NDns::result() const
//!
//! Returns the IP address as a string. This will be an empty string if the lookup failed.
//! \sa resultsReady()
-QString NDns::resultString() const
+TQString NDns::resultString() const
{
return addr.toString();
}
@@ -313,7 +313,7 @@ bool NDns::isBusy() const
return man->isBusy(this);
}
-void NDns::finished(const QHostAddress &a)
+void NDns::finished(const TQHostAddress &a)
{
addr = a;
resultsReady();
@@ -323,7 +323,7 @@ void NDns::finished(const QHostAddress &a)
// NDnsWorkerEvent
//----------------------------------------------------------------------------
NDnsWorkerEvent::NDnsWorkerEvent(NDnsWorker *p)
-:QCustomEvent(WorkerEvent)
+:TQCustomEvent(WorkerEvent)
{
worker = p;
}
@@ -331,7 +331,7 @@ NDnsWorkerEvent::NDnsWorkerEvent(NDnsWorker *p)
//----------------------------------------------------------------------------
// NDnsWorker
//----------------------------------------------------------------------------
-NDnsWorker::NDnsWorker(QObject *_par, const QCString &_host)
+NDnsWorker::NDnsWorker(TQObject *_par, const TQCString &_host)
{
success = cancelled = false;
par = _par;
@@ -349,7 +349,7 @@ void NDnsWorker::run()
gethostbyname_r(host.data(), &buf, char_buf, sizeof(char_buf), &h, &err);
#else
// lock for gethostbyname
- QMutexLocker locker(workerMutex);
+ TQMutexLocker locker(workerMutex);
// check for cancel
workerCancelled->lock();
@@ -362,7 +362,7 @@ void NDnsWorker::run()
if(!h) {
success = false;
- QApplication::postEvent(par, new NDnsWorkerEvent(this));
+ TQApplication::postEvent(par, new NDnsWorkerEvent(this));
return;
}
@@ -370,7 +370,7 @@ void NDnsWorker::run()
addr.setAddress(ntohl(a.s_addr));
success = true;
- QApplication::postEvent(par, new NDnsWorkerEvent(this));
+ TQApplication::postEvent(par, new NDnsWorkerEvent(this));
}
// CS_NAMESPACE_END
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/ndns.h b/kopete/protocols/jabber/libiris/cutestuff/network/ndns.h
index ccbc6b57..48243e30 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/ndns.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/ndns.h
@@ -21,11 +21,11 @@
#ifndef CS_NDNS_H
#define CS_NDNS_H
-#include<qobject.h>
-#include<qcstring.h>
-#include<qthread.h>
-#include<qmutex.h>
-#include<qhostaddress.h>
+#include<tqobject.h>
+#include<tqcstring.h>
+#include<tqthread.h>
+#include<tqmutex.h>
+#include<tqhostaddress.h>
// CS_NAMESPACE_BEGIN
@@ -36,24 +36,24 @@ class NDns : public QObject
{
Q_OBJECT
public:
- NDns(QObject *parent=0);
+ NDns(TQObject *parent=0);
~NDns();
- void resolve(const QString &);
+ void resolve(const TQString &);
void stop();
bool isBusy() const;
uint result() const;
- QString resultString() const;
+ TQString resultString() const;
signals:
void resultsReady();
private:
- QHostAddress addr;
+ TQHostAddress addr;
friend class NDnsManager;
- void finished(const QHostAddress &);
+ void finished(const TQHostAddress &);
};
class NDnsManager : public QObject
@@ -65,7 +65,7 @@ public:
//! \if _hide_doc_
protected:
- bool event(QEvent *);
+ bool event(TQEvent *);
//! \endif
private slots:
@@ -77,7 +77,7 @@ private:
friend class NDns;
NDnsManager();
- void resolve(NDns *self, const QString &name);
+ void resolve(NDns *self, const TQString &name);
void stop(NDns *self);
bool isBusy(const NDns *self) const;
void tryDestroy();
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp
index e503d57a..5b88b4e5 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/servsock.cpp
@@ -33,8 +33,8 @@ public:
ServSockSignal *serv;
};
-ServSock::ServSock(QObject *parent)
-:QObject(parent)
+ServSock::ServSock(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
d->serv = 0;
@@ -61,7 +61,7 @@ bool ServSock::listen(Q_UINT16 port)
d->serv = 0;
return false;
}
- connect(d->serv, SIGNAL(connectionReady(int)), SLOT(sss_connectionReady(int)));
+ connect(d->serv, TQT_SIGNAL(connectionReady(int)), TQT_SLOT(sss_connectionReady(int)));
return true;
}
@@ -80,12 +80,12 @@ int ServSock::port() const
return -1;
}
-QHostAddress ServSock::address() const
+TQHostAddress ServSock::address() const
{
if(d->serv)
return d->serv->address();
else
- return QHostAddress();
+ return TQHostAddress();
}
void ServSock::sss_connectionReady(int s)
@@ -98,7 +98,7 @@ void ServSock::sss_connectionReady(int s)
// ServSockSignal
//----------------------------------------------------------------------------
ServSockSignal::ServSockSignal(int port)
-:QServerSocket(port, 16)
+:TQServerSocket(port, 16)
{
}
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/servsock.h b/kopete/protocols/jabber/libiris/cutestuff/network/servsock.h
index a19cd38e..4628d8ea 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/servsock.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/servsock.h
@@ -21,7 +21,7 @@
#ifndef CS_SERVSOCK_H
#define CS_SERVSOCK_H
-#include<qserversocket.h>
+#include<tqserversocket.h>
// CS_NAMESPACE_BEGIN
@@ -29,14 +29,14 @@ class ServSock : public QObject
{
Q_OBJECT
public:
- ServSock(QObject *parent=0);
+ ServSock(TQObject *parent=0);
~ServSock();
bool isActive() const;
bool listen(Q_UINT16 port);
void stop();
int port() const;
- QHostAddress address() const;
+ TQHostAddress address() const;
signals:
void connectionReady(int);
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp
index 2f3ca5a8..59504170 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/socks.cpp
@@ -20,13 +20,13 @@
#include"socks.h"
-#include<qhostaddress.h>
-#include<qstringlist.h>
-#include<qptrlist.h>
-#include<qtimer.h>
-#include<qguardedptr.h>
-#include<qsocketdevice.h>
-#include<qsocketnotifier.h>
+#include<tqhostaddress.h>
+#include<tqstringlist.h>
+#include<tqptrlist.h>
+#include<tqtimer.h>
+#include<tqguardedptr.h>
+#include<tqsocketdevice.h>
+#include<tqsocketnotifier.h>
#ifdef Q_OS_UNIX
#include<sys/types.h>
@@ -49,20 +49,20 @@
//----------------------------------------------------------------------------
// SocksUDP
//----------------------------------------------------------------------------
-static QByteArray sp_create_udp(const QString &host, Q_UINT16 port, const QByteArray &buf)
+static TQByteArray sp_create_udp(const TQString &host, Q_UINT16 port, const TQByteArray &buf)
{
// detect for IP addresses
- //QHostAddress addr;
+ //TQHostAddress addr;
//if(addr.setAddress(host))
// return sp_set_request(addr, port, cmd1);
- QCString h = host.utf8();
+ TQCString h = host.utf8();
h.truncate(255);
- h = QString::fromUtf8(h).utf8(); // delete any partial characters?
+ h = TQString::fromUtf8(h).utf8(); // delete any partial characters?
int hlen = h.length();
int at = 0;
- QByteArray a(4);
+ TQByteArray a(4);
a[at++] = 0x00; // reserved
a[at++] = 0x00; // reserved
a[at++] = 0x00; // frag
@@ -88,19 +88,19 @@ static QByteArray sp_create_udp(const QString &host, Q_UINT16 port, const QByteA
struct SPS_UDP
{
- QString host;
+ TQString host;
Q_UINT16 port;
- QByteArray data;
+ TQByteArray data;
};
-static int sp_read_udp(QByteArray *from, SPS_UDP *s)
+static int sp_read_udp(TQByteArray *from, SPS_UDP *s)
{
int full_len = 4;
if((int)from->size() < full_len)
return 0;
- QString host;
- QHostAddress addr;
+ TQString host;
+ TQHostAddress addr;
unsigned char atype = from->at(3);
if(atype == 0x01) {
@@ -120,9 +120,9 @@ static int sp_read_udp(QByteArray *from, SPS_UDP *s)
full_len += host_len;
if((int)from->size() < full_len)
return 0;
- QCString cs(host_len+1);
+ TQCString cs(host_len+1);
memcpy(cs.data(), from->data() + 5, host_len);
- host = QString::fromLatin1(cs);
+ host = TQString::fromLatin1(cs);
}
else if(atype == 0x04) {
full_len += 16;
@@ -152,24 +152,24 @@ static int sp_read_udp(QByteArray *from, SPS_UDP *s)
class SocksUDP::Private
{
public:
- QSocketDevice *sd;
- QSocketNotifier *sn;
+ TQSocketDevice *sd;
+ TQSocketNotifier *sn;
SocksClient *sc;
- QHostAddress routeAddr;
+ TQHostAddress routeAddr;
int routePort;
- QString host;
+ TQString host;
int port;
};
-SocksUDP::SocksUDP(SocksClient *sc, const QString &host, int port, const QHostAddress &routeAddr, int routePort)
-:QObject(sc)
+SocksUDP::SocksUDP(SocksClient *sc, const TQString &host, int port, const TQHostAddress &routeAddr, int routePort)
+:TQObject(sc)
{
d = new Private;
d->sc = sc;
- d->sd = new QSocketDevice(QSocketDevice::Datagram);
+ d->sd = new TQSocketDevice(TQSocketDevice::Datagram);
d->sd->setBlocking(false);
- d->sn = new QSocketNotifier(d->sd->socket(), QSocketNotifier::Read);
- connect(d->sn, SIGNAL(activated(int)), SLOT(sn_activated(int)));
+ d->sn = new TQSocketNotifier(d->sd->socket(), TQSocketNotifier::Read);
+ connect(d->sn, TQT_SIGNAL(activated(int)), TQT_SLOT(sn_activated(int)));
d->host = host;
d->port = port;
d->routeAddr = routeAddr;
@@ -183,15 +183,15 @@ SocksUDP::~SocksUDP()
delete d;
}
-void SocksUDP::change(const QString &host, int port)
+void SocksUDP::change(const TQString &host, int port)
{
d->host = host;
d->port = port;
}
-void SocksUDP::write(const QByteArray &data)
+void SocksUDP::write(const TQByteArray &data)
{
- QByteArray buf = sp_create_udp(d->host, d->port, data);
+ TQByteArray buf = sp_create_udp(d->host, d->port, data);
d->sd->setBlocking(true);
d->sd->writeBlock(buf.data(), buf.size(), d->routeAddr, d->routePort);
d->sd->setBlocking(false);
@@ -199,7 +199,7 @@ void SocksUDP::write(const QByteArray &data)
void SocksUDP::sn_activated(int)
{
- QByteArray buf(8192);
+ TQByteArray buf(8192);
int actual = d->sd->readBlock(buf.data(), buf.size());
buf.resize(actual);
packetReady(buf);
@@ -222,9 +222,9 @@ void SocksUDP::sn_activated(int)
// SPSS = socks packet server struct
// Version
-static QByteArray spc_set_version()
+static TQByteArray spc_set_version()
{
- QByteArray ver(4);
+ TQByteArray ver(4);
ver[0] = 0x05; // socks version 5
ver[1] = 0x02; // number of methods
ver[2] = 0x00; // no-auth
@@ -232,9 +232,9 @@ static QByteArray spc_set_version()
return ver;
}
-static QByteArray sps_set_version(int method)
+static TQByteArray sps_set_version(int method)
{
- QByteArray ver(2);
+ TQByteArray ver(2);
ver[0] = 0x05;
ver[1] = method;
return ver;
@@ -243,10 +243,10 @@ static QByteArray sps_set_version(int method)
struct SPCS_VERSION
{
unsigned char version;
- QByteArray methodList;
+ TQByteArray methodList;
};
-static int spc_get_version(QByteArray *from, SPCS_VERSION *s)
+static int spc_get_version(TQByteArray *from, SPCS_VERSION *s)
{
if(from->size() < 1)
return 0;
@@ -259,7 +259,7 @@ static int spc_get_version(QByteArray *from, SPCS_VERSION *s)
return -1;
if(from->size() < 2 + num)
return 0;
- QByteArray a = ByteStream::takeArray(from, 2+num);
+ TQByteArray a = ByteStream::takeArray(from, 2+num);
s->version = a[0];
s->methodList.resize(num);
memcpy(s->methodList.data(), a.data() + 2, num);
@@ -272,18 +272,18 @@ struct SPSS_VERSION
unsigned char method;
};
-static int sps_get_version(QByteArray *from, SPSS_VERSION *s)
+static int sps_get_version(TQByteArray *from, SPSS_VERSION *s)
{
if(from->size() < 2)
return 0;
- QByteArray a = ByteStream::takeArray(from, 2);
+ TQByteArray a = ByteStream::takeArray(from, 2);
s->version = a[0];
s->method = a[1];
return 1;
}
// authUsername
-static QByteArray spc_set_authUsername(const QCString &user, const QCString &pass)
+static TQByteArray spc_set_authUsername(const TQCString &user, const TQCString &pass)
{
int len1 = user.length();
int len2 = pass.length();
@@ -291,7 +291,7 @@ static QByteArray spc_set_authUsername(const QCString &user, const QCString &pas
len1 = 255;
if(len2 > 255)
len2 = 255;
- QByteArray a(1+1+len1+1+len2);
+ TQByteArray a(1+1+len1+1+len2);
a[0] = 0x01; // username auth version 1
a[1] = len1;
memcpy(a.data() + 2, user.data(), len1);
@@ -300,9 +300,9 @@ static QByteArray spc_set_authUsername(const QCString &user, const QCString &pas
return a;
}
-static QByteArray sps_set_authUsername(bool success)
+static TQByteArray sps_set_authUsername(bool success)
{
- QByteArray a(2);
+ TQByteArray a(2);
a[0] = 0x01;
a[1] = success ? 0x00 : 0xff;
return a;
@@ -310,10 +310,10 @@ static QByteArray sps_set_authUsername(bool success)
struct SPCS_AUTHUSERNAME
{
- QString user, pass;
+ TQString user, pass;
};
-static int spc_get_authUsername(QByteArray *from, SPCS_AUTHUSERNAME *s)
+static int spc_get_authUsername(TQByteArray *from, SPCS_AUTHUSERNAME *s)
{
if(from->size() < 1)
return 0;
@@ -328,15 +328,15 @@ static int spc_get_authUsername(QByteArray *from, SPCS_AUTHUSERNAME *s)
unsigned char plen = from->at(ulen+2);
if((int)from->size() < ulen + plen + 3)
return 0;
- QByteArray a = ByteStream::takeArray(from, ulen + plen + 3);
+ TQByteArray a = ByteStream::takeArray(from, ulen + plen + 3);
- QCString user, pass;
+ TQCString user, pass;
user.resize(ulen+1);
pass.resize(plen+1);
memcpy(user.data(), a.data()+2, ulen);
memcpy(pass.data(), a.data()+ulen+3, plen);
- s->user = QString::fromUtf8(user);
- s->pass = QString::fromUtf8(pass);
+ s->user = TQString::fromUtf8(user);
+ s->pass = TQString::fromUtf8(pass);
return 1;
}
@@ -346,21 +346,21 @@ struct SPSS_AUTHUSERNAME
bool success;
};
-static int sps_get_authUsername(QByteArray *from, SPSS_AUTHUSERNAME *s)
+static int sps_get_authUsername(TQByteArray *from, SPSS_AUTHUSERNAME *s)
{
if(from->size() < 2)
return 0;
- QByteArray a = ByteStream::takeArray(from, 2);
+ TQByteArray a = ByteStream::takeArray(from, 2);
s->version = a[0];
s->success = a[1] == 0 ? true: false;
return 1;
}
// connectRequest
-static QByteArray sp_set_request(const QHostAddress &addr, unsigned short port, unsigned char cmd1)
+static TQByteArray sp_set_request(const TQHostAddress &addr, unsigned short port, unsigned char cmd1)
{
int at = 0;
- QByteArray a(4);
+ TQByteArray a(4);
a[at++] = 0x05; // socks version 5
a[at++] = cmd1;
a[at++] = 0x00; // reserved
@@ -374,11 +374,11 @@ static QByteArray sp_set_request(const QHostAddress &addr, unsigned short port,
else {
a[at++] = 0x04;
Q_UINT8 a6[16];
- QStringList s6 = QStringList::split(':', addr.toString(), true);
+ TQStringList s6 = TQStringList::split(':', addr.toString(), true);
int at = 0;
Q_UINT16 c;
bool ok;
- for(QStringList::ConstIterator it = s6.begin(); it != s6.end(); ++it) {
+ for(TQStringList::ConstIterator it = s6.begin(); it != s6.end(); ++it) {
c = (*it).toInt(&ok, 16);
a6[at++] = (c >> 8);
a6[at++] = c & 0xff;
@@ -396,20 +396,20 @@ static QByteArray sp_set_request(const QHostAddress &addr, unsigned short port,
return a;
}
-static QByteArray sp_set_request(const QString &host, Q_UINT16 port, unsigned char cmd1)
+static TQByteArray sp_set_request(const TQString &host, Q_UINT16 port, unsigned char cmd1)
{
// detect for IP addresses
- QHostAddress addr;
+ TQHostAddress addr;
if(addr.setAddress(host))
return sp_set_request(addr, port, cmd1);
- QCString h = host.utf8();
+ TQCString h = host.utf8();
h.truncate(255);
- h = QString::fromUtf8(h).utf8(); // delete any partial characters?
+ h = TQString::fromUtf8(h).utf8(); // delete any partial characters?
int hlen = h.length();
int at = 0;
- QByteArray a(4);
+ TQByteArray a(4);
a[at++] = 0x05; // socks version 5
a[at++] = cmd1;
a[at++] = 0x00; // reserved
@@ -434,19 +434,19 @@ struct SPS_CONNREQ
unsigned char version;
unsigned char cmd;
int address_type;
- QString host;
- QHostAddress addr;
+ TQString host;
+ TQHostAddress addr;
Q_UINT16 port;
};
-static int sp_get_request(QByteArray *from, SPS_CONNREQ *s)
+static int sp_get_request(TQByteArray *from, SPS_CONNREQ *s)
{
int full_len = 4;
if((int)from->size() < full_len)
return 0;
- QString host;
- QHostAddress addr;
+ TQString host;
+ TQHostAddress addr;
unsigned char atype = from->at(3);
if(atype == 0x01) {
@@ -465,9 +465,9 @@ static int sp_get_request(QByteArray *from, SPS_CONNREQ *s)
full_len += host_len;
if((int)from->size() < full_len)
return 0;
- QCString cs(host_len+1);
+ TQCString cs(host_len+1);
memcpy(cs.data(), from->data() + 5, host_len);
- host = QString::fromLatin1(cs);
+ host = TQString::fromLatin1(cs);
}
else if(atype == 0x04) {
full_len += 16;
@@ -482,7 +482,7 @@ static int sp_get_request(QByteArray *from, SPS_CONNREQ *s)
if((int)from->size() < full_len)
return 0;
- QByteArray a = ByteStream::takeArray(from, full_len);
+ TQByteArray a = ByteStream::takeArray(from, full_len);
Q_UINT16 p;
memcpy(&p, a.data() + full_len - 2, 2);
@@ -505,29 +505,29 @@ public:
Private() {}
BSocket sock;
- QString host;
+ TQString host;
int port;
- QString user, pass;
- QString real_host;
+ TQString user, pass;
+ TQString real_host;
int real_port;
- QByteArray recvBuf;
+ TQByteArray recvBuf;
bool active;
int step;
int authMethod;
bool incoming, waiting;
- QString rhost;
+ TQString rhost;
int rport;
int pending;
bool udp;
- QString udpAddr;
+ TQString udpAddr;
int udpPort;
};
-SocksClient::SocksClient(QObject *parent)
+SocksClient::SocksClient(TQObject *parent)
:ByteStream(parent)
{
init();
@@ -535,7 +535,7 @@ SocksClient::SocksClient(QObject *parent)
d->incoming = false;
}
-SocksClient::SocksClient(int s, QObject *parent)
+SocksClient::SocksClient(int s, TQObject *parent)
:ByteStream(parent)
{
init();
@@ -548,12 +548,12 @@ SocksClient::SocksClient(int s, QObject *parent)
void SocksClient::init()
{
d = new Private;
- connect(&d->sock, SIGNAL(connected()), SLOT(sock_connected()));
- connect(&d->sock, SIGNAL(connectionClosed()), SLOT(sock_connectionClosed()));
- connect(&d->sock, SIGNAL(delayedCloseFinished()), SLOT(sock_delayedCloseFinished()));
- connect(&d->sock, SIGNAL(readyRead()), SLOT(sock_readyRead()));
- connect(&d->sock, SIGNAL(bytesWritten(int)), SLOT(sock_bytesWritten(int)));
- connect(&d->sock, SIGNAL(error(int)), SLOT(sock_error(int)));
+ connect(&d->sock, TQT_SIGNAL(connected()), TQT_SLOT(sock_connected()));
+ connect(&d->sock, TQT_SIGNAL(connectionClosed()), TQT_SLOT(sock_connectionClosed()));
+ connect(&d->sock, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(sock_delayedCloseFinished()));
+ connect(&d->sock, TQT_SIGNAL(readyRead()), TQT_SLOT(sock_readyRead()));
+ connect(&d->sock, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sock_bytesWritten(int)));
+ connect(&d->sock, TQT_SIGNAL(error(int)), TQT_SLOT(sock_error(int)));
reset(true);
}
@@ -582,13 +582,13 @@ bool SocksClient::isIncoming() const
return d->incoming;
}
-void SocksClient::setAuth(const QString &user, const QString &pass)
+void SocksClient::setAuth(const TQString &user, const TQString &pass)
{
d->user = user;
d->pass = pass;
}
-void SocksClient::connectToHost(const QString &proxyHost, int proxyPort, const QString &host, int port, bool udpMode)
+void SocksClient::connectToHost(const TQString &proxyHost, int proxyPort, const TQString &host, int port, bool udpMode)
{
reset(true);
@@ -620,19 +620,19 @@ void SocksClient::close()
reset();
}
-void SocksClient::writeData(const QByteArray &buf)
+void SocksClient::writeData(const TQByteArray &buf)
{
d->pending += buf.size();
d->sock.write(buf);
}
-void SocksClient::write(const QByteArray &buf)
+void SocksClient::write(const TQByteArray &buf)
{
if(d->active && !d->udp)
d->sock.write(buf);
}
-QByteArray SocksClient::read(int bytes)
+TQByteArray SocksClient::read(int bytes)
{
return ByteStream::read(bytes);
}
@@ -681,7 +681,7 @@ void SocksClient::sock_delayedCloseFinished()
void SocksClient::sock_readyRead()
{
- QByteArray block = d->sock.read();
+ TQByteArray block = d->sock.read();
if(!d->active) {
if(d->incoming)
@@ -697,7 +697,7 @@ void SocksClient::sock_readyRead()
}
}
-void SocksClient::processOutgoing(const QByteArray &block)
+void SocksClient::processOutgoing(const TQByteArray &block)
{
#ifdef PROX_DEBUG
// show hex
@@ -726,7 +726,7 @@ void SocksClient::processOutgoing(const QByteArray &block)
return;
}
- QString str;
+ TQString str;
if(s.method == 0x00) {
str = "None";
d->authMethod = AuthNone;
@@ -818,7 +818,7 @@ void SocksClient::processOutgoing(const QByteArray &block)
d->active = true;
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
connected();
if(!self)
return;
@@ -839,11 +839,11 @@ void SocksClient::do_request()
#endif
d->step = StepRequest;
int cmd = d->udp ? REQ_UDPASSOCIATE : REQ_CONNECT;
- QByteArray buf;
+ TQByteArray buf;
if(!d->real_host.isEmpty())
buf = sp_set_request(d->real_host, d->real_port, cmd);
else
- buf = sp_set_request(QHostAddress(), 0, cmd);
+ buf = sp_set_request(TQHostAddress(), 0, cmd);
writeData(buf);
}
@@ -886,7 +886,7 @@ void SocksClient::serve()
continueIncoming();
}
-void SocksClient::processIncoming(const QByteArray &block)
+void SocksClient::processIncoming(const TQByteArray &block)
{
#ifdef PROX_DEBUG
// show hex
@@ -1045,7 +1045,7 @@ void SocksClient::grantConnect()
}
}
-void SocksClient::grantUDPAssociate(const QString &relayHost, int relayPort)
+void SocksClient::grantUDPAssociate(const TQString &relayHost, int relayPort)
{
if(d->step != StepRequest || !d->waiting)
return;
@@ -1063,7 +1063,7 @@ void SocksClient::grantUDPAssociate(const QString &relayHost, int relayPort)
d->recvBuf.resize(0);
}
-QHostAddress SocksClient::peerAddress() const
+TQHostAddress SocksClient::peerAddress() const
{
return d->sock.peerAddress();
}
@@ -1073,7 +1073,7 @@ Q_UINT16 SocksClient::peerPort() const
return d->sock.peerPort();
}
-QString SocksClient::udpAddress() const
+TQString SocksClient::udpAddress() const
{
return d->udpAddr;
}
@@ -1083,7 +1083,7 @@ Q_UINT16 SocksClient::udpPort() const
return d->udpPort;
}
-SocksUDP *SocksClient::createUDP(const QString &host, int port, const QHostAddress &routeAddr, int routePort)
+SocksUDP *SocksClient::createUDP(const TQString &host, int port, const TQHostAddress &routeAddr, int routePort)
{
return new SocksUDP(this, host, port, routeAddr, routePort);
}
@@ -1097,18 +1097,18 @@ public:
Private() {}
ServSock serv;
- QPtrList<SocksClient> incomingConns;
- QSocketDevice *sd;
- QSocketNotifier *sn;
+ TQPtrList<SocksClient> incomingConns;
+ TQSocketDevice *sd;
+ TQSocketNotifier *sn;
};
-SocksServer::SocksServer(QObject *parent)
-:QObject(parent)
+SocksServer::SocksServer(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
d->sd = 0;
d->sn = 0;
- connect(&d->serv, SIGNAL(connectionReady(int)), SLOT(connectionReady(int)));
+ connect(&d->serv, TQT_SIGNAL(connectionReady(int)), TQT_SLOT(connectionReady(int)));
}
SocksServer::~SocksServer()
@@ -1130,16 +1130,16 @@ bool SocksServer::listen(Q_UINT16 port, bool udp)
if(!d->serv.listen(port))
return false;
if(udp) {
- d->sd = new QSocketDevice(QSocketDevice::Datagram);
+ d->sd = new TQSocketDevice(TQSocketDevice::Datagram);
d->sd->setBlocking(false);
- if(!d->sd->bind(QHostAddress(), port)) {
+ if(!d->sd->bind(TQHostAddress(), port)) {
delete d->sd;
d->sd = 0;
d->serv.stop();
return false;
}
- d->sn = new QSocketNotifier(d->sd->socket(), QSocketNotifier::Read);
- connect(d->sn, SIGNAL(activated(int)), SLOT(sn_activated(int)));
+ d->sn = new TQSocketNotifier(d->sd->socket(), TQSocketNotifier::Read);
+ connect(d->sn, TQT_SIGNAL(activated(int)), TQT_SLOT(sn_activated(int)));
}
return true;
}
@@ -1158,7 +1158,7 @@ int SocksServer::port() const
return d->serv.port();
}
-QHostAddress SocksServer::address() const
+TQHostAddress SocksServer::address() const
{
return d->serv.address();
}
@@ -1172,15 +1172,15 @@ SocksClient *SocksServer::takeIncoming()
d->incomingConns.removeRef(c);
// we don't care about errors anymore
- disconnect(c, SIGNAL(error(int)), this, SLOT(connectionError()));
+ disconnect(c, TQT_SIGNAL(error(int)), this, TQT_SLOT(connectionError()));
// don't serve the connection until the event loop, to give the caller a chance to map signals
- QTimer::singleShot(0, c, SLOT(serve()));
+ TQTimer::singleShot(0, c, TQT_SLOT(serve()));
return c;
}
-void SocksServer::writeUDP(const QHostAddress &addr, int port, const QByteArray &data)
+void SocksServer::writeUDP(const TQHostAddress &addr, int port, const TQByteArray &data)
{
if(d->sd) {
d->sd->setBlocking(true);
@@ -1192,7 +1192,7 @@ void SocksServer::writeUDP(const QHostAddress &addr, int port, const QByteArray
void SocksServer::connectionReady(int s)
{
SocksClient *c = new SocksClient(s, this);
- connect(c, SIGNAL(error(int)), this, SLOT(connectionError()));
+ connect(c, TQT_SIGNAL(error(int)), this, TQT_SLOT(connectionError()));
d->incomingConns.append(c);
incomingReady();
}
@@ -1206,10 +1206,10 @@ void SocksServer::connectionError()
void SocksServer::sn_activated(int)
{
- QByteArray buf(8192);
+ TQByteArray buf(8192);
int actual = d->sd->readBlock(buf.data(), buf.size());
buf.resize(actual);
- QHostAddress pa = d->sd->peerAddress();
+ TQHostAddress pa = d->sd->peerAddress();
int pp = d->sd->peerPort();
SPS_UDP s;
int r = sp_read_udp(&buf, &s);
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/socks.h b/kopete/protocols/jabber/libiris/cutestuff/network/socks.h
index b10361dd..507caf5f 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/socks.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/socks.h
@@ -35,11 +35,11 @@ class SocksUDP : public QObject
public:
~SocksUDP();
- void change(const QString &host, int port);
- void write(const QByteArray &data);
+ void change(const TQString &host, int port);
+ void write(const TQByteArray &data);
signals:
- void packetReady(const QByteArray &data);
+ void packetReady(const TQByteArray &data);
private slots:
void sn_activated(int);
@@ -49,7 +49,7 @@ private:
Private *d;
friend class SocksClient;
- SocksUDP(SocksClient *sc, const QString &host, int port, const QHostAddress &routeAddr, int routePort);
+ SocksUDP(SocksClient *sc, const TQString &host, int port, const TQHostAddress &routeAddr, int routePort);
};
class SocksClient : public ByteStream
@@ -59,39 +59,39 @@ public:
enum Error { ErrConnectionRefused = ErrCustom, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth };
enum Method { AuthNone=0x0001, AuthUsername=0x0002 };
enum Request { ReqConnect, ReqUDPAssociate };
- SocksClient(QObject *parent=0);
- SocksClient(int, QObject *parent=0);
+ SocksClient(TQObject *parent=0);
+ SocksClient(int, TQObject *parent=0);
~SocksClient();
bool isIncoming() const;
// outgoing
- void setAuth(const QString &user, const QString &pass="");
- void connectToHost(const QString &proxyHost, int proxyPort, const QString &host, int port, bool udpMode=false);
+ void setAuth(const TQString &user, const TQString &pass="");
+ void connectToHost(const TQString &proxyHost, int proxyPort, const TQString &host, int port, bool udpMode=false);
// incoming
void chooseMethod(int);
void authGrant(bool);
void requestDeny();
void grantConnect();
- void grantUDPAssociate(const QString &relayHost, int relayPort);
+ void grantUDPAssociate(const TQString &relayHost, int relayPort);
// from ByteStream
bool isOpen() const;
void close();
- void write(const QByteArray &);
- QByteArray read(int bytes=0);
+ void write(const TQByteArray &);
+ TQByteArray read(int bytes=0);
int bytesAvailable() const;
int bytesToWrite() const;
// remote address
- QHostAddress peerAddress() const;
+ TQHostAddress peerAddress() const;
Q_UINT16 peerPort() const;
// udp
- QString udpAddress() const;
+ TQString udpAddress() const;
Q_UINT16 udpPort() const;
- SocksUDP *createUDP(const QString &host, int port, const QHostAddress &routeAddr, int routePort);
+ SocksUDP *createUDP(const TQString &host, int port, const TQHostAddress &routeAddr, int routePort);
signals:
// outgoing
@@ -99,8 +99,8 @@ signals:
// incoming
void incomingMethods(int);
- void incomingAuth(const QString &user, const QString &pass);
- void incomingConnectRequest(const QString &host, int port);
+ void incomingAuth(const TQString &user, const TQString &pass);
+ void incomingConnectRequest(const TQString &host, int port);
void incomingUDPAssociateRequest();
private slots:
@@ -119,31 +119,31 @@ private:
void init();
void reset(bool clear=false);
void do_request();
- void processOutgoing(const QByteArray &);
- void processIncoming(const QByteArray &);
+ void processOutgoing(const TQByteArray &);
+ void processIncoming(const TQByteArray &);
void continueIncoming();
- void writeData(const QByteArray &a);
+ void writeData(const TQByteArray &a);
};
class SocksServer : public QObject
{
Q_OBJECT
public:
- SocksServer(QObject *parent=0);
+ SocksServer(TQObject *parent=0);
~SocksServer();
bool isActive() const;
bool listen(Q_UINT16 port, bool udp=false);
void stop();
int port() const;
- QHostAddress address() const;
+ TQHostAddress address() const;
SocksClient *takeIncoming();
- void writeUDP(const QHostAddress &addr, int port, const QByteArray &data);
+ void writeUDP(const TQHostAddress &addr, int port, const TQByteArray &data);
signals:
void incomingReady();
- void incomingUDP(const QString &host, int port, const QHostAddress &addr, int sourcePort, const QByteArray &data);
+ void incomingUDP(const TQString &host, int port, const TQHostAddress &addr, int sourcePort, const TQByteArray &data);
private slots:
void connectionReady(int);
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp
index 851873f2..d462a17e 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.cpp
@@ -20,9 +20,9 @@
#include"srvresolver.h"
-#include<qcstring.h>
-#include<qtimer.h>
-#include<qdns.h>
+#include<tqcstring.h>
+#include<tqtimer.h>
+#include<tqdns.h>
#include"safedelete.h"
#ifndef NO_NDNS
@@ -31,14 +31,14 @@
// CS_NAMESPACE_BEGIN
-static void sortSRVList(QValueList<QDns::Server> &list)
+static void sortSRVList(TQValueList<TQDns::Server> &list)
{
- QValueList<QDns::Server> tmp = list;
+ TQValueList<TQDns::Server> tmp = list;
list.clear();
while(!tmp.isEmpty()) {
- QValueList<QDns::Server>::Iterator p = tmp.end();
- for(QValueList<QDns::Server>::Iterator it = tmp.begin(); it != tmp.end(); ++it) {
+ TQValueList<TQDns::Server>::Iterator p = tmp.end();
+ for(TQValueList<TQDns::Server>::Iterator it = tmp.begin(); it != tmp.end(); ++it) {
if(p == tmp.end())
p = it;
else {
@@ -60,34 +60,34 @@ class SrvResolver::Private
public:
Private() {}
- QDns *qdns;
+ TQDns *qdns;
#ifndef NO_NDNS
NDns ndns;
#endif
bool failed;
- QHostAddress resultAddress;
+ TQHostAddress resultAddress;
Q_UINT16 resultPort;
bool srvonly;
- QString srv;
- QValueList<QDns::Server> servers;
+ TQString srv;
+ TQValueList<TQDns::Server> servers;
bool aaaa;
- QTimer t;
+ TQTimer t;
SafeDelete sd;
};
-SrvResolver::SrvResolver(QObject *parent)
-:QObject(parent)
+SrvResolver::SrvResolver(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
d->qdns = 0;
#ifndef NO_NDNS
- connect(&d->ndns, SIGNAL(resultsReady()), SLOT(ndns_done()));
+ connect(&d->ndns, TQT_SIGNAL(resultsReady()), TQT_SLOT(ndns_done()));
#endif
- connect(&d->t, SIGNAL(timeout()), SLOT(t_timeout()));
+ connect(&d->t, TQT_SIGNAL(timeout()), TQT_SLOT(t_timeout()));
stop();
}
@@ -97,31 +97,31 @@ SrvResolver::~SrvResolver()
delete d;
}
-void SrvResolver::resolve(const QString &server, const QString &type, const QString &proto)
+void SrvResolver::resolve(const TQString &server, const TQString &type, const TQString &proto)
{
stop();
d->failed = false;
d->srvonly = false;
- d->srv = QString("_") + type + "._" + proto + '.' + server;
+ d->srv = TQString("_") + type + "._" + proto + '.' + server;
d->t.start(15000, true);
d->qdns = new QDns;
- connect(d->qdns, SIGNAL(resultsReady()), SLOT(qdns_done()));
- d->qdns->setRecordType(QDns::Srv);
+ connect(d->qdns, TQT_SIGNAL(resultsReady()), TQT_SLOT(qdns_done()));
+ d->qdns->setRecordType(TQDns::Srv);
d->qdns->setLabel(d->srv);
}
-void SrvResolver::resolveSrvOnly(const QString &server, const QString &type, const QString &proto)
+void SrvResolver::resolveSrvOnly(const TQString &server, const TQString &type, const TQString &proto)
{
stop();
d->failed = false;
d->srvonly = true;
- d->srv = QString("_") + type + "._" + proto + '.' + server;
+ d->srv = TQString("_") + type + "._" + proto + '.' + server;
d->t.start(15000, true);
d->qdns = new QDns;
- connect(d->qdns, SIGNAL(resultsReady()), SLOT(qdns_done()));
- d->qdns->setRecordType(QDns::Srv);
+ connect(d->qdns, TQT_SIGNAL(resultsReady()), TQT_SLOT(qdns_done()));
+ d->qdns->setRecordType(TQDns::Srv);
d->qdns->setLabel(d->srv);
}
@@ -146,7 +146,7 @@ void SrvResolver::stop()
if(d->ndns.isBusy())
d->ndns.stop();
#endif
- d->resultAddress = QHostAddress();
+ d->resultAddress = TQHostAddress();
d->resultPort = 0;
d->servers.clear();
d->srv = "";
@@ -165,7 +165,7 @@ bool SrvResolver::isBusy() const
return false;
}
-QValueList<QDns::Server> SrvResolver::servers() const
+TQValueList<TQDns::Server> SrvResolver::servers() const
{
return d->servers;
}
@@ -175,7 +175,7 @@ bool SrvResolver::failed() const
return d->failed;
}
-QHostAddress SrvResolver::resultAddress() const
+TQHostAddress SrvResolver::resultAddress() const
{
return d->resultAddress;
}
@@ -191,11 +191,11 @@ void SrvResolver::tryNext()
d->ndns.resolve(d->servers.first().name);
#else
d->qdns = new QDns;
- connect(d->qdns, SIGNAL(resultsReady()), SLOT(ndns_done()));
+ connect(d->qdns, TQT_SIGNAL(resultsReady()), TQT_SLOT(ndns_done()));
if(d->aaaa)
- d->qdns->setRecordType(QDns::Aaaa); // IPv6
+ d->qdns->setRecordType(TQDns::Aaaa); // IPv6
else
- d->qdns->setRecordType(QDns::A); // IPv4
+ d->qdns->setRecordType(TQDns::A); // IPv4
d->qdns->setLabel(d->servers.first().name);
#endif
}
@@ -213,8 +213,8 @@ void SrvResolver::qdns_done()
SafeDeleteLock s(&d->sd);
// grab the server list and destroy the qdns object
- QValueList<QDns::Server> list;
- if(d->qdns->recordType() == QDns::Srv)
+ TQValueList<TQDns::Server> list;
+ if(d->qdns->recordType() == TQDns::Srv)
list = d->qdns->servers();
d->qdns->disconnect(this);
d->sd.deleteLater(d->qdns);
@@ -247,7 +247,7 @@ void SrvResolver::ndns_done()
d->servers.remove(d->servers.begin());
if(r) {
- d->resultAddress = QHostAddress(d->ndns.result());
+ d->resultAddress = TQHostAddress(d->ndns.result());
d->resultPort = port;
resultsReady();
}
@@ -273,8 +273,8 @@ void SrvResolver::ndns_done()
SafeDeleteLock s(&d->sd);
// grab the address list and destroy the qdns object
- QValueList<QHostAddress> list;
- if(d->qdns->recordType() == QDns::A || d->qdns->recordType() == QDns::Aaaa)
+ TQValueList<TQHostAddress> list;
+ if(d->qdns->recordType() == TQDns::A || d->qdns->recordType() == TQDns::Aaaa)
list = d->qdns->addresses();
d->qdns->disconnect(this);
d->sd.deleteLater(d->qdns);
diff --git a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h
index fb5aa2b1..400639c1 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/network/srvresolver.h
@@ -21,8 +21,8 @@
#ifndef CS_SRVRESOLVER_H
#define CS_SRVRESOLVER_H
-#include<qvaluelist.h>
-#include<qdns.h>
+#include<tqvaluelist.h>
+#include<tqdns.h>
// CS_NAMESPACE_BEGIN
@@ -30,19 +30,19 @@ class SrvResolver : public QObject
{
Q_OBJECT
public:
- SrvResolver(QObject *parent=0);
+ SrvResolver(TQObject *parent=0);
~SrvResolver();
- void resolve(const QString &server, const QString &type, const QString &proto);
- void resolveSrvOnly(const QString &server, const QString &type, const QString &proto);
+ void resolve(const TQString &server, const TQString &type, const TQString &proto);
+ void resolveSrvOnly(const TQString &server, const TQString &type, const TQString &proto);
void next();
void stop();
bool isBusy() const;
- QValueList<QDns::Server> servers() const;
+ TQValueList<TQDns::Server> servers() const;
bool failed() const;
- QHostAddress resultAddress() const;
+ TQHostAddress resultAddress() const;
Q_UINT16 resultPort() const;
signals:
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/base64.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/base64.cpp
index c1483196..06df3f73 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/base64.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/base64.cpp
@@ -33,21 +33,21 @@
//! ...
//!
//! // encode a block of data into base64
-//! QByteArray block(1024);
-//! QByteArray enc = Base64::encode(block);
+//! TQByteArray block(1024);
+//! TQByteArray enc = Base64::encode(block);
//!
//! \endcode
//!
//! Encodes array \a s and returns the result.
-QByteArray Base64::encode(const QByteArray &s)
+TQByteArray Base64::encode(const TQByteArray &s)
{
int i;
int len = s.size();
char tbl[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
int a, b, c;
- QByteArray p((len+2)/3*4);
+ TQByteArray p((len+2)/3*4);
int at = 0;
for( i = 0; i < len; i += 3 ) {
a = ((unsigned char)s[i] & 3) << 4;
@@ -74,10 +74,10 @@ QByteArray Base64::encode(const QByteArray &s)
//!
//! Decodes array \a s and returns the result.
-QByteArray Base64::decode(const QByteArray &s)
+TQByteArray Base64::decode(const TQByteArray &s)
{
// return value
- QByteArray p;
+ TQByteArray p;
// -1 specifies invalid
// 64 specifies eof
@@ -140,41 +140,41 @@ QByteArray Base64::decode(const QByteArray &s)
//!
//! Encodes array \a a and returns the result as a string.
-QString Base64::arrayToString(const QByteArray &a)
+TQString Base64::arrayToString(const TQByteArray &a)
{
- QByteArray b = encode(a);
- QCString c;
+ TQByteArray b = encode(a);
+ TQCString c;
c.resize(b.size()+1);
memcpy(c.data(), b.data(), b.size());
- return QString::fromLatin1(c);
+ return TQString::fromLatin1(c);
}
//!
//! Decodes string \a s and returns the result as an array.
-QByteArray Base64::stringToArray(const QString &s)
+TQByteArray Base64::stringToArray(const TQString &s)
{
if(s.isEmpty())
- return QByteArray();
+ return TQByteArray();
// Unfold data
- QString us(s);
+ TQString us(s);
us.remove('\n');
const char *c = us.latin1();
int len = strlen(c);
- QByteArray b(len);
+ TQByteArray b(len);
memcpy(b.data(), c, len);
- QByteArray a = decode(b);
+ TQByteArray a = decode(b);
return a;
}
//!
//! Encodes string \a s and returns the result as a string.
-QString Base64::encodeString(const QString &s)
+TQString Base64::encodeString(const TQString &s)
{
- QCString c = s.utf8();
+ TQCString c = s.utf8();
int len = c.length();
- QByteArray b(len);
+ TQByteArray b(len);
memcpy(b.data(), c.data(), len);
return arrayToString(b);
}
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/base64.h b/kopete/protocols/jabber/libiris/cutestuff/util/base64.h
index 3aae2ba6..eaa2ff5b 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/base64.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/base64.h
@@ -21,18 +21,18 @@
#ifndef CS_BASE64_H
#define CS_BASE64_H
-#include<qstring.h>
+#include<tqstring.h>
// CS_NAMESPACE_BEGIN
class Base64
{
public:
- static QByteArray encode(const QByteArray &);
- static QByteArray decode(const QByteArray &);
- static QString arrayToString(const QByteArray &);
- static QByteArray stringToArray(const QString &);
- static QString encodeString(const QString &);
+ static TQByteArray encode(const TQByteArray &);
+ static TQByteArray decode(const TQByteArray &);
+ static TQString arrayToString(const TQByteArray &);
+ static TQByteArray stringToArray(const TQString &);
+ static TQString encodeString(const TQString &);
};
// CS_NAMESPACE_END
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.cpp
index 068e39a0..e78c2f9a 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.cpp
@@ -35,7 +35,7 @@
//!
//! The signals connectionClosed(), delayedCloseFinished(), readyRead(),
//! bytesWritten(), and error() serve the exact same function as those from
-//! <A HREF="http://doc.trolltech.com/3.1/qsocket.html">QSocket</A>.
+//! <A HREF="http://doc.trolltech.com/3.1/tqsocket.html">TQSocket</A>.
//!
//! The simplest way to create a ByteStream is to reimplement isOpen(), close(),
//! and tryWrite(). Call appendRead() whenever you want to make data available for
@@ -59,13 +59,13 @@ class ByteStream::Private
public:
Private() {}
- QByteArray readBuf, writeBuf;
+ TQByteArray readBuf, writeBuf;
};
//!
//! Constructs a ByteStream object with parent \a parent.
-ByteStream::ByteStream(QObject *parent)
-:QObject(parent)
+ByteStream::ByteStream(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
}
@@ -95,7 +95,7 @@ void ByteStream::close()
//!
//! Writes array \a a to the stream.
-void ByteStream::write(const QByteArray &a)
+void ByteStream::write(const TQByteArray &a)
{
if(!isOpen())
return;
@@ -109,7 +109,7 @@ void ByteStream::write(const QByteArray &a)
//!
//! Reads bytes \a bytes of data from the stream and returns them as an array. If \a bytes is 0, then
//! \a read will return all available data.
-QByteArray ByteStream::read(int bytes)
+TQByteArray ByteStream::read(int bytes)
{
return takeRead(bytes);
}
@@ -130,9 +130,9 @@ int ByteStream::bytesToWrite() const
//!
//! Writes string \a cs to the stream.
-void ByteStream::write(const QCString &cs)
+void ByteStream::write(const TQCString &cs)
{
- QByteArray block(cs.length());
+ TQByteArray block(cs.length());
memcpy(block.data(), cs.data(), block.size());
write(block);
}
@@ -153,14 +153,14 @@ void ByteStream::clearWriteBuffer()
//!
//! Appends \a block to the end of the read buffer.
-void ByteStream::appendRead(const QByteArray &block)
+void ByteStream::appendRead(const TQByteArray &block)
{
appendArray(&d->readBuf, block);
}
//!
//! Appends \a block to the end of the write buffer.
-void ByteStream::appendWrite(const QByteArray &block)
+void ByteStream::appendWrite(const TQByteArray &block)
{
appendArray(&d->writeBuf, block);
}
@@ -169,7 +169,7 @@ void ByteStream::appendWrite(const QByteArray &block)
//! Returns \a size bytes from the start of the read buffer.
//! If \a size is 0, then all available data will be returned.
//! If \a del is TRUE, then the bytes are also removed.
-QByteArray ByteStream::takeRead(int size, bool del)
+TQByteArray ByteStream::takeRead(int size, bool del)
{
return takeArray(&d->readBuf, size, del);
}
@@ -178,21 +178,21 @@ QByteArray ByteStream::takeRead(int size, bool del)
//! Returns \a size bytes from the start of the write buffer.
//! If \a size is 0, then all available data will be returned.
//! If \a del is TRUE, then the bytes are also removed.
-QByteArray ByteStream::takeWrite(int size, bool del)
+TQByteArray ByteStream::takeWrite(int size, bool del)
{
return takeArray(&d->writeBuf, size, del);
}
//!
//! Returns a reference to the read buffer.
-QByteArray & ByteStream::readBuf()
+TQByteArray & ByteStream::readBuf()
{
return d->readBuf;
}
//!
//! Returns a reference to the write buffer.
-QByteArray & ByteStream::writeBuf()
+TQByteArray & ByteStream::writeBuf()
{
return d->writeBuf;
}
@@ -207,7 +207,7 @@ int ByteStream::tryWrite()
//!
//! Append array \a b to the end of the array pointed to by \a a.
-void ByteStream::appendArray(QByteArray *a, const QByteArray &b)
+void ByteStream::appendArray(TQByteArray *a, const TQByteArray &b)
{
int oldsize = a->size();
a->resize(oldsize + b.size());
@@ -218,9 +218,9 @@ void ByteStream::appendArray(QByteArray *a, const QByteArray &b)
//! Returns \a size bytes from the start of the array pointed to by \a from.
//! If \a size is 0, then all available data will be returned.
//! If \a del is TRUE, then the bytes are also removed.
-QByteArray ByteStream::takeArray(QByteArray *from, int size, bool del)
+TQByteArray ByteStream::takeArray(TQByteArray *from, int size, bool del)
{
- QByteArray a;
+ TQByteArray a;
if(size == 0) {
a = from->copy();
if(del)
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.h b/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.h
index b90f109d..f10b46a1 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/bytestream.h
@@ -21,8 +21,8 @@
#ifndef CS_BYTESTREAM_H
#define CS_BYTESTREAM_H
-#include<qobject.h>
-#include<qcstring.h>
+#include<tqobject.h>
+#include<tqcstring.h>
// CS_NAMESPACE_BEGIN
@@ -32,20 +32,20 @@ class ByteStream : public QObject
Q_OBJECT
public:
enum Error { ErrRead, ErrWrite, ErrCustom = 10 };
- ByteStream(QObject *parent=0);
+ ByteStream(TQObject *parent=0);
virtual ~ByteStream()=0;
virtual bool isOpen() const;
virtual void close();
- virtual void write(const QByteArray &);
- virtual QByteArray read(int bytes=0);
+ virtual void write(const TQByteArray &);
+ virtual TQByteArray read(int bytes=0);
virtual int bytesAvailable() const;
virtual int bytesToWrite() const;
- void write(const QCString &);
+ void write(const TQCString &);
- static void appendArray(QByteArray *a, const QByteArray &b);
- static QByteArray takeArray(QByteArray *from, int size=0, bool del=true);
+ static void appendArray(TQByteArray *a, const TQByteArray &b);
+ static TQByteArray takeArray(TQByteArray *from, int size=0, bool del=true);
signals:
void connectionClosed();
@@ -57,12 +57,12 @@ signals:
protected:
void clearReadBuffer();
void clearWriteBuffer();
- void appendRead(const QByteArray &);
- void appendWrite(const QByteArray &);
- QByteArray takeRead(int size=0, bool del=true);
- QByteArray takeWrite(int size=0, bool del=true);
- QByteArray & readBuf();
- QByteArray & writeBuf();
+ void appendRead(const TQByteArray &);
+ void appendWrite(const TQByteArray &);
+ TQByteArray takeRead(int size=0, bool del=true);
+ TQByteArray takeWrite(int size=0, bool del=true);
+ TQByteArray & readBuf();
+ TQByteArray & writeBuf();
virtual int tryWrite();
private:
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/cipher.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/cipher.cpp
index f1581a6f..8f918dde 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/cipher.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/cipher.cpp
@@ -25,9 +25,9 @@
#include"bytestream.h"
#include"qrandom.h"
-static bool lib_encryptArray(const EVP_CIPHER *type, const QByteArray &buf, const QByteArray &key, const QByteArray &iv, bool pad, QByteArray *out)
+static bool lib_encryptArray(const EVP_CIPHER *type, const TQByteArray &buf, const TQByteArray &key, const TQByteArray &iv, bool pad, TQByteArray *out)
{
- QByteArray result(buf.size()+type->block_size);
+ TQByteArray result(buf.size()+type->block_size);
int len;
EVP_CIPHER_CTX c;
@@ -42,7 +42,7 @@ static bool lib_encryptArray(const EVP_CIPHER *type, const QByteArray &buf, cons
return false;
result.resize(len);
if(pad) {
- QByteArray last(type->block_size);
+ TQByteArray last(type->block_size);
if(!EVP_EncryptFinal_ex(&c, (unsigned char *)last.data(), &len))
return false;
last.resize(len);
@@ -54,9 +54,9 @@ static bool lib_encryptArray(const EVP_CIPHER *type, const QByteArray &buf, cons
return true;
}
-static bool lib_decryptArray(const EVP_CIPHER *type, const QByteArray &buf, const QByteArray &key, const QByteArray &iv, bool pad, QByteArray *out)
+static bool lib_decryptArray(const EVP_CIPHER *type, const TQByteArray &buf, const TQByteArray &key, const TQByteArray &iv, bool pad, TQByteArray *out)
{
- QByteArray result(buf.size()+type->block_size);
+ TQByteArray result(buf.size()+type->block_size);
int len;
EVP_CIPHER_CTX c;
@@ -77,7 +77,7 @@ static bool lib_decryptArray(const EVP_CIPHER *type, const QByteArray &buf, cons
}
result.resize(len);
if(pad) {
- QByteArray last(type->block_size);
+ TQByteArray last(type->block_size);
if(!EVP_DecryptFinal_ex(&c, (unsigned char *)last.data(), &len))
return false;
last.resize(len);
@@ -89,9 +89,9 @@ static bool lib_decryptArray(const EVP_CIPHER *type, const QByteArray &buf, cons
return true;
}
-static bool lib_generateKeyIV(const EVP_CIPHER *type, const QByteArray &data, const QByteArray &salt, QByteArray *key, QByteArray *iv)
+static bool lib_generateKeyIV(const EVP_CIPHER *type, const TQByteArray &data, const TQByteArray &salt, TQByteArray *key, TQByteArray *iv)
{
- QByteArray k, i;
+ TQByteArray k, i;
unsigned char *kp = 0;
unsigned char *ip = 0;
if(key) {
@@ -129,7 +129,7 @@ Cipher::Key Cipher::generateKey(Type t)
const EVP_CIPHER *type = typeToCIPHER(t);
if(!type)
return k;
- QByteArray out;
+ TQByteArray out;
if(!lib_generateKeyIV(type, QRandom::randomArray(128), QRandom::randomArray(2), &out, 0))
return k;
k.setType(t);
@@ -137,14 +137,14 @@ Cipher::Key Cipher::generateKey(Type t)
return k;
}
-QByteArray Cipher::generateIV(Type t)
+TQByteArray Cipher::generateIV(Type t)
{
const EVP_CIPHER *type = typeToCIPHER(t);
if(!type)
- return QByteArray();
- QByteArray out;
- if(!lib_generateKeyIV(type, QCString("Get this man an iv!"), QByteArray(), 0, &out))
- return QByteArray();
+ return TQByteArray();
+ TQByteArray out;
+ if(!lib_generateKeyIV(type, TQCString("Get this man an iv!"), TQByteArray(), 0, &out))
+ return TQByteArray();
return out;
}
@@ -156,32 +156,32 @@ int Cipher::ivSize(Type t)
return type->iv_len;
}
-QByteArray Cipher::encrypt(const QByteArray &buf, const Key &key, const QByteArray &iv, bool pad, bool *ok)
+TQByteArray Cipher::encrypt(const TQByteArray &buf, const Key &key, const TQByteArray &iv, bool pad, bool *ok)
{
if(ok)
*ok = false;
const EVP_CIPHER *type = typeToCIPHER(key.type());
if(!type)
- return QByteArray();
- QByteArray out;
+ return TQByteArray();
+ TQByteArray out;
if(!lib_encryptArray(type, buf, key.data(), iv, pad, &out))
- return QByteArray();
+ return TQByteArray();
if(ok)
*ok = true;
return out;
}
-QByteArray Cipher::decrypt(const QByteArray &buf, const Key &key, const QByteArray &iv, bool pad, bool *ok)
+TQByteArray Cipher::decrypt(const TQByteArray &buf, const Key &key, const TQByteArray &iv, bool pad, bool *ok)
{
if(ok)
*ok = false;
const EVP_CIPHER *type = typeToCIPHER(key.type());
if(!type)
- return QByteArray();
- QByteArray out;
+ return TQByteArray();
+ TQByteArray out;
if(!lib_decryptArray(type, buf, key.data(), iv, pad, &out))
- return QByteArray();
+ return TQByteArray();
if(ok)
*ok = true;
@@ -272,7 +272,7 @@ RSAKey generateRSAKey()
return key;
}
-QByteArray encryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok)
+TQByteArray encryptRSA(const TQByteArray &buf, const RSAKey &key, bool *ok)
{
if(ok)
*ok = false;
@@ -281,12 +281,12 @@ QByteArray encryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok)
int flen = buf.size();
if(flen >= size - 11)
flen = size - 11;
- QByteArray result(size);
+ TQByteArray result(size);
unsigned char *from = (unsigned char *)buf.data();
unsigned char *to = (unsigned char *)result.data();
int r = RSA_public_encrypt(flen, from, to, (RSA *)key.data(), RSA_PKCS1_PADDING);
if(r == -1)
- return QByteArray();
+ return TQByteArray();
result.resize(r);
if(ok)
@@ -294,19 +294,19 @@ QByteArray encryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok)
return result;
}
-QByteArray decryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok)
+TQByteArray decryptRSA(const TQByteArray &buf, const RSAKey &key, bool *ok)
{
if(ok)
*ok = false;
int size = RSA_size((RSA *)key.data());
int flen = buf.size();
- QByteArray result(size);
+ TQByteArray result(size);
unsigned char *from = (unsigned char *)buf.data();
unsigned char *to = (unsigned char *)result.data();
int r = RSA_private_decrypt(flen, from, to, (RSA *)key.data(), RSA_PKCS1_PADDING);
if(r == -1)
- return QByteArray();
+ return TQByteArray();
result.resize(r);
if(ok)
@@ -314,7 +314,7 @@ QByteArray decryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok)
return result;
}
-QByteArray encryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok)
+TQByteArray encryptRSA2(const TQByteArray &buf, const RSAKey &key, bool *ok)
{
if(ok)
*ok = false;
@@ -323,12 +323,12 @@ QByteArray encryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok)
int flen = buf.size();
if(flen >= size - 41)
flen = size - 41;
- QByteArray result(size);
+ TQByteArray result(size);
unsigned char *from = (unsigned char *)buf.data();
unsigned char *to = (unsigned char *)result.data();
int r = RSA_public_encrypt(flen, from, to, (RSA *)key.data(), RSA_PKCS1_OAEP_PADDING);
if(r == -1)
- return QByteArray();
+ return TQByteArray();
result.resize(r);
if(ok)
@@ -336,19 +336,19 @@ QByteArray encryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok)
return result;
}
-QByteArray decryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok)
+TQByteArray decryptRSA2(const TQByteArray &buf, const RSAKey &key, bool *ok)
{
if(ok)
*ok = false;
int size = RSA_size((RSA *)key.data());
int flen = buf.size();
- QByteArray result(size);
+ TQByteArray result(size);
unsigned char *from = (unsigned char *)buf.data();
unsigned char *to = (unsigned char *)result.data();
int r = RSA_private_decrypt(flen, from, to, (RSA *)key.data(), RSA_PKCS1_OAEP_PADDING);
if(r == -1)
- return QByteArray();
+ return TQByteArray();
result.resize(r);
if(ok)
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/cipher.h b/kopete/protocols/jabber/libiris/cutestuff/util/cipher.h
index 148deff8..02c7606c 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/cipher.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/cipher.h
@@ -21,8 +21,8 @@
#ifndef CS_CIPHER_H
#define CS_CIPHER_H
-#include<qstring.h>
-#include<qcstring.h>
+#include<tqstring.h>
+#include<tqcstring.h>
namespace Cipher
{
@@ -36,19 +36,19 @@ namespace Cipher
bool isValid() const { return (v_type == None ? false: true); }
void setType(Type x) { v_type = x; }
Type type() const { return v_type; }
- void setData(const QByteArray &d) { v_data = d; }
- const QByteArray & data() const { return v_data; }
+ void setData(const TQByteArray &d) { v_data = d; }
+ const TQByteArray & data() const { return v_data; }
private:
Type v_type;
- QByteArray v_data;
+ TQByteArray v_data;
};
Key generateKey(Type);
- QByteArray generateIV(Type);
+ TQByteArray generateIV(Type);
int ivSize(Type);
- QByteArray encrypt(const QByteArray &, const Key &, const QByteArray &iv, bool pad, bool *ok=0);
- QByteArray decrypt(const QByteArray &, const Key &, const QByteArray &iv, bool pad, bool *ok=0);
+ TQByteArray encrypt(const TQByteArray &, const Key &, const TQByteArray &iv, bool pad, bool *ok=0);
+ TQByteArray decrypt(const TQByteArray &, const Key &, const TQByteArray &iv, bool pad, bool *ok=0);
}
class RSAKey
@@ -71,9 +71,9 @@ private:
};
RSAKey generateRSAKey();
-QByteArray encryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok=0);
-QByteArray decryptRSA(const QByteArray &buf, const RSAKey &key, bool *ok=0);
-QByteArray encryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok=0);
-QByteArray decryptRSA2(const QByteArray &buf, const RSAKey &key, bool *ok=0);
+TQByteArray encryptRSA(const TQByteArray &buf, const RSAKey &key, bool *ok=0);
+TQByteArray decryptRSA(const TQByteArray &buf, const RSAKey &key, bool *ok=0);
+TQByteArray encryptRSA2(const TQByteArray &buf, const RSAKey &key, bool *ok=0);
+TQByteArray decryptRSA2(const TQByteArray &buf, const RSAKey &key, bool *ok=0);
#endif
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.cpp
index 3becd7c5..9805de2f 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.cpp
@@ -9,15 +9,15 @@ uchar QRandom::randomChar()
uint QRandom::randomInt()
{
- QByteArray a = randomArray(sizeof(uint));
+ TQByteArray a = randomArray(sizeof(uint));
uint x;
memcpy(&x, a.data(), a.size());
return x;
}
-QByteArray QRandom::randomArray(uint size)
+TQByteArray QRandom::randomArray(uint size)
{
- QByteArray a(size);
+ TQByteArray a(size);
for(uint n = 0; n < size; ++n)
a[n] = randomChar();
return a;
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.h b/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.h
index 92339fb0..f04c7e0f 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/qrandom.h
@@ -1,14 +1,14 @@
#ifndef CS_QRANDOM_H
#define CS_QRANDOM_H
-#include<qcstring.h>
+#include<tqcstring.h>
class QRandom
{
public:
static uchar randomChar();
static uint randomInt();
- static QByteArray randomArray(uint size);
+ static TQByteArray randomArray(uint size);
};
#endif
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.cpp
index 6bd012e9..12ed189b 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.cpp
@@ -1,6 +1,6 @@
#include"safedelete.h"
-#include<qtimer.h>
+#include<tqtimer.h>
//----------------------------------------------------------------------------
// SafeDelete
@@ -16,7 +16,7 @@ SafeDelete::~SafeDelete()
lock->dying();
}
-void SafeDelete::deleteLater(QObject *o)
+void SafeDelete::deleteLater(TQObject *o)
{
if(!lock)
deleteSingle(o);
@@ -35,16 +35,16 @@ void SafeDelete::deleteAll()
if(list.isEmpty())
return;
- QObjectListIt it(list);
- for(QObject *o; (o = it.current()); ++it)
+ TQObjectListIt it(list);
+ for(TQObject *o; (o = it.current()); ++it)
deleteSingle(o);
list.clear();
}
-void SafeDelete::deleteSingle(QObject *o)
+void SafeDelete::deleteSingle(TQObject *o)
{
#if QT_VERSION < 0x030000
- // roll our own QObject::deleteLater()
+ // roll our own TQObject::deleteLater()
SafeDeleteLater *sdl = SafeDeleteLater::ensureExists();
sdl->deleteItLater(o);
#else
@@ -97,7 +97,7 @@ SafeDeleteLater::SafeDeleteLater()
{
list.setAutoDelete(true);
self = this;
- QTimer::singleShot(0, this, SLOT(explode()));
+ TQTimer::singleShot(0, this, TQT_SLOT(explode()));
}
SafeDeleteLater::~SafeDeleteLater()
@@ -106,7 +106,7 @@ SafeDeleteLater::~SafeDeleteLater()
self = 0;
}
-void SafeDeleteLater::deleteItLater(QObject *o)
+void SafeDeleteLater::deleteItLater(TQObject *o)
{
list.append(o);
}
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.h b/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.h
index 078d36cd..add5af6b 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/safedelete.h
@@ -1,8 +1,8 @@
#ifndef SAFEDELETE_H
#define SAFEDELETE_H
-#include<qobject.h>
-#include<qobjectlist.h>
+#include<tqobject.h>
+#include<tqobjectlist.h>
class SafeDelete;
class SafeDeleteLock
@@ -24,13 +24,13 @@ public:
SafeDelete();
~SafeDelete();
- void deleteLater(QObject *o);
+ void deleteLater(TQObject *o);
- // same as QObject::deleteLater()
- static void deleteSingle(QObject *o);
+ // same as TQObject::deleteLater()
+ static void deleteSingle(TQObject *o);
private:
- QObjectList list;
+ TQObjectList list;
void deleteAll();
friend class SafeDeleteLock;
@@ -43,7 +43,7 @@ class SafeDeleteLater : public QObject
Q_OBJECT
public:
static SafeDeleteLater *ensureExists();
- void deleteItLater(QObject *o);
+ void deleteItLater(TQObject *o);
private slots:
void explode();
@@ -52,7 +52,7 @@ private:
SafeDeleteLater();
~SafeDeleteLater();
- QObjectList list;
+ TQObjectList list;
friend class SafeDelete;
static SafeDeleteLater *self;
};
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp
index f4ad554f..a3195d89 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/sha1.cpp
@@ -161,10 +161,10 @@ void SHA1::final(unsigned char digest[20], SHA1_CONTEXT* context)
memset(&finalcount, 0, 8);
}
-QByteArray SHA1::hash(const QByteArray &a)
+TQByteArray SHA1::hash(const TQByteArray &a)
{
SHA1_CONTEXT context;
- QByteArray b(20);
+ TQByteArray b(20);
SHA1 s;
s.init(&context);
@@ -173,19 +173,19 @@ QByteArray SHA1::hash(const QByteArray &a)
return b;
}
-QByteArray SHA1::hashString(const QCString &cs)
+TQByteArray SHA1::hashString(const TQCString &cs)
{
- QByteArray a(cs.length());
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return SHA1::hash(a);
}
-QString SHA1::digest(const QString &in)
+TQString SHA1::digest(const TQString &in)
{
- QByteArray a = SHA1::hashString(in.utf8());
- QString out;
+ TQByteArray a = SHA1::hashString(in.utf8());
+ TQString out;
for(int n = 0; n < (int)a.size(); ++n) {
- QString str;
+ TQString str;
str.sprintf("%02x", (uchar)a[n]);
out.append(str);
}
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/sha1.h b/kopete/protocols/jabber/libiris/cutestuff/util/sha1.h
index 797c3753..7f1a3f9e 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/sha1.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/sha1.h
@@ -21,16 +21,16 @@
#ifndef CS_SHA1_H
#define CS_SHA1_H
-#include<qstring.h>
+#include<tqstring.h>
// CS_NAMESPACE_BEGIN
class SHA1
{
public:
- static QByteArray hash(const QByteArray &);
- static QByteArray hashString(const QCString &);
- static QString digest(const QString &);
+ static TQByteArray hash(const TQByteArray &);
+ static TQByteArray hashString(const TQCString &);
+ static TQString digest(const TQString &);
private:
SHA1();
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.cpp b/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.cpp
index fa446d58..0c8b46df 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.cpp
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.cpp
@@ -20,38 +20,38 @@
#include"showtextdlg.h"
-#include<qlayout.h>
-#include<qtextedit.h>
-#include<qpushbutton.h>
-#include<qfile.h>
-#include<qtextstream.h>
+#include<tqlayout.h>
+#include<tqtextedit.h>
+#include<tqpushbutton.h>
+#include<tqfile.h>
+#include<tqtextstream.h>
-ShowTextDlg::ShowTextDlg(const QString &fname, bool rich, QWidget *parent, const char *name)
-:QDialog(parent, name, FALSE, WDestructiveClose)
+ShowTextDlg::ShowTextDlg(const TQString &fname, bool rich, TQWidget *parent, const char *name)
+:TQDialog(parent, name, FALSE, WDestructiveClose)
{
- QString text;
+ TQString text;
- QFile f(fname);
+ TQFile f(fname);
if(f.open(IO_ReadOnly)) {
- QTextStream t(&f);
+ TQTextStream t(&f);
while(!t.eof())
text += t.readLine() + '\n';
f.close();
}
- QVBoxLayout *vb1 = new QVBoxLayout(this, 8);
- QTextEdit *te = new QTextEdit(this);
+ TQVBoxLayout *vb1 = new TQVBoxLayout(this, 8);
+ TQTextEdit *te = new TQTextEdit(this);
te->setReadOnly(TRUE);
- te->setTextFormat(rich ? QTextEdit::RichText : QTextEdit::PlainText);
+ te->setTextFormat(rich ? TQTextEdit::RichText : TQTextEdit::PlainText);
te->setText(text);
vb1->addWidget(te);
- QHBoxLayout *hb1 = new QHBoxLayout(vb1);
+ TQHBoxLayout *hb1 = new TQHBoxLayout(vb1);
hb1->addStretch(1);
- QPushButton *pb = new QPushButton(tr("&OK"), this);
- connect(pb, SIGNAL(clicked()), SLOT(accept()));
+ TQPushButton *pb = new TQPushButton(tr("&OK"), this);
+ connect(pb, TQT_SIGNAL(clicked()), TQT_SLOT(accept()));
hb1->addWidget(pb);
hb1->addStretch(1);
diff --git a/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.h b/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.h
index 08c74c5d..3d92dd74 100644
--- a/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.h
+++ b/kopete/protocols/jabber/libiris/cutestuff/util/showtextdlg.h
@@ -21,13 +21,13 @@
#ifndef CS_SHOWTEXTDLG_H
#define CS_SHOWTEXTDLG_H
-#include<qdialog.h>
+#include<tqdialog.h>
class ShowTextDlg : public QDialog
{
Q_OBJECT
public:
- ShowTextDlg(const QString &fname, bool rich=FALSE, QWidget *parent=0, const char *name=0);
+ ShowTextDlg(const TQString &fname, bool rich=FALSE, TQWidget *parent=0, const char *name=0);
};
#endif
diff --git a/kopete/protocols/jabber/libiris/iris/include/im.h b/kopete/protocols/jabber/libiris/iris/include/im.h
index 170338fc..f4905057 100644
--- a/kopete/protocols/jabber/libiris/iris/include/im.h
+++ b/kopete/protocols/jabber/libiris/iris/include/im.h
@@ -21,8 +21,8 @@
#ifndef XMPP_IM_H
#define XMPP_IM_H
-#include<qdatetime.h>
-#include<qvaluelist.h>
+#include<tqdatetime.h>
+#include<tqvaluelist.h>
#include"xmpp.h"
namespace XMPP
@@ -30,24 +30,24 @@ namespace XMPP
class Url
{
public:
- Url(const QString &url="", const QString &desc="");
+ Url(const TQString &url="", const TQString &desc="");
Url(const Url &);
Url & operator=(const Url &);
~Url();
- QString url() const;
- QString desc() const;
+ TQString url() const;
+ TQString desc() const;
- void setUrl(const QString &);
- void setDesc(const QString &);
+ void setUrl(const TQString &);
+ void setDesc(const TQString &);
private:
class Private;
Private *d;
};
- typedef QValueList<Url> UrlList;
- typedef QMap<QString, QString> StringMap;
+ typedef TQValueList<Url> UrlList;
+ typedef TQMap<TQString, TQString> StringMap;
typedef enum { OfflineEvent, DeliveredEvent, DisplayedEvent,
ComposingEvent, CancelEvent, InactiveEvent, GoneEvent } MsgEvent;
@@ -61,29 +61,29 @@ namespace XMPP
Jid to() const;
Jid from() const;
- QString id() const;
- QString type() const;
- QString lang() const;
- QString subject(const QString &lang="") const;
- QString body(const QString &lang="") const;
- QString xHTMLBody(const QString &lang="") const;
- QString thread() const;
+ TQString id() const;
+ TQString type() const;
+ TQString lang() const;
+ TQString subject(const TQString &lang="") const;
+ TQString body(const TQString &lang="") const;
+ TQString xHTMLBody(const TQString &lang="") const;
+ TQString thread() const;
Stanza::Error error() const;
void setTo(const Jid &j);
void setFrom(const Jid &j);
- void setId(const QString &s);
- void setType(const QString &s);
- void setLang(const QString &s);
- void setSubject(const QString &s, const QString &lang="");
- void setBody(const QString &s, const QString &lang="");
- void setXHTMLBody(const QString &s, const QString &lang="", const QString &attr = "");
- void setThread(const QString &s);
+ void setId(const TQString &s);
+ void setType(const TQString &s);
+ void setLang(const TQString &s);
+ void setSubject(const TQString &s, const TQString &lang="");
+ void setBody(const TQString &s, const TQString &lang="");
+ void setXHTMLBody(const TQString &s, const TQString &lang="", const TQString &attr = "");
+ void setThread(const TQString &s);
void setError(const Stanza::Error &err);
// JEP-0091
- QDateTime timeStamp() const;
- void setTimeStamp(const QDateTime &ts);
+ TQDateTime timeStamp() const;
+ void setTimeStamp(const TQDateTime &ts);
// JEP-0066
UrlList urlList() const;
@@ -92,19 +92,19 @@ namespace XMPP
void setUrlList(const UrlList &list);
// JEP-0022
- QString eventId() const;
- void setEventId(const QString& id);
+ TQString eventId() const;
+ void setEventId(const TQString& id);
bool containsEvents() const;
bool containsEvent(MsgEvent e) const;
void addEvent(MsgEvent e);
// JEP-0027
- QString xencrypted() const;
- void setXEncrypted(const QString &s);
+ TQString xencrypted() const;
+ void setXEncrypted(const TQString &s);
// Obsolete invitation
- QString invite() const;
- void setInvite(const QString &s);
+ TQString invite() const;
+ void setInvite(const TQString &s);
// for compatibility. delete me later
bool spooled() const;
@@ -129,8 +129,8 @@ namespace XMPP
int type() const;
- QString toString() const;
- bool fromString(const QString &);
+ TQString toString() const;
+ bool fromString(const TQString &);
private:
SubType value;
@@ -139,56 +139,56 @@ namespace XMPP
class Status
{
public:
- Status(const QString &show="", const QString &status="", int priority=0, bool available=true);
+ Status(const TQString &show="", const TQString &status="", int priority=0, bool available=true);
~Status();
int priority() const;
- const QString & show() const;
- const QString & status() const;
- QDateTime timeStamp() const;
- const QString & keyID() const;
+ const TQString & show() const;
+ const TQString & status() const;
+ TQDateTime timeStamp() const;
+ const TQString & keyID() const;
bool isAvailable() const;
bool isAway() const;
bool isInvisible() const;
bool hasError() const;
int errorCode() const;
- const QString & errorString() const;
+ const TQString & errorString() const;
- const QString & xsigned() const;
- const QString & songTitle() const;
- const QString & capsNode() const;
- const QString & capsVersion() const;
- const QString & capsExt() const;
+ const TQString & xsigned() const;
+ const TQString & songTitle() const;
+ const TQString & capsNode() const;
+ const TQString & capsVersion() const;
+ const TQString & capsExt() const;
void setPriority(int);
- void setShow(const QString &);
- void setStatus(const QString &);
- void setTimeStamp(const QDateTime &);
- void setKeyID(const QString &);
+ void setShow(const TQString &);
+ void setStatus(const TQString &);
+ void setTimeStamp(const TQDateTime &);
+ void setKeyID(const TQString &);
void setIsAvailable(bool);
void setIsInvisible(bool);
- void setError(int, const QString &);
- void setCapsNode(const QString&);
- void setCapsVersion(const QString&);
- void setCapsExt(const QString&);
+ void setError(int, const TQString &);
+ void setCapsNode(const TQString&);
+ void setCapsVersion(const TQString&);
+ void setCapsExt(const TQString&);
- void setXSigned(const QString &);
- void setSongTitle(const QString &);
+ void setXSigned(const TQString &);
+ void setSongTitle(const TQString &);
private:
int v_priority;
- QString v_show, v_status, v_key;
- QDateTime v_timeStamp;
+ TQString v_show, v_status, v_key;
+ TQDateTime v_timeStamp;
bool v_isAvailable;
bool v_isInvisible;
- QString v_xsigned;
+ TQString v_xsigned;
// gabber song extension
- QString v_songTitle;
- QString v_capsNode, v_capsVersion, v_capsExt;
+ TQString v_songTitle;
+ TQString v_capsNode, v_capsVersion, v_capsExt;
int ecode;
- QString estr;
+ TQString estr;
class Private;
Private *d;
@@ -197,33 +197,33 @@ namespace XMPP
class Resource
{
public:
- Resource(const QString &name="", const Status &s=Status());
+ Resource(const TQString &name="", const Status &s=Status());
~Resource();
- const QString & name() const;
+ const TQString & name() const;
int priority() const;
const Status & status() const;
- void setName(const QString &);
+ void setName(const TQString &);
void setStatus(const Status &);
private:
- QString v_name;
+ TQString v_name;
Status v_status;
class ResourcePrivate *d;
};
- class ResourceList : public QValueList<Resource>
+ class ResourceList : public TQValueList<Resource>
{
public:
ResourceList();
~ResourceList();
- ResourceList::Iterator find(const QString &);
+ ResourceList::Iterator find(const TQString &);
ResourceList::Iterator priority();
- ResourceList::ConstIterator find(const QString &) const;
+ ResourceList::ConstIterator find(const TQString &) const;
ResourceList::ConstIterator priority() const;
private:
@@ -237,37 +237,37 @@ namespace XMPP
virtual ~RosterItem();
const Jid & jid() const;
- const QString & name() const;
- const QStringList & groups() const;
+ const TQString & name() const;
+ const TQStringList & groups() const;
const Subscription & subscription() const;
- const QString & ask() const;
+ const TQString & ask() const;
bool isPush() const;
- bool inGroup(const QString &) const;
+ bool inGroup(const TQString &) const;
virtual void setJid(const Jid &);
- void setName(const QString &);
- void setGroups(const QStringList &);
+ void setName(const TQString &);
+ void setGroups(const TQStringList &);
void setSubscription(const Subscription &);
- void setAsk(const QString &);
+ void setAsk(const TQString &);
void setIsPush(bool);
- bool addGroup(const QString &);
- bool removeGroup(const QString &);
+ bool addGroup(const TQString &);
+ bool removeGroup(const TQString &);
- QDomElement toXml(QDomDocument *) const;
- bool fromXml(const QDomElement &);
+ TQDomElement toXml(TQDomDocument *) const;
+ bool fromXml(const TQDomElement &);
private:
Jid v_jid;
- QString v_name;
- QStringList v_groups;
+ TQString v_name;
+ TQStringList v_groups;
Subscription v_subscription;
- QString v_ask;
+ TQString v_ask;
bool v_push;
class RosterItemPrivate *d;
};
- class Roster : public QValueList<RosterItem>
+ class Roster : public TQValueList<RosterItem>
{
public:
Roster();
@@ -284,12 +284,12 @@ namespace XMPP
{
public:
Features();
- Features(const QStringList &);
- Features(const QString &);
+ Features(const TQStringList &);
+ Features(const TQString &);
~Features();
- QStringList list() const; // actual featurelist
- void setList(const QStringList &);
+ TQStringList list() const; // actual featurelist
+ void setList(const TQStringList &);
// features
bool canRegister() const;
@@ -317,19 +317,19 @@ namespace XMPP
};
// useful functions
- bool test(const QStringList &) const;
+ bool test(const TQStringList &) const;
- QString name() const;
- static QString name(long id);
- static QString name(const QString &feature);
+ TQString name() const;
+ static TQString name(long id);
+ static TQString name(const TQString &feature);
long id() const;
- static long id(const QString &feature);
- static QString feature(long id);
+ static long id(const TQString &feature);
+ static TQString feature(long id);
class FeatureName;
private:
- QStringList _list;
+ TQStringList _list;
};
class AgentItem
@@ -338,24 +338,24 @@ namespace XMPP
AgentItem() { }
const Jid & jid() const { return v_jid; }
- const QString & name() const { return v_name; }
- const QString & category() const { return v_category; }
- const QString & type() const { return v_type; }
+ const TQString & name() const { return v_name; }
+ const TQString & category() const { return v_category; }
+ const TQString & type() const { return v_type; }
const Features & features() const { return v_features; }
void setJid(const Jid &j) { v_jid = j; }
- void setName(const QString &n) { v_name = n; }
- void setCategory(const QString &c) { v_category = c; }
- void setType(const QString &t) { v_type = t; }
+ void setName(const TQString &n) { v_name = n; }
+ void setCategory(const TQString &c) { v_category = c; }
+ void setType(const TQString &t) { v_type = t; }
void setFeatures(const Features &f) { v_features = f; }
private:
Jid v_jid;
- QString v_name, v_category, v_type;
+ TQString v_name, v_category, v_type;
Features v_features;
};
- typedef QValueList<AgentItem> AgentList;
+ typedef TQValueList<AgentItem> AgentList;
class DiscoItem
{
@@ -364,12 +364,12 @@ namespace XMPP
~DiscoItem();
const Jid &jid() const;
- const QString &node() const;
- const QString &name() const;
+ const TQString &node() const;
+ const TQString &name() const;
void setJid(const Jid &);
- void setName(const QString &);
- void setNode(const QString &);
+ void setName(const TQString &);
+ void setNode(const TQString &);
enum Action {
None = 0,
@@ -385,19 +385,19 @@ namespace XMPP
struct Identity
{
- QString category;
- QString name;
- QString type;
+ TQString category;
+ TQString name;
+ TQString type;
};
- typedef QValueList<Identity> Identities;
+ typedef TQValueList<Identity> Identities;
const Identities &identities() const;
void setIdentities(const Identities &);
// some useful helper functions
- static Action string2action(QString s);
- static QString action2string(Action a);
+ static Action string2action(TQString s);
+ static TQString action2string(Action a);
DiscoItem & operator= (const DiscoItem &);
DiscoItem(const DiscoItem &);
@@ -411,51 +411,51 @@ namespace XMPP
Private *d;
};
- typedef QValueList<DiscoItem> DiscoList;
+ typedef TQValueList<DiscoItem> DiscoList;
class FormField
{
public:
enum { username, nick, password, name, first, last, email, address, city, state, zip, phone, url, date, misc };
- FormField(const QString &type="", const QString &value="");
+ FormField(const TQString &type="", const TQString &value="");
~FormField();
int type() const;
- QString fieldName() const;
- QString realName() const;
+ TQString fieldName() const;
+ TQString realName() const;
bool isSecret() const;
- const QString & value() const;
+ const TQString & value() const;
void setType(int);
- bool setType(const QString &);
- void setValue(const QString &);
+ bool setType(const TQString &);
+ void setValue(const TQString &);
private:
- int tagNameToType(const QString &) const;
- QString typeToTagName(int) const;
+ int tagNameToType(const TQString &) const;
+ TQString typeToTagName(int) const;
int v_type;
- QString v_value;
+ TQString v_value;
class Private;
Private *d;
};
- class Form : public QValueList<FormField>
+ class Form : public TQValueList<FormField>
{
public:
Form(const Jid &j="");
~Form();
Jid jid() const;
- QString instructions() const;
- QString key() const;
+ TQString instructions() const;
+ TQString key() const;
void setJid(const Jid &);
- void setInstructions(const QString &);
- void setKey(const QString &);
+ void setInstructions(const TQString &);
+ void setKey(const TQString &);
private:
Jid v_jid;
- QString v_instructions, v_key;
+ TQString v_instructions, v_key;
class Private;
Private *d;
@@ -468,20 +468,20 @@ namespace XMPP
~SearchResult();
const Jid & jid() const;
- const QString & nick() const;
- const QString & first() const;
- const QString & last() const;
- const QString & email() const;
+ const TQString & nick() const;
+ const TQString & first() const;
+ const TQString & last() const;
+ const TQString & email() const;
void setJid(const Jid &);
- void setNick(const QString &);
- void setFirst(const QString &);
- void setLast(const QString &);
- void setEmail(const QString &);
+ void setNick(const TQString &);
+ void setFirst(const TQString &);
+ void setLast(const TQString &);
+ void setEmail(const TQString &);
private:
Jid v_jid;
- QString v_nick, v_first, v_last, v_email;
+ TQString v_nick, v_first, v_last, v_email;
};
class Client;
@@ -503,15 +503,15 @@ namespace XMPP
Task *parent() const;
Client *client() const;
- QDomDocument *doc() const;
- QString id() const;
+ TQDomDocument *doc() const;
+ TQString id() const;
bool success() const;
int statusCode() const;
- const QString & statusString() const;
+ const TQString & statusString() const;
void go(bool autoDelete=false);
- virtual bool take(const QDomElement &);
+ virtual bool take(const TQDomElement &);
void safeDelete();
signals:
@@ -520,13 +520,13 @@ namespace XMPP
protected:
virtual void onGo();
virtual void onDisconnect();
- void send(const QDomElement &);
- void setSuccess(int code=0, const QString &str="");
- void setError(const QDomElement &);
- void setError(int code=0, const QString &str="");
+ void send(const TQDomElement &);
+ void setSuccess(int code=0, const TQString &str="");
+ void setError(const TQDomElement &);
+ void setError(int code=0, const TQString &str="");
void debug(const char *, ...);
- void debug(const QString &);
- bool iqVerify(const QDomElement &x, const Jid &to, const QString &id, const QString &xmlns="");
+ void debug(const TQString &);
+ bool iqVerify(const TQDomElement &x, const Jid &to, const TQString &id, const TQString &xmlns="");
private slots:
void clientDisconnected();
@@ -544,60 +544,60 @@ namespace XMPP
Q_OBJECT
public:
- Client(QObject *parent=0);
+ Client(TQObject *parent=0);
~Client();
bool isActive() const;
void connectToServer(ClientStream *s, const Jid &j, bool auth=true);
- void start(const QString &host, const QString &user, const QString &pass, const QString &resource);
+ void start(const TQString &host, const TQString &user, const TQString &pass, const TQString &resource);
void close(bool fast=false);
Stream & stream();
const LiveRoster & roster() const;
const ResourceList & resourceList() const;
- void send(const QDomElement &);
- void send(const QString &);
+ void send(const TQDomElement &);
+ void send(const TQString &);
- QString host() const;
- QString user() const;
- QString pass() const;
- QString resource() const;
+ TQString host() const;
+ TQString user() const;
+ TQString pass() const;
+ TQString resource() const;
Jid jid() const;
void rosterRequest();
void sendMessage(const Message &);
- void sendSubscription(const Jid &, const QString &);
+ void sendSubscription(const Jid &, const TQString &);
void setPresence(const Status &);
- void debug(const QString &);
- QString genUniqueId();
+ void debug(const TQString &);
+ TQString genUniqueId();
Task *rootTask();
- QDomDocument *doc() const;
+ TQDomDocument *doc() const;
- QString OSName() const;
- QString timeZone() const;
+ TQString OSName() const;
+ TQString timeZone() const;
int timeZoneOffset() const;
- QString clientName() const;
- QString clientVersion() const;
- QString capsNode() const;
- QString capsVersion() const;
- QString capsExt() const;
-
- void setOSName(const QString &);
- void setTimeZone(const QString &, int);
- void setClientName(const QString &);
- void setClientVersion(const QString &);
- void setCapsNode(const QString &);
- void setCapsVersion(const QString &);
+ TQString clientName() const;
+ TQString clientVersion() const;
+ TQString capsNode() const;
+ TQString capsVersion() const;
+ TQString capsExt() const;
+
+ void setOSName(const TQString &);
+ void setTimeZone(const TQString &, int);
+ void setClientName(const TQString &);
+ void setClientVersion(const TQString &);
+ void setCapsNode(const TQString &);
+ void setCapsVersion(const TQString &);
void setIdentity(DiscoItem::Identity);
DiscoItem::Identity identity();
- void addExtension(const QString& ext, const Features& f);
- void removeExtension(const QString& ext);
- const Features& extension(const QString& ext) const;
- QStringList extensions() const;
+ void addExtension(const TQString& ext, const Features& f);
+ void removeExtension(const TQString& ext);
+ const Features& extension(const TQString& ext) const;
+ TQStringList extensions() const;
S5BManager *s5bManager() const;
IBBManager *ibbManager() const;
@@ -606,32 +606,32 @@ namespace XMPP
void setFileTransferEnabled(bool b);
FileTransferManager *fileTransferManager() const;
- bool groupChatJoin(const QString &host, const QString &room, const QString &nick);
- bool groupChatJoin(const QString &host, const QString &room, const QString &nick, const QString &password);
- void groupChatSetStatus(const QString &host, const QString &room, const Status &);
- void groupChatChangeNick(const QString &host, const QString &room, const QString &nick, const Status &);
- void groupChatLeave(const QString &host, const QString &room);
+ bool groupChatJoin(const TQString &host, const TQString &room, const TQString &nick);
+ bool groupChatJoin(const TQString &host, const TQString &room, const TQString &nick, const TQString &password);
+ void groupChatSetStatus(const TQString &host, const TQString &room, const Status &);
+ void groupChatChangeNick(const TQString &host, const TQString &room, const TQString &nick, const Status &);
+ void groupChatLeave(const TQString &host, const TQString &room);
signals:
void activated();
void disconnected();
- //void authFinished(bool, int, const QString &);
- void rosterRequestFinished(bool, int, const QString &);
+ //void authFinished(bool, int, const TQString &);
+ void rosterRequestFinished(bool, int, const TQString &);
void rosterItemAdded(const RosterItem &);
void rosterItemUpdated(const RosterItem &);
void rosterItemRemoved(const RosterItem &);
void resourceAvailable(const Jid &, const Resource &);
void resourceUnavailable(const Jid &, const Resource &);
- void presenceError(const Jid &, int, const QString &);
- void subscription(const Jid &, const QString &);
+ void presenceError(const Jid &, int, const TQString &);
+ void subscription(const Jid &, const TQString &);
void messageReceived(const Message &);
- void debugText(const QString &);
- void xmlIncoming(const QString &);
- void xmlOutgoing(const QString &);
+ void debugText(const TQString &);
+ void xmlIncoming(const TQString &);
+ void xmlOutgoing(const TQString &);
void groupChatJoined(const Jid &);
void groupChatLeft(const Jid &);
void groupChatPresence(const Jid &, const Status &);
- void groupChatError(const Jid &, int, const QString &);
+ void groupChatError(const Jid &, int, const TQString &);
void incomingJidLink();
@@ -643,13 +643,13 @@ namespace XMPP
//void streamCloseFinished();
void streamError(int);
void streamReadyRead();
- void streamIncomingXml(const QString &);
- void streamOutgoingXml(const QString &);
+ void streamIncomingXml(const TQString &);
+ void streamOutgoingXml(const TQString &);
void slotRosterRequestFinished();
// basic daemons
- void ppSubscription(const Jid &, const QString &);
+ void ppSubscription(const Jid &, const TQString &);
void ppPresence(const Jid &, const Status &);
void pmMessage(const Message &);
void prRoster(const Roster &);
@@ -661,7 +661,7 @@ namespace XMPP
class GroupChat;
private:
void cleanup();
- void distribute(const QDomElement &);
+ void distribute(const TQDomElement &);
void importRoster(const Roster &);
void importRosterItem(const RosterItem &);
void updateSelfPresence(const Jid &, const Status &);
@@ -702,7 +702,7 @@ namespace XMPP
LiveRosterItemPrivate *d;
};
- class LiveRoster : public QValueList<LiveRosterItem>
+ class LiveRoster : public TQValueList<LiveRosterItem>
{
public:
LiveRoster();
diff --git a/kopete/protocols/jabber/libiris/iris/include/xmpp.h b/kopete/protocols/jabber/libiris/iris/include/xmpp.h
index dbb1b2cf..12d87d18 100644
--- a/kopete/protocols/jabber/libiris/iris/include/xmpp.h
+++ b/kopete/protocols/jabber/libiris/iris/include/xmpp.h
@@ -21,13 +21,13 @@
#ifndef XMPP_H
#define XMPP_H
-#include<qobject.h>
-#include<qstring.h>
-#include<qhostaddress.h>
-#include<qstring.h>
-#include<qcstring.h>
-#include<qxml.h>
-#include<qdom.h>
+#include<tqobject.h>
+#include<tqstring.h>
+#include<tqhostaddress.h>
+#include<tqstring.h>
+#include<tqcstring.h>
+#include<tqxml.h>
+#include<tqdom.h>
namespace QCA
{
@@ -51,11 +51,11 @@ namespace XMPP
public:
virtual ~Debug();
- virtual void msg(const QString &)=0;
- virtual void outgoingTag(const QString &)=0;
- virtual void incomingTag(const QString &)=0;
- virtual void outgoingXml(const QDomElement &)=0;
- virtual void incomingXml(const QDomElement &)=0;
+ virtual void msg(const TQString &)=0;
+ virtual void outgoingTag(const TQString &)=0;
+ virtual void incomingTag(const TQString &)=0;
+ virtual void outgoingXml(const TQDomElement &)=0;
+ virtual void incomingXml(const TQDomElement &)=0;
};
void setDebug(Debug *);
@@ -64,16 +64,16 @@ namespace XMPP
{
Q_OBJECT
public:
- Connector(QObject *parent=0);
+ Connector(TQObject *parent=0);
virtual ~Connector();
- virtual void connectToServer(const QString &server)=0;
+ virtual void connectToServer(const TQString &server)=0;
virtual ByteStream *stream() const=0;
virtual void done()=0;
bool useSSL() const;
bool havePeerAddress() const;
- QHostAddress peerAddress() const;
+ TQHostAddress peerAddress() const;
Q_UINT16 peerPort() const;
signals:
@@ -83,12 +83,12 @@ namespace XMPP
protected:
void setUseSSL(bool b);
void setPeerAddressNone();
- void setPeerAddress(const QHostAddress &addr, Q_UINT16 port);
+ void setPeerAddress(const TQHostAddress &addr, Q_UINT16 port);
private:
bool ssl;
bool haveaddr;
- QHostAddress addr;
+ TQHostAddress addr;
Q_UINT16 port;
};
@@ -97,7 +97,7 @@ namespace XMPP
Q_OBJECT
public:
enum Error { ErrConnectionRefused, ErrHostNotFound, ErrProxyConnect, ErrProxyNeg, ErrProxyAuth, ErrStream };
- AdvancedConnector(QObject *parent=0);
+ AdvancedConnector(TQObject *parent=0);
virtual ~AdvancedConnector();
class Proxy
@@ -108,42 +108,42 @@ namespace XMPP
~Proxy();
int type() const;
- QString host() const;
+ TQString host() const;
Q_UINT16 port() const;
- QString url() const;
- QString user() const;
- QString pass() const;
+ TQString url() const;
+ TQString user() const;
+ TQString pass() const;
int pollInterval() const;
- void setHttpConnect(const QString &host, Q_UINT16 port);
- void setHttpPoll(const QString &host, Q_UINT16 port, const QString &url);
- void setSocks(const QString &host, Q_UINT16 port);
- void setUserPass(const QString &user, const QString &pass);
+ void setHttpConnect(const TQString &host, Q_UINT16 port);
+ void setHttpPoll(const TQString &host, Q_UINT16 port, const TQString &url);
+ void setSocks(const TQString &host, Q_UINT16 port);
+ void setUserPass(const TQString &user, const TQString &pass);
void setPollInterval(int secs);
private:
int t;
- QString v_host, v_url;
+ TQString v_host, v_url;
Q_UINT16 v_port;
- QString v_user, v_pass;
+ TQString v_user, v_pass;
int v_poll;
};
void setProxy(const Proxy &proxy);
- void setOptHostPort(const QString &host, Q_UINT16 port);
+ void setOptHostPort(const TQString &host, Q_UINT16 port);
void setOptProbe(bool);
void setOptSSL(bool);
void changePollInterval(int secs);
- void connectToServer(const QString &server);
+ void connectToServer(const TQString &server);
ByteStream *stream() const;
void done();
int errorCode() const;
signals:
- void srvLookup(const QString &server);
+ void srvLookup(const TQString &server);
void srvResult(bool success);
void httpSyncStarted();
void httpSyncFinished();
@@ -170,20 +170,20 @@ namespace XMPP
{
Q_OBJECT
public:
- TLSHandler(QObject *parent=0);
+ TLSHandler(TQObject *parent=0);
virtual ~TLSHandler();
virtual void reset()=0;
- virtual void startClient(const QString &host)=0;
- virtual void write(const QByteArray &a)=0;
- virtual void writeIncoming(const QByteArray &a)=0;
+ virtual void startClient(const TQString &host)=0;
+ virtual void write(const TQByteArray &a)=0;
+ virtual void writeIncoming(const TQByteArray &a)=0;
signals:
void success();
void fail();
void closed();
- void readyRead(const QByteArray &a);
- void readyReadOutgoing(const QByteArray &a, int plainBytes);
+ void readyRead(const TQByteArray &a);
+ void readyReadOutgoing(const TQByteArray &a, int plainBytes);
};
class QCATLSHandler : public TLSHandler
@@ -197,9 +197,9 @@ namespace XMPP
int tlsError() const;
void reset();
- void startClient(const QString &host);
- void write(const QByteArray &a);
- void writeIncoming(const QByteArray &a);
+ void startClient(const TQString &host);
+ void write(const TQByteArray &a);
+ void writeIncoming(const TQByteArray &a);
signals:
void tlsHandshaken();
@@ -225,45 +225,45 @@ namespace XMPP
Jid();
~Jid();
- Jid(const QString &s);
+ Jid(const TQString &s);
Jid(const char *s);
- Jid & operator=(const QString &s);
+ Jid & operator=(const TQString &s);
Jid & operator=(const char *s);
- void set(const QString &s);
- void set(const QString &domain, const QString &node, const QString &resource="");
+ void set(const TQString &s);
+ void set(const TQString &domain, const TQString &node, const TQString &resource="");
- void setDomain(const QString &s);
- void setNode(const QString &s);
- void setResource(const QString &s);
+ void setDomain(const TQString &s);
+ void setNode(const TQString &s);
+ void setResource(const TQString &s);
- const QString & domain() const { return d; }
- const QString & node() const { return n; }
- const QString & resource() const { return r; }
- const QString & bare() const { return b; }
- const QString & full() const { return f; }
+ const TQString & domain() const { return d; }
+ const TQString & node() const { return n; }
+ const TQString & resource() const { return r; }
+ const TQString & bare() const { return b; }
+ const TQString & full() const { return f; }
- Jid withNode(const QString &s) const;
- Jid withResource(const QString &s) const;
+ Jid withNode(const TQString &s) const;
+ Jid withResource(const TQString &s) const;
bool isValid() const;
bool isEmpty() const;
bool compare(const Jid &a, bool compareRes=true) const;
- static bool validDomain(const QString &s, QString *norm=0);
- static bool validNode(const QString &s, QString *norm=0);
- static bool validResource(const QString &s, QString *norm=0);
+ static bool validDomain(const TQString &s, TQString *norm=0);
+ static bool validNode(const TQString &s, TQString *norm=0);
+ static bool validResource(const TQString &s, TQString *norm=0);
// TODO: kill these later
- const QString & host() const { return d; }
- const QString & user() const { return n; }
- const QString & userHost() const { return b; }
+ const TQString & host() const { return d; }
+ const TQString & user() const { return n; }
+ const TQString & userHost() const { return b; }
private:
void reset();
void update();
- QString f, b, d, n, r;
+ TQString f, b, d, n, r;
bool valid;
};
@@ -303,42 +303,42 @@ namespace XMPP
class Error
{
public:
- Error(int type=Cancel, int condition=UndefinedCondition, const QString &text="", const QDomElement &appSpec=QDomElement());
+ Error(int type=Cancel, int condition=UndefinedCondition, const TQString &text="", const TQDomElement &appSpec=TQDomElement());
int type;
int condition;
- QString text;
- QDomElement appSpec;
+ TQString text;
+ TQDomElement appSpec;
};
bool isNull() const;
- QDomElement element() const;
- QString toString() const;
+ TQDomElement element() const;
+ TQString toString() const;
- QDomDocument & doc() const;
- QString baseNS() const;
- QString xhtmlImNS() const;
- QString xhtmlNS() const;
- QDomElement createElement(const QString &ns, const QString &tagName);
- QDomElement createTextElement(const QString &ns, const QString &tagName, const QString &text);
- QDomElement createXHTMLElement(const QString &xHTML);
- void appendChild(const QDomElement &e);
+ TQDomDocument & doc() const;
+ TQString baseNS() const;
+ TQString xhtmlImNS() const;
+ TQString xhtmlNS() const;
+ TQDomElement createElement(const TQString &ns, const TQString &tagName);
+ TQDomElement createTextElement(const TQString &ns, const TQString &tagName, const TQString &text);
+ TQDomElement createXHTMLElement(const TQString &xHTML);
+ void appendChild(const TQDomElement &e);
Kind kind() const;
void setKind(Kind k);
Jid to() const;
Jid from() const;
- QString id() const;
- QString type() const;
- QString lang() const;
+ TQString id() const;
+ TQString type() const;
+ TQString lang() const;
void setTo(const Jid &j);
void setFrom(const Jid &j);
- void setId(const QString &id);
- void setType(const QString &type);
- void setLang(const QString &lang);
+ void setId(const TQString &id);
+ void setType(const TQString &type);
+ void setLang(const TQString &lang);
Error error() const;
void setError(const Error &err);
@@ -346,8 +346,8 @@ namespace XMPP
private:
friend class Stream;
- Stanza(Stream *s, Kind k, const Jid &to, const QString &type, const QString &id);
- Stanza(Stream *s, const QDomElement &e);
+ Stanza(Stream *s, Kind k, const Jid &to, const TQString &type, const TQString &id);
+ Stanza(Stream *s, const TQDomElement &e);
class Private;
Private *d;
@@ -370,13 +370,13 @@ namespace XMPP
SystemShutdown
};
- Stream(QObject *parent=0);
+ Stream(TQObject *parent=0);
virtual ~Stream();
- virtual QDomDocument & doc() const=0;
- virtual QString baseNS() const=0;
- virtual QString xhtmlImNS() const=0;
- virtual QString xhtmlNS() const=0;
+ virtual TQDomDocument & doc() const=0;
+ virtual TQString baseNS() const=0;
+ virtual TQString xhtmlImNS() const=0;
+ virtual TQString xhtmlNS() const=0;
virtual bool old() const=0;
virtual void close()=0;
@@ -385,13 +385,13 @@ namespace XMPP
virtual void write(const Stanza &s)=0;
virtual int errorCondition() const=0;
- virtual QString errorText() const=0;
- virtual QDomElement errorAppSpec() const=0;
+ virtual TQString errorText() const=0;
+ virtual TQDomElement errorAppSpec() const=0;
- Stanza createStanza(Stanza::Kind k, const Jid &to="", const QString &type="", const QString &id="");
- Stanza createStanza(const QDomElement &e);
+ Stanza createStanza(Stanza::Kind k, const Jid &to="", const TQString &type="", const TQString &id="");
+ Stanza createStanza(const TQDomElement &e);
- static QString xmlToString(const QDomElement &e, bool clip=false);
+ static TQString xmlToString(const TQDomElement &e, bool clip=false);
signals:
void connectionClosed();
@@ -450,8 +450,8 @@ namespace XMPP
BindConflict // resource in-use
};
- ClientStream(Connector *conn, TLSHandler *tlsHandler=0, QObject *parent=0);
- ClientStream(const QString &host, const QString &defRealm, ByteStream *bs, QCA::TLS *tls=0, QObject *parent=0); // server
+ ClientStream(Connector *conn, TLSHandler *tlsHandler=0, TQObject *parent=0);
+ ClientStream(const TQString &host, const TQString &defRealm, ByteStream *bs, QCA::TLS *tls=0, TQObject *parent=0); // server
~ClientStream();
Jid jid() const;
@@ -461,13 +461,13 @@ namespace XMPP
bool isAuthenticated() const;
// login params
- void setUsername(const QString &s);
- void setPassword(const QString &s);
- void setRealm(const QString &s);
+ void setUsername(const TQString &s);
+ void setPassword(const TQString &s);
+ void setRealm(const TQString &s);
void continueAfterParams();
// SASL information
- QString saslMechanism() const;
+ TQString saslMechanism() const;
int saslSSF() const;
// binding
@@ -478,14 +478,14 @@ namespace XMPP
void setRequireMutualAuth(bool);
void setSSFRange(int low, int high);
void setOldOnly(bool);
- void setSASLMechanism(const QString &s);
- void setLocalAddr(const QHostAddress &addr, Q_UINT16 port);
+ void setSASLMechanism(const TQString &s);
+ void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port);
// reimplemented
- QDomDocument & doc() const;
- QString baseNS() const;
- QString xhtmlImNS() const;
- QString xhtmlNS() const;
+ TQDomDocument & doc() const;
+ TQString baseNS() const;
+ TQString xhtmlImNS() const;
+ TQString xhtmlNS() const;
bool old() const;
void close();
@@ -494,11 +494,11 @@ namespace XMPP
void write(const Stanza &s);
int errorCondition() const;
- QString errorText() const;
- QDomElement errorAppSpec() const;
+ TQString errorText() const;
+ TQDomElement errorAppSpec() const;
// extra
- void writeDirect(const QString &s);
+ void writeDirect(const TQString &s);
void setNoopTime(int mills);
signals:
@@ -507,8 +507,8 @@ namespace XMPP
void needAuthParams(bool user, bool pass, bool realm);
void authenticated();
void warning(int);
- void incomingXml(const QString &s);
- void outgoingXml(const QString &s);
+ void incomingXml(const TQString &s);
+ void outgoingXml(const TQString &s);
public slots:
void continueAfterWarning();
@@ -527,10 +527,10 @@ namespace XMPP
void ss_tlsClosed();
void ss_error(int);
- void sasl_clientFirstStep(const QString &mech, const QByteArray *clientInit);
- void sasl_nextStep(const QByteArray &stepData);
+ void sasl_clientFirstStep(const TQString &mech, const TQByteArray *clientInit);
+ void sasl_nextStep(const TQByteArray &stepData);
void sasl_needParams(bool user, bool authzid, bool pass, bool realm);
- void sasl_authCheck(const QString &user, const QString &authzid);
+ void sasl_authCheck(const TQString &user, const TQString &authzid);
void sasl_authenticated();
void sasl_error(int);
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp b/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp
index dd458ef0..87743e7f 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp
+++ b/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.cpp
@@ -20,10 +20,10 @@
#include"filetransfer.h"
-#include<qtimer.h>
-#include<qptrlist.h>
-#include<qguardedptr.h>
-#include<qfileinfo.h>
+#include<tqtimer.h>
+#include<tqptrlist.h>
+#include<tqguardedptr.h>
+#include<tqfileinfo.h>
#include"xmpp_xmlcommon.h"
#include"s5b.h"
@@ -34,13 +34,13 @@ using namespace XMPP;
// firstChildElement
//
// Get an element's first child element
-static QDomElement firstChildElement(const QDomElement &e)
+static TQDomElement firstChildElement(const TQDomElement &e)
{
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
if(n.isElement())
return n.toElement();
}
- return QDomElement();
+ return TQDomElement();
}
//----------------------------------------------------------------------------
@@ -52,23 +52,23 @@ public:
FileTransferManager *m;
JT_FT *ft;
Jid peer;
- QString fname;
+ TQString fname;
Q_LLONG size;
Q_LLONG sent;
- QString desc;
+ TQString desc;
bool rangeSupported;
Q_LLONG rangeOffset, rangeLength, length;
- QString streamType;
+ TQString streamType;
bool needStream;
- QString id, iq_id;
+ TQString id, iq_id;
S5BConnection *c;
Jid proxy;
int state;
bool sender;
};
-FileTransfer::FileTransfer(FileTransferManager *m, QObject *parent)
-:QObject(parent)
+FileTransfer::FileTransfer(FileTransferManager *m, TQObject *parent)
+:TQObject(parent)
{
d = new Private;
d->m = m;
@@ -104,7 +104,7 @@ void FileTransfer::setProxy(const Jid &proxy)
d->proxy = proxy;
}
-void FileTransfer::sendFile(const Jid &to, const QString &fname, Q_LLONG size, const QString &desc)
+void FileTransfer::sendFile(const Jid &to, const TQString &fname, Q_LLONG size, const TQString &desc)
{
d->state = Requesting;
d->peer = to;
@@ -115,8 +115,8 @@ void FileTransfer::sendFile(const Jid &to, const QString &fname, Q_LLONG size, c
d->id = d->m->link(this);
d->ft = new JT_FT(d->m->client()->rootTask());
- connect(d->ft, SIGNAL(finished()), SLOT(ft_finished()));
- QStringList list;
+ connect(d->ft, TQT_SIGNAL(finished()), TQT_SLOT(ft_finished()));
+ TQStringList list;
list += "http://jabber.org/protocol/bytestreams";
d->ft->request(to, d->id, fname, size, desc, list);
d->ft->go(true);
@@ -134,14 +134,14 @@ int FileTransfer::dataSizeNeeded() const
return size;
}
-void FileTransfer::writeFileData(const QByteArray &a)
+void FileTransfer::writeFileData(const TQByteArray &a)
{
int pending = d->c->bytesToWrite();
Q_LLONG left = d->length - (d->sent + pending);
if(left == 0)
return;
- QByteArray block;
+ TQByteArray block;
if((Q_LLONG)a.size() > left) {
block = a.copy();
block.resize((uint)left);
@@ -156,7 +156,7 @@ Jid FileTransfer::peer() const
return d->peer;
}
-QString FileTransfer::fileName() const
+TQString FileTransfer::fileName() const
{
return d->fname;
}
@@ -166,7 +166,7 @@ Q_LLONG FileTransfer::fileSize() const
return d->size;
}
-QString FileTransfer::description() const
+TQString FileTransfer::description() const
{
return d->desc;
}
@@ -228,10 +228,10 @@ void FileTransfer::ft_finished()
d->length = d->size - d->rangeOffset;
d->streamType = ft->streamType();
d->c = d->m->client()->s5bManager()->createConnection();
- connect(d->c, SIGNAL(connected()), SLOT(s5b_connected()));
- connect(d->c, SIGNAL(connectionClosed()), SLOT(s5b_connectionClosed()));
- connect(d->c, SIGNAL(bytesWritten(int)), SLOT(s5b_bytesWritten(int)));
- connect(d->c, SIGNAL(error(int)), SLOT(s5b_error(int)));
+ connect(d->c, TQT_SIGNAL(connected()), TQT_SLOT(s5b_connected()));
+ connect(d->c, TQT_SIGNAL(connectionClosed()), TQT_SLOT(s5b_connectionClosed()));
+ connect(d->c, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(s5b_bytesWritten(int)));
+ connect(d->c, TQT_SIGNAL(error(int)), TQT_SLOT(s5b_error(int)));
if(d->proxy.isValid())
d->c->setProxy(d->proxy);
@@ -250,14 +250,14 @@ void FileTransfer::ft_finished()
void FileTransfer::takeConnection(S5BConnection *c)
{
d->c = c;
- connect(d->c, SIGNAL(connected()), SLOT(s5b_connected()));
- connect(d->c, SIGNAL(connectionClosed()), SLOT(s5b_connectionClosed()));
- connect(d->c, SIGNAL(readyRead()), SLOT(s5b_readyRead()));
- connect(d->c, SIGNAL(error(int)), SLOT(s5b_error(int)));
+ connect(d->c, TQT_SIGNAL(connected()), TQT_SLOT(s5b_connected()));
+ connect(d->c, TQT_SIGNAL(connectionClosed()), TQT_SLOT(s5b_connectionClosed()));
+ connect(d->c, TQT_SIGNAL(readyRead()), TQT_SLOT(s5b_readyRead()));
+ connect(d->c, TQT_SIGNAL(error(int)), TQT_SLOT(s5b_error(int)));
if(d->proxy.isValid())
d->c->setProxy(d->proxy);
accepted();
- QTimer::singleShot(0, this, SLOT(doAccept()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doAccept()));
}
void FileTransfer::s5b_connected()
@@ -274,7 +274,7 @@ void FileTransfer::s5b_connectionClosed()
void FileTransfer::s5b_readyRead()
{
- QByteArray a = d->c->read();
+ TQByteArray a = d->c->read();
Q_LLONG need = d->length - d->sent;
if((Q_LLONG)a.size() > need)
a.resize((uint)need);
@@ -327,18 +327,18 @@ class FileTransferManager::Private
{
public:
Client *client;
- QPtrList<FileTransfer> list, incoming;
+ TQPtrList<FileTransfer> list, incoming;
JT_PushFT *pft;
};
FileTransferManager::FileTransferManager(Client *client)
-:QObject(client)
+:TQObject(client)
{
d = new Private;
d->client = client;
d->pft = new JT_PushFT(d->client->rootTask());
- connect(d->pft, SIGNAL(incoming(const FTRequest &)), SLOT(pft_incoming(const FTRequest &)));
+ connect(d->pft, TQT_SIGNAL(incoming(const FTRequest &)), TQT_SLOT(pft_incoming(const FTRequest &)));
}
FileTransferManager::~FileTransferManager()
@@ -376,7 +376,7 @@ FileTransfer *FileTransferManager::takeIncoming()
void FileTransferManager::pft_incoming(const FTRequest &req)
{
bool found = false;
- for(QStringList::ConstIterator it = req.streamTypes.begin(); it != req.streamTypes.end(); ++it) {
+ for(TQStringList::ConstIterator it = req.streamTypes.begin(); it != req.streamTypes.end(); ++it) {
if((*it) == "http://jabber.org/protocol/bytestreams") {
found = true;
break;
@@ -399,7 +399,7 @@ void FileTransferManager::pft_incoming(const FTRequest &req)
void FileTransferManager::s5b_incomingReady(S5BConnection *c)
{
- QPtrListIterator<FileTransfer> it(d->list);
+ TQPtrListIterator<FileTransfer> it(d->list);
FileTransfer *ft = 0;
for(FileTransfer *i; (i = it.current()); ++it) {
if(i->d->needStream && i->d->peer.compare(c->peer()) && i->d->id == c->sid()) {
@@ -415,7 +415,7 @@ void FileTransferManager::s5b_incomingReady(S5BConnection *c)
ft->takeConnection(c);
}
-QString FileTransferManager::link(FileTransfer *ft)
+TQString FileTransferManager::link(FileTransfer *ft)
{
d->list.append(ft);
return d->client->s5bManager()->genUniqueSID(ft->d->peer);
@@ -443,11 +443,11 @@ void FileTransferManager::unlink(FileTransfer *ft)
class JT_FT::Private
{
public:
- QDomElement iq;
+ TQDomElement iq;
Jid to;
Q_LLONG size, rangeOffset, rangeLength;
- QString streamType;
- QStringList streamTypes;
+ TQString streamType;
+ TQStringList streamTypes;
};
JT_FT::JT_FT(Task *parent)
@@ -461,41 +461,41 @@ JT_FT::~JT_FT()
delete d;
}
-void JT_FT::request(const Jid &to, const QString &_id, const QString &fname, Q_LLONG size, const QString &desc, const QStringList &streamTypes)
+void JT_FT::request(const Jid &to, const TQString &_id, const TQString &fname, Q_LLONG size, const TQString &desc, const TQStringList &streamTypes)
{
- QDomElement iq;
+ TQDomElement iq;
d->to = to;
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement si = doc()->createElement("si");
+ TQDomElement si = doc()->createElement("si");
si.setAttribute("xmlns", "http://jabber.org/protocol/si");
si.setAttribute("id", _id);
si.setAttribute("profile", "http://jabber.org/protocol/si/profile/file-transfer");
- QDomElement file = doc()->createElement("file");
+ TQDomElement file = doc()->createElement("file");
file.setAttribute("xmlns", "http://jabber.org/protocol/si/profile/file-transfer");
file.setAttribute("name", fname);
- file.setAttribute("size", QString::number(size));
+ file.setAttribute("size", TQString::number(size));
if(!desc.isEmpty()) {
- QDomElement de = doc()->createElement("desc");
+ TQDomElement de = doc()->createElement("desc");
de.appendChild(doc()->createTextNode(desc));
file.appendChild(de);
}
- QDomElement range = doc()->createElement("range");
+ TQDomElement range = doc()->createElement("range");
file.appendChild(range);
si.appendChild(file);
- QDomElement feature = doc()->createElement("feature");
+ TQDomElement feature = doc()->createElement("feature");
feature.setAttribute("xmlns", "http://jabber.org/protocol/feature-neg");
- QDomElement x = doc()->createElement("x");
+ TQDomElement x = doc()->createElement("x");
x.setAttribute("xmlns", "jabber:x:data");
x.setAttribute("type", "form");
- QDomElement field = doc()->createElement("field");
+ TQDomElement field = doc()->createElement("field");
field.setAttribute("var", "stream-method");
field.setAttribute("type", "list-single");
- for(QStringList::ConstIterator it = streamTypes.begin(); it != streamTypes.end(); ++it) {
- QDomElement option = doc()->createElement("option");
- QDomElement value = doc()->createElement("value");
+ for(TQStringList::ConstIterator it = streamTypes.begin(); it != streamTypes.end(); ++it) {
+ TQDomElement option = doc()->createElement("option");
+ TQDomElement value = doc()->createElement("value");
value.appendChild(doc()->createTextNode(*it));
option.appendChild(value);
field.appendChild(option);
@@ -522,7 +522,7 @@ Q_LLONG JT_FT::rangeLength() const
return d->rangeLength;
}
-QString JT_FT::streamType() const
+TQString JT_FT::streamType() const
{
return d->streamType;
}
@@ -532,26 +532,26 @@ void JT_FT::onGo()
send(d->iq);
}
-bool JT_FT::take(const QDomElement &x)
+bool JT_FT::take(const TQDomElement &x)
{
if(!iqVerify(x, d->to, id()))
return false;
if(x.attribute("type") == "result") {
- QDomElement si = firstChildElement(x);
+ TQDomElement si = firstChildElement(x);
if(si.attribute("xmlns") != "http://jabber.org/protocol/si" || si.tagName() != "si") {
setError(900, "");
return true;
}
- QString id = si.attribute("id");
+ TQString id = si.attribute("id");
Q_LLONG range_offset = 0;
Q_LLONG range_length = 0;
- QDomElement file = si.elementsByTagName("file").item(0).toElement();
+ TQDomElement file = si.elementsByTagName("file").item(0).toElement();
if(!file.isNull()) {
- QDomElement range = file.elementsByTagName("range").item(0).toElement();
+ TQDomElement range = file.elementsByTagName("range").item(0).toElement();
if(!range.isNull()) {
int x;
bool ok;
@@ -587,14 +587,14 @@ bool JT_FT::take(const QDomElement &x)
return true;
}
- QString streamtype;
- QDomElement feature = si.elementsByTagName("feature").item(0).toElement();
+ TQString streamtype;
+ TQDomElement feature = si.elementsByTagName("feature").item(0).toElement();
if(!feature.isNull() && feature.attribute("xmlns") == "http://jabber.org/protocol/feature-neg") {
- QDomElement x = feature.elementsByTagName("x").item(0).toElement();
+ TQDomElement x = feature.elementsByTagName("x").item(0).toElement();
if(!x.isNull() && x.attribute("type") == "submit") {
- QDomElement field = x.elementsByTagName("field").item(0).toElement();
+ TQDomElement field = x.elementsByTagName("field").item(0).toElement();
if(!field.isNull() && field.attribute("var") == "stream-method") {
- QDomElement value = field.elementsByTagName("value").item(0).toElement();
+ TQDomElement value = field.elementsByTagName("value").item(0).toElement();
if(!value.isNull())
streamtype = value.text();
}
@@ -603,7 +603,7 @@ bool JT_FT::take(const QDomElement &x)
// must be one of the offered streamtypes
bool found = false;
- for(QStringList::ConstIterator it = d->streamTypes.begin(); it != d->streamTypes.end(); ++it) {
+ for(TQStringList::ConstIterator it = d->streamTypes.begin(); it != d->streamTypes.end(); ++it) {
if((*it) == streamtype) {
found = true;
break;
@@ -636,33 +636,33 @@ JT_PushFT::~JT_PushFT()
{
}
-void JT_PushFT::respondSuccess(const Jid &to, const QString &id, Q_LLONG rangeOffset, Q_LLONG rangeLength, const QString &streamType)
+void JT_PushFT::respondSuccess(const Jid &to, const TQString &id, Q_LLONG rangeOffset, Q_LLONG rangeLength, const TQString &streamType)
{
- QDomElement iq = createIQ(doc(), "result", to.full(), id);
- QDomElement si = doc()->createElement("si");
+ TQDomElement iq = createIQ(doc(), "result", to.full(), id);
+ TQDomElement si = doc()->createElement("si");
si.setAttribute("xmlns", "http://jabber.org/protocol/si");
if(rangeOffset != 0 || rangeLength != 0) {
- QDomElement file = doc()->createElement("file");
+ TQDomElement file = doc()->createElement("file");
file.setAttribute("xmlns", "http://jabber.org/protocol/si/profile/file-transfer");
- QDomElement range = doc()->createElement("range");
+ TQDomElement range = doc()->createElement("range");
if(rangeOffset > 0)
- range.setAttribute("offset", QString::number(rangeOffset));
+ range.setAttribute("offset", TQString::number(rangeOffset));
if(rangeLength > 0)
- range.setAttribute("length", QString::number(rangeLength));
+ range.setAttribute("length", TQString::number(rangeLength));
file.appendChild(range);
si.appendChild(file);
}
- QDomElement feature = doc()->createElement("feature");
+ TQDomElement feature = doc()->createElement("feature");
feature.setAttribute("xmlns", "http://jabber.org/protocol/feature-neg");
- QDomElement x = doc()->createElement("x");
+ TQDomElement x = doc()->createElement("x");
x.setAttribute("xmlns", "jabber:x:data");
x.setAttribute("type", "submit");
- QDomElement field = doc()->createElement("field");
+ TQDomElement field = doc()->createElement("field");
field.setAttribute("var", "stream-method");
- QDomElement value = doc()->createElement("value");
+ TQDomElement value = doc()->createElement("value");
value.appendChild(doc()->createTextNode(streamType));
field.appendChild(value);
@@ -674,16 +674,16 @@ void JT_PushFT::respondSuccess(const Jid &to, const QString &id, Q_LLONG rangeOf
send(iq);
}
-void JT_PushFT::respondError(const Jid &to, const QString &id, int code, const QString &str)
+void JT_PushFT::respondError(const Jid &to, const TQString &id, int code, const TQString &str)
{
- QDomElement iq = createIQ(doc(), "error", to.full(), id);
- QDomElement err = textTag(doc(), "error", str);
- err.setAttribute("code", QString::number(code));
+ TQDomElement iq = createIQ(doc(), "error", to.full(), id);
+ TQDomElement err = textTag(doc(), "error", str);
+ err.setAttribute("code", TQString::number(code));
iq.appendChild(err);
send(iq);
}
-bool JT_PushFT::take(const QDomElement &e)
+bool JT_PushFT::take(const TQDomElement &e)
{
// must be an iq-set tag
if(e.tagName() != "iq")
@@ -691,20 +691,20 @@ bool JT_PushFT::take(const QDomElement &e)
if(e.attribute("type") != "set")
return false;
- QDomElement si = firstChildElement(e);
+ TQDomElement si = firstChildElement(e);
if(si.attribute("xmlns") != "http://jabber.org/protocol/si" || si.tagName() != "si")
return false;
if(si.attribute("profile") != "http://jabber.org/protocol/si/profile/file-transfer")
return false;
Jid from(e.attribute("from"));
- QString id = si.attribute("id");
+ TQString id = si.attribute("id");
- QDomElement file = si.elementsByTagName("file").item(0).toElement();
+ TQDomElement file = si.elementsByTagName("file").item(0).toElement();
if(file.isNull())
return true;
- QString fname = file.attribute("name");
+ TQString fname = file.attribute("name");
if(fname.isEmpty()) {
respondError(from, id, 400, "Bad file name");
return true;
@@ -712,7 +712,7 @@ bool JT_PushFT::take(const QDomElement &e)
// ensure kosher
{
- QFileInfo fi(fname);
+ TQFileInfo fi(fname);
fname = fi.fileName();
}
@@ -727,27 +727,27 @@ bool JT_PushFT::take(const QDomElement &e)
return true;
}
- QString desc;
- QDomElement de = file.elementsByTagName("desc").item(0).toElement();
+ TQString desc;
+ TQDomElement de = file.elementsByTagName("desc").item(0).toElement();
if(!de.isNull())
desc = de.text();
bool rangeSupported = false;
- QDomElement range = file.elementsByTagName("range").item(0).toElement();
+ TQDomElement range = file.elementsByTagName("range").item(0).toElement();
if(!range.isNull())
rangeSupported = true;
- QStringList streamTypes;
- QDomElement feature = si.elementsByTagName("feature").item(0).toElement();
+ TQStringList streamTypes;
+ TQDomElement feature = si.elementsByTagName("feature").item(0).toElement();
if(!feature.isNull() && feature.attribute("xmlns") == "http://jabber.org/protocol/feature-neg") {
- QDomElement x = feature.elementsByTagName("x").item(0).toElement();
+ TQDomElement x = feature.elementsByTagName("x").item(0).toElement();
if(!x.isNull() /*&& x.attribute("type") == "form"*/) {
- QDomElement field = x.elementsByTagName("field").item(0).toElement();
+ TQDomElement field = x.elementsByTagName("field").item(0).toElement();
if(!field.isNull() && field.attribute("var") == "stream-method" && field.attribute("type") == "list-single") {
- QDomNodeList nl = field.elementsByTagName("option");
+ TQDomNodeList nl = field.elementsByTagName("option");
for(uint n = 0; n < nl.count(); ++n) {
- QDomElement e = nl.item(n).toElement();
- QDomElement value = e.elementsByTagName("value").item(0).toElement();
+ TQDomElement e = nl.item(n).toElement();
+ TQDomElement value = e.elementsByTagName("value").item(0).toElement();
if(!value.isNull())
streamTypes += value.text();
}
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h b/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h
index f31a4d10..9026b478 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h
+++ b/kopete/protocols/jabber/libiris/iris/jabber/filetransfer.h
@@ -43,17 +43,17 @@ namespace XMPP
void setProxy(const Jid &proxy);
// send
- void sendFile(const Jid &to, const QString &fname, Q_LLONG size, const QString &desc);
+ void sendFile(const Jid &to, const TQString &fname, Q_LLONG size, const TQString &desc);
Q_LLONG offset() const;
Q_LLONG length() const;
int dataSizeNeeded() const;
- void writeFileData(const QByteArray &a);
+ void writeFileData(const TQByteArray &a);
// receive
Jid peer() const;
- QString fileName() const;
+ TQString fileName() const;
Q_LLONG fileSize() const;
- QString description() const;
+ TQString description() const;
bool rangeSupported() const;
void accept(Q_LLONG offset=0, Q_LLONG length=0);
@@ -64,7 +64,7 @@ namespace XMPP
signals:
void accepted(); // indicates S5BConnection has started
void connected();
- void readyRead(const QByteArray &a);
+ void readyRead(const TQByteArray &a);
void bytesWritten(int);
void error(int);
@@ -84,7 +84,7 @@ namespace XMPP
void reset();
friend class FileTransferManager;
- FileTransfer(FileTransferManager *, QObject *parent=0);
+ FileTransfer(FileTransferManager *, TQObject *parent=0);
void man_waitForAccept(const FTRequest &req);
void takeConnection(S5BConnection *c);
};
@@ -114,7 +114,7 @@ namespace XMPP
void s5b_incomingReady(S5BConnection *);
friend class FileTransfer;
- QString link(FileTransfer *);
+ TQString link(FileTransfer *);
void con_accept(FileTransfer *);
void con_reject(FileTransfer *);
void unlink(FileTransfer *);
@@ -127,13 +127,13 @@ namespace XMPP
JT_FT(Task *parent);
~JT_FT();
- void request(const Jid &to, const QString &id, const QString &fname, Q_LLONG size, const QString &desc, const QStringList &streamTypes);
+ void request(const Jid &to, const TQString &id, const TQString &fname, Q_LLONG size, const TQString &desc, const TQStringList &streamTypes);
Q_LLONG rangeOffset() const;
Q_LLONG rangeLength() const;
- QString streamType() const;
+ TQString streamType() const;
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
class Private;
@@ -143,12 +143,12 @@ namespace XMPP
struct FTRequest
{
Jid from;
- QString iq_id, id;
- QString fname;
+ TQString iq_id, id;
+ TQString fname;
Q_LLONG size;
- QString desc;
+ TQString desc;
bool rangeSupported;
- QStringList streamTypes;
+ TQStringList streamTypes;
};
class JT_PushFT : public Task
{
@@ -157,10 +157,10 @@ namespace XMPP
JT_PushFT(Task *parent);
~JT_PushFT();
- void respondSuccess(const Jid &to, const QString &id, Q_LLONG rangeOffset, Q_LLONG rangeLength, const QString &streamType);
- void respondError(const Jid &to, const QString &id, int code, const QString &str);
+ void respondSuccess(const Jid &to, const TQString &id, Q_LLONG rangeOffset, Q_LLONG rangeLength, const TQString &streamType);
+ void respondError(const Jid &to, const TQString &id, int code, const TQString &str);
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
signals:
void incoming(const FTRequest &req);
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp b/kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp
index f48da694..df753925 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp
+++ b/kopete/protocols/jabber/libiris/iris/jabber/s5b.cpp
@@ -22,8 +22,8 @@
#include"s5b.h"
-#include<qtimer.h>
-#include<qguardedptr.h>
+#include<tqtimer.h>
+#include<tqguardedptr.h>
#include<stdlib.h>
#include<qca.h>
#include"xmpp_xmlcommon.h"
@@ -46,9 +46,9 @@
namespace XMPP {
-static QString makeKey(const QString &sid, const Jid &initiator, const Jid &target)
+static TQString makeKey(const TQString &sid, const Jid &initiator, const Jid &target)
{
- QString str = sid + initiator.full() + target.full();
+ TQString str = sid + initiator.full() + target.full();
return QCA::SHA1::hashToString(str.utf8());
}
@@ -70,7 +70,7 @@ public:
enum { Unknown, Fast, NotFast };
S5BManager *m;
int state;
- QString sid, key, out_key, out_id, in_id;
+ TQString sid, key, out_key, out_id, in_id;
Jid self, peer;
StreamHostList in_hosts;
JT_S5B *task, *proxy_task;
@@ -94,9 +94,9 @@ public:
~Item();
void reset();
- void startInitiator(const QString &_sid, const Jid &_self, const Jid &_peer, bool fast, bool udp);
- void startTarget(const QString &_sid, const Jid &_self, const Jid &_peer, const StreamHostList &hosts, const QString &iq_id, bool fast, bool udp);
- void handleFast(const StreamHostList &hosts, const QString &iq_id);
+ void startInitiator(const TQString &_sid, const Jid &_self, const Jid &_peer, bool fast, bool udp);
+ void startTarget(const TQString &_sid, const Jid &_self, const Jid &_peer, const StreamHostList &hosts, const TQString &iq_id, bool fast, bool udp);
+ void handleFast(const StreamHostList &hosts, const TQString &iq_id);
void doOutgoing();
void doIncoming();
@@ -137,7 +137,7 @@ S5BDatagram::S5BDatagram()
_dest = 0;
}
-S5BDatagram::S5BDatagram(int source, int dest, const QByteArray &data)
+S5BDatagram::S5BDatagram(int source, int dest, const TQByteArray &data)
{
_source = source;
_dest = dest;
@@ -154,7 +154,7 @@ int S5BDatagram::destPort() const
return _dest;
}
-QByteArray S5BDatagram::data() const
+TQByteArray S5BDatagram::data() const
{
return _buf;
}
@@ -170,7 +170,7 @@ public:
SocksUDP *su;
int state;
Jid peer;
- QString sid;
+ TQString sid;
bool remote;
bool switched;
bool notifyRead, notifyClose;
@@ -178,13 +178,13 @@ public:
S5BRequest req;
Jid proxy;
Mode mode;
- QPtrList<S5BDatagram> dglist;
+ TQPtrList<S5BDatagram> dglist;
};
static int id_conn = 0;
static int num_conn = 0;
-S5BConnection::S5BConnection(S5BManager *m, QObject *parent)
+S5BConnection::S5BConnection(S5BManager *m, TQObject *parent)
:ByteStream(parent)
{
d = new Private;
@@ -229,7 +229,7 @@ void S5BConnection::reset(bool clear)
}
d->state = Idle;
d->peer = Jid();
- d->sid = QString();
+ d->sid = TQString();
d->remote = false;
d->switched = false;
d->notifyRead = false;
@@ -246,7 +246,7 @@ void S5BConnection::setProxy(const Jid &proxy)
d->proxy = proxy;
}
-void S5BConnection::connectToJid(const Jid &peer, const QString &sid, Mode m)
+void S5BConnection::connectToJid(const Jid &peer, const TQString &sid, Mode m)
{
reset(true);
if(!d->m->isAcceptableSID(peer, sid))
@@ -294,7 +294,7 @@ Jid S5BConnection::peer() const
return d->peer;
}
-QString S5BConnection::sid() const
+TQString S5BConnection::sid() const
{
return d->sid;
}
@@ -322,18 +322,18 @@ bool S5BConnection::isOpen() const
return false;
}
-void S5BConnection::write(const QByteArray &buf)
+void S5BConnection::write(const TQByteArray &buf)
{
if(d->state == Active && d->mode == Stream)
d->sc->write(buf);
}
-QByteArray S5BConnection::read(int bytes)
+TQByteArray S5BConnection::read(int bytes)
{
if(d->sc)
return d->sc->read(bytes);
else
- return QByteArray();
+ return TQByteArray();
}
int S5BConnection::bytesAvailable() const
@@ -354,10 +354,10 @@ int S5BConnection::bytesToWrite() const
void S5BConnection::writeDatagram(const S5BDatagram &i)
{
- QByteArray buf(i.data().size() + 4);
+ TQByteArray buf(i.data().size() + 4);
ushort ssp = htons(i.sourcePort());
ushort sdp = htons(i.destPort());
- QByteArray data = i.data();
+ TQByteArray data = i.data();
memcpy(buf.data(), &ssp, 2);
memcpy(buf.data() + 2, &sdp, 2);
memcpy(buf.data() + 4, data.data(), data.size());
@@ -393,15 +393,15 @@ void S5BConnection::man_waitForAccept(const S5BRequest &r)
void S5BConnection::man_clientReady(SocksClient *sc, SocksUDP *sc_udp)
{
d->sc = sc;
- connect(d->sc, SIGNAL(connectionClosed()), SLOT(sc_connectionClosed()));
- connect(d->sc, SIGNAL(delayedCloseFinished()), SLOT(sc_delayedCloseFinished()));
- connect(d->sc, SIGNAL(readyRead()), SLOT(sc_readyRead()));
- connect(d->sc, SIGNAL(bytesWritten(int)), SLOT(sc_bytesWritten(int)));
- connect(d->sc, SIGNAL(error(int)), SLOT(sc_error(int)));
+ connect(d->sc, TQT_SIGNAL(connectionClosed()), TQT_SLOT(sc_connectionClosed()));
+ connect(d->sc, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(sc_delayedCloseFinished()));
+ connect(d->sc, TQT_SIGNAL(readyRead()), TQT_SLOT(sc_readyRead()));
+ connect(d->sc, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sc_bytesWritten(int)));
+ connect(d->sc, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int)));
if(sc_udp) {
d->su = sc_udp;
- connect(d->su, SIGNAL(packetReady(const QByteArray &)), SLOT(su_packetReady(const QByteArray &)));
+ connect(d->su, TQT_SIGNAL(packetReady(const TQByteArray &)), TQT_SLOT(su_packetReady(const TQByteArray &)));
}
d->state = Active;
@@ -424,7 +424,7 @@ void S5BConnection::man_clientReady(SocksClient *sc, SocksUDP *sc_udp)
d->notifyClose = true;
}
if(d->notifyRead || d->notifyClose)
- QTimer::singleShot(0, this, SLOT(doPending()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doPending()));
connected();
}
@@ -432,14 +432,14 @@ void S5BConnection::doPending()
{
if(d->notifyRead) {
if(d->notifyClose)
- QTimer::singleShot(0, this, SLOT(doPending()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doPending()));
sc_readyRead();
}
else if(d->notifyClose)
sc_connectionClosed();
}
-void S5BConnection::man_udpReady(const QByteArray &buf)
+void S5BConnection::man_udpReady(const TQByteArray &buf)
{
handleUDP(buf);
}
@@ -503,12 +503,12 @@ void S5BConnection::sc_error(int)
error(ErrSocket);
}
-void S5BConnection::su_packetReady(const QByteArray &buf)
+void S5BConnection::su_packetReady(const TQByteArray &buf)
{
handleUDP(buf);
}
-void S5BConnection::handleUDP(const QByteArray &buf)
+void S5BConnection::handleUDP(const TQByteArray &buf)
{
// must be at least 4 bytes, to accomodate virtual ports
if(buf.size() < 4)
@@ -519,14 +519,14 @@ void S5BConnection::handleUDP(const QByteArray &buf)
memcpy(&sdp, buf.data() + 2, 2);
int source = ntohs(ssp);
int dest = ntohs(sdp);
- QByteArray data(buf.size() - 4);
+ TQByteArray data(buf.size() - 4);
memcpy(data.data(), buf.data() + 4, data.size());
d->dglist.append(new S5BDatagram(source, dest, data));
datagramReady();
}
-void S5BConnection::sendUDP(const QByteArray &buf)
+void S5BConnection::sendUDP(const TQByteArray &buf)
{
if(d->su)
d->su->write(buf);
@@ -554,13 +554,13 @@ public:
S5BConnection *c;
Item *i;
- QString sid;
+ TQString sid;
JT_S5B *query;
StreamHost proxyInfo;
- QGuardedPtr<S5BServer> relatedServer;
+ TQGuardedPtr<S5BServer> relatedServer;
bool udp_init;
- QHostAddress udp_addr;
+ TQHostAddress udp_addr;
int udp_port;
};
@@ -569,13 +569,13 @@ class S5BManager::Private
public:
Client *client;
S5BServer *serv;
- QPtrList<Entry> activeList;
+ TQPtrList<Entry> activeList;
S5BConnectionList incomingConns;
JT_PushS5B *ps;
};
S5BManager::S5BManager(Client *parent)
-:QObject(parent)
+:TQObject(parent)
{
// S5B needs SHA1
if(!QCA::isSupported(QCA::CAP_SHA1))
@@ -587,9 +587,9 @@ S5BManager::S5BManager(Client *parent)
d->activeList.setAutoDelete(true);
d->ps = new JT_PushS5B(d->client->rootTask());
- connect(d->ps, SIGNAL(incoming(const S5BRequest &)), SLOT(ps_incoming(const S5BRequest &)));
- connect(d->ps, SIGNAL(incomingUDPSuccess(const Jid &, const QString &)), SLOT(ps_incomingUDPSuccess(const Jid &, const QString &)));
- connect(d->ps, SIGNAL(incomingActivate(const Jid &, const QString &, const Jid &)), SLOT(ps_incomingActivate(const Jid &, const QString &, const Jid &)));
+ connect(d->ps, TQT_SIGNAL(incoming(const S5BRequest &)), TQT_SLOT(ps_incoming(const S5BRequest &)));
+ connect(d->ps, TQT_SIGNAL(incomingUDPSuccess(const Jid &, const TQString &)), TQT_SLOT(ps_incomingUDPSuccess(const Jid &, const TQString &)));
+ connect(d->ps, TQT_SIGNAL(incomingActivate(const Jid &, const TQString &, const Jid &)), TQT_SLOT(ps_incomingActivate(const Jid &, const TQString &, const Jid &)));
}
S5BManager::~S5BManager()
@@ -697,7 +697,7 @@ void S5BManager::ps_incoming(const S5BRequest &req)
incomingReady();
}
-void S5BManager::ps_incomingUDPSuccess(const Jid &from, const QString &key)
+void S5BManager::ps_incomingUDPSuccess(const Jid &from, const TQString &key)
{
Entry *e = findEntryByHash(key);
if(e && e->i) {
@@ -708,38 +708,38 @@ void S5BManager::ps_incomingUDPSuccess(const Jid &from, const QString &key)
}
}
-void S5BManager::ps_incomingActivate(const Jid &from, const QString &sid, const Jid &streamHost)
+void S5BManager::ps_incomingActivate(const Jid &from, const TQString &sid, const Jid &streamHost)
{
Entry *e = findEntryBySID(from, sid);
if(e && e->i)
e->i->incomingActivate(streamHost);
}
-void S5BManager::doSuccess(const Jid &peer, const QString &id, const Jid &streamHost)
+void S5BManager::doSuccess(const Jid &peer, const TQString &id, const Jid &streamHost)
{
d->ps->respondSuccess(peer, id, streamHost);
}
-void S5BManager::doError(const Jid &peer, const QString &id, int code, const QString &str)
+void S5BManager::doError(const Jid &peer, const TQString &id, int code, const TQString &str)
{
d->ps->respondError(peer, id, code, str);
}
-void S5BManager::doActivate(const Jid &peer, const QString &sid, const Jid &streamHost)
+void S5BManager::doActivate(const Jid &peer, const TQString &sid, const Jid &streamHost)
{
d->ps->sendActivate(peer, sid, streamHost);
}
-QString S5BManager::genUniqueSID(const Jid &peer) const
+TQString S5BManager::genUniqueSID(const Jid &peer) const
{
// get unused key
- QString sid;
+ TQString sid;
do {
sid = "s5b_";
for(int i = 0; i < 4; ++i) {
int word = rand() & 0xffff;
for(int n = 0; n < 4; ++n) {
- QString s;
+ TQString s;
s.sprintf("%x", (word >> (n * 4)) & 0xf);
sid.append(s);
}
@@ -748,10 +748,10 @@ QString S5BManager::genUniqueSID(const Jid &peer) const
return sid;
}
-bool S5BManager::isAcceptableSID(const Jid &peer, const QString &sid) const
+bool S5BManager::isAcceptableSID(const Jid &peer, const TQString &sid) const
{
- QString key = makeKey(sid, d->client->jid(), peer);
- QString key_out = makeKey(sid, peer, d->client->jid());
+ TQString key = makeKey(sid, d->client->jid(), peer);
+ TQString key_out = makeKey(sid, peer, d->client->jid());
// if we have a server, then check through it
if(d->serv) {
@@ -765,9 +765,9 @@ bool S5BManager::isAcceptableSID(const Jid &peer, const QString &sid) const
return true;
}
-S5BConnection *S5BManager::findIncoming(const Jid &from, const QString &sid) const
+S5BConnection *S5BManager::findIncoming(const Jid &from, const TQString &sid) const
{
- QPtrListIterator<S5BConnection> it(d->incomingConns);
+ TQPtrListIterator<S5BConnection> it(d->incomingConns);
for(S5BConnection *c; (c = it.current()); ++it) {
if(c->d->peer.compare(from) && c->d->sid == sid)
return c;
@@ -777,7 +777,7 @@ S5BConnection *S5BManager::findIncoming(const Jid &from, const QString &sid) con
S5BManager::Entry *S5BManager::findEntry(S5BConnection *c) const
{
- QPtrListIterator<Entry> it(d->activeList);
+ TQPtrListIterator<Entry> it(d->activeList);
for(Entry *e; (e = it.current()); ++it) {
if(e->c == c)
return e;
@@ -787,7 +787,7 @@ S5BManager::Entry *S5BManager::findEntry(S5BConnection *c) const
S5BManager::Entry *S5BManager::findEntry(Item *i) const
{
- QPtrListIterator<Entry> it(d->activeList);
+ TQPtrListIterator<Entry> it(d->activeList);
for(Entry *e; (e = it.current()); ++it) {
if(e->i == i)
return e;
@@ -795,9 +795,9 @@ S5BManager::Entry *S5BManager::findEntry(Item *i) const
return 0;
}
-S5BManager::Entry *S5BManager::findEntryByHash(const QString &key) const
+S5BManager::Entry *S5BManager::findEntryByHash(const TQString &key) const
{
- QPtrListIterator<Entry> it(d->activeList);
+ TQPtrListIterator<Entry> it(d->activeList);
for(Entry *e; (e = it.current()); ++it) {
if(e->i && e->i->key == key)
return e;
@@ -805,9 +805,9 @@ S5BManager::Entry *S5BManager::findEntryByHash(const QString &key) const
return 0;
}
-S5BManager::Entry *S5BManager::findEntryBySID(const Jid &peer, const QString &sid) const
+S5BManager::Entry *S5BManager::findEntryBySID(const Jid &peer, const TQString &sid) const
{
- QPtrListIterator<Entry> it(d->activeList);
+ TQPtrListIterator<Entry> it(d->activeList);
for(Entry *e; (e = it.current()); ++it) {
if(e->i && e->i->peer.compare(peer) && e->sid == sid)
return e;
@@ -815,10 +815,10 @@ S5BManager::Entry *S5BManager::findEntryBySID(const Jid &peer, const QString &si
return 0;
}
-S5BManager::Entry *S5BManager::findServerEntryByHash(const QString &key) const
+S5BManager::Entry *S5BManager::findServerEntryByHash(const TQString &key) const
{
- const QPtrList<S5BManager> &manList = d->serv->managerList();
- QPtrListIterator<S5BManager> it(manList);
+ const TQPtrList<S5BManager> &manList = d->serv->managerList();
+ TQPtrListIterator<S5BManager> it(manList);
for(S5BManager *m; (m = it.current()); ++it) {
Entry *e = m->findEntryByHash(key);
if(e)
@@ -827,14 +827,14 @@ S5BManager::Entry *S5BManager::findServerEntryByHash(const QString &key) const
return 0;
}
-bool S5BManager::srv_ownsHash(const QString &key) const
+bool S5BManager::srv_ownsHash(const TQString &key) const
{
if(findEntryByHash(key))
return true;
return false;
}
-void S5BManager::srv_incomingReady(SocksClient *sc, const QString &key)
+void S5BManager::srv_incomingReady(SocksClient *sc, const TQString &key)
{
Entry *e = findEntryByHash(key);
if(!e->i->allowIncoming) {
@@ -850,7 +850,7 @@ void S5BManager::srv_incomingReady(SocksClient *sc, const QString &key)
e->i->setIncomingClient(sc);
}
-void S5BManager::srv_incomingUDP(bool init, const QHostAddress &addr, int port, const QString &key, const QByteArray &data)
+void S5BManager::srv_incomingUDP(bool init, const TQHostAddress &addr, int port, const TQString &key, const TQByteArray &data)
{
Entry *e = findEntryByHash(key);
if(!e->c->d->mode != S5BConnection::Datagram)
@@ -935,7 +935,7 @@ void S5BManager::con_unlink(S5BConnection *c)
d->activeList.removeRef(e);
}
-void S5BManager::con_sendUDP(S5BConnection *c, const QByteArray &buf)
+void S5BManager::con_sendUDP(S5BConnection *c, const TQByteArray &buf)
{
Entry *e = findEntry(c);
if(!e)
@@ -1007,12 +1007,12 @@ void S5BManager::entryContinue(Entry *e)
e->i = new Item(this);
e->i->proxy = e->proxyInfo;
- connect(e->i, SIGNAL(accepted()), SLOT(item_accepted()));
- connect(e->i, SIGNAL(tryingHosts(const StreamHostList &)), SLOT(item_tryingHosts(const StreamHostList &)));
- connect(e->i, SIGNAL(proxyConnect()), SLOT(item_proxyConnect()));
- connect(e->i, SIGNAL(waitingForActivation()), SLOT(item_waitingForActivation()));
- connect(e->i, SIGNAL(connected()), SLOT(item_connected()));
- connect(e->i, SIGNAL(error(int)), SLOT(item_error(int)));
+ connect(e->i, TQT_SIGNAL(accepted()), TQT_SLOT(item_accepted()));
+ connect(e->i, TQT_SIGNAL(tryingHosts(const StreamHostList &)), TQT_SLOT(item_tryingHosts(const StreamHostList &)));
+ connect(e->i, TQT_SIGNAL(proxyConnect()), TQT_SLOT(item_proxyConnect()));
+ connect(e->i, TQT_SIGNAL(waitingForActivation()), TQT_SLOT(item_waitingForActivation()));
+ connect(e->i, TQT_SIGNAL(connected()), TQT_SLOT(item_connected()));
+ connect(e->i, TQT_SIGNAL(error(int)), TQT_SLOT(item_error(int)));
if(e->c->isRemote()) {
const S5BRequest &req = e->c->d->req;
@@ -1026,7 +1026,7 @@ void S5BManager::entryContinue(Entry *e)
void S5BManager::queryProxy(Entry *e)
{
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
e->c->proxyQuery(); // signal
if(!self)
return;
@@ -1035,7 +1035,7 @@ void S5BManager::queryProxy(Entry *e)
printf("querying proxy: [%s]\n", e->c->d->proxy.full().latin1());
#endif
e->query = new JT_S5B(d->client->rootTask());
- connect(e->query, SIGNAL(finished()), SLOT(query_finished()));
+ connect(e->query, TQT_SIGNAL(finished()), TQT_SLOT(query_finished()));
e->query->requestProxyInfo(e->c->d->proxy);
e->query->go(true);
}
@@ -1045,7 +1045,7 @@ void S5BManager::query_finished()
JT_S5B *query = (JT_S5B *)sender();
Entry *e;
bool found = false;
- QPtrListIterator<Entry> it(d->activeList);
+ TQPtrListIterator<Entry> it(d->activeList);
for(; (e = it.current()); ++it) {
if(e->query == query) {
found = true;
@@ -1071,7 +1071,7 @@ void S5BManager::query_finished()
#endif
}
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
e->c->proxyResult(query->success()); // signal
if(!self)
return;
@@ -1101,7 +1101,7 @@ bool S5BManager::targetShouldOfferProxy(Entry *e)
//----------------------------------------------------------------------------
// S5BManager::Item
//----------------------------------------------------------------------------
-S5BManager::Item::Item(S5BManager *manager) : QObject(0)
+S5BManager::Item::Item(S5BManager *manager) : TQObject(0)
{
m = manager;
task = 0;
@@ -1159,7 +1159,7 @@ void S5BManager::Item::reset()
udp = false;
}
-void S5BManager::Item::startInitiator(const QString &_sid, const Jid &_self, const Jid &_peer, bool fast, bool _udp)
+void S5BManager::Item::startInitiator(const TQString &_sid, const Jid &_self, const Jid &_peer, bool fast, bool _udp)
{
sid = _sid;
self = _self;
@@ -1176,7 +1176,7 @@ void S5BManager::Item::startInitiator(const QString &_sid, const Jid &_self, con
doOutgoing();
}
-void S5BManager::Item::startTarget(const QString &_sid, const Jid &_self, const Jid &_peer, const StreamHostList &hosts, const QString &iq_id, bool _fast, bool _udp)
+void S5BManager::Item::startTarget(const TQString &_sid, const Jid &_self, const Jid &_peer, const StreamHostList &hosts, const TQString &iq_id, bool _fast, bool _udp)
{
sid = _sid;
peer = _peer;
@@ -1197,11 +1197,11 @@ void S5BManager::Item::startTarget(const QString &_sid, const Jid &_self, const
doIncoming();
}
-void S5BManager::Item::handleFast(const StreamHostList &hosts, const QString &iq_id)
+void S5BManager::Item::handleFast(const StreamHostList &hosts, const TQString &iq_id)
{
targetMode = Fast;
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
accepted();
if(!self)
return;
@@ -1222,8 +1222,8 @@ void S5BManager::Item::doOutgoing()
StreamHostList hosts;
S5BServer *serv = m->server();
if(serv && serv->isActive() && !haveHost(in_hosts, m->client()->jid())) {
- QStringList hostList = serv->hostList();
- for(QStringList::ConstIterator it = hostList.begin(); it != hostList.end(); ++it) {
+ TQStringList hostList = serv->hostList();
+ for(TQStringList::ConstIterator it = hostList.begin(); it != hostList.end(); ++it) {
StreamHost h;
h.setJid(m->client()->jid());
h.setHost(*it);
@@ -1245,7 +1245,7 @@ void S5BManager::Item::doOutgoing()
allowIncoming = true;
task = new JT_S5B(m->client()->rootTask());
- connect(task, SIGNAL(finished()), SLOT(jt_finished()));
+ connect(task, TQT_SIGNAL(finished()), TQT_SLOT(jt_finished()));
task->request(peer, sid, hosts, state == Initiator ? wantFast : false, udp);
out_id = task->id();
task->go(true);
@@ -1291,9 +1291,9 @@ void S5BManager::Item::doIncoming()
}
conn = new S5BConnector;
- connect(conn, SIGNAL(result(bool)), SLOT(conn_result(bool)));
+ connect(conn, TQT_SIGNAL(result(bool)), TQT_SLOT(conn_result(bool)));
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
tryingHosts(list);
if(!self)
return;
@@ -1307,9 +1307,9 @@ void S5BManager::Item::setIncomingClient(SocksClient *sc)
printf("S5BManager::Item: %s [%s] successful incoming connection\n", peer.full().latin1(), sid.latin1());
#endif
- connect(sc, SIGNAL(readyRead()), SLOT(sc_readyRead()));
- connect(sc, SIGNAL(bytesWritten(int)), SLOT(sc_bytesWritten(int)));
- connect(sc, SIGNAL(error(int)), SLOT(sc_error(int)));
+ connect(sc, TQT_SIGNAL(readyRead()), TQT_SLOT(sc_readyRead()));
+ connect(sc, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sc_bytesWritten(int)));
+ connect(sc, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int)));
client = sc;
allowIncoming = false;
@@ -1335,7 +1335,7 @@ void S5BManager::Item::jt_finished()
if(state == Initiator) {
if(targetMode == Unknown) {
targetMode = NotFast;
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
accepted();
if(!self)
return;
@@ -1387,11 +1387,11 @@ void S5BManager::Item::jt_finished()
#endif
// connect to the proxy
proxy_conn = new S5BConnector;
- connect(proxy_conn, SIGNAL(result(bool)), SLOT(proxy_result(bool)));
+ connect(proxy_conn, TQT_SIGNAL(result(bool)), TQT_SLOT(proxy_result(bool)));
StreamHostList list;
list += proxy;
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
proxyConnect();
if(!self)
return;
@@ -1441,9 +1441,9 @@ void S5BManager::Item::conn_result(bool b)
printf("S5BManager::Item: %s [%s] successful outgoing connection\n", peer.full().latin1(), sid.latin1());
#endif
- connect(sc, SIGNAL(readyRead()), SLOT(sc_readyRead()));
- connect(sc, SIGNAL(bytesWritten(int)), SLOT(sc_bytesWritten(int)));
- connect(sc, SIGNAL(error(int)), SLOT(sc_error(int)));
+ connect(sc, TQT_SIGNAL(readyRead()), TQT_SLOT(sc_readyRead()));
+ connect(sc, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sc_bytesWritten(int)));
+ connect(sc, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int)));
m->doSuccess(peer, in_id, h.jid());
@@ -1492,9 +1492,9 @@ void S5BManager::Item::proxy_result(bool b)
delete proxy_conn;
proxy_conn = 0;
- connect(sc, SIGNAL(readyRead()), SLOT(sc_readyRead()));
- connect(sc, SIGNAL(bytesWritten(int)), SLOT(sc_bytesWritten(int)));
- connect(sc, SIGNAL(error(int)), SLOT(sc_error(int)));
+ connect(sc, TQT_SIGNAL(readyRead()), TQT_SLOT(sc_readyRead()));
+ connect(sc, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(sc_bytesWritten(int)));
+ connect(sc, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int)));
client = sc;
client_udp = sc_udp;
@@ -1504,7 +1504,7 @@ void S5BManager::Item::proxy_result(bool b)
printf("activating proxy stream\n");
#endif
proxy_task = new JT_S5B(m->client()->rootTask());
- connect(proxy_task, SIGNAL(finished()), SLOT(proxy_finished()));
+ connect(proxy_task, TQT_SIGNAL(finished()), TQT_SLOT(proxy_finished()));
proxy_task->requestActivation(proxy.jid(), sid, peer);
proxy_task->go(true);
}
@@ -1608,7 +1608,7 @@ void S5BManager::Item::tryActivation()
printf("sending extra CR\n");
#endif
// must send [CR] to activate target streamhost
- QByteArray a(1);
+ TQByteArray a(1);
a[0] = '\r';
client->write(a);
}
@@ -1617,12 +1617,12 @@ void S5BManager::Item::tryActivation()
void S5BManager::Item::checkForActivation()
{
- QPtrList<SocksClient> clientList;
+ TQPtrList<SocksClient> clientList;
if(client)
clientList.append(client);
if(client_out)
clientList.append(client_out);
- QPtrListIterator<SocksClient> it(clientList);
+ TQPtrListIterator<SocksClient> it(clientList);
for(SocksClient *sc; (sc = it.current()); ++it) {
#ifdef S5B_DEBUG
printf("checking for activation\n");
@@ -1641,7 +1641,7 @@ void S5BManager::Item::checkForActivation()
#endif
if(sc->bytesAvailable() >= 1) {
clientList.removeRef(sc);
- QByteArray a = sc->read(1);
+ TQByteArray a = sc->read(1);
if(a[0] != '\r') {
delete sc;
return;
@@ -1752,13 +1752,13 @@ public:
SocksClient *client;
SocksUDP *client_udp;
StreamHost host;
- QString key;
+ TQString key;
bool udp;
int udp_tries;
- QTimer t;
+ TQTimer t;
Jid jid;
- Item(const Jid &self, const StreamHost &_host, const QString &_key, bool _udp) : QObject(0)
+ Item(const Jid &self, const StreamHost &_host, const TQString &_key, bool _udp) : TQObject(0)
{
jid = self;
host = _host;
@@ -1766,9 +1766,9 @@ public:
udp = _udp;
client = new SocksClient;
client_udp = 0;
- connect(client, SIGNAL(connected()), SLOT(sc_connected()));
- connect(client, SIGNAL(error(int)), SLOT(sc_error(int)));
- connect(&t, SIGNAL(timeout()), SLOT(trySendUDP()));
+ connect(client, TQT_SIGNAL(connected()), TQT_SLOT(sc_connected()));
+ connect(client, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int)));
+ connect(&t, TQT_SIGNAL(timeout()), TQT_SLOT(trySendUDP()));
}
~Item()
@@ -1826,8 +1826,8 @@ private slots:
}
// send initialization with our JID
- QCString cs = jid.full().utf8();
- QByteArray a(cs.length());
+ TQCString cs = jid.full().utf8();
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
client_udp->write(a);
++udp_tries;
@@ -1857,20 +1857,20 @@ class S5BConnector::Private
public:
SocksClient *active;
SocksUDP *active_udp;
- QPtrList<Item> itemList;
- QString key;
+ TQPtrList<Item> itemList;
+ TQString key;
StreamHost activeHost;
- QTimer t;
+ TQTimer t;
};
-S5BConnector::S5BConnector(QObject *parent)
-:QObject(parent)
+S5BConnector::S5BConnector(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
d->active = 0;
d->active_udp = 0;
d->itemList.setAutoDelete(true);
- connect(&d->t, SIGNAL(timeout()), SLOT(t_timeout()));
+ connect(&d->t, TQT_SIGNAL(timeout()), TQT_SLOT(t_timeout()));
}
S5BConnector::~S5BConnector()
@@ -1889,7 +1889,7 @@ void S5BConnector::reset()
d->itemList.clear();
}
-void S5BConnector::start(const Jid &self, const StreamHostList &hosts, const QString &key, bool udp, int timeout)
+void S5BConnector::start(const Jid &self, const StreamHostList &hosts, const TQString &key, bool udp, int timeout)
{
reset();
@@ -1898,7 +1898,7 @@ void S5BConnector::start(const Jid &self, const StreamHostList &hosts, const QSt
#endif
for(StreamHostList::ConstIterator it = hosts.begin(); it != hosts.end(); ++it) {
Item *i = new Item(self, *it, key, udp);
- connect(i, SIGNAL(result(bool)), SLOT(item_result(bool)));
+ connect(i, TQT_SIGNAL(result(bool)), TQT_SLOT(item_result(bool)));
d->itemList.append(i);
i->start();
}
@@ -1964,7 +1964,7 @@ void S5BConnector::t_timeout()
void S5BConnector::man_udpSuccess(const Jid &streamHost)
{
// was anyone sending to this streamhost?
- QPtrListIterator<Item> it(d->itemList);
+ TQPtrListIterator<Item> it(d->itemList);
for(Item *i; (i = it.current()); ++it) {
if(i->host.jid().compare(streamHost) && i->client_udp) {
i->udpSuccess();
@@ -1981,17 +1981,17 @@ class S5BServer::Item : public QObject
Q_OBJECT
public:
SocksClient *client;
- QString host;
- QTimer expire;
+ TQString host;
+ TQTimer expire;
- Item(SocksClient *c) : QObject(0)
+ Item(SocksClient *c) : TQObject(0)
{
client = c;
- connect(client, SIGNAL(incomingMethods(int)), SLOT(sc_incomingMethods(int)));
- connect(client, SIGNAL(incomingConnectRequest(const QString &, int)), SLOT(sc_incomingConnectRequest(const QString &, int)));
- connect(client, SIGNAL(error(int)), SLOT(sc_error(int)));
+ connect(client, TQT_SIGNAL(incomingMethods(int)), TQT_SLOT(sc_incomingMethods(int)));
+ connect(client, TQT_SIGNAL(incomingConnectRequest(const TQString &, int)), TQT_SLOT(sc_incomingConnectRequest(const TQString &, int)));
+ connect(client, TQT_SIGNAL(error(int)), TQT_SLOT(sc_error(int)));
- connect(&expire, SIGNAL(timeout()), SLOT(doError()));
+ connect(&expire, TQT_SIGNAL(timeout()), TQT_SLOT(doError()));
resetExpiration();
}
@@ -2025,7 +2025,7 @@ private slots:
doError();
}
- void sc_incomingConnectRequest(const QString &_host, int port)
+ void sc_incomingConnectRequest(const TQString &_host, int port)
{
if(port == 0) {
host = _host;
@@ -2046,18 +2046,18 @@ class S5BServer::Private
{
public:
SocksServer serv;
- QStringList hostList;
- QPtrList<S5BManager> manList;
- QPtrList<Item> itemList;
+ TQStringList hostList;
+ TQPtrList<S5BManager> manList;
+ TQPtrList<Item> itemList;
};
-S5BServer::S5BServer(QObject *parent)
-:QObject(parent)
+S5BServer::S5BServer(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
d->itemList.setAutoDelete(true);
- connect(&d->serv, SIGNAL(incomingReady()), SLOT(ss_incomingReady()));
- connect(&d->serv, SIGNAL(incomingUDP(const QString &, int, const QHostAddress &, int, const QByteArray &)), SLOT(ss_incomingUDP(const QString &, int, const QHostAddress &, int, const QByteArray &)));
+ connect(&d->serv, TQT_SIGNAL(incomingReady()), TQT_SLOT(ss_incomingReady()));
+ connect(&d->serv, TQT_SIGNAL(incomingUDP(const TQString &, int, const TQHostAddress &, int, const TQByteArray &)), TQT_SLOT(ss_incomingUDP(const TQString &, int, const TQHostAddress &, int, const TQByteArray &)));
}
S5BServer::~S5BServer()
@@ -2082,12 +2082,12 @@ void S5BServer::stop()
d->serv.stop();
}
-void S5BServer::setHostList(const QStringList &list)
+void S5BServer::setHostList(const TQStringList &list)
{
d->hostList = list;
}
-QStringList S5BServer::hostList() const
+TQStringList S5BServer::hostList() const
{
return d->hostList;
}
@@ -2103,16 +2103,16 @@ void S5BServer::ss_incomingReady()
#ifdef S5B_DEBUG
printf("S5BServer: incoming connection from %s:%d\n", i->client->peerAddress().toString().latin1(), i->client->peerPort());
#endif
- connect(i, SIGNAL(result(bool)), SLOT(item_result(bool)));
+ connect(i, TQT_SIGNAL(result(bool)), TQT_SLOT(item_result(bool)));
d->itemList.append(i);
}
-void S5BServer::ss_incomingUDP(const QString &host, int port, const QHostAddress &addr, int sourcePort, const QByteArray &data)
+void S5BServer::ss_incomingUDP(const TQString &host, int port, const TQHostAddress &addr, int sourcePort, const TQByteArray &data)
{
if(port != 0 || port != 1)
return;
- QPtrListIterator<S5BManager> it(d->manList);
+ TQPtrListIterator<S5BManager> it(d->manList);
for(S5BManager *m; (m = it.current()); ++it) {
if(m->srv_ownsHash(host)) {
m->srv_incomingUDP(port == 1 ? true : false, addr, sourcePort, host, data);
@@ -2134,11 +2134,11 @@ void S5BServer::item_result(bool b)
SocksClient *c = i->client;
i->client = 0;
- QString key = i->host;
+ TQString key = i->host;
d->itemList.removeRef(i);
// find the appropriate manager for this incoming connection
- QPtrListIterator<S5BManager> it(d->manList);
+ TQPtrListIterator<S5BManager> it(d->manList);
for(S5BManager *m; (m = it.current()); ++it) {
if(m->srv_ownsHash(key)) {
m->srv_incomingReady(c, key);
@@ -2162,18 +2162,18 @@ void S5BServer::unlink(S5BManager *m)
void S5BServer::unlinkAll()
{
- QPtrListIterator<S5BManager> it(d->manList);
+ TQPtrListIterator<S5BManager> it(d->manList);
for(S5BManager *m; (m = it.current()); ++it)
m->srv_unlink();
d->manList.clear();
}
-const QPtrList<S5BManager> & S5BServer::managerList() const
+const TQPtrList<S5BManager> & S5BServer::managerList() const
{
return d->manList;
}
-void S5BServer::writeUDP(const QHostAddress &addr, int port, const QByteArray &data)
+void S5BServer::writeUDP(const TQHostAddress &addr, int port, const TQByteArray &data)
{
d->serv.writeUDP(addr, port, data);
}
@@ -2184,12 +2184,12 @@ void S5BServer::writeUDP(const QHostAddress &addr, int port, const QByteArray &d
class JT_S5B::Private
{
public:
- QDomElement iq;
+ TQDomElement iq;
Jid to;
Jid streamHost;
StreamHost proxyInfo;
int mode;
- QTimer t;
+ TQTimer t;
};
JT_S5B::JT_S5B(Task *parent)
@@ -2197,7 +2197,7 @@ JT_S5B::JT_S5B(Task *parent)
{
d = new Private;
d->mode = -1;
- connect(&d->t, SIGNAL(timeout()), SLOT(t_timeout()));
+ connect(&d->t, TQT_SIGNAL(timeout()), TQT_SLOT(t_timeout()));
}
JT_S5B::~JT_S5B()
@@ -2205,32 +2205,32 @@ JT_S5B::~JT_S5B()
delete d;
}
-void JT_S5B::request(const Jid &to, const QString &sid, const StreamHostList &hosts, bool fast, bool udp)
+void JT_S5B::request(const Jid &to, const TQString &sid, const StreamHostList &hosts, bool fast, bool udp)
{
d->mode = 0;
- QDomElement iq;
+ TQDomElement iq;
d->to = to;
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/bytestreams");
query.setAttribute("sid", sid);
query.setAttribute("mode", udp ? "udp" : "tcp" );
iq.appendChild(query);
for(StreamHostList::ConstIterator it = hosts.begin(); it != hosts.end(); ++it) {
- QDomElement shost = doc()->createElement("streamhost");
+ TQDomElement shost = doc()->createElement("streamhost");
shost.setAttribute("jid", (*it).jid().full());
shost.setAttribute("host", (*it).host());
- shost.setAttribute("port", QString::number((*it).port()));
+ shost.setAttribute("port", TQString::number((*it).port()));
if((*it).isProxy()) {
- QDomElement p = doc()->createElement("proxy");
+ TQDomElement p = doc()->createElement("proxy");
p.setAttribute("xmlns", "http://affinix.com/jabber/stream");
shost.appendChild(p);
}
query.appendChild(shost);
}
if(fast) {
- QDomElement e = doc()->createElement("fast");
+ TQDomElement e = doc()->createElement("fast");
e.setAttribute("xmlns", "http://affinix.com/jabber/stream");
query.appendChild(e);
}
@@ -2241,27 +2241,27 @@ void JT_S5B::requestProxyInfo(const Jid &to)
{
d->mode = 1;
- QDomElement iq;
+ TQDomElement iq;
d->to = to;
iq = createIQ(doc(), "get", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/bytestreams");
iq.appendChild(query);
d->iq = iq;
}
-void JT_S5B::requestActivation(const Jid &to, const QString &sid, const Jid &target)
+void JT_S5B::requestActivation(const Jid &to, const TQString &sid, const Jid &target)
{
d->mode = 2;
- QDomElement iq;
+ TQDomElement iq;
d->to = to;
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/bytestreams");
query.setAttribute("sid", sid);
iq.appendChild(query);
- QDomElement act = doc()->createElement("activate");
+ TQDomElement act = doc()->createElement("activate");
act.appendChild(doc()->createTextNode(target.full()));
query.appendChild(act);
d->iq = iq;
@@ -2279,7 +2279,7 @@ void JT_S5B::onDisconnect()
d->t.stop();
}
-bool JT_S5B::take(const QDomElement &x)
+bool JT_S5B::take(const TQDomElement &x)
{
if(d->mode == -1)
return false;
@@ -2290,11 +2290,11 @@ bool JT_S5B::take(const QDomElement &x)
d->t.stop();
if(x.attribute("type") == "result") {
- QDomElement q = queryTag(x);
+ TQDomElement q = queryTag(x);
if(d->mode == 0) {
d->streamHost = "";
if(!q.isNull()) {
- QDomElement shost = q.elementsByTagName("streamhost-used").item(0).toElement();
+ TQDomElement shost = q.elementsByTagName("streamhost-used").item(0).toElement();
if(!shost.isNull())
d->streamHost = shost.attribute("jid");
}
@@ -2303,11 +2303,11 @@ bool JT_S5B::take(const QDomElement &x)
}
else if(d->mode == 1) {
if(!q.isNull()) {
- QDomElement shost = q.elementsByTagName("streamhost").item(0).toElement();
+ TQDomElement shost = q.elementsByTagName("streamhost").item(0).toElement();
if(!shost.isNull()) {
Jid j = shost.attribute("jid");
if(j.isValid()) {
- QString host = shost.attribute("host");
+ TQString host = shost.attribute("host");
if(!host.isEmpty()) {
int port = shost.attribute("port").toInt();
StreamHost h;
@@ -2367,11 +2367,11 @@ int JT_PushS5B::priority() const
return 1;
}
-bool JT_PushS5B::take(const QDomElement &e)
+bool JT_PushS5B::take(const TQDomElement &e)
{
// look for udpsuccess
if(e.tagName() == "message") {
- QDomElement x = e.elementsByTagName("udpsuccess").item(0).toElement();
+ TQDomElement x = e.elementsByTagName("udpsuccess").item(0).toElement();
if(!x.isNull() && x.attribute("xmlns") == "http://jabber.org/protocol/bytestreams") {
incomingUDPSuccess(Jid(x.attribute("from")), x.attribute("dstaddr"));
return true;
@@ -2393,22 +2393,22 @@ bool JT_PushS5B::take(const QDomElement &e)
return false;
Jid from(e.attribute("from"));
- QDomElement q = queryTag(e);
- QString sid = q.attribute("sid");
+ TQDomElement q = queryTag(e);
+ TQString sid = q.attribute("sid");
StreamHostList hosts;
- QDomNodeList nl = q.elementsByTagName("streamhost");
+ TQDomNodeList nl = q.elementsByTagName("streamhost");
for(uint n = 0; n < nl.count(); ++n) {
- QDomElement shost = nl.item(n).toElement();
+ TQDomElement shost = nl.item(n).toElement();
if(hosts.count() < MAXSTREAMHOSTS) {
Jid j = shost.attribute("jid");
if(!j.isValid())
continue;
- QString host = shost.attribute("host");
+ TQString host = shost.attribute("host");
if(host.isEmpty())
continue;
int port = shost.attribute("port").toInt();
- QDomElement p = shost.elementsByTagName("proxy").item(0).toElement();
+ TQDomElement p = shost.elementsByTagName("proxy").item(0).toElement();
bool isProxy = false;
if(!p.isNull() && p.attribute("xmlns") == "http://affinix.com/jabber/stream")
isProxy = true;
@@ -2423,7 +2423,7 @@ bool JT_PushS5B::take(const QDomElement &e)
}
bool fast = false;
- QDomElement t;
+ TQDomElement t;
t = q.elementsByTagName("fast").item(0).toElement();
if(!t.isNull() && t.attribute("xmlns") == "http://affinix.com/jabber/stream")
fast = true;
@@ -2440,43 +2440,43 @@ bool JT_PushS5B::take(const QDomElement &e)
return true;
}
-void JT_PushS5B::respondSuccess(const Jid &to, const QString &id, const Jid &streamHost)
+void JT_PushS5B::respondSuccess(const Jid &to, const TQString &id, const Jid &streamHost)
{
- QDomElement iq = createIQ(doc(), "result", to.full(), id);
- QDomElement query = doc()->createElement("query");
+ TQDomElement iq = createIQ(doc(), "result", to.full(), id);
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/bytestreams");
iq.appendChild(query);
- QDomElement shost = doc()->createElement("streamhost-used");
+ TQDomElement shost = doc()->createElement("streamhost-used");
shost.setAttribute("jid", streamHost.full());
query.appendChild(shost);
send(iq);
}
-void JT_PushS5B::respondError(const Jid &to, const QString &id, int code, const QString &str)
+void JT_PushS5B::respondError(const Jid &to, const TQString &id, int code, const TQString &str)
{
- QDomElement iq = createIQ(doc(), "error", to.full(), id);
- QDomElement err = textTag(doc(), "error", str);
- err.setAttribute("code", QString::number(code));
+ TQDomElement iq = createIQ(doc(), "error", to.full(), id);
+ TQDomElement err = textTag(doc(), "error", str);
+ err.setAttribute("code", TQString::number(code));
iq.appendChild(err);
send(iq);
}
-void JT_PushS5B::sendUDPSuccess(const Jid &to, const QString &dstaddr)
+void JT_PushS5B::sendUDPSuccess(const Jid &to, const TQString &dstaddr)
{
- QDomElement m = doc()->createElement("message");
+ TQDomElement m = doc()->createElement("message");
m.setAttribute("to", to.full());
- QDomElement u = doc()->createElement("udpsuccess");
+ TQDomElement u = doc()->createElement("udpsuccess");
u.setAttribute("xmlns", "http://jabber.org/protocol/bytestreams");
u.setAttribute("dstaddr", dstaddr);
m.appendChild(u);
send(m);
}
-void JT_PushS5B::sendActivate(const Jid &to, const QString &sid, const Jid &streamHost)
+void JT_PushS5B::sendActivate(const Jid &to, const TQString &sid, const Jid &streamHost)
{
- QDomElement m = doc()->createElement("message");
+ TQDomElement m = doc()->createElement("message");
m.setAttribute("to", to.full());
- QDomElement act = doc()->createElement("activate");
+ TQDomElement act = doc()->createElement("activate");
act.setAttribute("xmlns", "http://affinix.com/jabber/stream");
act.setAttribute("sid", sid);
act.setAttribute("jid", streamHost.full());
@@ -2498,7 +2498,7 @@ const Jid & StreamHost::jid() const
return j;
}
-const QString & StreamHost::host() const
+const TQString & StreamHost::host() const
{
return v_host;
}
@@ -2518,7 +2518,7 @@ void StreamHost::setJid(const Jid &_j)
j = _j;
}
-void StreamHost::setHost(const QString &host)
+void StreamHost::setHost(const TQString &host)
{
v_host = host;
}
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/s5b.h b/kopete/protocols/jabber/libiris/iris/jabber/s5b.h
index 353b5f75..d8c301c1 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/s5b.h
+++ b/kopete/protocols/jabber/libiris/iris/jabber/s5b.h
@@ -21,10 +21,10 @@
#ifndef XMPP_S5B_H
#define XMPP_S5B_H
-#include<qobject.h>
-#include<qcstring.h>
-#include<qptrlist.h>
-#include<qvaluelist.h>
+#include<tqobject.h>
+#include<tqcstring.h>
+#include<tqptrlist.h>
+#include<tqvaluelist.h>
#include"im.h"
#include"bytestream.h"
@@ -38,23 +38,23 @@ namespace XMPP
class S5BManager;
class S5BServer;
struct S5BRequest;
- typedef QValueList<StreamHost> StreamHostList;
- typedef QPtrList<S5BConnection> S5BConnectionList;
- typedef QPtrListIterator<S5BConnection> S5BConnectionListIt;
+ typedef TQValueList<StreamHost> StreamHostList;
+ typedef TQPtrList<S5BConnection> S5BConnectionList;
+ typedef TQPtrListIterator<S5BConnection> S5BConnectionListIt;
class S5BDatagram
{
public:
S5BDatagram();
- S5BDatagram(int source, int dest, const QByteArray &data);
+ S5BDatagram(int source, int dest, const TQByteArray &data);
int sourcePort() const;
int destPort() const;
- QByteArray data() const;
+ TQByteArray data() const;
private:
int _source, _dest;
- QByteArray _buf;
+ TQByteArray _buf;
};
class S5BConnection : public ByteStream
@@ -69,19 +69,19 @@ namespace XMPP
Jid proxy() const;
void setProxy(const Jid &proxy);
- void connectToJid(const Jid &peer, const QString &sid, Mode m = Stream);
+ void connectToJid(const Jid &peer, const TQString &sid, Mode m = Stream);
void accept();
void close();
Jid peer() const;
- QString sid() const;
+ TQString sid() const;
bool isRemote() const;
Mode mode() const;
int state() const;
bool isOpen() const;
- void write(const QByteArray &);
- QByteArray read(int bytes=0);
+ void write(const TQByteArray &);
+ TQByteArray read(int bytes=0);
int bytesAvailable() const;
int bytesToWrite() const;
@@ -109,22 +109,22 @@ namespace XMPP
void sc_bytesWritten(int);
void sc_error(int);
- void su_packetReady(const QByteArray &buf);
+ void su_packetReady(const TQByteArray &buf);
private:
class Private;
Private *d;
void reset(bool clear=false);
- void handleUDP(const QByteArray &buf);
- void sendUDP(const QByteArray &buf);
+ void handleUDP(const TQByteArray &buf);
+ void sendUDP(const TQByteArray &buf);
friend class S5BManager;
void man_waitForAccept(const S5BRequest &r);
void man_clientReady(SocksClient *, SocksUDP *);
- void man_udpReady(const QByteArray &buf);
+ void man_udpReady(const TQByteArray &buf);
void man_failed(int);
- S5BConnection(S5BManager *, QObject *parent=0);
+ S5BConnection(S5BManager *, TQObject *parent=0);
};
class S5BManager : public QObject
@@ -138,8 +138,8 @@ namespace XMPP
S5BServer *server() const;
void setServer(S5BServer *s);
- bool isAcceptableSID(const Jid &peer, const QString &sid) const;
- QString genUniqueSID(const Jid &peer) const;
+ bool isAcceptableSID(const Jid &peer, const TQString &sid) const;
+ TQString genUniqueSID(const Jid &peer) const;
S5BConnection *createConnection();
S5BConnection *takeIncoming();
@@ -152,8 +152,8 @@ namespace XMPP
private slots:
void ps_incoming(const S5BRequest &req);
- void ps_incomingUDPSuccess(const Jid &from, const QString &dstaddr);
- void ps_incomingActivate(const Jid &from, const QString &sid, const Jid &streamHost);
+ void ps_incomingUDPSuccess(const Jid &from, const TQString &dstaddr);
+ void ps_incomingActivate(const Jid &from, const TQString &sid, const Jid &streamHost);
void item_accepted();
void item_tryingHosts(const StreamHostList &list);
void item_proxyConnect();
@@ -166,12 +166,12 @@ namespace XMPP
class Private;
Private *d;
- S5BConnection *findIncoming(const Jid &from, const QString &sid) const;
+ S5BConnection *findIncoming(const Jid &from, const TQString &sid) const;
Entry *findEntry(S5BConnection *) const;
Entry *findEntry(Item *) const;
- Entry *findEntryByHash(const QString &key) const;
- Entry *findEntryBySID(const Jid &peer, const QString &sid) const;
- Entry *findServerEntryByHash(const QString &key) const;
+ Entry *findEntryByHash(const TQString &key) const;
+ Entry *findEntryBySID(const Jid &peer, const TQString &sid) const;
+ Entry *findServerEntryByHash(const TQString &key) const;
void entryContinue(Entry *e);
void queryProxy(Entry *e);
@@ -182,29 +182,29 @@ namespace XMPP
void con_accept(S5BConnection *);
void con_reject(S5BConnection *);
void con_unlink(S5BConnection *);
- void con_sendUDP(S5BConnection *, const QByteArray &buf);
+ void con_sendUDP(S5BConnection *, const TQByteArray &buf);
friend class S5BServer;
- bool srv_ownsHash(const QString &key) const;
- void srv_incomingReady(SocksClient *sc, const QString &key);
- void srv_incomingUDP(bool init, const QHostAddress &addr, int port, const QString &key, const QByteArray &data);
+ bool srv_ownsHash(const TQString &key) const;
+ void srv_incomingReady(SocksClient *sc, const TQString &key);
+ void srv_incomingUDP(bool init, const TQHostAddress &addr, int port, const TQString &key, const TQByteArray &data);
void srv_unlink();
friend class Item;
- void doSuccess(const Jid &peer, const QString &id, const Jid &streamHost);
- void doError(const Jid &peer, const QString &id, int, const QString &);
- void doActivate(const Jid &peer, const QString &sid, const Jid &streamHost);
+ void doSuccess(const Jid &peer, const TQString &id, const Jid &streamHost);
+ void doError(const Jid &peer, const TQString &id, int, const TQString &);
+ void doActivate(const Jid &peer, const TQString &sid, const Jid &streamHost);
};
class S5BConnector : public QObject
{
Q_OBJECT
public:
- S5BConnector(QObject *parent=0);
+ S5BConnector(TQObject *parent=0);
~S5BConnector();
void reset();
- void start(const Jid &self, const StreamHostList &hosts, const QString &key, bool udp, int timeout);
+ void start(const Jid &self, const StreamHostList &hosts, const TQString &key, bool udp, int timeout);
SocksClient *takeClient();
SocksUDP *takeUDP();
StreamHost streamHostUsed() const;
@@ -231,21 +231,21 @@ namespace XMPP
{
Q_OBJECT
public:
- S5BServer(QObject *par=0);
+ S5BServer(TQObject *par=0);
~S5BServer();
bool isActive() const;
bool start(int port);
void stop();
int port() const;
- void setHostList(const QStringList &);
- QStringList hostList() const;
+ void setHostList(const TQStringList &);
+ TQStringList hostList() const;
class Item;
private slots:
void ss_incomingReady();
- void ss_incomingUDP(const QString &host, int port, const QHostAddress &addr, int sourcePort, const QByteArray &data);
+ void ss_incomingUDP(const TQString &host, int port, const TQHostAddress &addr, int sourcePort, const TQByteArray &data);
void item_result(bool);
private:
@@ -256,8 +256,8 @@ namespace XMPP
void link(S5BManager *);
void unlink(S5BManager *);
void unlinkAll();
- const QPtrList<S5BManager> & managerList() const;
- void writeUDP(const QHostAddress &addr, int port, const QByteArray &data);
+ const TQPtrList<S5BManager> & managerList() const;
+ void writeUDP(const TQHostAddress &addr, int port, const TQByteArray &data);
};
class JT_S5B : public Task
@@ -267,13 +267,13 @@ namespace XMPP
JT_S5B(Task *);
~JT_S5B();
- void request(const Jid &to, const QString &sid, const StreamHostList &hosts, bool fast, bool udp=false);
+ void request(const Jid &to, const TQString &sid, const StreamHostList &hosts, bool fast, bool udp=false);
void requestProxyInfo(const Jid &to);
- void requestActivation(const Jid &to, const QString &sid, const Jid &target);
+ void requestActivation(const Jid &to, const TQString &sid, const Jid &target);
void onGo();
void onDisconnect();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
Jid streamHostUsed() const;
StreamHost proxyInfo() const;
@@ -289,7 +289,7 @@ namespace XMPP
struct S5BRequest
{
Jid from;
- QString id, sid;
+ TQString id, sid;
StreamHostList hosts;
bool fast;
bool udp;
@@ -303,17 +303,17 @@ namespace XMPP
int priority() const;
- void respondSuccess(const Jid &to, const QString &id, const Jid &streamHost);
- void respondError(const Jid &to, const QString &id, int code, const QString &str);
- void sendUDPSuccess(const Jid &to, const QString &dstaddr);
- void sendActivate(const Jid &to, const QString &sid, const Jid &streamHost);
+ void respondSuccess(const Jid &to, const TQString &id, const Jid &streamHost);
+ void respondError(const Jid &to, const TQString &id, int code, const TQString &str);
+ void sendUDPSuccess(const Jid &to, const TQString &dstaddr);
+ void sendActivate(const Jid &to, const TQString &sid, const Jid &streamHost);
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
signals:
void incoming(const S5BRequest &req);
- void incomingUDPSuccess(const Jid &from, const QString &dstaddr);
- void incomingActivate(const Jid &from, const QString &sid, const Jid &streamHost);
+ void incomingUDPSuccess(const Jid &from, const TQString &dstaddr);
+ void incomingActivate(const Jid &from, const TQString &sid, const Jid &streamHost);
};
class StreamHost
@@ -322,17 +322,17 @@ namespace XMPP
StreamHost();
const Jid & jid() const;
- const QString & host() const;
+ const TQString & host() const;
int port() const;
bool isProxy() const;
void setJid(const Jid &);
- void setHost(const QString &);
+ void setHost(const TQString &);
void setPort(int);
void setIsProxy(bool);
private:
Jid j;
- QString v_host;
+ TQString v_host;
int v_port;
bool proxy;
};
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp
index ee6857e3..2ca012c1 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp
+++ b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.cpp
@@ -20,7 +20,7 @@
#include"xmpp_ibb.h"
-#include<qtimer.h>
+#include<tqtimer.h>
#include"xmpp_xmlcommon.h"
#include"base64.h"
@@ -44,14 +44,14 @@ public:
int state;
Jid peer;
- QString sid;
+ TQString sid;
IBBManager *m;
JT_IBB *j;
- QDomElement comment;
- QString iq_id;
+ TQDomElement comment;
+ TQString iq_id;
int blockSize;
- QByteArray recvbuf, sendbuf;
+ TQByteArray recvbuf, sendbuf;
bool closePending, closing;
int id;
@@ -67,7 +67,7 @@ IBBConnection::IBBConnection(IBBManager *m)
++num_conn;
d->id = id_conn++;
- QString dstr; dstr.sprintf("IBBConnection[%d]: constructing, count=%d\n", d->id, num_conn);
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: constructing, count=%d\n", d->id, num_conn);
d->m->client()->debug(dstr);
}
@@ -91,13 +91,13 @@ IBBConnection::~IBBConnection()
reset(true);
--num_conn;
- QString dstr; dstr.sprintf("IBBConnection[%d]: destructing, count=%d\n", d->id, num_conn);
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: destructing, count=%d\n", d->id, num_conn);
d->m->client()->debug(dstr);
delete d;
}
-void IBBConnection::connectToJid(const Jid &peer, const QDomElement &comment)
+void IBBConnection::connectToJid(const Jid &peer, const TQDomElement &comment)
{
close();
reset(true);
@@ -106,11 +106,11 @@ void IBBConnection::connectToJid(const Jid &peer, const QDomElement &comment)
d->peer = peer;
d->comment = comment;
- QString dstr; dstr.sprintf("IBBConnection[%d]: initiating request to %s\n", d->id, peer.full().latin1());
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: initiating request to %s\n", d->id, peer.full().latin1());
d->m->client()->debug(dstr);
d->j = new JT_IBB(d->m->client()->rootTask());
- connect(d->j, SIGNAL(finished()), SLOT(ibb_finished()));
+ connect(d->j, TQT_SIGNAL(finished()), TQT_SLOT(ibb_finished()));
d->j->request(d->peer, comment);
d->j->go(true);
}
@@ -120,7 +120,7 @@ void IBBConnection::accept()
if(d->state != WaitingForAccept)
return;
- QString dstr; dstr.sprintf("IBBConnection[%d]: accepting %s [%s]\n", d->id, d->peer.full().latin1(), d->sid.latin1());
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: accepting %s [%s]\n", d->id, d->peer.full().latin1(), d->sid.latin1());
d->m->client()->debug(dstr);
d->m->doAccept(this, d->iq_id);
@@ -139,7 +139,7 @@ void IBBConnection::close()
return;
}
- QString dstr; dstr.sprintf("IBBConnection[%d]: closing\n", d->id);
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: closing\n", d->id);
d->m->client()->debug(dstr);
if(d->state == Active) {
@@ -152,7 +152,7 @@ void IBBConnection::close()
// send a close packet
JT_IBB *j = new JT_IBB(d->m->client()->rootTask());
- j->sendData(d->peer, d->sid, QByteArray(), true);
+ j->sendData(d->peer, d->sid, TQByteArray(), true);
j->go(true);
}
@@ -169,12 +169,12 @@ Jid IBBConnection::peer() const
return d->peer;
}
-QString IBBConnection::streamid() const
+TQString IBBConnection::streamid() const
{
return d->sid;
}
-QDomElement IBBConnection::comment() const
+TQDomElement IBBConnection::comment() const
{
return d->comment;
}
@@ -187,7 +187,7 @@ bool IBBConnection::isOpen() const
return false;
}
-void IBBConnection::write(const QByteArray &a)
+void IBBConnection::write(const TQByteArray &a)
{
if(d->state != Active || d->closePending || d->closing)
return;
@@ -200,10 +200,10 @@ void IBBConnection::write(const QByteArray &a)
trySend();
}
-QByteArray IBBConnection::read(int)
+TQByteArray IBBConnection::read(int)
{
// TODO: obey argument
- QByteArray a = d->recvbuf.copy();
+ TQByteArray a = d->recvbuf.copy();
d->recvbuf.resize(0);
return a;
}
@@ -218,7 +218,7 @@ int IBBConnection::bytesToWrite() const
return d->sendbuf.size();
}
-void IBBConnection::waitForAccept(const Jid &peer, const QString &sid, const QDomElement &comment, const QString &iq_id)
+void IBBConnection::waitForAccept(const Jid &peer, const TQString &sid, const TQDomElement &comment, const TQString &iq_id)
{
close();
reset(true);
@@ -230,7 +230,7 @@ void IBBConnection::waitForAccept(const Jid &peer, const QString &sid, const QDo
d->iq_id = iq_id;
}
-void IBBConnection::takeIncomingData(const QByteArray &a, bool close)
+void IBBConnection::takeIncomingData(const TQByteArray &a, bool close)
{
// append to the end of our recv buffer
int oldsize = d->recvbuf.size();
@@ -254,7 +254,7 @@ void IBBConnection::ibb_finished()
if(j->mode() == JT_IBB::ModeRequest) {
d->sid = j->streamid();
- QString dstr; dstr.sprintf("IBBConnection[%d]: %s [%s] accepted.\n", d->id, d->peer.full().latin1(), d->sid.latin1());
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: %s [%s] accepted.\n", d->id, d->peer.full().latin1(), d->sid.latin1());
d->m->client()->debug(dstr);
d->state = Active;
@@ -270,12 +270,12 @@ void IBBConnection::ibb_finished()
}
if(!d->sendbuf.isEmpty() || d->closePending)
- QTimer::singleShot(IBB_PACKET_DELAY, this, SLOT(trySend()));
+ TQTimer::singleShot(IBB_PACKET_DELAY, this, TQT_SLOT(trySend()));
}
}
else {
if(j->mode() == JT_IBB::ModeRequest) {
- QString dstr; dstr.sprintf("IBBConnection[%d]: %s refused.\n", d->id, d->peer.full().latin1());
+ TQString dstr; dstr.sprintf("IBBConnection[%d]: %s refused.\n", d->id, d->peer.full().latin1());
d->m->client()->debug(dstr);
reset(true);
@@ -294,7 +294,7 @@ void IBBConnection::trySend()
if(d->j)
return;
- QByteArray a;
+ TQByteArray a;
if(!d->sendbuf.isEmpty()) {
// take a chunk
if(d->sendbuf.size() < IBB_PACKET_SIZE)
@@ -326,7 +326,7 @@ void IBBConnection::trySend()
d->blockSize = a.size();
d->j = new JT_IBB(d->m->client()->rootTask());
- connect(d->j, SIGNAL(finished()), SLOT(ibb_finished()));
+ connect(d->j, TQT_SIGNAL(finished()), TQT_SLOT(ibb_finished()));
d->j->sendData(d->peer, d->sid, a, doClose);
d->j->go(true);
}
@@ -347,14 +347,14 @@ public:
};
IBBManager::IBBManager(Client *parent)
-:QObject(parent)
+:TQObject(parent)
{
d = new Private;
d->client = parent;
d->ibb = new JT_IBB(d->client->rootTask(), true);
- connect(d->ibb, SIGNAL(incomingRequest(const Jid &, const QString &, const QDomElement &)), SLOT(ibb_incomingRequest(const Jid &, const QString &, const QDomElement &)));
- connect(d->ibb, SIGNAL(incomingData(const Jid &, const QString &, const QString &, const QByteArray &, bool)), SLOT(ibb_incomingData(const Jid &, const QString &, const QString &, const QByteArray &, bool)));
+ connect(d->ibb, TQT_SIGNAL(incomingRequest(const Jid &, const TQString &, const TQDomElement &)), TQT_SLOT(ibb_incomingRequest(const Jid &, const TQString &, const TQDomElement &)));
+ connect(d->ibb, TQT_SIGNAL(incomingData(const Jid &, const TQString &, const TQString &, const TQByteArray &, bool)), TQT_SLOT(ibb_incomingData(const Jid &, const TQString &, const TQString &, const TQByteArray &, bool)));
}
IBBManager::~IBBManager()
@@ -380,9 +380,9 @@ IBBConnection *IBBManager::takeIncoming()
return c;
}
-void IBBManager::ibb_incomingRequest(const Jid &from, const QString &id, const QDomElement &comment)
+void IBBManager::ibb_incomingRequest(const Jid &from, const TQString &id, const TQDomElement &comment)
{
- QString sid = genUniqueKey();
+ TQString sid = genUniqueKey();
// create a "waiting" connection
IBBConnection *c = new IBBConnection(this);
@@ -391,7 +391,7 @@ void IBBManager::ibb_incomingRequest(const Jid &from, const QString &id, const Q
incomingReady();
}
-void IBBManager::ibb_incomingData(const Jid &from, const QString &streamid, const QString &id, const QByteArray &data, bool close)
+void IBBManager::ibb_incomingData(const Jid &from, const TQString &streamid, const TQString &id, const TQByteArray &data, bool close)
{
IBBConnection *c = findConnection(streamid, from);
if(!c) {
@@ -403,14 +403,14 @@ void IBBManager::ibb_incomingData(const Jid &from, const QString &streamid, cons
}
}
-QString IBBManager::genKey() const
+TQString IBBManager::genKey() const
{
- QString key = "ibb_";
+ TQString key = "ibb_";
for(int i = 0; i < 4; ++i) {
int word = rand() & 0xffff;
for(int n = 0; n < 4; ++n) {
- QString s;
+ TQString s;
s.sprintf("%x", (word >> (n * 4)) & 0xf);
key.append(s);
}
@@ -419,10 +419,10 @@ QString IBBManager::genKey() const
return key;
}
-QString IBBManager::genUniqueKey() const
+TQString IBBManager::genUniqueKey() const
{
// get unused key
- QString key;
+ TQString key;
while(1) {
key = genKey();
@@ -443,7 +443,7 @@ void IBBManager::unlink(IBBConnection *c)
d->activeConns.removeRef(c);
}
-IBBConnection *IBBManager::findConnection(const QString &sid, const Jid &peer) const
+IBBConnection *IBBManager::findConnection(const TQString &sid, const Jid &peer) const
{
IBBConnectionListIt it(d->activeConns);
for(IBBConnection *c; (c = it.current()); ++it) {
@@ -453,12 +453,12 @@ IBBConnection *IBBManager::findConnection(const QString &sid, const Jid &peer) c
return 0;
}
-void IBBManager::doAccept(IBBConnection *c, const QString &id)
+void IBBManager::doAccept(IBBConnection *c, const TQString &id)
{
d->ibb->respondSuccess(c->peer(), id, c->streamid());
}
-void IBBManager::doReject(IBBConnection *c, const QString &id, int code, const QString &str)
+void IBBManager::doReject(IBBConnection *c, const TQString &id, int code, const TQString &str)
{
d->ibb->respondError(c->peer(), id, code, str);
}
@@ -472,11 +472,11 @@ class JT_IBB::Private
public:
Private() {}
- QDomElement iq;
+ TQDomElement iq;
int mode;
bool serve;
Jid to;
- QString streamid;
+ TQString streamid;
};
JT_IBB::JT_IBB(Task *parent, bool serve)
@@ -491,60 +491,60 @@ JT_IBB::~JT_IBB()
delete d;
}
-void JT_IBB::request(const Jid &to, const QDomElement &comment)
+void JT_IBB::request(const Jid &to, const TQDomElement &comment)
{
d->mode = ModeRequest;
- QDomElement iq;
+ TQDomElement iq;
d->to = to;
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/ibb");
iq.appendChild(query);
query.appendChild(comment);
d->iq = iq;
}
-void JT_IBB::sendData(const Jid &to, const QString &streamid, const QByteArray &a, bool close)
+void JT_IBB::sendData(const Jid &to, const TQString &streamid, const TQByteArray &a, bool close)
{
d->mode = ModeSendData;
- QDomElement iq;
+ TQDomElement iq;
d->to = to;
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/ibb");
iq.appendChild(query);
query.appendChild(textTag(doc(), "streamid", streamid));
if(!a.isEmpty())
query.appendChild(textTag(doc(), "data", Base64::arrayToString(a)));
if(close) {
- QDomElement c = doc()->createElement("close");
+ TQDomElement c = doc()->createElement("close");
query.appendChild(c);
}
d->iq = iq;
}
-void JT_IBB::respondSuccess(const Jid &to, const QString &id, const QString &streamid)
+void JT_IBB::respondSuccess(const Jid &to, const TQString &id, const TQString &streamid)
{
- QDomElement iq = createIQ(doc(), "result", to.full(), id);
- QDomElement query = doc()->createElement("query");
+ TQDomElement iq = createIQ(doc(), "result", to.full(), id);
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/ibb");
iq.appendChild(query);
query.appendChild(textTag(doc(), "streamid", streamid));
send(iq);
}
-void JT_IBB::respondError(const Jid &to, const QString &id, int code, const QString &str)
+void JT_IBB::respondError(const Jid &to, const TQString &id, int code, const TQString &str)
{
- QDomElement iq = createIQ(doc(), "error", to.full(), id);
- QDomElement err = textTag(doc(), "error", str);
- err.setAttribute("code", QString::number(code));
+ TQDomElement iq = createIQ(doc(), "error", to.full(), id);
+ TQDomElement err = textTag(doc(), "error", str);
+ err.setAttribute("code", TQString::number(code));
iq.appendChild(err);
send(iq);
}
-void JT_IBB::respondAck(const Jid &to, const QString &id)
+void JT_IBB::respondAck(const Jid &to, const TQString &id)
{
- QDomElement iq = createIQ(doc(), "result", to.full(), id);
+ TQDomElement iq = createIQ(doc(), "result", to.full(), id);
send(iq);
}
@@ -553,7 +553,7 @@ void JT_IBB::onGo()
send(d->iq);
}
-bool JT_IBB::take(const QDomElement &e)
+bool JT_IBB::take(const TQDomElement &e)
{
if(d->serve) {
// must be an iq-set tag
@@ -564,18 +564,18 @@ bool JT_IBB::take(const QDomElement &e)
return false;
Jid from(e.attribute("from"));
- QString id = e.attribute("id");
- QDomElement q = queryTag(e);
+ TQString id = e.attribute("id");
+ TQDomElement q = queryTag(e);
bool found;
- QDomElement s = findSubTag(q, "streamid", &found);
+ TQDomElement s = findSubTag(q, "streamid", &found);
if(!found) {
- QDomElement comment = findSubTag(q, "comment", &found);
+ TQDomElement comment = findSubTag(q, "comment", &found);
incomingRequest(from, id, comment);
}
else {
- QString sid = tagContent(s);
- QByteArray a;
+ TQString sid = tagContent(s);
+ TQByteArray a;
bool close = false;
s = findSubTag(q, "data", &found);
if(found)
@@ -595,12 +595,12 @@ bool JT_IBB::take(const QDomElement &e)
return false;
if(e.attribute("type") == "result") {
- QDomElement q = queryTag(e);
+ TQDomElement q = queryTag(e);
// request
if(d->mode == ModeRequest) {
bool found;
- QDomElement s = findSubTag(q, "streamid", &found);
+ TQDomElement s = findSubTag(q, "streamid", &found);
if(found)
d->streamid = tagContent(s);
else
@@ -621,7 +621,7 @@ bool JT_IBB::take(const QDomElement &e)
}
}
-QString JT_IBB::streamid() const
+TQString JT_IBB::streamid() const
{
return d->streamid;
}
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h
index 682c5a06..e5a0ed93 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h
+++ b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_ibb.h
@@ -21,10 +21,10 @@
#ifndef JABBER_IBB_H
#define JABBER_IBB_H
-#include<qobject.h>
-#include<qdom.h>
-#include<qstring.h>
-#include<qptrlist.h>
+#include<tqobject.h>
+#include<tqdom.h>
+#include<tqstring.h>
+#include<tqptrlist.h>
#include"bytestream.h"
#include"im.h"
@@ -43,18 +43,18 @@ namespace XMPP
IBBConnection(IBBManager *);
~IBBConnection();
- void connectToJid(const Jid &peer, const QDomElement &comment);
+ void connectToJid(const Jid &peer, const TQDomElement &comment);
void accept();
void close();
int state() const;
Jid peer() const;
- QString streamid() const;
- QDomElement comment() const;
+ TQString streamid() const;
+ TQDomElement comment() const;
bool isOpen() const;
- void write(const QByteArray &);
- QByteArray read(int bytes=0);
+ void write(const TQByteArray &);
+ TQByteArray read(int bytes=0);
int bytesAvailable() const;
int bytesToWrite() const;
@@ -72,12 +72,12 @@ namespace XMPP
void reset(bool clear=false);
friend class IBBManager;
- void waitForAccept(const Jid &peer, const QString &sid, const QDomElement &comment, const QString &iq_id);
- void takeIncomingData(const QByteArray &, bool close);
+ void waitForAccept(const Jid &peer, const TQString &sid, const TQDomElement &comment, const TQString &iq_id);
+ void takeIncomingData(const TQByteArray &, bool close);
};
- typedef QPtrList<IBBConnection> IBBConnectionList;
- typedef QPtrListIterator<IBBConnection> IBBConnectionListIt;
+ typedef TQPtrList<IBBConnection> IBBConnectionList;
+ typedef TQPtrListIterator<IBBConnection> IBBConnectionListIt;
class IBBManager : public QObject
{
Q_OBJECT
@@ -93,22 +93,22 @@ namespace XMPP
void incomingReady();
private slots:
- void ibb_incomingRequest(const Jid &from, const QString &id, const QDomElement &);
- void ibb_incomingData(const Jid &from, const QString &streamid, const QString &id, const QByteArray &data, bool close);
+ void ibb_incomingRequest(const Jid &from, const TQString &id, const TQDomElement &);
+ void ibb_incomingData(const Jid &from, const TQString &streamid, const TQString &id, const TQByteArray &data, bool close);
private:
class Private;
Private *d;
- QString genKey() const;
+ TQString genKey() const;
friend class IBBConnection;
- IBBConnection *findConnection(const QString &sid, const Jid &peer="") const;
- QString genUniqueKey() const;
+ IBBConnection *findConnection(const TQString &sid, const Jid &peer="") const;
+ TQString genUniqueKey() const;
void link(IBBConnection *);
void unlink(IBBConnection *);
- void doAccept(IBBConnection *c, const QString &id);
- void doReject(IBBConnection *c, const QString &id, int, const QString &);
+ void doAccept(IBBConnection *c, const TQString &id);
+ void doReject(IBBConnection *c, const TQString &id, int, const TQString &);
};
class JT_IBB : public Task
@@ -119,22 +119,22 @@ namespace XMPP
JT_IBB(Task *, bool serve=false);
~JT_IBB();
- void request(const Jid &, const QDomElement &comment);
- void sendData(const Jid &, const QString &streamid, const QByteArray &data, bool close);
- void respondSuccess(const Jid &, const QString &id, const QString &streamid);
- void respondError(const Jid &, const QString &id, int code, const QString &str);
- void respondAck(const Jid &to, const QString &id);
+ void request(const Jid &, const TQDomElement &comment);
+ void sendData(const Jid &, const TQString &streamid, const TQByteArray &data, bool close);
+ void respondSuccess(const Jid &, const TQString &id, const TQString &streamid);
+ void respondError(const Jid &, const TQString &id, int code, const TQString &str);
+ void respondAck(const Jid &to, const TQString &id);
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
- QString streamid() const;
+ TQString streamid() const;
Jid jid() const;
int mode() const;
signals:
- void incomingRequest(const Jid &from, const QString &id, const QDomElement &);
- void incomingData(const Jid &from, const QString &streamid, const QString &id, const QByteArray &data, bool close);
+ void incomingRequest(const Jid &from, const TQString &id, const TQDomElement &);
+ void incomingData(const Jid &from, const TQString &streamid, const TQString &id, const TQByteArray &data, bool close);
private:
class Private;
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.cpp b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.cpp
index 987ac0c7..a39d92b9 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.cpp
+++ b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.cpp
@@ -20,8 +20,8 @@
#include"xmpp_jidlink.h"
-#include<qdom.h>
-#include<qtimer.h>
+#include<tqdom.h>
+#include<tqtimer.h>
#include"im.h"
#include"s5b.h"
#include"xmpp_ibb.h"
@@ -42,7 +42,7 @@ public:
};
JidLink::JidLink(Client *client)
-:QObject(client->jidLinkManager())
+:TQObject(client->jidLinkManager())
{
d = new Private;
d->client = client;
@@ -73,7 +73,7 @@ void JidLink::reset(bool clear)
}
}
-void JidLink::connectToJid(const Jid &jid, int type, const QDomElement &comment)
+void JidLink::connectToJid(const Jid &jid, int type, const TQDomElement &comment)
{
reset(true);
if(type == DTCP)
@@ -105,18 +105,18 @@ void JidLink::link()
{
if(d->type == DTCP) {
S5BConnection *c = (S5BConnection *)d->bs;
- connect(c, SIGNAL(connected()), SLOT(dtcp_connected()));
- connect(c, SIGNAL(accepted()), SLOT(dtcp_accepted()));
+ connect(c, TQT_SIGNAL(connected()), TQT_SLOT(dtcp_connected()));
+ connect(c, TQT_SIGNAL(accepted()), TQT_SLOT(dtcp_accepted()));
}
else {
IBBConnection *c = (IBBConnection *)d->bs;
- connect(c, SIGNAL(connected()), SLOT(ibb_connected()));
+ connect(c, TQT_SIGNAL(connected()), TQT_SLOT(ibb_connected()));
}
- connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed()));
- connect(d->bs, SIGNAL(error(int)), SLOT(bs_error(int)));
- connect(d->bs, SIGNAL(bytesWritten(int)), SLOT(bs_bytesWritten(int)));
- connect(d->bs, SIGNAL(readyRead()), SLOT(bs_readyRead()));
+ connect(d->bs, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed()));
+ connect(d->bs, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int)));
+ connect(d->bs, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(bs_bytesWritten(int)));
+ connect(d->bs, TQT_SIGNAL(readyRead()), TQT_SLOT(bs_readyRead()));
}
void JidLink::unlink()
@@ -129,7 +129,7 @@ void JidLink::accept()
if(d->state != WaitingForAccept)
return;
- QTimer::singleShot(0, this, SLOT(doRealAccept()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doRealAccept()));
}
void JidLink::doRealAccept()
@@ -202,18 +202,18 @@ void JidLink::close()
reset();
}
-void JidLink::write(const QByteArray &a)
+void JidLink::write(const TQByteArray &a)
{
if(d->state == Active)
d->bs->write(a);
}
-QByteArray JidLink::read(int bytes)
+TQByteArray JidLink::read(int bytes)
{
if(d->bs)
return d->bs->read(bytes);
else
- return QByteArray();
+ return TQByteArray();
}
int JidLink::bytesAvailable() const
@@ -283,11 +283,11 @@ public:
Private() {}
Client *client;
- QPtrList<JidLink> incomingList;
+ TQPtrList<JidLink> incomingList;
};
JidLinkManager::JidLinkManager(Client *par)
-:QObject(par)
+:TQObject(par)
{
d = new Private;
d->client = par;
diff --git a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h
index ac852349..40d3d4eb 100644
--- a/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h
+++ b/kopete/protocols/jabber/libiris/iris/jabber/xmpp_jidlink.h
@@ -25,8 +25,8 @@
#ifndef JABBER_JIDLINK_H
#define JABBER_JIDLINK_H
-#include<qobject.h>
-#include<qstring.h>
+#include<tqobject.h>
+#include<tqstring.h>
#include"xmpp.h"
class ByteStream;
@@ -46,7 +46,7 @@ namespace XMPP
JidLink(Client *client);
~JidLink();
- void connectToJid(const Jid &jid, int type, const QDomElement &comment);
+ void connectToJid(const Jid &jid, int type, const TQDomElement &comment);
void accept();
int type() const;
@@ -55,8 +55,8 @@ namespace XMPP
bool isOpen() const;
void close();
- void write(const QByteArray &);
- QByteArray read(int bytes=0);
+ void write(const TQByteArray &);
+ TQByteArray read(int bytes=0);
int bytesAvailable() const;
int bytesToWrite() const;
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp
index 55b43c06..3ba5cb16 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/connector.cpp
@@ -31,12 +31,12 @@
#include"xmpp.h"
-#include<qguardedptr.h>
+#include<tqguardedptr.h>
#include<qca.h>
#include"safedelete.h"
#ifdef NO_NDNS
-#include<qdns.h>
+#include<tqdns.h>
#else
#include"ndns.h"
#endif
@@ -55,8 +55,8 @@ using namespace XMPP;
//----------------------------------------------------------------------------
// Connector
//----------------------------------------------------------------------------
-Connector::Connector(QObject *parent)
-:QObject(parent)
+Connector::Connector(TQObject *parent)
+:TQObject(parent)
{
setUseSSL(false);
setPeerAddressNone();
@@ -76,7 +76,7 @@ bool Connector::havePeerAddress() const
return haveaddr;
}
-QHostAddress Connector::peerAddress() const
+TQHostAddress Connector::peerAddress() const
{
return addr;
}
@@ -94,11 +94,11 @@ void Connector::setUseSSL(bool b)
void Connector::setPeerAddressNone()
{
haveaddr = false;
- addr = QHostAddress();
+ addr = TQHostAddress();
port = 0;
}
-void Connector::setPeerAddress(const QHostAddress &_addr, Q_UINT16 _port)
+void Connector::setPeerAddress(const TQHostAddress &_addr, Q_UINT16 _port)
{
haveaddr = true;
addr = _addr;
@@ -124,7 +124,7 @@ int AdvancedConnector::Proxy::type() const
return t;
}
-QString AdvancedConnector::Proxy::host() const
+TQString AdvancedConnector::Proxy::host() const
{
return v_host;
}
@@ -134,17 +134,17 @@ Q_UINT16 AdvancedConnector::Proxy::port() const
return v_port;
}
-QString AdvancedConnector::Proxy::url() const
+TQString AdvancedConnector::Proxy::url() const
{
return v_url;
}
-QString AdvancedConnector::Proxy::user() const
+TQString AdvancedConnector::Proxy::user() const
{
return v_user;
}
-QString AdvancedConnector::Proxy::pass() const
+TQString AdvancedConnector::Proxy::pass() const
{
return v_pass;
}
@@ -154,14 +154,14 @@ int AdvancedConnector::Proxy::pollInterval() const
return v_poll;
}
-void AdvancedConnector::Proxy::setHttpConnect(const QString &host, Q_UINT16 port)
+void AdvancedConnector::Proxy::setHttpConnect(const TQString &host, Q_UINT16 port)
{
t = HttpConnect;
v_host = host;
v_port = port;
}
-void AdvancedConnector::Proxy::setHttpPoll(const QString &host, Q_UINT16 port, const QString &url)
+void AdvancedConnector::Proxy::setHttpPoll(const TQString &host, Q_UINT16 port, const TQString &url)
{
t = HttpPoll;
v_host = host;
@@ -169,14 +169,14 @@ void AdvancedConnector::Proxy::setHttpPoll(const QString &host, Q_UINT16 port, c
v_url = url;
}
-void AdvancedConnector::Proxy::setSocks(const QString &host, Q_UINT16 port)
+void AdvancedConnector::Proxy::setSocks(const TQString &host, Q_UINT16 port)
{
t = Socks;
v_host = host;
v_port = port;
}
-void AdvancedConnector::Proxy::setUserPass(const QString &user, const QString &pass)
+void AdvancedConnector::Proxy::setUserPass(const TQString &user, const TQString &pass)
{
v_user = user;
v_pass = pass;
@@ -198,21 +198,21 @@ public:
int mode;
ByteStream *bs;
#ifdef NO_NDNS
- QDns *qdns;
+ TQDns *qdns;
#else
NDns dns;
#endif
SrvResolver srv;
- QString server;
- QString opt_host;
+ TQString server;
+ TQString opt_host;
int opt_port;
bool opt_probe, opt_ssl;
Proxy proxy;
- QString host;
+ TQString host;
int port;
- QValueList<QDns::Server> servers;
+ TQValueList<TQDns::Server> servers;
int errorCode;
bool multi, using_srv;
@@ -223,7 +223,7 @@ public:
SafeDelete sd;
};
-AdvancedConnector::AdvancedConnector(QObject *parent)
+AdvancedConnector::AdvancedConnector(TQObject *parent)
:Connector(parent)
{
d = new Private;
@@ -231,9 +231,9 @@ AdvancedConnector::AdvancedConnector(QObject *parent)
#ifdef NO_NDNS
d->qdns = 0;
#else
- connect(&d->dns, SIGNAL(resultsReady()), SLOT(dns_done()));
+ connect(&d->dns, TQT_SIGNAL(resultsReady()), TQT_SLOT(dns_done()));
#endif
- connect(&d->srv, SIGNAL(resultsReady()), SLOT(srv_done()));
+ connect(&d->srv, TQT_SIGNAL(resultsReady()), TQT_SLOT(srv_done()));
d->opt_probe = false;
d->opt_ssl = false;
cleanup();
@@ -285,7 +285,7 @@ void AdvancedConnector::setProxy(const Proxy &proxy)
d->proxy = proxy;
}
-void AdvancedConnector::setOptHostPort(const QString &host, Q_UINT16 _port)
+void AdvancedConnector::setOptHostPort(const TQString &host, Q_UINT16 _port)
{
if(d->mode != Idle)
return;
@@ -307,7 +307,7 @@ void AdvancedConnector::setOptSSL(bool b)
d->opt_ssl = b;
}
-void AdvancedConnector::connectToServer(const QString &server)
+void AdvancedConnector::connectToServer(const TQString &server)
{
if(d->mode != Idle)
return;
@@ -326,10 +326,10 @@ void AdvancedConnector::connectToServer(const QString &server)
HttpPoll *s = new HttpPoll;
d->bs = s;
- connect(s, SIGNAL(connected()), SLOT(bs_connected()));
- connect(s, SIGNAL(syncStarted()), SLOT(http_syncStarted()));
- connect(s, SIGNAL(syncFinished()), SLOT(http_syncFinished()));
- connect(s, SIGNAL(error(int)), SLOT(bs_error(int)));
+ connect(s, TQT_SIGNAL(connected()), TQT_SLOT(bs_connected()));
+ connect(s, TQT_SIGNAL(syncStarted()), TQT_SLOT(http_syncStarted()));
+ connect(s, TQT_SIGNAL(syncFinished()), TQT_SLOT(http_syncFinished()));
+ connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int)));
if(!d->proxy.user().isEmpty())
s->setAuth(d->proxy.user(), d->proxy.pass());
s->setPollInterval(d->proxy.pollInterval());
@@ -348,7 +348,7 @@ void AdvancedConnector::connectToServer(const QString &server)
else {
d->multi = true;
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
srvLookup(d->server);
if(!self)
return;
@@ -389,11 +389,11 @@ void AdvancedConnector::do_resolve()
#ifdef NO_NDNS
printf("resolving (aaaa=%d)\n", d->aaaa);
d->qdns = new QDns;
- connect(d->qdns, SIGNAL(resultsReady()), SLOT(dns_done()));
+ connect(d->qdns, TQT_SIGNAL(resultsReady()), TQT_SLOT(dns_done()));
if(d->aaaa)
- d->qdns->setRecordType(QDns::Aaaa); // IPv6
+ d->qdns->setRecordType(TQDns::Aaaa); // IPv6
else
- d->qdns->setRecordType(QDns::A); // IPv4
+ d->qdns->setRecordType(TQDns::A); // IPv4
d->qdns->setLabel(d->host);
#else
d->dns.resolve(d->host);
@@ -403,7 +403,7 @@ void AdvancedConnector::do_resolve()
void AdvancedConnector::dns_done()
{
bool failed = false;
- QHostAddress addr;
+ TQHostAddress addr;
#ifdef NO_NDNS
//if(!d->qdns)
@@ -416,7 +416,7 @@ void AdvancedConnector::dns_done()
//SafeDeleteLock s(&d->sd);
// grab the address list and destroy the qdns object
- QValueList<QHostAddress> list = d->qdns->addresses();
+ TQValueList<TQHostAddress> list = d->qdns->addresses();
d->qdns->disconnect(this);
d->qdns->deleteLater();
//d->sd.deleteLater(d->qdns);
@@ -438,7 +438,7 @@ void AdvancedConnector::dns_done()
if(d->dns.result() == 0)
failed = true;
else
- addr = QHostAddress(d->dns.result());
+ addr = TQHostAddress(d->dns.result());
#endif
if(failed) {
@@ -502,8 +502,8 @@ void AdvancedConnector::do_connect()
#endif
BSocket *s = new BSocket;
d->bs = s;
- connect(s, SIGNAL(connected()), SLOT(bs_connected()));
- connect(s, SIGNAL(error(int)), SLOT(bs_error(int)));
+ connect(s, TQT_SIGNAL(connected()), TQT_SLOT(bs_connected()));
+ connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int)));
s->connectToHost(d->host, d->port);
}
else if(t == Proxy::HttpConnect) {
@@ -512,8 +512,8 @@ void AdvancedConnector::do_connect()
#endif
HttpConnect *s = new HttpConnect;
d->bs = s;
- connect(s, SIGNAL(connected()), SLOT(bs_connected()));
- connect(s, SIGNAL(error(int)), SLOT(bs_error(int)));
+ connect(s, TQT_SIGNAL(connected()), TQT_SLOT(bs_connected()));
+ connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int)));
if(!d->proxy.user().isEmpty())
s->setAuth(d->proxy.user(), d->proxy.pass());
s->connectToHost(d->proxy.host(), d->proxy.port(), d->host, d->port);
@@ -524,8 +524,8 @@ void AdvancedConnector::do_connect()
#endif
SocksClient *s = new SocksClient;
d->bs = s;
- connect(s, SIGNAL(connected()), SLOT(bs_connected()));
- connect(s, SIGNAL(error(int)), SLOT(bs_error(int)));
+ connect(s, TQT_SIGNAL(connected()), TQT_SLOT(bs_connected()));
+ connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int)));
if(!d->proxy.user().isEmpty())
s->setAuth(d->proxy.user(), d->proxy.pass());
s->connectToHost(d->proxy.host(), d->proxy.port(), d->host, d->port);
@@ -545,7 +545,7 @@ void AdvancedConnector::tryNextSrv()
void AdvancedConnector::srv_done()
{
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
#ifdef XMPP_DEBUG
printf("srv_done1\n");
#endif
@@ -591,7 +591,7 @@ void AdvancedConnector::srv_done()
void AdvancedConnector::bs_connected()
{
if(d->proxy.type() == Proxy::None) {
- QHostAddress h = (static_cast<BSocket*>(d->bs))->peerAddress();
+ TQHostAddress h = (static_cast<BSocket*>(d->bs))->peerAddress();
int p = (static_cast<BSocket*>(d->bs))->peerPort();
setPeerAddress(h, p);
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp
index 3c0389b5..4c8307cb 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/hash.cpp
@@ -473,9 +473,9 @@ public:
sha1_update(&_context, (unsigned char *)in, (unsigned int)len);
}
- void final(QByteArray *out)
+ void final(TQByteArray *out)
{
- QByteArray b(20);
+ TQByteArray b(20);
sha1_final((unsigned char *)b.data(), &_context);
*out = b;
}
@@ -621,9 +621,9 @@ public:
md5_append(&md5, (const md5_byte_t *)in, len);
}
- void final(QByteArray *out)
+ void final(TQByteArray *out)
{
- QByteArray b(16);
+ TQByteArray b(16);
md5_finish(&md5, (md5_byte_t *)b.data());
*out = b;
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp
index 2a40f050..090cc9df 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/jid.cpp
@@ -20,7 +20,7 @@
#include"xmpp.h"
-#include<qdict.h>
+#include<tqdict.h>
#include<stringprep.h>
using namespace XMPP;
@@ -31,12 +31,12 @@ using namespace XMPP;
class StringPrepCache
{
public:
- static bool nameprep(const QString &in, int maxbytes, QString *out)
+ static bool nameprep(const TQString &in, int maxbytes, TQString *out)
{
if(in.isEmpty())
{
if(out)
- *out = QString();
+ *out = TQString();
return true;
}
@@ -52,7 +52,7 @@ public:
return true;
}
- QCString cs = in.utf8();
+ TQCString cs = in.utf8();
cs.resize(maxbytes);
if(stringprep(cs.data(), maxbytes, (Stringprep_profile_flags)0, stringprep_nameprep) != 0)
{
@@ -60,19 +60,19 @@ public:
return false;
}
- QString norm = QString::fromUtf8(cs);
+ TQString norm = TQString::fromUtf8(cs);
that->nameprep_table.insert(in, new Result(norm));
if(out)
*out = norm;
return true;
}
- static bool nodeprep(const QString &in, int maxbytes, QString *out)
+ static bool nodeprep(const TQString &in, int maxbytes, TQString *out)
{
if(in.isEmpty())
{
if(out)
- *out = QString();
+ *out = TQString();
return true;
}
@@ -88,7 +88,7 @@ public:
return true;
}
- QCString cs = in.utf8();
+ TQCString cs = in.utf8();
cs.resize(maxbytes);
if(stringprep(cs.data(), maxbytes, (Stringprep_profile_flags)0, stringprep_xmpp_nodeprep) != 0)
{
@@ -96,19 +96,19 @@ public:
return false;
}
- QString norm = QString::fromUtf8(cs);
+ TQString norm = TQString::fromUtf8(cs);
that->nodeprep_table.insert(in, new Result(norm));
if(out)
*out = norm;
return true;
}
- static bool resourceprep(const QString &in, int maxbytes, QString *out)
+ static bool resourceprep(const TQString &in, int maxbytes, TQString *out)
{
if(in.isEmpty())
{
if(out)
- *out = QString();
+ *out = TQString();
return true;
}
@@ -124,7 +124,7 @@ public:
return true;
}
- QCString cs = in.utf8();
+ TQCString cs = in.utf8();
cs.resize(maxbytes);
if(stringprep(cs.data(), maxbytes, (Stringprep_profile_flags)0, stringprep_xmpp_resourceprep) != 0)
{
@@ -132,7 +132,7 @@ public:
return false;
}
- QString norm = QString::fromUtf8(cs);
+ TQString norm = TQString::fromUtf8(cs);
that->resourceprep_table.insert(in, new Result(norm));
if(out)
*out = norm;
@@ -143,13 +143,13 @@ private:
class Result
{
public:
- QString *norm;
+ TQString *norm;
Result() : norm(0)
{
}
- Result(const QString &s) : norm(new QString(s))
+ Result(const TQString &s) : norm(new TQString(s))
{
}
@@ -159,9 +159,9 @@ private:
}
};
- QDict<Result> nameprep_table;
- QDict<Result> nodeprep_table;
- QDict<Result> resourceprep_table;
+ TQDict<Result> nameprep_table;
+ TQDict<Result> nodeprep_table;
+ TQDict<Result> resourceprep_table;
static StringPrepCache *instance;
@@ -194,17 +194,17 @@ Jid::~Jid()
{
}
-Jid::Jid(const QString &s)
+Jid::Jid(const TQString &s)
{
set(s);
}
Jid::Jid(const char *s)
{
- set(QString(s));
+ set(TQString(s));
}
-Jid & Jid::operator=(const QString &s)
+Jid & Jid::operator=(const TQString &s)
{
set(s);
return *this;
@@ -212,17 +212,17 @@ Jid & Jid::operator=(const QString &s)
Jid & Jid::operator=(const char *s)
{
- set(QString(s));
+ set(TQString(s));
return *this;
}
void Jid::reset()
{
- f = QString();
- b = QString();
- d = QString();
- n = QString();
- r = QString();
+ f = TQString();
+ b = TQString();
+ d = TQString();
+ n = TQString();
+ r = TQString();
valid = false;
}
@@ -244,10 +244,10 @@ void Jid::update()
valid = false;
}
-void Jid::set(const QString &s)
+void Jid::set(const TQString &s)
{
- QString rest, domain, node, resource;
- QString norm_domain, norm_node, norm_resource;
+ TQString rest, domain, node, resource;
+ TQString norm_domain, norm_node, norm_resource;
int x = s.find('/');
if(x != -1) {
rest = s.mid(0, x);
@@ -255,7 +255,7 @@ void Jid::set(const QString &s)
}
else {
rest = s;
- resource = QString();
+ resource = TQString();
}
if(!validResource(resource, &norm_resource)) {
reset();
@@ -268,7 +268,7 @@ void Jid::set(const QString &s)
domain = rest.mid(x+1);
}
else {
- node = QString();
+ node = TQString();
domain = rest;
}
if(!validDomain(domain, &norm_domain) || !validNode(node, &norm_node)) {
@@ -283,9 +283,9 @@ void Jid::set(const QString &s)
update();
}
-void Jid::set(const QString &domain, const QString &node, const QString &resource)
+void Jid::set(const TQString &domain, const TQString &node, const TQString &resource)
{
- QString norm_domain, norm_node, norm_resource;
+ TQString norm_domain, norm_node, norm_resource;
if(!validDomain(domain, &norm_domain) || !validNode(node, &norm_node) || !validResource(resource, &norm_resource)) {
reset();
return;
@@ -297,11 +297,11 @@ void Jid::set(const QString &domain, const QString &node, const QString &resourc
update();
}
-void Jid::setDomain(const QString &s)
+void Jid::setDomain(const TQString &s)
{
if(!valid)
return;
- QString norm;
+ TQString norm;
if(!validDomain(s, &norm)) {
reset();
return;
@@ -310,11 +310,11 @@ void Jid::setDomain(const QString &s)
update();
}
-void Jid::setNode(const QString &s)
+void Jid::setNode(const TQString &s)
{
if(!valid)
return;
- QString norm;
+ TQString norm;
if(!validNode(s, &norm)) {
reset();
return;
@@ -323,11 +323,11 @@ void Jid::setNode(const QString &s)
update();
}
-void Jid::setResource(const QString &s)
+void Jid::setResource(const TQString &s)
{
if(!valid)
return;
- QString norm;
+ TQString norm;
if(!validResource(s, &norm)) {
reset();
return;
@@ -336,14 +336,14 @@ void Jid::setResource(const QString &s)
update();
}
-Jid Jid::withNode(const QString &s) const
+Jid Jid::withNode(const TQString &s) const
{
Jid j = *this;
j.setNode(s);
return j;
}
-Jid Jid::withResource(const QString &s) const
+Jid Jid::withResource(const TQString &s) const
{
Jid j = *this;
j.setResource(s);
@@ -372,38 +372,38 @@ bool Jid::compare(const Jid &a, bool compareRes) const
return true;
}
-bool Jid::validDomain(const QString &s, QString *norm)
+bool Jid::validDomain(const TQString &s, TQString *norm)
{
- /*QCString cs = s.utf8();
+ /*TQCString cs = s.utf8();
cs.resize(1024);
if(stringprep(cs.data(), 1024, (Stringprep_profile_flags)0, stringprep_nameprep) != 0)
return false;
if(norm)
- *norm = QString::fromUtf8(cs);
+ *norm = TQString::fromUtf8(cs);
return true;*/
return StringPrepCache::nameprep(s, 1024, norm);
}
-bool Jid::validNode(const QString &s, QString *norm)
+bool Jid::validNode(const TQString &s, TQString *norm)
{
- /*QCString cs = s.utf8();
+ /*TQCString cs = s.utf8();
cs.resize(1024);
if(stringprep(cs.data(), 1024, (Stringprep_profile_flags)0, stringprep_xmpp_nodeprep) != 0)
return false;
if(norm)
- *norm = QString::fromUtf8(cs);
+ *norm = TQString::fromUtf8(cs);
return true;*/
return StringPrepCache::nodeprep(s, 1024, norm);
}
-bool Jid::validResource(const QString &s, QString *norm)
+bool Jid::validResource(const TQString &s, TQString *norm)
{
- /*QCString cs = s.utf8();
+ /*TQCString cs = s.utf8();
cs.resize(1024);
if(stringprep(cs.data(), 1024, (Stringprep_profile_flags)0, stringprep_xmpp_resourceprep) != 0)
return false;
if(norm)
- *norm = QString::fromUtf8(cs);
+ *norm = TQString::fromUtf8(cs);
return true;*/
return StringPrepCache::resourceprep(s, 1024, norm);
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp
index 558a5fcd..2348c88e 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.cpp
@@ -24,12 +24,12 @@
For XMPP::Parser to be "perfect", some things must be solved/changed in the
Qt library:
- - Fix weird QDomElement::haveAttributeNS() bug (patch submitted to
+ - Fix weird TQDomElement::haveAttributeNS() bug (patch submitted to
Trolltech on Aug 31st, 2003).
- - Fix weird behavior in QXmlSimpleReader of reporting endElement() when
+ - Fix weird behavior in TQXmlSimpleReader of reporting endElement() when
the '/' character of a self-closing tag is reached, instead of when
the final '>' is reached.
- - Fix incremental parsing bugs in QXmlSimpleReader. At the moment, the
+ - Fix incremental parsing bugs in TQXmlSimpleReader. At the moment, the
only bug I've found is related to attribute parsing, but there might
be more (search for '###' in $QTDIR/src/xml/qxml.cpp).
@@ -38,10 +38,10 @@
- Deal with the <?xml?> processing instruction as an event type, so that we
can feed it back to the application properly. Right now it is completely
untrackable and is simply tacked into the first event's actualString. We
- can't easily do this because QXmlSimpleReader eats an extra byte beyond
+ can't easily do this because TQXmlSimpleReader eats an extra byte beyond
the processing instruction before reporting it.
- - Make QXmlInputSource capable of accepting data incrementally, to ensure
+ - Make TQXmlInputSource capable of accepting data incrementally, to ensure
proper text encoding detection and processing over a network. This is
technically not a bug, as we have our own subclass below to do it, but
it would be nice if Qt had this already.
@@ -49,8 +49,8 @@
#include"parser.h"
-#include<qtextcodec.h>
-#include<qptrlist.h>
+#include<tqtextcodec.h>
+#include<tqptrlist.h>
#include<string.h>
using namespace XMPP;
@@ -85,7 +85,7 @@ public:
paused = false;
mightChangeEncoding = true;
checkBad = true;
- last = QChar();
+ last = TQChar();
v_encoding = "";
resetLastData();
}
@@ -95,12 +95,12 @@ public:
last_string = "";
}
- QString lastString() const
+ TQString lastString() const
{
return last_string;
}
- void appendData(const QByteArray &a)
+ void appendData(const TQByteArray &a)
{
int oldsize = in.size();
in.resize(oldsize + a.size());
@@ -108,12 +108,12 @@ public:
processBuf();
}
- QChar lastRead()
+ TQChar lastRead()
{
return last;
}
- QChar next()
+ TQChar next()
{
if(paused)
return EndOfData;
@@ -123,14 +123,14 @@ public:
// NOTE: setting 'peek' to true allows the same char to be read again,
// however this still advances the internal byte processing.
- QChar readNext(bool peek=false)
+ TQChar readNext(bool peek=false)
{
- QChar c;
+ TQChar c;
if(mightChangeEncoding)
c = EndOfData;
else {
if(out.isEmpty()) {
- QString s;
+ TQString s;
if(!tryExtractPart(&s))
c = EndOfData;
else {
@@ -158,9 +158,9 @@ public:
return c;
}
- QByteArray unprocessed() const
+ TQByteArray unprocessed() const
{
- QByteArray a(in.size() - at);
+ TQByteArray a(in.size() - at);
memcpy(a.data(), in.data() + at, a.size());
return a;
}
@@ -175,21 +175,21 @@ public:
return paused;
}
- QString encoding() const
+ TQString encoding() const
{
return v_encoding;
}
private:
- QTextDecoder *dec;
- QByteArray in;
- QString out;
+ TQTextDecoder *dec;
+ TQByteArray in;
+ TQString out;
int at;
bool paused;
bool mightChangeEncoding;
- QChar last;
- QString v_encoding;
- QString last_string;
+ TQChar last;
+ TQString v_encoding;
+ TQString last_string;
bool checkBad;
void processBuf()
@@ -198,7 +198,7 @@ private:
printf("processing. size=%d, at=%d\n", in.size(), at);
#endif
if(!dec) {
- QTextCodec *codec = 0;
+ TQTextCodec *codec = 0;
uchar *p = (uchar *)in.data() + at;
int size = in.size() - at;
@@ -216,9 +216,9 @@ private:
}
}
if(utf16)
- codec = QTextCodec::codecForMib(1000); // UTF-16
+ codec = TQTextCodec::codecForMib(1000); // UTF-16
else
- codec = QTextCodec::codecForMib(106); // UTF-8
+ codec = TQTextCodec::codecForMib(106); // UTF-8
v_encoding = codec->name();
dec = codec->makeDecoder();
@@ -238,11 +238,11 @@ private:
int n2 = out.find('>', n);
if(n2 != -1) {
++n2;
- QString h = out.mid(n, n2-n);
- QString enc = processXmlHeader(h);
- QTextCodec *codec = 0;
+ TQString h = out.mid(n, n2-n);
+ TQString enc = processXmlHeader(h);
+ TQTextCodec *codec = 0;
if(!enc.isEmpty())
- codec = QTextCodec::codecForName(enc.latin1());
+ codec = TQTextCodec::codecForName(enc.latin1());
// changing codecs
if(codec) {
@@ -257,7 +257,7 @@ private:
break;
}
}
- QString s;
+ TQString s;
if(!tryExtractPart(&s))
break;
if(checkBad && checkForBadChars(s)) {
@@ -273,7 +273,7 @@ private:
}
}
- QString processXmlHeader(const QString &h)
+ TQString processXmlHeader(const TQString &h)
{
if(h.left(5) != "<?xml")
return "";
@@ -281,7 +281,7 @@ private:
int endPos = h.find(">");
int startPos = h.find("encoding");
if(startPos < endPos && startPos != -1) {
- QString encoding;
+ TQString encoding;
do {
startPos++;
if(startPos > endPos) {
@@ -302,13 +302,13 @@ private:
return "";
}
- bool tryExtractPart(QString *s)
+ bool tryExtractPart(TQString *s)
{
int size = in.size() - at;
if(size == 0)
return false;
uchar *p = (uchar *)in.data() + at;
- QString nextChars;
+ TQString nextChars;
while(1) {
nextChars = dec->toUnicode((const char *)p, 1);
++p;
@@ -333,7 +333,7 @@ private:
return true;
}
- bool checkForBadChars(const QString &s)
+ bool checkForBadChars(const TQString &s)
{
int len = s.find('<');
if(len == -1)
@@ -357,7 +357,7 @@ namespace XMPP
class ParserHandler : public QXmlDefaultHandler
{
public:
- ParserHandler(StreamInput *_in, QDomDocument *_doc)
+ ParserHandler(StreamInput *_in, TQDomDocument *_doc)
{
in = _in;
doc = _doc;
@@ -381,7 +381,7 @@ namespace XMPP
return true;
}
- bool startPrefixMapping(const QString &prefix, const QString &uri)
+ bool startPrefixMapping(const TQString &prefix, const TQString &uri)
{
if(depth == 0) {
nsnames += prefix;
@@ -390,14 +390,14 @@ namespace XMPP
return true;
}
- bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
+ bool startElement(const TQString &namespaceURI, const TQString &localName, const TQString &qName, const TQXmlAttributes &atts)
{
if(depth == 0) {
Parser::Event *e = new Parser::Event;
- QXmlAttributes a;
+ TQXmlAttributes a;
for(int n = 0; n < atts.length(); ++n) {
- QString uri = atts.uri(n);
- QString ln = atts.localName(n);
+ TQString uri = atts.uri(n);
+ TQString ln = atts.localName(n);
if(a.index(uri, ln) == -1)
a.append(atts.qName(n), uri, ln, atts.value(n));
}
@@ -411,10 +411,10 @@ namespace XMPP
in->pause(true);
}
else {
- QDomElement e = doc->createElementNS(namespaceURI, qName);
+ TQDomElement e = doc->createElementNS(namespaceURI, qName);
for(int n = 0; n < atts.length(); ++n) {
- QString uri = atts.uri(n);
- QString ln = atts.localName(n);
+ TQString uri = atts.uri(n);
+ TQString ln = atts.localName(n);
bool have;
if(!uri.isEmpty()) {
have = e.hasAttributeNS(uri, ln);
@@ -440,7 +440,7 @@ namespace XMPP
return true;
}
- bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
+ bool endElement(const TQString &namespaceURI, const TQString &localName, const TQString &qName)
{
--depth;
if(depth == 0) {
@@ -461,8 +461,8 @@ namespace XMPP
eventList.append(e);
in->pause(true);
- elem = QDomElement();
- current = QDomElement();
+ elem = TQDomElement();
+ current = TQDomElement();
}
else
current = current.parentNode().toElement();
@@ -474,22 +474,22 @@ namespace XMPP
return true;
}
- bool characters(const QString &str)
+ bool characters(const TQString &str)
{
if(depth >= 1) {
- QString content = str;
+ TQString content = str;
if(content.isEmpty())
return true;
if(!current.isNull()) {
- QDomText text = doc->createTextNode(content);
+ TQDomText text = doc->createTextNode(content);
current.appendChild(text);
}
}
return true;
}
- /*bool processingInstruction(const QString &target, const QString &data)
+ /*bool processingInstruction(const TQString &target, const TQString &data)
{
printf("Processing: [%s], [%s]\n", target.latin1(), data.latin1());
in->resetLastData();
@@ -498,22 +498,22 @@ namespace XMPP
void checkNeedMore()
{
- // Here we will work around QXmlSimpleReader strangeness and self-closing tags.
+ // Here we will work around TQXmlSimpleReader strangeness and self-closing tags.
// The problem is that endElement() is called when the '/' is read, not when
// the final '>' is read. This is a potential problem when obtaining unprocessed
// bytes from StreamInput after this event, as the '>' character will end up
// in the unprocessed chunk. To work around this, we need to advance StreamInput's
// internal byte processing, but not the xml character data. This way, the '>'
// will get processed and will no longer be in the unprocessed return, but
- // QXmlSimpleReader can still read it. To do this, we call StreamInput::readNext
+ // TQXmlSimpleReader can still read it. To do this, we call StreamInput::readNext
// with 'peek' mode.
- QChar c = in->readNext(true); // peek
- if(c == QXmlInputSource::EndOfData) {
+ TQChar c = in->readNext(true); // peek
+ if(c == TQXmlInputSource::EndOfData) {
needMore = true;
}
else {
// We'll assume the next char is a '>'. If it isn't, then
- // QXmlSimpleReader will deal with that problem on the next
+ // TQXmlSimpleReader will deal with that problem on the next
// parse. We don't need to take any action here.
needMore = false;
@@ -540,11 +540,11 @@ namespace XMPP
}
StreamInput *in;
- QDomDocument *doc;
+ TQDomDocument *doc;
int depth;
- QStringList nsnames, nsvalues;
- QDomElement elem, current;
- QPtrList<Parser::Event> eventList;
+ TQStringList nsnames, nsvalues;
+ TQDomElement elem, current;
+ TQPtrList<Parser::Event> eventList;
bool needMore;
};
}
@@ -557,11 +557,11 @@ class Parser::Event::Private
{
public:
int type;
- QString ns, ln, qn;
- QXmlAttributes a;
- QDomElement e;
- QString str;
- QStringList nsnames, nsvalues;
+ TQString ns, ln, qn;
+ TQXmlAttributes a;
+ TQDomElement e;
+ TQString str;
+ TQStringList nsnames, nsvalues;
};
Parser::Event::Event()
@@ -601,49 +601,49 @@ int Parser::Event::type() const
return d->type;
}
-QString Parser::Event::nsprefix(const QString &s) const
+TQString Parser::Event::nsprefix(const TQString &s) const
{
- QStringList::ConstIterator it = d->nsnames.begin();
- QStringList::ConstIterator it2 = d->nsvalues.begin();
+ TQStringList::ConstIterator it = d->nsnames.begin();
+ TQStringList::ConstIterator it2 = d->nsvalues.begin();
for(; it != d->nsnames.end(); ++it) {
if((*it) == s)
return (*it2);
++it2;
}
- return QString::null;
+ return TQString::null;
}
-QString Parser::Event::namespaceURI() const
+TQString Parser::Event::namespaceURI() const
{
return d->ns;
}
-QString Parser::Event::localName() const
+TQString Parser::Event::localName() const
{
return d->ln;
}
-QString Parser::Event::qName() const
+TQString Parser::Event::qName() const
{
return d->qn;
}
-QXmlAttributes Parser::Event::atts() const
+TQXmlAttributes Parser::Event::atts() const
{
return d->a;
}
-QString Parser::Event::actualString() const
+TQString Parser::Event::actualString() const
{
return d->str;
}
-QDomElement Parser::Event::element() const
+TQDomElement Parser::Event::element() const
{
return d->e;
}
-void Parser::Event::setDocumentOpen(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts, const QStringList &nsnames, const QStringList &nsvalues)
+void Parser::Event::setDocumentOpen(const TQString &namespaceURI, const TQString &localName, const TQString &qName, const TQXmlAttributes &atts, const TQStringList &nsnames, const TQStringList &nsvalues)
{
if(!d)
d = new Private;
@@ -656,7 +656,7 @@ void Parser::Event::setDocumentOpen(const QString &namespaceURI, const QString &
d->nsvalues = nsvalues;
}
-void Parser::Event::setDocumentClose(const QString &namespaceURI, const QString &localName, const QString &qName)
+void Parser::Event::setDocumentClose(const TQString &namespaceURI, const TQString &localName, const TQString &qName)
{
if(!d)
d = new Private;
@@ -666,7 +666,7 @@ void Parser::Event::setDocumentClose(const QString &namespaceURI, const QString
d->qn = qName;
}
-void Parser::Event::setElement(const QDomElement &elem)
+void Parser::Event::setElement(const TQDomElement &elem)
{
if(!d)
d = new Private;
@@ -681,7 +681,7 @@ void Parser::Event::setError()
d->type = Error;
}
-void Parser::Event::setActualString(const QString &str)
+void Parser::Event::setActualString(const TQString &str)
{
d->str = str;
}
@@ -727,10 +727,10 @@ public:
}
}
- QDomDocument *doc;
+ TQDomDocument *doc;
StreamInput *in;
ParserHandler *handler;
- QXmlSimpleReader *reader;
+ TQXmlSimpleReader *reader;
};
Parser::Parser()
@@ -740,7 +740,7 @@ Parser::Parser()
// check for evil bug in Qt <= 3.2.1
if(!qt_bug_check) {
qt_bug_check = true;
- QDomElement e = d->doc->createElementNS("someuri", "somename");
+ TQDomElement e = d->doc->createElementNS("someuri", "somename");
if(e.hasAttributeNS("someuri", "somename"))
qt_bug_have = true;
else
@@ -758,7 +758,7 @@ void Parser::reset()
d->reset();
}
-void Parser::appendData(const QByteArray &a)
+void Parser::appendData(const TQByteArray &a)
{
d->in->appendData(a);
@@ -787,12 +787,12 @@ Parser::Event Parser::readNext()
return e;
}
-QByteArray Parser::unprocessed() const
+TQByteArray Parser::unprocessed() const
{
return d->in->unprocessed();
}
-QString Parser::encoding() const
+TQString Parser::encoding() const
{
return d->in->encoding();
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h
index b43be57e..b702ad55 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/parser.h
@@ -21,8 +21,8 @@
#ifndef PARSER_H
#define PARSER_H
-#include<qdom.h>
-#include<qxml.h>
+#include<tqdom.h>
+#include<tqxml.h>
namespace XMPP
{
@@ -45,26 +45,26 @@ namespace XMPP
int type() const;
// for document open
- QString nsprefix(const QString &s=QString::null) const;
+ TQString nsprefix(const TQString &s=TQString::null) const;
// for document open / close
- QString namespaceURI() const;
- QString localName() const;
- QString qName() const;
- QXmlAttributes atts() const;
+ TQString namespaceURI() const;
+ TQString localName() const;
+ TQString qName() const;
+ TQXmlAttributes atts() const;
// for element
- QDomElement element() const;
+ TQDomElement element() const;
// for any
- QString actualString() const;
+ TQString actualString() const;
// setup
- void setDocumentOpen(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts, const QStringList &nsnames, const QStringList &nsvalues);
- void setDocumentClose(const QString &namespaceURI, const QString &localName, const QString &qName);
- void setElement(const QDomElement &elem);
+ void setDocumentOpen(const TQString &namespaceURI, const TQString &localName, const TQString &qName, const TQXmlAttributes &atts, const TQStringList &nsnames, const TQStringList &nsvalues);
+ void setDocumentClose(const TQString &namespaceURI, const TQString &localName, const TQString &qName);
+ void setElement(const TQDomElement &elem);
void setError();
- void setActualString(const QString &);
+ void setActualString(const TQString &);
private:
class Private;
@@ -72,10 +72,10 @@ namespace XMPP
};
void reset();
- void appendData(const QByteArray &a);
+ void appendData(const TQByteArray &a);
Event readNext();
- QByteArray unprocessed() const;
- QString encoding() const;
+ TQByteArray unprocessed() const;
+ TQString encoding() const;
private:
class Private;
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp
index fd1e6cdc..76d3c781 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.cpp
@@ -40,13 +40,13 @@ using namespace XMPP;
// This function prints out an array of bytes as latin characters, converting
// non-printable bytes into hex values as necessary. Useful for displaying
// QByteArrays for debugging purposes.
-static QString printArray(const QByteArray &a)
+static TQString printArray(const TQByteArray &a)
{
- QString s;
+ TQString s;
for(uint n = 0; n < a.size(); ++n) {
unsigned char c = (unsigned char)a[(int)n];
if(c < 32 || c >= 127) {
- QString str;
+ TQString str;
str.sprintf("[%02x]", c);
s += str;
}
@@ -59,13 +59,13 @@ static QString printArray(const QByteArray &a)
// firstChildElement
//
// Get an element's first child element
-static QDomElement firstChildElement(const QDomElement &e)
+static TQDomElement firstChildElement(const TQDomElement &e)
{
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
if(n.isElement())
return n.toElement();
}
- return QDomElement();
+ return TQDomElement();
}
//----------------------------------------------------------------------------
@@ -159,30 +159,30 @@ void BasicProtocol::reset()
XmlProtocol::reset();
init();
- to = QString();
- from = QString();
- id = QString();
- lang = QString();
+ to = TQString();
+ from = TQString();
+ id = TQString();
+ lang = TQString();
version = Version(1,0);
- errText = QString();
- errAppSpec = QDomElement();
- otherHost = QString();
+ errText = TQString();
+ errAppSpec = TQDomElement();
+ otherHost = TQString();
spare.resize(0);
- sasl_mech = QString();
+ sasl_mech = TQString();
sasl_mechlist.clear();
sasl_step.resize(0);
- stanzaToRecv = QDomElement();
+ stanzaToRecv = TQDomElement();
sendList.clear();
}
-void BasicProtocol::sendStanza(const QDomElement &e)
+void BasicProtocol::sendStanza(const TQDomElement &e)
{
SendItem i;
i.stanzaToSend = e;
sendList += i;
}
-void BasicProtocol::sendDirect(const QString &s)
+void BasicProtocol::sendDirect(const TQString &s)
{
SendItem i;
i.stringToSend = s;
@@ -196,10 +196,10 @@ void BasicProtocol::sendWhitespace()
sendList += i;
}
-QDomElement BasicProtocol::recvStanza()
+TQDomElement BasicProtocol::recvStanza()
{
- QDomElement e = stanzaToRecv;
- stanzaToRecv = QDomElement();
+ TQDomElement e = stanzaToRecv;
+ stanzaToRecv = TQDomElement();
return e;
}
@@ -208,7 +208,7 @@ void BasicProtocol::shutdown()
doShutdown = true;
}
-void BasicProtocol::shutdownWithError(int cond, const QString &str)
+void BasicProtocol::shutdownWithError(int cond, const TQString &str)
{
otherHost = str;
delayErrorAndClose(cond);
@@ -224,28 +224,28 @@ void BasicProtocol::setReady(bool b)
ready = b;
}
-QString BasicProtocol::saslMech() const
+TQString BasicProtocol::saslMech() const
{
return sasl_mech;
}
-QByteArray BasicProtocol::saslStep() const
+TQByteArray BasicProtocol::saslStep() const
{
return sasl_step;
}
-void BasicProtocol::setSASLMechList(const QStringList &list)
+void BasicProtocol::setSASLMechList(const TQStringList &list)
{
sasl_mechlist = list;
}
-void BasicProtocol::setSASLFirst(const QString &mech, const QByteArray &step)
+void BasicProtocol::setSASLFirst(const TQString &mech, const TQByteArray &step)
{
sasl_mech = mech;
sasl_step = step;
}
-void BasicProtocol::setSASLNext(const QByteArray &step)
+void BasicProtocol::setSASLNext(const TQByteArray &step)
{
sasl_step = step;
}
@@ -255,7 +255,7 @@ void BasicProtocol::setSASLAuthed()
sasl_authed = true;
}
-int BasicProtocol::stringToSASLCond(const QString &s)
+int BasicProtocol::stringToSASLCond(const TQString &s)
{
for(int n = 0; saslCondTable[n].str; ++n) {
if(s == saslCondTable[n].str)
@@ -264,7 +264,7 @@ int BasicProtocol::stringToSASLCond(const QString &s)
return -1;
}
-int BasicProtocol::stringToStreamCond(const QString &s)
+int BasicProtocol::stringToStreamCond(const TQString &s)
{
for(int n = 0; streamCondTable[n].str; ++n) {
if(s == streamCondTable[n].str)
@@ -273,30 +273,30 @@ int BasicProtocol::stringToStreamCond(const QString &s)
return -1;
}
-QString BasicProtocol::saslCondToString(int x)
+TQString BasicProtocol::saslCondToString(int x)
{
for(int n = 0; saslCondTable[n].str; ++n) {
if(x == saslCondTable[n].cond)
return saslCondTable[n].str;
}
- return QString();
+ return TQString();
}
-QString BasicProtocol::streamCondToString(int x)
+TQString BasicProtocol::streamCondToString(int x)
{
for(int n = 0; streamCondTable[n].str; ++n) {
if(x == streamCondTable[n].cond)
return streamCondTable[n].str;
}
- return QString();
+ return TQString();
}
-void BasicProtocol::extractStreamError(const QDomElement &e)
+void BasicProtocol::extractStreamError(const TQDomElement &e)
{
- QString text;
- QDomElement appSpec;
+ TQString text;
+ TQDomElement appSpec;
- QDomElement t = firstChildElement(e);
+ TQDomElement t = firstChildElement(e);
if(t.isNull() || t.namespaceURI() != NS_STREAMS) {
// probably old-style error
errCond = -1;
@@ -314,9 +314,9 @@ void BasicProtocol::extractStreamError(const QDomElement &e)
text = t.text();
// find first non-standard namespaced element
- QDomNodeList nl = e.childNodes();
+ TQDomNodeList nl = e.childNodes();
for(uint n = 0; n < nl.count(); ++n) {
- QDomNode i = nl.item(n);
+ TQDomNode i = nl.item(n);
if(i.isElement() && i.namespaceURI() != NS_STREAMS) {
appSpec = i.toElement();
break;
@@ -328,20 +328,20 @@ void BasicProtocol::extractStreamError(const QDomElement &e)
}
}
-void BasicProtocol::send(const QDomElement &e, bool clip)
+void BasicProtocol::send(const TQDomElement &e, bool clip)
{
writeElement(e, TypeElement, false, clip);
}
-void BasicProtocol::sendStreamError(int cond, const QString &text, const QDomElement &appSpec)
+void BasicProtocol::sendStreamError(int cond, const TQString &text, const TQDomElement &appSpec)
{
- QDomElement se = doc.createElementNS(NS_ETHERX, "stream:error");
- QDomElement err = doc.createElementNS(NS_STREAMS, streamCondToString(cond));
+ TQDomElement se = doc.createElementNS(NS_ETHERX, "stream:error");
+ TQDomElement err = doc.createElementNS(NS_STREAMS, streamCondToString(cond));
if(!otherHost.isEmpty())
err.appendChild(doc.createTextNode(otherHost));
se.appendChild(err);
if(!text.isEmpty()) {
- QDomElement te = doc.createElementNS(NS_STREAMS, "text");
+ TQDomElement te = doc.createElementNS(NS_STREAMS, "text");
te.setAttributeNS(NS_XML, "xml:lang", "en");
te.appendChild(doc.createTextNode(text));
se.appendChild(te);
@@ -351,15 +351,15 @@ void BasicProtocol::sendStreamError(int cond, const QString &text, const QDomEle
writeElement(se, 100, false);
}
-void BasicProtocol::sendStreamError(const QString &text)
+void BasicProtocol::sendStreamError(const TQString &text)
{
- QDomElement se = doc.createElementNS(NS_ETHERX, "stream:error");
+ TQDomElement se = doc.createElementNS(NS_ETHERX, "stream:error");
se.appendChild(doc.createTextNode(text));
writeElement(se, 100, false);
}
-bool BasicProtocol::errorAndClose(int cond, const QString &text, const QDomElement &appSpec)
+bool BasicProtocol::errorAndClose(int cond, const TQString &text, const TQDomElement &appSpec)
{
closeError = true;
errCond = cond;
@@ -376,7 +376,7 @@ bool BasicProtocol::error(int code)
return true;
}
-void BasicProtocol::delayErrorAndClose(int cond, const QString &text, const QDomElement &appSpec)
+void BasicProtocol::delayErrorAndClose(int cond, const TQString &text, const TQDomElement &appSpec)
{
errorCode = ErrStream;
errCond = cond;
@@ -391,21 +391,21 @@ void BasicProtocol::delayError(int code)
delayedError = true;
}
-QDomElement BasicProtocol::docElement()
+TQDomElement BasicProtocol::docElement()
{
// create the root element
- QDomElement e = doc.createElementNS(NS_ETHERX, "stream:stream");
+ TQDomElement e = doc.createElementNS(NS_ETHERX, "stream:stream");
- QString defns = defaultNamespace();
- QStringList list = extraNamespaces();
+ TQString defns = defaultNamespace();
+ TQStringList list = extraNamespaces();
// HACK: using attributes seems to be the only way to get additional namespaces in here
if(!defns.isEmpty())
e.setAttribute("xmlns", defns);
- for(QStringList::ConstIterator it = list.begin(); it != list.end();) {
- QString prefix = *(it++);
- QString uri = *(it++);
- e.setAttribute(QString("xmlns:") + prefix, uri);
+ for(TQStringList::ConstIterator it = list.begin(); it != list.end();) {
+ TQString prefix = *(it++);
+ TQString uri = *(it++);
+ e.setAttribute(TQString("xmlns:") + prefix, uri);
}
// additional attributes
@@ -418,7 +418,7 @@ QDomElement BasicProtocol::docElement()
if(!lang.isEmpty())
e.setAttributeNS(NS_XML, "xml:lang", lang);
if(version.major > 0 || version.minor > 0)
- e.setAttribute("version", QString::number(version.major) + '.' + QString::number(version.minor));
+ e.setAttribute("version", TQString::number(version.major) + '.' + TQString::number(version.minor));
return e;
}
@@ -433,12 +433,12 @@ void BasicProtocol::handleDocOpen(const Parser::Event &pe)
}
if(pe.namespaceURI() == NS_ETHERX && pe.localName() == "stream") {
- QXmlAttributes atts = pe.atts();
+ TQXmlAttributes atts = pe.atts();
// grab the version
int major = 0;
int minor = 0;
- QString verstr = atts.value("version");
+ TQString verstr = atts.value("version");
if(!verstr.isEmpty()) {
int n = verstr.find('.');
if(n != -1) {
@@ -454,7 +454,7 @@ void BasicProtocol::handleDocOpen(const Parser::Event &pe)
if(isIncoming()) {
to = atts.value("to");
- QString peerLang = atts.value(NS_XML, "lang");
+ TQString peerLang = atts.value(NS_XML, "lang");
if(!peerLang.isEmpty())
lang = peerLang;
}
@@ -495,7 +495,7 @@ bool BasicProtocol::handleCloseFinished()
return true;
}
-bool BasicProtocol::doStep(const QDomElement &e)
+bool BasicProtocol::doStep(const TQDomElement &e)
{
// handle pending error
if(delayedError) {
@@ -530,7 +530,7 @@ bool BasicProtocol::doStep(const QDomElement &e)
if(!sendList.isEmpty()) {
SendItem i;
{
- QValueList<SendItem>::Iterator it = sendList.begin();
+ TQValueList<SendItem>::Iterator it = sendList.begin();
i = (*it);
sendList.remove(it);
}
@@ -571,16 +571,16 @@ void BasicProtocol::itemWritten(int id, int)
}
}
-QString BasicProtocol::defaultNamespace()
+TQString BasicProtocol::defaultNamespace()
{
// default none
- return QString();
+ return TQString();
}
-QStringList BasicProtocol::extraNamespaces()
+TQStringList BasicProtocol::extraNamespaces()
{
// default none
- return QStringList();
+ return TQStringList();
}
void BasicProtocol::handleStreamOpen(const Parser::Event &)
@@ -612,7 +612,7 @@ void CoreProtocol::init()
// settings
jid = Jid();
- password = QString();
+ password = TQString();
oldOnly = false;
allowPlain = false;
doTLS = true;
@@ -620,8 +620,8 @@ void CoreProtocol::init()
doBinding = true;
// input
- user = QString();
- host = QString();
+ user = TQString();
+ host = TQString();
// status
old = false;
@@ -649,14 +649,14 @@ void CoreProtocol::startClientOut(const Jid &_jid, bool _oldOnly, bool tlsActive
startConnect();
}
-void CoreProtocol::startServerOut(const QString &_to)
+void CoreProtocol::startServerOut(const TQString &_to)
{
server = true;
to = _to;
startConnect();
}
-void CoreProtocol::startDialbackOut(const QString &_to, const QString &_from)
+void CoreProtocol::startDialbackOut(const TQString &_to, const TQString &_from)
{
server = true;
dialback = true;
@@ -665,7 +665,7 @@ void CoreProtocol::startDialbackOut(const QString &_to, const QString &_from)
startConnect();
}
-void CoreProtocol::startDialbackVerifyOut(const QString &_to, const QString &_from, const QString &id, const QString &key)
+void CoreProtocol::startDialbackVerifyOut(const TQString &_to, const TQString &_from, const TQString &id, const TQString &key)
{
server = true;
dialback = true;
@@ -677,20 +677,20 @@ void CoreProtocol::startDialbackVerifyOut(const QString &_to, const QString &_fr
startConnect();
}
-void CoreProtocol::startClientIn(const QString &_id)
+void CoreProtocol::startClientIn(const TQString &_id)
{
id = _id;
startAccept();
}
-void CoreProtocol::startServerIn(const QString &_id)
+void CoreProtocol::startServerIn(const TQString &_id)
{
server = true;
id = _id;
startAccept();
}
-void CoreProtocol::setLang(const QString &s)
+void CoreProtocol::setLang(const TQString &s)
{
lang = s;
}
@@ -710,17 +710,17 @@ void CoreProtocol::setAllowPlain(bool b)
allowPlain = b;
}
-void CoreProtocol::setPassword(const QString &s)
+void CoreProtocol::setPassword(const TQString &s)
{
password = s;
}
-void CoreProtocol::setFrom(const QString &s)
+void CoreProtocol::setFrom(const TQString &s)
{
from = s;
}
-void CoreProtocol::setDialbackKey(const QString &s)
+void CoreProtocol::setDialbackKey(const TQString &s)
{
dialback_key = s;
}
@@ -734,18 +734,18 @@ bool CoreProtocol::loginComplete()
return true;
}
-int CoreProtocol::getOldErrorCode(const QDomElement &e)
+int CoreProtocol::getOldErrorCode(const TQDomElement &e)
{
- QDomElement err = e.elementsByTagNameNS(NS_CLIENT, "error").item(0).toElement();
+ TQDomElement err = e.elementsByTagNameNS(NS_CLIENT, "error").item(0).toElement();
if(err.isNull() || !err.hasAttribute("code"))
return -1;
return err.attribute("code").toInt();
}
-/*QString CoreProtocol::xmlToString(const QDomElement &e, bool clip)
+/*TQString CoreProtocol::xmlToString(const TQDomElement &e, bool clip)
{
// determine an appropriate 'fakeNS' to use
- QString ns;
+ TQString ns;
if(e.prefix() == "stream")
ns = NS_ETHERX;
else if(e.prefix() == "db")
@@ -781,21 +781,21 @@ bool CoreProtocol::stepRequiresElement() const
return false;
}
-void CoreProtocol::stringSend(const QString &s)
+void CoreProtocol::stringSend(const TQString &s)
{
#ifdef XMPP_TEST
TD::outgoingTag(s);
#endif
}
-void CoreProtocol::stringRecv(const QString &s)
+void CoreProtocol::stringRecv(const TQString &s)
{
#ifdef XMPP_TEST
TD::incomingTag(s);
#endif
}
-QString CoreProtocol::defaultNamespace()
+TQString CoreProtocol::defaultNamespace()
{
if(server)
return NS_SERVER;
@@ -803,9 +803,9 @@ QString CoreProtocol::defaultNamespace()
return NS_CLIENT;
}
-QStringList CoreProtocol::extraNamespaces()
+TQStringList CoreProtocol::extraNamespaces()
{
- QStringList list;
+ TQStringList list;
if(dialback) {
list += "db";
list += NS_DIALBACK;
@@ -816,8 +816,8 @@ QStringList CoreProtocol::extraNamespaces()
void CoreProtocol::handleStreamOpen(const Parser::Event &pe)
{
if(isIncoming()) {
- QString ns = pe.nsprefix();
- QString db;
+ TQString ns = pe.nsprefix();
+ TQString db;
if(server) {
db = pe.nsprefix("db");
if(!db.isEmpty())
@@ -846,21 +846,21 @@ void CoreProtocol::handleStreamOpen(const Parser::Event &pe)
}
}
-void CoreProtocol::elementSend(const QDomElement &e)
+void CoreProtocol::elementSend(const TQDomElement &e)
{
#ifdef XMPP_TEST
TD::outgoingXml(e);
#endif
}
-void CoreProtocol::elementRecv(const QDomElement &e)
+void CoreProtocol::elementRecv(const TQDomElement &e)
{
#ifdef XMPP_TEST
TD::incomingXml(e);
#endif
}
-bool CoreProtocol::doStep2(const QDomElement &e)
+bool CoreProtocol::doStep2(const TQDomElement &e)
{
if(dialback)
return dialbackStep(e);
@@ -868,9 +868,9 @@ bool CoreProtocol::doStep2(const QDomElement &e)
return normalStep(e);
}
-bool CoreProtocol::isValidStanza(const QDomElement &e) const
+bool CoreProtocol::isValidStanza(const TQDomElement &e) const
{
- QString s = e.tagName();
+ TQString s = e.tagName();
if(e.namespaceURI() == (server ? NS_SERVER : NS_CLIENT) && (s == "message" || s == "presence" || s == "iq"))
return true;
else
@@ -879,7 +879,7 @@ bool CoreProtocol::isValidStanza(const QDomElement &e) const
bool CoreProtocol::grabPendingItem(const Jid &to, const Jid &from, int type, DBItem *item)
{
- for(QValueList<DBItem>::Iterator it = dbpending.begin(); it != dbpending.end(); ++it) {
+ for(TQValueList<DBItem>::Iterator it = dbpending.begin(); it != dbpending.end(); ++it) {
const DBItem &i = *it;
if(i.type == type && i.to.compare(to) && i.from.compare(from)) {
const DBItem &i = (*it);
@@ -891,7 +891,7 @@ bool CoreProtocol::grabPendingItem(const Jid &to, const Jid &from, int type, DBI
return false;
}
-bool CoreProtocol::dialbackStep(const QDomElement &e)
+bool CoreProtocol::dialbackStep(const TQDomElement &e)
{
if(step == Start) {
setReady(true);
@@ -904,12 +904,12 @@ bool CoreProtocol::dialbackStep(const QDomElement &e)
// process a request
DBItem i;
{
- QValueList<DBItem>::Iterator it = dbrequests.begin();
+ TQValueList<DBItem>::Iterator it = dbrequests.begin();
i = (*it);
dbrequests.remove(it);
}
- QDomElement r;
+ TQDomElement r;
if(i.type == DBItem::ResultRequest) {
r = doc.createElementNS(NS_DIALBACK, "db:result");
r.setAttribute("to", i.to.full());
@@ -959,7 +959,7 @@ bool CoreProtocol::dialbackStep(const QDomElement &e)
to.set(e.attribute("to"), "");
from.set(e.attribute("from"), "");
if(isIncoming()) {
- QString key = e.text();
+ TQString key = e.text();
// TODO: report event
}
else {
@@ -982,9 +982,9 @@ bool CoreProtocol::dialbackStep(const QDomElement &e)
Jid to, from;
to.set(e.attribute("to"), "");
from.set(e.attribute("from"), "");
- QString id = e.attribute("id");
+ TQString id = e.attribute("id");
if(isIncoming()) {
- QString key = e.text();
+ TQString key = e.text();
// TODO: report event
}
else {
@@ -1019,7 +1019,7 @@ bool CoreProtocol::dialbackStep(const QDomElement &e)
return false;
}
-bool CoreProtocol::normalStep(const QDomElement &e)
+bool CoreProtocol::normalStep(const TQDomElement &e)
{
if(step == Start) {
if(isIncoming()) {
@@ -1043,7 +1043,7 @@ bool CoreProtocol::normalStep(const QDomElement &e)
else if(step == HandleFeatures) {
// deal with TLS?
if(doTLS && !tls_started && !sasl_authed && features.tls_supported) {
- QDomElement e = doc.createElementNS(NS_TLS, "starttls");
+ TQDomElement e = doc.createElementNS(NS_TLS, "starttls");
send(e, true);
event = ESend;
@@ -1084,15 +1084,15 @@ bool CoreProtocol::normalStep(const QDomElement &e)
return true;
}
- QDomElement e = doc.createElement("iq");
+ TQDomElement e = doc.createElement("iq");
e.setAttribute("type", "set");
e.setAttribute("id", "bind_1");
- QDomElement b = doc.createElementNS(NS_BIND, "bind");
+ TQDomElement b = doc.createElementNS(NS_BIND, "bind");
// request specific resource?
- QString resource = jid.resource();
+ TQString resource = jid.resource();
if(!resource.isEmpty()) {
- QDomElement r = doc.createElement("resource");
+ TQDomElement r = doc.createElement("resource");
r.appendChild(doc.createTextNode(jid.resource()));
b.appendChild(r);
}
@@ -1105,11 +1105,11 @@ bool CoreProtocol::normalStep(const QDomElement &e)
return true;
}
else if(step == GetSASLFirst) {
- QDomElement e = doc.createElementNS(NS_SASL, "auth");
+ TQDomElement e = doc.createElementNS(NS_SASL, "auth");
e.setAttribute("mechanism", sasl_mech);
if(!sasl_step.isEmpty()) {
#ifdef XMPP_TEST
- TD::msg(QString("SASL OUT: [%1]").arg(printArray(sasl_step)));
+ TD::msg(TQString("SASL OUT: [%1]").arg(printArray(sasl_step)));
#endif
e.appendChild(doc.createTextNode(Base64::arrayToString(sasl_step)));
}
@@ -1122,15 +1122,15 @@ bool CoreProtocol::normalStep(const QDomElement &e)
else if(step == GetSASLNext) {
if(isIncoming()) {
if(sasl_authed) {
- QDomElement e = doc.createElementNS(NS_SASL, "success");
+ TQDomElement e = doc.createElementNS(NS_SASL, "success");
writeElement(e, TypeElement, false, true);
event = ESend;
step = IncHandleSASLSuccess;
return true;
}
else {
- QByteArray stepData = sasl_step;
- QDomElement e = doc.createElementNS(NS_SASL, "challenge");
+ TQByteArray stepData = sasl_step;
+ TQDomElement e = doc.createElementNS(NS_SASL, "challenge");
if(!stepData.isEmpty())
e.appendChild(doc.createTextNode(Base64::arrayToString(stepData)));
@@ -1141,11 +1141,11 @@ bool CoreProtocol::normalStep(const QDomElement &e)
}
}
else {
- QByteArray stepData = sasl_step;
+ TQByteArray stepData = sasl_step;
#ifdef XMPP_TEST
- TD::msg(QString("SASL OUT: [%1]").arg(printArray(sasl_step)));
+ TD::msg(TQString("SASL OUT: [%1]").arg(printArray(sasl_step)));
#endif
- QDomElement e = doc.createElementNS(NS_SASL, "response");
+ TQDomElement e = doc.createElementNS(NS_SASL, "response");
if(!stepData.isEmpty())
e.appendChild(doc.createTextNode(Base64::arrayToString(stepData)));
@@ -1162,12 +1162,12 @@ bool CoreProtocol::normalStep(const QDomElement &e)
return false;
}
else if(step == HandleAuthGet) {
- QDomElement e = doc.createElement("iq");
+ TQDomElement e = doc.createElement("iq");
e.setAttribute("to", to);
e.setAttribute("type", "get");
e.setAttribute("id", "auth_1");
- QDomElement q = doc.createElementNS("jabber:iq:auth", "query");
- QDomElement u = doc.createElement("username");
+ TQDomElement q = doc.createElementNS("jabber:iq:auth", "query");
+ TQDomElement u = doc.createElement("username");
u.appendChild(doc.createTextNode(jid.node()));
q.appendChild(u);
e.appendChild(q);
@@ -1178,22 +1178,22 @@ bool CoreProtocol::normalStep(const QDomElement &e)
return true;
}
else if(step == HandleAuthSet) {
- QDomElement e = doc.createElement("iq");
+ TQDomElement e = doc.createElement("iq");
e.setAttribute("to", to);
e.setAttribute("type", "set");
e.setAttribute("id", "auth_2");
- QDomElement q = doc.createElementNS("jabber:iq:auth", "query");
- QDomElement u = doc.createElement("username");
+ TQDomElement q = doc.createElementNS("jabber:iq:auth", "query");
+ TQDomElement u = doc.createElement("username");
u.appendChild(doc.createTextNode(jid.node()));
q.appendChild(u);
- QDomElement p;
+ TQDomElement p;
if(digest) {
// need SHA1 here
if(!QCA::isSupported(QCA::CAP_SHA1))
QCA::insertProvider(createProviderHash());
p = doc.createElement("digest");
- QCString cs = id.utf8() + password.utf8();
+ TQCString cs = id.utf8() + password.utf8();
p.appendChild(doc.createTextNode(QCA::SHA1::hashToString(cs)));
}
else {
@@ -1201,7 +1201,7 @@ bool CoreProtocol::normalStep(const QDomElement &e)
p.appendChild(doc.createTextNode(password));
}
q.appendChild(p);
- QDomElement r = doc.createElement("resource");
+ TQDomElement r = doc.createElement("resource");
r.appendChild(doc.createTextNode(jid.resource()));
q.appendChild(r);
e.appendChild(q);
@@ -1213,22 +1213,22 @@ bool CoreProtocol::normalStep(const QDomElement &e)
}
// server
else if(step == SendFeatures) {
- QDomElement f = doc.createElementNS(NS_ETHERX, "stream:features");
+ TQDomElement f = doc.createElementNS(NS_ETHERX, "stream:features");
if(!tls_started && !sasl_authed) { // don't offer tls if we are already sasl'd
- QDomElement tls = doc.createElementNS(NS_TLS, "starttls");
+ TQDomElement tls = doc.createElementNS(NS_TLS, "starttls");
f.appendChild(tls);
}
if(sasl_authed) {
if(!server) {
- QDomElement bind = doc.createElementNS(NS_BIND, "bind");
+ TQDomElement bind = doc.createElementNS(NS_BIND, "bind");
f.appendChild(bind);
}
}
else {
- QDomElement mechs = doc.createElementNS(NS_SASL, "mechanisms");
- for(QStringList::ConstIterator it = sasl_mechlist.begin(); it != sasl_mechlist.end(); ++it) {
- QDomElement m = doc.createElement("mechanism");
+ TQDomElement mechs = doc.createElementNS(NS_SASL, "mechanisms");
+ for(TQStringList::ConstIterator it = sasl_mechlist.begin(); it != sasl_mechlist.end(); ++it) {
+ TQDomElement m = doc.createElement("mechanism");
m.appendChild(doc.createTextNode(*it));
mechs.appendChild(m);
}
@@ -1261,25 +1261,25 @@ bool CoreProtocol::normalStep(const QDomElement &e)
if(e.namespaceURI() == NS_ETHERX && e.tagName() == "features") {
// extract features
StreamFeatures f;
- QDomElement s = e.elementsByTagNameNS(NS_TLS, "starttls").item(0).toElement();
+ TQDomElement s = e.elementsByTagNameNS(NS_TLS, "starttls").item(0).toElement();
if(!s.isNull()) {
f.tls_supported = true;
f.tls_required = s.elementsByTagNameNS(NS_TLS, "required").count() > 0;
}
- QDomElement m = e.elementsByTagNameNS(NS_SASL, "mechanisms").item(0).toElement();
+ TQDomElement m = e.elementsByTagNameNS(NS_SASL, "mechanisms").item(0).toElement();
if(!m.isNull()) {
f.sasl_supported = true;
- QDomNodeList l = m.elementsByTagNameNS(NS_SASL, "mechanism");
+ TQDomNodeList l = m.elementsByTagNameNS(NS_SASL, "mechanism");
for(uint n = 0; n < l.count(); ++n)
f.sasl_mechs += l.item(n).toElement().text();
}
- QDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement();
+ TQDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement();
if(!b.isNull())
f.bind_supported = true;
if(f.tls_supported) {
#ifdef XMPP_TEST
- QString s = "STARTTLS is available";
+ TQString s = "STARTTLS is available";
if(f.tls_required)
s += " (required)";
TD::msg(s);
@@ -1287,9 +1287,9 @@ bool CoreProtocol::normalStep(const QDomElement &e)
}
if(f.sasl_supported) {
#ifdef XMPP_TEST
- QString s = "SASL mechs:";
- for(QStringList::ConstIterator it = f.sasl_mechs.begin(); it != f.sasl_mechs.end(); ++it)
- s += QString(" [%1]").arg((*it));
+ TQString s = "SASL mechs:";
+ for(TQStringList::ConstIterator it = f.sasl_mechs.begin(); it != f.sasl_mechs.end(); ++it)
+ s += TQString(" [%1]").arg((*it));
TD::msg(s);
#endif
}
@@ -1339,9 +1339,9 @@ bool CoreProtocol::normalStep(const QDomElement &e)
// waiting for sasl challenge/success/fail
if(e.namespaceURI() == NS_SASL) {
if(e.tagName() == "challenge") {
- QByteArray a = Base64::stringToArray(e.text());
+ TQByteArray a = Base64::stringToArray(e.text());
#ifdef XMPP_TEST
- TD::msg(QString("SASL IN: [%1]").arg(printArray(a)));
+ TD::msg(TQString("SASL IN: [%1]").arg(printArray(a)));
#endif
sasl_step = a;
need = NSASLNext;
@@ -1355,7 +1355,7 @@ bool CoreProtocol::normalStep(const QDomElement &e)
return true;
}
else if(e.tagName() == "failure") {
- QDomElement t = firstChildElement(e);
+ TQDomElement t = firstChildElement(e);
if(t.isNull() || t.namespaceURI() != NS_SASL)
errCond = -1;
else
@@ -1374,15 +1374,15 @@ bool CoreProtocol::normalStep(const QDomElement &e)
}
else if(step == GetBindResponse) {
if(e.namespaceURI() == NS_CLIENT && e.tagName() == "iq") {
- QString type(e.attribute("type"));
- QString id(e.attribute("id"));
+ TQString type(e.attribute("type"));
+ TQString id(e.attribute("id"));
if(id == "bind_1" && (type == "result" || type == "error")) {
if(type == "result") {
- QDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement();
+ TQDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement();
Jid j;
if(!b.isNull()) {
- QDomElement je = e.elementsByTagName("jid").item(0).toElement();
+ TQDomElement je = e.elementsByTagName("jid").item(0).toElement();
j = je.text();
}
if(!j.isValid()) {
@@ -1396,20 +1396,20 @@ bool CoreProtocol::normalStep(const QDomElement &e)
else {
errCond = -1;
- QDomElement err = e.elementsByTagNameNS(NS_CLIENT, "error").item(0).toElement();
+ TQDomElement err = e.elementsByTagNameNS(NS_CLIENT, "error").item(0).toElement();
if(!err.isNull()) {
// get error condition
- QDomNodeList nl = err.childNodes();
- QDomElement t;
+ TQDomNodeList nl = err.childNodes();
+ TQDomElement t;
for(uint n = 0; n < nl.count(); ++n) {
- QDomNode i = nl.item(n);
+ TQDomNode i = nl.item(n);
if(i.isElement()) {
t = i.toElement();
break;
}
}
if(!t.isNull() && t.namespaceURI() == NS_STANZAS) {
- QString cond = t.tagName();
+ TQString cond = t.tagName();
if(cond == "not-allowed")
errCond = BindNotAllowed;
else if(cond == "conflict")
@@ -1434,13 +1434,13 @@ bool CoreProtocol::normalStep(const QDomElement &e)
// waiting for an iq
if(e.namespaceURI() == NS_CLIENT && e.tagName() == "iq") {
Jid from(e.attribute("from"));
- QString type(e.attribute("type"));
- QString id(e.attribute("id"));
+ TQString type(e.attribute("type"));
+ TQString id(e.attribute("id"));
bool okfrom = (from.isEmpty() || from.compare(Jid(to)));
if(okfrom && id == "auth_1" && (type == "result" || type == "error")) {
if(type == "result") {
- QDomElement q = e.elementsByTagNameNS("jabber:iq:auth", "query").item(0).toElement();
+ TQDomElement q = e.elementsByTagNameNS("jabber:iq:auth", "query").item(0).toElement();
if(q.isNull() || q.elementsByTagName("username").item(0).isNull() || q.elementsByTagName("resource").item(0).isNull()) {
event = EError;
errorCode = ErrProtocol;
@@ -1487,8 +1487,8 @@ bool CoreProtocol::normalStep(const QDomElement &e)
// waiting for an iq
if(e.namespaceURI() == NS_CLIENT && e.tagName() == "iq") {
Jid from(e.attribute("from"));
- QString type(e.attribute("type"));
- QString id(e.attribute("id"));
+ TQString type(e.attribute("type"));
+ TQString id(e.attribute("id"));
bool okfrom = (from.isEmpty() || from.compare(Jid(to)));
if(okfrom && id == "auth_2" && (type == "result" || type == "error")) {
@@ -1517,7 +1517,7 @@ bool CoreProtocol::normalStep(const QDomElement &e)
if(e.namespaceURI() == NS_TLS && e.localName() == "starttls") {
// TODO: don't let this be done twice
- QDomElement e = doc.createElementNS(NS_TLS, "proceed");
+ TQDomElement e = doc.createElementNS(NS_TLS, "proceed");
writeElement(e, TypeElement, false, true);
event = ESend;
step = HandleTLS;
@@ -1546,16 +1546,16 @@ bool CoreProtocol::normalStep(const QDomElement &e)
}
}
if(e.namespaceURI() == NS_CLIENT && e.tagName() == "iq") {
- QDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement();
+ TQDomElement b = e.elementsByTagNameNS(NS_BIND, "bind").item(0).toElement();
if(!b.isNull()) {
- QDomElement res = b.elementsByTagName("resource").item(0).toElement();
- QString resource = res.text();
+ TQDomElement res = b.elementsByTagName("resource").item(0).toElement();
+ TQString resource = res.text();
- QDomElement r = doc.createElement("iq");
+ TQDomElement r = doc.createElement("iq");
r.setAttribute("type", "result");
r.setAttribute("id", e.attribute("id"));
- QDomElement bind = doc.createElementNS(NS_BIND, "bind");
- QDomElement jid = doc.createElement("jid");
+ TQDomElement bind = doc.createElementNS(NS_BIND, "bind");
+ TQDomElement jid = doc.createElement("jid");
Jid j = user + '@' + host + '/' + resource;
jid.appendChild(doc.createTextNode(j.full()));
bind.appendChild(jid);
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h
index 6cb82472..0c735192 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/protocol.h
@@ -21,7 +21,7 @@
#ifndef PROTOCOL_H
#define PROTOCOL_H
-#include<qpair.h>
+#include<tqpair.h>
#include"xmlprotocol.h"
#include"xmpp.h"
@@ -56,7 +56,7 @@ namespace XMPP
bool tls_supported, sasl_supported, bind_supported;
bool tls_required;
- QStringList sasl_mechs;
+ TQStringList sasl_mechs;
};
class BasicProtocol : public XmlProtocol
@@ -136,78 +136,78 @@ namespace XMPP
void reset();
// for outgoing xml
- QDomDocument doc;
+ TQDomDocument doc;
// sasl-related
- QString saslMech() const;
- QByteArray saslStep() const;
- void setSASLMechList(const QStringList &list);
- void setSASLFirst(const QString &mech, const QByteArray &step);
- void setSASLNext(const QByteArray &step);
+ TQString saslMech() const;
+ TQByteArray saslStep() const;
+ void setSASLMechList(const TQStringList &list);
+ void setSASLFirst(const TQString &mech, const TQByteArray &step);
+ void setSASLNext(const TQByteArray &step);
void setSASLAuthed();
// send / recv
- void sendStanza(const QDomElement &e);
- void sendDirect(const QString &s);
+ void sendStanza(const TQDomElement &e);
+ void sendDirect(const TQString &s);
void sendWhitespace();
- QDomElement recvStanza();
+ TQDomElement recvStanza();
// shutdown
void shutdown();
- void shutdownWithError(int cond, const QString &otherHost="");
+ void shutdownWithError(int cond, const TQString &otherHost="");
// <stream> information
- QString to, from, id, lang;
+ TQString to, from, id, lang;
Version version;
// error output
int errCond;
- QString errText;
- QDomElement errAppSpec;
- QString otherHost;
+ TQString errText;
+ TQDomElement errAppSpec;
+ TQString otherHost;
- QByteArray spare; // filled with unprocessed data on NStartTLS and NSASLLayer
+ TQByteArray spare; // filled with unprocessed data on NStartTLS and NSASLLayer
bool isReady() const;
enum { TypeElement, TypeStanza, TypeDirect, TypePing };
protected:
- static int stringToSASLCond(const QString &s);
- static int stringToStreamCond(const QString &s);
- static QString saslCondToString(int);
- static QString streamCondToString(int);
+ static int stringToSASLCond(const TQString &s);
+ static int stringToStreamCond(const TQString &s);
+ static TQString saslCondToString(int);
+ static TQString streamCondToString(int);
- void send(const QDomElement &e, bool clip=false);
- void sendStreamError(int cond, const QString &text="", const QDomElement &appSpec=QDomElement());
- void sendStreamError(const QString &text); // old-style
+ void send(const TQDomElement &e, bool clip=false);
+ void sendStreamError(int cond, const TQString &text="", const TQDomElement &appSpec=TQDomElement());
+ void sendStreamError(const TQString &text); // old-style
- bool errorAndClose(int cond, const QString &text="", const QDomElement &appSpec=QDomElement());
+ bool errorAndClose(int cond, const TQString &text="", const TQDomElement &appSpec=TQDomElement());
bool error(int code);
- void delayErrorAndClose(int cond, const QString &text="", const QDomElement &appSpec=QDomElement());
+ void delayErrorAndClose(int cond, const TQString &text="", const TQDomElement &appSpec=TQDomElement());
void delayError(int code);
// reimplemented
- QDomElement docElement();
+ TQDomElement docElement();
void handleDocOpen(const Parser::Event &pe);
bool handleError();
bool handleCloseFinished();
- bool doStep(const QDomElement &e);
+ bool doStep(const TQDomElement &e);
void itemWritten(int id, int size);
- virtual QString defaultNamespace();
- virtual QStringList extraNamespaces(); // stringlist: prefix,uri,prefix,uri, [...]
+ virtual TQString defaultNamespace();
+ virtual TQStringList extraNamespaces(); // stringlist: prefix,uri,prefix,uri, [...]
virtual void handleStreamOpen(const Parser::Event &pe);
- virtual bool doStep2(const QDomElement &e)=0;
+ virtual bool doStep2(const TQDomElement &e)=0;
void setReady(bool b);
- QString sasl_mech;
- QStringList sasl_mechlist;
- QByteArray sasl_step;
+ TQString sasl_mech;
+ TQStringList sasl_mechlist;
+ TQByteArray sasl_step;
bool sasl_authed;
- QDomElement stanzaToRecv;
+ TQDomElement stanzaToRecv;
private:
struct SASLCondEntry
@@ -226,17 +226,17 @@ namespace XMPP
struct SendItem
{
- QDomElement stanzaToSend;
- QString stringToSend;
+ TQDomElement stanzaToSend;
+ TQString stringToSend;
bool doWhitespace;
};
- QValueList<SendItem> sendList;
+ TQValueList<SendItem> sendList;
bool doShutdown, delayedError, closeError, ready;
int stanzasPending, stanzasWritten;
void init();
- void extractStreamError(const QDomElement &e);
+ void extractStreamError(const TQDomElement &e);
};
class CoreProtocol : public BasicProtocol
@@ -254,30 +254,30 @@ namespace XMPP
void reset();
void startClientOut(const Jid &jid, bool oldOnly, bool tlsActive, bool doAuth);
- void startServerOut(const QString &to);
- void startDialbackOut(const QString &to, const QString &from);
- void startDialbackVerifyOut(const QString &to, const QString &from, const QString &id, const QString &key);
- void startClientIn(const QString &id);
- void startServerIn(const QString &id);
+ void startServerOut(const TQString &to);
+ void startDialbackOut(const TQString &to, const TQString &from);
+ void startDialbackVerifyOut(const TQString &to, const TQString &from, const TQString &id, const TQString &key);
+ void startClientIn(const TQString &id);
+ void startServerIn(const TQString &id);
- void setLang(const QString &s);
+ void setLang(const TQString &s);
void setAllowTLS(bool b);
void setAllowBind(bool b);
void setAllowPlain(bool b); // old-mode
- void setPassword(const QString &s);
- void setFrom(const QString &s);
- void setDialbackKey(const QString &s);
+ void setPassword(const TQString &s);
+ void setFrom(const TQString &s);
+ void setDialbackKey(const TQString &s);
// input
- QString user, host;
+ TQString user, host;
// status
bool old;
StreamFeatures features;
- //static QString xmlToString(const QDomElement &e, bool clip=false);
+ //static TQString xmlToString(const TQDomElement &e, bool clip=false);
class DBItem
{
@@ -285,7 +285,7 @@ namespace XMPP
enum { ResultRequest, ResultGrant, VerifyRequest, VerifyGrant, Validated };
int type;
Jid to, from;
- QString key, id;
+ TQString key, id;
bool ok;
};
@@ -312,7 +312,7 @@ namespace XMPP
GetAuthSetResponse // read auth-set response
};
- QValueList<DBItem> dbrequests, dbpending, dbvalidated;
+ TQValueList<DBItem> dbrequests, dbpending, dbvalidated;
bool server, dialback, dialback_verify;
int step;
@@ -324,31 +324,31 @@ namespace XMPP
bool oldOnly;
bool allowPlain;
bool doTLS, doAuth, doBinding;
- QString password;
+ TQString password;
- QString dialback_id, dialback_key;
- QString self_from;
+ TQString dialback_id, dialback_key;
+ TQString self_from;
void init();
- static int getOldErrorCode(const QDomElement &e);
+ static int getOldErrorCode(const TQDomElement &e);
bool loginComplete();
- bool isValidStanza(const QDomElement &e) const;
+ bool isValidStanza(const TQDomElement &e) const;
bool grabPendingItem(const Jid &to, const Jid &from, int type, DBItem *item);
- bool normalStep(const QDomElement &e);
- bool dialbackStep(const QDomElement &e);
+ bool normalStep(const TQDomElement &e);
+ bool dialbackStep(const TQDomElement &e);
// reimplemented
bool stepAdvancesParser() const;
bool stepRequiresElement() const;
- void stringSend(const QString &s);
- void stringRecv(const QString &s);
- QString defaultNamespace();
- QStringList extraNamespaces();
+ void stringSend(const TQString &s);
+ void stringRecv(const TQString &s);
+ TQString defaultNamespace();
+ TQStringList extraNamespaces();
void handleStreamOpen(const Parser::Event &pe);
- bool doStep2(const QDomElement &e);
- void elementSend(const QDomElement &e);
- void elementRecv(const QDomElement &e);
+ bool doStep2(const TQDomElement &e);
+ void elementSend(const TQDomElement &e);
+ void elementRecv(const TQDomElement &e);
};
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h
index e6172434..6eda17f9 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/qcaprovider.h
@@ -21,11 +21,11 @@
#ifndef QCAPROVIDER_H
#define QCAPROVIDER_H
-#include<qglobal.h>
-#include<qstring.h>
-#include<qdatetime.h>
-#include<qobject.h>
-#include<qhostaddress.h>
+#include<tqglobal.h>
+#include<tqstring.h>
+#include<tqdatetime.h>
+#include<tqobject.h>
+#include<tqhostaddress.h>
#include"qca.h"
#define QCA_PLUGIN_VERSION 1
@@ -50,7 +50,7 @@ public:
virtual QCA_HashContext *clone()=0;
virtual void reset()=0;
virtual void update(const char *in, unsigned int len)=0;
- virtual void final(QByteArray *out)=0;
+ virtual void final(TQByteArray *out)=0;
};
class QCA_CipherContext
@@ -66,7 +66,7 @@ public:
virtual bool setup(int dir, int mode, const char *key, int keysize, const char *iv, bool pad)=0;
virtual bool update(const char *in, unsigned int len)=0;
- virtual bool final(QByteArray *out)=0;
+ virtual bool final(TQByteArray *out)=0;
};
class QCA_RSAKeyContext
@@ -82,17 +82,17 @@ public:
virtual bool createFromPEM(const char *in, unsigned int len)=0;
virtual bool createFromNative(void *in)=0;
virtual bool generate(unsigned int bits)=0;
- virtual bool toDER(QByteArray *out, bool publicOnly)=0;
- virtual bool toPEM(QByteArray *out, bool publicOnly)=0;
+ virtual bool toDER(TQByteArray *out, bool publicOnly)=0;
+ virtual bool toPEM(TQByteArray *out, bool publicOnly)=0;
- virtual bool encrypt(const QByteArray &in, QByteArray *out, bool oaep)=0;
- virtual bool decrypt(const QByteArray &in, QByteArray *out, bool oaep)=0;
+ virtual bool encrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0;
+ virtual bool decrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0;
};
struct QCA_CertProperty
{
- QString var;
- QString val;
+ TQString var;
+ TQString val;
};
class QCA_CertContext
@@ -104,17 +104,17 @@ public:
virtual bool isNull() const=0;
virtual bool createFromDER(const char *in, unsigned int len)=0;
virtual bool createFromPEM(const char *in, unsigned int len)=0;
- virtual bool toDER(QByteArray *out)=0;
- virtual bool toPEM(QByteArray *out)=0;
-
- virtual QString serialNumber() const=0;
- virtual QString subjectString() const=0;
- virtual QString issuerString() const=0;
- virtual QValueList<QCA_CertProperty> subject() const=0;
- virtual QValueList<QCA_CertProperty> issuer() const=0;
- virtual QDateTime notBefore() const=0;
- virtual QDateTime notAfter() const=0;
- virtual bool matchesAddress(const QString &realHost) const=0;
+ virtual bool toDER(TQByteArray *out)=0;
+ virtual bool toPEM(TQByteArray *out)=0;
+
+ virtual TQString serialNumber() const=0;
+ virtual TQString subjectString() const=0;
+ virtual TQString issuerString() const=0;
+ virtual TQValueList<QCA_CertProperty> subject() const=0;
+ virtual TQValueList<QCA_CertProperty> issuer() const=0;
+ virtual TQDateTime notBefore() const=0;
+ virtual TQDateTime notAfter() const=0;
+ virtual bool matchesAddress(const TQString &realHost) const=0;
};
class QCA_TLSContext
@@ -124,15 +124,15 @@ public:
virtual ~QCA_TLSContext() {}
virtual void reset()=0;
- virtual bool startClient(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
- virtual bool startServer(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
+ virtual bool startClient(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
+ virtual bool startServer(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
- virtual int handshake(const QByteArray &in, QByteArray *out)=0;
- virtual int shutdown(const QByteArray &in, QByteArray *out)=0;
- virtual bool encode(const QByteArray &plain, QByteArray *to_net, int *encoded)=0;
- virtual bool decode(const QByteArray &from_net, QByteArray *plain, QByteArray *to_net)=0;
+ virtual int handshake(const TQByteArray &in, TQByteArray *out)=0;
+ virtual int shutdown(const TQByteArray &in, TQByteArray *out)=0;
+ virtual bool encode(const TQByteArray &plain, TQByteArray *to_net, int *encoded)=0;
+ virtual bool decode(const TQByteArray &from_net, TQByteArray *plain, TQByteArray *to_net)=0;
virtual bool eof() const=0;
- virtual QByteArray unprocessed()=0;
+ virtual TQByteArray unprocessed()=0;
virtual QCA_CertContext *peerCertificate() const=0;
virtual int validityResult() const=0;
@@ -140,7 +140,7 @@ public:
struct QCA_SASLHostPort
{
- QHostAddress addr;
+ TQHostAddress addr;
Q_UINT16 port;
};
@@ -157,35 +157,35 @@ public:
// common
virtual void reset()=0;
- virtual void setCoreProps(const QString &service, const QString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0;
- virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const QString &_ext_authid, int _ext_ssf)=0;
+ virtual void setCoreProps(const TQString &service, const TQString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0;
+ virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const TQString &_ext_authid, int _ext_ssf)=0;
virtual int security() const=0;
virtual int errorCond() const=0;
// init / first step
- virtual bool clientStart(const QStringList &mechlist)=0;
+ virtual bool clientStart(const TQStringList &mechlist)=0;
virtual int clientFirstStep(bool allowClientSendFirst)=0;
- virtual bool serverStart(const QString &realm, QStringList *mechlist, const QString &name)=0;
- virtual int serverFirstStep(const QString &mech, const QByteArray *in)=0;
+ virtual bool serverStart(const TQString &realm, TQStringList *mechlist, const TQString &name)=0;
+ virtual int serverFirstStep(const TQString &mech, const TQByteArray *in)=0;
// get / set params
virtual QCA_SASLNeedParams clientParamsNeeded() const=0;
- virtual void setClientParams(const QString *user, const QString *authzid, const QString *pass, const QString *realm)=0;
- virtual QString username() const=0;
- virtual QString authzid() const=0;
+ virtual void setClientParams(const TQString *user, const TQString *authzid, const TQString *pass, const TQString *realm)=0;
+ virtual TQString username() const=0;
+ virtual TQString authzid() const=0;
// continue steps
- virtual int nextStep(const QByteArray &in)=0;
+ virtual int nextStep(const TQByteArray &in)=0;
virtual int tryAgain()=0;
// results
- virtual QString mech() const=0;
- virtual const QByteArray *clientInit() const=0;
- virtual QByteArray result() const=0;
+ virtual TQString mech() const=0;
+ virtual const TQByteArray *clientInit() const=0;
+ virtual TQByteArray result() const=0;
// security layer
- virtual bool encode(const QByteArray &in, QByteArray *out)=0;
- virtual bool decode(const QByteArray &in, QByteArray *out)=0;
+ virtual bool encode(const TQByteArray &in, TQByteArray *out)=0;
+ virtual bool decode(const TQByteArray &in, TQByteArray *out)=0;
};
#endif
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp
index 159c8058..f7d44db4 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.cpp
@@ -28,9 +28,9 @@
#include"securestream.h"
-#include<qguardedptr.h>
-#include<qvaluelist.h>
-#include<qtimer.h>
+#include<tqguardedptr.h>
+#include<tqvaluelist.h>
+#include<tqtimer.h>
#ifdef USE_TLSHANDLER
#include"xmpp.h"
@@ -56,7 +56,7 @@ public:
int finished(int encoded);
int p;
- QValueList<Item> list;
+ TQValueList<Item> list;
};
LayerTracker::LayerTracker()
@@ -90,7 +90,7 @@ void LayerTracker::specifyEncoded(int encoded, int plain)
int LayerTracker::finished(int encoded)
{
int plain = 0;
- for(QValueList<Item>::Iterator it = list.begin(); it != list.end();) {
+ for(TQValueList<Item>::Iterator it = list.begin(); it != list.end();) {
Item &i = *it;
// not enough?
@@ -131,11 +131,11 @@ public:
type = TLS;
p.tls = t;
init();
- connect(p.tls, SIGNAL(handshaken()), SLOT(tls_handshaken()));
- connect(p.tls, SIGNAL(readyRead()), SLOT(tls_readyRead()));
- connect(p.tls, SIGNAL(readyReadOutgoing(int)), SLOT(tls_readyReadOutgoing(int)));
- connect(p.tls, SIGNAL(closed()), SLOT(tls_closed()));
- connect(p.tls, SIGNAL(error(int)), SLOT(tls_error(int)));
+ connect(p.tls, TQT_SIGNAL(handshaken()), TQT_SLOT(tls_handshaken()));
+ connect(p.tls, TQT_SIGNAL(readyRead()), TQT_SLOT(tls_readyRead()));
+ connect(p.tls, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(tls_readyReadOutgoing(int)));
+ connect(p.tls, TQT_SIGNAL(closed()), TQT_SLOT(tls_closed()));
+ connect(p.tls, TQT_SIGNAL(error(int)), TQT_SLOT(tls_error(int)));
}
SecureLayer(QCA::SASL *s)
@@ -143,9 +143,9 @@ public:
type = SASL;
p.sasl = s;
init();
- connect(p.sasl, SIGNAL(readyRead()), SLOT(sasl_readyRead()));
- connect(p.sasl, SIGNAL(readyReadOutgoing(int)), SLOT(sasl_readyReadOutgoing(int)));
- connect(p.sasl, SIGNAL(error(int)), SLOT(sasl_error(int)));
+ connect(p.sasl, TQT_SIGNAL(readyRead()), TQT_SLOT(sasl_readyRead()));
+ connect(p.sasl, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(sasl_readyReadOutgoing(int)));
+ connect(p.sasl, TQT_SIGNAL(error(int)), TQT_SLOT(sasl_error(int)));
}
#ifdef USE_TLSHANDLER
@@ -154,11 +154,11 @@ public:
type = TLSH;
p.tlsHandler = t;
init();
- connect(p.tlsHandler, SIGNAL(success()), SLOT(tlsHandler_success()));
- connect(p.tlsHandler, SIGNAL(fail()), SLOT(tlsHandler_fail()));
- connect(p.tlsHandler, SIGNAL(closed()), SLOT(tlsHandler_closed()));
- connect(p.tlsHandler, SIGNAL(readyRead(const QByteArray &)), SLOT(tlsHandler_readyRead(const QByteArray &)));
- connect(p.tlsHandler, SIGNAL(readyReadOutgoing(const QByteArray &, int)), SLOT(tlsHandler_readyReadOutgoing(const QByteArray &, int)));
+ connect(p.tlsHandler, TQT_SIGNAL(success()), TQT_SLOT(tlsHandler_success()));
+ connect(p.tlsHandler, TQT_SIGNAL(fail()), TQT_SLOT(tlsHandler_fail()));
+ connect(p.tlsHandler, TQT_SIGNAL(closed()), TQT_SLOT(tlsHandler_closed()));
+ connect(p.tlsHandler, TQT_SIGNAL(readyRead(const TQByteArray &)), TQT_SLOT(tlsHandler_readyRead(const TQByteArray &)));
+ connect(p.tlsHandler, TQT_SIGNAL(readyReadOutgoing(const TQByteArray &, int)), TQT_SLOT(tlsHandler_readyReadOutgoing(const TQByteArray &, int)));
}
#endif
@@ -168,7 +168,7 @@ public:
prebytes = 0;
}
- void write(const QByteArray &a)
+ void write(const TQByteArray &a)
{
layer.addPlain(a.size());
switch(type) {
@@ -180,7 +180,7 @@ public:
}
}
- void writeIncoming(const QByteArray &a)
+ void writeIncoming(const TQByteArray &a)
{
switch(type) {
case TLS: { p.tls->writeIncoming(a); break; }
@@ -218,9 +218,9 @@ public:
signals:
void tlsHandshaken();
- void tlsClosed(const QByteArray &);
- void readyRead(const QByteArray &);
- void needWrite(const QByteArray &);
+ void tlsClosed(const TQByteArray &);
+ void readyRead(const TQByteArray &);
+ void needWrite(const TQByteArray &);
void error(int);
private slots:
@@ -232,13 +232,13 @@ private slots:
void tls_readyRead()
{
- QByteArray a = p.tls->read();
+ TQByteArray a = p.tls->read();
readyRead(a);
}
void tls_readyReadOutgoing(int plainBytes)
{
- QByteArray a = p.tls->readOutgoing();
+ TQByteArray a = p.tls->readOutgoing();
if(tls_done)
layer.specifyEncoded(a.size(), plainBytes);
needWrite(a);
@@ -246,7 +246,7 @@ private slots:
void tls_closed()
{
- QByteArray a = p.tls->readUnprocessed();
+ TQByteArray a = p.tls->readUnprocessed();
tlsClosed(a);
}
@@ -257,13 +257,13 @@ private slots:
void sasl_readyRead()
{
- QByteArray a = p.sasl->read();
+ TQByteArray a = p.sasl->read();
readyRead(a);
}
void sasl_readyReadOutgoing(int plainBytes)
{
- QByteArray a = p.sasl->readOutgoing();
+ TQByteArray a = p.sasl->readOutgoing();
layer.specifyEncoded(a.size(), plainBytes);
needWrite(a);
}
@@ -287,15 +287,15 @@ private slots:
void tlsHandler_closed()
{
- tlsClosed(QByteArray());
+ tlsClosed(TQByteArray());
}
- void tlsHandler_readyRead(const QByteArray &a)
+ void tlsHandler_readyRead(const TQByteArray &a)
{
readyRead(a);
}
- void tlsHandler_readyReadOutgoing(const QByteArray &a, int plainBytes)
+ void tlsHandler_readyReadOutgoing(const TQByteArray &a, int plainBytes)
{
if(tls_done)
layer.specifyEncoded(a.size(), plainBytes);
@@ -310,7 +310,7 @@ class SecureStream::Private
{
public:
ByteStream *bs;
- QPtrList<SecureLayer> layers;
+ TQPtrList<SecureLayer> layers;
int pending;
int errorCode;
bool active;
@@ -318,7 +318,7 @@ public:
bool haveTLS() const
{
- QPtrListIterator<SecureLayer> it(layers);
+ TQPtrListIterator<SecureLayer> it(layers);
for(SecureLayer *s; (s = it.current()); ++it) {
if(s->type == SecureLayer::TLS
#ifdef USE_TLSHANDLER
@@ -333,7 +333,7 @@ public:
bool haveSASL() const
{
- QPtrListIterator<SecureLayer> it(layers);
+ TQPtrListIterator<SecureLayer> it(layers);
for(SecureLayer *s; (s = it.current()); ++it) {
if(s->type == SecureLayer::SASL)
return true;
@@ -348,8 +348,8 @@ SecureStream::SecureStream(ByteStream *s)
d = new Private;
d->bs = s;
- connect(d->bs, SIGNAL(readyRead()), SLOT(bs_readyRead()));
- connect(d->bs, SIGNAL(bytesWritten(int)), SLOT(bs_bytesWritten(int)));
+ connect(d->bs, TQT_SIGNAL(readyRead()), TQT_SLOT(bs_readyRead()));
+ connect(d->bs, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(bs_bytesWritten(int)));
d->layers.setAutoDelete(true);
d->pending = 0;
@@ -362,25 +362,25 @@ SecureStream::~SecureStream()
delete d;
}
-void SecureStream::linkLayer(QObject *s)
+void SecureStream::linkLayer(TQObject *s)
{
- connect(s, SIGNAL(tlsHandshaken()), SLOT(layer_tlsHandshaken()));
- connect(s, SIGNAL(tlsClosed(const QByteArray &)), SLOT(layer_tlsClosed(const QByteArray &)));
- connect(s, SIGNAL(readyRead(const QByteArray &)), SLOT(layer_readyRead(const QByteArray &)));
- connect(s, SIGNAL(needWrite(const QByteArray &)), SLOT(layer_needWrite(const QByteArray &)));
- connect(s, SIGNAL(error(int)), SLOT(layer_error(int)));
+ connect(s, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(layer_tlsHandshaken()));
+ connect(s, TQT_SIGNAL(tlsClosed(const TQByteArray &)), TQT_SLOT(layer_tlsClosed(const TQByteArray &)));
+ connect(s, TQT_SIGNAL(readyRead(const TQByteArray &)), TQT_SLOT(layer_readyRead(const TQByteArray &)));
+ connect(s, TQT_SIGNAL(needWrite(const TQByteArray &)), TQT_SLOT(layer_needWrite(const TQByteArray &)));
+ connect(s, TQT_SIGNAL(error(int)), TQT_SLOT(layer_error(int)));
}
int SecureStream::calcPrebytes() const
{
int x = 0;
- QPtrListIterator<SecureLayer> it(d->layers);
+ TQPtrListIterator<SecureLayer> it(d->layers);
for(SecureLayer *s; (s = it.current()); ++it)
x += s->prebytes;
return (d->pending - x);
}
-void SecureStream::startTLSClient(QCA::TLS *t, const QByteArray &spare)
+void SecureStream::startTLSClient(QCA::TLS *t, const TQByteArray &spare)
{
if(!d->active || d->topInProgress || d->haveTLS())
return;
@@ -394,7 +394,7 @@ void SecureStream::startTLSClient(QCA::TLS *t, const QByteArray &spare)
insertData(spare);
}
-void SecureStream::startTLSServer(QCA::TLS *t, const QByteArray &spare)
+void SecureStream::startTLSServer(QCA::TLS *t, const TQByteArray &spare)
{
if(!d->active || d->topInProgress || d->haveTLS())
return;
@@ -408,7 +408,7 @@ void SecureStream::startTLSServer(QCA::TLS *t, const QByteArray &spare)
insertData(spare);
}
-void SecureStream::setLayerSASL(QCA::SASL *sasl, const QByteArray &spare)
+void SecureStream::setLayerSASL(QCA::SASL *sasl, const TQByteArray &spare)
{
if(!d->active || d->topInProgress || d->haveSASL())
return;
@@ -422,7 +422,7 @@ void SecureStream::setLayerSASL(QCA::SASL *sasl, const QByteArray &spare)
}
#ifdef USE_TLSHANDLER
-void SecureStream::startTLSClient(XMPP::TLSHandler *t, const QString &server, const QByteArray &spare)
+void SecureStream::startTLSClient(XMPP::TLSHandler *t, const TQString &server, const TQByteArray &spare)
{
if(!d->active || d->topInProgress || d->haveTLS())
return;
@@ -459,7 +459,7 @@ bool SecureStream::isOpen() const
return d->active;
}
-void SecureStream::write(const QByteArray &a)
+void SecureStream::write(const TQByteArray &a)
{
if(!isOpen())
return;
@@ -481,7 +481,7 @@ int SecureStream::bytesToWrite() const
void SecureStream::bs_readyRead()
{
- QByteArray a = d->bs->read();
+ TQByteArray a = d->bs->read();
// send to the first layer
SecureLayer *s = d->layers.getFirst();
@@ -493,7 +493,7 @@ void SecureStream::bs_readyRead()
void SecureStream::bs_bytesWritten(int bytes)
{
- QPtrListIterator<SecureLayer> it(d->layers);
+ TQPtrListIterator<SecureLayer> it(d->layers);
for(SecureLayer *s; (s = it.current()); ++it)
bytes = s->finished(bytes);
@@ -509,17 +509,17 @@ void SecureStream::layer_tlsHandshaken()
tlsHandshaken();
}
-void SecureStream::layer_tlsClosed(const QByteArray &)
+void SecureStream::layer_tlsClosed(const TQByteArray &)
{
d->active = false;
d->layers.clear();
tlsClosed();
}
-void SecureStream::layer_readyRead(const QByteArray &a)
+void SecureStream::layer_readyRead(const TQByteArray &a)
{
SecureLayer *s = (SecureLayer *)sender();
- QPtrListIterator<SecureLayer> it(d->layers);
+ TQPtrListIterator<SecureLayer> it(d->layers);
while(it.current() != s)
++it;
@@ -532,10 +532,10 @@ void SecureStream::layer_readyRead(const QByteArray &a)
incomingData(a);
}
-void SecureStream::layer_needWrite(const QByteArray &a)
+void SecureStream::layer_needWrite(const TQByteArray &a)
{
SecureLayer *s = (SecureLayer *)sender();
- QPtrListIterator<SecureLayer> it(d->layers);
+ TQPtrListIterator<SecureLayer> it(d->layers);
while(it.current() != s)
++it;
@@ -565,7 +565,7 @@ void SecureStream::layer_error(int x)
#endif
}
-void SecureStream::insertData(const QByteArray &a)
+void SecureStream::insertData(const TQByteArray &a)
{
if(!a.isEmpty()) {
SecureLayer *s = d->layers.getLast();
@@ -576,12 +576,12 @@ void SecureStream::insertData(const QByteArray &a)
}
}
-void SecureStream::writeRawData(const QByteArray &a)
+void SecureStream::writeRawData(const TQByteArray &a)
{
d->bs->write(a);
}
-void SecureStream::incomingData(const QByteArray &a)
+void SecureStream::incomingData(const TQByteArray &a)
{
appendRead(a);
if(bytesAvailable())
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h
index 8ae9f761..844fd3d1 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/securestream.h
@@ -41,11 +41,11 @@ public:
SecureStream(ByteStream *s);
~SecureStream();
- void startTLSClient(QCA::TLS *t, const QByteArray &spare=QByteArray());
- void startTLSServer(QCA::TLS *t, const QByteArray &spare=QByteArray());
- void setLayerSASL(QCA::SASL *s, const QByteArray &spare=QByteArray());
+ void startTLSClient(QCA::TLS *t, const TQByteArray &spare=TQByteArray());
+ void startTLSServer(QCA::TLS *t, const TQByteArray &spare=TQByteArray());
+ void setLayerSASL(QCA::SASL *s, const TQByteArray &spare=TQByteArray());
#ifdef USE_TLSHANDLER
- void startTLSClient(XMPP::TLSHandler *t, const QString &server, const QByteArray &spare=QByteArray());
+ void startTLSClient(XMPP::TLSHandler *t, const TQString &server, const TQByteArray &spare=TQByteArray());
#endif
void closeTLS();
@@ -53,7 +53,7 @@ public:
// reimplemented
bool isOpen() const;
- void write(const QByteArray &);
+ void write(const TQByteArray &);
int bytesToWrite() const;
signals:
@@ -65,17 +65,17 @@ private slots:
void bs_bytesWritten(int);
void layer_tlsHandshaken();
- void layer_tlsClosed(const QByteArray &);
- void layer_readyRead(const QByteArray &);
- void layer_needWrite(const QByteArray &);
+ void layer_tlsClosed(const TQByteArray &);
+ void layer_readyRead(const TQByteArray &);
+ void layer_needWrite(const TQByteArray &);
void layer_error(int);
private:
- void linkLayer(QObject *);
+ void linkLayer(TQObject *);
int calcPrebytes() const;
- void insertData(const QByteArray &a);
- void writeRawData(const QByteArray &a);
- void incomingData(const QByteArray &a);
+ void insertData(const TQByteArray &a);
+ void writeRawData(const TQByteArray &a);
+ void incomingData(const TQByteArray &a);
class Private;
Private *d;
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp
index 82a7aac4..c825a2ca 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp
@@ -20,10 +20,10 @@
#include"simplesasl.h"
-#include<qhostaddress.h>
-#include<qstringlist.h>
-#include<qptrlist.h>
-#include<qvaluelist.h>
+#include<tqhostaddress.h>
+#include<tqstringlist.h>
+#include<tqptrlist.h>
+#include<tqvaluelist.h>
#include<qca.h>
#include<stdlib.h>
#include"base64.h"
@@ -33,17 +33,17 @@ namespace XMPP
struct Prop
{
- QCString var, val;
+ TQCString var, val;
};
-class PropList : public QValueList<Prop>
+class PropList : public TQValueList<Prop>
{
public:
- PropList() : QValueList<Prop>()
+ PropList() : TQValueList<Prop>()
{
}
- void set(const QCString &var, const QCString &val)
+ void set(const TQCString &var, const TQCString &val)
{
Prop p;
p.var = var;
@@ -51,18 +51,18 @@ public:
append(p);
}
- QCString get(const QCString &var)
+ TQCString get(const TQCString &var)
{
for(ConstIterator it = begin(); it != end(); ++it) {
if((*it).var == var)
return (*it).val;
}
- return QCString();
+ return TQCString();
}
- QCString toString() const
+ TQCString toString() const
{
- QCString str;
+ TQCString str;
bool first = true;
for(ConstIterator it = begin(); it != end(); ++it) {
if(!first)
@@ -73,7 +73,7 @@ public:
return str;
}
- bool fromString(const QCString &str)
+ bool fromString(const TQCString &str)
{
PropList list;
int at = 0;
@@ -81,7 +81,7 @@ public:
int n = str.find('=', at);
if(n == -1)
break;
- QCString var, val;
+ TQCString var, val;
var = str.mid(at, n-at);
at = n + 1;
if(str[at] == '\"') {
@@ -122,7 +122,7 @@ public:
return true;
}
- int varCount(const QCString &var)
+ int varCount(const TQCString &var)
{
int n = 0;
for(ConstIterator it = begin(); it != end(); ++it) {
@@ -132,9 +132,9 @@ public:
return n;
}
- QStringList getValues(const QCString &var)
+ TQStringList getValues(const TQCString &var)
{
- QStringList list;
+ TQStringList list;
for(ConstIterator it = begin(); it != end(); ++it) {
if((*it).var == var)
list += (*it).val;
@@ -147,19 +147,19 @@ class SimpleSASLContext : public QCA_SASLContext
{
public:
// core props
- QString service, host;
+ TQString service, host;
// state
int step;
- QByteArray in_buf;
- QString out_mech;
- QByteArray out_buf;
+ TQByteArray in_buf;
+ TQString out_mech;
+ TQByteArray out_buf;
bool capable;
int err;
QCA_SASLNeedParams need;
QCA_SASLNeedParams have;
- QString user, authz, pass, realm;
+ TQString user, authz, pass, realm;
SimpleSASLContext()
{
@@ -179,7 +179,7 @@ public:
void resetState()
{
- out_mech = QString();
+ out_mech = TQString();
out_buf.resize(0);
err = -1;
}
@@ -195,19 +195,19 @@ public:
have.authzid = false;
have.pass = false;
have.realm = false;
- user = QString();
- authz = QString();
- pass = QString();
- realm = QString();
+ user = TQString();
+ authz = TQString();
+ pass = TQString();
+ realm = TQString();
}
- void setCoreProps(const QString &_service, const QString &_host, QCA_SASLHostPort *, QCA_SASLHostPort *)
+ void setCoreProps(const TQString &_service, const TQString &_host, QCA_SASLHostPort *, QCA_SASLHostPort *)
{
service = _service;
host = _host;
}
- void setSecurityProps(bool, bool, bool, bool, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int, const QString &, int)
+ void setSecurityProps(bool, bool, bool, bool, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int, const TQString &, int)
{
if(reqForward || reqCreds || reqMutual || ssfMin > 0)
capable = false;
@@ -225,10 +225,10 @@ public:
return err;
}
- bool clientStart(const QStringList &mechlist)
+ bool clientStart(const TQStringList &mechlist)
{
bool haveMech = false;
- for(QStringList::ConstIterator it = mechlist.begin(); it != mechlist.end(); ++it) {
+ for(TQStringList::ConstIterator it = mechlist.begin(); it != mechlist.end(); ++it) {
if((*it) == "DIGEST-MD5") {
haveMech = true;
break;
@@ -249,12 +249,12 @@ public:
return clientTryAgain();
}
- bool serverStart(const QString &, QStringList *, const QString &)
+ bool serverStart(const TQString &, TQStringList *, const TQString &)
{
return false;
}
- int serverFirstStep(const QString &, const QByteArray *)
+ int serverFirstStep(const TQString &, const TQByteArray *)
{
return Error;
}
@@ -264,7 +264,7 @@ public:
return need;
}
- void setClientParams(const QString *_user, const QString *_authzid, const QString *_pass, const QString *_realm)
+ void setClientParams(const TQString *_user, const TQString *_authzid, const TQString *_pass, const TQString *_realm)
{
if(_user) {
user = *_user;
@@ -288,17 +288,17 @@ public:
}
}
- QString username() const
+ TQString username() const
{
- return QString();
+ return TQString();
}
- QString authzid() const
+ TQString authzid() const
{
- return QString();
+ return TQString();
}
- int nextStep(const QByteArray &in)
+ int nextStep(const TQByteArray &in)
{
in_buf = in.copy();
return tryAgain();
@@ -309,17 +309,17 @@ public:
return clientTryAgain();
}
- QString mech() const
+ TQString mech() const
{
return out_mech;
}
- const QByteArray *clientInit() const
+ const TQByteArray *clientInit() const
{
return 0;
}
- QByteArray result() const
+ TQByteArray result() const
{
return out_buf;
}
@@ -349,7 +349,7 @@ public:
return NeedParams;
// get props
- QCString cs(in_buf.data(), in_buf.size()+1);
+ TQCString cs(in_buf.data(), in_buf.size()+1);
PropList in;
if(!in.fromString(cs)) {
err = QCA::SASL::BadProto;
@@ -357,30 +357,30 @@ public:
}
// make a cnonce
- QByteArray a(32);
+ TQByteArray a(32);
for(int n = 0; n < (int)a.size(); ++n)
a[n] = (char)(256.0*rand()/(RAND_MAX+1.0));
- QCString cnonce = Base64::arrayToString(a).latin1();
+ TQCString cnonce = Base64::arrayToString(a).latin1();
// make other variables
realm = host;
- QCString nonce = in.get("nonce");
- QCString nc = "00000001";
- QCString uri = service.utf8() + '/' + host.utf8();
- QCString qop = "auth";
+ TQCString nonce = in.get("nonce");
+ TQCString nc = "00000001";
+ TQCString uri = service.utf8() + '/' + host.utf8();
+ TQCString qop = "auth";
// build 'response'
- QCString X = user.utf8() + ':' + realm.utf8() + ':' + pass.utf8();
- QByteArray Y = QCA::MD5::hash(X);
- QCString tmp = QCString(":") + nonce + ':' + cnonce + ':' + authz.utf8();
- QByteArray A1(Y.size() + tmp.length());
+ TQCString X = user.utf8() + ':' + realm.utf8() + ':' + pass.utf8();
+ TQByteArray Y = QCA::MD5::hash(X);
+ TQCString tmp = TQCString(":") + nonce + ':' + cnonce + ':' + authz.utf8();
+ TQByteArray A1(Y.size() + tmp.length());
memcpy(A1.data(), Y.data(), Y.size());
memcpy(A1.data() + Y.size(), tmp.data(), tmp.length());
- QCString A2 = "AUTHENTICATE:" + uri;
- QCString HA1 = QCA::MD5::hashToString(A1).latin1();
- QCString HA2 = QCA::MD5::hashToString(A2).latin1();
- QCString KD = HA1 + ':' + nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + HA2;
- QCString Z = QCA::MD5::hashToString(KD).latin1();
+ TQCString A2 = "AUTHENTICATE:" + uri;
+ TQCString HA1 = QCA::MD5::hashToString(A1).latin1();
+ TQCString HA2 = QCA::MD5::hashToString(A2).latin1();
+ TQCString KD = HA1 + ':' + nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + HA2;
+ TQCString Z = QCA::MD5::hashToString(KD).latin1();
// build output
PropList out;
@@ -396,7 +396,7 @@ public:
out.set("response", Z);
out.set("charset", "utf-8");
out.set("authzid", authz.utf8());
- QCString s = out.toString();
+ TQCString s = out.toString();
// done
out_buf.resize(s.length());
@@ -410,13 +410,13 @@ public:
}
}
- bool encode(const QByteArray &a, QByteArray *b)
+ bool encode(const TQByteArray &a, TQByteArray *b)
{
*b = a.copy();
return true;
}
- bool decode(const QByteArray &a, QByteArray *b)
+ bool decode(const TQByteArray &a, TQByteArray *b)
{
*b = a.copy();
return true;
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp
index 5482e2b3..d3182ffe 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/stream.cpp
@@ -44,9 +44,9 @@
#include"xmpp.h"
-#include<qtextstream.h>
-#include<qguardedptr.h>
-#include<qtimer.h>
+#include<tqtextstream.h>
+#include<tqguardedptr.h>
+#include<tqtimer.h>
#include<qca.h>
#include<stdlib.h>
#include"bytestream.h"
@@ -70,15 +70,15 @@ void XMPP::setDebug(Debug *p)
debug_ptr = p;
}
-static QByteArray randomArray(int size)
+static TQByteArray randomArray(int size)
{
- QByteArray a(size);
+ TQByteArray a(size);
for(int n = 0; n < size; ++n)
a[n] = (char)(256.0*rand()/(RAND_MAX+1.0));
return a;
}
-static QString genId()
+static TQString genId()
{
// need SHA1 here
if(!QCA::isSupported(QCA::CAP_SHA1))
@@ -90,7 +90,7 @@ static QString genId()
//----------------------------------------------------------------------------
// Stanza
//----------------------------------------------------------------------------
-Stanza::Error::Error(int _type, int _condition, const QString &_text, const QDomElement &_appSpec)
+Stanza::Error::Error(int _type, int _condition, const TQString &_text, const TQDomElement &_appSpec)
{
type = _type;
condition = _condition;
@@ -115,7 +115,7 @@ public:
};
static ErrorCondEntry errorCondTable[];
- static int stringToKind(const QString &s)
+ static int stringToKind(const TQString &s)
{
if(s == "message")
return Message;
@@ -127,7 +127,7 @@ public:
return -1;
}
- static QString kindToString(Kind k)
+ static TQString kindToString(Kind k)
{
if(k == Message)
return "message";
@@ -137,7 +137,7 @@ public:
return "iq";
}
- static int stringToErrorType(const QString &s)
+ static int stringToErrorType(const TQString &s)
{
for(int n = 0; errorTypeTable[n].str; ++n) {
if(s == errorTypeTable[n].str)
@@ -146,16 +146,16 @@ public:
return -1;
}
- static QString errorTypeToString(int x)
+ static TQString errorTypeToString(int x)
{
for(int n = 0; errorTypeTable[n].str; ++n) {
if(x == errorTypeTable[n].type)
return errorTypeTable[n].str;
}
- return QString();
+ return TQString();
}
- static int stringToErrorCond(const QString &s)
+ static int stringToErrorCond(const TQString &s)
{
for(int n = 0; errorCondTable[n].str; ++n) {
if(s == errorCondTable[n].str)
@@ -164,17 +164,17 @@ public:
return -1;
}
- static QString errorCondToString(int x)
+ static TQString errorCondToString(int x)
{
for(int n = 0; errorCondTable[n].str; ++n) {
if(x == errorCondTable[n].cond)
return errorCondTable[n].str;
}
- return QString();
+ return TQString();
}
Stream *s;
- QDomElement e;
+ TQDomElement e;
};
Stanza::Private::ErrorTypeEntry Stanza::Private::errorTypeTable[] =
@@ -215,7 +215,7 @@ Stanza::Stanza()
d = 0;
}
-Stanza::Stanza(Stream *s, Kind k, const Jid &to, const QString &type, const QString &id)
+Stanza::Stanza(Stream *s, Kind k, const Jid &to, const TQString &type, const TQString &id)
{
d = new Private;
@@ -235,7 +235,7 @@ Stanza::Stanza(Stream *s, Kind k, const Jid &to, const QString &type, const QStr
setId(id);
}
-Stanza::Stanza(Stream *s, const QDomElement &e)
+Stanza::Stanza(Stream *s, const TQDomElement &e)
{
d = 0;
if(e.namespaceURI() != s->baseNS())
@@ -273,59 +273,59 @@ bool Stanza::isNull() const
return (d ? false: true);
}
-QDomElement Stanza::element() const
+TQDomElement Stanza::element() const
{
return d->e;
}
-QString Stanza::toString() const
+TQString Stanza::toString() const
{
return Stream::xmlToString(d->e);
}
-QDomDocument & Stanza::doc() const
+TQDomDocument & Stanza::doc() const
{
return d->s->doc();
}
-QString Stanza::baseNS() const
+TQString Stanza::baseNS() const
{
return d->s->baseNS();
}
-QString Stanza::xhtmlImNS() const
+TQString Stanza::xhtmlImNS() const
{
return d->s->xhtmlImNS();
}
-QString Stanza::xhtmlNS() const
+TQString Stanza::xhtmlNS() const
{
return d->s->xhtmlNS();
}
-QDomElement Stanza::createElement(const QString &ns, const QString &tagName)
+TQDomElement Stanza::createElement(const TQString &ns, const TQString &tagName)
{
return d->s->doc().createElementNS(ns, tagName);
}
-QDomElement Stanza::createTextElement(const QString &ns, const QString &tagName, const QString &text)
+TQDomElement Stanza::createTextElement(const TQString &ns, const TQString &tagName, const TQString &text)
{
- QDomElement e = d->s->doc().createElementNS(ns, tagName);
+ TQDomElement e = d->s->doc().createElementNS(ns, tagName);
e.appendChild(d->s->doc().createTextNode(text));
return e;
}
-QDomElement Stanza::createXHTMLElement(const QString &xHTML)
+TQDomElement Stanza::createXHTMLElement(const TQString &xHTML)
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(xHTML, true);
- QDomElement root = doc.documentElement();
- //QDomElement e;
+ TQDomElement root = doc.documentElement();
+ //TQDomElement e;
return (root);
}
-void Stanza::appendChild(const QDomElement &e)
+void Stanza::appendChild(const TQDomElement &e)
{
d->e.appendChild(e);
}
@@ -350,19 +350,19 @@ Jid Stanza::from() const
return Jid(d->e.attribute("from"));
}
-QString Stanza::id() const
+TQString Stanza::id() const
{
return d->e.attribute("id");
}
-QString Stanza::type() const
+TQString Stanza::type() const
{
return d->e.attribute("type");
}
-QString Stanza::lang() const
+TQString Stanza::lang() const
{
- return d->e.attributeNS(NS_XML, "lang", QString());
+ return d->e.attributeNS(NS_XML, "lang", TQString());
}
void Stanza::setTo(const Jid &j)
@@ -375,17 +375,17 @@ void Stanza::setFrom(const Jid &j)
d->e.setAttribute("from", j.full());
}
-void Stanza::setId(const QString &id)
+void Stanza::setId(const TQString &id)
{
d->e.setAttribute("id", id);
}
-void Stanza::setType(const QString &type)
+void Stanza::setType(const TQString &type)
{
d->e.setAttribute("type", type);
}
-void Stanza::setLang(const QString &lang)
+void Stanza::setLang(const TQString &lang)
{
d->e.setAttribute("xml:lang", lang);
}
@@ -393,7 +393,7 @@ void Stanza::setLang(const QString &lang)
Stanza::Error Stanza::error() const
{
Error err;
- QDomElement e = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement();
+ TQDomElement e = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement();
if(e.isNull())
return err;
@@ -403,11 +403,11 @@ Stanza::Error Stanza::error() const
err.type = x;
// condition: find first element
- QDomNodeList nl = e.childNodes();
- QDomElement t;
+ TQDomNodeList nl = e.childNodes();
+ TQDomElement t;
uint n;
for(n = 0; n < nl.count(); ++n) {
- QDomNode i = nl.item(n);
+ TQDomNode i = nl.item(n);
if(i.isElement()) {
t = i.toElement();
break;
@@ -429,7 +429,7 @@ Stanza::Error Stanza::error() const
// appspec: find first non-standard namespaced element
nl = e.childNodes();
for(n = 0; n < nl.count(); ++n) {
- QDomNode i = nl.item(n);
+ TQDomNode i = nl.item(n);
if(i.isElement() && i.namespaceURI() != NS_STANZAS) {
err.appSpec = i.toElement();
break;
@@ -441,7 +441,7 @@ Stanza::Error Stanza::error() const
void Stanza::setError(const Error &err)
{
// create the element if necessary
- QDomElement errElem = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement();
+ TQDomElement errElem = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement();
if(errElem.isNull()) {
errElem = d->e.ownerDocument().createElementNS(d->s->baseNS(), "error");
d->e.appendChild(errElem);
@@ -449,13 +449,13 @@ void Stanza::setError(const Error &err)
// error type/condition
if(d->s->old()) {
- errElem.setAttribute("code", QString::number(err.condition));
+ errElem.setAttribute("code", TQString::number(err.condition));
}
else {
- QString stype = Private::errorTypeToString(err.type);
+ TQString stype = Private::errorTypeToString(err.type);
if(stype.isEmpty())
return;
- QString scond = Private::errorCondToString(err.condition);
+ TQString scond = Private::errorCondToString(err.condition);
if(scond.isEmpty())
return;
@@ -468,7 +468,7 @@ void Stanza::setError(const Error &err)
errElem.appendChild(d->e.ownerDocument().createTextNode(err.text));
}
else {
- QDomElement te = d->e.ownerDocument().createElementNS(d->s->baseNS(), "text");
+ TQDomElement te = d->e.ownerDocument().createElementNS(d->s->baseNS(), "text");
te.appendChild(d->e.ownerDocument().createTextNode(err.text));
errElem.appendChild(te);
}
@@ -479,7 +479,7 @@ void Stanza::setError(const Error &err)
void Stanza::clearError()
{
- QDomElement errElem = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement();
+ TQDomElement errElem = d->e.elementsByTagNameNS(d->s->baseNS(), "error").item(0).toElement();
if(!errElem.isNull())
d->e.removeChild(errElem);
}
@@ -488,8 +488,8 @@ void Stanza::clearError()
// Stream
//----------------------------------------------------------------------------
static XmlProtocol *foo = 0;
-Stream::Stream(QObject *parent)
-:QObject(parent)
+Stream::Stream(TQObject *parent)
+:TQObject(parent)
{
}
@@ -497,17 +497,17 @@ Stream::~Stream()
{
}
-Stanza Stream::createStanza(Stanza::Kind k, const Jid &to, const QString &type, const QString &id)
+Stanza Stream::createStanza(Stanza::Kind k, const Jid &to, const TQString &type, const TQString &id)
{
return Stanza(this, k, to, type, id);
}
-Stanza Stream::createStanza(const QDomElement &e)
+Stanza Stream::createStanza(const TQDomElement &e)
{
return Stanza(this, e);
}
-QString Stream::xmlToString(const QDomElement &e, bool clip)
+TQString Stream::xmlToString(const TQDomElement &e, bool clip)
{
if(!foo)
foo = new CoreProtocol;
@@ -569,14 +569,14 @@ public:
}
Jid jid;
- QString server;
+ TQString server;
bool oldOnly;
bool allowPlain, mutualAuth;
bool haveLocalAddr;
- QHostAddress localAddr;
+ TQHostAddress localAddr;
Q_UINT16 localPort;
int minimumSSF, maximumSSF;
- QString sasl_mech;
+ TQString sasl_mech;
bool doBinding;
bool in_rrsig;
@@ -590,7 +590,7 @@ public:
CoreProtocol client;
CoreProtocol srv;
- QString defRealm;
+ TQString defRealm;
int mode;
int state;
@@ -600,51 +600,51 @@ public:
bool tls_warned, using_tls;
bool doAuth;
- QStringList sasl_mechlist;
+ TQStringList sasl_mechlist;
int errCond;
- QString errText;
- QDomElement errAppSpec;
+ TQString errText;
+ TQDomElement errAppSpec;
- QPtrList<Stanza> in;
+ TQPtrList<Stanza> in;
- QTimer noopTimer;
+ TQTimer noopTimer;
int noop_time;
};
-ClientStream::ClientStream(Connector *conn, TLSHandler *tlsHandler, QObject *parent)
+ClientStream::ClientStream(Connector *conn, TLSHandler *tlsHandler, TQObject *parent)
:Stream(parent)
{
d = new Private;
d->mode = Client;
d->conn = conn;
- connect(d->conn, SIGNAL(connected()), SLOT(cr_connected()));
- connect(d->conn, SIGNAL(error()), SLOT(cr_error()));
+ connect(d->conn, TQT_SIGNAL(connected()), TQT_SLOT(cr_connected()));
+ connect(d->conn, TQT_SIGNAL(error()), TQT_SLOT(cr_error()));
d->noop_time = 0;
- connect(&d->noopTimer, SIGNAL(timeout()), SLOT(doNoop()));
+ connect(&d->noopTimer, TQT_SIGNAL(timeout()), TQT_SLOT(doNoop()));
d->tlsHandler = tlsHandler;
}
-ClientStream::ClientStream(const QString &host, const QString &defRealm, ByteStream *bs, QCA::TLS *tls, QObject *parent)
+ClientStream::ClientStream(const TQString &host, const TQString &defRealm, ByteStream *bs, QCA::TLS *tls, TQObject *parent)
:Stream(parent)
{
d = new Private;
d->mode = Server;
d->bs = bs;
- connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed()));
- connect(d->bs, SIGNAL(delayedCloseFinished()), SLOT(bs_delayedCloseFinished()));
- connect(d->bs, SIGNAL(error(int)), SLOT(bs_error(int)));
+ connect(d->bs, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed()));
+ connect(d->bs, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(bs_delayedCloseFinished()));
+ connect(d->bs, TQT_SIGNAL(error(int)), TQT_SLOT(bs_error(int)));
- QByteArray spare = d->bs->read();
+ TQByteArray spare = d->bs->read();
d->ss = new SecureStream(d->bs);
- connect(d->ss, SIGNAL(readyRead()), SLOT(ss_readyRead()));
- connect(d->ss, SIGNAL(bytesWritten(int)), SLOT(ss_bytesWritten(int)));
- connect(d->ss, SIGNAL(tlsHandshaken()), SLOT(ss_tlsHandshaken()));
- connect(d->ss, SIGNAL(tlsClosed()), SLOT(ss_tlsClosed()));
- connect(d->ss, SIGNAL(error(int)), SLOT(ss_error(int)));
+ connect(d->ss, TQT_SIGNAL(readyRead()), TQT_SLOT(ss_readyRead()));
+ connect(d->ss, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(ss_bytesWritten(int)));
+ connect(d->ss, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(ss_tlsHandshaken()));
+ connect(d->ss, TQT_SIGNAL(tlsClosed()), TQT_SLOT(ss_tlsClosed()));
+ connect(d->ss, TQT_SIGNAL(error(int)), TQT_SLOT(ss_error(int)));
d->server = host;
d->defRealm = defRealm;
@@ -655,7 +655,7 @@ ClientStream::ClientStream(const QString &host, const QString &defRealm, ByteStr
//d->srv.startServerIn(genId());
//d->state = Connecting;
//d->jid = Jid();
- //d->server = QString();
+ //d->server = TQString();
}
ClientStream::~ClientStream()
@@ -761,13 +761,13 @@ bool ClientStream::isAuthenticated() const
return (d->state == Active) ? true: false;
}
-void ClientStream::setUsername(const QString &s)
+void ClientStream::setUsername(const TQString &s)
{
if(d->sasl)
d->sasl->setUsername(s);
}
-void ClientStream::setPassword(const QString &s)
+void ClientStream::setPassword(const TQString &s)
{
if(d->client.old) {
d->client.setPassword(s);
@@ -778,7 +778,7 @@ void ClientStream::setPassword(const QString &s)
}
}
-void ClientStream::setRealm(const QString &s)
+void ClientStream::setRealm(const TQString &s)
{
if(d->sasl)
d->sasl->setRealm(s);
@@ -817,7 +817,7 @@ void ClientStream::setNoopTime(int mills)
d->noopTimer.start(d->noop_time);
}
-QString ClientStream::saslMechanism() const
+TQString ClientStream::saslMechanism() const
{
return d->client.saslMech();
}
@@ -827,12 +827,12 @@ int ClientStream::saslSSF() const
return d->sasl_ssf;
}
-void ClientStream::setSASLMechanism(const QString &s)
+void ClientStream::setSASLMechanism(const TQString &s)
{
d->sasl_mech = s;
}
-void ClientStream::setLocalAddr(const QHostAddress &addr, Q_UINT16 port)
+void ClientStream::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port)
{
d->haveLocalAddr = true;
d->localAddr = addr;
@@ -844,12 +844,12 @@ int ClientStream::errorCondition() const
return d->errCond;
}
-QString ClientStream::errorText() const
+TQString ClientStream::errorText() const
{
return d->errText;
}
-QDomElement ClientStream::errorAppSpec() const
+TQDomElement ClientStream::errorAppSpec() const
{
return d->errAppSpec;
}
@@ -871,22 +871,22 @@ void ClientStream::close()
}
}
-QDomDocument & ClientStream::doc() const
+TQDomDocument & ClientStream::doc() const
{
return d->client.doc;
}
-QString ClientStream::baseNS() const
+TQString ClientStream::baseNS() const
{
return NS_CLIENT;
}
-QString ClientStream::xhtmlImNS() const
+TQString ClientStream::xhtmlImNS() const
{
return NS_XHTML_IM;
}
-QString ClientStream::xhtmlNS() const
+TQString ClientStream::xhtmlNS() const
{
return NS_XHTML;
}
@@ -940,17 +940,17 @@ void ClientStream::write(const Stanza &s)
void ClientStream::cr_connected()
{
d->bs = d->conn->stream();
- connect(d->bs, SIGNAL(connectionClosed()), SLOT(bs_connectionClosed()));
- connect(d->bs, SIGNAL(delayedCloseFinished()), SLOT(bs_delayedCloseFinished()));
+ connect(d->bs, TQT_SIGNAL(connectionClosed()), TQT_SLOT(bs_connectionClosed()));
+ connect(d->bs, TQT_SIGNAL(delayedCloseFinished()), TQT_SLOT(bs_delayedCloseFinished()));
- QByteArray spare = d->bs->read();
+ TQByteArray spare = d->bs->read();
d->ss = new SecureStream(d->bs);
- connect(d->ss, SIGNAL(readyRead()), SLOT(ss_readyRead()));
- connect(d->ss, SIGNAL(bytesWritten(int)), SLOT(ss_bytesWritten(int)));
- connect(d->ss, SIGNAL(tlsHandshaken()), SLOT(ss_tlsHandshaken()));
- connect(d->ss, SIGNAL(tlsClosed()), SLOT(ss_tlsClosed()));
- connect(d->ss, SIGNAL(error(int)), SLOT(ss_error(int)));
+ connect(d->ss, TQT_SIGNAL(readyRead()), TQT_SLOT(ss_readyRead()));
+ connect(d->ss, TQT_SIGNAL(bytesWritten(int)), TQT_SLOT(ss_bytesWritten(int)));
+ connect(d->ss, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT(ss_tlsHandshaken()));
+ connect(d->ss, TQT_SIGNAL(tlsClosed()), TQT_SLOT(ss_tlsClosed()));
+ connect(d->ss, TQT_SIGNAL(error(int)), TQT_SLOT(ss_error(int)));
//d->client.startDialbackOut("andbit.net", "im.pyxa.org");
//d->client.startServerOut(d->server);
@@ -968,7 +968,7 @@ void ClientStream::cr_connected()
d->client.doTLS = d->tlsHandler ? true: false;
d->client.doBinding = d->doBinding;*/
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
connected();
if(!self)
return;
@@ -1008,10 +1008,10 @@ void ClientStream::bs_error(int)
void ClientStream::ss_readyRead()
{
- QByteArray a = d->ss->read();
+ TQByteArray a = d->ss->read();
#ifdef XMPP_DEBUG
- QCString cs(a.data(), a.size()+1);
+ TQCString cs(a.data(), a.size()+1);
fprintf(stderr, "ClientStream: recv: %d [%s]\n", a.size(), cs.data());
#endif
@@ -1044,7 +1044,7 @@ void ClientStream::ss_bytesWritten(int bytes)
void ClientStream::ss_tlsHandshaken()
{
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
securityLayerActivated(LayerTLS);
if(!self)
return;
@@ -1070,17 +1070,17 @@ void ClientStream::ss_error(int x)
}
}
-void ClientStream::sasl_clientFirstStep(const QString &mech, const QByteArray *stepData)
+void ClientStream::sasl_clientFirstStep(const TQString &mech, const TQByteArray *stepData)
{
- d->client.setSASLFirst(mech, stepData ? *stepData : QByteArray());
+ d->client.setSASLFirst(mech, stepData ? *stepData : TQByteArray());
//d->client.sasl_mech = mech;
//d->client.sasl_firstStep = stepData ? true : false;
- //d->client.sasl_step = stepData ? *stepData : QByteArray();
+ //d->client.sasl_step = stepData ? *stepData : TQByteArray();
processNext();
}
-void ClientStream::sasl_nextStep(const QByteArray &stepData)
+void ClientStream::sasl_nextStep(const TQByteArray &stepData)
{
if(d->mode == Client)
d->client.setSASLNext(stepData);
@@ -1109,12 +1109,12 @@ void ClientStream::sasl_needParams(bool user, bool authzid, bool pass, bool real
d->sasl->continueAfterParams();
}
-void ClientStream::sasl_authCheck(const QString &user, const QString &)
+void ClientStream::sasl_authCheck(const TQString &user, const TQString &)
{
//#ifdef XMPP_DEBUG
// printf("authcheck: [%s], [%s]\n", user.latin1(), authzid.latin1());
//#endif
- QString u = user;
+ TQString u = user;
int n = u.find('@');
if(n != -1)
u.truncate(n);
@@ -1163,10 +1163,10 @@ void ClientStream::srvProcessNext()
else if(need == CoreProtocol::NSASLMechs) {
if(!d->sasl) {
d->sasl = new QCA::SASL;
- connect(d->sasl, SIGNAL(authCheck(const QString &, const QString &)), SLOT(sasl_authCheck(const QString &, const QString &)));
- connect(d->sasl, SIGNAL(nextStep(const QByteArray &)), SLOT(sasl_nextStep(const QByteArray &)));
- connect(d->sasl, SIGNAL(authenticated()), SLOT(sasl_authenticated()));
- connect(d->sasl, SIGNAL(error(int)), SLOT(sasl_error(int)));
+ connect(d->sasl, TQT_SIGNAL(authCheck(const TQString &, const TQString &)), TQT_SLOT(sasl_authCheck(const TQString &, const TQString &)));
+ connect(d->sasl, TQT_SIGNAL(nextStep(const TQByteArray &)), TQT_SLOT(sasl_nextStep(const TQByteArray &)));
+ connect(d->sasl, TQT_SIGNAL(authenticated()), TQT_SLOT(sasl_authenticated()));
+ connect(d->sasl, TQT_SIGNAL(error(int)), TQT_SLOT(sasl_error(int)));
//d->sasl->setAllowAnonymous(false);
//d->sasl->setRequirePassCredentials(true);
@@ -1175,7 +1175,7 @@ void ClientStream::srvProcessNext()
d->sasl->setMinimumSSF(0);
d->sasl->setMaximumSSF(256);
- QStringList list;
+ TQStringList list;
// TODO: d->server is probably wrong here
if(!d->sasl->startServer("xmpp", d->server, d->defRealm, &list)) {
printf("Error initializing SASL\n");
@@ -1193,18 +1193,18 @@ void ClientStream::srvProcessNext()
// TODO
return;
}
- QByteArray a = d->srv.spare;
+ TQByteArray a = d->srv.spare;
d->ss->startTLSServer(d->tls, a);
}
else if(need == CoreProtocol::NSASLFirst) {
printf("Need SASL First Step\n");
- QByteArray a = d->srv.saslStep();
+ TQByteArray a = d->srv.saslStep();
d->sasl->putServerFirstStep(d->srv.saslMech(), a);
}
else if(need == CoreProtocol::NSASLNext) {
printf("Need SASL Next Step\n");
- QByteArray a = d->srv.saslStep();
- QCString cs(a.data(), a.size()+1);
+ TQByteArray a = d->srv.saslStep();
+ TQCString cs(a.data(), a.size()+1);
printf("[%s]\n", cs.data());
d->sasl->putStep(a);
}
@@ -1230,8 +1230,8 @@ void ClientStream::srvProcessNext()
return;
}
case CoreProtocol::ESend: {
- QByteArray a = d->srv.takeOutgoingData();
- QCString cs(a.size()+1);
+ TQByteArray a = d->srv.takeOutgoingData();
+ TQCString cs(a.size()+1);
memcpy(cs.data(), a.data(), a.size());
printf("Need Send: {%s}\n", cs.data());
d->ss->write(a);
@@ -1241,7 +1241,7 @@ void ClientStream::srvProcessNext()
printf("Break (RecvOpen)\n");
// calculate key
- QCString str = QCA::SHA1::hashToString("secret").utf8();
+ TQCString str = QCA::SHA1::hashToString("secret").utf8();
str = QCA::SHA1::hashToString(str + "im.pyxa.org").utf8();
str = QCA::SHA1::hashToString(str + d->srv.id.utf8()).utf8();
d->srv.setDialbackKey(str);
@@ -1258,8 +1258,8 @@ void ClientStream::srvProcessNext()
}
case CoreProtocol::ESASLSuccess: {
printf("Break SASL Success\n");
- disconnect(d->sasl, SIGNAL(error(int)), this, SLOT(sasl_error(int)));
- QByteArray a = d->srv.spare;
+ disconnect(d->sasl, TQT_SIGNAL(error(int)), this, TQT_SLOT(sasl_error(int)));
+ TQByteArray a = d->srv.spare;
d->ss->setLayerSASL(d->sasl, a);
break;
}
@@ -1276,7 +1276,7 @@ void ClientStream::srvProcessNext()
void ClientStream::doReadyRead()
{
- //QGuardedPtr<QObject> self = this;
+ //TQGuardedPtr<TQObject> self = this;
readyRead();
//if(!self)
// return;
@@ -1290,7 +1290,7 @@ void ClientStream::processNext()
return;
}
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
while(1) {
#ifdef XMPP_DEBUG
@@ -1298,11 +1298,11 @@ void ClientStream::processNext()
#endif
bool ok = d->client.processStep();
// deal with send/received items
- for(QValueList<XmlProtocol::TransferItem>::ConstIterator it = d->client.transferItemList.begin(); it != d->client.transferItemList.end(); ++it) {
+ for(TQValueList<XmlProtocol::TransferItem>::ConstIterator it = d->client.transferItemList.begin(); it != d->client.transferItemList.end(); ++it) {
const XmlProtocol::TransferItem &i = *it;
if(i.isExternal)
continue;
- QString str;
+ TQString str;
if(i.isString) {
// skip whitespace pings
if(i.str.stripWhiteSpace().isEmpty())
@@ -1324,7 +1324,7 @@ void ClientStream::processNext()
//if(!d->in_rrsig && !d->in.isEmpty()) {
if(!d->in.isEmpty()) {
//d->in_rrsig = true;
- QTimer::singleShot(0, this, SLOT(doReadyRead()));
+ TQTimer::singleShot(0, this, TQT_SLOT(doReadyRead()));
}
if(cont)
@@ -1343,9 +1343,9 @@ void ClientStream::processNext()
return;
}
case CoreProtocol::ESend: {
- QByteArray a = d->client.takeOutgoingData();
+ TQByteArray a = d->client.takeOutgoingData();
#ifdef XMPP_DEBUG
- QCString cs(a.size()+1);
+ TQCString cs(a.size()+1);
memcpy(cs.data(), a.data(), a.size());
printf("Need Send: {%s}\n", cs.data());
#endif
@@ -1358,9 +1358,9 @@ void ClientStream::processNext()
#endif
#ifdef XMPP_TEST
- QString s = QString("handshake success (lang=[%1]").arg(d->client.lang);
+ TQString s = TQString("handshake success (lang=[%1]").arg(d->client.lang);
if(!d->client.from.isEmpty())
- s += QString(", from=[%1]").arg(d->client.from);
+ s += TQString(", from=[%1]").arg(d->client.from);
s += ')';
TD::msg(s);
#endif
@@ -1480,11 +1480,11 @@ bool ClientStream::handleNeed()
}
d->sasl = new QCA::SASL;
- connect(d->sasl, SIGNAL(clientFirstStep(const QString &, const QByteArray *)), SLOT(sasl_clientFirstStep(const QString &, const QByteArray *)));
- connect(d->sasl, SIGNAL(nextStep(const QByteArray &)), SLOT(sasl_nextStep(const QByteArray &)));
- connect(d->sasl, SIGNAL(needParams(bool, bool, bool, bool)), SLOT(sasl_needParams(bool, bool, bool, bool)));
- connect(d->sasl, SIGNAL(authenticated()), SLOT(sasl_authenticated()));
- connect(d->sasl, SIGNAL(error(int)), SLOT(sasl_error(int)));
+ connect(d->sasl, TQT_SIGNAL(clientFirstStep(const TQString &, const TQByteArray *)), TQT_SLOT(sasl_clientFirstStep(const TQString &, const TQByteArray *)));
+ connect(d->sasl, TQT_SIGNAL(nextStep(const TQByteArray &)), TQT_SLOT(sasl_nextStep(const TQByteArray &)));
+ connect(d->sasl, TQT_SIGNAL(needParams(bool, bool, bool, bool)), TQT_SLOT(sasl_needParams(bool, bool, bool, bool)));
+ connect(d->sasl, TQT_SIGNAL(authenticated()), TQT_SLOT(sasl_authenticated()));
+ connect(d->sasl, TQT_SIGNAL(error(int)), TQT_SLOT(sasl_error(int)));
if(d->haveLocalAddr)
d->sasl->setLocalAddr(d->localAddr, d->localPort);
@@ -1506,7 +1506,7 @@ bool ClientStream::handleNeed()
d->sasl->setMinimumSSF(d->minimumSSF);
d->sasl->setMaximumSSF(d->maximumSSF);
- QStringList ml;
+ TQStringList ml;
if(!d->sasl_mech.isEmpty())
ml += d->sasl_mech;
else
@@ -1525,16 +1525,16 @@ bool ClientStream::handleNeed()
#ifdef XMPP_DEBUG
printf("Need SASL Next Step\n");
#endif
- QByteArray a = d->client.saslStep();
+ TQByteArray a = d->client.saslStep();
d->sasl->putStep(a);
return false;
}
case CoreProtocol::NSASLLayer: {
// SecureStream will handle the errors from this point
- disconnect(d->sasl, SIGNAL(error(int)), this, SLOT(sasl_error(int)));
+ disconnect(d->sasl, TQT_SIGNAL(error(int)), this, TQT_SLOT(sasl_error(int)));
d->ss->setLayerSASL(d->sasl, d->client.spare);
if(d->sasl_ssf > 0) {
- QGuardedPtr<QObject> self = this;
+ TQGuardedPtr<TQObject> self = this;
securityLayerActivated(LayerSASL);
if(!self)
return false;
@@ -1580,7 +1580,7 @@ void ClientStream::doNoop()
}
}
-void ClientStream::writeDirect(const QString &s)
+void ClientStream::writeDirect(const TQString &s)
{
if(d->state == Active) {
#ifdef XMPP_DEBUG
@@ -1604,8 +1604,8 @@ void ClientStream::handleError()
}
else if(c == CoreProtocol::ErrStream) {
int x = d->client.errCond;
- QString text = d->client.errText;
- QDomElement appSpec = d->client.errAppSpec;
+ TQString text = d->client.errText;
+ TQDomElement appSpec = d->client.errAppSpec;
int connErr = -1;
int strErr = -1;
@@ -1730,31 +1730,31 @@ TD::~TD()
{
}
-void TD::msg(const QString &s)
+void TD::msg(const TQString &s)
{
if(debug_ptr)
debug_ptr->msg(s);
}
-void TD::outgoingTag(const QString &s)
+void TD::outgoingTag(const TQString &s)
{
if(debug_ptr)
debug_ptr->outgoingTag(s);
}
-void TD::incomingTag(const QString &s)
+void TD::incomingTag(const TQString &s)
{
if(debug_ptr)
debug_ptr->incomingTag(s);
}
-void TD::outgoingXml(const QDomElement &e)
+void TD::outgoingXml(const TQDomElement &e)
{
if(debug_ptr)
debug_ptr->outgoingXml(e);
}
-void TD::incomingXml(const QDomElement &e)
+void TD::incomingXml(const TQDomElement &e)
{
if(debug_ptr)
debug_ptr->incomingXml(e);
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/td.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/td.h
index b636e190..f4d560f4 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/td.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/td.h
@@ -1,7 +1,7 @@
#ifndef TESTDEBUG_H
#define TESTDEBUG_H
-#include<qdom.h>
+#include<tqdom.h>
class TD
{
@@ -9,11 +9,11 @@ public:
TD();
~TD();
- static void msg(const QString &);
- static void outgoingTag(const QString &);
- static void incomingTag(const QString &);
- static void outgoingXml(const QDomElement &);
- static void incomingXml(const QDomElement &);
+ static void msg(const TQString &);
+ static void outgoingTag(const TQString &);
+ static void incomingTag(const TQString &);
+ static void outgoingXml(const TQDomElement &);
+ static void incomingXml(const TQDomElement &);
};
#endif
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp
index 24d77598..313c6b6a 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/tlshandler.cpp
@@ -20,7 +20,7 @@
#include"xmpp.h"
-#include<qtimer.h>
+#include<tqtimer.h>
#include"qca.h"
using namespace XMPP;
@@ -28,8 +28,8 @@ using namespace XMPP;
//----------------------------------------------------------------------------
// TLSHandler
//----------------------------------------------------------------------------
-TLSHandler::TLSHandler(QObject *parent)
-:QObject(parent)
+TLSHandler::TLSHandler(TQObject *parent)
+:TQObject(parent)
{
}
@@ -53,11 +53,11 @@ QCATLSHandler::QCATLSHandler(QCA::TLS *parent)
{
d = new Private;
d->tls = parent;
- connect(d->tls, SIGNAL(handshaken()), SLOT(tls_handshaken()));
- connect(d->tls, SIGNAL(readyRead()), SLOT(tls_readyRead()));
- connect(d->tls, SIGNAL(readyReadOutgoing(int)), SLOT(tls_readyReadOutgoing(int)));
- connect(d->tls, SIGNAL(closed()), SLOT(tls_closed()));
- connect(d->tls, SIGNAL(error(int)), SLOT(tls_error(int)));
+ connect(d->tls, TQT_SIGNAL(handshaken()), TQT_SLOT(tls_handshaken()));
+ connect(d->tls, TQT_SIGNAL(readyRead()), TQT_SLOT(tls_readyRead()));
+ connect(d->tls, TQT_SIGNAL(readyReadOutgoing(int)), TQT_SLOT(tls_readyReadOutgoing(int)));
+ connect(d->tls, TQT_SIGNAL(closed()), TQT_SLOT(tls_closed()));
+ connect(d->tls, TQT_SIGNAL(error(int)), TQT_SLOT(tls_error(int)));
d->state = 0;
d->err = -1;
}
@@ -83,20 +83,20 @@ void QCATLSHandler::reset()
d->state = 0;
}
-void QCATLSHandler::startClient(const QString &host)
+void QCATLSHandler::startClient(const TQString &host)
{
d->state = 0;
d->err = -1;
if(!d->tls->startClient(host))
- QTimer::singleShot(0, this, SIGNAL(fail()));
+ TQTimer::singleShot(0, this, TQT_SIGNAL(fail()));
}
-void QCATLSHandler::write(const QByteArray &a)
+void QCATLSHandler::write(const TQByteArray &a)
{
d->tls->write(a);
}
-void QCATLSHandler::writeIncoming(const QByteArray &a)
+void QCATLSHandler::writeIncoming(const TQByteArray &a)
{
d->tls->writeIncoming(a);
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp
index 0ae15585..de321e7c 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.cpp
@@ -30,10 +30,10 @@ using namespace XMPP;
// display purposes only (the element is pretty much useless for processing
// after this). We do this because QXml is a bit overzealous about outputting
// redundant namespaces.
-static QDomElement stripExtraNS(const QDomElement &e)
+static TQDomElement stripExtraNS(const TQDomElement &e)
{
// find closest parent with a namespace
- QDomNode par = e.parentNode();
+ TQDomNode par = e.parentNode();
while(!par.isNull() && par.namespaceURI().isNull())
par = par.parentNode();
bool noShowNS = false;
@@ -41,13 +41,13 @@ static QDomElement stripExtraNS(const QDomElement &e)
noShowNS = true;
// build qName (prefix:localName)
- QString qName;
+ TQString qName;
if(!e.prefix().isEmpty())
qName = e.prefix() + ':' + e.localName();
else
qName = e.tagName();
- QDomElement i;
+ TQDomElement i;
uint x;
if(noShowNS)
i = e.ownerDocument().createElement(qName);
@@ -55,21 +55,21 @@ static QDomElement stripExtraNS(const QDomElement &e)
i = e.ownerDocument().createElementNS(e.namespaceURI(), qName);
// copy attributes
- QDomNamedNodeMap al = e.attributes();
+ TQDomNamedNodeMap al = e.attributes();
for(x = 0; x < al.count(); ++x) {
- QDomAttr a = al.item(x).cloneNode().toAttr();
+ TQDomAttr a = al.item(x).cloneNode().toAttr();
// don't show xml namespace
if(a.namespaceURI() == NS_XML)
- i.setAttribute(QString("xml:") + a.name(), a.value());
+ i.setAttribute(TQString("xml:") + a.name(), a.value());
else
i.setAttributeNodeNS(a);
}
// copy children
- QDomNodeList nl = e.childNodes();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x) {
- QDomNode n = nl.item(x);
+ TQDomNode n = nl.item(x);
if(n.isElement())
i.appendChild(stripExtraNS(n.toElement()));
else
@@ -80,20 +80,20 @@ static QDomElement stripExtraNS(const QDomElement &e)
// xmlToString
//
-// This function converts a QDomElement into a QString, using stripExtraNS
+// This function converts a TQDomElement into a TQString, using stripExtraNS
// to make it pretty.
-static QString xmlToString(const QDomElement &e, const QString &fakeNS, const QString &fakeQName, bool clip)
+static TQString xmlToString(const TQDomElement &e, const TQString &fakeNS, const TQString &fakeQName, bool clip)
{
- QDomElement i = e.cloneNode().toElement();
+ TQDomElement i = e.cloneNode().toElement();
// It seems QDom can only have one namespace attribute at a time (see docElement 'HACK').
// Fortunately we only need one kind depending on the input, so it is specified here.
- QDomElement fake = e.ownerDocument().createElementNS(fakeNS, fakeQName);
+ TQDomElement fake = e.ownerDocument().createElementNS(fakeNS, fakeQName);
fake.appendChild(i);
fake = stripExtraNS(fake);
- QString out;
+ TQString out;
{
- QTextStream ts(&out, IO_WriteOnly);
+ TQTextStream ts(&out, IO_WriteOnly);
fake.firstChild().save(ts, 0);
}
// 'clip' means to remove any unwanted (and unneeded) characters, such as a trailing newline
@@ -112,18 +112,18 @@ static QString xmlToString(const QDomElement &e, const QString &fakeNS, const QS
// text needed to open/close an XML stream, without resorting to generating
// the XML ourselves. This function uses QDom to do the generation, which
// ensures proper encoding and entity output.
-static void createRootXmlTags(const QDomElement &root, QString *xmlHeader, QString *tagOpen, QString *tagClose)
+static void createRootXmlTags(const TQDomElement &root, TQString *xmlHeader, TQString *tagOpen, TQString *tagClose)
{
- QDomElement e = root.cloneNode(false).toElement();
+ TQDomElement e = root.cloneNode(false).toElement();
// insert a dummy element to ensure open and closing tags are generated
- QDomElement dummy = e.ownerDocument().createElement("dummy");
+ TQDomElement dummy = e.ownerDocument().createElement("dummy");
e.appendChild(dummy);
// convert to xml->text
- QString str;
+ TQString str;
{
- QTextStream ts(&str, IO_WriteOnly);
+ TQTextStream ts(&str, IO_WriteOnly);
e.save(ts, 0);
}
@@ -148,7 +148,7 @@ XmlProtocol::TransferItem::TransferItem()
{
}
-XmlProtocol::TransferItem::TransferItem(const QString &_str, bool sent, bool external)
+XmlProtocol::TransferItem::TransferItem(const TQString &_str, bool sent, bool external)
{
isString = true;
isSent = sent;
@@ -156,7 +156,7 @@ XmlProtocol::TransferItem::TransferItem(const QString &_str, bool sent, bool ext
str = _str;
}
-XmlProtocol::TransferItem::TransferItem(const QDomElement &_elem, bool sent, bool external)
+XmlProtocol::TransferItem::TransferItem(const TQDomElement &_elem, bool sent, bool external)
{
isString = false;
isSent = sent;
@@ -184,30 +184,30 @@ void XmlProtocol::reset()
{
init();
- elem = QDomElement();
- tagOpen = QString();
- tagClose = QString();
+ elem = TQDomElement();
+ tagOpen = TQString();
+ tagClose = TQString();
xml.reset();
outData.resize(0);
trackQueue.clear();
transferItemList.clear();
}
-void XmlProtocol::addIncomingData(const QByteArray &a)
+void XmlProtocol::addIncomingData(const TQByteArray &a)
{
xml.appendData(a);
}
-QByteArray XmlProtocol::takeOutgoingData()
+TQByteArray XmlProtocol::takeOutgoingData()
{
- QByteArray a = outData.copy();
+ TQByteArray a = outData.copy();
outData.resize(0);
return a;
}
void XmlProtocol::outgoingDataWritten(int bytes)
{
- for(QValueList<TrackItem>::Iterator it = trackQueue.begin(); it != trackQueue.end();) {
+ for(TQValueList<TrackItem>::Iterator it = trackQueue.begin(); it != trackQueue.end();) {
TrackItem &i = *it;
// enough bytes?
@@ -302,21 +302,21 @@ bool XmlProtocol::processStep()
return baseStep(pe);
}
-QString XmlProtocol::xmlEncoding() const
+TQString XmlProtocol::xmlEncoding() const
{
return xml.encoding();
}
-QString XmlProtocol::elementToString(const QDomElement &e, bool clip)
+TQString XmlProtocol::elementToString(const TQDomElement &e, bool clip)
{
if(elem.isNull())
elem = elemDoc.importNode(docElement(), true).toElement();
// Determine the appropriate 'fakeNS' to use
- QString ns;
+ TQString ns;
// first, check root namespace
- QString pre = e.prefix();
+ TQString pre = e.prefix();
if(pre.isNull())
pre = "";
if(pre == elem.prefix()) {
@@ -324,11 +324,11 @@ QString XmlProtocol::elementToString(const QDomElement &e, bool clip)
}
else {
// scan the root attributes for 'xmlns' (oh joyous hacks)
- QDomNamedNodeMap al = elem.attributes();
+ TQDomNamedNodeMap al = elem.attributes();
uint n;
for(n = 0; n < al.count(); ++n) {
- QDomAttr a = al.item(n).toAttr();
- QString s = a.name();
+ TQDomAttr a = al.item(n).toAttr();
+ TQString s = a.name();
int x = s.find(':');
if(x != -1)
s = s.mid(x+1);
@@ -346,7 +346,7 @@ QString XmlProtocol::elementToString(const QDomElement &e, bool clip)
}
// build qName
- QString qn;
+ TQString qn;
if(!elem.prefix().isEmpty())
qn = elem.prefix() + ':';
qn += elem.localName();
@@ -366,22 +366,22 @@ void XmlProtocol::itemWritten(int, int)
// default does nothing
}
-void XmlProtocol::stringSend(const QString &)
+void XmlProtocol::stringSend(const TQString &)
{
// default does nothing
}
-void XmlProtocol::stringRecv(const QString &)
+void XmlProtocol::stringRecv(const TQString &)
{
// default does nothing
}
-void XmlProtocol::elementSend(const QDomElement &)
+void XmlProtocol::elementSend(const TQDomElement &)
{
// default does nothing
}
-void XmlProtocol::elementRecv(const QDomElement &)
+void XmlProtocol::elementRecv(const TQDomElement &)
{
// default does nothing
}
@@ -406,24 +406,24 @@ bool XmlProtocol::close()
return true;
}
-int XmlProtocol::writeString(const QString &s, int id, bool external)
+int XmlProtocol::writeString(const TQString &s, int id, bool external)
{
transferItemList += TransferItem(s, true, external);
return internalWriteString(s, TrackItem::Custom, id);
}
-int XmlProtocol::writeElement(const QDomElement &e, int id, bool external, bool clip)
+int XmlProtocol::writeElement(const TQDomElement &e, int id, bool external, bool clip)
{
if(e.isNull())
return 0;
transferItemList += TransferItem(e, true, external);
//elementSend(e);
- QString out = elementToString(e, clip);
+ TQString out = elementToString(e, clip);
return internalWriteString(out, TrackItem::Custom, id);
}
-QByteArray XmlProtocol::resetStream()
+TQByteArray XmlProtocol::resetStream()
{
// reset the state
if(incoming)
@@ -432,12 +432,12 @@ QByteArray XmlProtocol::resetStream()
state = SendOpen;
// grab unprocessed data before resetting
- QByteArray spare = xml.unprocessed();
+ TQByteArray spare = xml.unprocessed();
xml.reset();
return spare;
}
-int XmlProtocol::internalWriteData(const QByteArray &a, TrackItem::Type t, int id)
+int XmlProtocol::internalWriteData(const TQByteArray &a, TrackItem::Type t, int id)
{
TrackItem i;
i.type = t;
@@ -449,10 +449,10 @@ int XmlProtocol::internalWriteData(const QByteArray &a, TrackItem::Type t, int i
return a.size();
}
-int XmlProtocol::internalWriteString(const QString &s, TrackItem::Type t, int id)
+int XmlProtocol::internalWriteString(const TQString &s, TrackItem::Type t, int id)
{
- QCString cs = s.utf8();
- QByteArray a(cs.length());
+ TQCString cs = s.utf8();
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return internalWriteData(a, t, id);
}
@@ -462,10 +462,10 @@ void XmlProtocol::sendTagOpen()
if(elem.isNull())
elem = elemDoc.importNode(docElement(), true).toElement();
- QString xmlHeader;
+ TQString xmlHeader;
createRootXmlTags(elem, &xmlHeader, &tagOpen, &tagClose);
- QString s;
+ TQString s;
s += xmlHeader + '\n';
s += tagOpen + '\n';
@@ -509,7 +509,7 @@ bool XmlProtocol::baseStep(const Parser::Event &pe)
return true;
}
else if(state == Open) {
- QDomElement e;
+ TQDomElement e;
if(pe.type() == Parser::Event::Element)
e = pe.element();
return doStep(e);
@@ -533,7 +533,7 @@ bool XmlProtocol::baseStep(const Parser::Event &pe)
void XmlProtocol::setIncomingAsExternal()
{
- for(QValueList<TransferItem>::Iterator it = transferItemList.begin(); it != transferItemList.end(); ++it) {
+ for(TQValueList<TransferItem>::Iterator it = transferItemList.begin(); it != transferItemList.end(); ++it) {
TransferItem &i = *it;
// look for elements received
if(!i.isString && !i.isSent)
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h
index 16ff8e01..e3da8a09 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/xmlprotocol.h
@@ -21,8 +21,8 @@
#ifndef XMLPROTOCOL_H
#define XMLPROTOCOL_H
-#include<qdom.h>
-#include<qvaluelist.h>
+#include<tqdom.h>
+#include<tqvaluelist.h>
#include"parser.h"
#define NS_XML "http://www.w3.org/XML/1998/namespace"
@@ -59,8 +59,8 @@ namespace XMPP
virtual void reset();
// byte I/O for the stream
- void addIncomingData(const QByteArray &);
- QByteArray takeOutgoingData();
+ void addIncomingData(const TQByteArray &);
+ TQByteArray takeOutgoingData();
void outgoingDataWritten(int);
// advance the state machine
@@ -70,47 +70,47 @@ namespace XMPP
int need, event, errorCode, notify;
inline bool isIncoming() const { return incoming; }
- QString xmlEncoding() const;
- QString elementToString(const QDomElement &e, bool clip=false);
+ TQString xmlEncoding() const;
+ TQString elementToString(const TQDomElement &e, bool clip=false);
class TransferItem
{
public:
TransferItem();
- TransferItem(const QString &str, bool sent, bool external=false);
- TransferItem(const QDomElement &elem, bool sent, bool external=false);
+ TransferItem(const TQString &str, bool sent, bool external=false);
+ TransferItem(const TQDomElement &elem, bool sent, bool external=false);
bool isSent; // else, received
bool isString; // else, is element
bool isExternal; // not owned by protocol
- QString str;
- QDomElement elem;
+ TQString str;
+ TQDomElement elem;
};
- QValueList<TransferItem> transferItemList;
+ TQValueList<TransferItem> transferItemList;
void setIncomingAsExternal();
protected:
- virtual QDomElement docElement()=0;
+ virtual TQDomElement docElement()=0;
virtual void handleDocOpen(const Parser::Event &pe)=0;
virtual bool handleError()=0;
virtual bool handleCloseFinished()=0;
virtual bool stepAdvancesParser() const=0;
virtual bool stepRequiresElement() const;
- virtual bool doStep(const QDomElement &e)=0;
+ virtual bool doStep(const TQDomElement &e)=0;
virtual void itemWritten(int id, int size);
// 'debug'
- virtual void stringSend(const QString &s);
- virtual void stringRecv(const QString &s);
- virtual void elementSend(const QDomElement &e);
- virtual void elementRecv(const QDomElement &e);
+ virtual void stringSend(const TQString &s);
+ virtual void stringRecv(const TQString &s);
+ virtual void elementSend(const TQDomElement &e);
+ virtual void elementRecv(const TQDomElement &e);
void startConnect();
void startAccept();
bool close();
- int writeString(const QString &s, int id, bool external);
- int writeElement(const QDomElement &e, int id, bool external, bool clip=false);
- QByteArray resetStream();
+ int writeString(const TQString &s, int id, bool external);
+ int writeElement(const TQDomElement &e, int id, bool external, bool clip=false);
+ TQByteArray resetStream();
private:
enum { SendOpen, RecvOpen, Open, Closing };
@@ -122,20 +122,20 @@ namespace XMPP
};
bool incoming;
- QDomDocument elemDoc;
- QDomElement elem;
- QString tagOpen, tagClose;
+ TQDomDocument elemDoc;
+ TQDomElement elem;
+ TQString tagOpen, tagClose;
int state;
bool peerClosed;
bool closeWritten;
Parser xml;
- QByteArray outData;
- QValueList<TrackItem> trackQueue;
+ TQByteArray outData;
+ TQValueList<TrackItem> trackQueue;
void init();
- int internalWriteData(const QByteArray &a, TrackItem::Type t, int id=-1);
- int internalWriteString(const QString &s, TrackItem::Type t, int id=-1);
+ int internalWriteData(const TQByteArray &a, TrackItem::Type t, int id=-1);
+ int internalWriteString(const TQString &s, TrackItem::Type t, int id=-1);
void sendTagOpen();
void sendTagClose();
bool baseStep(const Parser::Event &pe);
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp
index a5affaa0..c78875bc 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/client.cpp
@@ -36,7 +36,7 @@
//!
//! The entire Task system is heavily founded on Qt. All Tasks have a parent,
//! except for the root Task, and are considered QObjects. By using Qt's RTTI
-//! facilities (QObject::sender(), QObject::isA(), etc), you can use a
+//! facilities (TQObject::sender(), TQObject::isA(), etc), you can use a
//! "fire and forget" approach with Tasks.
//!
//! \code
@@ -50,8 +50,8 @@
//! Session::Session()
//! {
//! client = new Client;
-//! connect(client, SIGNAL(handshaken()), SLOT(clientHandshaken()));
-//! connect(client, SIGNAL(authFinished(bool, int, const QString &)), SLOT(authFinished(bool, int, const QString &)));
+//! connect(client, TQT_SIGNAL(handshaken()), TQT_SLOT(clientHandshaken()));
+//! connect(client, TQT_SIGNAL(authFinished(bool, int, const TQString &)), TQT_SLOT(authFinished(bool, int, const TQString &)));
//! client->connectToHost("jabber.org");
//! }
//!
@@ -60,7 +60,7 @@
//! client->authDigest("jabtest", "12345", "Psi");
//! }
//!
-//! void Session::authFinished(bool success, int, const QString &err)
+//! void Session::authFinished(bool success, int, const TQString &err)
//! {
//! if(success)
//! printf("Login success!");
@@ -70,10 +70,10 @@
//! \endcode
#include<stdarg.h>
-#include<qmap.h>
-#include<qobjectlist.h>
-#include<qtimer.h>
-#include<qguardedptr.h>
+#include<tqmap.h>
+#include<tqobjectlist.h>
+#include<tqtimer.h>
+#include<tqguardedptr.h>
#include"xmpp_tasks.h"
#include"xmpp_xmlcommon.h"
#include"s5b.h"
@@ -83,10 +83,10 @@
/*#include<stdio.h>
#include<stdarg.h>
-#include<qstring.h>
-#include<qdom.h>
-#include<qobjectlist.h>
-#include<qtimer.h>
+#include<tqstring.h>
+#include<tqdom.h>
+#include<tqobjectlist.h>
+#include<tqtimer.h>
#include"xmpp_stream.h"
#include"xmpp_tasks.h"
#include"xmpp_xmlcommon.h"
@@ -122,13 +122,13 @@ public:
ClientPrivate() {}
ClientStream *stream;
- QDomDocument doc;
+ TQDomDocument doc;
int id_seed;
Task *root;
- QString host, user, pass, resource;
- QString osname, tzname, clientName, clientVersion, capsNode, capsVersion, capsExt;
+ TQString host, user, pass, resource;
+ TQString osname, tzname, clientName, clientVersion, capsNode, capsVersion, capsExt;
DiscoItem::Identity identity;
- QMap<QString,Features> extension_features;
+ TQMap<TQString,Features> extension_features;
int tzoffset;
bool active;
@@ -139,12 +139,12 @@ public:
JidLinkManager *jlman;
FileTransferManager *ftman;
bool ftEnabled;
- QValueList<GroupChat> groupChatList;
+ TQValueList<GroupChat> groupChatList;
};
-Client::Client(QObject *par)
-:QObject(par)
+Client::Client(TQObject *par)
+:TQObject(par)
{
d = new ClientPrivate;
d->tzoffset = 0;
@@ -162,10 +162,10 @@ Client::Client(QObject *par)
d->stream = 0;
d->s5bman = new S5BManager(this);
- connect(d->s5bman, SIGNAL(incomingReady()), SLOT(s5b_incomingReady()));
+ connect(d->s5bman, TQT_SIGNAL(incomingReady()), TQT_SLOT(s5b_incomingReady()));
d->ibbman = new IBBManager(this);
- connect(d->ibbman, SIGNAL(incomingReady()), SLOT(ibb_incomingReady()));
+ connect(d->ibbman, TQT_SIGNAL(incomingReady()), TQT_SLOT(ibb_incomingReady()));
d->jlman = new JidLinkManager(this);
@@ -188,19 +188,19 @@ Client::~Client()
void Client::connectToServer(ClientStream *s, const Jid &j, bool auth)
{
d->stream = s;
- //connect(d->stream, SIGNAL(connected()), SLOT(streamConnected()));
- //connect(d->stream, SIGNAL(handshaken()), SLOT(streamHandshaken()));
- connect(d->stream, SIGNAL(error(int)), SLOT(streamError(int)));
- //connect(d->stream, SIGNAL(sslCertificateReady(const QSSLCert &)), SLOT(streamSSLCertificateReady(const QSSLCert &)));
- connect(d->stream, SIGNAL(readyRead()), SLOT(streamReadyRead()));
- //connect(d->stream, SIGNAL(closeFinished()), SLOT(streamCloseFinished()));
- connect(d->stream, SIGNAL(incomingXml(const QString &)), SLOT(streamIncomingXml(const QString &)));
- connect(d->stream, SIGNAL(outgoingXml(const QString &)), SLOT(streamOutgoingXml(const QString &)));
+ //connect(d->stream, TQT_SIGNAL(connected()), TQT_SLOT(streamConnected()));
+ //connect(d->stream, TQT_SIGNAL(handshaken()), TQT_SLOT(streamHandshaken()));
+ connect(d->stream, TQT_SIGNAL(error(int)), TQT_SLOT(streamError(int)));
+ //connect(d->stream, TQT_SIGNAL(sslCertificateReady(const QSSLCert &)), TQT_SLOT(streamSSLCertificateReady(const QSSLCert &)));
+ connect(d->stream, TQT_SIGNAL(readyRead()), TQT_SLOT(streamReadyRead()));
+ //connect(d->stream, TQT_SIGNAL(closeFinished()), TQT_SLOT(streamCloseFinished()));
+ connect(d->stream, TQT_SIGNAL(incomingXml(const TQString &)), TQT_SLOT(streamIncomingXml(const TQString &)));
+ connect(d->stream, TQT_SIGNAL(outgoingXml(const TQString &)), TQT_SLOT(streamOutgoingXml(const TQString &)));
d->stream->connectToServer(j, auth);
}
-void Client::start(const QString &host, const QString &user, const QString &pass, const QString &_resource)
+void Client::start(const TQString &host, const TQString &user, const TQString &pass, const TQString &_resource)
{
// TODO
d->host = host;
@@ -213,14 +213,14 @@ void Client::start(const QString &host, const QString &user, const QString &pass
d->resourceList += Resource(resource(), stat);
JT_PushPresence *pp = new JT_PushPresence(rootTask());
- connect(pp, SIGNAL(subscription(const Jid &, const QString &)), SLOT(ppSubscription(const Jid &, const QString &)));
- connect(pp, SIGNAL(presence(const Jid &, const Status &)), SLOT(ppPresence(const Jid &, const Status &)));
+ connect(pp, TQT_SIGNAL(subscription(const Jid &, const TQString &)), TQT_SLOT(ppSubscription(const Jid &, const TQString &)));
+ connect(pp, TQT_SIGNAL(presence(const Jid &, const Status &)), TQT_SLOT(ppPresence(const Jid &, const Status &)));
JT_PushMessage *pm = new JT_PushMessage(rootTask());
- connect(pm, SIGNAL(message(const Message &)), SLOT(pmMessage(const Message &)));
+ connect(pm, TQT_SIGNAL(message(const Message &)), TQT_SLOT(pmMessage(const Message &)));
JT_PushRoster *pr = new JT_PushRoster(rootTask());
- connect(pr, SIGNAL(roster(const Roster &)), SLOT(prRoster(const Roster &)));
+ connect(pr, TQT_SIGNAL(roster(const Roster &)), TQT_SLOT(prRoster(const Roster &)));
new JT_ServInfo(rootTask());
@@ -266,10 +266,10 @@ bool Client::isActive() const
return d->active;
}
-void Client::groupChatChangeNick(const QString &host, const QString &room, const QString &nick, const Status &_s)
+void Client::groupChatChangeNick(const TQString &host, const TQString &room, const TQString &nick, const Status &_s)
{
Jid jid(room + "@" + host + "/" + nick);
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
GroupChat &i = *it;
if(i.j.compare(jid, false)) {
i.j = jid;
@@ -286,10 +286,10 @@ void Client::groupChatChangeNick(const QString &host, const QString &room, const
}
}
-bool Client::groupChatJoin(const QString &host, const QString &room, const QString &nick)
+bool Client::groupChatJoin(const TQString &host, const TQString &room, const TQString &nick)
{
Jid jid(room + "@" + host + "/" + nick);
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end();) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end();) {
GroupChat &i = *it;
if(i.j.compare(jid, false)) {
// if this room is shutting down, then free it up
@@ -302,7 +302,7 @@ bool Client::groupChatJoin(const QString &host, const QString &room, const QStri
++it;
}
- debug(QString("Client: Joined: [%1]\n").arg(jid.full()));
+ debug(TQString("Client: Joined: [%1]\n").arg(jid.full()));
GroupChat i;
i.j = jid;
i.status = GroupChat::Connecting;
@@ -315,10 +315,10 @@ bool Client::groupChatJoin(const QString &host, const QString &room, const QStri
return true;
}
-bool Client::groupChatJoin(const QString &host, const QString &room, const QString &nick, const QString &password)
+bool Client::groupChatJoin(const TQString &host, const TQString &room, const TQString &nick, const TQString &password)
{
Jid jid(room + "@" + host + "/" + nick);
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end();) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end();) {
GroupChat &i = *it;
if(i.j.compare(jid, false)) {
// if this room is shutting down, then free it up
@@ -331,7 +331,7 @@ bool Client::groupChatJoin(const QString &host, const QString &room, const QStri
++it;
}
- debug(QString("Client: Joined: [%1]\n").arg(jid.full()));
+ debug(TQString("Client: Joined: [%1]\n").arg(jid.full()));
GroupChat i;
i.j = jid;
i.status = GroupChat::Connecting;
@@ -344,11 +344,11 @@ bool Client::groupChatJoin(const QString &host, const QString &room, const QStri
return true;
}
-void Client::groupChatSetStatus(const QString &host, const QString &room, const Status &_s)
+void Client::groupChatSetStatus(const TQString &host, const TQString &room, const Status &_s)
{
Jid jid(room + "@" + host);
bool found = false;
- for(QValueList<GroupChat>::ConstIterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
+ for(TQValueList<GroupChat>::ConstIterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
const GroupChat &i = *it;
if(i.j.compare(jid, false)) {
found = true;
@@ -367,17 +367,17 @@ void Client::groupChatSetStatus(const QString &host, const QString &room, const
j->go(true);
}
-void Client::groupChatLeave(const QString &host, const QString &room)
+void Client::groupChatLeave(const TQString &host, const TQString &room)
{
Jid jid(room + "@" + host);
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
GroupChat &i = *it;
if(!i.j.compare(jid, false))
continue;
i.status = GroupChat::Closing;
- debug(QString("Client: Leaving: [%1]\n").arg(i.j.full()));
+ debug(TQString("Client: Leaving: [%1]\n").arg(i.j.full()));
JT_Presence *j = new JT_Presence(rootTask());
Status s;
@@ -404,7 +404,7 @@ void Client::close(bool)
{
if(d->stream) {
if(d->active) {
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
GroupChat &i = *it;
i.status = GroupChat::Closing;
@@ -467,17 +467,17 @@ void Client::streamCloseFinished()
closeFinished();
}*/
-static QDomElement oldStyleNS(const QDomElement &e)
+static TQDomElement oldStyleNS(const TQDomElement &e)
{
// find closest parent with a namespace
- QDomNode par = e.parentNode();
+ TQDomNode par = e.parentNode();
while(!par.isNull() && par.namespaceURI().isNull())
par = par.parentNode();
bool noShowNS = false;
if(!par.isNull() && par.namespaceURI() == e.namespaceURI())
noShowNS = true;
- QDomElement i;
+ TQDomElement i;
uint x;
//if(noShowNS)
i = e.ownerDocument().createElement(e.tagName());
@@ -485,7 +485,7 @@ static QDomElement oldStyleNS(const QDomElement &e)
// i = e.ownerDocument().createElementNS(e.namespaceURI(), e.tagName());
// copy attributes
- QDomNamedNodeMap al = e.attributes();
+ TQDomNamedNodeMap al = e.attributes();
for(x = 0; x < al.count(); ++x)
i.setAttributeNode(al.item(x).cloneNode().toAttr());
@@ -493,9 +493,9 @@ static QDomElement oldStyleNS(const QDomElement &e)
i.setAttribute("xmlns", e.namespaceURI());
// copy children
- QDomNodeList nl = e.childNodes();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x) {
- QDomNode n = nl.item(x);
+ TQDomNode n = nl.item(x);
if(n.isElement())
i.appendChild(oldStyleNS(n.toElement()));
else
@@ -507,44 +507,44 @@ static QDomElement oldStyleNS(const QDomElement &e)
void Client::streamReadyRead()
{
// HACK HACK HACK
- QGuardedPtr<ClientStream> pstream = d->stream;
+ TQGuardedPtr<ClientStream> pstream = d->stream;
while(pstream && d->stream->stanzaAvailable()) {
Stanza s = d->stream->read();
- QString out = s.toString();
- debug(QString("Client: incoming: [\n%1]\n").arg(out));
+ TQString out = s.toString();
+ debug(TQString("Client: incoming: [\n%1]\n").arg(out));
xmlIncoming(out);
- QDomElement x = oldStyleNS(s.element());
+ TQDomElement x = oldStyleNS(s.element());
distribute(x);
}
}
-void Client::streamIncomingXml(const QString &s)
+void Client::streamIncomingXml(const TQString &s)
{
- QString str = s;
+ TQString str = s;
if(str.at(str.length()-1) != '\n')
str += '\n';
xmlIncoming(str);
}
-void Client::streamOutgoingXml(const QString &s)
+void Client::streamOutgoingXml(const TQString &s)
{
- QString str = s;
+ TQString str = s;
if(str.at(str.length()-1) != '\n')
str += '\n';
xmlOutgoing(str);
}
-void Client::debug(const QString &str)
+void Client::debug(const TQString &str)
{
debugText(str);
}
-QString Client::genUniqueId()
+TQString Client::genUniqueId()
{
- QString s;
+ TQString s;
s.sprintf("a%x", d->id_seed);
d->id_seed += 0x10;
return s;
@@ -555,12 +555,12 @@ Task *Client::rootTask()
return d->root;
}
-QDomDocument *Client::doc() const
+TQDomDocument *Client::doc() const
{
return &d->doc;
}
-void Client::distribute(const QDomElement &x)
+void Client::distribute(const TQDomElement &x)
{
if(x.hasAttribute("from")) {
Jid j(x.attribute("from"));
@@ -575,41 +575,41 @@ void Client::distribute(const QDomElement &x)
}
}
-static QDomElement addCorrectNS(const QDomElement &e)
+static TQDomElement addCorrectNS(const TQDomElement &e)
{
uint x;
// grab child nodes
- /*QDomDocumentFragment frag = e.ownerDocument().createDocumentFragment();
- QDomNodeList nl = e.childNodes();
+ /*TQDomDocumentFragment frag = e.ownerDocument().createDocumentFragment();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x)
frag.appendChild(nl.item(x).cloneNode());*/
// find closest xmlns
- QDomNode n = e;
+ TQDomNode n = e;
while(!n.isNull() && !n.toElement().hasAttribute("xmlns"))
n = n.parentNode();
- QString ns;
+ TQString ns;
if(n.isNull() || !n.toElement().hasAttribute("xmlns"))
ns = "jabber:client";
else
ns = n.toElement().attribute("xmlns");
// make a new node
- QDomElement i = e.ownerDocument().createElementNS(ns, e.tagName());
+ TQDomElement i = e.ownerDocument().createElementNS(ns, e.tagName());
// copy attributes
- QDomNamedNodeMap al = e.attributes();
+ TQDomNamedNodeMap al = e.attributes();
for(x = 0; x < al.count(); ++x) {
- QDomAttr a = al.item(x).toAttr();
+ TQDomAttr a = al.item(x).toAttr();
if(a.name() != "xmlns")
i.setAttributeNodeNS(a.cloneNode().toAttr());
}
// copy children
- QDomNodeList nl = e.childNodes();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x) {
- QDomNode n = nl.item(x);
+ TQDomNode n = nl.item(x);
if(n.isElement())
i.appendChild(addCorrectNS(n.toElement()));
else
@@ -620,40 +620,40 @@ static QDomElement addCorrectNS(const QDomElement &e)
return i;
}
-void Client::send(const QDomElement &x)
+void Client::send(const TQDomElement &x)
{
if(!d->stream)
return;
- //QString out;
- //QTextStream ts(&out, IO_WriteOnly);
+ //TQString out;
+ //TQTextStream ts(&out, IO_WriteOnly);
//x.save(ts, 0);
- //QString out = Stream::xmlToString(x);
- //debug(QString("Client: outgoing: [\n%1]\n").arg(out));
+ //TQString out = Stream::xmlToString(x);
+ //debug(TQString("Client: outgoing: [\n%1]\n").arg(out));
//xmlOutgoing(out);
- QDomElement e = addCorrectNS(x);
+ TQDomElement e = addCorrectNS(x);
Stanza s = d->stream->createStanza(e);
if(s.isNull()) {
//printf("bad stanza??\n");
return;
}
- QString out = s.toString();
- debug(QString("Client: outgoing: [\n%1]\n").arg(out));
+ TQString out = s.toString();
+ debug(TQString("Client: outgoing: [\n%1]\n").arg(out));
xmlOutgoing(out);
//printf("x[%s] x2[%s] s[%s]\n", Stream::xmlToString(x).latin1(), Stream::xmlToString(e).latin1(), s.toString().latin1());
d->stream->write(s);
}
-void Client::send(const QString &str)
+void Client::send(const TQString &str)
{
if(!d->stream)
return;
- debug(QString("Client: outgoing: [\n%1]\n").arg(str));
+ debug(TQString("Client: outgoing: [\n%1]\n").arg(str));
xmlOutgoing(str);
static_cast<ClientStream*>(d->stream)->writeDirect(str);
}
@@ -673,29 +673,29 @@ const ResourceList & Client::resourceList() const
return d->resourceList;
}
-QString Client::host() const
+TQString Client::host() const
{
return d->host;
}
-QString Client::user() const
+TQString Client::user() const
{
return d->user;
}
-QString Client::pass() const
+TQString Client::pass() const
{
return d->pass;
}
-QString Client::resource() const
+TQString Client::resource() const
{
return d->resource;
}
Jid Client::jid() const
{
- QString s;
+ TQString s;
if(!d->user.isEmpty())
s += d->user + '@';
s += d->host;
@@ -707,7 +707,7 @@ Jid Client::jid() const
return Jid(s);
}
-void Client::ppSubscription(const Jid &j, const QString &s)
+void Client::ppSubscription(const Jid &j, const TQString &s)
{
subscription(j, s);
}
@@ -715,17 +715,17 @@ void Client::ppSubscription(const Jid &j, const QString &s)
void Client::ppPresence(const Jid &j, const Status &s)
{
if(s.isAvailable())
- debug(QString("Client: %1 is available.\n").arg(j.full()));
+ debug(TQString("Client: %1 is available.\n").arg(j.full()));
else
- debug(QString("Client: %1 is unavailable.\n").arg(j.full()));
+ debug(TQString("Client: %1 is unavailable.\n").arg(j.full()));
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
GroupChat &i = *it;
if(i.j.compare(j, false)) {
bool us = (i.j.resource() == j.resource() || j.resource().isEmpty()) ? true: false;
- debug(QString("for groupchat i=[%1] pres=[%2], [us=%3].\n").arg(i.j.full()).arg(j.full()).arg(us));
+ debug(TQString("for groupchat i=[%1] pres=[%2], [us=%3].\n").arg(i.j.full()).arg(j.full()).arg(us));
switch(i.status) {
case GroupChat::Connecting:
if(us && s.hasError()) {
@@ -796,7 +796,7 @@ void Client::updateSelfPresence(const Jid &j, const Status &s)
// unavailable? remove the resource
if(!s.isAvailable()) {
if(found) {
- debug(QString("Client: Removing self resource: name=[%1]\n").arg(j.resource()));
+ debug(TQString("Client: Removing self resource: name=[%1]\n").arg(j.resource()));
(*rit).setStatus(s);
resourceUnavailable(j, *rit);
d->resourceList.remove(rit);
@@ -808,12 +808,12 @@ void Client::updateSelfPresence(const Jid &j, const Status &s)
if(!found) {
r = Resource(j.resource(), s);
d->resourceList += r;
- debug(QString("Client: Adding self resource: name=[%1]\n").arg(j.resource()));
+ debug(TQString("Client: Adding self resource: name=[%1]\n").arg(j.resource()));
}
else {
(*rit).setStatus(s);
r = *rit;
- debug(QString("Client: Updating self resource: name=[%1]\n").arg(j.resource()));
+ debug(TQString("Client: Updating self resource: name=[%1]\n").arg(j.resource()));
}
resourceAvailable(j, r);
@@ -829,7 +829,7 @@ void Client::updatePresence(LiveRosterItem *i, const Jid &j, const Status &s)
if(!s.isAvailable()) {
if(found) {
(*rit).setStatus(s);
- debug(QString("Client: Removing resource from [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource()));
+ debug(TQString("Client: Removing resource from [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource()));
resourceUnavailable(j, *rit);
i->resourceList().remove(rit);
i->setLastUnavailableStatus(s);
@@ -841,12 +841,12 @@ void Client::updatePresence(LiveRosterItem *i, const Jid &j, const Status &s)
if(!found) {
r = Resource(j.resource(), s);
i->resourceList() += r;
- debug(QString("Client: Adding resource to [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource()));
+ debug(TQString("Client: Adding resource to [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource()));
}
else {
(*rit).setStatus(s);
r = *rit;
- debug(QString("Client: Updating resource to [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource()));
+ debug(TQString("Client: Updating resource to [%1]: name=[%2]\n").arg(i->jid().full()).arg(j.resource()));
}
resourceAvailable(j, r);
@@ -855,10 +855,10 @@ void Client::updatePresence(LiveRosterItem *i, const Jid &j, const Status &s)
void Client::pmMessage(const Message &m)
{
- debug(QString("Client: Message from %1\n").arg(m.from().full()));
+ debug(TQString("Client: Message from %1\n").arg(m.from().full()));
if(m.type() == "groupchat") {
- for(QValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
+ for(TQValueList<GroupChat>::Iterator it = d->groupChatList.begin(); it != d->groupChatList.end(); it++) {
const GroupChat &i = *it;
if(!i.j.compare(m.from(), false))
@@ -883,7 +883,7 @@ void Client::rosterRequest()
return;
JT_Roster *r = new JT_Roster(rootTask());
- connect(r, SIGNAL(finished()), SLOT(slotRosterRequestFinished()));
+ connect(r, TQT_SIGNAL(finished()), TQT_SLOT(slotRosterRequestFinished()));
r->get();
d->roster.flagAllForDelete(); // mod_groups patch
r->go(true);
@@ -927,7 +927,7 @@ void Client::importRoster(const Roster &r)
void Client::importRosterItem(const RosterItem &item)
{
- QString substr;
+ TQString substr;
switch(item.subscription().type()) {
case Subscription::Both:
substr = "<-->"; break;
@@ -942,10 +942,10 @@ void Client::importRosterItem(const RosterItem &item)
substr = "----"; break;
}
- QString dstr, str;
+ TQString dstr, str;
str.sprintf(" %s %-32s", substr.latin1(), item.jid().full().latin1());
if(!item.name().isEmpty())
- str += QString(" [") + item.name() + "]";
+ str += TQString(" [") + item.name() + "]";
str += '\n';
// Remove
@@ -986,7 +986,7 @@ void Client::sendMessage(const Message &m)
j->go(true);
}
-void Client::sendSubscription(const Jid &jid, const QString &type)
+void Client::sendSubscription(const Jid &jid, const TQString &type)
{
JT_Presence *j = new JT_Presence(rootTask());
j->sub(jid, type);
@@ -1006,12 +1006,12 @@ void Client::setPresence(const Status &s)
//r.setStatus(s);
}
-QString Client::OSName() const
+TQString Client::OSName() const
{
return d->osname;
}
-QString Client::timeZone() const
+TQString Client::timeZone() const
{
return d->tzname;
}
@@ -1021,58 +1021,58 @@ int Client::timeZoneOffset() const
return d->tzoffset;
}
-QString Client::clientName() const
+TQString Client::clientName() const
{
return d->clientName;
}
-QString Client::clientVersion() const
+TQString Client::clientVersion() const
{
return d->clientVersion;
}
-QString Client::capsNode() const
+TQString Client::capsNode() const
{
return d->capsNode;
}
-QString Client::capsVersion() const
+TQString Client::capsVersion() const
{
return d->capsVersion;
}
-QString Client::capsExt() const
+TQString Client::capsExt() const
{
return d->capsExt;
}
-void Client::setOSName(const QString &name)
+void Client::setOSName(const TQString &name)
{
d->osname = name;
}
-void Client::setTimeZone(const QString &name, int offset)
+void Client::setTimeZone(const TQString &name, int offset)
{
d->tzname = name;
d->tzoffset = offset;
}
-void Client::setClientName(const QString &s)
+void Client::setClientName(const TQString &s)
{
d->clientName = s;
}
-void Client::setClientVersion(const QString &s)
+void Client::setClientVersion(const TQString &s)
{
d->clientVersion = s;
}
-void Client::setCapsNode(const QString &s)
+void Client::setCapsNode(const TQString &s)
{
d->capsNode = s;
}
-void Client::setCapsVersion(const QString &s)
+void Client::setCapsVersion(const TQString &s)
{
d->capsVersion = s;
}
@@ -1087,7 +1087,7 @@ void Client::setIdentity(DiscoItem::Identity identity)
d->identity = identity;
}
-void Client::addExtension(const QString& ext, const Features& features)
+void Client::addExtension(const TQString& ext, const Features& features)
{
if (!ext.isEmpty()) {
d->extension_features[ext] = features;
@@ -1095,7 +1095,7 @@ void Client::addExtension(const QString& ext, const Features& features)
}
}
-void Client::removeExtension(const QString& ext)
+void Client::removeExtension(const TQString& ext)
{
if (d->extension_features.contains(ext)) {
d->extension_features.remove(ext);
@@ -1103,12 +1103,12 @@ void Client::removeExtension(const QString& ext)
}
}
-QStringList Client::extensions() const
+TQStringList Client::extensions() const
{
return d->extension_features.keys();
}
-const Features& Client::extension(const QString& ext) const
+const Features& Client::extension(const TQString& ext) const
{
return d->extension_features[ext];
}
@@ -1146,32 +1146,32 @@ class Task::TaskPrivate
public:
TaskPrivate() {}
- QString id;
+ TQString id;
bool success;
int statusCode;
- QString statusString;
+ TQString statusString;
Client *client;
bool insig, deleteme, autoDelete;
bool done;
};
Task::Task(Task *parent)
-:QObject(parent)
+:TQObject(parent)
{
init();
d->client = parent->client();
d->id = client()->genUniqueId();
- connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected()));
+ connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected()));
}
Task::Task(Client *parent, bool)
-:QObject(0)
+:TQObject(0)
{
init();
d->client = parent;
- connect(d->client, SIGNAL(disconnected()), SLOT(clientDisconnected()));
+ connect(d->client, TQT_SIGNAL(disconnected()), TQT_SLOT(clientDisconnected()));
}
Task::~Task()
@@ -1191,7 +1191,7 @@ void Task::init()
Task *Task::parent() const
{
- return (Task *)QObject::parent();
+ return (Task *)TQObject::parent();
}
Client *Task::client() const
@@ -1199,12 +1199,12 @@ Client *Task::client() const
return d->client;
}
-QDomDocument *Task::doc() const
+TQDomDocument *Task::doc() const
{
return client()->doc();
}
-QString Task::id() const
+TQString Task::id() const
{
return d->id;
}
@@ -1219,7 +1219,7 @@ int Task::statusCode() const
return d->statusCode;
}
-const QString & Task::statusString() const
+const TQString & Task::statusString() const
{
return d->statusString;
}
@@ -1231,17 +1231,17 @@ void Task::go(bool autoDelete)
onGo();
}
-bool Task::take(const QDomElement &x)
+bool Task::take(const TQDomElement &x)
{
- const QObjectList *p = children();
+ const TQObjectList *p = children();
if(!p)
return false;
// pass along the xml
- QObjectListIt it(*p);
+ TQObjectListIt it(*p);
Task *t;
for(; it.current(); ++it) {
- QObject *obj = it.current();
+ TQObject *obj = it.current();
if(!obj->inherits("XMPP::Task"))
continue;
@@ -1275,16 +1275,16 @@ void Task::onDisconnect()
d->statusString = tr("Disconnected");
// delay this so that tasks that react don't block the shutdown
- QTimer::singleShot(0, this, SLOT(done()));
+ TQTimer::singleShot(0, this, TQT_SLOT(done()));
}
}
-void Task::send(const QDomElement &x)
+void Task::send(const TQDomElement &x)
{
client()->send(x);
}
-void Task::setSuccess(int code, const QString &str)
+void Task::setSuccess(int code, const TQString &str)
{
if(!d->done) {
d->success = true;
@@ -1294,7 +1294,7 @@ void Task::setSuccess(int code, const QString &str)
}
}
-void Task::setError(const QDomElement &e)
+void Task::setError(const TQDomElement &e)
{
if(!d->done) {
d->success = false;
@@ -1303,7 +1303,7 @@ void Task::setError(const QDomElement &e)
}
}
-void Task::setError(int code, const QString &str)
+void Task::setError(int code, const TQString &str)
{
if(!d->done) {
d->success = false;
@@ -1338,7 +1338,7 @@ void Task::clientDisconnected()
void Task::debug(const char *fmt, ...)
{
char *buf;
- QString str;
+ TQString str;
int size = 1024;
int r;
@@ -1350,7 +1350,7 @@ void Task::debug(const char *fmt, ...)
va_end(ap);
if(r != -1)
- str = QString(buf);
+ str = TQString(buf);
delete [] buf;
@@ -1360,12 +1360,12 @@ void Task::debug(const char *fmt, ...)
debug(str);
}
-void Task::debug(const QString &str)
+void Task::debug(const TQString &str)
{
- client()->debug(QString("%1: ").arg(className()) + str);
+ client()->debug(TQString("%1: ").arg(className()) + str);
}
-bool Task::iqVerify(const QDomElement &x, const Jid &to, const QString &id, const QString &xmlns)
+bool Task::iqVerify(const TQDomElement &x, const Jid &to, const TQString &id, const TQString &xmlns)
{
if(x.tagName() != "iq")
return false;
@@ -1485,7 +1485,7 @@ void LiveRosterItem::setFlagForDelete(bool b)
// LiveRoster
//---------------------------------------------------------------------------
LiveRoster::LiveRoster()
-:QValueList<LiveRosterItem>()
+:TQValueList<LiveRosterItem>()
{
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp
index 512839c3..f2fcf7c9 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/types.cpp
@@ -20,25 +20,25 @@
#include"im.h"
#include "protocol.h"
-#include<qmap.h>
-#include<qapplication.h>
+#include<tqmap.h>
+#include<tqapplication.h>
#define NS_XML "http://www.w3.org/XML/1998/namespace"
-static QDomElement textTag(QDomDocument *doc, const QString &name, const QString &content)
+static TQDomElement textTag(TQDomDocument *doc, const TQString &name, const TQString &content)
{
- QDomElement tag = doc->createElement(name);
- QDomText text = doc->createTextNode(content);
+ TQDomElement tag = doc->createElement(name);
+ TQDomText text = doc->createTextNode(content);
tag.appendChild(text);
return tag;
}
-static QString tagContent(const QDomElement &e)
+static TQString tagContent(const TQDomElement &e)
{
// look for some tag content
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomText i = n.toText();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomText i = n.toText();
if(i.isNull())
continue;
return i.data();
@@ -47,10 +47,10 @@ static QString tagContent(const QDomElement &e)
return "";
}
-static QDateTime stamp2TS(const QString &ts)
+static TQDateTime stamp2TS(const TQString &ts)
{
if(ts.length() != 17)
- return QDateTime();
+ return TQDateTime();
int year = ts.mid(0,4).toInt();
int month = ts.mid(4,2).toInt();
@@ -60,22 +60,22 @@ static QDateTime stamp2TS(const QString &ts)
int min = ts.mid(12,2).toInt();
int sec = ts.mid(15,2).toInt();
- QDate xd;
+ TQDate xd;
xd.setYMD(year, month, day);
if(!xd.isValid())
- return QDateTime();
+ return TQDateTime();
- QTime xt;
+ TQTime xt;
xt.setHMS(hour, min, sec);
if(!xt.isValid())
- return QDateTime();
+ return TQDateTime();
- return QDateTime(xd, xt);
+ return TQDateTime(xd, xt);
}
-/*static QString TS2stamp(const QDateTime &d)
+/*static TQString TS2stamp(const TQDateTime &d)
{
- QString str;
+ TQString str;
str.sprintf("%04d%02d%02dT%02d:%02d:%02d",
d.date().year(),
@@ -97,17 +97,17 @@ namespace XMPP
class Url::Private
{
public:
- QString url;
- QString desc;
+ TQString url;
+ TQString desc;
};
//! \brief Construct Url object with a given URL and Description.
//!
//! This function will construct a Url object.
-//! \param QString - url (default: empty string)
-//! \param QString - description of url (default: empty string)
+//! \param TQString - url (default: empty string)
+//! \param TQString - description of url (default: empty string)
//! \sa setUrl() setDesc()
-Url::Url(const QString &url, const QString &desc)
+Url::Url(const TQString &url, const TQString &desc)
{
d = new Private;
d->url = url;
@@ -140,7 +140,7 @@ Url::~Url()
//! \brief Get url information.
//!
//! Returns url information.
-QString Url::url() const
+TQString Url::url() const
{
return d->url;
}
@@ -148,7 +148,7 @@ QString Url::url() const
//! \brief Get Description information.
//!
//! Returns desction of the URL.
-QString Url::desc() const
+TQString Url::desc() const
{
return d->desc;
}
@@ -157,7 +157,7 @@ QString Url::desc() const
//!
//! Set url information.
//! \param url - url string (eg: http://psi.affinix.com/)
-void Url::setUrl(const QString &url)
+void Url::setUrl(const TQString &url)
{
d->url = url;
}
@@ -166,7 +166,7 @@ void Url::setUrl(const QString &url)
//!
//! Set description of the url.
//! \param desc - description of url
-void Url::setDesc(const QString &desc)
+void Url::setDesc(const TQString &desc)
{
d->desc = desc;
}
@@ -178,19 +178,19 @@ class Message::Private
{
public:
Jid to, from;
- QString id, type, lang;
+ TQString id, type, lang;
StringMap subject, body, xHTMLBody;
- QString thread;
+ TQString thread;
Stanza::Error error;
// extensions
- QDateTime timeStamp;
+ TQDateTime timeStamp;
UrlList urlList;
- QValueList<MsgEvent> eventList;
- QString eventId;
- QString xencrypted, invite;
+ TQValueList<MsgEvent> eventList;
+ TQString eventId;
+ TQString xencrypted, invite;
bool spooled, wasEncrypted;
};
@@ -247,24 +247,24 @@ Jid Message::from() const
return d->from;
}
-QString Message::id() const
+TQString Message::id() const
{
return d->id;
}
//! \brief Return type information
-QString Message::type() const
+TQString Message::type() const
{
return d->type;
}
-QString Message::lang() const
+TQString Message::lang() const
{
return d->lang;
}
//! \brief Return subject information.
-QString Message::subject(const QString &lang) const
+TQString Message::subject(const TQString &lang) const
{
return d->subject[lang];
}
@@ -275,17 +275,17 @@ QString Message::subject(const QString &lang) const
//! it exists.
//! \param rich - Returns richtext if true and plain text if false. (default: false)
//! \note Richtext is in Qt's richtext format and not in xhtml.
-QString Message::body(const QString &lang) const
+TQString Message::body(const TQString &lang) const
{
return d->body[lang];
}
-QString Message::xHTMLBody(const QString &lang) const
+TQString Message::xHTMLBody(const TQString &lang) const
{
return d->xHTMLBody[lang];
}
-QString Message::thread() const
+TQString Message::thread() const
{
return d->thread;
}
@@ -310,7 +310,7 @@ void Message::setFrom(const Jid &j)
//d->flag = false;
}
-void Message::setId(const QString &s)
+void Message::setId(const TQString &s)
{
d->id = s;
}
@@ -318,13 +318,13 @@ void Message::setId(const QString &s)
//! \brief Set Type of message
//!
//! \param type - type of message your going to send
-void Message::setType(const QString &s)
+void Message::setType(const TQString &s)
{
d->type = s;
//d->flag = false;
}
-void Message::setLang(const QString &s)
+void Message::setLang(const TQString &s)
{
d->lang = s;
}
@@ -332,7 +332,7 @@ void Message::setLang(const QString &s)
//! \brief Set subject
//!
//! \param subject - Subject information
-void Message::setSubject(const QString &s, const QString &lang)
+void Message::setSubject(const TQString &s, const TQString &lang)
{
d->subject[lang] = s;
//d->flag = false;
@@ -343,20 +343,20 @@ void Message::setSubject(const QString &s, const QString &lang)
//! \param body - body information
//! \param rich - set richtext if true and set plaintext if false.
//! \note Richtext support will be implemented in the future... Sorry.
-void Message::setBody(const QString &s, const QString &lang)
+void Message::setBody(const TQString &s, const TQString &lang)
{
d->body[lang] = s;
}
-void Message::setXHTMLBody(const QString &s, const QString &lang, const QString &attr)
+void Message::setXHTMLBody(const TQString &s, const TQString &lang, const TQString &attr)
{
//ugly but needed if s is not a node but a list of leaf
- QString content = "<body xmlns='" + QString(NS_XHTML) + "' "+attr+" >\n" + s +"\n</body>";
+ TQString content = "<body xmlns='" + TQString(NS_XHTML) + "' "+attr+" >\n" + s +"\n</body>";
d->xHTMLBody[lang] = content;
}
-void Message::setThread(const QString &s)
+void Message::setThread(const TQString &s)
{
d->thread = s;
}
@@ -366,12 +366,12 @@ void Message::setError(const Stanza::Error &err)
d->error = err;
}
-QDateTime Message::timeStamp() const
+TQDateTime Message::timeStamp() const
{
return d->timeStamp;
}
-void Message::setTimeStamp(const QDateTime &ts)
+void Message::setTimeStamp(const TQDateTime &ts)
{
d->timeStamp = ts;
}
@@ -404,12 +404,12 @@ void Message::setUrlList(const UrlList &list)
d->urlList = list;
}
-QString Message::eventId() const
+TQString Message::eventId() const
{
return d->eventId;
}
-void Message::setEventId(const QString& id)
+void Message::setEventId(const TQString& id)
{
d->eventId = id;
}
@@ -433,22 +433,22 @@ void Message::addEvent(MsgEvent e)
}
}
-QString Message::xencrypted() const
+TQString Message::xencrypted() const
{
return d->xencrypted;
}
-void Message::setXEncrypted(const QString &s)
+void Message::setXEncrypted(const TQString &s)
{
d->xencrypted = s;
}
-QString Message::invite() const
+TQString Message::invite() const
{
return d->invite;
}
-void Message::setInvite(const QString &s)
+void Message::setInvite(const TQString &s)
{
d->invite = s;
}
@@ -485,29 +485,29 @@ Stanza Message::toStanza(Stream *stream) const
StringMap::ConstIterator it;
for(it = d->subject.begin(); it != d->subject.end(); ++it) {
- const QString &str = it.data();
+ const TQString &str = it.data();
if(!str.isEmpty()) {
- QDomElement e = s.createTextElement(s.baseNS(), "subject", str);
+ TQDomElement e = s.createTextElement(s.baseNS(), "subject", str);
if(!it.key().isEmpty())
e.setAttributeNS(NS_XML, "xml:lang", it.key());
s.appendChild(e);
}
}
for(it = d->body.begin(); it != d->body.end(); ++it) {
- const QString &str = it.data();
+ const TQString &str = it.data();
if(!str.isEmpty()) {
- QDomElement e = s.createTextElement(s.baseNS(), "body", str);
+ TQDomElement e = s.createTextElement(s.baseNS(), "body", str);
if(!it.key().isEmpty())
e.setAttributeNS(NS_XML, "xml:lang", it.key());
s.appendChild(e);
}
}
if ( !d->xHTMLBody.isEmpty()) {
- QDomElement parent = s.createElement(s.xhtmlImNS(), "html");
+ TQDomElement parent = s.createElement(s.xhtmlImNS(), "html");
for(it = d->xHTMLBody.begin(); it != d->xHTMLBody.end(); ++it) {
- const QString &str = it.data();
+ const TQString &str = it.data();
if(!str.isEmpty()) {
- QDomElement child = s.createXHTMLElement(str);
+ TQDomElement child = s.createXHTMLElement(str);
if(!it.key().isEmpty())
child.setAttributeNS(NS_XML, "xml:lang", it.key());
parent.appendChild(child);
@@ -520,14 +520,14 @@ Stanza Message::toStanza(Stream *stream) const
// timestamp
/*if(!d->timeStamp.isNull()) {
- QDomElement e = s.createElement("jabber:x:delay", "x");
+ TQDomElement e = s.createElement("jabber:x:delay", "x");
e.setAttribute("stamp", TS2stamp(d->timeStamp));
s.appendChild(e);
}*/
// urls
- for(QValueList<Url>::ConstIterator uit = d->urlList.begin(); uit != d->urlList.end(); ++uit) {
- QDomElement x = s.createElement("jabber:x:oob", "x");
+ for(TQValueList<Url>::ConstIterator uit = d->urlList.begin(); uit != d->urlList.end(); ++uit) {
+ TQDomElement x = s.createElement("jabber:x:oob", "x");
x.appendChild(s.createTextElement("jabber:x:oob", "url", (*uit).url()));
if(!(*uit).desc().isEmpty())
x.appendChild(s.createTextElement("jabber:x:oob", "desc", (*uit).desc()));
@@ -536,7 +536,7 @@ Stanza Message::toStanza(Stream *stream) const
// events
if (!d->eventList.isEmpty()) {
- QDomElement x = s.createElement("jabber:x:event", "x");
+ TQDomElement x = s.createElement("jabber:x:event", "x");
if (d->body.isEmpty()) {
if (d->eventId.isEmpty())
@@ -548,7 +548,7 @@ Stanza Message::toStanza(Stream *stream) const
s.appendChild( s.createElement(NS_CHATSTATES , "active" ) );
bool need_x_event=false;
- for(QValueList<MsgEvent>::ConstIterator ev = d->eventList.begin(); ev != d->eventList.end(); ++ev) {
+ for(TQValueList<MsgEvent>::ConstIterator ev = d->eventList.begin(); ev != d->eventList.end(); ++ev) {
switch (*ev) {
case OfflineEvent:
x.appendChild(s.createElement("jabber:x:event", "offline"));
@@ -594,7 +594,7 @@ Stanza Message::toStanza(Stream *stream) const
// invite
if(!d->invite.isEmpty()) {
- QDomElement e = s.createElement("jabber:x:conference", "x");
+ TQDomElement e = s.createElement("jabber:x:conference", "x");
e.setAttribute("jid", d->invite);
s.appendChild(e);
}
@@ -615,24 +615,24 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset)
d->subject.clear();
d->body.clear();
- d->thread = QString();
+ d->thread = TQString();
d->eventList.clear();
- QDomElement root = s.element();
+ TQDomElement root = s.element();
- QDomNodeList nl = root.childNodes();
+ TQDomNodeList nl = root.childNodes();
uint n;
for(n = 0; n < nl.count(); ++n) {
- QDomNode i = nl.item(n);
+ TQDomNode i = nl.item(n);
if(i.isElement()) {
- QDomElement e = i.toElement();
+ TQDomElement e = i.toElement();
if(e.namespaceURI() == s.baseNS()) {
if(e.tagName() == "subject") {
- QString lang = e.attributeNS(NS_XML, "lang", "");
+ TQString lang = e.attributeNS(NS_XML, "lang", "");
d->subject[lang] = e.text();
}
else if(e.tagName() == "body") {
- QString lang = e.attributeNS(NS_XML, "lang", "");
+ TQString lang = e.attributeNS(NS_XML, "lang", "");
d->body[lang] = e.text();
}
else if(e.tagName() == "thread")
@@ -640,13 +640,13 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset)
}
else if (e.namespaceURI() == s.xhtmlImNS()) {
if (e.tagName() == "html") {
- QDomNodeList htmlNL= e.childNodes();
+ TQDomNodeList htmlNL= e.childNodes();
for (unsigned int x = 0; x < htmlNL.count(); x++) {
- QDomElement i = htmlNL.item(x).toElement();
+ TQDomElement i = htmlNL.item(x).toElement();
if (i.tagName() == "body") {
- QDomDocument RichText;
- QString lang = i.attributeNS(NS_XML, "lang", "");
+ TQDomDocument RichText;
+ TQString lang = i.attributeNS(NS_XML, "lang", "");
RichText.appendChild(i);
d-> xHTMLBody[lang] = RichText.toString();
}
@@ -690,14 +690,14 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset)
d->error = s.error();
// timestamp
- QDomElement t = root.elementsByTagNameNS("jabber:x:delay", "x").item(0).toElement();
+ TQDomElement t = root.elementsByTagNameNS("jabber:x:delay", "x").item(0).toElement();
if(!t.isNull()) {
d->timeStamp = stamp2TS(t.attribute("stamp"));
d->timeStamp = d->timeStamp.addSecs(timeZoneOffset * 3600);
d->spooled = true;
}
else {
- d->timeStamp = QDateTime::currentDateTime();
+ d->timeStamp = TQDateTime::currentDateTime();
d->spooled = false;
}
@@ -705,7 +705,7 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset)
d->urlList.clear();
nl = root.elementsByTagNameNS("jabber:x:oob", "x");
for(n = 0; n < nl.count(); ++n) {
- QDomElement t = nl.item(n).toElement();
+ TQDomElement t = nl.item(n).toElement();
Url u;
u.setUrl(t.elementsByTagName("url").item(0).toElement().text());
u.setDesc(t.elementsByTagName("desc").item(0).toElement().text());
@@ -717,7 +717,7 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset)
if (nl.count()) {
nl = nl.item(0).childNodes();
for(n = 0; n < nl.count(); ++n) {
- QString evtag = nl.item(n).toElement().tagName();
+ TQString evtag = nl.item(n).toElement().tagName();
if (evtag == "id") {
d->eventId = nl.item(n).toElement().text();
}
@@ -739,14 +739,14 @@ bool Message::fromStanza(const Stanza &s, int timeZoneOffset)
if(!t.isNull())
d->xencrypted = t.text();
else
- d->xencrypted = QString();
+ d->xencrypted = TQString();
// invite
t = root.elementsByTagNameNS("jabber:x:conference", "x").item(0).toElement();
if(!t.isNull())
d->invite = t.attribute("jid");
else
- d->invite = QString();
+ d->invite = TQString();
return true;
}
@@ -764,7 +764,7 @@ int Subscription::type() const
return value;
}
-QString Subscription::toString() const
+TQString Subscription::toString() const
{
switch(value) {
case Remove:
@@ -781,7 +781,7 @@ QString Subscription::toString() const
}
}
-bool Subscription::fromString(const QString &s)
+bool Subscription::fromString(const TQString &s)
{
if(s == "remove")
value = Remove;
@@ -803,13 +803,13 @@ bool Subscription::fromString(const QString &s)
//---------------------------------------------------------------------------
// Status
//---------------------------------------------------------------------------
-Status::Status(const QString &show, const QString &status, int priority, bool available)
+Status::Status(const TQString &show, const TQString &status, int priority, bool available)
{
v_isAvailable = available;
v_show = show;
v_status = status;
v_priority = priority;
- v_timeStamp = QDateTime::currentDateTime();
+ v_timeStamp = TQDateTime::currentDateTime();
v_isInvisible = false;
ecode = -1;
}
@@ -823,7 +823,7 @@ bool Status::hasError() const
return (ecode != -1);
}
-void Status::setError(int code, const QString &str)
+void Status::setError(int code, const TQString &str)
{
ecode = code;
estr = str;
@@ -844,47 +844,47 @@ void Status::setPriority(int x)
v_priority = x;
}
-void Status::setShow(const QString & _show)
+void Status::setShow(const TQString & _show)
{
v_show = _show;
}
-void Status::setStatus(const QString & _status)
+void Status::setStatus(const TQString & _status)
{
v_status = _status;
}
-void Status::setTimeStamp(const QDateTime & _timestamp)
+void Status::setTimeStamp(const TQDateTime & _timestamp)
{
v_timeStamp = _timestamp;
}
-void Status::setKeyID(const QString &key)
+void Status::setKeyID(const TQString &key)
{
v_key = key;
}
-void Status::setXSigned(const QString &s)
+void Status::setXSigned(const TQString &s)
{
v_xsigned = s;
}
-void Status::setSongTitle(const QString & _songtitle)
+void Status::setSongTitle(const TQString & _songtitle)
{
v_songTitle = _songtitle;
}
-void Status::setCapsNode(const QString & _capsNode)
+void Status::setCapsNode(const TQString & _capsNode)
{
v_capsNode = _capsNode;
}
-void Status::setCapsVersion(const QString & _capsVersion)
+void Status::setCapsVersion(const TQString & _capsVersion)
{
v_capsVersion = _capsVersion;
}
-void Status::setCapsExt(const QString & _capsExt)
+void Status::setCapsExt(const TQString & _capsExt)
{
v_capsExt = _capsExt;
}
@@ -912,46 +912,46 @@ int Status::priority() const
return v_priority;
}
-const QString & Status::show() const
+const TQString & Status::show() const
{
return v_show;
}
-const QString & Status::status() const
+const TQString & Status::status() const
{
return v_status;
}
-QDateTime Status::timeStamp() const
+TQDateTime Status::timeStamp() const
{
return v_timeStamp;
}
-const QString & Status::keyID() const
+const TQString & Status::keyID() const
{
return v_key;
}
-const QString & Status::xsigned() const
+const TQString & Status::xsigned() const
{
return v_xsigned;
}
-const QString & Status::songTitle() const
+const TQString & Status::songTitle() const
{
return v_songTitle;
}
-const QString & Status::capsNode() const
+const TQString & Status::capsNode() const
{
return v_capsNode;
}
-const QString & Status::capsVersion() const
+const TQString & Status::capsVersion() const
{
return v_capsVersion;
}
-const QString & Status::capsExt() const
+const TQString & Status::capsExt() const
{
return v_capsExt;
}
@@ -961,7 +961,7 @@ int Status::errorCode() const
return ecode;
}
-const QString & Status::errorString() const
+const TQString & Status::errorString() const
{
return estr;
}
@@ -970,7 +970,7 @@ const QString & Status::errorString() const
//---------------------------------------------------------------------------
// Resource
//---------------------------------------------------------------------------
-Resource::Resource(const QString &name, const Status &stat)
+Resource::Resource(const TQString &name, const Status &stat)
{
v_name = name;
v_status = stat;
@@ -980,7 +980,7 @@ Resource::~Resource()
{
}
-const QString & Resource::name() const
+const TQString & Resource::name() const
{
return v_name;
}
@@ -995,7 +995,7 @@ const Status & Resource::status() const
return v_status;
}
-void Resource::setName(const QString & _name)
+void Resource::setName(const TQString & _name)
{
v_name = _name;
}
@@ -1010,7 +1010,7 @@ void Resource::setStatus(const Status & _status)
// ResourceList
//---------------------------------------------------------------------------
ResourceList::ResourceList()
-:QValueList<Resource>()
+:TQValueList<Resource>()
{
}
@@ -1018,7 +1018,7 @@ ResourceList::~ResourceList()
{
}
-ResourceList::Iterator ResourceList::find(const QString & _find)
+ResourceList::Iterator ResourceList::find(const TQString & _find)
{
for(ResourceList::Iterator it = begin(); it != end(); ++it) {
if((*it).name() == _find)
@@ -1040,7 +1040,7 @@ ResourceList::Iterator ResourceList::priority()
return highest;
}
-ResourceList::ConstIterator ResourceList::find(const QString & _find) const
+ResourceList::ConstIterator ResourceList::find(const TQString & _find) const
{
for(ResourceList::ConstIterator it = begin(); it != end(); ++it) {
if((*it).name() == _find)
@@ -1080,12 +1080,12 @@ const Jid & RosterItem::jid() const
return v_jid;
}
-const QString & RosterItem::name() const
+const TQString & RosterItem::name() const
{
return v_name;
}
-const QStringList & RosterItem::groups() const
+const TQStringList & RosterItem::groups() const
{
return v_groups;
}
@@ -1095,7 +1095,7 @@ const Subscription & RosterItem::subscription() const
return v_subscription;
}
-const QString & RosterItem::ask() const
+const TQString & RosterItem::ask() const
{
return v_ask;
}
@@ -1105,9 +1105,9 @@ bool RosterItem::isPush() const
return v_push;
}
-bool RosterItem::inGroup(const QString &g) const
+bool RosterItem::inGroup(const TQString &g) const
{
- for(QStringList::ConstIterator it = v_groups.begin(); it != v_groups.end(); ++it) {
+ for(TQStringList::ConstIterator it = v_groups.begin(); it != v_groups.end(); ++it) {
if(*it == g)
return true;
}
@@ -1119,12 +1119,12 @@ void RosterItem::setJid(const Jid &_jid)
v_jid = _jid;
}
-void RosterItem::setName(const QString &_name)
+void RosterItem::setName(const TQString &_name)
{
v_name = _name;
}
-void RosterItem::setGroups(const QStringList &_groups)
+void RosterItem::setGroups(const TQStringList &_groups)
{
v_groups = _groups;
}
@@ -1134,7 +1134,7 @@ void RosterItem::setSubscription(const Subscription &type)
v_subscription = type;
}
-void RosterItem::setAsk(const QString &_ask)
+void RosterItem::setAsk(const TQString &_ask)
{
v_ask = _ask;
}
@@ -1144,7 +1144,7 @@ void RosterItem::setIsPush(bool b)
v_push = b;
}
-bool RosterItem::addGroup(const QString &g)
+bool RosterItem::addGroup(const TQString &g)
{
if(inGroup(g))
return false;
@@ -1153,9 +1153,9 @@ bool RosterItem::addGroup(const QString &g)
return true;
}
-bool RosterItem::removeGroup(const QString &g)
+bool RosterItem::removeGroup(const TQString &g)
{
- for(QStringList::Iterator it = v_groups.begin(); it != v_groups.end(); ++it) {
+ for(TQStringList::Iterator it = v_groups.begin(); it != v_groups.end(); ++it) {
if(*it == g) {
v_groups.remove(it);
return true;
@@ -1165,40 +1165,40 @@ bool RosterItem::removeGroup(const QString &g)
return false;
}
-QDomElement RosterItem::toXml(QDomDocument *doc) const
+TQDomElement RosterItem::toXml(TQDomDocument *doc) const
{
- QDomElement item = doc->createElement("item");
+ TQDomElement item = doc->createElement("item");
item.setAttribute("jid", v_jid.full());
item.setAttribute("name", v_name);
item.setAttribute("subscription", v_subscription.toString());
if(!v_ask.isEmpty())
item.setAttribute("ask", v_ask);
- for(QStringList::ConstIterator it = v_groups.begin(); it != v_groups.end(); ++it)
+ for(TQStringList::ConstIterator it = v_groups.begin(); it != v_groups.end(); ++it)
item.appendChild(textTag(doc, "group", *it));
return item;
}
-bool RosterItem::fromXml(const QDomElement &item)
+bool RosterItem::fromXml(const TQDomElement &item)
{
if(item.tagName() != "item")
return false;
Jid j(item.attribute("jid"));
if(!j.isValid())
return false;
- QString na = item.attribute("name");
+ TQString na = item.attribute("name");
Subscription s;
if(!s.fromString(item.attribute("subscription")) )
return false;
- QStringList g;
- for(QDomNode n = item.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQStringList g;
+ for(TQDomNode n = item.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName() == "group")
g += tagContent(i);
}
- QString a = item.attribute("ask");
+ TQString a = item.attribute("ask");
v_jid = j;
v_name = na;
@@ -1214,7 +1214,7 @@ bool RosterItem::fromXml(const QDomElement &item)
// Roster
//---------------------------------------------------------------------------
Roster::Roster()
-:QValueList<RosterItem>()
+:TQValueList<RosterItem>()
{
}
@@ -1246,7 +1246,7 @@ Roster::ConstIterator Roster::find(const Jid &j) const
//---------------------------------------------------------------------------
// FormField
//---------------------------------------------------------------------------
-FormField::FormField(const QString &type, const QString &value)
+FormField::FormField(const TQString &type, const TQString &value)
{
v_type = misc;
if(!type.isEmpty()) {
@@ -1266,29 +1266,29 @@ int FormField::type() const
return v_type;
}
-QString FormField::realName() const
+TQString FormField::realName() const
{
return typeToTagName(v_type);
}
-QString FormField::fieldName() const
+TQString FormField::fieldName() const
{
switch(v_type) {
- case username: return QObject::tr("Username");
- case nick: return QObject::tr("Nickname");
- case password: return QObject::tr("Password");
- case name: return QObject::tr("Name");
- case first: return QObject::tr("First Name");
- case last: return QObject::tr("Last Name");
- case email: return QObject::tr("E-mail");
- case address: return QObject::tr("Address");
- case city: return QObject::tr("City");
- case state: return QObject::tr("State");
- case zip: return QObject::tr("Zipcode");
- case phone: return QObject::tr("Phone");
- case url: return QObject::tr("URL");
- case date: return QObject::tr("Date");
- case misc: return QObject::tr("Misc");
+ case username: return TQObject::tr("Username");
+ case nick: return TQObject::tr("Nickname");
+ case password: return TQObject::tr("Password");
+ case name: return TQObject::tr("Name");
+ case first: return TQObject::tr("First Name");
+ case last: return TQObject::tr("Last Name");
+ case email: return TQObject::tr("E-mail");
+ case address: return TQObject::tr("Address");
+ case city: return TQObject::tr("City");
+ case state: return TQObject::tr("State");
+ case zip: return TQObject::tr("Zipcode");
+ case phone: return TQObject::tr("Phone");
+ case url: return TQObject::tr("URL");
+ case date: return TQObject::tr("Date");
+ case misc: return TQObject::tr("Misc");
default: return "";
};
}
@@ -1298,7 +1298,7 @@ bool FormField::isSecret() const
return (type() == password);
}
-const QString & FormField::value() const
+const TQString & FormField::value() const
{
return v_value;
}
@@ -1308,7 +1308,7 @@ void FormField::setType(int x)
v_type = x;
}
-bool FormField::setType(const QString &in)
+bool FormField::setType(const TQString &in)
{
int x = tagNameToType(in);
if(x == -1)
@@ -1318,12 +1318,12 @@ bool FormField::setType(const QString &in)
return true;
}
-void FormField::setValue(const QString &in)
+void FormField::setValue(const TQString &in)
{
v_value = in;
}
-int FormField::tagNameToType(const QString &in) const
+int FormField::tagNameToType(const TQString &in) const
{
if(!in.compare("username")) return username;
if(!in.compare("nick")) return nick;
@@ -1344,7 +1344,7 @@ int FormField::tagNameToType(const QString &in) const
return -1;
}
-QString FormField::typeToTagName(int type) const
+TQString FormField::typeToTagName(int type) const
{
switch(type) {
case username: return "username";
@@ -1371,7 +1371,7 @@ QString FormField::typeToTagName(int type) const
// Form
//---------------------------------------------------------------------------
Form::Form(const Jid &j)
-:QValueList<FormField>()
+:TQValueList<FormField>()
{
setJid(j);
}
@@ -1385,12 +1385,12 @@ Jid Form::jid() const
return v_jid;
}
-QString Form::instructions() const
+TQString Form::instructions() const
{
return v_instructions;
}
-QString Form::key() const
+TQString Form::key() const
{
return v_key;
}
@@ -1400,12 +1400,12 @@ void Form::setJid(const Jid &j)
v_jid = j;
}
-void Form::setInstructions(const QString &s)
+void Form::setInstructions(const TQString &s)
{
v_instructions = s;
}
-void Form::setKey(const QString &s)
+void Form::setKey(const TQString &s)
{
v_key = s;
}
@@ -1428,22 +1428,22 @@ const Jid & SearchResult::jid() const
return v_jid;
}
-const QString & SearchResult::nick() const
+const TQString & SearchResult::nick() const
{
return v_nick;
}
-const QString & SearchResult::first() const
+const TQString & SearchResult::first() const
{
return v_first;
}
-const QString & SearchResult::last() const
+const TQString & SearchResult::last() const
{
return v_last;
}
-const QString & SearchResult::email() const
+const TQString & SearchResult::email() const
{
return v_email;
}
@@ -1453,22 +1453,22 @@ void SearchResult::setJid(const Jid &jid)
v_jid = jid;
}
-void SearchResult::setNick(const QString &nick)
+void SearchResult::setNick(const TQString &nick)
{
v_nick = nick;
}
-void SearchResult::setFirst(const QString &first)
+void SearchResult::setFirst(const TQString &first)
{
v_first = first;
}
-void SearchResult::setLast(const QString &last)
+void SearchResult::setLast(const TQString &last)
{
v_last = last;
}
-void SearchResult::setEmail(const QString &email)
+void SearchResult::setEmail(const TQString &email)
{
v_email = email;
}
@@ -1481,14 +1481,14 @@ Features::Features()
{
}
-Features::Features(const QStringList &l)
+Features::Features(const TQStringList &l)
{
setList(l);
}
-Features::Features(const QString &str)
+Features::Features(const TQString &str)
{
- QStringList l;
+ TQStringList l;
l << str;
setList(l);
@@ -1498,19 +1498,19 @@ Features::~Features()
{
}
-QStringList Features::list() const
+TQStringList Features::list() const
{
return _list;
}
-void Features::setList(const QStringList &l)
+void Features::setList(const TQStringList &l)
{
_list = l;
}
-bool Features::test(const QStringList &ns) const
+bool Features::test(const TQStringList &ns) const
{
- QStringList::ConstIterator it = ns.begin();
+ TQStringList::ConstIterator it = ns.begin();
for ( ; it != ns.end(); ++it)
if ( _list.find( *it ) != _list.end() )
return true;
@@ -1521,7 +1521,7 @@ bool Features::test(const QStringList &ns) const
#define FID_REGISTER "jabber:iq:register"
bool Features::canRegister() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_REGISTER;
return test(ns);
@@ -1530,7 +1530,7 @@ bool Features::canRegister() const
#define FID_SEARCH "jabber:iq:search"
bool Features::canSearch() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_SEARCH;
return test(ns);
@@ -1539,7 +1539,7 @@ bool Features::canSearch() const
#define FID_XHTML "http://jabber.org/protocol/xhtml-im"
bool Features::canXHTML() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_XHTML;
@@ -1549,7 +1549,7 @@ bool Features::canXHTML() const
#define FID_GROUPCHAT "jabber:iq:conference"
bool Features::canGroupchat() const
{
- QStringList ns;
+ TQStringList ns;
ns << "http://jabber.org/protocol/muc";
ns << FID_GROUPCHAT;
@@ -1559,7 +1559,7 @@ bool Features::canGroupchat() const
#define FID_VOICE "http://www.google.com/xmpp/protocol/voice/v1"
bool Features::canVoice() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_VOICE;
return test(ns);
@@ -1568,7 +1568,7 @@ bool Features::canVoice() const
#define FID_GATEWAY "jabber:iq:gateway"
bool Features::isGateway() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_GATEWAY;
return test(ns);
@@ -1577,7 +1577,7 @@ bool Features::isGateway() const
#define FID_DISCO "http://jabber.org/protocol/disco"
bool Features::canDisco() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_DISCO;
ns << "http://jabber.org/protocol/disco#info";
ns << "http://jabber.org/protocol/disco#items";
@@ -1588,7 +1588,7 @@ bool Features::canDisco() const
#define FID_VCARD "vcard-temp"
bool Features::haveVCard() const
{
- QStringList ns;
+ TQStringList ns;
ns << FID_VCARD;
return test(ns);
@@ -1602,7 +1602,7 @@ class Features::FeatureName : public QObject
Q_OBJECT
public:
FeatureName()
- : QObject(qApp)
+ : TQObject(qApp)
{
id2s[FID_Invalid] = tr("ERROR: Incorrect usage of Features class");
id2s[FID_None] = tr("None");
@@ -1617,7 +1617,7 @@ public:
id2s[FID_Add] = tr("Add to roster");
// compute reverse map
- //QMap<QString, long>::Iterator it = id2s.begin();
+ //TQMap<TQString, long>::Iterator it = id2s.begin();
//for ( ; it != id2s.end(); ++it)
// s2id[it.data()] = it.key();
@@ -1632,9 +1632,9 @@ public:
id2f[FID_Add] = FID_ADD;
}
- //QMap<QString, long> s2id;
- QMap<long, QString> id2s;
- QMap<long, QString> id2f;
+ //TQMap<TQString, long> s2id;
+ TQMap<long, TQString> id2s;
+ TQMap<long, TQString> id2f;
};
static Features::FeatureName *featureName = 0;
@@ -1661,13 +1661,13 @@ long Features::id() const
return FID_None;
}
-long Features::id(const QString &feature)
+long Features::id(const TQString &feature)
{
Features f(feature);
return f.id();
}
-QString Features::feature(long id)
+TQString Features::feature(long id)
{
if ( !featureName )
featureName = new FeatureName();
@@ -1675,7 +1675,7 @@ QString Features::feature(long id)
return featureName->id2f[id];
}
-QString Features::name(long id)
+TQString Features::name(long id)
{
if ( !featureName )
featureName = new FeatureName();
@@ -1683,12 +1683,12 @@ QString Features::name(long id)
return featureName->id2s[id];
}
-QString Features::name() const
+TQString Features::name() const
{
return name(id());
}
-QString Features::name(const QString &feature)
+TQString Features::name(const TQString &feature)
{
Features f(feature);
return f.name(f.id());
@@ -1706,8 +1706,8 @@ public:
}
Jid jid;
- QString name;
- QString node;
+ TQString name;
+ TQString node;
Action action;
Features features;
@@ -1789,22 +1789,22 @@ void DiscoItem::setJid(const Jid &j)
d->jid = j;
}
-const QString &DiscoItem::name() const
+const TQString &DiscoItem::name() const
{
return d->name;
}
-void DiscoItem::setName(const QString &n)
+void DiscoItem::setName(const TQString &n)
{
d->name = n;
}
-const QString &DiscoItem::node() const
+const TQString &DiscoItem::node() const
{
return d->node;
}
-void DiscoItem::setNode(const QString &n)
+void DiscoItem::setNode(const TQString &n)
{
d->node = n;
}
@@ -1843,7 +1843,7 @@ void DiscoItem::setIdentities(const Identities &i)
}
-DiscoItem::Action DiscoItem::string2action(QString s)
+DiscoItem::Action DiscoItem::string2action(TQString s)
{
Action a;
@@ -1857,16 +1857,16 @@ DiscoItem::Action DiscoItem::string2action(QString s)
return a;
}
-QString DiscoItem::action2string(Action a)
+TQString DiscoItem::action2string(Action a)
{
- QString s;
+ TQString s;
if ( a == Update )
s = "update";
else if ( a == Remove )
s = "remove";
else
- s = QString::null;
+ s = TQString::null;
return s;
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp
index 4c937dd0..95f61e69 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.cpp
@@ -27,23 +27,23 @@
//#include"xmpp_types.h"
#include"xmpp_vcard.h"
-#include<qregexp.h>
-#include<qvaluelist.h>
+#include<tqregexp.h>
+#include<tqvaluelist.h>
using namespace XMPP;
-static QString lineEncode(QString str)
+static TQString lineEncode(TQString str)
{
- str.replace(QRegExp("\\\\"), "\\\\"); // backslash to double-backslash
- str.replace(QRegExp("\\|"), "\\p"); // pipe to \p
- str.replace(QRegExp("\n"), "\\n"); // newline to \n
+ str.replace(TQRegExp("\\\\"), "\\\\"); // backslash to double-backslash
+ str.replace(TQRegExp("\\|"), "\\p"); // pipe to \p
+ str.replace(TQRegExp("\n"), "\\n"); // newline to \n
return str;
}
-static QString lineDecode(const QString &str)
+static TQString lineDecode(const TQString &str)
{
- QString ret;
+ TQString ret;
for(unsigned int n = 0; n < str.length(); ++n) {
if(str.at(n) == '\\') {
@@ -66,12 +66,12 @@ static QString lineDecode(const QString &str)
return ret;
}
-static Roster xmlReadRoster(const QDomElement &q, bool push)
+static Roster xmlReadRoster(const TQDomElement &q, bool push)
{
Roster r;
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
@@ -115,24 +115,24 @@ JT_Register::~JT_Register()
delete d;
}
-void JT_Register::reg(const QString &user, const QString &pass)
+void JT_Register::reg(const TQString &user, const TQString &pass)
{
d->type = 0;
to = client()->host();
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:register");
iq.appendChild(query);
query.appendChild(textTag(doc(), "username", user));
query.appendChild(textTag(doc(), "password", pass));
}
-void JT_Register::changepw(const QString &pass)
+void JT_Register::changepw(const TQString &pass)
{
d->type = 1;
to = client()->host();
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:register");
iq.appendChild(query);
query.appendChild(textTag(doc(), "username", client()->user()));
@@ -144,7 +144,7 @@ void JT_Register::unreg(const Jid &j)
d->type = 2;
to = j.isEmpty() ? client()->host() : j.full();
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:register");
iq.appendChild(query);
@@ -160,7 +160,7 @@ void JT_Register::getForm(const Jid &j)
d->type = 3;
to = j;
iq = createIQ(doc(), "get", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:register");
iq.appendChild(query);
}
@@ -170,7 +170,7 @@ void JT_Register::setForm(const Form &form)
d->type = 4;
to = form.jid();
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:register");
iq.appendChild(query);
@@ -195,7 +195,7 @@ void JT_Register::onGo()
send(iq);
}
-bool JT_Register::take(const QDomElement &x)
+bool JT_Register::take(const TQDomElement &x)
{
if(!iqVerify(x, to, id()))
return false;
@@ -206,9 +206,9 @@ bool JT_Register::take(const QDomElement &x)
d->form.clear();
d->form.setJid(from);
- QDomElement q = queryTag(x);
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQDomElement q = queryTag(x);
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
@@ -270,7 +270,7 @@ void JT_UnRegister::onGo()
d->jt_reg = new JT_Register(this);
d->jt_reg->getForm(d->j);
- connect(d->jt_reg, SIGNAL(finished()), SLOT(getFormFinished()));
+ connect(d->jt_reg, TQT_SIGNAL(finished()), TQT_SLOT(getFormFinished()));
d->jt_reg->go(false);
}
@@ -279,7 +279,7 @@ void JT_UnRegister::getFormFinished()
disconnect(d->jt_reg, 0, this, 0);
d->jt_reg->unreg(d->j);
- connect(d->jt_reg, SIGNAL(finished()), SLOT(unregFinished()));
+ connect(d->jt_reg, TQT_SIGNAL(finished()), TQT_SLOT(unregFinished()));
d->jt_reg->go(false);
}
@@ -303,7 +303,7 @@ public:
Private() {}
Roster roster;
- QValueList<QDomElement> itemList;
+ TQValueList<TQDomElement> itemList;
};
JT_Roster::JT_Roster(Task *parent)
@@ -323,20 +323,20 @@ void JT_Roster::get()
type = 0;
//to = client()->host();
iq = createIQ(doc(), "get", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:roster");
iq.appendChild(query);
}
-void JT_Roster::set(const Jid &jid, const QString &name, const QStringList &groups)
+void JT_Roster::set(const Jid &jid, const TQString &name, const TQStringList &groups)
{
type = 1;
//to = client()->host();
- QDomElement item = doc()->createElement("item");
+ TQDomElement item = doc()->createElement("item");
item.setAttribute("jid", jid.full());
if(!name.isEmpty())
item.setAttribute("name", name);
- for(QStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it)
+ for(TQStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it)
item.appendChild(textTag(doc(), "group", *it));
d->itemList += item;
}
@@ -345,7 +345,7 @@ void JT_Roster::remove(const Jid &jid)
{
type = 1;
//to = client()->host();
- QDomElement item = doc()->createElement("item");
+ TQDomElement item = doc()->createElement("item");
item.setAttribute("jid", jid.full());
item.setAttribute("subscription", "remove");
d->itemList += item;
@@ -358,10 +358,10 @@ void JT_Roster::onGo()
else if(type == 1) {
//to = client()->host();
iq = createIQ(doc(), "set", to.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:roster");
iq.appendChild(query);
- for(QValueList<QDomElement>::ConstIterator it = d->itemList.begin(); it != d->itemList.end(); ++it)
+ for(TQValueList<TQDomElement>::ConstIterator it = d->itemList.begin(); it != d->itemList.end(); ++it)
query.appendChild(*it);
send(iq);
}
@@ -372,25 +372,25 @@ const Roster & JT_Roster::roster() const
return d->roster;
}
-QString JT_Roster::toString() const
+TQString JT_Roster::toString() const
{
if(type != 1)
return "";
- QDomElement i = doc()->createElement("request");
+ TQDomElement i = doc()->createElement("request");
i.setAttribute("type", "JT_Roster");
- for(QValueList<QDomElement>::ConstIterator it = d->itemList.begin(); it != d->itemList.end(); ++it)
+ for(TQValueList<TQDomElement>::ConstIterator it = d->itemList.begin(); it != d->itemList.end(); ++it)
i.appendChild(*it);
return lineEncode(Stream::xmlToString(i));
return "";
}
-bool JT_Roster::fromString(const QString &str)
+bool JT_Roster::fromString(const TQString &str)
{
- QDomDocument *dd = new QDomDocument;
+ TQDomDocument *dd = new QDomDocument;
if(!dd->setContent(lineDecode(str).utf8()))
return false;
- QDomElement e = doc()->importNode(dd->documentElement(), true).toElement();
+ TQDomElement e = doc()->importNode(dd->documentElement(), true).toElement();
delete dd;
if(e.tagName() != "request" || e.attribute("type") != "JT_Roster")
@@ -398,8 +398,8 @@ bool JT_Roster::fromString(const QString &str)
type = 1;
d->itemList.clear();
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
d->itemList += i;
@@ -408,7 +408,7 @@ bool JT_Roster::fromString(const QString &str)
return true;
}
-bool JT_Roster::take(const QDomElement &x)
+bool JT_Roster::take(const TQDomElement &x)
{
if(!iqVerify(x, client()->host(), id()))
return false;
@@ -416,7 +416,7 @@ bool JT_Roster::take(const QDomElement &x)
// get
if(type == 0) {
if(x.attribute("type") == "result") {
- QDomElement q = queryTag(x);
+ TQDomElement q = queryTag(x);
d->roster = xmlReadRoster(q, false);
setSuccess();
}
@@ -457,7 +457,7 @@ JT_PushRoster::~JT_PushRoster()
{
}
-bool JT_PushRoster::take(const QDomElement &e)
+bool JT_PushRoster::take(const TQDomElement &e)
{
// must be an iq-set tag
if(e.tagName() != "iq" || e.attribute("type") != "set")
@@ -504,21 +504,21 @@ void JT_Presence::pres(const Status &s)
if(!s.status().isEmpty())
tag.appendChild(textTag(doc(), "status", s.status()));
- tag.appendChild( textTag(doc(), "priority", QString("%1").arg(s.priority()) ) );
+ tag.appendChild( textTag(doc(), "priority", TQString("%1").arg(s.priority()) ) );
if(!s.keyID().isEmpty()) {
- QDomElement x = textTag(doc(), "x", s.keyID());
+ TQDomElement x = textTag(doc(), "x", s.keyID());
x.setAttribute("xmlns", "http://jabber.org/protocol/e2e");
tag.appendChild(x);
}
if(!s.xsigned().isEmpty()) {
- QDomElement x = textTag(doc(), "x", s.xsigned());
+ TQDomElement x = textTag(doc(), "x", s.xsigned());
x.setAttribute("xmlns", "jabber:x:signed");
tag.appendChild(x);
}
if(!s.capsNode().isEmpty() && !s.capsVersion().isEmpty()) {
- QDomElement c = doc()->createElement("c");
+ TQDomElement c = doc()->createElement("c");
c.setAttribute("xmlns","http://jabber.org/protocol/caps");
c.setAttribute("node",s.capsNode());
c.setAttribute("ver",s.capsVersion());
@@ -535,7 +535,7 @@ void JT_Presence::pres(const Jid &to, const Status &s)
tag.setAttribute("to", to.full());
}
-void JT_Presence::sub(const Jid &to, const QString &subType)
+void JT_Presence::sub(const Jid &to, const TQString &subType)
{
type = 1;
@@ -563,7 +563,7 @@ JT_PushPresence::~JT_PushPresence()
{
}
-bool JT_PushPresence::take(const QDomElement &e)
+bool JT_PushPresence::take(const TQDomElement &e)
{
if(e.tagName() != "presence")
return false;
@@ -572,12 +572,12 @@ bool JT_PushPresence::take(const QDomElement &e)
Status p;
if(e.hasAttribute("type")) {
- QString type = e.attribute("type");
+ TQString type = e.attribute("type");
if(type == "unavailable") {
p.setIsAvailable(false);
}
else if(type == "error") {
- QString str = "";
+ TQString str = "";
int code = 0;
getErrorFromElement(e, &code, &str);
p.setError(code, str);
@@ -588,7 +588,7 @@ bool JT_PushPresence::take(const QDomElement &e)
}
}
- QDomElement tag;
+ TQDomElement tag;
bool found;
tag = findSubTag(e, "status", &found);
@@ -601,23 +601,23 @@ bool JT_PushPresence::take(const QDomElement &e)
if(found)
p.setPriority(tagContent(tag).toInt());
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName() == "x" && i.attribute("xmlns") == "jabber:x:delay") {
if(i.hasAttribute("stamp")) {
- QDateTime dt;
+ TQDateTime dt;
if(stamp2TS(i.attribute("stamp"), &dt))
dt = dt.addSecs(client()->timeZoneOffset() * 3600);
p.setTimeStamp(dt);
}
}
else if(i.tagName() == "x" && i.attribute("xmlns") == "gabber:x:music:info") {
- QDomElement t;
+ TQDomElement t;
bool found;
- QString title, state;
+ TQString title, state;
t = findSubTag(i, "title", &found);
if(found)
@@ -651,17 +651,17 @@ bool JT_PushPresence::take(const QDomElement &e)
//----------------------------------------------------------------------------
// JT_Message
//----------------------------------------------------------------------------
-static QDomElement oldStyleNS(const QDomElement &e)
+static TQDomElement oldStyleNS(const TQDomElement &e)
{
// find closest parent with a namespace
- QDomNode par = e.parentNode();
+ TQDomNode par = e.parentNode();
while(!par.isNull() && par.namespaceURI().isNull())
par = par.parentNode();
bool noShowNS = false;
if(!par.isNull() && par.namespaceURI() == e.namespaceURI())
noShowNS = true;
- QDomElement i;
+ TQDomElement i;
uint x;
//if(noShowNS)
i = e.ownerDocument().createElement(e.tagName());
@@ -669,7 +669,7 @@ static QDomElement oldStyleNS(const QDomElement &e)
// i = e.ownerDocument().createElementNS(e.namespaceURI(), e.tagName());
// copy attributes
- QDomNamedNodeMap al = e.attributes();
+ TQDomNamedNodeMap al = e.attributes();
for(x = 0; x < al.count(); ++x)
i.setAttributeNode(al.item(x).cloneNode().toAttr());
@@ -677,9 +677,9 @@ static QDomElement oldStyleNS(const QDomElement &e)
i.setAttribute("xmlns", e.namespaceURI());
// copy children
- QDomNodeList nl = e.childNodes();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x) {
- QDomNode n = nl.item(x);
+ TQDomNode n = nl.item(x);
if(n.isElement())
i.appendChild(oldStyleNS(n.toElement()));
else
@@ -702,7 +702,7 @@ JT_Message::~JT_Message()
void JT_Message::onGo()
{
Stanza s = m.toStanza(&(client()->stream()));
- QDomElement e = oldStyleNS(s.element());
+ TQDomElement e = oldStyleNS(s.element());
send(e);
setSuccess();
}
@@ -711,41 +711,41 @@ void JT_Message::onGo()
//----------------------------------------------------------------------------
// JT_PushMessage
//----------------------------------------------------------------------------
-static QDomElement addCorrectNS(const QDomElement &e)
+static TQDomElement addCorrectNS(const TQDomElement &e)
{
uint x;
// grab child nodes
- /*QDomDocumentFragment frag = e.ownerDocument().createDocumentFragment();
- QDomNodeList nl = e.childNodes();
+ /*TQDomDocumentFragment frag = e.ownerDocument().createDocumentFragment();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x)
frag.appendChild(nl.item(x).cloneNode());*/
// find closest xmlns
- QDomNode n = e;
+ TQDomNode n = e;
while(!n.isNull() && !n.toElement().hasAttribute("xmlns"))
n = n.parentNode();
- QString ns;
+ TQString ns;
if(n.isNull() || !n.toElement().hasAttribute("xmlns"))
ns = "jabber:client";
else
ns = n.toElement().attribute("xmlns");
// make a new node
- QDomElement i = e.ownerDocument().createElementNS(ns, e.tagName());
+ TQDomElement i = e.ownerDocument().createElementNS(ns, e.tagName());
// copy attributes
- QDomNamedNodeMap al = e.attributes();
+ TQDomNamedNodeMap al = e.attributes();
for(x = 0; x < al.count(); ++x) {
- QDomAttr a = al.item(x).toAttr();
+ TQDomAttr a = al.item(x).toAttr();
if(a.name() != "xmlns")
i.setAttributeNodeNS(al.item(x).cloneNode().toAttr());
}
// copy children
- QDomNodeList nl = e.childNodes();
+ TQDomNodeList nl = e.childNodes();
for(x = 0; x < nl.count(); ++x) {
- QDomNode n = nl.item(x);
+ TQDomNode n = nl.item(x);
if(n.isElement())
i.appendChild(addCorrectNS(n.toElement()));
else
@@ -765,7 +765,7 @@ JT_PushMessage::~JT_PushMessage()
{
}
-bool JT_PushMessage::take(const QDomElement &e)
+bool JT_PushMessage::take(const TQDomElement &e)
{
if(e.tagName() != "message")
return false;
@@ -796,7 +796,7 @@ public:
Private() {}
int seconds;
- QString message;
+ TQString message;
};
JT_GetLastActivity::JT_GetLastActivity(Task *parent)
@@ -814,7 +814,7 @@ void JT_GetLastActivity::get(const Jid &j)
{
jid = j;
iq = createIQ(doc(), "get", jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:last");
iq.appendChild(query);
}
@@ -824,7 +824,7 @@ int JT_GetLastActivity::seconds() const
return d->seconds;
}
-const QString &JT_GetLastActivity::message() const
+const TQString &JT_GetLastActivity::message() const
{
return d->message;
}
@@ -834,13 +834,13 @@ void JT_GetLastActivity::onGo()
send(iq);
}
-bool JT_GetLastActivity::take(const QDomElement &x)
+bool JT_GetLastActivity::take(const TQDomElement &x)
{
if(!iqVerify(x, jid, id()))
return false;
if(x.attribute("type") == "result") {
- QDomElement q = queryTag(x);
+ TQDomElement q = queryTag(x);
d->message = q.text();
bool ok;
@@ -869,7 +869,7 @@ void JT_GetServices::get(const Jid &j)
jid = j;
iq = createIQ(doc(), "get", jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:agents");
iq.appendChild(query);
}
@@ -884,17 +884,17 @@ void JT_GetServices::onGo()
send(iq);
}
-bool JT_GetServices::take(const QDomElement &x)
+bool JT_GetServices::take(const TQDomElement &x)
{
if(!iqVerify(x, jid, id()))
return false;
if(x.attribute("type") == "result") {
- QDomElement q = queryTag(x);
+ TQDomElement q = queryTag(x);
// agents
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
@@ -903,7 +903,7 @@ bool JT_GetServices::take(const QDomElement &x)
a.setJid(Jid(i.attribute("jid")));
- QDomElement tag;
+ TQDomElement tag;
bool found;
tag = findSubTag(i, "name", &found);
@@ -911,7 +911,7 @@ bool JT_GetServices::take(const QDomElement &x)
a.setName(tagContent(tag));
// determine which namespaces does item support
- QStringList ns;
+ TQStringList ns;
tag = findSubTag(i, "register", &found);
if(found)
@@ -950,7 +950,7 @@ class JT_VCard::Private
public:
Private() {}
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
VCard vcard;
};
@@ -972,7 +972,7 @@ void JT_VCard::get(const Jid &_jid)
type = 0;
d->jid = _jid;
d->iq = createIQ(doc(), "get", d->jid.full(), id());
- QDomElement v = doc()->createElement("vCard");
+ TQDomElement v = doc()->createElement("vCard");
v.setAttribute("xmlns", "vcard-temp");
v.setAttribute("version", "2.0");
v.setAttribute("prodid", "-//HandGen//NONSGML vGen v1.0//EN");
@@ -1003,7 +1003,7 @@ void JT_VCard::onGo()
send(d->iq);
}
-bool JT_VCard::take(const QDomElement &x)
+bool JT_VCard::take(const TQDomElement &x)
{
Jid to = d->jid;
if (to.userHost() == client()->jid().userHost())
@@ -1013,8 +1013,8 @@ bool JT_VCard::take(const QDomElement &x)
if(x.attribute("type") == "result") {
if(type == 0) {
- for(QDomNode n = x.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement q = n.toElement();
+ for(TQDomNode n = x.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement q = n.toElement();
if(q.isNull())
continue;
@@ -1052,7 +1052,7 @@ public:
Jid jid;
Form form;
- QValueList<SearchResult> resultList;
+ TQValueList<SearchResult> resultList;
};
JT_Search::JT_Search(Task *parent)
@@ -1072,7 +1072,7 @@ void JT_Search::get(const Jid &jid)
type = 0;
d->jid = jid;
iq = createIQ(doc(), "get", d->jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:search");
iq.appendChild(query);
}
@@ -1082,7 +1082,7 @@ void JT_Search::set(const Form &form)
type = 1;
d->jid = form.jid();
iq = createIQ(doc(), "set", d->jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:search");
iq.appendChild(query);
@@ -1102,7 +1102,7 @@ const Form & JT_Search::form() const
return d->form;
}
-const QValueList<SearchResult> & JT_Search::results() const
+const TQValueList<SearchResult> & JT_Search::results() const
{
return d->resultList;
}
@@ -1112,7 +1112,7 @@ void JT_Search::onGo()
send(iq);
}
-bool JT_Search::take(const QDomElement &x)
+bool JT_Search::take(const TQDomElement &x)
{
if(!iqVerify(x, d->jid, id()))
return false;
@@ -1123,9 +1123,9 @@ bool JT_Search::take(const QDomElement &x)
d->form.clear();
d->form.setJid(from);
- QDomElement q = queryTag(x);
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQDomElement q = queryTag(x);
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
@@ -1145,16 +1145,16 @@ bool JT_Search::take(const QDomElement &x)
else {
d->resultList.clear();
- QDomElement q = queryTag(x);
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQDomElement q = queryTag(x);
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName() == "item") {
SearchResult r(Jid(i.attribute("jid")));
- QDomElement tag;
+ TQDomElement tag;
bool found;
tag = findSubTag(i, "nick", &found);
@@ -1196,7 +1196,7 @@ void JT_ClientVersion::get(const Jid &jid)
{
j = jid;
iq = createIQ(doc(), "get", j.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:version");
iq.appendChild(query);
}
@@ -1206,15 +1206,15 @@ void JT_ClientVersion::onGo()
send(iq);
}
-bool JT_ClientVersion::take(const QDomElement &x)
+bool JT_ClientVersion::take(const TQDomElement &x)
{
if(!iqVerify(x, j, id()))
return false;
if(x.attribute("type") == "result") {
bool found;
- QDomElement q = queryTag(x);
- QDomElement tag;
+ TQDomElement q = queryTag(x);
+ TQDomElement tag;
tag = findSubTag(q, "name", &found);
if(found)
v_name = tagContent(tag);
@@ -1239,17 +1239,17 @@ const Jid & JT_ClientVersion::jid() const
return j;
}
-const QString & JT_ClientVersion::name() const
+const TQString & JT_ClientVersion::name() const
{
return v_name;
}
-const QString & JT_ClientVersion::version() const
+const TQString & JT_ClientVersion::version() const
{
return v_ver;
}
-const QString & JT_ClientVersion::os() const
+const TQString & JT_ClientVersion::os() const
{
return v_os;
}
@@ -1263,7 +1263,7 @@ const QString & JT_ClientVersion::os() const
{
j = _j;
iq = createIQ("get", j.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:time");
iq.appendChild(query);
}
@@ -1273,15 +1273,15 @@ void JT_ClientTime::go()
send(iq);
}
-bool JT_ClientTime::take(const QDomElement &x)
+bool JT_ClientTime::take(const TQDomElement &x)
{
if(x.attribute("id") != id())
return FALSE;
if(x.attribute("type") == "result") {
bool found;
- QDomElement q = queryTag(x);
- QDomElement tag;
+ TQDomElement q = queryTag(x);
+ TQDomElement tag;
tag = findSubTag(q, "utc", &found);
if(found)
stamp2TS(tagContent(tag), &utc);
@@ -1316,15 +1316,15 @@ JT_ServInfo::~JT_ServInfo()
{
}
-bool JT_ServInfo::take(const QDomElement &e)
+bool JT_ServInfo::take(const TQDomElement &e)
{
if(e.tagName() != "iq" || e.attribute("type") != "get")
return false;
- QString ns = queryNS(e);
+ TQString ns = queryNS(e);
if(ns == "jabber:iq:version") {
- QDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
- QDomElement query = doc()->createElement("query");
+ TQDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:version");
iq.appendChild(query);
query.appendChild(textTag(doc(), "name", client()->clientName()));
@@ -1334,29 +1334,29 @@ bool JT_ServInfo::take(const QDomElement &e)
return true;
}
//else if(ns == "jabber:iq:time") {
- // QDomElement iq = createIQ("result", e.attribute("from"), e.attribute("id"));
- // QDomElement query = doc()->createElement("query");
+ // TQDomElement iq = createIQ("result", e.attribute("from"), e.attribute("id"));
+ // TQDomElement query = doc()->createElement("query");
// query.setAttribute("xmlns", "jabber:iq:time");
// iq.appendChild(query);
- // QDateTime local = QDateTime::currentDateTime();
- // QDateTime utc = local.addSecs(-getTZOffset() * 3600);
- // QString str = getTZString();
+ // TQDateTime local = TQDateTime::currentDateTime();
+ // TQDateTime utc = local.addSecs(-getTZOffset() * 3600);
+ // TQString str = getTZString();
// query.appendChild(textTag("utc", TS2stamp(utc)));
// query.appendChild(textTag("tz", str));
- // query.appendChild(textTag("display", QString("%1 %2").arg(local.toString()).arg(str)));
+ // query.appendChild(textTag("display", TQString("%1 %2").arg(local.toString()).arg(str)));
// send(iq);
// return TRUE;
//}
else if(ns == "http://jabber.org/protocol/disco#info") {
// Find out the node
- QString node;
+ TQString node;
bool found;
- QDomElement q = findSubTag(e, "query", &found);
+ TQDomElement q = findSubTag(e, "query", &found);
if(found) // NOTE: Should always be true, since a NS was found above
node = q.attribute("node");
- QDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
- QDomElement query = doc()->createElement("query");
+ TQDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/disco#info");
if (!node.isEmpty())
query.setAttribute("node", node);
@@ -1364,7 +1364,7 @@ bool JT_ServInfo::take(const QDomElement &e)
// Identity
DiscoItem::Identity identity = client()->identity();
- QDomElement id = doc()->createElement("identity");
+ TQDomElement id = doc()->createElement("identity");
if (!identity.category.isEmpty() && !identity.type.isEmpty()) {
id.setAttribute("category",identity.category);
id.setAttribute("type",identity.type);
@@ -1379,7 +1379,7 @@ bool JT_ServInfo::take(const QDomElement &e)
}
query.appendChild(id);
- QDomElement feature;
+ TQDomElement feature;
if (node.isEmpty() || node == client()->capsNode() + "#" + client()->capsVersion()) {
// Standard features
feature = doc()->createElement("feature");
@@ -1404,10 +1404,10 @@ bool JT_ServInfo::take(const QDomElement &e)
if (node.isEmpty()) {
// Extended features
- QStringList exts = client()->extensions();
- for (QStringList::ConstIterator i = exts.begin(); i != exts.end(); ++i) {
- const QStringList& l = client()->extension(*i).list();
- for ( QStringList::ConstIterator j = l.begin(); j != l.end(); ++j ) {
+ TQStringList exts = client()->extensions();
+ for (TQStringList::ConstIterator i = exts.begin(); i != exts.end(); ++i) {
+ const TQStringList& l = client()->extension(*i).list();
+ for ( TQStringList::ConstIterator j = l.begin(); j != l.end(); ++j ) {
feature = doc()->createElement("feature");
feature.setAttribute("var", *j);
query.appendChild(feature);
@@ -1416,10 +1416,10 @@ bool JT_ServInfo::take(const QDomElement &e)
}
}
else if (node.startsWith(client()->capsNode() + "#")) {
- QString ext = node.right(node.length()-client()->capsNode().length()-1);
+ TQString ext = node.right(node.length()-client()->capsNode().length()-1);
if (client()->extensions().contains(ext)) {
- const QStringList& l = client()->extension(ext).list();
- for ( QStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
+ const TQStringList& l = client()->extension(ext).list();
+ for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
feature = doc()->createElement("feature");
feature.setAttribute("var", *it);
query.appendChild(feature);
@@ -1455,18 +1455,18 @@ void JT_Gateway::get(const Jid &jid)
type = 0;
v_jid = jid;
iq = createIQ(doc(), "get", v_jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:gateway");
iq.appendChild(query);
}
-void JT_Gateway::set(const Jid &jid, const QString &prompt)
+void JT_Gateway::set(const Jid &jid, const TQString &prompt)
{
type = 1;
v_jid = jid;
v_prompt = prompt;
iq = createIQ(doc(), "set", v_jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:gateway");
iq.appendChild(query);
query.appendChild(textTag(doc(), "prompt", v_prompt));
@@ -1482,26 +1482,26 @@ Jid JT_Gateway::jid() const
return v_jid;
}
-QString JT_Gateway::desc() const
+TQString JT_Gateway::desc() const
{
return v_desc;
}
-QString JT_Gateway::prompt() const
+TQString JT_Gateway::prompt() const
{
return v_prompt;
}
-bool JT_Gateway::take(const QDomElement &x)
+bool JT_Gateway::take(const TQDomElement &x)
{
if(!iqVerify(x, v_jid, id()))
return false;
if(x.attribute("type") == "result") {
if(type == 0) {
- QDomElement query = queryTag(x);
+ TQDomElement query = queryTag(x);
bool found;
- QDomElement tag;
+ TQDomElement tag;
tag = findSubTag(query, "desc", &found);
if(found)
v_desc = tagContent(tag);
@@ -1510,9 +1510,9 @@ bool JT_Gateway::take(const QDomElement &x)
v_prompt = tagContent(tag);
}
else {
- QDomElement query = queryTag(x);
+ TQDomElement query = queryTag(x);
bool found;
- QDomElement tag;
+ TQDomElement tag;
tag = findSubTag(query, "prompt", &found);
if(found)
v_prompt = tagContent(tag);
@@ -1533,7 +1533,7 @@ bool JT_Gateway::take(const QDomElement &x)
class JT_Browse::Private
{
public:
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
AgentList agentList;
AgentItem root;
@@ -1556,7 +1556,7 @@ void JT_Browse::get (const Jid &j)
d->jid = j;
d->iq = createIQ(doc(), "get", d->jid.full(), id());
- QDomElement query = doc()->createElement("item");
+ TQDomElement query = doc()->createElement("item");
query.setAttribute("xmlns", "jabber:iq:browse");
d->iq.appendChild(query);
}
@@ -1576,7 +1576,7 @@ void JT_Browse::onGo ()
send(d->iq);
}
-AgentItem JT_Browse::browseHelper (const QDomElement &i)
+AgentItem JT_Browse::browseHelper (const TQDomElement &i)
{
AgentItem a;
@@ -1598,9 +1598,9 @@ AgentItem JT_Browse::browseHelper (const QDomElement &i)
a.setType ( i.attribute("type") );
- QStringList ns;
- for(QDomNode n = i.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQStringList ns;
+ for(TQDomNode n = i.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
@@ -1618,21 +1618,21 @@ AgentItem JT_Browse::browseHelper (const QDomElement &i)
return a;
}
-bool JT_Browse::take(const QDomElement &x)
+bool JT_Browse::take(const TQDomElement &x)
{
if(!iqVerify(x, d->jid, id()))
return false;
if(x.attribute("type") == "result") {
- for(QDomNode n = x.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = x.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
d->root = browseHelper (i);
- for(QDomNode nn = i.firstChild(); !nn.isNull(); nn = nn.nextSibling()) {
- QDomElement e = nn.toElement();
+ for(TQDomNode nn = i.firstChild(); !nn.isNull(); nn = nn.nextSibling()) {
+ TQDomElement e = nn.toElement();
if ( e.isNull() )
continue;
if ( e.tagName() == "ns" )
@@ -1659,7 +1659,7 @@ class JT_DiscoItems::Private
public:
Private() { }
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
DiscoList items;
};
@@ -1680,13 +1680,13 @@ void JT_DiscoItems::get(const DiscoItem &item)
get(item.jid(), item.node());
}
-void JT_DiscoItems::get (const Jid &j, const QString &node)
+void JT_DiscoItems::get (const Jid &j, const TQString &node)
{
d->items.clear();
d->jid = j;
d->iq = createIQ(doc(), "get", d->jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/disco#items");
if ( !node.isEmpty() )
@@ -1705,16 +1705,16 @@ void JT_DiscoItems::onGo ()
send(d->iq);
}
-bool JT_DiscoItems::take(const QDomElement &x)
+bool JT_DiscoItems::take(const TQDomElement &x)
{
if(!iqVerify(x, d->jid, id()))
return false;
if(x.attribute("type") == "result") {
- QDomElement q = queryTag(x);
+ TQDomElement q = queryTag(x);
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement e = n.toElement();
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement e = n.toElement();
if( e.isNull() )
continue;
@@ -1747,9 +1747,9 @@ class JT_DiscoInfo::Private
public:
Private() { }
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
- QString node;
+ TQString node;
DiscoItem item;
};
@@ -1772,21 +1772,21 @@ void JT_DiscoInfo::get(const DiscoItem &item)
get(item.jid(), item.node(), id);
}
-void JT_DiscoInfo::get (const Jid &j, const QString &node, DiscoItem::Identity ident)
+void JT_DiscoInfo::get (const Jid &j, const TQString &node, DiscoItem::Identity ident)
{
d->item = DiscoItem(); // clear item
d->jid = j;
d->node = node;
d->iq = createIQ(doc(), "get", d->jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/disco#info");
if ( !node.isEmpty() )
query.setAttribute("node", node);
if ( !ident.category.isEmpty() && !ident.type.isEmpty() ) {
- QDomElement i = doc()->createElement("item");
+ TQDomElement i = doc()->createElement("item");
i.setAttribute("category", ident.category);
i.setAttribute("type", ident.type);
@@ -1816,7 +1816,7 @@ const Jid& JT_DiscoInfo::jid() const
* Is here because sometimes the responder does not include this information
* in the reply.
*/
-const QString& JT_DiscoInfo::node() const
+const TQString& JT_DiscoInfo::node() const
{
return d->node;
}
@@ -1833,24 +1833,24 @@ void JT_DiscoInfo::onGo ()
send(d->iq);
}
-bool JT_DiscoInfo::take(const QDomElement &x)
+bool JT_DiscoInfo::take(const TQDomElement &x)
{
if(!iqVerify(x, d->jid, id()))
return false;
if(x.attribute("type") == "result") {
- QDomElement q = queryTag(x);
+ TQDomElement q = queryTag(x);
DiscoItem item;
item.setJid( d->jid );
item.setNode( q.attribute("node") );
- QStringList features;
+ TQStringList features;
DiscoItem::Identities identities;
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement e = n.toElement();
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement e = n.toElement();
if( e.isNull() )
continue;
@@ -1890,7 +1890,7 @@ class JT_DiscoPublish::Private
public:
Private() { }
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
DiscoList list;
};
@@ -1912,7 +1912,7 @@ void JT_DiscoPublish::set(const Jid &j, const DiscoList &list)
d->jid = j;
d->iq = createIQ(doc(), "set", d->jid.full(), id());
- QDomElement query = doc()->createElement("query");
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "http://jabber.org/protocol/disco#items");
// FIXME: unsure about this
@@ -1921,7 +1921,7 @@ void JT_DiscoPublish::set(const Jid &j, const DiscoList &list)
DiscoList::ConstIterator it = list.begin();
for ( ; it != list.end(); ++it) {
- QDomElement w = doc()->createElement("item");
+ TQDomElement w = doc()->createElement("item");
w.setAttribute("jid", (*it).jid().full());
if ( !(*it).name().isEmpty() )
@@ -1941,7 +1941,7 @@ void JT_DiscoPublish::onGo ()
send(d->iq);
}
-bool JT_DiscoPublish::take(const QDomElement &x)
+bool JT_DiscoPublish::take(const TQDomElement &x)
{
if(!iqVerify(x, d->jid, id()))
return false;
@@ -1988,21 +1988,21 @@ void JT_MucPresence::pres(const Status &s)
if(!s.status().isEmpty())
tag.appendChild(textTag(doc(), "status", s.status()));
- tag.appendChild( textTag(doc(), "priority", QString("%1").arg(s.priority()) ) );
+ tag.appendChild( textTag(doc(), "priority", TQString("%1").arg(s.priority()) ) );
if(!s.keyID().isEmpty()) {
- QDomElement x = textTag(doc(), "x", s.keyID());
+ TQDomElement x = textTag(doc(), "x", s.keyID());
x.setAttribute("xmlns", "http://jabber.org/protocol/e2e");
tag.appendChild(x);
}
if(!s.xsigned().isEmpty()) {
- QDomElement x = textTag(doc(), "x", s.xsigned());
+ TQDomElement x = textTag(doc(), "x", s.xsigned());
x.setAttribute("xmlns", "jabber:x:signed");
tag.appendChild(x);
}
if(!s.capsNode().isEmpty() && !s.capsVersion().isEmpty()) {
- QDomElement c = doc()->createElement("c");
+ TQDomElement c = doc()->createElement("c");
c.setAttribute("xmlns","http://jabber.org/protocol/caps");
c.setAttribute("node",s.capsNode());
c.setAttribute("ver",s.capsVersion());
@@ -2013,11 +2013,11 @@ void JT_MucPresence::pres(const Status &s)
}
}
-void JT_MucPresence::pres(const Jid &to, const Status &s, const QString &password)
+void JT_MucPresence::pres(const Jid &to, const Status &s, const TQString &password)
{
pres(s);
tag.setAttribute("to", to.full());
- QDomElement x = textTag(doc(), "x", s.xsigned());
+ TQDomElement x = textTag(doc(), "x", s.xsigned());
x.setAttribute("xmlns", "http://jabber.org/protocol/muc");
x.appendChild( textTag(doc(), "password", password.latin1()) );
tag.appendChild(x);
@@ -2038,8 +2038,8 @@ class JT_PrivateStorage::Private
public:
Private() : type(-1) {}
- QDomElement iq;
- QDomElement elem;
+ TQDomElement iq;
+ TQDomElement elem;
int type;
};
@@ -2054,27 +2054,27 @@ JT_PrivateStorage::~JT_PrivateStorage()
delete d;
}
-void JT_PrivateStorage::get(const QString& tag, const QString& xmlns)
+void JT_PrivateStorage::get(const TQString& tag, const TQString& xmlns)
{
d->type = 0;
- d->iq = createIQ(doc(), "get" , QString() , id() );
- QDomElement query = doc()->createElement("query");
+ d->iq = createIQ(doc(), "get" , TQString() , id() );
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:private");
d->iq.appendChild(query);
- QDomElement s = doc()->createElement(tag);
+ TQDomElement s = doc()->createElement(tag);
if(!xmlns.isEmpty())
s.setAttribute("xmlns", xmlns);
query.appendChild(s);
}
-void JT_PrivateStorage::set(const QDomElement& element)
+void JT_PrivateStorage::set(const TQDomElement& element)
{
d->type = 1;
d->elem=element;
- QDomNode n=doc()->importNode(element,true);
+ TQDomNode n=doc()->importNode(element,true);
- d->iq = createIQ(doc(), "set" , QString() , id() );
- QDomElement query = doc()->createElement("query");
+ d->iq = createIQ(doc(), "set" , TQString() , id() );
+ TQDomElement query = doc()->createElement("query");
query.setAttribute("xmlns", "jabber:iq:private");
d->iq.appendChild(query);
query.appendChild(n);
@@ -2085,17 +2085,17 @@ void JT_PrivateStorage::onGo()
send(d->iq);
}
-bool JT_PrivateStorage::take(const QDomElement &x)
+bool JT_PrivateStorage::take(const TQDomElement &x)
{
- QString to = client()->host();
+ TQString to = client()->host();
if(!iqVerify(x, to, id()))
return false;
if(x.attribute("type") == "result") {
if(d->type == 0) {
- QDomElement q = queryTag(x);
- for(QDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQDomElement q = queryTag(x);
+ for(TQDomNode n = q.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
d->elem=i;
@@ -2113,7 +2113,7 @@ bool JT_PrivateStorage::take(const QDomElement &x)
}
-QDomElement JT_PrivateStorage::element( )
+TQDomElement JT_PrivateStorage::element( )
{
return d->elem;
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h
index bf1cc44d..c8085013 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_tasks.h
@@ -21,8 +21,8 @@
#ifndef JABBER_TASKS_H
#define JABBER_TASKS_H
-#include<qstring.h>
-#include<qdom.h>
+#include<tqstring.h>
+#include<tqdom.h>
#include"im.h"
#include"xmpp_vcard.h"
@@ -39,8 +39,8 @@ namespace XMPP
JT_Register(Task *parent);
~JT_Register();
- void reg(const QString &user, const QString &pass);
- void changepw(const QString &pass);
+ void reg(const TQString &user, const TQString &pass);
+ void changepw(const TQString &pass);
void unreg(const Jid &j="");
const Form & form() const;
@@ -48,10 +48,10 @@ namespace XMPP
void setForm(const Form &);
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
- QDomElement iq;
+ TQDomElement iq;
Jid to;
class Private;
@@ -86,20 +86,20 @@ namespace XMPP
~JT_Roster();
void get();
- void set(const Jid &, const QString &name, const QStringList &groups);
+ void set(const Jid &, const TQString &name, const TQStringList &groups);
void remove(const Jid &);
const Roster & roster() const;
- QString toString() const;
- bool fromString(const QString &);
+ TQString toString() const;
+ bool fromString(const TQString &);
void onGo();
- bool take(const QDomElement &x);
+ bool take(const TQDomElement &x);
private:
int type;
- QDomElement iq;
+ TQDomElement iq;
Jid to;
class Private;
@@ -113,7 +113,7 @@ namespace XMPP
JT_PushRoster(Task *parent);
~JT_PushRoster();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
signals:
void roster(const Roster &);
@@ -132,12 +132,12 @@ namespace XMPP
void pres(const Status &);
void pres(const Jid &, const Status &);
- void sub(const Jid &, const QString &subType);
+ void sub(const Jid &, const TQString &subType);
void onGo();
private:
- QDomElement tag;
+ TQDomElement tag;
int type;
class Private;
@@ -151,11 +151,11 @@ namespace XMPP
JT_PushPresence(Task *parent);
~JT_PushPresence();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
signals:
void presence(const Jid &, const Status &);
- void subscription(const Jid &, const QString &);
+ void subscription(const Jid &, const TQString &);
private:
class Private;
@@ -185,7 +185,7 @@ namespace XMPP
JT_PushMessage(Task *parent);
~JT_PushMessage();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
signals:
void message(const Message &);
@@ -205,16 +205,16 @@ namespace XMPP
void get(const Jid &);
int seconds() const;
- const QString &message() const;
+ const TQString &message() const;
void onGo();
- bool take(const QDomElement &x);
+ bool take(const TQDomElement &x);
private:
class Private;
Private *d;
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
};
@@ -229,13 +229,13 @@ namespace XMPP
const AgentList & agents() const;
void onGo();
- bool take(const QDomElement &x);
+ bool take(const TQDomElement &x);
private:
class Private;
Private *d;
- QDomElement iq;
+ TQDomElement iq;
Jid jid;
AgentList agentList;
};
@@ -254,7 +254,7 @@ namespace XMPP
const VCard & vcard() const;
void onGo();
- bool take(const QDomElement &x);
+ bool take(const TQDomElement &x);
private:
int type;
@@ -271,16 +271,16 @@ namespace XMPP
~JT_Search();
const Form & form() const;
- const QValueList<SearchResult> & results() const;
+ const TQValueList<SearchResult> & results() const;
void get(const Jid &);
void set(const Form &);
void onGo();
- bool take(const QDomElement &x);
+ bool take(const TQDomElement &x);
private:
- QDomElement iq;
+ TQDomElement iq;
int type;
class Private;
@@ -295,18 +295,18 @@ namespace XMPP
void get(const Jid &);
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
const Jid & jid() const;
- const QString & name() const;
- const QString & version() const;
- const QString & os() const;
+ const TQString & name() const;
+ const TQString & version() const;
+ const TQString & os() const;
private:
- QDomElement iq;
+ TQDomElement iq;
Jid j;
- QString v_name, v_ver, v_os;
+ TQString v_name, v_ver, v_os;
};
/*
class JT_ClientTime : public Task
@@ -316,14 +316,14 @@ namespace XMPP
JT_ClientTime(Task *, const Jid &);
void go();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
Jid j;
- QDateTime utc;
- QString timezone, display;
+ TQDateTime utc;
+ TQString timezone, display;
private:
- QDomElement iq;
+ TQDomElement iq;
};
*/
class JT_ServInfo : public Task
@@ -333,7 +333,7 @@ namespace XMPP
JT_ServInfo(Task *);
~JT_ServInfo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
};
class JT_Gateway : public Task
@@ -343,20 +343,20 @@ namespace XMPP
JT_Gateway(Task *);
void get(const Jid &);
- void set(const Jid &, const QString &prompt);
+ void set(const Jid &, const TQString &prompt);
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
Jid jid() const;
- QString desc() const;
- QString prompt() const;
+ TQString desc() const;
+ TQString prompt() const;
private:
- QDomElement iq;
+ TQDomElement iq;
int type;
Jid v_jid;
- QString v_prompt, v_desc;
+ TQString v_prompt, v_desc;
};
class JT_Browse : public Task
@@ -372,13 +372,13 @@ namespace XMPP
const AgentItem & root() const;
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
class Private;
Private *d;
- AgentItem browseHelper (const QDomElement &i);
+ AgentItem browseHelper (const TQDomElement &i);
};
class JT_DiscoItems : public Task
@@ -388,13 +388,13 @@ namespace XMPP
JT_DiscoItems(Task *);
~JT_DiscoItems();
- void get(const Jid &, const QString &node = QString::null);
+ void get(const Jid &, const TQString &node = TQString::null);
void get(const DiscoItem &);
const DiscoList &items() const;
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
class Private;
@@ -408,15 +408,15 @@ namespace XMPP
JT_DiscoInfo(Task *);
~JT_DiscoInfo();
- void get(const Jid &, const QString &node = QString::null, const DiscoItem::Identity = DiscoItem::Identity());
+ void get(const Jid &, const TQString &node = TQString::null, const DiscoItem::Identity = DiscoItem::Identity());
void get(const DiscoItem &);
const DiscoItem &item() const;
const Jid& jid() const;
- const QString& node() const;
+ const TQString& node() const;
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
class Private;
@@ -433,7 +433,7 @@ namespace XMPP
void set(const Jid &, const DiscoList &);
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
class Private;
@@ -448,12 +448,12 @@ namespace XMPP
~JT_MucPresence();
void pres(const Status &);
- void pres(const Jid &, const Status &, const QString &password);
+ void pres(const Jid &, const Status &, const TQString &password);
void onGo();
private:
- QDomElement tag;
+ TQDomElement tag;
int type;
class Private;
@@ -467,13 +467,13 @@ namespace XMPP
JT_PrivateStorage(Task *parent);
~JT_PrivateStorage();
- void set(const QDomElement &);
- void get(const QString &tag, const QString& xmlns);
+ void set(const TQDomElement &);
+ void get(const TQString &tag, const TQString& xmlns);
- QDomElement element();
+ TQDomElement element();
void onGo();
- bool take(const QDomElement &);
+ bool take(const TQDomElement &);
private:
class Private;
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp
index e79d9b9f..5f5214fd 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.cpp
@@ -22,30 +22,30 @@
#include "base64.h"
-#include <qdom.h>
-#include <qdatetime.h>
+#include <tqdom.h>
+#include <tqdatetime.h>
-#include <qimage.h> // needed for image format recognition
-#include <qbuffer.h>
+#include <tqimage.h> // needed for image format recognition
+#include <tqbuffer.h>
// Justin's XML helper functions
-static QDomElement textTag(QDomDocument *doc, const QString &name, const QString &content)
+static TQDomElement textTag(TQDomDocument *doc, const TQString &name, const TQString &content)
{
- QDomElement tag = doc->createElement(name);
- QDomText text = doc->createTextNode(content);
+ TQDomElement tag = doc->createElement(name);
+ TQDomText text = doc->createTextNode(content);
tag.appendChild(text);
return tag;
}
-static QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found)
+static TQDomElement findSubTag(const TQDomElement &e, const TQString &name, bool *found)
{
if(found)
*found = FALSE;
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName().upper() == name.upper()) { // mblsha: ignore case when searching
@@ -55,33 +55,33 @@ static QDomElement findSubTag(const QDomElement &e, const QString &name, bool *f
}
}
- QDomElement tmp;
+ TQDomElement tmp;
return tmp;
}
// mblsha's own functions
-static QDomElement emptyTag(QDomDocument *doc, const QString &name)
+static TQDomElement emptyTag(TQDomDocument *doc, const TQString &name)
{
- QDomElement tag = doc->createElement(name);
+ TQDomElement tag = doc->createElement(name);
return tag;
}
-static bool hasSubTag(const QDomElement &e, const QString &name)
+static bool hasSubTag(const TQDomElement &e, const TQString &name)
{
bool found;
findSubTag(e, name, &found);
return found;
}
-static QString subTagText(const QDomElement &e, const QString &name)
+static TQString subTagText(const TQDomElement &e, const TQString &name)
{
bool found;
- QDomElement i = findSubTag(e, name, &found);
+ TQDomElement i = findSubTag(e, name, &found);
if ( found )
return i.text().stripWhiteSpace();
- return QString::null;
+ return TQString::null;
}
using namespace XMPP;
@@ -89,11 +89,11 @@ using namespace XMPP;
//----------------------------------------------------------------------------
// VCard
//----------------------------------------------------------------------------
-static QString image2type(const QByteArray &ba)
+static TQString image2type(const TQByteArray &ba)
{
- QBuffer buf(ba);
+ TQBuffer buf(ba);
buf.open(IO_ReadOnly);
- QString format = QImageIO::imageFormat( &buf );
+ TQString format = TQImageIO::imageFormat( &buf );
// TODO: add more formats
if ( format == "PNG" || format == "PsiPNG" )
@@ -117,9 +117,9 @@ static QString image2type(const QByteArray &ba)
}
// Long lines of encoded binary data SHOULD BE folded to 75 characters using the folding method defined in [MIME-DIR].
-static QString foldString(const QString &s)
+static TQString foldString(const TQString &s)
{
- QString ret;
+ TQString ret;
for (int i = 0; i < (int)s.length(); i++) {
if ( !(i % 75) )
@@ -136,47 +136,47 @@ public:
Private();
~Private();
- QString version;
- QString fullName;
- QString familyName, givenName, middleName, prefixName, suffixName;
- QString nickName;
+ TQString version;
+ TQString fullName;
+ TQString familyName, givenName, middleName, prefixName, suffixName;
+ TQString nickName;
- QByteArray photo;
- QString photoURI;
+ TQByteArray photo;
+ TQString photoURI;
- QString bday;
+ TQString bday;
AddressList addressList;
LabelList labelList;
PhoneList phoneList;
EmailList emailList;
- QString jid;
- QString mailer;
- QString timezone;
+ TQString jid;
+ TQString mailer;
+ TQString timezone;
Geo geo;
- QString title;
- QString role;
+ TQString title;
+ TQString role;
- QByteArray logo;
- QString logoURI;
+ TQByteArray logo;
+ TQString logoURI;
VCard *agent;
- QString agentURI;
+ TQString agentURI;
Org org;
- QStringList categories;
- QString note;
- QString prodId;
- QString rev;
- QString sortString;
-
- QByteArray sound;
- QString soundURI, soundPhonetic;
-
- QString uid;
- QString url;
- QString desc;
+ TQStringList categories;
+ TQString note;
+ TQString prodId;
+ TQString rev;
+ TQString sortString;
+
+ TQByteArray sound;
+ TQString soundURI, soundPhonetic;
+
+ TQString uid;
+ TQString url;
+ TQString desc;
PrivacyClass privacyClass;
- QByteArray key;
+ TQByteArray key;
bool isEmpty();
};
@@ -263,9 +263,9 @@ VCard::~VCard()
delete d;
}
-QDomElement VCard::toXml(QDomDocument *doc) const
+TQDomElement VCard::toXml(TQDomDocument *doc) const
{
- QDomElement v = doc->createElement("vCard");
+ TQDomElement v = doc->createElement("vCard");
v.setAttribute("version", "2.0");
v.setAttribute("prodid", "-//HandGen//NONSGML vGen v1.0//EN");
v.setAttribute("xmlns", "vcard-temp");
@@ -277,7 +277,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
if ( !d->familyName.isEmpty() || !d->givenName.isEmpty() || !d->middleName.isEmpty() ||
!d->prefixName.isEmpty() || !d->suffixName.isEmpty() ) {
- QDomElement w = doc->createElement("N");
+ TQDomElement w = doc->createElement("N");
if ( !d->familyName.isEmpty() )
w.appendChild( textTag(doc, "FAMILY", d->familyName) );
@@ -297,7 +297,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
v.appendChild( textTag(doc, "NICKNAME", d->nickName) );
if ( !d->photo.isEmpty() || !d->photoURI.isEmpty() ) {
- QDomElement w = doc->createElement("PHOTO");
+ TQDomElement w = doc->createElement("PHOTO");
if ( !d->photo.isEmpty() ) {
w.appendChild( textTag(doc, "TYPE", image2type(d->photo)) );
@@ -315,7 +315,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
if ( !d->addressList.isEmpty() ) {
AddressList::Iterator it = d->addressList.begin();
for ( ; it != d->addressList.end(); ++it ) {
- QDomElement w = doc->createElement("ADR");
+ TQDomElement w = doc->createElement("ADR");
Address a = *it;
if ( a.home )
@@ -355,7 +355,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
if ( !d->labelList.isEmpty() ) {
LabelList::Iterator it = d->labelList.begin();
for ( ; it != d->labelList.end(); ++it ) {
- QDomElement w = doc->createElement("LABEL");
+ TQDomElement w = doc->createElement("LABEL");
Label l = *it;
if ( l.home )
@@ -374,7 +374,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
w.appendChild( emptyTag(doc, "PREF") );
if ( !l.lines.isEmpty() ) {
- QStringList::Iterator it = l.lines.begin();
+ TQStringList::Iterator it = l.lines.begin();
for ( ; it != l.lines.end(); ++it )
w.appendChild( textTag(doc, "LINE", *it) );
}
@@ -386,7 +386,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
if ( !d->phoneList.isEmpty() ) {
PhoneList::Iterator it = d->phoneList.begin();
for ( ; it != d->phoneList.end(); ++it ) {
- QDomElement w = doc->createElement("TEL");
+ TQDomElement w = doc->createElement("TEL");
Phone p = *it;
if ( p.home )
@@ -426,7 +426,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
if ( !d->emailList.isEmpty() ) {
EmailList::Iterator it = d->emailList.begin();
for ( ; it != d->emailList.end(); ++it ) {
- QDomElement w = doc->createElement("EMAIL");
+ TQDomElement w = doc->createElement("EMAIL");
Email e = *it;
if ( e.home )
@@ -453,7 +453,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
v.appendChild( textTag(doc, "TZ", d->timezone) );
if ( !d->geo.lat.isEmpty() || !d->geo.lon.isEmpty() ) {
- QDomElement w = doc->createElement("GEO");
+ TQDomElement w = doc->createElement("GEO");
if ( !d->geo.lat.isEmpty() )
w.appendChild( textTag(doc, "LAT", d->geo.lat) );
@@ -469,7 +469,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
v.appendChild( textTag(doc, "ROLE", d->role) );
if ( !d->logo.isEmpty() || !d->logoURI.isEmpty() ) {
- QDomElement w = doc->createElement("LOGO");
+ TQDomElement w = doc->createElement("LOGO");
if ( !d->logo.isEmpty() ) {
w.appendChild( textTag(doc, "TYPE", image2type(d->logo)) );
@@ -482,7 +482,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
}
if ( !d->agentURI.isEmpty() || (d->agent && d->agent->isEmpty()) ) {
- QDomElement w = doc->createElement("AGENT");
+ TQDomElement w = doc->createElement("AGENT");
if ( d->agent && !d->agent->isEmpty() )
w.appendChild( d->agent->toXml(doc) );
@@ -493,13 +493,13 @@ QDomElement VCard::toXml(QDomDocument *doc) const
}
if ( !d->org.name.isEmpty() || !d->org.unit.isEmpty() ) {
- QDomElement w = doc->createElement("ORG");
+ TQDomElement w = doc->createElement("ORG");
if ( !d->org.name.isEmpty() )
w.appendChild( textTag(doc, "ORGNAME", d->org.name) );
if ( !d->org.unit.isEmpty() ) {
- QStringList::Iterator it = d->org.unit.begin();
+ TQStringList::Iterator it = d->org.unit.begin();
for ( ; it != d->org.unit.end(); ++it )
w.appendChild( textTag(doc, "ORGUNIT", *it) );
}
@@ -508,9 +508,9 @@ QDomElement VCard::toXml(QDomDocument *doc) const
}
if ( !d->categories.isEmpty() ) {
- QDomElement w = doc->createElement("CATEGORIES");
+ TQDomElement w = doc->createElement("CATEGORIES");
- QStringList::Iterator it = d->categories.begin();
+ TQStringList::Iterator it = d->categories.begin();
for ( ; it != d->categories.end(); ++it )
w.appendChild( textTag(doc, "KEYWORD", *it) );
@@ -527,7 +527,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
v.appendChild( textTag(doc, "SORT-STRING", d->sortString) );
if ( !d->sound.isEmpty() || !d->soundURI.isEmpty() || !d->soundPhonetic.isEmpty() ) {
- QDomElement w = doc->createElement("SOUND");
+ TQDomElement w = doc->createElement("SOUND");
if ( !d->sound.isEmpty() )
w.appendChild( textTag(doc, "BINVAL", foldString( Base64::arrayToString(d->sound)) ) );
@@ -547,7 +547,7 @@ QDomElement VCard::toXml(QDomDocument *doc) const
v.appendChild( textTag(doc, "DESC", d->desc) );
if ( d->privacyClass != pcNone ) {
- QDomElement w = doc->createElement("CLASS");
+ TQDomElement w = doc->createElement("CLASS");
if ( d->privacyClass == pcPublic )
w.appendChild( emptyTag(doc, "PUBLIC") );
@@ -560,11 +560,11 @@ QDomElement VCard::toXml(QDomDocument *doc) const
}
if ( !d->key.isEmpty() ) {
- QDomElement w = doc->createElement("KEY");
+ TQDomElement w = doc->createElement("KEY");
// TODO: Justin, please check out this code
w.appendChild( textTag(doc, "TYPE", "text/plain")); // FIXME
- w.appendChild( textTag(doc, "CRED", QString::fromUtf8(d->key)) ); // FIXME
+ w.appendChild( textTag(doc, "CRED", TQString::fromUtf8(d->key)) ); // FIXME
v.appendChild(w);
}
@@ -572,21 +572,21 @@ QDomElement VCard::toXml(QDomDocument *doc) const
return v;
}
-bool VCard::fromXml(const QDomElement &q)
+bool VCard::fromXml(const TQDomElement &q)
{
if ( q.tagName().upper() != "VCARD" )
return false;
- QDomNode n = q.firstChild();
+ TQDomNode n = q.firstChild();
for ( ; !n.isNull(); n = n.nextSibling() ) {
- QDomElement i = n.toElement();
+ TQDomElement i = n.toElement();
if ( i.isNull() )
continue;
- QString tag = i.tagName().upper();
+ TQString tag = i.tagName().upper();
bool found;
- QDomElement e;
+ TQDomElement e;
if ( tag == "VERSION" )
d->version = i.text().stripWhiteSpace();
@@ -647,9 +647,9 @@ bool VCard::fromXml(const QDomElement &q)
l.intl = hasSubTag(i, "INTL");
l.pref = hasSubTag(i, "PREF");
- QDomNode nn = i.firstChild();
+ TQDomNode nn = i.firstChild();
for ( ; !nn.isNull(); nn = nn.nextSibling() ) {
- QDomElement ii = nn.toElement();
+ TQDomElement ii = nn.toElement();
if ( ii.isNull() )
continue;
@@ -734,9 +734,9 @@ bool VCard::fromXml(const QDomElement &q)
else if ( tag == "ORG" ) {
d->org.name = subTagText(i, "ORGNAME");
- QDomNode nn = i.firstChild();
+ TQDomNode nn = i.firstChild();
for ( ; !nn.isNull(); nn = nn.nextSibling() ) {
- QDomElement ii = nn.toElement();
+ TQDomElement ii = nn.toElement();
if ( ii.isNull() )
continue;
@@ -745,9 +745,9 @@ bool VCard::fromXml(const QDomElement &q)
}
}
else if ( tag == "CATEGORIES") {
- QDomNode nn = i.firstChild();
+ TQDomNode nn = i.firstChild();
for ( ; !nn.isNull(); nn = nn.nextSibling() ) {
- QDomElement ee = nn.toElement();
+ TQDomElement ee = nn.toElement();
if ( ee.isNull() )
continue;
@@ -785,7 +785,7 @@ bool VCard::fromXml(const QDomElement &q)
else if ( tag == "KEY" ) {
// TODO: Justin, please check out this code
e = findSubTag(i, "TYPE", &found);
- QString type = "text/plain";
+ TQString type = "text/plain";
if ( found )
type = e.text().stripWhiteSpace();
@@ -838,122 +838,122 @@ VCard::Org::Org()
// vCard properties...
-const QString &VCard::version() const
+const TQString &VCard::version() const
{
return d->version;
}
-void VCard::setVersion(const QString &v)
+void VCard::setVersion(const TQString &v)
{
d->version = v;
}
-const QString &VCard::fullName() const
+const TQString &VCard::fullName() const
{
return d->fullName;
}
-void VCard::setFullName(const QString &n)
+void VCard::setFullName(const TQString &n)
{
d->fullName = n;
}
-const QString &VCard::familyName() const
+const TQString &VCard::familyName() const
{
return d->familyName;
}
-void VCard::setFamilyName(const QString &n)
+void VCard::setFamilyName(const TQString &n)
{
d->familyName = n;
}
-const QString &VCard::givenName() const
+const TQString &VCard::givenName() const
{
return d->givenName;
}
-void VCard::setGivenName(const QString &n)
+void VCard::setGivenName(const TQString &n)
{
d->givenName = n;
}
-const QString &VCard::middleName() const
+const TQString &VCard::middleName() const
{
return d->middleName;
}
-void VCard::setMiddleName(const QString &n)
+void VCard::setMiddleName(const TQString &n)
{
d->middleName = n;
}
-const QString &VCard::prefixName() const
+const TQString &VCard::prefixName() const
{
return d->prefixName;
}
-void VCard::setPrefixName(const QString &p)
+void VCard::setPrefixName(const TQString &p)
{
d->prefixName = p;
}
-const QString &VCard::suffixName() const
+const TQString &VCard::suffixName() const
{
return d->suffixName;
}
-void VCard::setSuffixName(const QString &s)
+void VCard::setSuffixName(const TQString &s)
{
d->suffixName = s;
}
-const QString &VCard::nickName() const
+const TQString &VCard::nickName() const
{
return d->nickName;
}
-void VCard::setNickName(const QString &n)
+void VCard::setNickName(const TQString &n)
{
d->nickName = n;
}
-const QByteArray &VCard::photo() const
+const TQByteArray &VCard::photo() const
{
return d->photo;
}
-void VCard::setPhoto(const QByteArray &i)
+void VCard::setPhoto(const TQByteArray &i)
{
d->photo = i;
}
-const QString &VCard::photoURI() const
+const TQString &VCard::photoURI() const
{
return d->photoURI;
}
-void VCard::setPhotoURI(const QString &p)
+void VCard::setPhotoURI(const TQString &p)
{
d->photoURI = p;
}
-const QDate VCard::bday() const
+const TQDate VCard::bday() const
{
- return QDate::fromString(d->bday);
+ return TQDate::fromString(d->bday);
}
-void VCard::setBday(const QDate &date)
+void VCard::setBday(const TQDate &date)
{
d->bday = date.toString();
}
-const QString &VCard::bdayStr() const
+const TQString &VCard::bdayStr() const
{
return d->bday;
}
-void VCard::setBdayStr(const QString &date)
+void VCard::setBdayStr(const TQString &date)
{
d->bday = date;
}
@@ -998,32 +998,32 @@ void VCard::setEmailList(const VCard::EmailList &e)
d->emailList = e;
}
-const QString &VCard::jid() const
+const TQString &VCard::jid() const
{
return d->jid;
}
-void VCard::setJid(const QString &j)
+void VCard::setJid(const TQString &j)
{
d->jid = j;
}
-const QString &VCard::mailer() const
+const TQString &VCard::mailer() const
{
return d->mailer;
}
-void VCard::setMailer(const QString &m)
+void VCard::setMailer(const TQString &m)
{
d->mailer = m;
}
-const QString &VCard::timezone() const
+const TQString &VCard::timezone() const
{
return d->timezone;
}
-void VCard::setTimezone(const QString &t)
+void VCard::setTimezone(const TQString &t)
{
d->timezone = t;
}
@@ -1038,42 +1038,42 @@ void VCard::setGeo(const VCard::Geo &g)
d->geo = g;
}
-const QString &VCard::title() const
+const TQString &VCard::title() const
{
return d->title;
}
-void VCard::setTitle(const QString &t)
+void VCard::setTitle(const TQString &t)
{
d->title = t;
}
-const QString &VCard::role() const
+const TQString &VCard::role() const
{
return d->role;
}
-void VCard::setRole(const QString &r)
+void VCard::setRole(const TQString &r)
{
d->role = r;
}
-const QByteArray &VCard::logo() const
+const TQByteArray &VCard::logo() const
{
return d->logo;
}
-void VCard::setLogo(const QByteArray &i)
+void VCard::setLogo(const TQByteArray &i)
{
d->logo = i;
}
-const QString &VCard::logoURI() const
+const TQString &VCard::logoURI() const
{
return d->logoURI;
}
-void VCard::setLogoURI(const QString &l)
+void VCard::setLogoURI(const TQString &l)
{
d->logoURI = l;
}
@@ -1090,12 +1090,12 @@ void VCard::setAgent(const VCard &v)
*(d->agent) = v;
}
-const QString VCard::agentURI() const
+const TQString VCard::agentURI() const
{
return d->agentURI;
}
-void VCard::setAgentURI(const QString &a)
+void VCard::setAgentURI(const TQString &a)
{
d->agentURI = a;
}
@@ -1110,112 +1110,112 @@ void VCard::setOrg(const VCard::Org &o)
d->org = o;
}
-const QStringList &VCard::categories() const
+const TQStringList &VCard::categories() const
{
return d->categories;
}
-void VCard::setCategories(const QStringList &c)
+void VCard::setCategories(const TQStringList &c)
{
d->categories = c;
}
-const QString &VCard::note() const
+const TQString &VCard::note() const
{
return d->note;
}
-void VCard::setNote(const QString &n)
+void VCard::setNote(const TQString &n)
{
d->note = n;
}
-const QString &VCard::prodId() const
+const TQString &VCard::prodId() const
{
return d->prodId;
}
-void VCard::setProdId(const QString &p)
+void VCard::setProdId(const TQString &p)
{
d->prodId = p;
}
-const QString &VCard::rev() const
+const TQString &VCard::rev() const
{
return d->rev;
}
-void VCard::setRev(const QString &r)
+void VCard::setRev(const TQString &r)
{
d->rev = r;
}
-const QString &VCard::sortString() const
+const TQString &VCard::sortString() const
{
return d->sortString;
}
-void VCard::setSortString(const QString &s)
+void VCard::setSortString(const TQString &s)
{
d->sortString = s;
}
-const QByteArray &VCard::sound() const
+const TQByteArray &VCard::sound() const
{
return d->sound;
}
-void VCard::setSound(const QByteArray &s)
+void VCard::setSound(const TQByteArray &s)
{
d->sound = s;
}
-const QString &VCard::soundURI() const
+const TQString &VCard::soundURI() const
{
return d->soundURI;
}
-void VCard::setSoundURI(const QString &s)
+void VCard::setSoundURI(const TQString &s)
{
d->soundURI = s;
}
-const QString &VCard::soundPhonetic() const
+const TQString &VCard::soundPhonetic() const
{
return d->soundPhonetic;
}
-void VCard::setSoundPhonetic(const QString &s)
+void VCard::setSoundPhonetic(const TQString &s)
{
d->soundPhonetic = s;
}
-const QString &VCard::uid() const
+const TQString &VCard::uid() const
{
return d->uid;
}
-void VCard::setUid(const QString &u)
+void VCard::setUid(const TQString &u)
{
d->uid = u;
}
-const QString &VCard::url() const
+const TQString &VCard::url() const
{
return d->url;
}
-void VCard::setUrl(const QString &u)
+void VCard::setUrl(const TQString &u)
{
d->url = u;
}
-const QString &VCard::desc() const
+const TQString &VCard::desc() const
{
return d->desc;
}
-void VCard::setDesc(const QString &desc)
+void VCard::setDesc(const TQString &desc)
{
d->desc = desc;
}
@@ -1230,12 +1230,12 @@ void VCard::setPrivacyClass(const VCard::PrivacyClass &c)
d->privacyClass = c;
}
-const QByteArray &VCard::key() const
+const TQByteArray &VCard::key() const
{
return d->key;
}
-void VCard::setKey(const QByteArray &k)
+void VCard::setKey(const TQByteArray &k)
{
d->key = k;
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.h b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.h
index 4a097251..885e08a9 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_vcard.h
@@ -21,12 +21,12 @@
#ifndef JABBER_VCARD_H
#define JABBER_VCARD_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqcstring.h>
-#include <qvaluelist.h>
-#include <qdom.h>
+#include <tqvaluelist.h>
+#include <tqdom.h>
class QDate;
@@ -40,49 +40,49 @@ namespace XMPP
VCard & operator=(const VCard &);
~VCard();
- QDomElement toXml(QDomDocument *) const;
- bool fromXml(const QDomElement &);
+ TQDomElement toXml(TQDomDocument *) const;
+ bool fromXml(const TQDomElement &);
bool isEmpty() const;
- const QString &version() const;
- void setVersion(const QString &);
+ const TQString &version() const;
+ void setVersion(const TQString &);
- const QString &fullName() const;
- void setFullName(const QString &);
+ const TQString &fullName() const;
+ void setFullName(const TQString &);
- const QString &familyName() const;
- void setFamilyName(const QString &);
+ const TQString &familyName() const;
+ void setFamilyName(const TQString &);
- const QString &givenName() const;
- void setGivenName(const QString &);
+ const TQString &givenName() const;
+ void setGivenName(const TQString &);
- const QString &middleName() const;
- void setMiddleName(const QString &);
+ const TQString &middleName() const;
+ void setMiddleName(const TQString &);
- const QString &prefixName() const;
- void setPrefixName(const QString &);
+ const TQString &prefixName() const;
+ void setPrefixName(const TQString &);
- const QString &suffixName() const;
- void setSuffixName(const QString &);
+ const TQString &suffixName() const;
+ void setSuffixName(const TQString &);
- const QString &nickName() const;
- void setNickName(const QString &);
+ const TQString &nickName() const;
+ void setNickName(const TQString &);
- const QByteArray &photo() const;
- void setPhoto(const QByteArray &);
+ const TQByteArray &photo() const;
+ void setPhoto(const TQByteArray &);
- const QString &photoURI() const;
- void setPhotoURI(const QString &);
+ const TQString &photoURI() const;
+ void setPhotoURI(const TQString &);
- const QDate bday() const;
- void setBday(const QDate &);
+ const TQDate bday() const;
+ void setBday(const TQDate &);
- const QString &bdayStr() const;
- void setBdayStr(const QString &);
+ const TQString &bdayStr() const;
+ void setBdayStr(const TQString &);
class Address {
@@ -99,15 +99,15 @@ namespace XMPP
bool pref;
- QString pobox;
- QString extaddr;
- QString street;
- QString locality;
- QString region;
- QString pcode;
- QString country;
+ TQString pobox;
+ TQString extaddr;
+ TQString street;
+ TQString locality;
+ TQString region;
+ TQString pcode;
+ TQString country;
};
- typedef QValueList<Address> AddressList;
+ typedef TQValueList<Address> AddressList;
const AddressList &addressList() const;
void setAddressList(const AddressList &);
@@ -125,9 +125,9 @@ namespace XMPP
bool pref;
- QStringList lines;
+ TQStringList lines;
};
- typedef QValueList<Label> LabelList;
+ typedef TQValueList<Label> LabelList;
const LabelList &labelList() const;
void setLabelList(const LabelList &);
@@ -150,9 +150,9 @@ namespace XMPP
bool pcs;
bool pref;
- QString number;
+ TQString number;
};
- typedef QValueList<Phone> PhoneList;
+ typedef TQValueList<Phone> PhoneList;
const PhoneList &phoneList() const;
void setPhoneList(const PhoneList &);
@@ -166,100 +166,100 @@ namespace XMPP
bool internet;
bool x400;
- QString userid;
+ TQString userid;
};
- typedef QValueList<Email> EmailList;
+ typedef TQValueList<Email> EmailList;
const EmailList &emailList() const;
void setEmailList(const EmailList &);
- const QString &jid() const;
- void setJid(const QString &);
+ const TQString &jid() const;
+ void setJid(const TQString &);
- const QString &mailer() const;
- void setMailer(const QString &);
+ const TQString &mailer() const;
+ void setMailer(const TQString &);
- const QString &timezone() const;
- void setTimezone(const QString &);
+ const TQString &timezone() const;
+ void setTimezone(const TQString &);
class Geo {
public:
Geo();
- QString lat;
- QString lon;
+ TQString lat;
+ TQString lon;
};
const Geo &geo() const;
void setGeo(const Geo &);
- const QString &title() const;
- void setTitle(const QString &);
+ const TQString &title() const;
+ void setTitle(const TQString &);
- const QString &role() const;
- void setRole(const QString &);
+ const TQString &role() const;
+ void setRole(const TQString &);
- const QByteArray &logo() const;
- void setLogo(const QByteArray &);
+ const TQByteArray &logo() const;
+ void setLogo(const TQByteArray &);
- const QString &logoURI() const;
- void setLogoURI(const QString &);
+ const TQString &logoURI() const;
+ void setLogoURI(const TQString &);
const VCard *agent() const;
void setAgent(const VCard &);
- const QString agentURI() const;
- void setAgentURI(const QString &);
+ const TQString agentURI() const;
+ void setAgentURI(const TQString &);
class Org {
public:
Org();
- QString name;
- QStringList unit;
+ TQString name;
+ TQStringList unit;
};
const Org &org() const;
void setOrg(const Org &);
- const QStringList &categories() const;
- void setCategories(const QStringList &);
+ const TQStringList &categories() const;
+ void setCategories(const TQStringList &);
- const QString &note() const;
- void setNote(const QString &);
+ const TQString &note() const;
+ void setNote(const TQString &);
- const QString &prodId() const; // it must equal to "Psi" ;-)
- void setProdId(const QString &);
+ const TQString &prodId() const; // it must equal to "Psi" ;-)
+ void setProdId(const TQString &);
- const QString &rev() const;
- void setRev(const QString &);
+ const TQString &rev() const;
+ void setRev(const TQString &);
- const QString &sortString() const;
- void setSortString(const QString &);
+ const TQString &sortString() const;
+ void setSortString(const TQString &);
- const QByteArray &sound() const;
- void setSound(const QByteArray &);
+ const TQByteArray &sound() const;
+ void setSound(const TQByteArray &);
- const QString &soundURI() const;
- void setSoundURI(const QString &);
+ const TQString &soundURI() const;
+ void setSoundURI(const TQString &);
- const QString &soundPhonetic() const;
- void setSoundPhonetic(const QString &);
+ const TQString &soundPhonetic() const;
+ void setSoundPhonetic(const TQString &);
- const QString &uid() const;
- void setUid(const QString &);
+ const TQString &uid() const;
+ void setUid(const TQString &);
- const QString &url() const;
- void setUrl(const QString &);
+ const TQString &url() const;
+ void setUrl(const TQString &);
- const QString &desc() const;
- void setDesc(const QString &);
+ const TQString &desc() const;
+ void setDesc(const TQString &);
enum PrivacyClass {
@@ -272,8 +272,8 @@ namespace XMPP
void setPrivacyClass(const PrivacyClass &);
- const QByteArray &key() const;
- void setKey(const QByteArray &);
+ const TQByteArray &key() const;
+ void setKey(const TQByteArray &);
private:
class Private;
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp
index e22fc12d..d7b5c82d 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.cpp
@@ -20,17 +20,17 @@
#include"xmpp_xmlcommon.h"
-#include <qstring.h>
-#include <qdom.h>
-#include <qdatetime.h>
-#include <qsize.h>
-#include <qrect.h>
-#include <qstringlist.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqdom.h>
+#include <tqdatetime.h>
+#include <tqsize.h>
+#include <tqrect.h>
+#include <tqstringlist.h>
+#include <tqcolor.h>
#include"im.h"
-bool stamp2TS(const QString &ts, QDateTime *d)
+bool stamp2TS(const TQString &ts, TQDateTime *d)
{
if(ts.length() != 17)
return false;
@@ -43,12 +43,12 @@ bool stamp2TS(const QString &ts, QDateTime *d)
int min = ts.mid(12,2).toInt();
int sec = ts.mid(15,2).toInt();
- QDate xd;
+ TQDate xd;
xd.setYMD(year, month, day);
if(!xd.isValid())
return false;
- QTime xt;
+ TQTime xt;
xt.setHMS(hour, min, sec);
if(!xt.isValid())
return false;
@@ -59,9 +59,9 @@ bool stamp2TS(const QString &ts, QDateTime *d)
return true;
}
-QString TS2stamp(const QDateTime &d)
+TQString TS2stamp(const TQDateTime &d)
{
- QString str;
+ TQString str;
str.sprintf("%04d%02d%02dT%02d:%02d:%02d",
d.date().year(),
@@ -74,20 +74,20 @@ QString TS2stamp(const QDateTime &d)
return str;
}
-QDomElement textTag(QDomDocument *doc, const QString &name, const QString &content)
+TQDomElement textTag(TQDomDocument *doc, const TQString &name, const TQString &content)
{
- QDomElement tag = doc->createElement(name);
- QDomText text = doc->createTextNode(content);
+ TQDomElement tag = doc->createElement(name);
+ TQDomText text = doc->createTextNode(content);
tag.appendChild(text);
return tag;
}
-QString tagContent(const QDomElement &e)
+TQString tagContent(const TQDomElement &e)
{
// look for some tag content
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomText i = n.toText();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomText i = n.toText();
if(i.isNull())
continue;
return i.data();
@@ -96,13 +96,13 @@ QString tagContent(const QDomElement &e)
return "";
}
-QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found)
+TQDomElement findSubTag(const TQDomElement &e, const TQString &name, bool *found)
{
if(found)
*found = false;
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName() == name) {
@@ -112,13 +112,13 @@ QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found)
}
}
- QDomElement tmp;
+ TQDomElement tmp;
return tmp;
}
-QDomElement createIQ(QDomDocument *doc, const QString &type, const QString &to, const QString &id)
+TQDomElement createIQ(TQDomDocument *doc, const TQString &type, const TQString &to, const TQString &id)
{
- QDomElement iq = doc->createElement("iq");
+ TQDomElement iq = doc->createElement("iq");
if(!type.isEmpty())
iq.setAttribute("type", type);
if(!to.isEmpty())
@@ -129,27 +129,27 @@ QDomElement createIQ(QDomDocument *doc, const QString &type, const QString &to,
return iq;
}
-QDomElement queryTag(const QDomElement &e)
+TQDomElement queryTag(const TQDomElement &e)
{
bool found;
- QDomElement q = findSubTag(e, "query", &found);
+ TQDomElement q = findSubTag(e, "query", &found);
return q;
}
-QString queryNS(const QDomElement &e)
+TQString queryNS(const TQDomElement &e)
{
bool found;
- QDomElement q = findSubTag(e, "query", &found);
+ TQDomElement q = findSubTag(e, "query", &found);
if(found)
return q.attribute("xmlns");
return "";
}
-void getErrorFromElement(const QDomElement &e, int *code, QString *str)
+void getErrorFromElement(const TQDomElement &e, int *code, TQString *str)
{
bool found;
- QDomElement tag = findSubTag(e, "error", &found);
+ TQDomElement tag = findSubTag(e, "error", &found);
if(!found)
return;
@@ -165,94 +165,94 @@ void getErrorFromElement(const QDomElement &e, int *code, QString *str)
namespace XMLHelper {
-QDomElement emptyTag(QDomDocument *doc, const QString &name)
+TQDomElement emptyTag(TQDomDocument *doc, const TQString &name)
{
- QDomElement tag = doc->createElement(name);
+ TQDomElement tag = doc->createElement(name);
return tag;
}
-bool hasSubTag(const QDomElement &e, const QString &name)
+bool hasSubTag(const TQDomElement &e, const TQString &name)
{
bool found;
findSubTag(e, name, &found);
return found;
}
-QString subTagText(const QDomElement &e, const QString &name)
+TQString subTagText(const TQDomElement &e, const TQString &name)
{
bool found;
- QDomElement i = findSubTag(e, name, &found);
+ TQDomElement i = findSubTag(e, name, &found);
if ( found )
return i.text();
- return QString::null;
+ return TQString::null;
}
-QDomElement textTag(QDomDocument &doc, const QString &name, const QString &content)
+TQDomElement textTag(TQDomDocument &doc, const TQString &name, const TQString &content)
{
- QDomElement tag = doc.createElement(name);
- QDomText text = doc.createTextNode(content);
+ TQDomElement tag = doc.createElement(name);
+ TQDomText text = doc.createTextNode(content);
tag.appendChild(text);
return tag;
}
-QDomElement textTag(QDomDocument &doc, const QString &name, int content)
+TQDomElement textTag(TQDomDocument &doc, const TQString &name, int content)
{
- QDomElement tag = doc.createElement(name);
- QDomText text = doc.createTextNode(QString::number(content));
+ TQDomElement tag = doc.createElement(name);
+ TQDomText text = doc.createTextNode(TQString::number(content));
tag.appendChild(text);
return tag;
}
-QDomElement textTag(QDomDocument &doc, const QString &name, bool content)
+TQDomElement textTag(TQDomDocument &doc, const TQString &name, bool content)
{
- QDomElement tag = doc.createElement(name);
- QDomText text = doc.createTextNode(content ? "true" : "false");
+ TQDomElement tag = doc.createElement(name);
+ TQDomText text = doc.createTextNode(content ? "true" : "false");
tag.appendChild(text);
return tag;
}
-QDomElement textTag(QDomDocument &doc, const QString &name, QSize &s)
+TQDomElement textTag(TQDomDocument &doc, const TQString &name, TQSize &s)
{
- QString str;
+ TQString str;
str.sprintf("%d,%d", s.width(), s.height());
- QDomElement tag = doc.createElement(name);
- QDomText text = doc.createTextNode(str);
+ TQDomElement tag = doc.createElement(name);
+ TQDomText text = doc.createTextNode(str);
tag.appendChild(text);
return tag;
}
-QDomElement textTag(QDomDocument &doc, const QString &name, QRect &r)
+TQDomElement textTag(TQDomDocument &doc, const TQString &name, TQRect &r)
{
- QString str;
+ TQString str;
str.sprintf("%d,%d,%d,%d", r.x(), r.y(), r.width(), r.height());
- QDomElement tag = doc.createElement(name);
- QDomText text = doc.createTextNode(str);
+ TQDomElement tag = doc.createElement(name);
+ TQDomText text = doc.createTextNode(str);
tag.appendChild(text);
return tag;
}
-QDomElement stringListToXml(QDomDocument &doc, const QString &name, const QStringList &l)
+TQDomElement stringListToXml(TQDomDocument &doc, const TQString &name, const TQStringList &l)
{
- QDomElement tag = doc.createElement(name);
- for(QStringList::ConstIterator it = l.begin(); it != l.end(); ++it)
+ TQDomElement tag = doc.createElement(name);
+ for(TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it)
tag.appendChild(textTag(doc, "item", *it));
return tag;
}
-/*QString tagContent(const QDomElement &e)
+/*TQString tagContent(const TQDomElement &e)
{
// look for some tag content
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomText i = n.toText();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomText i = n.toText();
if(i.isNull())
continue;
return i.data();
@@ -261,13 +261,13 @@ QDomElement stringListToXml(QDomDocument &doc, const QString &name, const QStrin
return "";
}*/
-/*QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found)
+/*TQDomElement findSubTag(const TQDomElement &e, const TQString &name, bool *found)
{
if(found)
*found = FALSE;
- for(QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ for(TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName() == name) {
@@ -277,62 +277,62 @@ QDomElement stringListToXml(QDomDocument &doc, const QString &name, const QStrin
}
}
- QDomElement tmp;
+ TQDomElement tmp;
return tmp;
}*/
-void readEntry(const QDomElement &e, const QString &name, QString *v)
+void readEntry(const TQDomElement &e, const TQString &name, TQString *v)
{
bool found = FALSE;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
*v = tagContent(tag);
}
-void readNumEntry(const QDomElement &e, const QString &name, int *v)
+void readNumEntry(const TQDomElement &e, const TQString &name, int *v)
{
bool found = FALSE;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
*v = tagContent(tag).toInt();
}
-void readBoolEntry(const QDomElement &e, const QString &name, bool *v)
+void readBoolEntry(const TQDomElement &e, const TQString &name, bool *v)
{
bool found = FALSE;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
*v = (tagContent(tag) == "true") ? TRUE: FALSE;
}
-void readSizeEntry(const QDomElement &e, const QString &name, QSize *v)
+void readSizeEntry(const TQDomElement &e, const TQString &name, TQSize *v)
{
bool found = FALSE;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
- QStringList list = QStringList::split(',', tagContent(tag));
+ TQStringList list = TQStringList::split(',', tagContent(tag));
if(list.count() != 2)
return;
- QSize s;
+ TQSize s;
s.setWidth(list[0].toInt());
s.setHeight(list[1].toInt());
*v = s;
}
-void readRectEntry(const QDomElement &e, const QString &name, QRect *v)
+void readRectEntry(const TQDomElement &e, const TQString &name, TQRect *v)
{
bool found = FALSE;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
- QStringList list = QStringList::split(',', tagContent(tag));
+ TQStringList list = TQStringList::split(',', tagContent(tag));
if(list.count() != 4)
return;
- QRect r;
+ TQRect r;
r.setX(list[0].toInt());
r.setY(list[1].toInt());
r.setWidth(list[2].toInt());
@@ -340,27 +340,27 @@ void readRectEntry(const QDomElement &e, const QString &name, QRect *v)
*v = r;
}
-void readColorEntry(const QDomElement &e, const QString &name, QColor *v)
+void readColorEntry(const TQDomElement &e, const TQString &name, TQColor *v)
{
bool found = FALSE;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
- QColor c;
+ TQColor c;
c.setNamedColor(tagContent(tag));
if(c.isValid())
*v = c;
}
-void xmlToStringList(const QDomElement &e, const QString &name, QStringList *v)
+void xmlToStringList(const TQDomElement &e, const TQString &name, TQStringList *v)
{
bool found = false;
- QDomElement tag = findSubTag(e, name, &found);
+ TQDomElement tag = findSubTag(e, name, &found);
if(!found)
return;
- QStringList list;
- for(QDomNode n = tag.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement i = n.toElement();
+ TQStringList list;
+ for(TQDomNode n = tag.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement i = n.toElement();
if(i.isNull())
continue;
if(i.tagName() == "item")
@@ -369,15 +369,15 @@ void xmlToStringList(const QDomElement &e, const QString &name, QStringList *v)
*v = list;
}
-void setBoolAttribute(QDomElement e, const QString &name, bool b)
+void setBoolAttribute(TQDomElement e, const TQString &name, bool b)
{
e.setAttribute(name, b ? "true" : "false");
}
-void readBoolAttribute(QDomElement e, const QString &name, bool *v)
+void readBoolAttribute(TQDomElement e, const TQString &name, bool *v)
{
if(e.hasAttribute(name)) {
- QString s = e.attribute(name);
+ TQString s = e.attribute(name);
*v = (s == "true") ? TRUE: FALSE;
}
}
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h
index c3f089c7..926395e9 100644
--- a/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h
+++ b/kopete/protocols/jabber/libiris/iris/xmpp-im/xmpp_xmlcommon.h
@@ -21,7 +21,7 @@
#ifndef JABBER_XMLCOMMON_H
#define JABBER_XMLCOMMON_H
-#include<qdom.h>
+#include<tqdom.h>
class QDateTime;
class QRect;
@@ -29,43 +29,43 @@ class QSize;
class QColor;
class QStringList;
-bool stamp2TS(const QString &ts, QDateTime *d);
-QString TS2stamp(const QDateTime &d);
-QDomElement textTag(QDomDocument *doc, const QString &name, const QString &content);
-QString tagContent(const QDomElement &e);
-QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found);
-QDomElement createIQ(QDomDocument *doc, const QString &type, const QString &to, const QString &id);
-QDomElement queryTag(const QDomElement &e);
-QString queryNS(const QDomElement &e);
-void getErrorFromElement(const QDomElement &e, int *code, QString *str);
+bool stamp2TS(const TQString &ts, TQDateTime *d);
+TQString TS2stamp(const TQDateTime &d);
+TQDomElement textTag(TQDomDocument *doc, const TQString &name, const TQString &content);
+TQString tagContent(const TQDomElement &e);
+TQDomElement findSubTag(const TQDomElement &e, const TQString &name, bool *found);
+TQDomElement createIQ(TQDomDocument *doc, const TQString &type, const TQString &to, const TQString &id);
+TQDomElement queryTag(const TQDomElement &e);
+TQString queryNS(const TQDomElement &e);
+void getErrorFromElement(const TQDomElement &e, int *code, TQString *str);
namespace XMLHelper {
- //QDomElement findSubTag(const QDomElement &e, const QString &name, bool *found);
- bool hasSubTag(const QDomElement &e, const QString &name);
+ //TQDomElement findSubTag(const TQDomElement &e, const TQString &name, bool *found);
+ bool hasSubTag(const TQDomElement &e, const TQString &name);
- QDomElement emptyTag(QDomDocument *doc, const QString &name);
- QString subTagText(const QDomElement &e, const QString &name);
+ TQDomElement emptyTag(TQDomDocument *doc, const TQString &name);
+ TQString subTagText(const TQDomElement &e, const TQString &name);
- QDomElement textTag(QDomDocument &doc, const QString &name, const QString &content);
- QDomElement textTag(QDomDocument &doc, const QString &name, int content);
- QDomElement textTag(QDomDocument &doc, const QString &name, bool content);
- QDomElement textTag(QDomDocument &doc, const QString &name, QSize &s);
- QDomElement textTag(QDomDocument &doc, const QString &name, QRect &r);
- QDomElement stringListToXml(QDomDocument &doc, const QString &name, const QStringList &l);
+ TQDomElement textTag(TQDomDocument &doc, const TQString &name, const TQString &content);
+ TQDomElement textTag(TQDomDocument &doc, const TQString &name, int content);
+ TQDomElement textTag(TQDomDocument &doc, const TQString &name, bool content);
+ TQDomElement textTag(TQDomDocument &doc, const TQString &name, TQSize &s);
+ TQDomElement textTag(TQDomDocument &doc, const TQString &name, TQRect &r);
+ TQDomElement stringListToXml(TQDomDocument &doc, const TQString &name, const TQStringList &l);
- void readEntry(const QDomElement &e, const QString &name, QString *v);
- void readNumEntry(const QDomElement &e, const QString &name, int *v);
- void readBoolEntry(const QDomElement &e, const QString &name, bool *v);
- void readSizeEntry(const QDomElement &e, const QString &name, QSize *v);
- void readRectEntry(const QDomElement &e, const QString &name, QRect *v);
- void readColorEntry(const QDomElement &e, const QString &name, QColor *v);
+ void readEntry(const TQDomElement &e, const TQString &name, TQString *v);
+ void readNumEntry(const TQDomElement &e, const TQString &name, int *v);
+ void readBoolEntry(const TQDomElement &e, const TQString &name, bool *v);
+ void readSizeEntry(const TQDomElement &e, const TQString &name, TQSize *v);
+ void readRectEntry(const TQDomElement &e, const TQString &name, TQRect *v);
+ void readColorEntry(const TQDomElement &e, const TQString &name, TQColor *v);
- void xmlToStringList(const QDomElement &e, const QString &name, QStringList *v);
+ void xmlToStringList(const TQDomElement &e, const TQString &name, TQStringList *v);
- void setBoolAttribute(QDomElement e, const QString &name, bool b);
- void readBoolAttribute(QDomElement e, const QString &name, bool *v);
+ void setBoolAttribute(TQDomElement e, const TQString &name, bool b);
+ void readBoolAttribute(TQDomElement e, const TQString &name, bool *v);
- //QString tagContent(const QDomElement &e); // obsolete;
+ //TQString tagContent(const TQDomElement &e); // obsolete;
}
#endif
diff --git a/kopete/protocols/jabber/libiris/qca/src/qca.cpp b/kopete/protocols/jabber/libiris/qca/src/qca.cpp
index 51f8533b..4a197527 100644
--- a/kopete/protocols/jabber/libiris/qca/src/qca.cpp
+++ b/kopete/protocols/jabber/libiris/qca/src/qca.cpp
@@ -20,15 +20,15 @@
#include"qca.h"
-#include<qptrlist.h>
-#include<qdir.h>
-#include<qfileinfo.h>
-#include<qstringlist.h>
-#include<qlibrary.h>
-#include<qtimer.h>
-#include<qhostaddress.h>
-#include<qapplication.h>
-#include<qguardedptr.h>
+#include<tqptrlist.h>
+#include<tqdir.h>
+#include<tqfileinfo.h>
+#include<tqstringlist.h>
+#include<tqlibrary.h>
+#include<tqtimer.h>
+#include<tqhostaddress.h>
+#include<tqapplication.h>
+#include<tqguardedptr.h>
#include<stdlib.h>
#include"qcaprovider.h"
@@ -46,11 +46,11 @@ class ProviderItem
{
public:
QCAProvider *p;
- QString fname;
+ TQString fname;
- static ProviderItem *load(const QString &fname)
+ static ProviderItem *load(const TQString &fname)
{
- QLibrary *lib = new QLibrary(fname);
+ TQLibrary *lib = new TQLibrary(fname);
if(!lib->load()) {
delete lib;
return 0;
@@ -92,10 +92,10 @@ public:
}
private:
- QLibrary *lib;
+ TQLibrary *lib;
bool init_done;
- ProviderItem(QLibrary *_lib, QCAProvider *_p)
+ ProviderItem(TQLibrary *_lib, QCAProvider *_p)
{
lib = _lib;
p = _p;
@@ -103,12 +103,12 @@ private:
}
};
-static QPtrList<ProviderItem> providerList;
+static TQPtrList<ProviderItem> providerList;
static bool qca_init = false;
-static bool plugin_have(const QString &fname)
+static bool plugin_have(const TQString &fname)
{
- QPtrListIterator<ProviderItem> it(providerList);
+ TQPtrListIterator<ProviderItem> it(providerList);
for(ProviderItem *i; (i = it.current()); ++it) {
if(i->fname == fname)
return true;
@@ -118,21 +118,21 @@ static bool plugin_have(const QString &fname)
static void plugin_scan()
{
- QStringList dirs = QApplication::libraryPaths();
- for(QStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it) {
- QDir libpath(*it);
- QDir dir(libpath.filePath("crypto"));
+ TQStringList dirs = TQApplication::libraryPaths();
+ for(TQStringList::ConstIterator it = dirs.begin(); it != dirs.end(); ++it) {
+ TQDir libpath(*it);
+ TQDir dir(libpath.filePath("crypto"));
if(!dir.exists())
continue;
- QStringList list = dir.entryList();
- for(QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
- QFileInfo fi(dir.filePath(*it));
+ TQStringList list = dir.entryList();
+ for(TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ TQFileInfo fi(dir.filePath(*it));
if(fi.isDir())
continue;
if(fi.extension() != PLUGIN_EXT)
continue;
- QString fname = fi.filePath();
+ TQString fname = fi.filePath();
// don't load the same plugin again!
if(plugin_have(fname))
@@ -166,26 +166,26 @@ static void plugin_unloadall()
static int plugin_caps()
{
int caps = 0;
- QPtrListIterator<ProviderItem> it(providerList);
+ TQPtrListIterator<ProviderItem> it(providerList);
for(ProviderItem *i; (i = it.current()); ++it)
caps |= i->p->capabilities();
return caps;
}
-QString QCA::arrayToHex(const QByteArray &a)
+TQString QCA::arrayToHex(const TQByteArray &a)
{
- QString out;
+ TQString out;
for(int n = 0; n < (int)a.size(); ++n) {
- QString str;
+ TQString str;
str.sprintf("%02x", (uchar)a[n]);
out.append(str);
}
return out;
}
-QByteArray QCA::hexToArray(const QString &str)
+TQByteArray QCA::hexToArray(const TQString &str)
{
- QByteArray out(str.length() / 2);
+ TQByteArray out(str.length() / 2);
int at = 0;
for(int n = 0; n + 1 < (int)str.length(); n += 2) {
uchar a = str[n];
@@ -239,7 +239,7 @@ static void *getContext(int cap)
if(!QCA::isSupported(cap))
return 0;
- QPtrListIterator<ProviderItem> it(providerList);
+ TQPtrListIterator<ProviderItem> it(providerList);
for(ProviderItem *i; (i = it.current()); ++it) {
if(i->p->capabilities() & cap) {
i->ensureInit();
@@ -303,14 +303,14 @@ void Hash::clear()
d->reset();
}
-void Hash::update(const QByteArray &a)
+void Hash::update(const TQByteArray &a)
{
d->c->update(a.data(), a.size());
}
-QByteArray Hash::final()
+TQByteArray Hash::final()
{
- QByteArray buf;
+ TQByteArray buf;
d->c->final(&buf);
return buf;
}
@@ -343,11 +343,11 @@ public:
QCA_CipherContext *c;
int dir;
int mode;
- QByteArray key, iv;
+ TQByteArray key, iv;
bool err;
};
-Cipher::Cipher(QCA_CipherContext *c, int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+Cipher::Cipher(QCA_CipherContext *c, int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
{
d = new Private;
d->c = c;
@@ -377,27 +377,27 @@ Cipher::~Cipher()
delete d;
}
-QByteArray Cipher::dyn_generateKey(int size) const
+TQByteArray Cipher::dyn_generateKey(int size) const
{
- QByteArray buf;
+ TQByteArray buf;
if(size != -1)
buf.resize(size);
else
buf.resize(d->c->keySize());
if(!d->c->generateKey(buf.data(), size))
- return QByteArray();
+ return TQByteArray();
return buf;
}
-QByteArray Cipher::dyn_generateIV() const
+TQByteArray Cipher::dyn_generateIV() const
{
- QByteArray buf(d->c->blockSize());
+ TQByteArray buf(d->c->blockSize());
if(!d->c->generateIV(buf.data()))
- return QByteArray();
+ return TQByteArray();
return buf;
}
-void Cipher::reset(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+void Cipher::reset(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
{
d->reset();
@@ -411,7 +411,7 @@ void Cipher::reset(int dir, int mode, const QByteArray &key, const QByteArray &i
}
}
-bool Cipher::update(const QByteArray &a)
+bool Cipher::update(const TQByteArray &a)
{
if(d->err)
return false;
@@ -425,17 +425,17 @@ bool Cipher::update(const QByteArray &a)
return true;
}
-QByteArray Cipher::final(bool *ok)
+TQByteArray Cipher::final(bool *ok)
{
if(ok)
*ok = false;
if(d->err)
- return QByteArray();
+ return TQByteArray();
- QByteArray out;
+ TQByteArray out;
if(!d->c->final(&out)) {
d->err = true;
- return QByteArray();
+ return TQByteArray();
}
if(ok)
*ok = true;
@@ -473,7 +473,7 @@ MD5::MD5()
//----------------------------------------------------------------------------
// BlowFish
//----------------------------------------------------------------------------
-BlowFish::BlowFish(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+BlowFish::BlowFish(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
:Cipher((QCA_CipherContext *)getContext(CAP_BlowFish), dir, mode, key, iv, pad)
{
}
@@ -482,7 +482,7 @@ BlowFish::BlowFish(int dir, int mode, const QByteArray &key, const QByteArray &i
//----------------------------------------------------------------------------
// TripleDES
//----------------------------------------------------------------------------
-TripleDES::TripleDES(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+TripleDES::TripleDES(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
:Cipher((QCA_CipherContext *)getContext(CAP_TripleDES), dir, mode, key, iv, pad)
{
}
@@ -491,7 +491,7 @@ TripleDES::TripleDES(int dir, int mode, const QByteArray &key, const QByteArray
//----------------------------------------------------------------------------
// AES128
//----------------------------------------------------------------------------
-AES128::AES128(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+AES128::AES128(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
:Cipher((QCA_CipherContext *)getContext(CAP_AES128), dir, mode, key, iv, pad)
{
}
@@ -500,7 +500,7 @@ AES128::AES128(int dir, int mode, const QByteArray &key, const QByteArray &iv, b
//----------------------------------------------------------------------------
// AES256
//----------------------------------------------------------------------------
-AES256::AES256(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad)
+AES256::AES256(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad)
:Cipher((QCA_CipherContext *)getContext(CAP_AES256), dir, mode, key, iv, pad)
{
}
@@ -564,35 +564,35 @@ bool RSAKey::havePrivate() const
return d->c->havePrivate();
}
-QByteArray RSAKey::toDER(bool publicOnly) const
+TQByteArray RSAKey::toDER(bool publicOnly) const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->toDER(&out, publicOnly))
- return QByteArray();
+ return TQByteArray();
return out;
}
-bool RSAKey::fromDER(const QByteArray &a)
+bool RSAKey::fromDER(const TQByteArray &a)
{
return d->c->createFromDER(a.data(), a.size());
}
-QString RSAKey::toPEM(bool publicOnly) const
+TQString RSAKey::toPEM(bool publicOnly) const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->toPEM(&out, publicOnly))
- return QByteArray();
+ return TQByteArray();
- QCString cs;
+ TQCString cs;
cs.resize(out.size()+1);
memcpy(cs.data(), out.data(), out.size());
- return QString::fromLatin1(cs);
+ return TQString::fromLatin1(cs);
}
-bool RSAKey::fromPEM(const QString &str)
+bool RSAKey::fromPEM(const TQString &str)
{
- QCString cs = str.latin1();
- QByteArray a(cs.length());
+ TQCString cs = str.latin1();
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return d->c->createFromPEM(a.data(), a.size());
}
@@ -602,18 +602,18 @@ bool RSAKey::fromNative(void *p)
return d->c->createFromNative(p);
}
-bool RSAKey::encrypt(const QByteArray &a, QByteArray *b, bool oaep) const
+bool RSAKey::encrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->encrypt(a, &out, oaep))
return false;
*b = out;
return true;
}
-bool RSAKey::decrypt(const QByteArray &a, QByteArray *b, bool oaep) const
+bool RSAKey::decrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->decrypt(a, &out, oaep))
return false;
*b = out;
@@ -647,14 +647,14 @@ void RSA::setKey(const RSAKey &k)
v_key = k;
}
-bool RSA::encrypt(const QByteArray &a, QByteArray *b, bool oaep) const
+bool RSA::encrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const
{
if(v_key.isNull())
return false;
return v_key.encrypt(a, b, oaep);
}
-bool RSA::decrypt(const QByteArray &a, QByteArray *b, bool oaep) const
+bool RSA::decrypt(const TQByteArray &a, TQByteArray *b, bool oaep) const
{
if(v_key.isNull())
return false;
@@ -723,84 +723,84 @@ bool Cert::isNull() const
return d->c->isNull();
}
-QString Cert::commonName() const
+TQString Cert::commonName() const
{
CertProperties props = subject();
return props["CN"];
}
-QString Cert::serialNumber() const
+TQString Cert::serialNumber() const
{
return d->c->serialNumber();
}
-QString Cert::subjectString() const
+TQString Cert::subjectString() const
{
return d->c->subjectString();
}
-QString Cert::issuerString() const
+TQString Cert::issuerString() const
{
return d->c->issuerString();
}
CertProperties Cert::subject() const
{
- QValueList<QCA_CertProperty> list = d->c->subject();
+ TQValueList<QCA_CertProperty> list = d->c->subject();
CertProperties props;
- for(QValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it)
+ for(TQValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it)
props[(*it).var] = (*it).val;
return props;
}
CertProperties Cert::issuer() const
{
- QValueList<QCA_CertProperty> list = d->c->issuer();
+ TQValueList<QCA_CertProperty> list = d->c->issuer();
CertProperties props;
- for(QValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it)
+ for(TQValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it)
props[(*it).var] = (*it).val;
return props;
}
-QDateTime Cert::notBefore() const
+TQDateTime Cert::notBefore() const
{
return d->c->notBefore();
}
-QDateTime Cert::notAfter() const
+TQDateTime Cert::notAfter() const
{
return d->c->notAfter();
}
-QByteArray Cert::toDER() const
+TQByteArray Cert::toDER() const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->toDER(&out))
- return QByteArray();
+ return TQByteArray();
return out;
}
-bool Cert::fromDER(const QByteArray &a)
+bool Cert::fromDER(const TQByteArray &a)
{
return d->c->createFromDER(a.data(), a.size());
}
-QString Cert::toPEM() const
+TQString Cert::toPEM() const
{
- QByteArray out;
+ TQByteArray out;
if(!d->c->toPEM(&out))
- return QByteArray();
+ return TQByteArray();
- QCString cs;
+ TQCString cs;
cs.resize(out.size()+1);
memcpy(cs.data(), out.data(), out.size());
- return QString::fromLatin1(cs);
+ return TQString::fromLatin1(cs);
}
-bool Cert::fromPEM(const QString &str)
+bool Cert::fromPEM(const TQString &str)
{
- QCString cs = str.latin1();
- QByteArray a(cs.length());
+ TQCString cs = str.latin1();
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return d->c->createFromPEM(a.data(), a.size());
}
@@ -837,7 +837,7 @@ public:
tryMore = false;
}
- void appendArray(QByteArray *a, const QByteArray &b)
+ void appendArray(TQByteArray *a, const TQByteArray &b)
{
int oldsize = a->size();
a->resize(oldsize + b.size());
@@ -846,21 +846,21 @@ public:
Cert cert;
QCA_TLSContext *c;
- QByteArray in, out, to_net, from_net;
+ TQByteArray in, out, to_net, from_net;
int bytesEncoded;
bool tryMore;
bool handshaken;
- QString host;
+ TQString host;
bool hostMismatch;
bool closing;
Cert ourCert;
RSAKey ourKey;
- QPtrList<QCA_CertContext> store;
+ TQPtrList<QCA_CertContext> store;
};
-TLS::TLS(QObject *parent)
-:QObject(parent)
+TLS::TLS(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
}
@@ -876,11 +876,11 @@ void TLS::setCertificate(const Cert &cert, const RSAKey &key)
d->ourKey = key;
}
-void TLS::setCertificateStore(const QPtrList<Cert> &store)
+void TLS::setCertificateStore(const TQPtrList<Cert> &store)
{
// convert the cert list into a context list
d->store.clear();
- QPtrListIterator<Cert> it(store);
+ TQPtrListIterator<Cert> it(store);
for(Cert *cert; (cert = it.current()); ++it)
d->store.append(cert->d->c);
}
@@ -890,14 +890,14 @@ void TLS::reset()
d->reset();
}
-bool TLS::startClient(const QString &host)
+bool TLS::startClient(const TQString &host)
{
d->reset();
d->host = host;
if(!d->c->startClient(d->store, *d->ourCert.d->c, *d->ourKey.d->c))
return false;
- QTimer::singleShot(0, this, SLOT(update()));
+ TQTimer::singleShot(0, this, TQT_SLOT(update()));
return true;
}
@@ -907,7 +907,7 @@ bool TLS::startServer()
if(!d->c->startServer(d->store, *d->ourCert.d->c, *d->ourKey.d->c))
return false;
- QTimer::singleShot(0, this, SLOT(update()));
+ TQTimer::singleShot(0, this, TQT_SLOT(update()));
return true;
}
@@ -917,7 +917,7 @@ void TLS::close()
return;
d->closing = true;
- QTimer::singleShot(0, this, SLOT(update()));
+ TQTimer::singleShot(0, this, TQT_SLOT(update()));
}
bool TLS::isHandshaken() const
@@ -925,35 +925,35 @@ bool TLS::isHandshaken() const
return d->handshaken;
}
-void TLS::write(const QByteArray &a)
+void TLS::write(const TQByteArray &a)
{
d->appendArray(&d->out, a);
update();
}
-QByteArray TLS::read()
+TQByteArray TLS::read()
{
- QByteArray a = d->in.copy();
+ TQByteArray a = d->in.copy();
d->in.resize(0);
return a;
}
-void TLS::writeIncoming(const QByteArray &a)
+void TLS::writeIncoming(const TQByteArray &a)
{
d->appendArray(&d->from_net, a);
update();
}
-QByteArray TLS::readOutgoing()
+TQByteArray TLS::readOutgoing()
{
- QByteArray a = d->to_net.copy();
+ TQByteArray a = d->to_net.copy();
d->to_net.resize(0);
return a;
}
-QByteArray TLS::readUnprocessed()
+TQByteArray TLS::readUnprocessed()
{
- QByteArray a = d->from_net.copy();
+ TQByteArray a = d->from_net.copy();
d->from_net.resize(0);
return a;
}
@@ -976,10 +976,10 @@ void TLS::update()
bool force_read = false;
bool eof = false;
bool done = false;
- QGuardedPtr<TLS> self = this;
+ TQGuardedPtr<TLS> self = this;
if(d->closing) {
- QByteArray a;
+ TQByteArray a;
int r = d->c->shutdown(d->from_net, &a);
d->from_net.resize(0);
if(r == QCA_TLSContext::Error) {
@@ -995,7 +995,7 @@ void TLS::update()
}
else {
if(!d->handshaken) {
- QByteArray a;
+ TQByteArray a;
int r = d->c->handshake(d->from_net, &a);
d->from_net.resize(0);
if(r == QCA_TLSContext::Error) {
@@ -1024,7 +1024,7 @@ void TLS::update()
if(d->handshaken) {
if(!d->out.isEmpty() || d->tryMore) {
d->tryMore = false;
- QByteArray a;
+ TQByteArray a;
int enc;
bool more = false;
bool ok = d->c->encode(d->out, &a, &enc);
@@ -1045,7 +1045,7 @@ void TLS::update()
}
}
if(!d->from_net.isEmpty() || force_read) {
- QByteArray a, b;
+ TQByteArray a, b;
bool ok = d->c->decode(d->from_net, &a, &b);
eof = d->c->eof();
d->from_net.resize(0);
@@ -1091,7 +1091,7 @@ void TLS::update()
//----------------------------------------------------------------------------
// SASL
//----------------------------------------------------------------------------
-QString saslappname = "qca";
+TQString saslappname = "qca";
class SASL::Private
{
public:
@@ -1113,22 +1113,22 @@ public:
// security opts
bool noPlain, noActive, noDict, noAnon, reqForward, reqCreds, reqMutual;
int ssfmin, ssfmax;
- QString ext_authid;
+ TQString ext_authid;
int ext_ssf;
bool tried;
QCA_SASLContext *c;
- QHostAddress localAddr, remoteAddr;
+ TQHostAddress localAddr, remoteAddr;
int localPort, remotePort;
- QByteArray stepData;
+ TQByteArray stepData;
bool allowCSF;
bool first, server;
- QByteArray inbuf, outbuf;
+ TQByteArray inbuf, outbuf;
};
-SASL::SASL(QObject *parent)
-:QObject(parent)
+SASL::SASL(TQObject *parent)
+:TQObject(parent)
{
d = new Private;
reset();
@@ -1139,7 +1139,7 @@ SASL::~SASL()
delete d;
}
-void SASL::setAppName(const QString &name)
+void SASL::setAppName(const TQString &name)
{
saslappname = name;
}
@@ -1217,7 +1217,7 @@ void SASL::setMaximumSSF(int x)
d->ssfmax = x;
}
-void SASL::setExternalAuthID(const QString &authid)
+void SASL::setExternalAuthID(const TQString &authid)
{
d->ext_authid = authid;
}
@@ -1227,19 +1227,19 @@ void SASL::setExternalSSF(int x)
d->ext_ssf = x;
}
-void SASL::setLocalAddr(const QHostAddress &addr, Q_UINT16 port)
+void SASL::setLocalAddr(const TQHostAddress &addr, Q_UINT16 port)
{
d->localAddr = addr;
d->localPort = port;
}
-void SASL::setRemoteAddr(const QHostAddress &addr, Q_UINT16 port)
+void SASL::setRemoteAddr(const TQHostAddress &addr, Q_UINT16 port)
{
d->remoteAddr = addr;
d->remotePort = port;
}
-bool SASL::startClient(const QString &service, const QString &host, const QStringList &mechlist, bool allowClientSendFirst)
+bool SASL::startClient(const TQString &service, const TQString &host, const TQStringList &mechlist, bool allowClientSendFirst)
{
QCA_SASLHostPort la, ra;
if(d->localPort != -1) {
@@ -1260,11 +1260,11 @@ bool SASL::startClient(const QString &service, const QString &host, const QStrin
d->first = true;
d->server = false;
d->tried = false;
- QTimer::singleShot(0, this, SLOT(tryAgain()));
+ TQTimer::singleShot(0, this, TQT_SLOT(tryAgain()));
return true;
}
-bool SASL::startServer(const QString &service, const QString &host, const QString &realm, QStringList *mechlist)
+bool SASL::startServer(const TQString &service, const TQString &host, const TQString &realm, TQStringList *mechlist)
{
QCA_SASLHostPort la, ra;
if(d->localPort != -1) {
@@ -1287,13 +1287,13 @@ bool SASL::startServer(const QString &service, const QString &host, const QStrin
return true;
}
-void SASL::putServerFirstStep(const QString &mech)
+void SASL::putServerFirstStep(const TQString &mech)
{
int r = d->c->serverFirstStep(mech, 0);
handleServerFirstStep(r);
}
-void SASL::putServerFirstStep(const QString &mech, const QByteArray &clientInit)
+void SASL::putServerFirstStep(const TQString &mech, const TQByteArray &clientInit)
{
int r = d->c->serverFirstStep(mech, &clientInit);
handleServerFirstStep(r);
@@ -1311,28 +1311,28 @@ void SASL::handleServerFirstStep(int r)
error(ErrAuth);
}
-void SASL::putStep(const QByteArray &stepData)
+void SASL::putStep(const TQByteArray &stepData)
{
d->stepData = stepData.copy();
tryAgain();
}
-void SASL::setUsername(const QString &user)
+void SASL::setUsername(const TQString &user)
{
d->c->setClientParams(&user, 0, 0, 0);
}
-void SASL::setAuthzid(const QString &authzid)
+void SASL::setAuthzid(const TQString &authzid)
{
d->c->setClientParams(0, &authzid, 0, 0);
}
-void SASL::setPassword(const QString &pass)
+void SASL::setPassword(const TQString &pass)
{
d->c->setClientParams(0, 0, &pass, 0);
}
-void SASL::setRealm(const QString &realm)
+void SASL::setRealm(const TQString &realm)
{
d->c->setClientParams(0, 0, 0, &realm);
}
@@ -1394,8 +1394,8 @@ void SASL::tryAgain()
return;
}
- QString mech = d->c->mech();
- const QByteArray *clientInit = d->c->clientInit();
+ TQString mech = d->c->mech();
+ const TQByteArray *clientInit = d->c->clientInit();
d->first = false;
d->tried = false;
@@ -1438,9 +1438,9 @@ int SASL::ssf() const
return d->c->security();
}
-void SASL::write(const QByteArray &a)
+void SASL::write(const TQByteArray &a)
{
- QByteArray b;
+ TQByteArray b;
if(!d->c->encode(a, &b)) {
error(ErrCrypt);
return;
@@ -1451,16 +1451,16 @@ void SASL::write(const QByteArray &a)
readyReadOutgoing(a.size());
}
-QByteArray SASL::read()
+TQByteArray SASL::read()
{
- QByteArray a = d->inbuf.copy();
+ TQByteArray a = d->inbuf.copy();
d->inbuf.resize(0);
return a;
}
-void SASL::writeIncoming(const QByteArray &a)
+void SASL::writeIncoming(const TQByteArray &a)
{
- QByteArray b;
+ TQByteArray b;
if(!d->c->decode(a, &b)) {
error(ErrCrypt);
return;
@@ -1471,9 +1471,9 @@ void SASL::writeIncoming(const QByteArray &a)
readyRead();
}
-QByteArray SASL::readOutgoing()
+TQByteArray SASL::readOutgoing()
{
- QByteArray a = d->outbuf.copy();
+ TQByteArray a = d->outbuf.copy();
d->outbuf.resize(0);
return a;
}
diff --git a/kopete/protocols/jabber/libiris/qca/src/qca.h b/kopete/protocols/jabber/libiris/qca/src/qca.h
index 1a52a826..46b25cc9 100644
--- a/kopete/protocols/jabber/libiris/qca/src/qca.h
+++ b/kopete/protocols/jabber/libiris/qca/src/qca.h
@@ -21,12 +21,12 @@
#ifndef QCA_H
#define QCA_H
-#include<qstring.h>
-#include<qcstring.h>
-#include<qdatetime.h>
-#include<qmap.h>
-#include<qptrlist.h>
-#include<qobject.h>
+#include<tqstring.h>
+#include<tqcstring.h>
+#include<tqdatetime.h>
+#include<tqmap.h>
+#include<tqptrlist.h>
+#include<tqobject.h>
#ifdef Q_OS_WIN32
# ifndef QCA_STATIC
@@ -91,8 +91,8 @@ namespace QCA
QCA_EXPORT void insertProvider(QCAProvider *);
QCA_EXPORT void unloadAllPlugins();
- QCA_EXPORT QString arrayToHex(const QByteArray &);
- QCA_EXPORT QByteArray hexToArray(const QString &);
+ QCA_EXPORT TQString arrayToHex(const TQByteArray &);
+ QCA_EXPORT TQByteArray hexToArray(const TQString &);
class QCA_EXPORT Hash
{
@@ -102,8 +102,8 @@ namespace QCA
~Hash();
void clear();
- void update(const QByteArray &a);
- QByteArray final();
+ void update(const TQByteArray &a);
+ TQByteArray final();
protected:
Hash(QCA_HashContext *);
@@ -119,26 +119,26 @@ namespace QCA
public:
HashStatic<T>() {}
- static QByteArray hash(const QByteArray &a)
+ static TQByteArray hash(const TQByteArray &a)
{
T obj;
obj.update(a);
return obj.final();
}
- static QByteArray hash(const QCString &cs)
+ static TQByteArray hash(const TQCString &cs)
{
- QByteArray a(cs.length());
+ TQByteArray a(cs.length());
memcpy(a.data(), cs.data(), a.size());
return hash(a);
}
- static QString hashToString(const QByteArray &a)
+ static TQString hashToString(const TQByteArray &a)
{
return arrayToHex(hash(a));
}
- static QString hashToString(const QCString &cs)
+ static TQString hashToString(const TQCString &cs)
{
return arrayToHex(hash(cs));
}
@@ -151,14 +151,14 @@ namespace QCA
Cipher & operator=(const Cipher &);
~Cipher();
- QByteArray dyn_generateKey(int size=-1) const;
- QByteArray dyn_generateIV() const;
- void reset(int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad=true);
- bool update(const QByteArray &a);
- QByteArray final(bool *ok=0);
+ TQByteArray dyn_generateKey(int size=-1) const;
+ TQByteArray dyn_generateIV() const;
+ void reset(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad=true);
+ bool update(const TQByteArray &a);
+ TQByteArray final(bool *ok=0);
protected:
- Cipher(QCA_CipherContext *, int dir, int mode, const QByteArray &key, const QByteArray &iv, bool pad);
+ Cipher(QCA_CipherContext *, int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad);
private:
class Private;
@@ -171,13 +171,13 @@ namespace QCA
public:
CipherStatic<T>() {}
- static QByteArray generateKey(int size=-1)
+ static TQByteArray generateKey(int size=-1)
{
T obj;
return obj.dyn_generateKey(size);
}
- static QByteArray generateIV()
+ static TQByteArray generateIV()
{
T obj;
return obj.dyn_generateIV();
@@ -205,25 +205,25 @@ namespace QCA
class QCA_EXPORT BlowFish : public Cipher, public CipherStatic<BlowFish>
{
public:
- BlowFish(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true);
+ BlowFish(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true);
};
class QCA_EXPORT TripleDES : public Cipher, public CipherStatic<TripleDES>
{
public:
- TripleDES(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true);
+ TripleDES(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true);
};
class QCA_EXPORT AES128 : public Cipher, public CipherStatic<AES128>
{
public:
- AES128(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true);
+ AES128(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true);
};
class QCA_EXPORT AES256 : public Cipher, public CipherStatic<AES256>
{
public:
- AES256(int dir=Encrypt, int mode=CBC, const QByteArray &key=QByteArray(), const QByteArray &iv=QByteArray(), bool pad=true);
+ AES256(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true);
};
class RSA;
@@ -239,11 +239,11 @@ namespace QCA
bool havePublic() const;
bool havePrivate() const;
- QByteArray toDER(bool publicOnly=false) const;
- bool fromDER(const QByteArray &a);
+ TQByteArray toDER(bool publicOnly=false) const;
+ bool fromDER(const TQByteArray &a);
- QString toPEM(bool publicOnly=false) const;
- bool fromPEM(const QString &);
+ TQString toPEM(bool publicOnly=false) const;
+ bool fromPEM(const TQString &);
// only call if you know what you are doing
bool fromNative(void *);
@@ -254,8 +254,8 @@ namespace QCA
friend class RSA;
friend class TLS;
- bool encrypt(const QByteArray &a, QByteArray *out, bool oaep) const;
- bool decrypt(const QByteArray &a, QByteArray *out, bool oaep) const;
+ bool encrypt(const TQByteArray &a, TQByteArray *out, bool oaep) const;
+ bool decrypt(const TQByteArray &a, TQByteArray *out, bool oaep) const;
bool generate(unsigned int bits);
};
@@ -268,8 +268,8 @@ namespace QCA
RSAKey key() const;
void setKey(const RSAKey &);
- bool encrypt(const QByteArray &a, QByteArray *out, bool oaep=false) const;
- bool decrypt(const QByteArray &a, QByteArray *out, bool oaep=false) const;
+ bool encrypt(const TQByteArray &a, TQByteArray *out, bool oaep=false) const;
+ bool decrypt(const TQByteArray &a, TQByteArray *out, bool oaep=false) const;
static RSAKey generateKey(unsigned int bits);
@@ -277,7 +277,7 @@ namespace QCA
RSAKey v_key;
};
- typedef QMap<QString, QString> CertProperties;
+ typedef TQMap<TQString, TQString> CertProperties;
class QCA_EXPORT Cert
{
public:
@@ -288,20 +288,20 @@ namespace QCA
bool isNull() const;
- QString commonName() const;
- QString serialNumber() const;
- QString subjectString() const;
- QString issuerString() const;
+ TQString commonName() const;
+ TQString serialNumber() const;
+ TQString subjectString() const;
+ TQString issuerString() const;
CertProperties subject() const;
CertProperties issuer() const;
- QDateTime notBefore() const;
- QDateTime notAfter() const;
+ TQDateTime notBefore() const;
+ TQDateTime notAfter() const;
- QByteArray toDER() const;
- bool fromDER(const QByteArray &a);
+ TQByteArray toDER() const;
+ bool fromDER(const TQByteArray &a);
- QString toPEM() const;
- bool fromPEM(const QString &);
+ TQString toPEM() const;
+ bool fromPEM(const TQString &);
private:
class Private;
@@ -332,26 +332,26 @@ namespace QCA
};
enum Error { ErrHandshake, ErrCrypt };
- TLS(QObject *parent=0);
+ TLS(TQObject *parent=0);
~TLS();
void setCertificate(const Cert &cert, const RSAKey &key);
- void setCertificateStore(const QPtrList<Cert> &store); // note: store must persist
+ void setCertificateStore(const TQPtrList<Cert> &store); // note: store must persist
void reset();
- bool startClient(const QString &host="");
+ bool startClient(const TQString &host="");
bool startServer();
void close();
bool isHandshaken() const;
// plain (application side)
- void write(const QByteArray &a);
- QByteArray read();
+ void write(const TQByteArray &a);
+ TQByteArray read();
// encoded (socket side)
- void writeIncoming(const QByteArray &a);
- QByteArray readOutgoing();
- QByteArray readUnprocessed();
+ void writeIncoming(const TQByteArray &a);
+ TQByteArray readOutgoing();
+ TQByteArray readUnprocessed();
// cert related
const Cert & peerCertificate() const;
@@ -390,10 +390,10 @@ namespace QCA
NoUser,
RemoteUnavail
};
- SASL(QObject *parent=0);
+ SASL(TQObject *parent=0);
~SASL();
- static void setAppName(const QString &name);
+ static void setAppName(const TQString &name);
void reset();
int errorCondition() const;
@@ -409,40 +409,40 @@ namespace QCA
void setMinimumSSF(int);
void setMaximumSSF(int);
- void setExternalAuthID(const QString &authid);
+ void setExternalAuthID(const TQString &authid);
void setExternalSSF(int);
- void setLocalAddr(const QHostAddress &addr, Q_UINT16 port);
- void setRemoteAddr(const QHostAddress &addr, Q_UINT16 port);
+ void setLocalAddr(const TQHostAddress &addr, Q_UINT16 port);
+ void setRemoteAddr(const TQHostAddress &addr, Q_UINT16 port);
// initialize
- bool startClient(const QString &service, const QString &host, const QStringList &mechlist, bool allowClientSendFirst=true);
- bool startServer(const QString &service, const QString &host, const QString &realm, QStringList *mechlist);
+ bool startClient(const TQString &service, const TQString &host, const TQStringList &mechlist, bool allowClientSendFirst=true);
+ bool startServer(const TQString &service, const TQString &host, const TQString &realm, TQStringList *mechlist);
// authentication
- void putStep(const QByteArray &stepData);
- void putServerFirstStep(const QString &mech);
- void putServerFirstStep(const QString &mech, const QByteArray &clientInit);
- void setUsername(const QString &user);
- void setAuthzid(const QString &auth);
- void setPassword(const QString &pass);
- void setRealm(const QString &realm);
+ void putStep(const TQByteArray &stepData);
+ void putServerFirstStep(const TQString &mech);
+ void putServerFirstStep(const TQString &mech, const TQByteArray &clientInit);
+ void setUsername(const TQString &user);
+ void setAuthzid(const TQString &auth);
+ void setPassword(const TQString &pass);
+ void setRealm(const TQString &realm);
void continueAfterParams();
void continueAfterAuthCheck();
// security layer
int ssf() const;
- void write(const QByteArray &a);
- QByteArray read();
- void writeIncoming(const QByteArray &a);
- QByteArray readOutgoing();
+ void write(const TQByteArray &a);
+ TQByteArray read();
+ void writeIncoming(const TQByteArray &a);
+ TQByteArray readOutgoing();
signals:
// for authentication
- void clientFirstStep(const QString &mech, const QByteArray *clientInit);
- void nextStep(const QByteArray &stepData);
+ void clientFirstStep(const TQString &mech, const TQByteArray *clientInit);
+ void nextStep(const TQByteArray &stepData);
void needParams(bool user, bool authzid, bool pass, bool realm);
- void authCheck(const QString &user, const QString &authzid);
+ void authCheck(const TQString &user, const TQString &authzid);
void authenticated();
// for security layer
diff --git a/kopete/protocols/jabber/libiris/qca/src/qcaprovider.h b/kopete/protocols/jabber/libiris/qca/src/qcaprovider.h
index e6172434..6eda17f9 100644
--- a/kopete/protocols/jabber/libiris/qca/src/qcaprovider.h
+++ b/kopete/protocols/jabber/libiris/qca/src/qcaprovider.h
@@ -21,11 +21,11 @@
#ifndef QCAPROVIDER_H
#define QCAPROVIDER_H
-#include<qglobal.h>
-#include<qstring.h>
-#include<qdatetime.h>
-#include<qobject.h>
-#include<qhostaddress.h>
+#include<tqglobal.h>
+#include<tqstring.h>
+#include<tqdatetime.h>
+#include<tqobject.h>
+#include<tqhostaddress.h>
#include"qca.h"
#define QCA_PLUGIN_VERSION 1
@@ -50,7 +50,7 @@ public:
virtual QCA_HashContext *clone()=0;
virtual void reset()=0;
virtual void update(const char *in, unsigned int len)=0;
- virtual void final(QByteArray *out)=0;
+ virtual void final(TQByteArray *out)=0;
};
class QCA_CipherContext
@@ -66,7 +66,7 @@ public:
virtual bool setup(int dir, int mode, const char *key, int keysize, const char *iv, bool pad)=0;
virtual bool update(const char *in, unsigned int len)=0;
- virtual bool final(QByteArray *out)=0;
+ virtual bool final(TQByteArray *out)=0;
};
class QCA_RSAKeyContext
@@ -82,17 +82,17 @@ public:
virtual bool createFromPEM(const char *in, unsigned int len)=0;
virtual bool createFromNative(void *in)=0;
virtual bool generate(unsigned int bits)=0;
- virtual bool toDER(QByteArray *out, bool publicOnly)=0;
- virtual bool toPEM(QByteArray *out, bool publicOnly)=0;
+ virtual bool toDER(TQByteArray *out, bool publicOnly)=0;
+ virtual bool toPEM(TQByteArray *out, bool publicOnly)=0;
- virtual bool encrypt(const QByteArray &in, QByteArray *out, bool oaep)=0;
- virtual bool decrypt(const QByteArray &in, QByteArray *out, bool oaep)=0;
+ virtual bool encrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0;
+ virtual bool decrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0;
};
struct QCA_CertProperty
{
- QString var;
- QString val;
+ TQString var;
+ TQString val;
};
class QCA_CertContext
@@ -104,17 +104,17 @@ public:
virtual bool isNull() const=0;
virtual bool createFromDER(const char *in, unsigned int len)=0;
virtual bool createFromPEM(const char *in, unsigned int len)=0;
- virtual bool toDER(QByteArray *out)=0;
- virtual bool toPEM(QByteArray *out)=0;
-
- virtual QString serialNumber() const=0;
- virtual QString subjectString() const=0;
- virtual QString issuerString() const=0;
- virtual QValueList<QCA_CertProperty> subject() const=0;
- virtual QValueList<QCA_CertProperty> issuer() const=0;
- virtual QDateTime notBefore() const=0;
- virtual QDateTime notAfter() const=0;
- virtual bool matchesAddress(const QString &realHost) const=0;
+ virtual bool toDER(TQByteArray *out)=0;
+ virtual bool toPEM(TQByteArray *out)=0;
+
+ virtual TQString serialNumber() const=0;
+ virtual TQString subjectString() const=0;
+ virtual TQString issuerString() const=0;
+ virtual TQValueList<QCA_CertProperty> subject() const=0;
+ virtual TQValueList<QCA_CertProperty> issuer() const=0;
+ virtual TQDateTime notBefore() const=0;
+ virtual TQDateTime notAfter() const=0;
+ virtual bool matchesAddress(const TQString &realHost) const=0;
};
class QCA_TLSContext
@@ -124,15 +124,15 @@ public:
virtual ~QCA_TLSContext() {}
virtual void reset()=0;
- virtual bool startClient(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
- virtual bool startServer(const QPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
+ virtual bool startClient(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
+ virtual bool startServer(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0;
- virtual int handshake(const QByteArray &in, QByteArray *out)=0;
- virtual int shutdown(const QByteArray &in, QByteArray *out)=0;
- virtual bool encode(const QByteArray &plain, QByteArray *to_net, int *encoded)=0;
- virtual bool decode(const QByteArray &from_net, QByteArray *plain, QByteArray *to_net)=0;
+ virtual int handshake(const TQByteArray &in, TQByteArray *out)=0;
+ virtual int shutdown(const TQByteArray &in, TQByteArray *out)=0;
+ virtual bool encode(const TQByteArray &plain, TQByteArray *to_net, int *encoded)=0;
+ virtual bool decode(const TQByteArray &from_net, TQByteArray *plain, TQByteArray *to_net)=0;
virtual bool eof() const=0;
- virtual QByteArray unprocessed()=0;
+ virtual TQByteArray unprocessed()=0;
virtual QCA_CertContext *peerCertificate() const=0;
virtual int validityResult() const=0;
@@ -140,7 +140,7 @@ public:
struct QCA_SASLHostPort
{
- QHostAddress addr;
+ TQHostAddress addr;
Q_UINT16 port;
};
@@ -157,35 +157,35 @@ public:
// common
virtual void reset()=0;
- virtual void setCoreProps(const QString &service, const QString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0;
- virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const QString &_ext_authid, int _ext_ssf)=0;
+ virtual void setCoreProps(const TQString &service, const TQString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0;
+ virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const TQString &_ext_authid, int _ext_ssf)=0;
virtual int security() const=0;
virtual int errorCond() const=0;
// init / first step
- virtual bool clientStart(const QStringList &mechlist)=0;
+ virtual bool clientStart(const TQStringList &mechlist)=0;
virtual int clientFirstStep(bool allowClientSendFirst)=0;
- virtual bool serverStart(const QString &realm, QStringList *mechlist, const QString &name)=0;
- virtual int serverFirstStep(const QString &mech, const QByteArray *in)=0;
+ virtual bool serverStart(const TQString &realm, TQStringList *mechlist, const TQString &name)=0;
+ virtual int serverFirstStep(const TQString &mech, const TQByteArray *in)=0;
// get / set params
virtual QCA_SASLNeedParams clientParamsNeeded() const=0;
- virtual void setClientParams(const QString *user, const QString *authzid, const QString *pass, const QString *realm)=0;
- virtual QString username() const=0;
- virtual QString authzid() const=0;
+ virtual void setClientParams(const TQString *user, const TQString *authzid, const TQString *pass, const TQString *realm)=0;
+ virtual TQString username() const=0;
+ virtual TQString authzid() const=0;
// continue steps
- virtual int nextStep(const QByteArray &in)=0;
+ virtual int nextStep(const TQByteArray &in)=0;
virtual int tryAgain()=0;
// results
- virtual QString mech() const=0;
- virtual const QByteArray *clientInit() const=0;
- virtual QByteArray result() const=0;
+ virtual TQString mech() const=0;
+ virtual const TQByteArray *clientInit() const=0;
+ virtual TQByteArray result() const=0;
// security layer
- virtual bool encode(const QByteArray &in, QByteArray *out)=0;
- virtual bool decode(const QByteArray &in, QByteArray *out)=0;
+ virtual bool encode(const TQByteArray &in, TQByteArray *out)=0;
+ virtual bool decode(const TQByteArray &in, TQByteArray *out)=0;
};
#endif