summaryrefslogtreecommitdiff
path: root/indra/llplugin
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2010-03-16 15:02:58 +0200
committerAlexei Arabadji <aarabadji@productengine.com>2010-03-16 15:02:58 +0200
commit3874823bd8a388979bad2d882d5d52bffb8d78da (patch)
treecb9713a19e8b9670cda7a5ec16b93f1e92b39584 /indra/llplugin
parent2fed8d5182813e2077522bb5bbb2cc565b5c283d (diff)
parenta872814de964ebcbf40e812f79319a13a54e2336 (diff)
Merge from viewer-2-0
--HG-- branch : product-engine
Diffstat (limited to 'indra/llplugin')
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp4
-rw-r--r--indra/llplugin/llpluginclassmedia.h6
-rw-r--r--indra/llplugin/llpluginprocesschild.cpp2
-rw-r--r--indra/llplugin/llpluginprocesschild.h1
-rw-r--r--indra/llplugin/llpluginprocessparent.cpp4
-rw-r--r--indra/llplugin/llpluginprocessparent.h8
6 files changed, 20 insertions, 5 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index 6a2449cf4b..d48f4ad0f5 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -65,7 +65,7 @@ LLPluginClassMedia::~LLPluginClassMedia()
reset();
}
-bool LLPluginClassMedia::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug, const std::string &user_data_path)
+bool LLPluginClassMedia::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug, const std::string &user_data_path, const std::string &language_code)
{
LL_DEBUGS("Plugin") << "launcher: " << launcher_filename << LL_ENDL;
LL_DEBUGS("Plugin") << "plugin: " << plugin_filename << LL_ENDL;
@@ -73,7 +73,7 @@ bool LLPluginClassMedia::init(const std::string &launcher_filename, const std::s
mPlugin = new LLPluginProcessParent(this);
mPlugin->setSleepTime(mSleepTime);
- mPlugin->init(launcher_filename, plugin_filename, debug, user_data_path);
+ mPlugin->init(launcher_filename, plugin_filename, debug, user_data_path,language_code);
return true;
}
diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h
index 58e91fa0b4..ce49241e84 100644
--- a/indra/llplugin/llpluginclassmedia.h
+++ b/indra/llplugin/llpluginclassmedia.h
@@ -49,7 +49,11 @@ public:
virtual ~LLPluginClassMedia();
// local initialization, called by the media manager when creating a source
- virtual bool init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug, const std::string &user_data_path);
+ virtual bool init(const std::string &launcher_filename,
+ const std::string &plugin_filename,
+ bool debug,
+ const std::string &user_data_path,
+ const std::string &language_code);
// undoes everything init() didm called by the media manager when destroying a source
virtual void reset();
diff --git a/indra/llplugin/llpluginprocesschild.cpp b/indra/llplugin/llpluginprocesschild.cpp
index 52b5a319ec..9b43ec0e3e 100644
--- a/indra/llplugin/llpluginprocesschild.cpp
+++ b/indra/llplugin/llpluginprocesschild.cpp
@@ -156,6 +156,7 @@ void LLPluginProcessChild::idle(void)
setState(STATE_PLUGIN_INITIALIZING);
LLPluginMessage message("base", "init");
message.setValue("user_data_path", mUserDataPath);
+ message.setValue("language_code", mLanguageCode);
sendMessageToPlugin(message);
}
break;
@@ -329,6 +330,7 @@ void LLPluginProcessChild::receiveMessageRaw(const std::string &message)
{
mPluginFile = parsed.getValue("file");
mUserDataPath = parsed.getValue("user_data_path");
+ mLanguageCode = parsed.getValue("language_code");
}
else if(message_name == "shm_add")
{
diff --git a/indra/llplugin/llpluginprocesschild.h b/indra/llplugin/llpluginprocesschild.h
index 58f8935ed1..af76ec1fa5 100644
--- a/indra/llplugin/llpluginprocesschild.h
+++ b/indra/llplugin/llpluginprocesschild.h
@@ -99,6 +99,7 @@ private:
std::string mPluginFile;
std::string mUserDataPath;
+ std::string mLanguageCode;
LLPluginInstance *mInstance;
diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp
index efd5df687e..0ce2c759ba 100644
--- a/indra/llplugin/llpluginprocessparent.cpp
+++ b/indra/llplugin/llpluginprocessparent.cpp
@@ -98,13 +98,14 @@ void LLPluginProcessParent::errorState(void)
setState(STATE_ERROR);
}
-void LLPluginProcessParent::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug, const std::string &user_data_path)
+void LLPluginProcessParent::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug, const std::string &user_data_path, const std::string &language_code)
{
mProcess.setExecutable(launcher_filename);
mPluginFile = plugin_filename;
mCPUUsage = 0.0f;
mDebug = debug;
mUserDataPath = user_data_path;
+ mLanguageCode = language_code;
setState(STATE_INITIALIZED);
}
@@ -363,6 +364,7 @@ void LLPluginProcessParent::idle(void)
LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "load_plugin");
message.setValue("file", mPluginFile);
message.setValue("user_data_path", mUserDataPath);
+ message.setValue("language_code", mLanguageCode);
sendMessage(message);
}
diff --git a/indra/llplugin/llpluginprocessparent.h b/indra/llplugin/llpluginprocessparent.h
index 524cd9923f..23702814c8 100644
--- a/indra/llplugin/llpluginprocessparent.h
+++ b/indra/llplugin/llpluginprocessparent.h
@@ -59,7 +59,12 @@ public:
LLPluginProcessParent(LLPluginProcessParentOwner *owner);
~LLPluginProcessParent();
- void init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug, const std::string &user_data_path);
+ void init(const std::string &launcher_filename,
+ const std::string &plugin_filename,
+ bool debug,
+ const std::string &user_data_path,
+ const std::string &language_code);
+
void idle(void);
// returns true if the plugin is on its way to steady state
@@ -144,6 +149,7 @@ private:
std::string mPluginFile;
std::string mUserDataPath;
+ std::string mLanguageCode;
LLPluginProcessParentOwner *mOwner;