summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/msn/p2p.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/msn/p2p.cpp')
-rw-r--r--kopete/protocols/msn/p2p.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/kopete/protocols/msn/p2p.cpp b/kopete/protocols/msn/p2p.cpp
index 219fd935..1aa3ddae 100644
--- a/kopete/protocols/msn/p2p.cpp
+++ b/kopete/protocols/msn/p2p.cpp
@@ -27,25 +27,25 @@ using P2P::TransferType;
#include <kbufferedsocket.h>
#include <kdebug.h>
// Qt includes
-#include <qfile.h>
+#include <tqfile.h>
// Kopete includes
#include <kopetetransfermanager.h>
-QString P2P::Uid::createUid()
+TQString P2P::Uid::createUid()
{
- return (QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)
- + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-"
- + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-"
- + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-"
- + QString::number(rand()%0xAAFF+0x1111, 16) + "-"
- + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)
- + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)
- + QString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)).upper();
+ return (TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)
+ + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-"
+ + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-"
+ + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16) + "-"
+ + TQString::number(rand()%0xAAFF+0x1111, 16) + "-"
+ + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)
+ + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)
+ + TQString::number((unsigned long int)rand()%0xAAFF+0x1111, 16)).upper();
}
-TransferContext::TransferContext(const QString &contact, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId)
- : QObject(dispatcher) ,
+TransferContext::TransferContext(const TQString &contact, P2P::Dispatcher *dispatcher, Q_UINT32 sessionId)
+ : TQObject(dispatcher) ,
m_sessionId(sessionId) ,
m_identifier(0) ,
m_file(0) ,
@@ -115,7 +115,7 @@ void TransferContext::acknowledge(const Message& message)
outbound.applicationIdentifier = 0l;
outbound.destination = m_recipient;
- QByteArray stream;
+ TQByteArray stream;
// Write the acknowledge message to the stream.
m_messageFormatter.writeMessage(outbound, stream, (m_socket != 0l));
if(!m_socket)
@@ -137,7 +137,7 @@ void TransferContext::error()
m_dispatcher->detach(this);
}
-void TransferContext::sendData(const QByteArray& bytes)
+void TransferContext::sendData(const TQByteArray& bytes)
{
Message outbound;
outbound.header.sessionId = m_sessionId;
@@ -166,7 +166,7 @@ void TransferContext::sendData(const QByteArray& bytes)
outbound.destination = m_recipient;
- QByteArray stream;
+ TQByteArray stream;
m_messageFormatter.writeMessage(outbound, stream, (m_socket != 0l));
if(!m_socket)
{
@@ -194,19 +194,19 @@ void TransferContext::sendDataPreparation()
outbound.header.ackSessionIdentifier = rand()%0x8FFFFFF0 + 4;
outbound.header.ackUniqueIdentifier = 0;
outbound.header.ackDataSize = 0l;
- QByteArray bytes(4);
+ TQByteArray bytes(4);
bytes.fill('\0');
outbound.body = bytes;
outbound.applicationIdentifier = 1;
outbound.destination = m_recipient;
- QByteArray stream;
+ TQByteArray stream;
m_messageFormatter.writeMessage(outbound, stream);
// Send the receiving client the data prepartion message.
m_dispatcher->callbackChannel()->send(stream);
}
-void TransferContext::sendMessage(MessageType type, const QString& content, Q_INT32 flag, Q_INT32 appId)
+void TransferContext::sendMessage(MessageType type, const TQString& content, Q_INT32 flag, Q_INT32 appId)
{
Message outbound;
if(appId != 0){
@@ -237,7 +237,7 @@ void TransferContext::sendMessage(MessageType type, const QString& content, Q_IN
outbound.applicationIdentifier = appId;
outbound.destination = m_recipient;
- QString contentType, cSeq, method;
+ TQString contentType, cSeq, method;
switch(m_state)
{
@@ -295,7 +295,7 @@ void TransferContext::sendMessage(MessageType type, const QString& content, Q_IN
break;
}
- QCString body = QString(method + "\r\n"
+ TQCString body = TQString(method + "\r\n"
"To: <msnmsgr:" + m_recipient + ">\r\n"
"From: <msnmsgr:" + m_sender + ">\r\n"
"Via: MSNSLP/1.0/TLP ;branch={" + m_branch.upper() + "}\r\n"
@@ -303,12 +303,12 @@ void TransferContext::sendMessage(MessageType type, const QString& content, Q_IN
"Call-ID: {" + m_callId.upper() + "}\r\n"
"Max-Forwards: 0\r\n"
"Content-Type: " + contentType + "\r\n"
- "Content-Length: "+ QString::number(content.length() + 1) + "\r\n"
+ "Content-Length: "+ TQString::number(content.length() + 1) + "\r\n"
"\r\n" +
content).utf8();
// NOTE The body must have a null character at the end.
- // QCString by chance automatically adds a \0 to the
+ // TQCString by chance automatically adds a \0 to the
// end of the string.
outbound.header.totalDataSize = body.size();
@@ -316,7 +316,7 @@ void TransferContext::sendMessage(MessageType type, const QString& content, Q_IN
sendMessage(outbound, body);
}
-void TransferContext::sendMessage(Message& outbound, const QByteArray& body)
+void TransferContext::sendMessage(Message& outbound, const TQByteArray& body)
{
Q_INT64 offset = 0L, bytesLeft = outbound.header.totalDataSize;
Q_INT16 chunkLength = 1202;
@@ -343,10 +343,10 @@ void TransferContext::sendMessage(Message& outbound, const QByteArray& body)
}
kdDebug(14140) << k_funcinfo <<
- QCString(outbound.body.data(), outbound.body.size())
+ TQCString(outbound.body.data(), outbound.body.size())
<< endl;
- QByteArray stream;
+ TQByteArray stream;
// Write the outbound message to the stream.
m_messageFormatter.writeMessage(outbound, stream, (m_socket != 0l));
if(!m_socket)