* Forgot to commit the OGS1 code.

Sugilite
Adam Frisby 2007-06-24 17:04:12 +00:00
parent 980a8cc629
commit 1c021dbcd9
3 changed files with 169 additions and 0 deletions

View File

@ -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<RegionInfo> RequestNeighbours(RegionInfo regionInfo)
{
return null;
}
public RegionInfo RequestNeighbourInfo(ulong regionHandle)
{
return null;
}
public List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY)
{
return null;
}
}
}

View File

@ -0,0 +1,69 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{C1F40DD4-A68B-4233-9142-CE236775A3CE}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OpenGrid.Framework.Communications.OGS1</RootNamespace>
<AssemblyName>OpenGrid.Framework.Communications.OGS1</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="libsecondlife, Version=0.9.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="OGS1GridServices.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenGrid.Framework.Communications\OpenGrid.Framework.Communications.csproj">
<Project>{683344D5-0000-0000-0000-000000000000}</Project>
<Name>OpenGrid.Framework.Communications</Name>
</ProjectReference>
<ProjectReference Include="..\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj">
<Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
<Name>OpenSim.Framework.Console</Name>
</ProjectReference>
<ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj">
<Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
<Name>OpenSim.Framework</Name>
</ProjectReference>
<ProjectReference Include="..\XmlRpcCS\XMLRPC.csproj">
<Project>{8E81D43C-0000-0000-0000-000000000000}</Project>
<Name>XMLRPC</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -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")]