Hopefully enabled the OGS commsManager
parent
2e71972b8b
commit
d607914f6a
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{17442AF1-0000-0000-0000-000000000000}</ProjectGuid>
|
||||
<ProjectGuid>{C1F40DD4-A68B-4233-9142-CE236775A3CE}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon></ApplicationIcon>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>OpenGrid.Framework.Communications.OGS1</AssemblyName>
|
||||
|
@ -15,9 +16,11 @@
|
|||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder></AppDesignerFolder>
|
||||
<AppDesignerFolder>
|
||||
</AppDesignerFolder>
|
||||
<RootNamespace>OpenGrid.Framework.Communications.OGS1</RootNamespace>
|
||||
<StartupObject></StartupObject>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
</PropertyGroup>
|
||||
|
@ -28,7 +31,8 @@
|
|||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<DocumentationFile></DocumentationFile>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>False</Optimize>
|
||||
|
@ -37,7 +41,8 @@
|
|||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn></NoWarn>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||
|
@ -46,7 +51,8 @@
|
|||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DocumentationFile></DocumentationFile>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>False</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>True</Optimize>
|
||||
|
@ -55,22 +61,23 @@
|
|||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn></NoWarn>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="libsecondlife.dll" >
|
||||
<Reference Include="libsecondlife.dll">
|
||||
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" >
|
||||
<Reference Include="System">
|
||||
<HintPath>System.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" >
|
||||
<Reference Include="System.Data">
|
||||
<HintPath>System.Data.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" >
|
||||
<Reference Include="System.Xml">
|
||||
<HintPath>System.Xml.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
|
@ -82,6 +89,10 @@
|
|||
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||
<Private>False</Private>
|
||||
</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">
|
||||
<Name>OpenSim.Framework</Name>
|
||||
<Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
|
||||
|
@ -108,9 +119,12 @@
|
|||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="GridCommsManager.cs" />
|
||||
<Compile Include="OGS1GridServices.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="OGSInterSimComms.cs" />
|
||||
<Compile Include="OGSUserServices.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
|
|
|
@ -48,6 +48,8 @@ namespace OpenSim.Framework.Types
|
|||
public uint DefaultHomeLocX = 0;
|
||||
public uint DefaultHomeLocY = 0;
|
||||
|
||||
public int HttpListenerPort = 9000;
|
||||
|
||||
public void InitConfig(bool sandboxMode, IGenericConfig configData)
|
||||
{
|
||||
this.isSandbox = sandboxMode;
|
||||
|
@ -55,6 +57,22 @@ namespace OpenSim.Framework.Types
|
|||
try
|
||||
{
|
||||
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
|
||||
attri = "";
|
||||
attri = configData.GetAttribute("DefaultLocationX");
|
||||
|
@ -82,7 +100,7 @@ namespace OpenSim.Framework.Types
|
|||
{
|
||||
this.DefaultHomeLocY = (uint)Convert.ToUInt32(attri);
|
||||
}
|
||||
|
||||
}
|
||||
if (!isSandbox)
|
||||
{
|
||||
//Grid Server
|
||||
|
|
|
@ -39,6 +39,7 @@ using OpenSim.Framework.Utilities;
|
|||
namespace OpenSim.Caches
|
||||
{
|
||||
public delegate void DownloadComplete(AssetCache.TextureSender sender);
|
||||
|
||||
/// <summary>
|
||||
/// Manages local cache of assets and their sending to viewers.
|
||||
/// </summary>
|
||||
|
|
|
@ -22,9 +22,11 @@ namespace OpenSim.Region
|
|||
private string mapLayerPath = "0001/";
|
||||
private string newInventory = "0002/";
|
||||
private string requestTexture = "0003/";
|
||||
private string eventQueue = "0100/";
|
||||
private BaseHttpServer httpListener;
|
||||
private LLUUID agentID;
|
||||
private AssetCache assetCache;
|
||||
private int eventQueueCount = 1;
|
||||
|
||||
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 + mapLayerPath, MapLayer);
|
||||
httpListener.AddRestHandler("POST", "/CAPS/" + capsObjectPath + newInventory, NewAgentInventory);
|
||||
httpListener.AddRestHandler("POST", "/CAPS/" + capsObjectPath + eventQueue, ProcessEventQueue);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -74,6 +77,7 @@ namespace OpenSim.Region
|
|||
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>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;
|
||||
}
|
||||
|
||||
|
@ -116,6 +120,40 @@ namespace OpenSim.Region
|
|||
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)
|
||||
{
|
||||
//Console.WriteLine("received upload request:"+ request);
|
||||
|
@ -123,12 +161,12 @@ namespace OpenSim.Region
|
|||
LLUUID newAsset = LLUUID.Random();
|
||||
LLUUID newInvItem = LLUUID.Random();
|
||||
string uploaderPath = capsObjectPath + Util.RandomClass.Next(5000, 8000).ToString("0000");
|
||||
AssetUploader uploader = new AssetUploader(newAsset,newInvItem, uploaderPath, this.httpListener);
|
||||
AssetUploader uploader = new AssetUploader(newAsset, newInvItem, uploaderPath, this.httpListener);
|
||||
httpListener.AddRestHandler("POST", "/CAPS/" + uploaderPath, uploader.uploaderCaps);
|
||||
string uploaderURL = "http://" + httpListenerAddress + ":" + httpListenPort.ToString() + "/CAPS/" + uploaderPath;
|
||||
Console.WriteLine("uploader url is " + uploaderURL);
|
||||
res += "<llsd><map>";
|
||||
res += "<key>uploader</key><string>"+uploaderURL +"</string>";
|
||||
res += "<key>uploader</key><string>" + uploaderURL + "</string>";
|
||||
//res += "<key>success</key><boolean>true</boolean>";
|
||||
res += "<key>state</key><string>upload</string>";
|
||||
res += "</map></llsd>";
|
||||
|
@ -181,7 +219,7 @@ namespace OpenSim.Region
|
|||
res += "</map></llsd>";
|
||||
|
||||
Console.WriteLine("asset " + newAssetID.ToStringHyphenated() + " , inventory item " + inv.ToStringHyphenated());
|
||||
httpListener.RemoveRestHandler("POST", "/CAPS/"+uploaderPath);
|
||||
httpListener.RemoveRestHandler("POST", "/CAPS/" + uploaderPath);
|
||||
if (OnUpLoad != null)
|
||||
{
|
||||
OnUpLoad(newAssetID, inv, data);
|
||||
|
|
|
@ -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>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.50727</ProductVersion>
|
||||
|
@ -6,7 +6,8 @@
|
|||
<ProjectGuid>{438A9556-0000-0000-0000-000000000000}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ApplicationIcon></ApplicationIcon>
|
||||
<ApplicationIcon>
|
||||
</ApplicationIcon>
|
||||
<AssemblyKeyContainerName>
|
||||
</AssemblyKeyContainerName>
|
||||
<AssemblyName>OpenSim</AssemblyName>
|
||||
|
@ -15,9 +16,11 @@
|
|||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder></AppDesignerFolder>
|
||||
<AppDesignerFolder>
|
||||
</AppDesignerFolder>
|
||||
<RootNamespace>OpenSim</RootNamespace>
|
||||
<StartupObject></StartupObject>
|
||||
<StartupObject>
|
||||
</StartupObject>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
</PropertyGroup>
|
||||
|
@ -28,7 +31,8 @@
|
|||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<DocumentationFile></DocumentationFile>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>False</Optimize>
|
||||
|
@ -37,7 +41,8 @@
|
|||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn></NoWarn>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||
|
@ -46,7 +51,8 @@
|
|||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<DocumentationFile></DocumentationFile>
|
||||
<DocumentationFile>
|
||||
</DocumentationFile>
|
||||
<DebugSymbols>False</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>True</Optimize>
|
||||
|
@ -55,31 +61,36 @@
|
|||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<NoWarn></NoWarn>
|
||||
<NoWarn>
|
||||
</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Axiom.MathLib.dll" >
|
||||
<Reference Include="Axiom.MathLib.dll">
|
||||
<HintPath>..\..\bin\Axiom.MathLib.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Db4objects.Db4o.dll" >
|
||||
<Reference Include="Db4objects.Db4o.dll">
|
||||
<HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="libsecondlife.dll" >
|
||||
<Reference Include="libsecondlife.dll">
|
||||
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" >
|
||||
<Reference Include="System">
|
||||
<HintPath>System.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" >
|
||||
<Reference Include="System.Xml">
|
||||
<HintPath>System.Xml.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</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">
|
||||
<Name>OpenGrid.Framework.Communications</Name>
|
||||
<Project>{683344D5-0000-0000-0000-000000000000}</Project>
|
||||
|
|
|
@ -54,6 +54,7 @@ using OpenSim.Servers;
|
|||
using OpenSim.GenericConfig;
|
||||
using OpenGrid.Framework.Communications;
|
||||
using OpenSim.LocalCommunications;
|
||||
using OpenGrid.Framework.Communications.OGS1;
|
||||
|
||||
namespace OpenSim
|
||||
{
|
||||
|
@ -114,7 +115,7 @@ namespace OpenSim
|
|||
else
|
||||
{
|
||||
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;
|
||||
|
@ -267,7 +268,7 @@ namespace OpenSim
|
|||
|
||||
protected override void SetupHttpListener()
|
||||
{
|
||||
httpServer = new BaseHttpServer(9000); //regionData[0].IPListenPort);
|
||||
httpServer = new BaseHttpServer(this.serversData.HttpListenerPort); //regionData[0].IPListenPort);
|
||||
|
||||
if (!this.m_sandbox)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue