implement ADD_NAME and DEL_NAME messages.

implement part of ADD_TARGET and DEL_TARGET messages.


git-svn-id: svn://10.0.0.236/trunk@132926 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
darin%netscape.com
2002-11-04 06:35:32 +00:00
parent a366002374
commit 773ce670f1
15 changed files with 374 additions and 41 deletions

View File

@@ -70,11 +70,45 @@ public:
ipcMessageCast<ipcmMessageClientHello> msg(rawMsg);
const char *name = msg->PrimaryName();
if (name)
client->SetName(name);
client->AddName(name);
IPC_SendMsg(client, new ipcmMessageClientID(client->ID()));
}
void OnClientAddName(ipcClient *client, const ipcMessage *rawMsg)
{
LOG(("got CLIENT_ADD_NAME\n"));
ipcMessageCast<ipcmMessageClientAddName> msg(rawMsg);
const char *name = msg->Name();
if (name)
client->AddName(name);
}
void OnClientDelName(ipcClient *client, const ipcMessage *rawMsg)
{
LOG(("got CLIENT_DEL_NAME\n"));
ipcMessageCast<ipcmMessageClientDelName> msg(rawMsg);
const char *name = msg->Name();
if (name)
client->DelName(name);
}
void OnClientAddTarget(ipcClient *client, const ipcMessage *rawMsg)
{
LOG(("got CLIENT_ADD_TARGET\n"));
// XXX implement me
}
void OnClientDelTarget(ipcClient *client, const ipcMessage *rawMsg)
{
LOG(("got CLIENT_DEL_TARGET\n"));
// XXX implement me
}
void OnQueryClientByName(ipcClient *client, const ipcMessage *rawMsg)
{
LOG(("got QUERY_CLIENT_BY_NAME\n"));
@@ -127,13 +161,12 @@ public:
&ipcCommandModule::OnClientHello,
NULL, // CLIENT_ID
NULL, // CLIENT_INFO
NULL, // CLIENT_ADD_NAME
NULL, // CLIENT_DEL_NAME
NULL, // CLIENT_ADD_TARGET
NULL, // CLIENT_DEL_TARGET
&ipcCommandModule::OnClientAddName,
&ipcCommandModule::OnClientDelName,
&ipcCommandModule::OnClientAddTarget,
&ipcCommandModule::OnClientDelTarget,
&ipcCommandModule::OnQueryClientByName,
NULL, // QUERY_CLIENT_INFO
NULL, // QUERY_FAILED
&ipcCommandModule::OnForward,
};