From 1c021dbcd9fcb3eb5025862c6d2ec58b33b4c895 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sun, 24 Jun 2007 17:04:12 +0000 Subject: * Forgot to commit the OGS1 code. --- .../OGS1GridServices.cs | 65 ++++++++++++++++++++ .../OpenGrid.Framework.Communications.OGS1.csproj | 69 ++++++++++++++++++++++ .../Properties/AssemblyInfo.cs | 35 +++++++++++ 3 files changed, 169 insertions(+) create mode 100644 Common/OpenGrid.Framework.Communications.OGS1/OGS1GridServices.cs create mode 100644 Common/OpenGrid.Framework.Communications.OGS1/OpenGrid.Framework.Communications.OGS1.csproj create mode 100644 Common/OpenGrid.Framework.Communications.OGS1/Properties/AssemblyInfo.cs diff --git a/Common/OpenGrid.Framework.Communications.OGS1/OGS1GridServices.cs b/Common/OpenGrid.Framework.Communications.OGS1/OGS1GridServices.cs new file mode 100644 index 0000000..ff3538a --- /dev/null +++ b/Common/OpenGrid.Framework.Communications.OGS1/OGS1GridServices.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Collections; +using System.Text; + +using OpenSim.Framework; +using OpenSim.Framework.Types; +using OpenGrid.Framework.Communications; + +using Nwc.XmlRpc; + +namespace OpenGrid.Framework.Communications.OGS1 +{ + public class OGS1GridServices : IGridServices + { + public RegionCommsListener listener; + + public RegionCommsListener RegisterRegion(RegionInfo regionInfo, GridInfo gridInfo) + { + Hashtable GridParams = new Hashtable(); + + // Login / Authentication + GridParams["authkey"] = gridInfo.GridServerSendKey; + GridParams["UUID"] = regionInfo.SimUUID.ToStringHyphenated(); + GridParams["sim_ip"] = regionInfo.CommsExternalAddress; + GridParams["sim_port"] = regionInfo.CommsIPListenPort.ToString(); + + // Package into an XMLRPC Request + ArrayList SendParams = new ArrayList(); + SendParams.Add(GridParams); + + // Send Request + XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams); + XmlRpcResponse GridResp = GridReq.Send(gridInfo.GridServerURI, 3000); + Hashtable GridRespData = (Hashtable)GridResp.Value; + Hashtable griddatahash = GridRespData; + + // Process Response + if (GridRespData.ContainsKey("error")) + { + string errorstring = (string)GridRespData["error"]; + OpenSim.Framework.Console.MainLog.Instance.Error("Unable to connect to grid: " + errorstring); + return null; + } + //this.neighbours = (ArrayList)GridRespData["neighbours"]; + + listener = new RegionCommsListener(); + + return listener; + } + + public List RequestNeighbours(RegionInfo regionInfo) + { + return null; + } + public RegionInfo RequestNeighbourInfo(ulong regionHandle) + { + return null; + } + public List RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY) + { + return null; + } + } +} diff --git a/Common/OpenGrid.Framework.Communications.OGS1/OpenGrid.Framework.Communications.OGS1.csproj b/Common/OpenGrid.Framework.Communications.OGS1/OpenGrid.Framework.Communications.OGS1.csproj new file mode 100644 index 0000000..ba4f43e --- /dev/null +++ b/Common/OpenGrid.Framework.Communications.OGS1/OpenGrid.Framework.Communications.OGS1.csproj @@ -0,0 +1,69 @@ + + + Debug + AnyCPU + 8.0.50727 + 2.0 + {C1F40DD4-A68B-4233-9142-CE236775A3CE} + Library + Properties + OpenGrid.Framework.Communications.OGS1 + OpenGrid.Framework.Communications.OGS1 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\bin\libsecondlife.dll + + + + + + + + + + + + {683344D5-0000-0000-0000-000000000000} + OpenGrid.Framework.Communications + + + {A7CD0630-0000-0000-0000-000000000000} + OpenSim.Framework.Console + + + {8ACA2445-0000-0000-0000-000000000000} + OpenSim.Framework + + + {8E81D43C-0000-0000-0000-000000000000} + XMLRPC + + + + + \ No newline at end of file diff --git a/Common/OpenGrid.Framework.Communications.OGS1/Properties/AssemblyInfo.cs b/Common/OpenGrid.Framework.Communications.OGS1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..0c6f965 --- /dev/null +++ b/Common/OpenGrid.Framework.Communications.OGS1/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OpenGrid.Framework.Communications.OGS1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OpenGrid.Framework.Communications.OGS1")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("a8b2b39b-c83b-41e2-b0b5-7ccfc1fddae7")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] -- cgit v1.1