From 2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Mon, 16 Jul 2007 15:40:11 +0000 Subject: changed to native line ending encoding --- .../Communications/Local/CommunicationsLocal.cs | 110 +-- .../Communications/Local/LocalBackEndServices.cs | 412 +++++----- .../Communications/Local/LocalUserServices.cs | 284 +++---- .../Local/Properties/AssemblyInfo.cs | 66 +- .../Communications/OGS1/CommunicationsOGS1.cs | 36 +- .../Region/Communications/OGS1/OGS1GridServices.cs | 862 ++++++++++----------- .../Communications/OGS1/OGS1InterSimComms.cs | 138 ++-- .../Region/Communications/OGS1/OGS1UserServices.cs | 202 ++--- .../Communications/OGS1/Properties/AssemblyInfo.cs | 66 +- 9 files changed, 1088 insertions(+), 1088 deletions(-) (limited to 'OpenSim/Region/Communications') diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index c47904d..3ce0cc5 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs @@ -1,55 +1,55 @@ -/* -* Copyright (c) Contributors, http://www.openmetaverse.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ -using OpenSim.Framework.Communications; -using OpenSim.Framework.Types; -using OpenSim.Framework.Servers; - -namespace OpenSim.Region.Communications.Local -{ - public class CommunicationsLocal : CommunicationsManager - { - public LocalBackEndServices SandBoxServices = new LocalBackEndServices(); - public LocalUserServices UserServices; - - public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer ) - : base(serversInfo, httpServer) - { - UserServices = new LocalUserServices(this, serversInfo); - UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll"); - UserServer = UserServices; - GridServer = SandBoxServices; - InterRegion = SandBoxServices; - httpServer.AddXmlRPCHandler("login_to_simulator", UserServices.XmlRpcLoginMethod); - } - - internal void InformRegionOfLogin(ulong regionHandle, Login login) - { - this.SandBoxServices.AddNewSession(regionHandle, login); - } - } -} +/* +* Copyright (c) Contributors, http://www.openmetaverse.org/ +* See CONTRIBUTORS.TXT for a full list of copyright holders. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the OpenSim Project nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +using OpenSim.Framework.Communications; +using OpenSim.Framework.Types; +using OpenSim.Framework.Servers; + +namespace OpenSim.Region.Communications.Local +{ + public class CommunicationsLocal : CommunicationsManager + { + public LocalBackEndServices SandBoxServices = new LocalBackEndServices(); + public LocalUserServices UserServices; + + public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer ) + : base(serversInfo, httpServer) + { + UserServices = new LocalUserServices(this, serversInfo); + UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll"); + UserServer = UserServices; + GridServer = SandBoxServices; + InterRegion = SandBoxServices; + httpServer.AddXmlRPCHandler("login_to_simulator", UserServices.XmlRpcLoginMethod); + } + + internal void InformRegionOfLogin(ulong regionHandle, Login login) + { + this.SandBoxServices.AddNewSession(regionHandle, login); + } + } +} diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index d0cd991..9322f3b 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs @@ -1,206 +1,206 @@ -/* -* Copyright (c) Contributors, http://www.openmetaverse.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ -using System.Collections.Generic; -using libsecondlife; -using OpenSim.Framework; -using OpenSim.Framework.Communications; -using OpenSim.Framework.Types; - -namespace OpenSim.Region.Communications.Local -{ - - public class LocalBackEndServices : IGridServices, IInterRegionCommunications - { - protected Dictionary regions = new Dictionary(); - protected Dictionary regionHosts = new Dictionary(); - - public LocalBackEndServices() - { - - } - - /// - /// Register a region method with the BackEnd Services. - /// - /// - /// - public RegionCommsListener RegisterRegion(RegionInfo regionInfo) - { - //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering"); - if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle)) - { - //Console.WriteLine("CommsManager - Adding Region " + regionInfo.RegionHandle ); - this.regions.Add(regionInfo.RegionHandle, regionInfo); - RegionCommsListener regionHost = new RegionCommsListener(); - this.regionHosts.Add(regionInfo.RegionHandle, regionHost); - - return regionHost; - } - - //already in our list of regions so for now lets return null - return null; - } - - /// - /// - /// - /// - public List RequestNeighbours(RegionInfo regionInfo) - { - // Console.WriteLine("Finding Neighbours to " + regionInfo.RegionHandle); - List neighbours = new List(); - - foreach (RegionInfo reg in this.regions.Values) - { - // Console.WriteLine("CommsManager- RequestNeighbours() checking region " + reg.RegionLocX + " , "+ reg.RegionLocY); - if (reg.RegionHandle != regionInfo.RegionHandle) - { - //Console.WriteLine("CommsManager- RequestNeighbours() - found a different region in list, checking location"); - if ((reg.RegionLocX > (regionInfo.RegionLocX - 2)) && (reg.RegionLocX < (regionInfo.RegionLocX + 2))) - { - if ((reg.RegionLocY > (regionInfo.RegionLocY - 2)) && (reg.RegionLocY < (regionInfo.RegionLocY + 2))) - { - neighbours.Add(reg); - } - } - } - } - return neighbours; - } - - /// - /// - /// - /// - /// - public RegionInfo RequestNeighbourInfo(ulong regionHandle) - { - if (this.regions.ContainsKey(regionHandle)) - { - return this.regions[regionHandle]; - } - return null; - } - - /// - /// - /// - /// - /// - /// - /// - /// - public List RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY) - { - List mapBlocks = new List(); - foreach(RegionInfo regInfo in this.regions.Values) - { - if (((regInfo.RegionLocX >= minX) && (regInfo.RegionLocX <= maxX)) && ((regInfo.RegionLocY >= minY) && (regInfo.RegionLocY <= maxY))) - { - MapBlockData map = new MapBlockData(); - map.Name = regInfo.RegionName; - map.X = (ushort)regInfo.RegionLocX; - map.Y = (ushort)regInfo.RegionLocY; - map.WaterHeight =(byte) regInfo.estateSettings.waterHeight; - map.MapImageId = regInfo.estateSettings.terrainImageID; //new LLUUID("00000000-0000-0000-9999-000000000007"); - map.Agents = 1; - map.RegionFlags = 72458694; - map.Access = 13; - mapBlocks.Add(map); - } - } - return mapBlocks; - } - - /// - /// - /// - /// - /// - public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData - { - //Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent"); - if (this.regionHosts.ContainsKey(regionHandle)) - { - // Console.WriteLine("CommsManager- Informing a region to expect child agent"); - this.regionHosts[regionHandle].TriggerExpectUser(regionHandle, agentData); - return true; - } - return false; - } - - /// - /// - /// - /// - /// - /// - /// - public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) - { - if (this.regionHosts.ContainsKey(regionHandle)) - { - // Console.WriteLine("CommsManager- Informing a region to expect avatar crossing"); - this.regionHosts[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position); - return true; - } - return false; - } - - /// - /// Is a Sandbox mode method, used by the local Login server to inform a region of a connection user/session - /// - /// - /// - /// - public bool AddNewSession(ulong regionHandle, Login loginData) - { - AgentCircuitData agent = new AgentCircuitData(); - agent.AgentID = loginData.Agent; - agent.firstname = loginData.First; - agent.lastname = loginData.Last; - agent.SessionID = loginData.Session; - agent.SecureSessionID = loginData.SecureSession; - agent.circuitcode = loginData.CircuitCode; - agent.BaseFolder = loginData.BaseFolder; - agent.InventoryFolder = loginData.InventoryFolder; - agent.startpos = new LLVector3(128, 128, 70); - agent.CapsPath = loginData.CapsPath; - - if (this.regionHosts.ContainsKey(regionHandle)) - { - this.regionHosts[regionHandle].TriggerExpectUser(regionHandle, agent); - return true; - } - - // region not found - return false; - } - } -} - +/* +* Copyright (c) Contributors, http://www.openmetaverse.org/ +* See CONTRIBUTORS.TXT for a full list of copyright holders. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the OpenSim Project nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +using System.Collections.Generic; +using libsecondlife; +using OpenSim.Framework; +using OpenSim.Framework.Communications; +using OpenSim.Framework.Types; + +namespace OpenSim.Region.Communications.Local +{ + + public class LocalBackEndServices : IGridServices, IInterRegionCommunications + { + protected Dictionary regions = new Dictionary(); + protected Dictionary regionHosts = new Dictionary(); + + public LocalBackEndServices() + { + + } + + /// + /// Register a region method with the BackEnd Services. + /// + /// + /// + public RegionCommsListener RegisterRegion(RegionInfo regionInfo) + { + //Console.WriteLine("CommsManager - Region " + regionInfo.RegionHandle + " , " + regionInfo.RegionLocX + " , "+ regionInfo.RegionLocY +" is registering"); + if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle)) + { + //Console.WriteLine("CommsManager - Adding Region " + regionInfo.RegionHandle ); + this.regions.Add(regionInfo.RegionHandle, regionInfo); + RegionCommsListener regionHost = new RegionCommsListener(); + this.regionHosts.Add(regionInfo.RegionHandle, regionHost); + + return regionHost; + } + + //already in our list of regions so for now lets return null + return null; + } + + /// + /// + /// + /// + public List RequestNeighbours(RegionInfo regionInfo) + { + // Console.WriteLine("Finding Neighbours to " + regionInfo.RegionHandle); + List neighbours = new List(); + + foreach (RegionInfo reg in this.regions.Values) + { + // Console.WriteLine("CommsManager- RequestNeighbours() checking region " + reg.RegionLocX + " , "+ reg.RegionLocY); + if (reg.RegionHandle != regionInfo.RegionHandle) + { + //Console.WriteLine("CommsManager- RequestNeighbours() - found a different region in list, checking location"); + if ((reg.RegionLocX > (regionInfo.RegionLocX - 2)) && (reg.RegionLocX < (regionInfo.RegionLocX + 2))) + { + if ((reg.RegionLocY > (regionInfo.RegionLocY - 2)) && (reg.RegionLocY < (regionInfo.RegionLocY + 2))) + { + neighbours.Add(reg); + } + } + } + } + return neighbours; + } + + /// + /// + /// + /// + /// + public RegionInfo RequestNeighbourInfo(ulong regionHandle) + { + if (this.regions.ContainsKey(regionHandle)) + { + return this.regions[regionHandle]; + } + return null; + } + + /// + /// + /// + /// + /// + /// + /// + /// + public List RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY) + { + List mapBlocks = new List(); + foreach(RegionInfo regInfo in this.regions.Values) + { + if (((regInfo.RegionLocX >= minX) && (regInfo.RegionLocX <= maxX)) && ((regInfo.RegionLocY >= minY) && (regInfo.RegionLocY <= maxY))) + { + MapBlockData map = new MapBlockData(); + map.Name = regInfo.RegionName; + map.X = (ushort)regInfo.RegionLocX; + map.Y = (ushort)regInfo.RegionLocY; + map.WaterHeight =(byte) regInfo.estateSettings.waterHeight; + map.MapImageId = regInfo.estateSettings.terrainImageID; //new LLUUID("00000000-0000-0000-9999-000000000007"); + map.Agents = 1; + map.RegionFlags = 72458694; + map.Access = 13; + mapBlocks.Add(map); + } + } + return mapBlocks; + } + + /// + /// + /// + /// + /// + public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) //should change from agentCircuitData + { + //Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent"); + if (this.regionHosts.ContainsKey(regionHandle)) + { + // Console.WriteLine("CommsManager- Informing a region to expect child agent"); + this.regionHosts[regionHandle].TriggerExpectUser(regionHandle, agentData); + return true; + } + return false; + } + + /// + /// + /// + /// + /// + /// + /// + public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) + { + if (this.regionHosts.ContainsKey(regionHandle)) + { + // Console.WriteLine("CommsManager- Informing a region to expect avatar crossing"); + this.regionHosts[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position); + return true; + } + return false; + } + + /// + /// Is a Sandbox mode method, used by the local Login server to inform a region of a connection user/session + /// + /// + /// + /// + public bool AddNewSession(ulong regionHandle, Login loginData) + { + AgentCircuitData agent = new AgentCircuitData(); + agent.AgentID = loginData.Agent; + agent.firstname = loginData.First; + agent.lastname = loginData.Last; + agent.SessionID = loginData.Session; + agent.SecureSessionID = loginData.SecureSession; + agent.circuitcode = loginData.CircuitCode; + agent.BaseFolder = loginData.BaseFolder; + agent.InventoryFolder = loginData.InventoryFolder; + agent.startpos = new LLVector3(128, 128, 70); + agent.CapsPath = loginData.CapsPath; + + if (this.regionHosts.ContainsKey(regionHandle)) + { + this.regionHosts[regionHandle].TriggerExpectUser(regionHandle, agent); + return true; + } + + // region not found + return false; + } + } +} + diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs index 592b36c..a4cefc4 100644 --- a/OpenSim/Region/Communications/Local/LocalUserServices.cs +++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs @@ -1,142 +1,142 @@ -using System; -using libsecondlife; -using OpenSim.Framework.Communications; -using OpenSim.Framework.Data; -using OpenSim.Framework.Types; -using OpenSim.Framework.UserManagement; -using OpenSim.Framework.Utilities; - -namespace OpenSim.Region.Communications.Local -{ - public class LocalUserServices : UserManagerBase, IUserServices - { - private CommunicationsLocal m_Parent; - - private NetworkServersInfo serversInfo; - private uint defaultHomeX ; - private uint defaultHomeY; - public LocalUserServices(CommunicationsLocal parent, NetworkServersInfo serversData) - { - m_Parent = parent; - this.serversInfo = serversData; - defaultHomeX = this.serversInfo.DefaultHomeLocX; - defaultHomeY = this.serversInfo.DefaultHomeLocY; - } - - public UserProfileData GetUserProfile(string firstName, string lastName) - { - return GetUserProfile(firstName + " " + lastName); - } - - public UserProfileData GetUserProfile(string name) - { - return this.getUserProfile(name); - } - - public UserProfileData GetUserProfile(LLUUID avatarID) - { - return this.getUserProfile(avatarID); - } - - /// - /// - /// - /// - public override string GetMessage() - { - return "Welcome to OpenSim"; - } - - public override UserProfileData GetTheUser(string firstname, string lastname) - { - UserProfileData profile = getUserProfile(firstname, lastname); - if (profile != null) - { - - return profile; - } - - //no current user account so make one - Console.WriteLine("No User account found so creating a new one "); - this.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY); - - profile = getUserProfile(firstname, lastname); - - return profile; - } - - public override bool AuthenticateUser(UserProfileData profile, string password) - { - //for now we will accept any password in sandbox mode - Console.WriteLine("authorising user"); - return true; - } - - public override void CustomiseResponse(LoginResponse response, UserProfileData theUser) - { - ulong currentRegion = theUser.currentAgent.currentHandle; - RegionInfo reg = m_Parent.GridServer.RequestNeighbourInfo(currentRegion); - - if (reg != null) - { - response.Home = "{'region_handle':[r" + (reg.RegionLocX * 256).ToString() + ",r" + (reg.RegionLocY * 256).ToString() + "], " + - "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + - "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; - string capsPath = Util.GetRandomCapsPath(); - response.SimAddress = reg.ExternalEndPoint.Address.ToString(); - response.SimPort = (Int32)reg.ExternalEndPoint.Port; - response.RegionX = reg.RegionLocX ; - response.RegionY = reg.RegionLocY ; - - //following port needs changing as we don't want a http listener for every region (or do we?) - response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/"; - theUser.currentAgent.currentRegion = reg.SimUUID; - theUser.currentAgent.currentHandle = reg.RegionHandle; - - Login _login = new Login(); - //copy data to login object - _login.First = response.Firstname; - _login.Last = response.Lastname; - _login.Agent = response.AgentID; - _login.Session = response.SessionID; - _login.SecureSession = response.SecureSessionID; - _login.CircuitCode = (uint)response.CircuitCode; - _login.CapsPath = capsPath; - - m_Parent.InformRegionOfLogin(currentRegion, _login); - } - else - { - Console.WriteLine("not found region " + currentRegion); - } - - } - - public UserProfileData SetupMasterUser(string firstName, string lastName) - { - return SetupMasterUser(firstName, lastName, ""); - } - - public UserProfileData SetupMasterUser(string firstName, string lastName, string password) - { - UserProfileData profile = getUserProfile(firstName, lastName); - if (profile != null) - { - - return profile; - } - - Console.WriteLine("Unknown Master User. Sandbox Mode: Creating Account"); - this.AddUserProfile(firstName, lastName, password, defaultHomeX, defaultHomeY); - - profile = getUserProfile(firstName, lastName); - - if (profile == null) - { - Console.WriteLine("Unknown Master User after creation attempt. No clue what to do here."); - } - - return profile; - } - } -} +using System; +using libsecondlife; +using OpenSim.Framework.Communications; +using OpenSim.Framework.Data; +using OpenSim.Framework.Types; +using OpenSim.Framework.UserManagement; +using OpenSim.Framework.Utilities; + +namespace OpenSim.Region.Communications.Local +{ + public class LocalUserServices : UserManagerBase, IUserServices + { + private CommunicationsLocal m_Parent; + + private NetworkServersInfo serversInfo; + private uint defaultHomeX ; + private uint defaultHomeY; + public LocalUserServices(CommunicationsLocal parent, NetworkServersInfo serversData) + { + m_Parent = parent; + this.serversInfo = serversData; + defaultHomeX = this.serversInfo.DefaultHomeLocX; + defaultHomeY = this.serversInfo.DefaultHomeLocY; + } + + public UserProfileData GetUserProfile(string firstName, string lastName) + { + return GetUserProfile(firstName + " " + lastName); + } + + public UserProfileData GetUserProfile(string name) + { + return this.getUserProfile(name); + } + + public UserProfileData GetUserProfile(LLUUID avatarID) + { + return this.getUserProfile(avatarID); + } + + /// + /// + /// + /// + public override string GetMessage() + { + return "Welcome to OpenSim"; + } + + public override UserProfileData GetTheUser(string firstname, string lastname) + { + UserProfileData profile = getUserProfile(firstname, lastname); + if (profile != null) + { + + return profile; + } + + //no current user account so make one + Console.WriteLine("No User account found so creating a new one "); + this.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY); + + profile = getUserProfile(firstname, lastname); + + return profile; + } + + public override bool AuthenticateUser(UserProfileData profile, string password) + { + //for now we will accept any password in sandbox mode + Console.WriteLine("authorising user"); + return true; + } + + public override void CustomiseResponse(LoginResponse response, UserProfileData theUser) + { + ulong currentRegion = theUser.currentAgent.currentHandle; + RegionInfo reg = m_Parent.GridServer.RequestNeighbourInfo(currentRegion); + + if (reg != null) + { + response.Home = "{'region_handle':[r" + (reg.RegionLocX * 256).ToString() + ",r" + (reg.RegionLocY * 256).ToString() + "], " + + "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + + "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; + string capsPath = Util.GetRandomCapsPath(); + response.SimAddress = reg.ExternalEndPoint.Address.ToString(); + response.SimPort = (Int32)reg.ExternalEndPoint.Port; + response.RegionX = reg.RegionLocX ; + response.RegionY = reg.RegionLocY ; + + //following port needs changing as we don't want a http listener for every region (or do we?) + response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/"; + theUser.currentAgent.currentRegion = reg.SimUUID; + theUser.currentAgent.currentHandle = reg.RegionHandle; + + Login _login = new Login(); + //copy data to login object + _login.First = response.Firstname; + _login.Last = response.Lastname; + _login.Agent = response.AgentID; + _login.Session = response.SessionID; + _login.SecureSession = response.SecureSessionID; + _login.CircuitCode = (uint)response.CircuitCode; + _login.CapsPath = capsPath; + + m_Parent.InformRegionOfLogin(currentRegion, _login); + } + else + { + Console.WriteLine("not found region " + currentRegion); + } + + } + + public UserProfileData SetupMasterUser(string firstName, string lastName) + { + return SetupMasterUser(firstName, lastName, ""); + } + + public UserProfileData SetupMasterUser(string firstName, string lastName, string password) + { + UserProfileData profile = getUserProfile(firstName, lastName); + if (profile != null) + { + + return profile; + } + + Console.WriteLine("Unknown Master User. Sandbox Mode: Creating Account"); + this.AddUserProfile(firstName, lastName, password, defaultHomeX, defaultHomeY); + + profile = getUserProfile(firstName, lastName); + + if (profile == null) + { + Console.WriteLine("Unknown Master User after creation attempt. No clue what to do here."); + } + + return profile; + } + } +} diff --git a/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs b/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs index 9afb75e..ca64319 100644 --- a/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Communications/Local/Properties/AssemblyInfo.cs @@ -1,33 +1,33 @@ -using System.Reflection; -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("OpenSim.Region.Communications.Local")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenSim.Region.Communications.Local")] -[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("fb173926-bd0a-4cd0-bb45-185b2f72ddfb")] - -// 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")] +using System.Reflection; +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("OpenSim.Region.Communications.Local")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OpenSim.Region.Communications.Local")] +[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("fb173926-bd0a-4cd0-bb45-185b2f72ddfb")] + +// 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")] diff --git a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs index cc05845..9df0901 100644 --- a/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs +++ b/OpenSim/Region/Communications/OGS1/CommunicationsOGS1.cs @@ -1,18 +1,18 @@ -using OpenSim.Framework.Communications; -using OpenSim.Framework.Types; -using OpenSim.Framework.Servers; - -namespace OpenSim.Region.Communications.OGS1 -{ - public class CommunicationsOGS1 : CommunicationsManager - { - - public CommunicationsOGS1(NetworkServersInfo serversInfo, BaseHttpServer httpServer ) :base(serversInfo, httpServer) - { - OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo, httpServer); - GridServer = gridInterComms; - InterRegion = gridInterComms; - UserServer = new OGS1UserServices(this); - } - } -} +using OpenSim.Framework.Communications; +using OpenSim.Framework.Types; +using OpenSim.Framework.Servers; + +namespace OpenSim.Region.Communications.OGS1 +{ + public class CommunicationsOGS1 : CommunicationsManager + { + + public CommunicationsOGS1(NetworkServersInfo serversInfo, BaseHttpServer httpServer ) :base(serversInfo, httpServer) + { + OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo, httpServer); + GridServer = gridInterComms; + InterRegion = gridInterComms; + UserServer = new OGS1UserServices(this); + } + } +} diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index e5a73fd..3cb2889 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs @@ -1,431 +1,431 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Net; -using System.Runtime.Remoting; -using System.Runtime.Remoting.Channels; -using System.Runtime.Remoting.Channels.Tcp; -using libsecondlife; -using Nwc.XmlRpc; -using OpenSim.Framework; -using OpenSim.Framework.Communications; -using OpenSim.Framework.Console; -using OpenSim.Framework.Servers; -using OpenSim.Framework.Types; - -namespace OpenSim.Region.Communications.OGS1 -{ - public class OGS1GridServices : IGridServices, IInterRegionCommunications - { - public Dictionary listeners = new Dictionary(); - protected Dictionary regions = new Dictionary(); - - public BaseHttpServer httpListener; - public NetworkServersInfo serversInfo; - public BaseHttpServer httpServer; - - /// - /// - /// - /// - /// - public OGS1GridServices(NetworkServersInfo servers_info, BaseHttpServer httpServe) - { - serversInfo = servers_info; - httpServer = httpServe; - httpServer.AddXmlRPCHandler("expect_user", this.ExpectUser); - this.StartRemoting(); - } - - /// - /// - /// - /// - /// - public RegionCommsListener RegisterRegion(RegionInfo regionInfo) - { - if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle)) - { - this.regions.Add(regionInfo.RegionHandle, regionInfo); - } - - Hashtable GridParams = new Hashtable(); - // Login / Authentication - - GridParams["authkey"] = serversInfo.GridSendKey; - GridParams["UUID"] = regionInfo.SimUUID.ToStringHyphenated(); - GridParams["sim_ip"] = regionInfo.ExternalHostName; - GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString(); - GridParams["region_locx"] = regionInfo.RegionLocX.ToString(); - GridParams["region_locy"] = regionInfo.RegionLocY.ToString(); - GridParams["sim_name"] = regionInfo.RegionName; - GridParams["http_port"] = serversInfo.HttpListenerPort.ToString(); - GridParams["remoting_port"] = serversInfo.RemotingListenerPort.ToString(); - GridParams["map-image-id"] = regionInfo.estateSettings.terrainImageID.ToStringHyphenated(); - - // 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(serversInfo.GridURL, 3000); - Hashtable GridRespData = (Hashtable)GridResp.Value; - - Hashtable griddatahash = GridRespData; - - // Process Response - if (GridRespData.ContainsKey("error")) - { - string errorstring = (string)GridRespData["error"]; - MainLog.Instance.Error("Unable to connect to grid: " + errorstring); - return null; - } - - // Initialise the background listeners - RegionCommsListener regListener = new RegionCommsListener(); - if (!this.listeners.ContainsKey(regionInfo.RegionHandle)) - { - this.listeners.Add(regionInfo.RegionHandle, regListener); - } - else - { - listeners[regionInfo.RegionHandle] = regListener; - } - - return regListener; - } - - /// - /// - /// - /// - /// - public List RequestNeighbours(RegionInfo regionInfo) - { - - Hashtable respData = MapBlockQuery((int)regionInfo.RegionLocX - 1, (int)regionInfo.RegionLocY - 1, (int)regionInfo.RegionLocX + 1, (int)regionInfo.RegionLocY + 1); - - List neighbours = new List(); - - foreach (ArrayList a in respData.Values) - { - foreach (Hashtable n in a) - { - uint regX = Convert.ToUInt32(n["x"]); - uint regY = Convert.ToUInt32(n["y"]); - if ((regionInfo.RegionLocX != regX) || (regionInfo.RegionLocY != regY)) - { - string externalIpStr = (string)n["sim_ip"]; - uint port = Convert.ToUInt32(n["sim_port"]); - string externalUri = (string)n["sim_uri"]; - - IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(externalIpStr), (int)port); - string neighbourExternalUri = externalUri; - RegionInfo neighbour = new RegionInfo(regX, regY, neighbourInternalEndPoint, externalIpStr); - - //OGS1 - //neighbour.RegionHandle = (ulong)n["regionhandle"]; is now calculated locally - - neighbour.RegionName = (string)n["name"]; - - //OGS1+ - neighbour.SimUUID = (string)n["uuid"]; - - neighbours.Add(neighbour); - } - } - } - - return neighbours; - } - - /// - /// - /// - /// - /// - public RegionInfo RequestNeighbourInfo(ulong regionHandle) - { - if (this.regions.ContainsKey(regionHandle)) - { - return this.regions[regionHandle]; - } - //TODO not a region in this instance so ask remote grid server - - Hashtable requestData = new Hashtable(); - requestData["region_handle"] = regionHandle.ToString(); - requestData["authkey"] = this.serversInfo.GridSendKey; - ArrayList SendParams = new ArrayList(); - SendParams.Add(requestData); - XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); - XmlRpcResponse GridResp = GridReq.Send(this.serversInfo.GridURL, 3000); - - Hashtable responseData = (Hashtable)GridResp.Value; - - if (responseData.ContainsKey("error")) - { - Console.WriteLine("error received from grid server" + responseData["error"]); - return null; - } - - uint regX = Convert.ToUInt32((string)responseData["region_locx"]); - uint regY = Convert.ToUInt32((string)responseData["region_locy"]); - string internalIpStr = (string)responseData["sim_ip"]; - uint port = Convert.ToUInt32(responseData["sim_port"]); - string externalUri = (string)responseData["sim_uri"]; - - IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int)port); - string neighbourExternalUri = externalUri; - RegionInfo regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, internalIpStr); - - regionInfo.RemotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); - regionInfo.RemotingAddress = internalIpStr; - - regionInfo.SimUUID = new LLUUID((string)responseData["region_UUID"]); - regionInfo.RegionName = (string)responseData["region_name"]; - - return regionInfo; - } - - /// - /// - /// - /// - /// - /// - /// - /// - public List RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY) - { - Hashtable respData = MapBlockQuery(minX, minY, maxX, maxY); - - List neighbours = new List(); - - foreach (ArrayList a in respData.Values) - { - foreach (Hashtable n in a) - { - MapBlockData neighbour = new MapBlockData(); - - neighbour.X = Convert.ToUInt16(n["x"]); - neighbour.Y = Convert.ToUInt16(n["y"]); - - neighbour.Name = (string)n["name"]; - neighbour.Access = Convert.ToByte(n["access"]); - neighbour.RegionFlags = Convert.ToUInt32(n["region-flags"]); - neighbour.WaterHeight = Convert.ToByte(n["water-height"]); - neighbour.MapImageId = new LLUUID((string)n["map-image-id"]); - - neighbours.Add(neighbour); - } - } - - return neighbours; - } - - /// - /// Performs a XML-RPC query against the grid server returning mapblock information in the specified coordinates - /// - /// REDUNDANT - OGS1 is to be phased out in favour of OGS2 - /// Minimum X value - /// Minimum Y value - /// Maximum X value - /// Maximum Y value - /// Hashtable of hashtables containing map data elements - private Hashtable MapBlockQuery(int minX, int minY, int maxX, int maxY) - { - Hashtable param = new Hashtable(); - param["xmin"] = minX; - param["ymin"] = minY; - param["xmax"] = maxX; - param["ymax"] = maxY; - IList parameters = new ArrayList(); - parameters.Add(param); - XmlRpcRequest req = new XmlRpcRequest("map_block", parameters); - XmlRpcResponse resp = req.Send(serversInfo.GridURL, 3000); - Hashtable respData = (Hashtable)resp.Value; - return respData; - } - - // Grid Request Processing - /// - /// - /// - /// - /// - public XmlRpcResponse ExpectUser(XmlRpcRequest request) - { - Console.WriteLine("Expecting User..."); - Hashtable requestData = (Hashtable)request.Params[0]; - AgentCircuitData agentData = new AgentCircuitData(); - agentData.SessionID = new LLUUID((string)requestData["session_id"]); - agentData.SecureSessionID = new LLUUID((string)requestData["secure_session_id"]); - agentData.firstname = (string)requestData["firstname"]; - agentData.lastname = (string)requestData["lastname"]; - agentData.AgentID = new LLUUID((string)requestData["agent_id"]); - agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); - agentData.CapsPath = (string)requestData["caps_path"]; - - if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1")) - { - agentData.child = true; - } - else - { - agentData.startpos = new LLVector3(Convert.ToUInt32(requestData["startpos_x"]), Convert.ToUInt32(requestData["startpos_y"]), Convert.ToUInt32(requestData["startpos_z"])); - agentData.child = false; - - } - - if (listeners.ContainsKey(Convert.ToUInt64((string)requestData["regionhandle"]))) - { - this.listeners[Convert.ToUInt64((string)requestData["regionhandle"])].TriggerExpectUser(Convert.ToUInt64((string)requestData["regionhandle"]), agentData); - } - else - { - MainLog.Instance.Error("ExpectUser() - Unknown region " + ((ulong)requestData["regionhandle"]).ToString()); - } - - MainLog.Instance.Verbose("ExpectUser() - Welcoming new user..."); - - return new XmlRpcResponse(); - } - - #region InterRegion Comms - /// - /// - /// - private void StartRemoting() - { - TcpChannel ch = new TcpChannel(this.serversInfo.RemotingListenerPort); - ChannelServices.RegisterChannel(ch, true); - - WellKnownServiceTypeEntry wellType = new WellKnownServiceTypeEntry(typeof(OGS1InterRegionRemoting), "InterRegions", WellKnownObjectMode.Singleton); - RemotingConfiguration.RegisterWellKnownServiceType(wellType); - InterRegionSingleton.Instance.OnArrival += this.IncomingArrival; - InterRegionSingleton.Instance.OnChildAgent += this.IncomingChildAgent; - } - - #region Methods called by regions in this instance - /// - /// - /// - /// - /// - /// - public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) - { - if (this.listeners.ContainsKey(regionHandle)) - { - this.listeners[regionHandle].TriggerExpectUser(regionHandle, agentData); - return true; - } - RegionInfo regInfo = this.RequestNeighbourInfo(regionHandle); - if (regInfo != null) - { - //don't want to be creating a new link to the remote instance every time like we are here - bool retValue = false; - - - OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( - typeof(OGS1InterRegionRemoting), - "tcp://"+ regInfo.RemotingAddress+":"+regInfo.RemotingPort+"/InterRegions"); - if (remObject != null) - { - - retValue = remObject.InformRegionOfChildAgent(regionHandle, agentData); - } - else - { - Console.WriteLine("remoting object not found"); - } - remObject = null; - - - return retValue; - } - - return false; - } - - /// - /// - /// - /// - /// - /// - /// - public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) - { - if (this.listeners.ContainsKey(regionHandle)) - { - this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position); - return true; - } - RegionInfo regInfo = this.RequestNeighbourInfo(regionHandle); - if (regInfo != null) - { - bool retValue = false; - - - OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( - typeof(OGS1InterRegionRemoting), - "tcp://" + regInfo.RemotingAddress + ":" + regInfo.RemotingPort + "/InterRegions"); - if (remObject != null) - { - - retValue = remObject.ExpectAvatarCrossing(regionHandle, agentID, position); - } - else - { - Console.WriteLine("remoting object not found"); - } - remObject = null; - - - return retValue; - } - //TODO need to see if we know about where this region is and use .net remoting - // to inform it. - return false; - } - #endregion - - #region Methods triggered by calls from external instances - /// - /// - /// - /// - /// - /// - public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData) - { - if (this.listeners.ContainsKey(regionHandle)) - { - this.listeners[regionHandle].TriggerExpectUser(regionHandle, agentData); - return true; - } - return false; - } - - /// - /// - /// - /// - /// - /// - /// - public bool IncomingArrival(ulong regionHandle, LLUUID agentID, LLVector3 position) - { - if (this.listeners.ContainsKey(regionHandle)) - { - this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position); - return true; - } - return false; - } - #endregion - #endregion - } -} +using System; +using System.Collections; +using System.Collections.Generic; +using System.Net; +using System.Runtime.Remoting; +using System.Runtime.Remoting.Channels; +using System.Runtime.Remoting.Channels.Tcp; +using libsecondlife; +using Nwc.XmlRpc; +using OpenSim.Framework; +using OpenSim.Framework.Communications; +using OpenSim.Framework.Console; +using OpenSim.Framework.Servers; +using OpenSim.Framework.Types; + +namespace OpenSim.Region.Communications.OGS1 +{ + public class OGS1GridServices : IGridServices, IInterRegionCommunications + { + public Dictionary listeners = new Dictionary(); + protected Dictionary regions = new Dictionary(); + + public BaseHttpServer httpListener; + public NetworkServersInfo serversInfo; + public BaseHttpServer httpServer; + + /// + /// + /// + /// + /// + public OGS1GridServices(NetworkServersInfo servers_info, BaseHttpServer httpServe) + { + serversInfo = servers_info; + httpServer = httpServe; + httpServer.AddXmlRPCHandler("expect_user", this.ExpectUser); + this.StartRemoting(); + } + + /// + /// + /// + /// + /// + public RegionCommsListener RegisterRegion(RegionInfo regionInfo) + { + if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle)) + { + this.regions.Add(regionInfo.RegionHandle, regionInfo); + } + + Hashtable GridParams = new Hashtable(); + // Login / Authentication + + GridParams["authkey"] = serversInfo.GridSendKey; + GridParams["UUID"] = regionInfo.SimUUID.ToStringHyphenated(); + GridParams["sim_ip"] = regionInfo.ExternalHostName; + GridParams["sim_port"] = regionInfo.InternalEndPoint.Port.ToString(); + GridParams["region_locx"] = regionInfo.RegionLocX.ToString(); + GridParams["region_locy"] = regionInfo.RegionLocY.ToString(); + GridParams["sim_name"] = regionInfo.RegionName; + GridParams["http_port"] = serversInfo.HttpListenerPort.ToString(); + GridParams["remoting_port"] = serversInfo.RemotingListenerPort.ToString(); + GridParams["map-image-id"] = regionInfo.estateSettings.terrainImageID.ToStringHyphenated(); + + // 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(serversInfo.GridURL, 3000); + Hashtable GridRespData = (Hashtable)GridResp.Value; + + Hashtable griddatahash = GridRespData; + + // Process Response + if (GridRespData.ContainsKey("error")) + { + string errorstring = (string)GridRespData["error"]; + MainLog.Instance.Error("Unable to connect to grid: " + errorstring); + return null; + } + + // Initialise the background listeners + RegionCommsListener regListener = new RegionCommsListener(); + if (!this.listeners.ContainsKey(regionInfo.RegionHandle)) + { + this.listeners.Add(regionInfo.RegionHandle, regListener); + } + else + { + listeners[regionInfo.RegionHandle] = regListener; + } + + return regListener; + } + + /// + /// + /// + /// + /// + public List RequestNeighbours(RegionInfo regionInfo) + { + + Hashtable respData = MapBlockQuery((int)regionInfo.RegionLocX - 1, (int)regionInfo.RegionLocY - 1, (int)regionInfo.RegionLocX + 1, (int)regionInfo.RegionLocY + 1); + + List neighbours = new List(); + + foreach (ArrayList a in respData.Values) + { + foreach (Hashtable n in a) + { + uint regX = Convert.ToUInt32(n["x"]); + uint regY = Convert.ToUInt32(n["y"]); + if ((regionInfo.RegionLocX != regX) || (regionInfo.RegionLocY != regY)) + { + string externalIpStr = (string)n["sim_ip"]; + uint port = Convert.ToUInt32(n["sim_port"]); + string externalUri = (string)n["sim_uri"]; + + IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(externalIpStr), (int)port); + string neighbourExternalUri = externalUri; + RegionInfo neighbour = new RegionInfo(regX, regY, neighbourInternalEndPoint, externalIpStr); + + //OGS1 + //neighbour.RegionHandle = (ulong)n["regionhandle"]; is now calculated locally + + neighbour.RegionName = (string)n["name"]; + + //OGS1+ + neighbour.SimUUID = (string)n["uuid"]; + + neighbours.Add(neighbour); + } + } + } + + return neighbours; + } + + /// + /// + /// + /// + /// + public RegionInfo RequestNeighbourInfo(ulong regionHandle) + { + if (this.regions.ContainsKey(regionHandle)) + { + return this.regions[regionHandle]; + } + //TODO not a region in this instance so ask remote grid server + + Hashtable requestData = new Hashtable(); + requestData["region_handle"] = regionHandle.ToString(); + requestData["authkey"] = this.serversInfo.GridSendKey; + ArrayList SendParams = new ArrayList(); + SendParams.Add(requestData); + XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); + XmlRpcResponse GridResp = GridReq.Send(this.serversInfo.GridURL, 3000); + + Hashtable responseData = (Hashtable)GridResp.Value; + + if (responseData.ContainsKey("error")) + { + Console.WriteLine("error received from grid server" + responseData["error"]); + return null; + } + + uint regX = Convert.ToUInt32((string)responseData["region_locx"]); + uint regY = Convert.ToUInt32((string)responseData["region_locy"]); + string internalIpStr = (string)responseData["sim_ip"]; + uint port = Convert.ToUInt32(responseData["sim_port"]); + string externalUri = (string)responseData["sim_uri"]; + + IPEndPoint neighbourInternalEndPoint = new IPEndPoint(IPAddress.Parse(internalIpStr), (int)port); + string neighbourExternalUri = externalUri; + RegionInfo regionInfo = new RegionInfo(regX, regY, neighbourInternalEndPoint, internalIpStr); + + regionInfo.RemotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); + regionInfo.RemotingAddress = internalIpStr; + + regionInfo.SimUUID = new LLUUID((string)responseData["region_UUID"]); + regionInfo.RegionName = (string)responseData["region_name"]; + + return regionInfo; + } + + /// + /// + /// + /// + /// + /// + /// + /// + public List RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY) + { + Hashtable respData = MapBlockQuery(minX, minY, maxX, maxY); + + List neighbours = new List(); + + foreach (ArrayList a in respData.Values) + { + foreach (Hashtable n in a) + { + MapBlockData neighbour = new MapBlockData(); + + neighbour.X = Convert.ToUInt16(n["x"]); + neighbour.Y = Convert.ToUInt16(n["y"]); + + neighbour.Name = (string)n["name"]; + neighbour.Access = Convert.ToByte(n["access"]); + neighbour.RegionFlags = Convert.ToUInt32(n["region-flags"]); + neighbour.WaterHeight = Convert.ToByte(n["water-height"]); + neighbour.MapImageId = new LLUUID((string)n["map-image-id"]); + + neighbours.Add(neighbour); + } + } + + return neighbours; + } + + /// + /// Performs a XML-RPC query against the grid server returning mapblock information in the specified coordinates + /// + /// REDUNDANT - OGS1 is to be phased out in favour of OGS2 + /// Minimum X value + /// Minimum Y value + /// Maximum X value + /// Maximum Y value + /// Hashtable of hashtables containing map data elements + private Hashtable MapBlockQuery(int minX, int minY, int maxX, int maxY) + { + Hashtable param = new Hashtable(); + param["xmin"] = minX; + param["ymin"] = minY; + param["xmax"] = maxX; + param["ymax"] = maxY; + IList parameters = new ArrayList(); + parameters.Add(param); + XmlRpcRequest req = new XmlRpcRequest("map_block", parameters); + XmlRpcResponse resp = req.Send(serversInfo.GridURL, 3000); + Hashtable respData = (Hashtable)resp.Value; + return respData; + } + + // Grid Request Processing + /// + /// + /// + /// + /// + public XmlRpcResponse ExpectUser(XmlRpcRequest request) + { + Console.WriteLine("Expecting User..."); + Hashtable requestData = (Hashtable)request.Params[0]; + AgentCircuitData agentData = new AgentCircuitData(); + agentData.SessionID = new LLUUID((string)requestData["session_id"]); + agentData.SecureSessionID = new LLUUID((string)requestData["secure_session_id"]); + agentData.firstname = (string)requestData["firstname"]; + agentData.lastname = (string)requestData["lastname"]; + agentData.AgentID = new LLUUID((string)requestData["agent_id"]); + agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); + agentData.CapsPath = (string)requestData["caps_path"]; + + if (requestData.ContainsKey("child_agent") && requestData["child_agent"].Equals("1")) + { + agentData.child = true; + } + else + { + agentData.startpos = new LLVector3(Convert.ToUInt32(requestData["startpos_x"]), Convert.ToUInt32(requestData["startpos_y"]), Convert.ToUInt32(requestData["startpos_z"])); + agentData.child = false; + + } + + if (listeners.ContainsKey(Convert.ToUInt64((string)requestData["regionhandle"]))) + { + this.listeners[Convert.ToUInt64((string)requestData["regionhandle"])].TriggerExpectUser(Convert.ToUInt64((string)requestData["regionhandle"]), agentData); + } + else + { + MainLog.Instance.Error("ExpectUser() - Unknown region " + ((ulong)requestData["regionhandle"]).ToString()); + } + + MainLog.Instance.Verbose("ExpectUser() - Welcoming new user..."); + + return new XmlRpcResponse(); + } + + #region InterRegion Comms + /// + /// + /// + private void StartRemoting() + { + TcpChannel ch = new TcpChannel(this.serversInfo.RemotingListenerPort); + ChannelServices.RegisterChannel(ch, true); + + WellKnownServiceTypeEntry wellType = new WellKnownServiceTypeEntry(typeof(OGS1InterRegionRemoting), "InterRegions", WellKnownObjectMode.Singleton); + RemotingConfiguration.RegisterWellKnownServiceType(wellType); + InterRegionSingleton.Instance.OnArrival += this.IncomingArrival; + InterRegionSingleton.Instance.OnChildAgent += this.IncomingChildAgent; + } + + #region Methods called by regions in this instance + /// + /// + /// + /// + /// + /// + public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) + { + if (this.listeners.ContainsKey(regionHandle)) + { + this.listeners[regionHandle].TriggerExpectUser(regionHandle, agentData); + return true; + } + RegionInfo regInfo = this.RequestNeighbourInfo(regionHandle); + if (regInfo != null) + { + //don't want to be creating a new link to the remote instance every time like we are here + bool retValue = false; + + + OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( + typeof(OGS1InterRegionRemoting), + "tcp://"+ regInfo.RemotingAddress+":"+regInfo.RemotingPort+"/InterRegions"); + if (remObject != null) + { + + retValue = remObject.InformRegionOfChildAgent(regionHandle, agentData); + } + else + { + Console.WriteLine("remoting object not found"); + } + remObject = null; + + + return retValue; + } + + return false; + } + + /// + /// + /// + /// + /// + /// + /// + public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) + { + if (this.listeners.ContainsKey(regionHandle)) + { + this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position); + return true; + } + RegionInfo regInfo = this.RequestNeighbourInfo(regionHandle); + if (regInfo != null) + { + bool retValue = false; + + + OGS1InterRegionRemoting remObject = (OGS1InterRegionRemoting)Activator.GetObject( + typeof(OGS1InterRegionRemoting), + "tcp://" + regInfo.RemotingAddress + ":" + regInfo.RemotingPort + "/InterRegions"); + if (remObject != null) + { + + retValue = remObject.ExpectAvatarCrossing(regionHandle, agentID, position); + } + else + { + Console.WriteLine("remoting object not found"); + } + remObject = null; + + + return retValue; + } + //TODO need to see if we know about where this region is and use .net remoting + // to inform it. + return false; + } + #endregion + + #region Methods triggered by calls from external instances + /// + /// + /// + /// + /// + /// + public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData) + { + if (this.listeners.ContainsKey(regionHandle)) + { + this.listeners[regionHandle].TriggerExpectUser(regionHandle, agentData); + return true; + } + return false; + } + + /// + /// + /// + /// + /// + /// + /// + public bool IncomingArrival(ulong regionHandle, LLUUID agentID, LLVector3 position) + { + if (this.listeners.ContainsKey(regionHandle)) + { + this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position); + return true; + } + return false; + } + #endregion + #endregion + } +} diff --git a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs index f514a29..520c593 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs @@ -1,69 +1,69 @@ -using System; -using libsecondlife; -using OpenSim.Framework.Types; - -namespace OpenSim.Region.Communications.OGS1 -{ - public delegate bool InformRegionChild(ulong regionHandle, AgentCircuitData agentData); - public delegate bool ExpectArrival(ulong regionHandle, LLUUID agentID, LLVector3 position); - - public sealed class InterRegionSingleton - { - static readonly InterRegionSingleton instance = new InterRegionSingleton(); - - public event InformRegionChild OnChildAgent; - public event ExpectArrival OnArrival; - - static InterRegionSingleton() - { - } - - InterRegionSingleton() - { - } - - public static InterRegionSingleton Instance - { - get - { - return instance; - } - } - - public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) - { - if (OnChildAgent != null) - { - return OnChildAgent(regionHandle, agentData); - } - return false; - } - - public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) - { - if (OnArrival != null) - { - return OnArrival(regionHandle, agentID, position); - } - return false; - } - } - - public class OGS1InterRegionRemoting : MarshalByRefObject - { - - public OGS1InterRegionRemoting() - { - } - - public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) - { - return InterRegionSingleton.Instance.InformRegionOfChildAgent(regionHandle, agentData); - } - - public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) - { - return InterRegionSingleton.Instance.ExpectAvatarCrossing(regionHandle, agentID, position); - } - } -} +using System; +using libsecondlife; +using OpenSim.Framework.Types; + +namespace OpenSim.Region.Communications.OGS1 +{ + public delegate bool InformRegionChild(ulong regionHandle, AgentCircuitData agentData); + public delegate bool ExpectArrival(ulong regionHandle, LLUUID agentID, LLVector3 position); + + public sealed class InterRegionSingleton + { + static readonly InterRegionSingleton instance = new InterRegionSingleton(); + + public event InformRegionChild OnChildAgent; + public event ExpectArrival OnArrival; + + static InterRegionSingleton() + { + } + + InterRegionSingleton() + { + } + + public static InterRegionSingleton Instance + { + get + { + return instance; + } + } + + public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) + { + if (OnChildAgent != null) + { + return OnChildAgent(regionHandle, agentData); + } + return false; + } + + public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) + { + if (OnArrival != null) + { + return OnArrival(regionHandle, agentID, position); + } + return false; + } + } + + public class OGS1InterRegionRemoting : MarshalByRefObject + { + + public OGS1InterRegionRemoting() + { + } + + public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) + { + return InterRegionSingleton.Instance.InformRegionOfChildAgent(regionHandle, agentData); + } + + public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) + { + return InterRegionSingleton.Instance.ExpectAvatarCrossing(regionHandle, agentID, position); + } + } +} diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index 46d71c4..0847148 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs @@ -1,101 +1,101 @@ -using System; -using System.Collections; -using libsecondlife; -using Nwc.XmlRpc; -using OpenSim.Framework.Communications; -using OpenSim.Framework.Data; - -namespace OpenSim.Region.Communications.OGS1 -{ - public class OGS1UserServices :IUserServices - { - CommunicationsOGS1 m_parent; - public OGS1UserServices(CommunicationsOGS1 parent) - { - m_parent = parent; - } - - public UserProfileData ConvertXMLRPCDataToUserProfile(Hashtable data) - { - if (data.Contains("error_type")) - { - Console.WriteLine("Error sent by user server when trying to get user profile: (" + data["error_type"] + "): " + data["error_desc"]); - return null; - } - - UserProfileData userData = new UserProfileData(); - userData.username = (string)data["firstname"]; - userData.surname = (string)data["lastname"]; - userData.UUID = new LLUUID((string)data["uuid"]); - userData.userInventoryURI = (string)data["server_inventory"]; - userData.userAssetURI = (string)data["server_asset"]; - userData.profileFirstText = (string)data["profile_firstlife_about"]; - userData.profileFirstImage = new LLUUID((string)data["profile_firstlife_image"]); - userData.profileCanDoMask = Convert.ToUInt32((string)data["profile_can_do"]); - userData.profileWantDoMask = Convert.ToUInt32(data["profile_want_do"]); - userData.profileImage = new LLUUID((string)data["profile_image"]); - userData.lastLogin = Convert.ToInt32((string)data["profile_lastlogin"]); - userData.homeRegion = Convert.ToUInt64((string)data["home_region"]); - userData.homeLocation = new LLVector3((float)Convert.ToDecimal((string)data["home_coordinates_x"]), (float)Convert.ToDecimal((string)data["home_coordinates_y"]), (float)Convert.ToDecimal((string)data["home_coordinates_z"])); - userData.homeLookAt = new LLVector3((float)Convert.ToDecimal((string)data["home_look_x"]), (float)Convert.ToDecimal((string)data["home_look_y"]), (float)Convert.ToDecimal((string)data["home_look_z"])); - - return userData; - } - public UserProfileData GetUserProfile(string firstName, string lastName) - { - return GetUserProfile(firstName + " " + lastName); - } - public UserProfileData GetUserProfile(string name) - { - //try - //{ - Hashtable param = new Hashtable(); - param["avatar_name"] = name; - IList parameters = new ArrayList(); - parameters.Add(param); - XmlRpcRequest req = new XmlRpcRequest("get_user_by_name", parameters); - XmlRpcResponse resp = req.Send(m_parent.ServersInfo.UserURL, 3000); - Hashtable respData = (Hashtable)resp.Value; - - return ConvertXMLRPCDataToUserProfile(respData); - //} - //catch (Exception e) - //{ - // Console.WriteLine("Error when trying to fetch profile data by name from remote user server: " + e.Message); - //} - //return null; - } - public UserProfileData GetUserProfile(LLUUID avatarID) - { - try - { - - Hashtable param = new Hashtable(); - param["avatar_uuid"] = avatarID.ToString(); - IList parameters = new ArrayList(); - parameters.Add(param); - XmlRpcRequest req = new XmlRpcRequest("get_user_by_uuid", parameters); - XmlRpcResponse resp = req.Send(m_parent.ServersInfo.UserURL, 3000); - Hashtable respData = (Hashtable)resp.Value; - - return ConvertXMLRPCDataToUserProfile(respData); - } - catch (Exception e) - { - Console.WriteLine("Error when trying to fetch profile data by uuid from remote user server: " + e.Message); - } - return null; - } - - public UserProfileData SetupMasterUser(string firstName, string lastName) - { - return SetupMasterUser(firstName, lastName, ""); - } - - public UserProfileData SetupMasterUser(string firstName, string lastName, string password) - { - UserProfileData profile = GetUserProfile(firstName, lastName); - return profile; - } - } -} +using System; +using System.Collections; +using libsecondlife; +using Nwc.XmlRpc; +using OpenSim.Framework.Communications; +using OpenSim.Framework.Data; + +namespace OpenSim.Region.Communications.OGS1 +{ + public class OGS1UserServices :IUserServices + { + CommunicationsOGS1 m_parent; + public OGS1UserServices(CommunicationsOGS1 parent) + { + m_parent = parent; + } + + public UserProfileData ConvertXMLRPCDataToUserProfile(Hashtable data) + { + if (data.Contains("error_type")) + { + Console.WriteLine("Error sent by user server when trying to get user profile: (" + data["error_type"] + "): " + data["error_desc"]); + return null; + } + + UserProfileData userData = new UserProfileData(); + userData.username = (string)data["firstname"]; + userData.surname = (string)data["lastname"]; + userData.UUID = new LLUUID((string)data["uuid"]); + userData.userInventoryURI = (string)data["server_inventory"]; + userData.userAssetURI = (string)data["server_asset"]; + userData.profileFirstText = (string)data["profile_firstlife_about"]; + userData.profileFirstImage = new LLUUID((string)data["profile_firstlife_image"]); + userData.profileCanDoMask = Convert.ToUInt32((string)data["profile_can_do"]); + userData.profileWantDoMask = Convert.ToUInt32(data["profile_want_do"]); + userData.profileImage = new LLUUID((string)data["profile_image"]); + userData.lastLogin = Convert.ToInt32((string)data["profile_lastlogin"]); + userData.homeRegion = Convert.ToUInt64((string)data["home_region"]); + userData.homeLocation = new LLVector3((float)Convert.ToDecimal((string)data["home_coordinates_x"]), (float)Convert.ToDecimal((string)data["home_coordinates_y"]), (float)Convert.ToDecimal((string)data["home_coordinates_z"])); + userData.homeLookAt = new LLVector3((float)Convert.ToDecimal((string)data["home_look_x"]), (float)Convert.ToDecimal((string)data["home_look_y"]), (float)Convert.ToDecimal((string)data["home_look_z"])); + + return userData; + } + public UserProfileData GetUserProfile(string firstName, string lastName) + { + return GetUserProfile(firstName + " " + lastName); + } + public UserProfileData GetUserProfile(string name) + { + //try + //{ + Hashtable param = new Hashtable(); + param["avatar_name"] = name; + IList parameters = new ArrayList(); + parameters.Add(param); + XmlRpcRequest req = new XmlRpcRequest("get_user_by_name", parameters); + XmlRpcResponse resp = req.Send(m_parent.ServersInfo.UserURL, 3000); + Hashtable respData = (Hashtable)resp.Value; + + return ConvertXMLRPCDataToUserProfile(respData); + //} + //catch (Exception e) + //{ + // Console.WriteLine("Error when trying to fetch profile data by name from remote user server: " + e.Message); + //} + //return null; + } + public UserProfileData GetUserProfile(LLUUID avatarID) + { + try + { + + Hashtable param = new Hashtable(); + param["avatar_uuid"] = avatarID.ToString(); + IList parameters = new ArrayList(); + parameters.Add(param); + XmlRpcRequest req = new XmlRpcRequest("get_user_by_uuid", parameters); + XmlRpcResponse resp = req.Send(m_parent.ServersInfo.UserURL, 3000); + Hashtable respData = (Hashtable)resp.Value; + + return ConvertXMLRPCDataToUserProfile(respData); + } + catch (Exception e) + { + Console.WriteLine("Error when trying to fetch profile data by uuid from remote user server: " + e.Message); + } + return null; + } + + public UserProfileData SetupMasterUser(string firstName, string lastName) + { + return SetupMasterUser(firstName, lastName, ""); + } + + public UserProfileData SetupMasterUser(string firstName, string lastName, string password) + { + UserProfileData profile = GetUserProfile(firstName, lastName); + return profile; + } + } +} diff --git a/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs b/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs index 41f811a..2bebf9f 100644 --- a/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Communications/OGS1/Properties/AssemblyInfo.cs @@ -1,33 +1,33 @@ -using System.Reflection; -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")] +using System.Reflection; +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