Fix unintended renaming

pull/1/head
Darrell Anderson 10 years ago
parent 305beeb1d5
commit 3a2b903b2d

@ -340,7 +340,7 @@ void KGameNetwork::electAdmin(TQ_UINT32 clientID)
}
TQByteArray buffer;
TQDataStream stream(buffer,IO_WriteOnly);
stream << static_cast<TQ_UINT32>( KMessageServer::RETQ_ADMIN_CHANGE );
stream << static_cast<TQ_UINT32>( KMessageServer::REQ_ADMIN_CHANGE );
stream << clientID;
d->mMessageClient->sendServerMessage(buffer);
}
@ -353,7 +353,7 @@ void KGameNetwork::setMaxClients(int max)
}
TQByteArray buffer;
TQDataStream stream(buffer,IO_WriteOnly);
stream << static_cast<TQ_UINT32>( KMessageServer::RETQ_MAX_NUM_CLIENTS );
stream << static_cast<TQ_UINT32>( KMessageServer::REQ_MAX_NUM_CLIENTS );
stream << (TQ_INT32)max;
d->mMessageClient->sendServerMessage(buffer);
}

@ -154,7 +154,7 @@ void KMessageClient::sendBroadcast (const TQByteArray &msg)
buffer.open (IO_WriteOnly);
TQDataStream stream (&buffer);
stream << static_cast<TQ_UINT32> ( KMessageServer::RETQ_BROADCAST );
stream << static_cast<TQ_UINT32> ( KMessageServer::REQ_BROADCAST );
TQT_TQIODEVICE(&buffer)->writeBlock (msg);
sendServerMessage (sendBuffer);
}
@ -166,7 +166,7 @@ void KMessageClient::sendForward (const TQByteArray &msg, const TQValueList <TQ_
buffer.open (IO_WriteOnly);
TQDataStream stream (&buffer);
stream << static_cast<TQ_UINT32>( KMessageServer::RETQ_FORWARD ) << clients;
stream << static_cast<TQ_UINT32>( KMessageServer::REQ_FORWARD ) << clients;
TQT_TQIODEVICE(&buffer)->writeBlock (msg);
sendServerMessage (sendBuffer);
}

@ -413,7 +413,7 @@ void KMessageServer::processOneMessage ()
//kdDebug(11001) << k_funcinfo << ": got message with messageID=" << messageID << endl;
switch (messageID)
{
case RETQ_BROADCAST:
case REQ_BROADCAST:
out_stream << TQ_UINT32 (MSG_BROADCAST) << clientID;
// FIXME, compiler bug?
// this should be okay, since TQBuffer is subclass of TQIODevice! :
@ -422,7 +422,7 @@ void KMessageServer::processOneMessage ()
broadcastMessage (out_msg);
break;
case RETQ_FORWARD:
case REQ_FORWARD:
{
TQValueList <TQ_UINT32> clients;
in_stream >> clients;
@ -433,17 +433,17 @@ void KMessageServer::processOneMessage ()
}
break;
case RETQ_CLIENT_ID:
case REQ_CLIENT_ID:
out_stream << TQ_UINT32 (ANS_CLIENT_ID) << clientID;
sendMessage (clientID, out_msg);
break;
case RETQ_ADMIN_ID:
case REQ_ADMIN_ID:
out_stream << TQ_UINT32 (ANS_ADMIN_ID) << d->mAdminID;
sendMessage (clientID, out_msg);
break;
case RETQ_ADMIN_CHANGE:
case REQ_ADMIN_CHANGE:
if (clientID == d->mAdminID)
{
TQ_UINT32 newAdmin;
@ -452,7 +452,7 @@ void KMessageServer::processOneMessage ()
}
break;
case RETQ_REMOVE_CLIENT:
case REQ_REMOVE_CLIENT:
if (clientID == d->mAdminID)
{
TQValueList <TQ_UINT32> client_list;
@ -468,7 +468,7 @@ void KMessageServer::processOneMessage ()
}
break;
case RETQ_MAX_NUM_CLIENTS:
case REQ_MAX_NUM_CLIENTS:
if (clientID == d->mAdminID)
{
TQ_INT32 maximum_clients;
@ -477,7 +477,7 @@ void KMessageServer::processOneMessage ()
}
break;
case RETQ_CLIENT_LIST:
case REQ_CLIENT_LIST:
{
out_stream << TQ_UINT32 (ANS_CLIENT_LIST) << clientIDs();
sendMessage (clientID, out_msg);

@ -73,16 +73,16 @@ class KMessageServerPrivate;
Here is a list of the messages the KMessageServer understands:
&lt;&lt; means, the value is inserted into the TQByteArray using TQDataStream. The
messageIDs (RETQ_BROADCAST, ...) are of type TQ_UINT32.
messageIDs (REQ_BROADCAST, ...) are of type TQ_UINT32.
- TQByteArray << static_cast&lt;TQ_UINT32>( RETQ_BROADCAST ) << raw_data
- TQByteArray << static_cast&lt;TQ_UINT32>( REQ_BROADCAST ) << raw_data
When the server receives this message, it sends the following message to
ALL connected clients (a broadcast), where the raw_data is left unchanged:
TQByteArray << static_cast &lt;TQ_UINT32>( MSG_BROADCAST ) << clientID << raw_data
TQ_UINT32 clientID; // the ID of the client that sent the broadcast request
- TQByteArray << static_cast&lt;TQ_UINT32>( RETQ_FORWARD ) << client_list << raw_data
- TQByteArray << static_cast&lt;TQ_UINT32>( REQ_FORWARD ) << client_list << raw_data
TQValueList &lt;TQ_UINT32> client_list; // list of receivers
When the server receives this message, it sends the following message to
@ -93,10 +93,10 @@ class KMessageServerPrivate;
Note: Every client receives the message as many times as he is in the client_list.
Note: Since the client_list is sent to all the clients, every client can see who else
got the message. If you want to prevent this, send a single RETQ_FORWARD
got the message. If you want to prevent this, send a single REQ_FORWARD
message for every receiver.
- TQByteArray << static_cast&lt;TQ_UINT32>( RETQ_CLIENT_ID )
- TQByteArray << static_cast&lt;TQ_UINT32>( REQ_CLIENT_ID )
When the server receives this message, it sends the following message to
the asking client:
@ -107,7 +107,7 @@ class KMessageServerPrivate;
can store his ID. The ID of a client doesn't change during his lifetime, and is
unique for this KMessageServer.
- TQByteArray << static_cast&lt;TQ_UINT32>( RETQ_ADMIN_ID )
- TQByteArray << static_cast&lt;TQ_UINT32>( REQ_ADMIN_ID )
When the server receives this message, it sends the following message to
the asking client:
@ -116,9 +116,9 @@ class KMessageServerPrivate;
Note: This answer is also automatically sent to a new connected client, so that he
can see if he is the admin or not. It will also be sent to all connected clients
when a new admin is set (see RETQ_ADMIN_CHANGE).
when a new admin is set (see REQ_ADMIN_CHANGE).
- TQByteArray << static_cast&lt;TQ_UINT32>( RETQ_ADMIN_CHANGE ) << new_admin
- TQByteArray << static_cast&lt;TQ_UINT32>( REQ_ADMIN_CHANGE ) << new_admin
TQ_UINT32 new_admin; // the ID of the new admin, or 0 for no admin
When the server receives this message, it sets the admin to the new ID. If no client
@ -127,7 +127,7 @@ class KMessageServerPrivate;
Note: The server sends a ANS_ADMIN_ID message to every connected client.
- TQByteArray << static_cast&lt;TQ_UINT32>( RETQ_REMOVE_CLIENT ) << client_list
- TQByteArray << static_cast&lt;TQ_UINT32>( REQ_REMOVE_CLIENT ) << client_list
TQValueList &lt;TQ_UINT32> client_list; // The list of clients to be removed
When the server receives this message, it removes the clients with the ids stored in
@ -137,7 +137,7 @@ class KMessageServerPrivate;
Note: If one of the clients is the admin himself, he will also be deleted.
Another client (if any left) will become the new admin.
- TQByteArray << static_cast&lt;TQ_UINT32>( RETQ_MAX_NUM_CLIENTS ) << maximum_clients
- TQByteArray << static_cast&lt;TQ_UINT32>( REQ_MAX_NUM_CLIENTS ) << maximum_clients
TQ_INT32 maximum_clients; // The maximum of clients connected, or infinite if -1
When the server receives this message, it limits the number of clients to the number given,
@ -145,9 +145,9 @@ class KMessageServerPrivate;
ONLY THE ADMIN CAN USE THIS MESSAGE!
Note: If there are already more clients, they are not affected. It only prevents new Clients
to be added. To assure this limit, remove clients afterwards (RETQ_REMOVE_CLIENT)
to be added. To assure this limit, remove clients afterwards (REQ_REMOVE_CLIENT)
- TQByteArray << static_cast&lt;TQ_UINT32>( RETQ_CLIENT_LIST )
- TQByteArray << static_cast&lt;TQ_UINT32>( REQ_CLIENT_LIST )
When the server receives this message, it answers by sending a list of IDs of all the clients
that are connected at the moment. So it sends the following message to the asking client:
@ -182,15 +182,15 @@ public:
MessageIDs for messages from a client to the message server.
*/
enum {
RETQ_BROADCAST = 1,
RETQ_FORWARD,
RETQ_CLIENT_ID,
RETQ_ADMIN_ID,
RETQ_ADMIN_CHANGE,
RETQ_REMOVE_CLIENT,
RETQ_MAX_NUM_CLIENTS,
RETQ_CLIENT_LIST,
RETQ_MAX_REQ = 0xffff };
REQ_BROADCAST = 1,
REQ_FORWARD,
REQ_CLIENT_ID,
REQ_ADMIN_ID,
REQ_ADMIN_CHANGE,
REQ_REMOVE_CLIENT,
REQ_MAX_NUM_CLIENTS,
REQ_CLIENT_LIST,
REQ_MAX_REQ = 0xffff };
/**
* MessageIDs for messages from the message server to a client.

Loading…
Cancel
Save