From 223550b7e4f9eb534728e7763642a2ba6154be96 Mon Sep 17 00:00:00 2001 From: MW Date: Wed, 27 Jun 2007 15:03:54 +0000 Subject: Some very Preliminary work on .net remoting for interregion comms. a few more classes for CAPS LLSD types. --- Common/OpenSim.Framework/LLSDHelpers.cs | 51 +++++++++++++++++++++- Common/OpenSim.Framework/OpenSim.Framework.csproj | 10 +---- .../OpenSim.Framework/Types/NetworkServersInfo.cs | 14 ++++++ 3 files changed, 65 insertions(+), 10 deletions(-) (limited to 'Common/OpenSim.Framework') diff --git a/Common/OpenSim.Framework/LLSDHelpers.cs b/Common/OpenSim.Framework/LLSDHelpers.cs index 3b044a3..051520c 100644 --- a/Common/OpenSim.Framework/LLSDHelpers.cs +++ b/Common/OpenSim.Framework/LLSDHelpers.cs @@ -89,7 +89,23 @@ namespace OpenSim.Framework System.Reflection.FieldInfo field = myType.GetField((string)enumerator.Key); if (field != null) { - field.SetValue(obj, enumerator.Value); + if (enumerator.Value is Hashtable) + { + object fieldValue = field.GetValue(obj); + DeserialiseLLSDMap((Hashtable) enumerator.Value, fieldValue); + } + else if (enumerator.Value is ArrayList) + { + object fieldValue = field.GetValue(obj); + fieldValue.GetType().GetField("Array").SetValue(fieldValue, enumerator.Value); + //TODO + // the LLSD map/array types in the array need to be deserialised + // but first we need to know the right class to deserialise them into. + } + else + { + field.SetValue(obj, enumerator.Value); + } } } break; @@ -161,6 +177,39 @@ namespace OpenSim.Framework } } + [LLSDType("MAP")] + public class LLSDUploadReply + { + public string new_asset = ""; + public LLUUID new_inventory_item = LLUUID.Zero; + public string state = ""; + + public LLSDUploadReply() + { + + } + } + + [LLSDType("MAP")] + public class LLSDCapEvent + { + public int id = 0; + public LLSDArray events = new LLSDArray(); + + public LLSDCapEvent() + { + + } + } + + [LLSDType("MAP")] + public class LLSDEmpty + { + public LLSDEmpty() + { + + } + } [LLSDType("MAP")] public class LLSDTest diff --git a/Common/OpenSim.Framework/OpenSim.Framework.csproj b/Common/OpenSim.Framework/OpenSim.Framework.csproj index f12ffcb..ac0b195 100644 --- a/Common/OpenSim.Framework/OpenSim.Framework.csproj +++ b/Common/OpenSim.Framework/OpenSim.Framework.csproj @@ -126,15 +126,7 @@ Code - - Code - - - Code - - - Code - + Code diff --git a/Common/OpenSim.Framework/Types/NetworkServersInfo.cs b/Common/OpenSim.Framework/Types/NetworkServersInfo.cs index 9c2e7a6..73d7811 100644 --- a/Common/OpenSim.Framework/Types/NetworkServersInfo.cs +++ b/Common/OpenSim.Framework/Types/NetworkServersInfo.cs @@ -49,6 +49,7 @@ namespace OpenSim.Framework.Types public uint DefaultHomeLocY = 0; public int HttpListenerPort = 9000; + public int RemotingListenerPort = 8895; public void InitConfig(bool sandboxMode, IGenericConfig configData) { @@ -71,6 +72,19 @@ namespace OpenSim.Framework.Types this.HttpListenerPort = Convert.ToInt32(attri); } + attri = ""; + attri = configData.GetAttribute("RemotingListenerPort"); + if (attri == "") + { + string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Remoting Listener Port", "8895"); + configData.SetAttribute("RemotingListenerPort", location); + this.RemotingListenerPort = Convert.ToInt32(location); + } + else + { + this.RemotingListenerPort = Convert.ToInt32(attri); + } + if (sandboxMode) { // default home location X -- cgit v1.1