Split plugin classes and derive AIFilePicker from BasicPluginBase (part 2).

This commit contains all changes to indra/llplugin.
Since there were no differences at all between Singularity and
imprudence before this patch, it's a perfect port.
This commit is contained in:
Aleric Inglewood
2011-05-06 15:00:50 +02:00
parent e89d6d9d66
commit 784fdd4f37
12 changed files with 457 additions and 226 deletions

View File

@@ -579,6 +579,9 @@ void LLPluginProcessParent::setSleepTime(F64 sleep_time, bool force_send)
}
}
// 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"))
@@ -588,6 +591,11 @@ void LLPluginProcessParent::sendMessage(const LLPluginMessage &message)
// 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();
LL_DEBUGS("Plugin") << "Sending: " << buffer << LL_ENDL;
@@ -636,6 +644,16 @@ void LLPluginProcessParent::setMessagePipe(LLPluginMessagePipe *message_pipe)
}
}
apr_status_t LLPluginProcessParent::socketError(apr_status_t error)
{
mSocketError = error;
if (APR_STATUS_IS_EPIPE(error))
{
errorState();
}
return error;
};
//static
void LLPluginProcessParent::dirtyPollSet()
{
@@ -852,6 +870,10 @@ void LLPluginProcessParent::servicePoll()
}
}
// This the viewer process (the parent process).
//
// This function is called when a message is received from a plugin.
// It parses the message and passes it on to LLPluginProcessParent::receiveMessage.
void LLPluginProcessParent::receiveMessageRaw(const std::string &message)
{
LL_DEBUGS("Plugin") << "Received: " << message << LL_ENDL;
@@ -863,6 +885,13 @@ void LLPluginProcessParent::receiveMessageRaw(const std::string &message)
{
mBlocked = true;
}
if(parsed.hasValue("perseus"))
{
mBlocked = false;
// reset the heartbeat timer, since there will have been no heartbeats while the plugin was blocked.
mHeartbeat.setTimerExpirySec(mPluginLockupTimeout);
}
if(mPolledInput)
{
@@ -905,6 +934,12 @@ void LLPluginProcessParent::receiveMessageEarly(const LLPluginMessage &message)
}
}
// This is the viewer process (the parent process).
//
// This function is called for messages that have to
// be written to the plugin.
// Note that LLPLUGIN_MESSAGE_CLASS_INTERNAL messages
// are not sent to the plugin, but are handled here.
void LLPluginProcessParent::receiveMessage(const LLPluginMessage &message)
{
std::string message_class = message.getClass();