From 6d51eef9cee86c74f00fd149327a378053a597b2 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Wed, 28 May 2008 02:06:56 +0000 Subject: Thank you, Grumly57 kindly for: This patch proposes a new function : osOpenRemoteDataChannel(key channeID) that allow to open an XMLRPC channel for remote_data event. The difference is that the channelID can be customized instead of being randomly generated. --- .../Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs | 5 +++++ OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 2 +- OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs | 12 ++++++++++++ .../ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs | 2 ++ 4 files changed, 20 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs index 07db853..b7b040d 100644 --- a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs @@ -2011,6 +2011,11 @@ namespace OpenSim.Region.ScriptEngine.Common m_LSL_Functions.osSetStateEvents(events); } + public void osOpenRemoteDataChannel(string channel) + { + m_LSL_Functions.osOpenRemoteDataChannel(channel); + } + // public double llList2Float(LSL_Types.list src, int index) diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index cd2015f..6bdfe9a 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -4362,7 +4362,7 @@ namespace OpenSim.Region.ScriptEngine.Common IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface(); if (xmlrpcMod.IsEnabled()) { - LLUUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID); + LLUUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, LLUUID.Zero); object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(LLUUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) }; m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj); } diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs index 03d3a41..bd7ad82 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs @@ -31,6 +31,7 @@ using Nini.Config; using OpenSim.Framework.Console; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; +using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; //using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL; @@ -531,5 +532,16 @@ namespace OpenSim.Region.ScriptEngine.Common m_host.SetScriptEvents(m_itemID, events); } + public void osOpenRemoteDataChannel(string channel) + { + m_host.AddScriptLPS(1); + IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface(); + if (xmlrpcMod.IsEnabled()) + { + LLUUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, new LLUUID(channel)); + object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(LLUUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) }; + m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj); + } + } } } diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs index aa9c8c7..171bffd 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs @@ -62,5 +62,7 @@ namespace OpenSim.Region.ScriptEngine.Common string osDrawImage(string drawList, int width, int height, string imageUrl); void osSetStateEvents(int events); + void osOpenRemoteDataChannel(string channel); + } } -- cgit v1.1