updated libsecondlife.dll to a 1.18 version (from the libsecondlife aditi branch, so when they have a trunk version that is 1.18 ready, best to update again).
Started some work on a userProfile/inventory cache.afrisby
parent
bc49882fa4
commit
9d989612b0
|
@ -56,6 +56,10 @@ namespace OpenSim.Framework.Data
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public LLUUID avatarID;
|
public LLUUID avatarID;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// The creator of this folder
|
||||||
|
/// </summary>
|
||||||
|
public LLUUID creatorsID;
|
||||||
|
/// <summary>
|
||||||
/// The name of the inventory item (must be less than 64 characters)
|
/// The name of the inventory item (must be less than 64 characters)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string inventoryName;
|
public string inventoryName;
|
||||||
|
@ -94,6 +98,14 @@ namespace OpenSim.Framework.Data
|
||||||
/// The UUID for this folder
|
/// The UUID for this folder
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public LLUUID folderID;
|
public LLUUID folderID;
|
||||||
|
/// <summary>
|
||||||
|
/// Tyep of Items normally stored in this folder
|
||||||
|
/// </summary>
|
||||||
|
public ushort type;
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public ushort version;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using OpenSim.Framework.Data;
|
||||||
|
using libsecondlife;
|
||||||
|
|
||||||
|
namespace OpenSim.Region.Caches
|
||||||
|
{
|
||||||
|
public class CachedUserInfo
|
||||||
|
{
|
||||||
|
public UserProfileData UserProfile;
|
||||||
|
//public Dictionary<LLUUID, InventoryFolder> Folders = new Dictionary<LLUUID, InventoryFolder>();
|
||||||
|
public InventoryFolder RootFolder;
|
||||||
|
|
||||||
|
public CachedUserInfo()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using libsecondlife;
|
||||||
|
using OpenSim.Framework.Data;
|
||||||
|
|
||||||
|
namespace OpenSim.Region.Caches
|
||||||
|
{
|
||||||
|
public class InventoryFolder : InventoryFolderBase
|
||||||
|
{
|
||||||
|
public Dictionary<LLUUID, InventoryFolder> SubFolders = new Dictionary<LLUUID, InventoryFolder>();
|
||||||
|
public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>();
|
||||||
|
|
||||||
|
public InventoryFolder()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public InventoryFolder HasSubFolder(LLUUID folderID)
|
||||||
|
{
|
||||||
|
InventoryFolder returnFolder = null;
|
||||||
|
if (this.SubFolders.ContainsKey(folderID))
|
||||||
|
{
|
||||||
|
returnFolder = this.SubFolders[folderID];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach (InventoryFolder folder in this.SubFolders.Values)
|
||||||
|
{
|
||||||
|
returnFolder = folder.HasSubFolder(folderID);
|
||||||
|
if (returnFolder != null)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return returnFolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public InventoryFolder CreateNewSubFolder(LLUUID folderID, string folderName, ushort type)
|
||||||
|
{
|
||||||
|
InventoryFolder subFold = new InventoryFolder();
|
||||||
|
subFold.name = folderName;
|
||||||
|
subFold.folderID = folderID;
|
||||||
|
subFold.type = type;
|
||||||
|
subFold.parentID = this.folderID;
|
||||||
|
subFold.agentID = this.agentID;
|
||||||
|
this.SubFolders.Add(subFold.folderID, subFold);
|
||||||
|
return subFold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,75 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using libsecondlife;
|
||||||
|
using OpenSim.Framework.Data;
|
||||||
|
|
||||||
|
namespace OpenSim.Region.Caches
|
||||||
|
{
|
||||||
|
public class UserProfileCache
|
||||||
|
{
|
||||||
|
public Dictionary<LLUUID, CachedUserInfo> UserProfiles = new Dictionary<LLUUID, CachedUserInfo>();
|
||||||
|
|
||||||
|
public UserProfileCache()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A new user has moved into a region in this instance
|
||||||
|
/// so get info from servers
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="userID"></param>
|
||||||
|
public void AddNewUser(LLUUID userID)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A user has left this instance
|
||||||
|
/// so make sure servers have been updated
|
||||||
|
/// Then remove cached info
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="userID"></param>
|
||||||
|
public void UserLogOut(LLUUID userID)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Request the user profile from User server
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="userID"></param>
|
||||||
|
private void RequestUserProfileForUser(LLUUID userID)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Request Iventory Info from Inventory server
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="userID"></param>
|
||||||
|
private void RequestInventoryForUser(LLUUID userID)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Make sure UserProfile is updated on user server
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="userID"></param>
|
||||||
|
private void UpdateUserProfileToServer(LLUUID userID)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Update Inventory data to Inventory server
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="userID"></param>
|
||||||
|
private void UpdateInventoryToServer(LLUUID userID)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -71,7 +71,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
// Keep track of when this packet was sent out
|
// Keep track of when this packet was sent out
|
||||||
Pack.TickCount = Environment.TickCount;
|
Pack.TickCount = Environment.TickCount;
|
||||||
|
|
||||||
Console.WriteLine(CircuitCode + ":OUT: " + Pack.Type.ToString());
|
// Console.WriteLine(CircuitCode + ":OUT: " + Pack.Type.ToString());
|
||||||
|
|
||||||
if (!Pack.Header.Resent)
|
if (!Pack.Header.Resent)
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,6 +24,11 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
public NetworkServersInfo serversInfo;
|
public NetworkServersInfo serversInfo;
|
||||||
public BaseHttpServer httpServer;
|
public BaseHttpServer httpServer;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="servers_info"></param>
|
||||||
|
/// <param name="httpServe"></param>
|
||||||
public OGS1GridServices(NetworkServersInfo servers_info, BaseHttpServer httpServe)
|
public OGS1GridServices(NetworkServersInfo servers_info, BaseHttpServer httpServe)
|
||||||
{
|
{
|
||||||
serversInfo = servers_info;
|
serversInfo = servers_info;
|
||||||
|
@ -32,6 +37,11 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
this.StartRemoting();
|
this.StartRemoting();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="regionInfo"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public RegionCommsListener RegisterRegion(RegionInfo regionInfo)
|
public RegionCommsListener RegisterRegion(RegionInfo regionInfo)
|
||||||
{
|
{
|
||||||
if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle))
|
if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle))
|
||||||
|
@ -40,8 +50,6 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
|
|
||||||
Hashtable GridParams = new Hashtable();
|
Hashtable GridParams = new Hashtable();
|
||||||
|
|
||||||
|
|
||||||
// Login / Authentication
|
// Login / Authentication
|
||||||
|
|
||||||
GridParams["authkey"] = serversInfo.GridSendKey;
|
GridParams["authkey"] = serversInfo.GridSendKey;
|
||||||
|
@ -74,15 +82,6 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if (!this.listeners.ContainsKey(regionInfo.RegionHandle))
|
|
||||||
{
|
|
||||||
MainLog.Instance.Verbose("OGS1 - Registering new HTTP listener on port " + regionInfo.InternalEndPoint.Port.ToString());
|
|
||||||
// initialised = true;
|
|
||||||
httpListener = new BaseHttpServer( regionInfo.InternalEndPoint.Port );
|
|
||||||
httpListener.AddXmlRPCHandler("expect_user", this.ExpectUser);
|
|
||||||
httpListener.Start();
|
|
||||||
}*/
|
|
||||||
|
|
||||||
// Initialise the background listeners
|
// Initialise the background listeners
|
||||||
RegionCommsListener regListener = new RegionCommsListener();
|
RegionCommsListener regListener = new RegionCommsListener();
|
||||||
if (this.listeners.ContainsKey(regionInfo.RegionHandle))
|
if (this.listeners.ContainsKey(regionInfo.RegionHandle))
|
||||||
|
@ -97,6 +96,11 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return regListener;
|
return regListener;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="regionInfo"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public List<RegionInfo> RequestNeighbours(RegionInfo regionInfo)
|
public List<RegionInfo> RequestNeighbours(RegionInfo regionInfo)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -136,6 +140,11 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return neighbours;
|
return neighbours;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="regionHandle"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public RegionInfo RequestNeighbourInfo(ulong regionHandle)
|
public RegionInfo RequestNeighbourInfo(ulong regionHandle)
|
||||||
{
|
{
|
||||||
if (this.regions.ContainsKey(regionHandle))
|
if (this.regions.ContainsKey(regionHandle))
|
||||||
|
@ -179,6 +188,14 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return regionInfo;
|
return regionInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="minX"></param>
|
||||||
|
/// <param name="minY"></param>
|
||||||
|
/// <param name="maxX"></param>
|
||||||
|
/// <param name="maxY"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY)
|
public List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY)
|
||||||
{
|
{
|
||||||
Hashtable respData = MapBlockQuery(minX, minY, maxX, maxY);
|
Hashtable respData = MapBlockQuery(minX, minY, maxX, maxY);
|
||||||
|
@ -232,6 +249,11 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
|
|
||||||
// Grid Request Processing
|
// Grid Request Processing
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public XmlRpcResponse ExpectUser(XmlRpcRequest request)
|
public XmlRpcResponse ExpectUser(XmlRpcRequest request)
|
||||||
{
|
{
|
||||||
Console.WriteLine("Expecting User...");
|
Console.WriteLine("Expecting User...");
|
||||||
|
@ -269,6 +291,9 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
|
|
||||||
#region InterRegion Comms
|
#region InterRegion Comms
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
private void StartRemoting()
|
private void StartRemoting()
|
||||||
{
|
{
|
||||||
TcpChannel ch = new TcpChannel(this.serversInfo.RemotingListenerPort);
|
TcpChannel ch = new TcpChannel(this.serversInfo.RemotingListenerPort);
|
||||||
|
@ -281,6 +306,12 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Methods called by regions in this instance
|
#region Methods called by regions in this instance
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="regionHandle"></param>
|
||||||
|
/// <param name="agentData"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)
|
public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)
|
||||||
{
|
{
|
||||||
if (this.listeners.ContainsKey(regionHandle))
|
if (this.listeners.ContainsKey(regionHandle))
|
||||||
|
@ -316,6 +347,13 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="regionHandle"></param>
|
||||||
|
/// <param name="agentID"></param>
|
||||||
|
/// <param name="position"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
|
public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
|
||||||
{
|
{
|
||||||
if (this.listeners.ContainsKey(regionHandle))
|
if (this.listeners.ContainsKey(regionHandle))
|
||||||
|
@ -353,6 +391,12 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Methods triggered by calls from external instances
|
#region Methods triggered by calls from external instances
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="regionHandle"></param>
|
||||||
|
/// <param name="agentData"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData)
|
public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData)
|
||||||
{
|
{
|
||||||
if (this.listeners.ContainsKey(regionHandle))
|
if (this.listeners.ContainsKey(regionHandle))
|
||||||
|
@ -363,6 +407,13 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="regionHandle"></param>
|
||||||
|
/// <param name="agentID"></param>
|
||||||
|
/// <param name="position"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public bool IncomingArrival(ulong regionHandle, LLUUID agentID, LLVector3 position)
|
public bool IncomingArrival(ulong regionHandle, LLUUID agentID, LLVector3 position)
|
||||||
{
|
{
|
||||||
if (this.listeners.ContainsKey(regionHandle))
|
if (this.listeners.ContainsKey(regionHandle))
|
||||||
|
|
Binary file not shown.
46
prebuild.xml
46
prebuild.xml
|
@ -103,6 +103,29 @@
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</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.Region.Caches" path="OpenSim/Region/Caches" type="Library">
|
<Project name="OpenSim.Region.Caches" path="OpenSim/Region/Caches" type="Library">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
<Options>
|
<Options>
|
||||||
|
@ -120,6 +143,7 @@
|
||||||
<Reference name="System.Xml"/>
|
<Reference name="System.Xml"/>
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
|
<Reference name="OpenSim.Framework.Data"/>
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
@ -417,28 +441,6 @@
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</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.Data.DB4o" path="OpenSim/Framework/Data.DB4o" type="Library">
|
<Project name="OpenSim.Framework.Data.DB4o" path="OpenSim/Framework/Data.DB4o" type="Library">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
|
|
Loading…
Reference in New Issue