== The "right name and place" commit ==

* Moved InventoryData to Framework.Types/InventoryItemBase.cs
* Moved UserData to Framework.Interfaces/IUserData.cs
* Moved UserProfileData to Framework/Types/UserProfileData.cs
* Deleted ass-backwards Framework dependency on Framework.Data (now it's the other way round)
* Changed some namespaces to reflect file structure
afrisby
lbsa71 2007-10-05 10:14:42 +00:00
parent 271a20742b
commit 5a65521203
35 changed files with 141 additions and 153 deletions

View File

@ -32,10 +32,10 @@ using System.Text;
using System.IO;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
using OpenSim.Framework.Data;
using OpenSim.Region.Capabilities;
using OpenSim.Framework.Servers;

View File

@ -25,22 +25,15 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.IO;
using libsecondlife;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.Framework.Data;
using OpenSim.Framework.Utilities;
using InventoryFolder=OpenSim.Framework.Communications.Caches.InventoryFolder;
namespace OpenSim.Framework.Communications.Caches
namespace OpenSim.Framework.Communications.Cache
{
public class CachedUserInfo
{
private CommunicationsManager m_parentCommsManager;
private readonly CommunicationsManager m_parentCommsManager;
// Fields
public InventoryFolder RootFolder = null;
public UserProfileData UserProfile = null;
@ -127,7 +120,4 @@ namespace OpenSim.Framework.Communications.Caches
return result;
}
}
}
}

View File

@ -32,7 +32,6 @@ using System.Text;
using System.IO;
using libsecondlife;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Data;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;

View File

@ -3,8 +3,8 @@ using System.IO;
using System.Collections.Generic;
using System.Text;
using libsecondlife;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
using OpenSim.Framework.Data;
using Nini.Config;
namespace OpenSim.Framework.Communications.Caches

View File

@ -31,10 +31,10 @@ using System.Collections.Generic;
using System.Text;
using System.IO;
using libsecondlife;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
using OpenSim.Framework.Data;
namespace OpenSim.Framework.Communications.Caches
{

View File

@ -35,7 +35,6 @@ using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
using OpenSim.Framework.Data;
namespace OpenSim.Region.Capabilities
{

View File

@ -29,7 +29,6 @@ using System;
using libsecondlife;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Communications.Caches;
using OpenSim.Framework.Data;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Types;

View File

@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using System.Text;
using OpenSim.Framework.Data;
using libsecondlife;
using OpenSim.Framework.Communications.Caches;
using OpenSim.Framework.Types;
using InventoryFolder = OpenSim.Framework.Communications.Caches.InventoryFolder;
namespace OpenSim.Framework.Communications

View File

@ -4,7 +4,7 @@ using System.Reflection;
using libsecondlife;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Console;
using OpenSim.Framework.Data;
using OpenSim.Framework.Types;
using InventoryFolder=OpenSim.Framework.Communications.Caches.InventoryFolder;
namespace OpenSim.Framework.Communications

View File

@ -6,9 +6,9 @@ using System.Security.Cryptography;
using libsecondlife;
using Nwc.XmlRpc;
using OpenSim.Framework.Console;
using OpenSim.Framework.Data;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Inventory;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
using OpenSim.Framework.Configuration;

View File

@ -37,6 +37,7 @@ using OpenSim.Framework.Configuration;
using OpenSim.Framework.Console;
using OpenSim.Framework.Data;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
namespace OpenSim.Framework.UserManagement

View File

@ -29,6 +29,7 @@ using System;
using System.Collections.Generic;
using Db4objects.Db4o;
using libsecondlife;
using OpenSim.Framework.Types;
namespace OpenSim.Framework.Data.DB4o
{

View File

@ -28,6 +28,7 @@
using System;
using System.IO;
using libsecondlife;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
namespace OpenSim.Framework.Data.DB4o

View File

@ -29,6 +29,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using libsecondlife;
using OpenSim.Framework.Types;
namespace OpenSim.Framework.Data.MySQL
{

View File

@ -30,6 +30,7 @@ using System.Collections.Generic;
using System.Data;
using libsecondlife;
using MySql.Data.MySqlClient;
using OpenSim.Framework.Types;
namespace OpenSim.Framework.Data.MySQL
{

View File

@ -29,6 +29,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using libsecondlife;
using OpenSim.Framework.Types;
namespace OpenSim.Framework.Data.MySQL
{

View File

@ -28,6 +28,7 @@
using System;
using System.IO;
using libsecondlife;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
using System.Data;
using System.Data.SqlTypes;

View File

@ -31,7 +31,6 @@ using System.Net;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Framework.Types;
using OpenSim.Framework.Data;
namespace OpenSim.Framework.Interfaces
{

View File

@ -26,6 +26,7 @@
*
*/
using libsecondlife;
using OpenSim.Framework.Types;
namespace OpenSim.Framework.Data
{

View File

@ -26,7 +26,7 @@
*
*/
using libsecondlife;
using OpenSim.Framework.Data;
using OpenSim.Framework.Types;
namespace OpenSim.Framework.Interfaces
{

View File

@ -28,7 +28,7 @@
using System.Collections.Generic;
using libsecondlife;
namespace OpenSim.Framework.Data
namespace OpenSim.Framework.Types
{
/// <summary>
/// Inventory Item - contains all the properties associated with an individual inventory piece.
@ -219,4 +219,4 @@ namespace OpenSim.Framework.Data
/// <param name="folder">The inventory folder</param>
void updateInventoryFolder(InventoryFolderBase folder);
}
}
}

View File

@ -28,7 +28,7 @@
using System;
using libsecondlife;
namespace OpenSim.Framework.Data
namespace OpenSim.Framework.Types
{
/// <summary>
/// Information about a particular user known to the userserver
@ -68,7 +68,6 @@ namespace OpenSim.Framework.Data
set {
homeRegionX = (uint)(value >> 40);
homeRegionY = (((uint)(value)) >> 8);
Console.WriteLine("HomeRegion => Incoming: " + value + ", Computed: " + homeRegion);
}
}
public uint homeRegionX;
@ -189,4 +188,4 @@ namespace OpenSim.Framework.Data
/// </summary>
public LLVector3 currentPos;
}
}
}

View File

@ -1,83 +1,84 @@
using System;
using System.Collections;
using System.Net;
using Nwc.XmlRpc;
using OpenSim.Framework.Data;
using OpenSim.Framework.UserManagement;
using OpenSim.Framework.Utilities;
using OpenSim.Framework.Configuration;
namespace OpenSim.Grid.UserServer
{
public class UserLoginService : LoginService
{
public UserConfig m_config;
public UserLoginService(UserManagerBase userManager, UserConfig config, string welcomeMess)
: base(userManager, welcomeMess)
{
m_config = config;
}
/// <summary>
/// Customises the login response and fills in missing values.
/// </summary>
/// <param name="response">The existing response</param>
/// <param name="theUser">The user profile</param>
public override void CustomiseResponse(LoginResponse response, UserProfileData theUser)
{
// Load information from the gridserver
SimProfileData SimInfo = new SimProfileData();
SimInfo = SimInfo.RequestSimProfileData(theUser.currentAgent.currentHandle, m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey);
// Customise the response
// Home Location
response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * 256).ToString() + ",r" + (SimInfo.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() + "]}";
// Destination
Console.WriteLine("CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + SimInfo.regionLocY);
response.SimAddress = Util.GetHostFromDNS(SimInfo.serverIP).ToString();
response.SimPort = (Int32)SimInfo.serverPort;
response.RegionX = SimInfo.regionLocX;
response.RegionY = SimInfo.regionLocY;
//Not sure if the + "/CAPS/" should in fact be +"CAPS/" depending if there is already a / as part of httpServerURI
string capsPath = Util.GetRandomCapsPath();
response.SeedCapability = SimInfo.httpServerURI + "CAPS/" + capsPath + "0000/";
// Notify the target of an incoming user
Console.WriteLine("Notifying " + SimInfo.regionName + " (" + SimInfo.serverURI + ")");
// Prepare notification
Hashtable SimParams = new Hashtable();
SimParams["session_id"] = theUser.currentAgent.sessionID.ToString();
SimParams["secure_session_id"] = theUser.currentAgent.secureSessionID.ToString();
SimParams["firstname"] = theUser.username;
SimParams["lastname"] = theUser.surname;
SimParams["agent_id"] = theUser.UUID.ToString();
SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response.CircuitCode);
SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString();
SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString();
SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString();
SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString();
SimParams["caps_path"] = capsPath;
ArrayList SendParams = new ArrayList();
SendParams.Add(SimParams);
// Update agent with target sim
theUser.currentAgent.currentRegion = SimInfo.UUID;
theUser.currentAgent.currentHandle = SimInfo.regionHandle;
System.Console.WriteLine("Informing region --> " + SimInfo.httpServerURI);
using System;
using System.Collections;
using System.Net;
using Nwc.XmlRpc;
using OpenSim.Framework.Data;
using OpenSim.Framework.UserManagement;
using OpenSim.Framework.Utilities;
using OpenSim.Framework.Configuration;
using OpenSim.Framework.Types;
namespace OpenSim.Grid.UserServer
{
public class UserLoginService : LoginService
{
public UserConfig m_config;
public UserLoginService(UserManagerBase userManager, UserConfig config, string welcomeMess)
: base(userManager, welcomeMess)
{
m_config = config;
}
/// <summary>
/// Customises the login response and fills in missing values.
/// </summary>
/// <param name="response">The existing response</param>
/// <param name="theUser">The user profile</param>
public override void CustomiseResponse(LoginResponse response, UserProfileData theUser)
{
// Load information from the gridserver
SimProfileData SimInfo = new SimProfileData();
SimInfo = SimInfo.RequestSimProfileData(theUser.currentAgent.currentHandle, m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey);
// Customise the response
// Home Location
response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * 256).ToString() + ",r" + (SimInfo.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() + "]}";
// Destination
Console.WriteLine("CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + SimInfo.regionLocY);
response.SimAddress = Util.GetHostFromDNS(SimInfo.serverIP).ToString();
response.SimPort = (Int32)SimInfo.serverPort;
response.RegionX = SimInfo.regionLocX;
response.RegionY = SimInfo.regionLocY;
//Not sure if the + "/CAPS/" should in fact be +"CAPS/" depending if there is already a / as part of httpServerURI
string capsPath = Util.GetRandomCapsPath();
response.SeedCapability = SimInfo.httpServerURI + "CAPS/" + capsPath + "0000/";
// Notify the target of an incoming user
Console.WriteLine("Notifying " + SimInfo.regionName + " (" + SimInfo.serverURI + ")");
// Prepare notification
Hashtable SimParams = new Hashtable();
SimParams["session_id"] = theUser.currentAgent.sessionID.ToString();
SimParams["secure_session_id"] = theUser.currentAgent.secureSessionID.ToString();
SimParams["firstname"] = theUser.username;
SimParams["lastname"] = theUser.surname;
SimParams["agent_id"] = theUser.UUID.ToString();
SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response.CircuitCode);
SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString();
SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString();
SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString();
SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString();
SimParams["caps_path"] = capsPath;
ArrayList SendParams = new ArrayList();
SendParams.Add(SimParams);
// Update agent with target sim
theUser.currentAgent.currentRegion = SimInfo.UUID;
theUser.currentAgent.currentHandle = SimInfo.regionHandle;
System.Console.WriteLine("Informing region --> " + SimInfo.httpServerURI);
// Send
try
{
XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams);
XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000);
}
catch( WebException e )
}
catch( WebException e )
{
switch( e.Status )
{
@ -88,8 +89,8 @@ namespace OpenSim.Grid.UserServer
default:
throw;
}
}
}
}
}
}
}
}
}

View File

@ -29,7 +29,7 @@ using System;
using System.Collections;
using System.Net;
using Nwc.XmlRpc;
using OpenSim.Framework.Data;
using OpenSim.Framework.Types;
using OpenSim.Framework.UserManagement;
using OpenSim.Framework.Utilities;
using libsecondlife;

View File

@ -35,7 +35,6 @@ using libsecondlife.Packets;
using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.Framework.Data;
using OpenSim.Framework.Utilities;
namespace OpenSim.Region.ClientStack

View File

@ -31,7 +31,6 @@ using System.Net;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Console;
using OpenSim.Framework.Data;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Types;

View File

@ -1,7 +1,7 @@
using System.Collections.Generic;
using libsecondlife;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Data;
using OpenSim.Framework.Types;
using InventoryFolder=OpenSim.Framework.Communications.Caches.InventoryFolder;
namespace OpenSim.Region.Communications.Local

View File

@ -3,7 +3,6 @@ using System.Collections;
using System.Collections.Generic;
using libsecondlife;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Data;
using OpenSim.Framework.Types;
using OpenSim.Framework.UserManagement;
using OpenSim.Framework.Utilities;

View File

@ -1,6 +1,5 @@
using System;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Data;
using OpenSim.Framework.Types;
using OpenSim.Framework.UserManagement;

View File

@ -1,7 +1,7 @@
using System.Collections.Generic;
using libsecondlife;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Data;
using OpenSim.Framework.Types;
using InventoryFolder = OpenSim.Framework.Communications.Caches.InventoryFolder;

View File

@ -2,8 +2,8 @@ using System;
using System.Collections;
using libsecondlife;
using Nwc.XmlRpc;
using OpenSim.Framework.Data;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
namespace OpenSim.Region.Communications.OGS1
{

View File

@ -1,8 +1,8 @@
using Axiom.Math;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Communications.Caches;
using OpenSim.Framework.Data;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;

View File

@ -6,7 +6,6 @@ using System.Xml;
using Axiom.Math;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Framework.Data;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.Region.Environment.Interfaces;

View File

@ -3,7 +3,6 @@ using System.Net;
using System.Text;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Framework.Data;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;

View File

@ -53,30 +53,6 @@
</Files>
</Project>
<Project name="OpenSim.Framework.Data" path="OpenSim/Framework/Data" type="Library">
<Configuration name="Debug">
<Options>
<OutputPath>../../../bin/</OutputPath>
</Options>
</Configuration>
<Configuration name="Release">
<Options>
<OutputPath>../../../bin/</OutputPath>
</Options>
</Configuration>
<ReferencePath>../../../bin/</ReferencePath>
<Reference name="System" localCopy="false"/>
<Reference name="System.Xml"/>
<Reference name="System.Data"/>
<Reference name="XMLRPC.dll"/>
<Reference name="libsecondlife.dll"/>
<Files>
<Match pattern="*.cs" recurse="true"/>
</Files>
</Project>
<Project name="OpenSim.Framework" path="OpenSim/Framework/General" type="Library">
<Configuration name="Debug">
<Options>
@ -97,15 +73,37 @@
<Reference name="Db4objects.Db4o.dll"/>
<Reference name="XMLRPC.dll"/>
<Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Framework.Data"/>
<Reference name="Nini.dll" />
<Files>
<Match pattern="*.cs" recurse="true"/>
</Files>
</Project>
<Project name="OpenSim.Framework.Configuration.XML" path="OpenSim/Framework/Configuration/XML" type="Library">
<Project name="OpenSim.Framework.Data" path="OpenSim/Framework/Data" type="Library">
<Configuration name="Debug">
<Options>
<OutputPath>../../../bin/</OutputPath>
</Options>
</Configuration>
<Configuration name="Release">
<Options>
<OutputPath>../../../bin/</OutputPath>
</Options>
</Configuration>
<ReferencePath>../../../bin/</ReferencePath>
<Reference name="System" localCopy="false"/>
<Reference name="System.Xml"/>
<Reference name="System.Data"/>
<Reference name="XMLRPC.dll"/>
<Reference name="libsecondlife.dll"/>
<Reference name="OpenSim.Framework"/>
<Files>
<Match pattern="*.cs" recurse="true"/>
</Files>
</Project>
<Project name="OpenSim.Framework.Configuration.XML" path="OpenSim/Framework/Configuration/XML" type="Library">
<Configuration name="Debug">
<Options>
<OutputPath>../../../../bin/</OutputPath>
@ -408,11 +406,11 @@
<Reference name="System"/>
<Reference name="System.Xml"/>
<Reference name="OpenSim.Framework.Communications"/>
<Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Framework.Data" />
<Reference name="OpenSim.Framework.Servers"/>
<Reference name="OpenSim.Framework.Console"/>
<Reference name="libsecondlife.dll"/>
<Reference name="OpenSim.Framework"/>
<Reference name="XMLRPC.dll"/>
<Files>
@ -438,11 +436,12 @@
<Reference name="System.Data"/>
<Reference name="System.Runtime.Remoting"/>
<Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Framework.Data" />
<Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Framework.Servers"/>
<Reference name="OpenSim.Framework.Communications" />
<Reference name="OpenSim.Region.Communications.Local" />
<Reference name="OpenSim.Framework.Data" />
<Reference name="libsecondlife.dll"/>
<Reference name="XMLRPC.dll"/>
@ -471,8 +470,8 @@
<Reference name="Db4objects.Db4o.dll"/>
<Reference name="OpenSim.Region.Terrain.BasicTerrain"/>
<Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Framework.Data" />
<Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Region.Physics.Manager"/>
<Reference name="OpenSim.Framework.Servers"/>
<!-- For scripting in funny languages by default -->
@ -506,12 +505,12 @@
<Reference name="OpenSim.Region.Terrain.BasicTerrain"/>
<Reference name="OpenSim.Region.Environment"/>
<Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Framework.Data"/>
<Reference name="OpenSim.Framework.Servers"/>
<Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Framework.Communications"/>
<Reference name="OpenSim.Region.Communications.Local"/>
<Reference name="OpenSim.Region.Physics.Manager"/>
<Reference name="OpenSim.Framework.Servers"/>
<Reference name="OpenSim.Framework.Data"/>
<Reference name="XMLRPC.dll"/>
<Files>
@ -693,6 +692,7 @@
<Reference name="System" localCopy="false"/>
<Reference name="System.Xml"/>
<Reference name="System.Data"/>
<Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Framework.Data"/>
<Reference name="libsecondlife.dll"/>
<Reference name="MySql.Data.dll"/>