summaryrefslogtreecommitdiffstats
path: root/libkdegames/kgame/kmessageclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkdegames/kgame/kmessageclient.cpp')
-rw-r--r--libkdegames/kgame/kmessageclient.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/libkdegames/kgame/kmessageclient.cpp b/libkdegames/kgame/kmessageclient.cpp
index e490a084..03a39df9 100644
--- a/libkdegames/kgame/kmessageclient.cpp
+++ b/libkdegames/kgame/kmessageclient.cpp
@@ -40,16 +40,16 @@ public:
delete connection;
}
- Q_UINT32 adminID;
- TQValueList <Q_UINT32> clientList;
+ TQ_UINT32 adminID;
+ TQValueList <TQ_UINT32> clientList;
KMessageIO *connection;
bool isLocked;
TQValueList <TQByteArray> delayedMessages;
};
-KMessageClient::KMessageClient (TQObject *parent, const char *name)
- : TQObject (parent, name)
+KMessageClient::KMessageClient (TQObject *tqparent, const char *name)
+ : TQObject (tqparent, name)
{
d = new KMessageClientPrivate ();
d->isLocked = false;
@@ -63,7 +63,7 @@ KMessageClient::~KMessageClient ()
// -- setServer stuff
-void KMessageClient::setServer (const TQString &host, Q_UINT16 port)
+void KMessageClient::setServer (const TQString &host, TQ_UINT16 port)
{
setServer (new KMessageSocket (host, port));
}
@@ -95,7 +95,7 @@ void KMessageClient::setServer (KMessageIO *connection)
// -- id stuff
-Q_UINT32 KMessageClient::id () const
+TQ_UINT32 KMessageClient::id () const
{
return (d->connection) ? d->connection->id () : 0;
}
@@ -105,12 +105,12 @@ bool KMessageClient::isAdmin () const
return id() != 0 && id() == adminId();
}
-Q_UINT32 KMessageClient::adminId () const
+TQ_UINT32 KMessageClient::adminId () const
{
return d->adminID;
}
-const TQValueList <Q_UINT32> &KMessageClient::clientList() const
+const TQValueList <TQ_UINT32> &KMessageClient::clientList() const
{
return d->clientList;
}
@@ -125,14 +125,14 @@ bool KMessageClient::isNetwork () const
return isConnected() ? d->connection->isNetwork() : false;
}
-Q_UINT16 KMessageClient::peerPort () const
+TQ_UINT16 KMessageClient::peerPort () const
{
return d->connection ? d->connection->peerPort() : 0;
}
TQString KMessageClient::peerName () const
{
- return d->connection ? d->connection->peerName() : TQString::fromLatin1("localhost");
+ return d->connection ? d->connection->peerName() : TQString::tqfromLatin1("localhost");
}
// --------------------- Sending messages
@@ -154,26 +154,26 @@ void KMessageClient::sendBroadcast (const TQByteArray &msg)
buffer.open (IO_WriteOnly);
TQDataStream stream (&buffer);
- stream << static_cast<Q_UINT32> ( KMessageServer::REQ_BROADCAST );
- buffer.TQIODevice::writeBlock (msg);
+ stream << static_cast<TQ_UINT32> ( KMessageServer::RETQ_BROADCAST );
+ TQT_TQIODEVICE(&buffer)->writeBlock (msg);
sendServerMessage (sendBuffer);
}
-void KMessageClient::sendForward (const TQByteArray &msg, const TQValueList <Q_UINT32> &clients)
+void KMessageClient::sendForward (const TQByteArray &msg, const TQValueList <TQ_UINT32> &clients)
{
TQByteArray sendBuffer;
TQBuffer buffer (sendBuffer);
buffer.open (IO_WriteOnly);
TQDataStream stream (&buffer);
- stream << static_cast<Q_UINT32>( KMessageServer::REQ_FORWARD ) << clients;
- buffer.TQIODevice::writeBlock (msg);
+ stream << static_cast<TQ_UINT32>( KMessageServer::RETQ_FORWARD ) << clients;
+ TQT_TQIODEVICE(&buffer)->writeBlock (msg);
sendServerMessage (sendBuffer);
}
-void KMessageClient::sendForward (const TQByteArray &msg, Q_UINT32 client)
+void KMessageClient::sendForward (const TQByteArray &msg, TQ_UINT32 client)
{
- sendForward (msg, TQValueList <Q_UINT32> () << client);
+ sendForward (msg, TQValueList <TQ_UINT32> () << client);
}
@@ -213,13 +213,13 @@ void KMessageClient::processMessage (const TQByteArray &msg)
bool unknown = false;
- Q_UINT32 messageID;
+ TQ_UINT32 messageID;
in_stream >> messageID;
switch (messageID)
{
case KMessageServer::MSG_BROADCAST:
{
- Q_UINT32 clientID;
+ TQ_UINT32 clientID;
in_stream >> clientID;
emit broadcastReceived (in_buffer.readAll(), clientID);
}
@@ -227,17 +227,17 @@ void KMessageClient::processMessage (const TQByteArray &msg)
case KMessageServer::MSG_FORWARD:
{
- Q_UINT32 clientID;
- TQValueList <Q_UINT32> receivers;
- in_stream >> clientID >> receivers;
- emit forwardReceived (in_buffer.readAll(), clientID, receivers);
+ TQ_UINT32 clientID;
+ TQValueList <TQ_UINT32> tqreceivers;
+ in_stream >> clientID >> tqreceivers;
+ emit forwardReceived (in_buffer.readAll(), clientID, tqreceivers);
}
break;
case KMessageServer::ANS_CLIENT_ID:
{
bool old_admin = isAdmin();
- Q_UINT32 clientID;
+ TQ_UINT32 clientID;
in_stream >> clientID;
d->connection->setId (clientID);
if (old_admin != isAdmin())
@@ -262,10 +262,10 @@ void KMessageClient::processMessage (const TQByteArray &msg)
case KMessageServer::EVNT_CLIENT_CONNECTED:
{
- Q_UINT32 id;
+ TQ_UINT32 id;
in_stream >> id;
- if (d->clientList.contains (id))
+ if (d->clientList.tqcontains (id))
kdWarning (11001) << k_funcinfo << ": Adding a client that already existed!" << endl;
else
d->clientList.append (id);
@@ -276,11 +276,11 @@ void KMessageClient::processMessage (const TQByteArray &msg)
case KMessageServer::EVNT_CLIENT_DISCONNECTED:
{
- Q_UINT32 id;
- Q_INT8 broken;
+ TQ_UINT32 id;
+ TQ_INT8 broken;
in_stream >> id >> broken;
- if (!d->clientList.contains (id))
+ if (!d->clientList.tqcontains (id))
kdWarning (11001) << k_funcinfo << ": Removing a client that doesn't exist!" << endl;
else
d->clientList.remove (id);