Hopefully enabled the OGS commsManager

Sugilite
MW 2007-06-24 18:40:02 +00:00
parent 2e71972b8b
commit d607914f6a
9 changed files with 218 additions and 73 deletions

View File

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Text;
using OpenGrid.Framework.Communications;
namespace OpenGrid.Framework.Communications.OGS1
{
public class GridCommsManager : CommunicationsManager
{
public GridCommsManager()
{
GridServer = new OGS1GridServices();
InterRegion = new OGSInterSimComms();
UserServer = new OGSUserServices();
}
}
}

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;
using OpenSim.Framework.Types;
using OpenGrid.Framework.Communications;
namespace OpenGrid.Framework.Communications.OGS1
{
public class OGSInterSimComms : IInterRegionCommunications
{
public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)
{
return false;
}
public bool ExpectAvatarCrossing(ulong regionHandle, libsecondlife.LLUUID agentID, libsecondlife.LLVector3 position)
{
return false;
}
}
}

View File

@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Text;
using OpenGrid.Framework.Communications;
using OpenGrid.Framework.Data;
using libsecondlife;
namespace OpenGrid.Framework.Communications.OGS1
{
public class OGSUserServices :IUserServices
{
public UserProfileData GetUserProfile(string firstName, string lastName)
{
return null;
}
public UserProfileData GetUserProfile(string name)
{
return null;
}
public UserProfileData GetUserProfile(LLUUID avatarID)
{
return null;
}
}
}

View File

@ -1,12 +1,13 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ProjectType>Local</ProjectType> <ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion> <ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{17442AF1-0000-0000-0000-000000000000}</ProjectGuid> <ProjectGuid>{C1F40DD4-A68B-4233-9142-CE236775A3CE}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon></ApplicationIcon> <ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName> <AssemblyKeyContainerName>
</AssemblyKeyContainerName> </AssemblyKeyContainerName>
<AssemblyName>OpenGrid.Framework.Communications.OGS1</AssemblyName> <AssemblyName>OpenGrid.Framework.Communications.OGS1</AssemblyName>
@ -15,9 +16,11 @@
<DefaultTargetSchema>IE50</DefaultTargetSchema> <DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign> <DelaySign>false</DelaySign>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder></AppDesignerFolder> <AppDesignerFolder>
</AppDesignerFolder>
<RootNamespace>OpenGrid.Framework.Communications.OGS1</RootNamespace> <RootNamespace>OpenGrid.Framework.Communications.OGS1</RootNamespace>
<StartupObject></StartupObject> <StartupObject>
</StartupObject>
<FileUpgradeFlags> <FileUpgradeFlags>
</FileUpgradeFlags> </FileUpgradeFlags>
</PropertyGroup> </PropertyGroup>
@ -28,7 +31,8 @@
<ConfigurationOverrideFile> <ConfigurationOverrideFile>
</ConfigurationOverrideFile> </ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG</DefineConstants> <DefineConstants>TRACE;DEBUG</DefineConstants>
<DocumentationFile></DocumentationFile> <DocumentationFile>
</DocumentationFile>
<DebugSymbols>True</DebugSymbols> <DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize> <Optimize>False</Optimize>
@ -37,7 +41,8 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks> <RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoWarn></NoWarn> <NoWarn>
</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@ -46,7 +51,8 @@
<ConfigurationOverrideFile> <ConfigurationOverrideFile>
</ConfigurationOverrideFile> </ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<DocumentationFile></DocumentationFile> <DocumentationFile>
</DocumentationFile>
<DebugSymbols>False</DebugSymbols> <DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize> <Optimize>True</Optimize>
@ -55,7 +61,8 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks> <RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoWarn></NoWarn> <NoWarn>
</NoWarn>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="libsecondlife.dll"> <Reference Include="libsecondlife.dll">
@ -82,6 +89,10 @@
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private> <Private>False</Private>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj">
<Project>{62CDF671-0000-0000-0000-000000000000}</Project>
<Name>OpenGrid.Framework.Data</Name>
</ProjectReference>
<ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj"> <ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj">
<Name>OpenSim.Framework</Name> <Name>OpenSim.Framework</Name>
<Project>{8ACA2445-0000-0000-0000-000000000000}</Project> <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
@ -108,9 +119,12 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="GridCommsManager.cs" />
<Compile Include="OGS1GridServices.cs"> <Compile Include="OGS1GridServices.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="OGSInterSimComms.cs" />
<Compile Include="OGSUserServices.cs" />
<Compile Include="Properties\AssemblyInfo.cs"> <Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>

View File

@ -48,6 +48,8 @@ namespace OpenSim.Framework.Types
public uint DefaultHomeLocX = 0; public uint DefaultHomeLocX = 0;
public uint DefaultHomeLocY = 0; public uint DefaultHomeLocY = 0;
public int HttpListenerPort = 9000;
public void InitConfig(bool sandboxMode, IGenericConfig configData) public void InitConfig(bool sandboxMode, IGenericConfig configData)
{ {
this.isSandbox = sandboxMode; this.isSandbox = sandboxMode;
@ -55,6 +57,22 @@ namespace OpenSim.Framework.Types
try try
{ {
string attri = ""; string attri = "";
attri = "";
attri = configData.GetAttribute("HttpListenerPort");
if (attri == "")
{
string location = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Http Listener Port", "9000");
configData.SetAttribute("HttpListenerPort", location);
this.HttpListenerPort = Convert.ToInt32(location);
}
else
{
this.HttpListenerPort = Convert.ToInt32(attri);
}
if (sandboxMode)
{
// default home location X // default home location X
attri = ""; attri = "";
attri = configData.GetAttribute("DefaultLocationX"); attri = configData.GetAttribute("DefaultLocationX");
@ -82,7 +100,7 @@ namespace OpenSim.Framework.Types
{ {
this.DefaultHomeLocY = (uint)Convert.ToUInt32(attri); this.DefaultHomeLocY = (uint)Convert.ToUInt32(attri);
} }
}
if (!isSandbox) if (!isSandbox)
{ {
//Grid Server //Grid Server

View File

@ -39,6 +39,7 @@ using OpenSim.Framework.Utilities;
namespace OpenSim.Caches namespace OpenSim.Caches
{ {
public delegate void DownloadComplete(AssetCache.TextureSender sender); public delegate void DownloadComplete(AssetCache.TextureSender sender);
/// <summary> /// <summary>
/// Manages local cache of assets and their sending to viewers. /// Manages local cache of assets and their sending to viewers.
/// </summary> /// </summary>

View File

@ -22,9 +22,11 @@ namespace OpenSim.Region
private string mapLayerPath = "0001/"; private string mapLayerPath = "0001/";
private string newInventory = "0002/"; private string newInventory = "0002/";
private string requestTexture = "0003/"; private string requestTexture = "0003/";
private string eventQueue = "0100/";
private BaseHttpServer httpListener; private BaseHttpServer httpListener;
private LLUUID agentID; private LLUUID agentID;
private AssetCache assetCache; private AssetCache assetCache;
private int eventQueueCount = 1;
public Caps(AssetCache assetCach, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath, LLUUID agent) public Caps(AssetCache assetCach, BaseHttpServer httpServer, string httpListen, uint httpPort, string capsPath, LLUUID agent)
{ {
@ -45,6 +47,7 @@ namespace OpenSim.Region
httpListener.AddRestHandler("POST", "/CAPS/" + capsObjectPath + requestPath, CapsRequest); httpListener.AddRestHandler("POST", "/CAPS/" + capsObjectPath + requestPath, CapsRequest);
httpListener.AddRestHandler("POST", "/CAPS/" + capsObjectPath + mapLayerPath, MapLayer); httpListener.AddRestHandler("POST", "/CAPS/" + capsObjectPath + mapLayerPath, MapLayer);
httpListener.AddRestHandler("POST", "/CAPS/" + capsObjectPath + newInventory, NewAgentInventory); httpListener.AddRestHandler("POST", "/CAPS/" + capsObjectPath + newInventory, NewAgentInventory);
httpListener.AddRestHandler("POST", "/CAPS/" + capsObjectPath + eventQueue, ProcessEventQueue);
} }
/// <summary> /// <summary>
@ -74,6 +77,7 @@ namespace OpenSim.Region
capURLS += "<key>MapLayer</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + mapLayerPath + "</string>"; capURLS += "<key>MapLayer</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + mapLayerPath + "</string>";
capURLS += "<key>NewFileAgentInventory</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + newInventory + "</string>"; capURLS += "<key>NewFileAgentInventory</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + newInventory + "</string>";
//capURLS += "<key>RequestTextureDownload</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + requestTexture + "</string>"; //capURLS += "<key>RequestTextureDownload</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + requestTexture + "</string>";
capURLS += "<key>EventQueueGet</key><string>http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + capsObjectPath + eventQueue + "</string>";
return capURLS; return capURLS;
} }
@ -116,6 +120,40 @@ namespace OpenSim.Region
return res; return res;
} }
public string ProcessEventQueue(string request, string path, string param)
{
Console.WriteLine("event queue request " + request);
string res = "";
res = this.CreateEmptyEventResponse();
return res;
}
public string CreateEstablishAgentComms(string caps, string ipAddressPort)
{
string res = "<llsd><map><key>id</key><integer>" + eventQueueCount + "</integer>";
res += "<key>events</key><array><map>";
res += "<key>message</key><string>EstablishAgentCommunication</string>";
res += "<key>body</key><map>";
res += "<key>sim-ip-and-port</key><string>"+ipAddressPort +"</string>";
res += "<key>seed-capability</key><string>"+caps+"</string>";
res += "<key>agent-id</key><uuid>"+this.agentID.ToStringHyphenated()+"</uuid>";
res += "</map>";
res += "</map></array>";
res += "</map></llsd>";
eventQueueCount++;
return res;
}
public string CreateEmptyEventResponse()
{
string res = "<llsd><map><key>id</key><integer>" + eventQueueCount + "</integer>";
res += "<key>events</key><array><map>";
res += "</map></array>";
res += "</map></llsd>";
eventQueueCount++;
return res;
}
public string NewAgentInventory(string request, string path, string param) public string NewAgentInventory(string request, string path, string param)
{ {
//Console.WriteLine("received upload request:"+ request); //Console.WriteLine("received upload request:"+ request);

View File

@ -1,4 +1,4 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ProjectType>Local</ProjectType> <ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion> <ProductVersion>8.0.50727</ProductVersion>
@ -6,7 +6,8 @@
<ProjectGuid>{438A9556-0000-0000-0000-000000000000}</ProjectGuid> <ProjectGuid>{438A9556-0000-0000-0000-000000000000}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon></ApplicationIcon> <ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName> <AssemblyKeyContainerName>
</AssemblyKeyContainerName> </AssemblyKeyContainerName>
<AssemblyName>OpenSim</AssemblyName> <AssemblyName>OpenSim</AssemblyName>
@ -15,9 +16,11 @@
<DefaultTargetSchema>IE50</DefaultTargetSchema> <DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign> <DelaySign>false</DelaySign>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<AppDesignerFolder></AppDesignerFolder> <AppDesignerFolder>
</AppDesignerFolder>
<RootNamespace>OpenSim</RootNamespace> <RootNamespace>OpenSim</RootNamespace>
<StartupObject></StartupObject> <StartupObject>
</StartupObject>
<FileUpgradeFlags> <FileUpgradeFlags>
</FileUpgradeFlags> </FileUpgradeFlags>
</PropertyGroup> </PropertyGroup>
@ -28,7 +31,8 @@
<ConfigurationOverrideFile> <ConfigurationOverrideFile>
</ConfigurationOverrideFile> </ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG</DefineConstants> <DefineConstants>TRACE;DEBUG</DefineConstants>
<DocumentationFile></DocumentationFile> <DocumentationFile>
</DocumentationFile>
<DebugSymbols>True</DebugSymbols> <DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize> <Optimize>False</Optimize>
@ -37,7 +41,8 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks> <RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoWarn></NoWarn> <NoWarn>
</NoWarn>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@ -46,7 +51,8 @@
<ConfigurationOverrideFile> <ConfigurationOverrideFile>
</ConfigurationOverrideFile> </ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<DocumentationFile></DocumentationFile> <DocumentationFile>
</DocumentationFile>
<DebugSymbols>False</DebugSymbols> <DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment> <FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize> <Optimize>True</Optimize>
@ -55,7 +61,8 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks> <RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<NoWarn></NoWarn> <NoWarn>
</NoWarn>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Axiom.MathLib.dll"> <Reference Include="Axiom.MathLib.dll">
@ -80,6 +87,10 @@
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\Common\OpenGrid.Framework.Communications.OGS1\OpenGrid.Framework.Communications.OGS1.csproj">
<Project>{C1F40DD4-A68B-4233-9142-CE236775A3CE}</Project>
<Name>OpenGrid.Framework.Communications.OGS1</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\OpenGrid.Framework.Communications\OpenGrid.Framework.Communications.csproj"> <ProjectReference Include="..\..\Common\OpenGrid.Framework.Communications\OpenGrid.Framework.Communications.csproj">
<Name>OpenGrid.Framework.Communications</Name> <Name>OpenGrid.Framework.Communications</Name>
<Project>{683344D5-0000-0000-0000-000000000000}</Project> <Project>{683344D5-0000-0000-0000-000000000000}</Project>

View File

@ -54,6 +54,7 @@ using OpenSim.Servers;
using OpenSim.GenericConfig; using OpenSim.GenericConfig;
using OpenGrid.Framework.Communications; using OpenGrid.Framework.Communications;
using OpenSim.LocalCommunications; using OpenSim.LocalCommunications;
using OpenGrid.Framework.Communications.OGS1;
namespace OpenSim namespace OpenSim
{ {
@ -114,7 +115,7 @@ namespace OpenSim
else else
{ {
this.SetupRemoteGridServers(); this.SetupRemoteGridServers();
this.commsManager = new CommunicationsLocal(this.serversData.DefaultHomeLocX, this.serversData.DefaultHomeLocY); //shouldn't be using the local communications manager this.commsManager = new GridCommsManager();
} }
startuptime = DateTime.Now; startuptime = DateTime.Now;
@ -267,7 +268,7 @@ namespace OpenSim
protected override void SetupHttpListener() protected override void SetupHttpListener()
{ {
httpServer = new BaseHttpServer(9000); //regionData[0].IPListenPort); httpServer = new BaseHttpServer(this.serversData.HttpListenerPort); //regionData[0].IPListenPort);
if (!this.m_sandbox) if (!this.m_sandbox)
{ {