eliminate ipcIService::forwardMessage

This commit is contained in:
darin%netscape.com 2002-10-31 17:55:19 +00:00
Родитель 3180ffffad
Коммит 896174a5d0
3 изменённых файлов: 18 добавлений и 32 удалений

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

@ -132,31 +132,22 @@ interface ipcIService : nsISupports
void setMessageObserver(in nsIDRef aTarget, in ipcIMessageObserver aObserver);
/**
* send message asynchronously to the IPC daemon. there is no guarantee
* that the message will be delivered.
*
* @param aTarget the target of the message. this is the ID of the
* daemon module that should receive this message.
* @param aData the data of the message.
* @param aDataLen the data length of the message.
*/
[noscript] void sendMessage(in nsIDRef aTarget,
in string aData,
in unsigned long aDataLen);
/**
* forward message asynchronously via the IPC daemon to another application
* process. there is no guarantee that the message will be delivered.
* send message asynchronously to a client or a module in the IPC daemon.
* there is no guarantee that the message will be delivered.
*
* @param aClientID the client ID of the foreign application that should
* receive this message. pass 0 to send a message to a
* module in the IPC daemon.
* @param aTarget the target of the message. if aClientID is 0, then
* this is the ID of the daemon module that should
* receive this message.
*
* other parameters are identical to those for sendMessage.
* @param aData the message data.
* @param aDataLen the message length.
*/
[noscript] void forwardMessage(in unsigned long aClientID,
in nsIDRef aTarget,
in string aData,
in unsigned long aDataLen);
[noscript] void sendMessage(in unsigned long aClientID,
in nsIDRef aTarget,
in string aData,
in unsigned long aDataLen);
};
[scriptable, uuid(e40a4a3c-2dc1-470e-ab7f-5675fe1f1384)]

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

@ -151,12 +151,16 @@ ipcService::SetMessageObserver(const nsID &target, ipcIMessageObserver *observer
}
NS_IMETHODIMP
ipcService::SendMessage(const nsID &target,
ipcService::SendMessage(PRUint32 clientID,
const nsID &target,
const char *data,
PRUint32 dataLen)
{
NS_ENSURE_TRUE(mTransport, NS_ERROR_NOT_INITIALIZED);
if (clientID != 0)
return NS_ERROR_NOT_IMPLEMENTED;
ipcMessage *msg = new ipcMessage();
if (!msg)
return NS_ERROR_OUT_OF_MEMORY;
@ -167,15 +171,6 @@ ipcService::SendMessage(const nsID &target,
return NS_OK;
}
NS_IMETHODIMP
ipcService::ForwardMessage(PRUint32 clientID,
const nsID &target,
const char *data,
PRUint32 dataLen)
{
return NS_ERROR_NOT_IMPLEMENTED;
}
//-----------------------------------------------------------------------------
// ipcTransportObserver impl
//-----------------------------------------------------------------------------

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

@ -91,7 +91,7 @@ void SendMsg(ipcIService *ipc, const nsID &target, const char *data, PRUint32 da
{
printf("*** sending message: [dataLen=%u]\n", dataLen);
ipc->SendMessage(target, data, dataLen);
ipc->SendMessage(0, target, data, dataLen);
gMsgCount++;
}