This commit is contained in:
darin%netscape.com 2002-11-07 06:25:58 +00:00
Родитель 2f83a6f96a
Коммит 26e5aeaa8e
4 изменённых файлов: 18 добавлений и 17 удалений

Просмотреть файл

@ -42,7 +42,7 @@ inline void
IPC_EnumClients(ipcClientEnumFunc func, void *closure)
{
PR_ASSERT(gIPCDaemonMethods);
return gIPCDaemonMethods->enumClients(func, closure);
gIPCDaemonMethods->enumClients(func, closure);
}
inline PRUint32
@ -77,14 +77,14 @@ inline void
IPC_EnumClientNames(ipcClientHandle client, ipcClientNameEnumFunc func, void *closure)
{
PR_ASSERT(gIPCDaemonMethods);
return gIPCDaemonMethods->enumClientNames(client, func, closure);
gIPCDaemonMethods->enumClientNames(client, func, closure);
}
inline void
IPC_EnumClientTargets(ipcClientHandle client, ipcClientTargetEnumFunc func, void *closure)
{
PR_ASSERT(gIPCDaemonMethods);
return gIPCDaemonMethods->enumClientTargets(client, func, closure);
gIPCDaemonMethods->enumClientTargets(client, func, closure);
}
//-----------------------------------------------------------------------------

Просмотреть файл

@ -177,7 +177,7 @@ ProcessMsg(HWND hwnd, PRUint32 pid, const ipcMessage *msg)
//-----------------------------------------------------------------------------
void
PRStatus
IPC_PlatformSendMsg(ipcClient *client, const ipcMessage *msg)
{
LOG(("IPC_SendMessageNow [clientID=%u clientPID=%u]\n",

Просмотреть файл

@ -43,7 +43,7 @@
#include "nsIComponentRegistrar.h"
#include "nsString.h"
static const nsID TestTargetID =
static const nsID kTestTargetID =
{ /* e628fc6e-a6a7-48c7-adba-f241d1128fb8 */
0xe628fc6e,
0xa6a7,
@ -116,7 +116,7 @@ myIpcClientObserver::OnClientStatus(PRUint32 aReqToken, PRUint32 aStatus, ipcICl
printf("*** name:%s --> ID:%u\n", cName.get(), cID);
const char hello[] = "hello friend!";
gIpcServ->SendMessage(cID, TestTargetID, hello, sizeof(hello));
gIpcServ->SendMessage(cID, kTestTargetID, hello, sizeof(hello));
}
}
}
@ -172,7 +172,7 @@ int main(int argc, char **argv)
RETURN_IF_FAILED(rv, "do_GetService(ipcServ)");
NS_ADDREF(gIpcServ = ipcServ);
ipcServ->SetMessageObserver(TestTargetID, new myIpcMessageObserver());
ipcServ->SetMessageObserver(kTestTargetID, new myIpcMessageObserver());
const char *data =
"01 this is a really long message.\n"
@ -235,7 +235,7 @@ int main(int argc, char **argv)
"58 this is a really long message.\n"
"59 this is a really long message.\n"
"60 this is a really long message.\n";
SendMsg(ipcServ, TestTargetID, data, strlen(data)+1);
SendMsg(ipcServ, kTestTargetID, data, strlen(data)+1);
PRUint32 reqToken;
nsCOMPtr<ipcIClientObserver> obs(new myIpcClientObserver());

Просмотреть файл

@ -2,13 +2,14 @@
#include "ipcModuleUtil.h"
#include "ipcMessage.h"
static const nsID TestModuleID =
{ /* e628fc6e-a6a7-48c7-adba-f241d1128fb8 */
0xe628fc6e,
0xa6a7,
0x48c7,
{0xad, 0xba, 0xf2, 0x41, 0xd1, 0x12, 0x8f, 0xb8}
};
#define TEST_MODULE_ID \
{ /* e628fc6e-a6a7-48c7-adba-f241d1128fb8 */ \
0xe628fc6e, \
0xa6a7, \
0x48c7, \
{0xad, 0xba, 0xf2, 0x41, 0xd1, 0x12, 0x8f, 0xb8} \
}
static const nsID kTestModuleID = TEST_MODULE_ID;
struct TestModule
{
@ -27,7 +28,7 @@ struct TestModule
printf("*** TestModule::HandleMsg [%s]\n", msg->Data());
ipcMessage outMsg;
static const char buf[] = "pong";
outMsg.Init(TestModuleID, buf, sizeof(buf));
outMsg.Init(kTestModuleID, buf, sizeof(buf));
IPC_SendMsg(client, &outMsg);
}
};
@ -42,7 +43,7 @@ static ipcModuleMethods gTestMethods =
static ipcModuleEntry gTestModuleEntry[] =
{
{ TestModuleID, &gTestMethods }
{ TEST_MODULE_ID, &gTestMethods }
};
IPC_IMPL_GETMODULES(TestModule, gTestModuleEntry)