diff options
author | callum <none@none> | 2011-05-13 17:08:43 -0700 |
---|---|---|
committer | callum <none@none> | 2011-05-13 17:08:43 -0700 |
commit | e4a9704d4157151442accca1116ad70f7f63ae95 (patch) | |
tree | ef0e12e2d4e98474dfba34d55bb28277cc9d571c /indra/media_plugins | |
parent | 9ccf7557acbc59de128ea11012b02456134e17f5 (diff) |
EXP-676 FIX As a web developer, I want to access information about the current state of the SL client, such as avatar location
Diffstat (limited to 'indra/media_plugins')
-rw-r--r-- | indra/media_plugins/webkit/media_plugin_webkit.cpp | 51 |
1 files changed, 50 insertions, 1 deletions
diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index 9ba8edbb59..b22dbc6604 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -1168,6 +1168,56 @@ void MediaPluginWebKit::receiveMessage(const char *message_string) authResponse(message_in); } else + if(message_name == "js_expose_object") + { + bool expose_object = message_in.getValueBoolean( "expose" ); +#if LLQTWEBKIT_API_VERSION >= 9 + LLQtWebKit::getInstance()->setExposeObject( expose_object ); +#endif + } + else + if(message_name == "js_values_valid") + { + bool valid = message_in.getValueBoolean( "valid" ); +#if LLQTWEBKIT_API_VERSION >= 9 + LLQtWebKit::getInstance()->setValuesValid( valid ); +#endif + } + else + if(message_name == "js_agent_location") + { + F32 x = message_in.getValueReal("x"); + F32 y = message_in.getValueReal("y"); + F32 z = message_in.getValueReal("z"); +#if LLQTWEBKIT_API_VERSION >= 9 + LLQtWebKit::getInstance()->setAgentLocation( x, y, z ); +#endif + } + else + if(message_name == "js_agent_language") + { + const std::string& language = message_in.getValue("language"); +#if LLQTWEBKIT_API_VERSION >= 9 + LLQtWebKit::getInstance()->setAgentLanguage( language ); +#endif + } + else + if(message_name == "js_agent_region") + { + const std::string& region = message_in.getValue("region"); +#if LLQTWEBKIT_API_VERSION >= 9 + LLQtWebKit::getInstance()->setAgentRegion( region ); +#endif + } + else + if(message_name == "js_agent_maturity") + { + const std::string& maturity = message_in.getValue("maturity"); +#if LLQTWEBKIT_API_VERSION >= 9 + LLQtWebKit::getInstance()->setAgentMaturity( maturity ); +#endif + } + else { // std::cerr << "MediaPluginWebKit::receiveMessage: unknown media message: " << message_string << std::endl; } @@ -1324,4 +1374,3 @@ int init_media_plugin(LLPluginInstance::sendMessageFunction host_send_func, void return 0; } - |