aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAdam Frisby2007-06-24 17:04:12 +0000
committerAdam Frisby2007-06-24 17:04:12 +0000
commit1c021dbcd9fcb3eb5025862c6d2ec58b33b4c895 (patch)
tree1bffcb66264e45d4c1922fee175c850760d7f1a2
parentRefactoring: (diff)
downloadopensim-SC_OLD-1c021dbcd9fcb3eb5025862c6d2ec58b33b4c895.zip
opensim-SC_OLD-1c021dbcd9fcb3eb5025862c6d2ec58b33b4c895.tar.gz
opensim-SC_OLD-1c021dbcd9fcb3eb5025862c6d2ec58b33b4c895.tar.bz2
opensim-SC_OLD-1c021dbcd9fcb3eb5025862c6d2ec58b33b4c895.tar.xz
* Forgot to commit the OGS1 code.
-rw-r--r--Common/OpenGrid.Framework.Communications.OGS1/OGS1GridServices.cs65
-rw-r--r--Common/OpenGrid.Framework.Communications.OGS1/OpenGrid.Framework.Communications.OGS1.csproj69
-rw-r--r--Common/OpenGrid.Framework.Communications.OGS1/Properties/AssemblyInfo.cs35
3 files changed, 169 insertions, 0 deletions
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 @@
1using System;
2using System.Collections.Generic;
3using System.Collections;
4using System.Text;
5
6using OpenSim.Framework;
7using OpenSim.Framework.Types;
8using OpenGrid.Framework.Communications;
9
10using Nwc.XmlRpc;
11
12namespace OpenGrid.Framework.Communications.OGS1
13{
14 public class OGS1GridServices : IGridServices
15 {
16 public RegionCommsListener listener;
17
18 public RegionCommsListener RegisterRegion(RegionInfo regionInfo, GridInfo gridInfo)
19 {
20 Hashtable GridParams = new Hashtable();
21
22 // Login / Authentication
23 GridParams["authkey"] = gridInfo.GridServerSendKey;
24 GridParams["UUID"] = regionInfo.SimUUID.ToStringHyphenated();
25 GridParams["sim_ip"] = regionInfo.CommsExternalAddress;
26 GridParams["sim_port"] = regionInfo.CommsIPListenPort.ToString();
27
28 // Package into an XMLRPC Request
29 ArrayList SendParams = new ArrayList();
30 SendParams.Add(GridParams);
31
32 // Send Request
33 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_login", SendParams);
34 XmlRpcResponse GridResp = GridReq.Send(gridInfo.GridServerURI, 3000);
35 Hashtable GridRespData = (Hashtable)GridResp.Value;
36 Hashtable griddatahash = GridRespData;
37
38 // Process Response
39 if (GridRespData.ContainsKey("error"))
40 {
41 string errorstring = (string)GridRespData["error"];
42 OpenSim.Framework.Console.MainLog.Instance.Error("Unable to connect to grid: " + errorstring);
43 return null;
44 }
45 //this.neighbours = (ArrayList)GridRespData["neighbours"];
46
47 listener = new RegionCommsListener();
48
49 return listener;
50 }
51
52 public List<RegionInfo> RequestNeighbours(RegionInfo regionInfo)
53 {
54 return null;
55 }
56 public RegionInfo RequestNeighbourInfo(ulong regionHandle)
57 {
58 return null;
59 }
60 public List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY)
61 {
62 return null;
63 }
64 }
65}
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 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5 <ProductVersion>8.0.50727</ProductVersion>
6 <SchemaVersion>2.0</SchemaVersion>
7 <ProjectGuid>{C1F40DD4-A68B-4233-9142-CE236775A3CE}</ProjectGuid>
8 <OutputType>Library</OutputType>
9 <AppDesignerFolder>Properties</AppDesignerFolder>
10 <RootNamespace>OpenGrid.Framework.Communications.OGS1</RootNamespace>
11 <AssemblyName>OpenGrid.Framework.Communications.OGS1</AssemblyName>
12 </PropertyGroup>
13 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
14 <DebugSymbols>true</DebugSymbols>
15 <DebugType>full</DebugType>
16 <Optimize>false</Optimize>
17 <OutputPath>bin\Debug\</OutputPath>
18 <DefineConstants>DEBUG;TRACE</DefineConstants>
19 <ErrorReport>prompt</ErrorReport>
20 <WarningLevel>4</WarningLevel>
21 </PropertyGroup>
22 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
23 <DebugType>pdbonly</DebugType>
24 <Optimize>true</Optimize>
25 <OutputPath>bin\Release\</OutputPath>
26 <DefineConstants>TRACE</DefineConstants>
27 <ErrorReport>prompt</ErrorReport>
28 <WarningLevel>4</WarningLevel>
29 </PropertyGroup>
30 <ItemGroup>
31 <Reference Include="libsecondlife, Version=0.9.0.0, Culture=neutral, processorArchitecture=MSIL">
32 <SpecificVersion>False</SpecificVersion>
33 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
34 </Reference>
35 <Reference Include="System" />
36 <Reference Include="System.Data" />
37 <Reference Include="System.Xml" />
38 </ItemGroup>
39 <ItemGroup>
40 <Compile Include="OGS1GridServices.cs" />
41 <Compile Include="Properties\AssemblyInfo.cs" />
42 </ItemGroup>
43 <ItemGroup>
44 <ProjectReference Include="..\OpenGrid.Framework.Communications\OpenGrid.Framework.Communications.csproj">
45 <Project>{683344D5-0000-0000-0000-000000000000}</Project>
46 <Name>OpenGrid.Framework.Communications</Name>
47 </ProjectReference>
48 <ProjectReference Include="..\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj">
49 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
50 <Name>OpenSim.Framework.Console</Name>
51 </ProjectReference>
52 <ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj">
53 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
54 <Name>OpenSim.Framework</Name>
55 </ProjectReference>
56 <ProjectReference Include="..\XmlRpcCS\XMLRPC.csproj">
57 <Project>{8E81D43C-0000-0000-0000-000000000000}</Project>
58 <Name>XMLRPC</Name>
59 </ProjectReference>
60 </ItemGroup>
61 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
62 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
63 Other similar extension points exist, see Microsoft.Common.targets.
64 <Target Name="BeforeBuild">
65 </Target>
66 <Target Name="AfterBuild">
67 </Target>
68 -->
69</Project> \ 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 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// General Information about an assembly is controlled through the following
6// set of attributes. Change these attribute values to modify the information
7// associated with an assembly.
8[assembly: AssemblyTitle("OpenGrid.Framework.Communications.OGS1")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenGrid.Framework.Communications.OGS1")]
13[assembly: AssemblyCopyright("Copyright © 2007")]
14[assembly: AssemblyTrademark("")]
15[assembly: AssemblyCulture("")]
16
17// Setting ComVisible to false makes the types in this assembly not visible
18// to COM components. If you need to access a type in this assembly from
19// COM, set the ComVisible attribute to true on that type.
20[assembly: ComVisible(false)]
21
22// The following GUID is for the ID of the typelib if this project is exposed to COM
23[assembly: Guid("a8b2b39b-c83b-41e2-b0b5-7ccfc1fddae7")]
24
25// Version information for an assembly consists of the following four values:
26//
27// Major Version
28// Minor Version
29// Build Number
30// Revision
31//
32// You can specify all the values or you can default the Revision and Build Numbers
33// by using the '*' as shown below:
34[assembly: AssemblyVersion("1.0.0.0")]
35[assembly: AssemblyFileVersion("1.0.0.0")]