// This is the viewer process (the parent process)
//
// This function is called to send a message to the plugin.
void LLPluginProcessParent::sendMessage(const LLPluginMessage &message)
{
    if(message.hasValue("blocking_response"))
    {
        mBlocked = false;

        // reset the heartbeat timer, since there will have been no heartbeats while the plugin was blocked.
        mHeartbeat.setTimerExpirySec(mPluginLockupTimeout);
    }
    if (message.hasValue("gorgon"))
    {
        // After this message it is expected that the plugin will not send any more messages for a long time.
        mBlocked = true;
    }

    std::string buffer = message.generate();
#if LL_DEBUG
    if (message.getName() == "mouse_event")
    {
        LL_DEBUGS("PluginMouseEvent") << "Sending: " << buffer << LL_ENDL;
    }
    else
    {
        LL_DEBUGS("Plugin") << "Sending: " << buffer << LL_ENDL;
    }
#endif
    writeMessageRaw(buffer);

    // Try to send message immediately.
    if(mMessagePipe)
    {
        mMessagePipe->pumpOutput();
    }
}
void LLPluginProcessParent::sendMessage(const LLPluginMessage &message)
{
	
	std::string buffer = message.generate();
	LL_DEBUGS("Plugin") << "Sending: " << buffer << LL_ENDL;	
	writeMessageRaw(buffer);
}
// This is the SLPlugin process (the child process).
// This is not part of a DSO.
//
// This function is called by SLPlugin to send 'message' to the viewer (the parent process).
void LLPluginProcessChild::sendMessageToParent(const LLPluginMessage &message)
{
	std::string buffer = message.generate();

	LL_DEBUGS("Plugin") << "Sending to parent: " << buffer << LL_ENDL;

	// Write the serialized message to the pipe.
	writeMessageRaw(buffer);
}
// This is the SLPlugin process.
// This is not part of a DSO.
//
// This function is called by SLPlugin to send a message (originating from
// SLPlugin itself) to the loaded DSO. It calls LLPluginInstance::sendMessage.
void LLPluginProcessChild::sendMessageToPlugin(const LLPluginMessage &message)
{
	if (mInstance)
	{
		std::string buffer = message.generate();
		
		LL_DEBUGS("Plugin") << "Sending to plugin: " << buffer << LL_ENDL;
		LLTimer elapsed;
		
		mInstance->sendMessage(buffer);
		
		mCPUElapsed += elapsed.getElapsedTimeF64();
	}
	else
	{
		LL_WARNS("Plugin") << "mInstance == NULL" << LL_ENDL;
	}
}
Ejemplo n.º 5
0
void LLPluginProcessParent::sendMessage(const LLPluginMessage &message)
{
	if(message.hasValue("blocking_response"))
	{
		mBlocked = false;

		// reset the heartbeat timer, since there will have been no heartbeats while the plugin was blocked.
		mHeartbeat.setTimerExpirySec(mPluginLockupTimeout);
	}
	
	std::string buffer = message.generate();
	LL_DEBUGS("Plugin") << "Sending: " << buffer << LL_ENDL;	
	writeMessageRaw(buffer);
	
	// Try to send message immediately.
	if(mMessagePipe)
	{
		mMessagePipe->pumpOutput();
	}
}
Ejemplo n.º 6
0
/**
 * Send message to plugin loader shell.
 *
 * @param[in] message Message data being sent to plugin loader shell
 *
 */
void MediaPluginBase::sendMessage(const LLPluginMessage &message)
{
    std::string output = message.generate();
    mHostSendFunction(output.c_str(), &mHostUserData);
}
Ejemplo n.º 7
0
	/* virtual */ void receivePluginMessage(const LLPluginMessage &message)
	{
		LL_INFOS("plugin_process_launcher") << "received message: \n" << message.generate() << LL_ENDL;
	}