* Some work in progress code: Inventory cache, start of inventory server/service, userprofile cache, inventory handling. (non of it is enabled yet (or at least it shouldn't be).

* Fixed some of the problems with crossing regions when flying: you should no longer sink to ground level when crossing (should keep roughly your right height). Should no longer sometimes get sent back to the centre of the current region when attempting to border cross. But instead sometimes you will find you avatar stop at the edge of region and you will need to start moving again to retry the crossing (which should then work). This code is partly based on Babblefrog's issue #212 patch. [I think I have some ideas of how to solve the stopping at edges problem, just want to get the inventory code done first]
* Capabilities code has now been moved to the OpenSim.Framework.Communications project as some of the caps code will be tightly tied to inventory/asset handling and it was causing a two way reference problem when it was in its own project/dll.

This is a Big commit as I was going to keep my inventory work local until I had it in a working state, in case it brakes anything, but its getting harder to keep in sync with svn.
afrisby
MW 2007-07-22 11:44:36 +00:00
parent 98b4701647
commit 70fa302042
53 changed files with 1445 additions and 2097 deletions

View File

@ -34,7 +34,7 @@ using libsecondlife;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
using OpenSim.Region.Caches;
using OpenSim.Framework.Communications.Caches;
namespace OpenSim.Region.Capabilities
{
@ -49,6 +49,7 @@ namespace OpenSim.Region.Capabilities
private string m_mapLayerPath = "0001/";
private string m_newInventory = "0002/";
// private string m_requestTexture = "0003/";
private string m_notecardUpdatePath = "0004/";
//private string eventQueue = "0100/";
private BaseHttpServer httpListener;
private LLUUID agentID;
@ -78,6 +79,7 @@ namespace OpenSim.Region.Capabilities
httpListener.AddStreamHandler( new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>("POST", capsBase + m_newInventory, this.NewAgentInventoryRequest));
AddLegacyCapsHandler(httpListener, m_requestPath, CapsRequest);
AddLegacyCapsHandler(httpListener, m_notecardUpdatePath, NoteCardAgentInventory);
}
[Obsolete("Use BaseHttpServer.AddStreamHandler(new LLSDStreamHandler( LLSDMethod delegate )) instead.")]
@ -112,7 +114,7 @@ namespace OpenSim.Region.Capabilities
caps.MapLayer = capsBaseUrl + m_mapLayerPath;
caps.NewFileAgentInventory = capsBaseUrl + m_newInventory;
//caps.RequestTextureDownload = capsBaseUrl + m_requestTexture;
// caps.ChatSessionRequest = capsBaseUrl + m_requestTexture;
caps.UpdateNotecardAgentInventory = capsBaseUrl + m_notecardUpdatePath;
return caps;
}
@ -216,6 +218,33 @@ namespace OpenSim.Region.Capabilities
}
#endregion
/// <summary>
///
/// </summary>
/// <param name="request"></param>
/// <param name="path"></param>
/// <param name="param"></param>
/// <returns></returns>
public string NoteCardAgentInventory(string request, string path, string param)
{
Console.WriteLine("notecard update request " + request);
string assetName = "notecardupdate";
string capsBase = "/CAPS/" + m_capsObjectPath;
LLUUID newAsset = LLUUID.Random();
LLUUID newInvItem = LLUUID.Random();
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
AssetUploader uploader = new AssetUploader(assetName, newAsset, newInvItem, capsBase + uploaderPath, this.httpListener);
httpListener.AddStreamHandler(new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps));
string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase + uploaderPath;
LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse();
uploadResponse.uploader = uploaderURL;
uploadResponse.state = "upload";
// uploader.OnUpLoad += this.UploadCompleteHandler;
return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
}
/// <summary>
///
/// </summary>
@ -267,7 +296,7 @@ namespace OpenSim.Region.Capabilities
private LLUUID newAssetID;
private LLUUID inventoryItemID;
private BaseHttpServer httpListener;
private bool SaveImages = false;
private bool SaveImages = true;
private string m_assetName = "";
/// <summary>
@ -301,6 +330,7 @@ namespace OpenSim.Region.Capabilities
uploadComplete.new_asset = newAssetID.ToStringHyphenated();
uploadComplete.new_inventory_item = inv;
uploadComplete.state = "complete";
res = LLSDHelpers.SerialiseLLSDReply(uploadComplete);
httpListener.RemoveStreamHandler("POST", uploaderPath);
@ -318,7 +348,6 @@ namespace OpenSim.Region.Capabilities
private void SaveImageToFile(string filename, byte[] data)
{
FileStream fs = File.Create(filename);
BinaryWriter bw = new BinaryWriter(fs);
bw.Write(data);

View File

@ -35,6 +35,7 @@ namespace OpenSim.Region.Capabilities
public string new_asset = "";
public LLUUID new_inventory_item = LLUUID.Zero;
public string state = "";
//public bool success = false;
public LLSDAssetUploadComplete()
{

View File

@ -8,6 +8,7 @@ namespace OpenSim.Region.Capabilities
//public string EventQueueGet = "";
//public string RequestTextureDownload = "";
//public string ChatSessionRequest = "";
public string UpdateNotecardAgentInventory = "";
public LLSDCapsDetails()
{

View File

@ -34,6 +34,7 @@ using OpenSim.Framework.Types;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Communications.Caches;
namespace OpenSim.Framework.Communications
{
@ -44,11 +45,13 @@ namespace OpenSim.Framework.Communications
public IInventoryServices InventoryServer;
public IInterRegionCommunications InterRegion;
public UserProfileCache UserProfilesCache;
public AssetCache AssetCache;
public NetworkServersInfo ServersInfo;
public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer)
public CommunicationsManager(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache)
{
ServersInfo = serversInfo;
this.AssetCache = assetCache;
UserProfilesCache = new UserProfileCache(this);
}

View File

@ -33,6 +33,7 @@ namespace OpenSim.Framework.Communications
public interface IInterRegionCommunications
{
bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData);
bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position);
bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying);
bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentID);
}
}

View File

@ -1,77 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using OpenSim.Framework.Data;
using libsecondlife;
namespace OpenSim.Framework.Communications.Caches
{
public class CachedUserInfo
{
public UserProfileData UserProfile;
//public Dictionary<LLUUID, InventoryFolder> Folders = new Dictionary<LLUUID, InventoryFolder>();
public InventoryFolder RootFolder;
public CachedUserInfo()
{
}
/// <summary>
///
/// </summary>
/// <param name="userID"></param>
/// <param name="folderInfo"></param>
public void FolderReceive(LLUUID userID, InventoryFolder folderInfo)
{
if (userID == UserProfile.UUID)
{
if (this.RootFolder == null)
{
if (folderInfo.parentID == LLUUID.Zero)
{
this.RootFolder = folderInfo;
}
}
else
{
if (this.RootFolder.folderID == folderInfo.parentID)
{
this.RootFolder.SubFolders.Add(folderInfo.folderID, folderInfo);
}
else
{
InventoryFolder pFolder = this.RootFolder.HasSubFolder(folderInfo.parentID);
if (pFolder != null)
{
pFolder.SubFolders.Add(folderInfo.folderID, folderInfo);
}
}
}
}
}
public void ItemReceive(LLUUID userID, InventoryItemBase itemInfo)
{
if (userID == UserProfile.UUID)
{
if (this.RootFolder != null)
{
if (itemInfo.parentFolderID == this.RootFolder.folderID)
{
this.RootFolder.Items.Add(itemInfo.inventoryID, itemInfo);
}
else
{
InventoryFolder pFolder = this.RootFolder.HasSubFolder(itemInfo.parentFolderID);
if (pFolder != null)
{
pFolder.Items.Add(itemInfo.inventoryID, itemInfo);
}
}
}
}
}
}
}

View File

@ -1,61 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using libsecondlife;
using OpenSim.Framework.Data;
namespace OpenSim.Framework.Communications.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;
}
public List<InventoryItemBase> RequestListOfItems()
{
List<InventoryItemBase> itemList = new List<InventoryItemBase>();
foreach (InventoryItemBase item in this.Items.Values)
{
itemList.Add(item);
}
return itemList;
}
}
}

View File

@ -1,168 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using libsecondlife;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Data;
using OpenSim.Framework.Communications;
namespace OpenSim.Framework.Communications.Caches
{
public class UserProfileCache
{
public Dictionary<LLUUID, CachedUserInfo> UserProfiles = new Dictionary<LLUUID, CachedUserInfo>();
private CommunicationsManager m_parent;
public UserProfileCache(CommunicationsManager parent)
{
m_parent = parent;
}
/// <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)
{
if (!this.UserProfiles.ContainsKey(userID))
{
CachedUserInfo userInfo = new CachedUserInfo();
userInfo.UserProfile = this.RequestUserProfileForUser(userID);
if (userInfo.UserProfile != null)
{
this.RequestInventoryForUser(userID, userInfo);
this.UserProfiles.Add(userID, userInfo);
}
else
{
//no profile for this user, what do we do now?
Console.WriteLine("UserProfileCache.cs: user profile for user not found");
}
}
else
{
//already have a cached profile for this user
//we should make sure its upto date with the user server version
}
}
/// <summary>
/// A new user has moved into a region in this instance
/// so get info from servers
/// </summary>
/// <param name="firstName"></param>
/// <param name="lastName"></param>
public void AddNewUser(string firstName, string lastName)
{
}
/// <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)
{
}
public void HandleCreateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort folderType, string folderName, LLUUID parentID)
{
if (this.UserProfiles.ContainsKey(remoteClient.AgentId))
{
CachedUserInfo userInfo = this.UserProfiles[remoteClient.AgentId];
if (userInfo.RootFolder.folderID == parentID)
{
userInfo.RootFolder.CreateNewSubFolder(folderID, folderName, folderType);
}
else
{
InventoryFolder parentFolder = userInfo.RootFolder.HasSubFolder(parentID);
if (parentFolder != null)
{
parentFolder.CreateNewSubFolder(folderID, folderName, folderType);
}
}
}
}
public void HandleFecthInventoryDescendents(IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder)
{
if (this.UserProfiles.ContainsKey(remoteClient.AgentId))
{
CachedUserInfo userInfo = this.UserProfiles[remoteClient.AgentId];
if (userInfo.RootFolder.folderID == folderID)
{
if (fetchItems)
{
remoteClient.SendInventoryFolderDetails(remoteClient.AgentId, folderID, userInfo.RootFolder.RequestListOfItems());
}
}
else
{
InventoryFolder parentFolder = userInfo.RootFolder.HasSubFolder(folderID);
if(parentFolder != null)
{
if(fetchItems)
{
remoteClient.SendInventoryFolderDetails(remoteClient.AgentId, folderID, parentFolder.RequestListOfItems());
}
}
}
}
}
/// <summary>
/// Request the user profile from User server
/// </summary>
/// <param name="userID"></param>
private UserProfileData RequestUserProfileForUser(LLUUID userID)
{
return this.m_parent.UserServer.GetUserProfile(userID);
}
/// <summary>
/// Request Iventory Info from Inventory server
/// </summary>
/// <param name="userID"></param>
private void RequestInventoryForUser(LLUUID userID, CachedUserInfo userInfo)
{
// this.m_parent.InventoryServer.RequestInventoryForUser(userID, userInfo.FolderReceive, userInfo.ItemReceive);
//for now we manually create the root folder,
// but should be requesting all inventory from inventory server.
InventoryFolder rootFolder = new InventoryFolder();
rootFolder.agentID = userID;
rootFolder.folderID = userInfo.UserProfile.rootInventoryFolderID;
rootFolder.name = "My Inventory";
rootFolder.parentID = LLUUID.Zero;
rootFolder.type = 8;
rootFolder.version = 1;
userInfo.FolderReceive(userID, rootFolder);
}
/// <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)
{
}
}
}

View File

@ -151,6 +151,40 @@ namespace OpenSim.Framework.Data.MySQL
}
}
/// <summary>
/// Returns the users inventory root folder.
/// </summary>
/// <param name="user"></param>
/// <returns></returns>
public InventoryFolderBase getUserRootFolder(LLUUID user)
{
try
{
lock (database)
{
Dictionary<string, string> param = new Dictionary<string, string>();
param["?uuid"] = user.ToStringHyphenated();
param["?zero"] = LLUUID.Zero.ToStringHyphenated();
IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", param);
IDataReader reader = result.ExecuteReader();
List<InventoryFolderBase> items = database.readInventoryFolders(reader);
InventoryFolderBase rootFolder = items[0]; //should only be one folder with parent set to zero (the root one).
reader.Close();
result.Dispose();
return rootFolder;
}
}
catch (Exception e)
{
database.Reconnect();
Console.WriteLine(e.ToString());
return null;
}
}
/// <summary>
/// Returns a list of folders in a users inventory contained within the specified folder
/// </summary>

View File

@ -143,11 +143,18 @@ namespace OpenSim.Framework.Data
List<InventoryItemBase> getInventoryInFolder(LLUUID folderID);
/// <summary>
/// Returns a list of folders in the users inventory root.
/// Returns a list of the root folders within a users inventory
/// </summary>
/// <param name="user">The user whos inventory is to be searched</param>
/// <returns>A list of folder objects</returns>
List<InventoryFolderBase> getUserRootFolders(LLUUID user);
/// <summary>
/// Returns the users inventory root folder.
/// </summary>
/// <param name="user">The UUID of the user who is having inventory being returned</param>
/// <returns>A list of folders</returns>
List<InventoryFolderBase> getUserRootFolders(LLUUID user);
/// <returns>Root inventory folder</returns>
InventoryFolderBase getUserRootFolder(LLUUID user);
/// <summary>
/// Returns a list of inventory folders contained in the folder 'parentID'

View File

@ -34,13 +34,15 @@ namespace OpenSim.Framework
{
public delegate void ExpectUserDelegate(ulong regionHandle, AgentCircuitData agent);
public delegate void UpdateNeighbours(List<RegionInfo> neighbours);
public delegate void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position);
public delegate void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying);
public delegate void AcknowledgeAgentCross(ulong regionHandle, LLUUID agentID);
public interface IRegionCommsListener
{
event ExpectUserDelegate OnExpectUser;
event GenericCall2 OnExpectChildAgent;
event AgentCrossing OnAvatarCrossingIntoRegion;
event AcknowledgeAgentCross OnAcknowledgeAgentCrossed;
event UpdateNeighbours OnNeighboursUpdate;
}
}

View File

@ -81,8 +81,9 @@ namespace OpenSim.Framework.Interfaces
public delegate void AddNewPrim(LLUUID ownerID, LLVector3 pos, PrimitiveBaseShape shape);
public delegate void CreateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort folderType, string folderName, LLUUID parentID);
public delegate void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID, uint callbackID, string description, string name, sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask);
public delegate void FetchInventoryDescendents(IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, bool fetchFolders, bool fetchItems, int sortOrder);
public delegate void FetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID);
public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID);
public interface IClientAPI
@ -128,8 +129,10 @@ namespace OpenSim.Framework.Interfaces
event NewAvatar OnNewAvatar;
event GenericCall6 OnRemoveAvatar;
event CreateNewInventoryItem OnCreateNewInventoryItem;
event CreateInventoryFolder OnCreateNewInventoryFolder;
event FetchInventoryDescendents OnFetchInventoryDescendents;
event FetchInventory OnFetchInventory;
event RequestTaskInventory OnRequestTaskInventory;
event UUIDNameRequest OnNameFromUUIDRequest;
@ -194,7 +197,7 @@ namespace OpenSim.Framework.Interfaces
void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation);
void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items);
void SendInventoryItemDetails(LLUUID ownerID, LLUUID folderID, InventoryItemBase item);
void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item);
void SendInventoryItemUpdate(InventoryItemBase Item);
void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName);

View File

@ -52,8 +52,10 @@ namespace OpenSim.Framework
public event NewAvatar OnNewAvatar;
public event GenericCall6 OnRemoveAvatar;
public event CreateNewInventoryItem OnCreateNewInventoryItem;
public event CreateInventoryFolder OnCreateNewInventoryFolder;
public event FetchInventoryDescendents OnFetchInventoryDescendents;
public event FetchInventory OnFetchInventory;
public event RequestTaskInventory OnRequestTaskInventory;
public event UUIDNameRequest OnNameFromUUIDRequest;
@ -127,7 +129,7 @@ namespace OpenSim.Framework
public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation){}
public virtual void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items){}
public virtual void SendInventoryItemDetails(LLUUID ownerID, LLUUID folderID, InventoryItemBase item){}
public virtual void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item){}
public virtual void SendInventoryItemUpdate(InventoryItemBase Item) { }
public virtual void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName) { }

View File

@ -39,6 +39,7 @@ namespace OpenSim.Framework
public event GenericCall2 OnExpectChildAgent;
public event AgentCrossing OnAvatarCrossingIntoRegion;
public event UpdateNeighbours OnNeighboursUpdate;
public event AcknowledgeAgentCross OnAcknowledgeAgentCrossed;
/// <summary>
///
@ -57,11 +58,21 @@ namespace OpenSim.Framework
return false;
}
public virtual bool TriggerExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
public virtual bool TriggerExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying)
{
if (OnAvatarCrossingIntoRegion != null)
{
OnAvatarCrossingIntoRegion(regionHandle, agentID, position);
OnAvatarCrossingIntoRegion(regionHandle, agentID, position, isFlying);
return true;
}
return false;
}
public virtual bool TriggerAcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentID)
{
if (OnAcknowledgeAgentCrossed != null)
{
OnAcknowledgeAgentCrossed(regionHandle, agentID);
return true;
}
return false;

View File

@ -0,0 +1,136 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using libsecondlife;
using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Data;
namespace OpenSim.Framework.InventoryServiceBase
{
public class InventoryServiceBase
{
protected Dictionary<string, IInventoryData> m_plugins = new Dictionary<string, IInventoryData>();
protected IAssetServer m_assetServer;
public InventoryServiceBase(IAssetServer assetServer)
{
m_assetServer = assetServer;
}
/// <summary>
/// Adds a new user server plugin - plugins will be requested in the order they were loaded.
/// </summary>
/// <param name="FileName">The filename to the user server plugin DLL</param>
public void AddPlugin(string FileName)
{
MainLog.Instance.Verbose("Inventorytorage: Attempting to load " + FileName);
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
foreach (Type pluginType in pluginAssembly.GetTypes())
{
if (!pluginType.IsAbstract)
{
Type typeInterface = pluginType.GetInterface("IInventoryData", true);
if (typeInterface != null)
{
IInventoryData plug = (IInventoryData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
plug.Initialise();
this.m_plugins.Add(plug.getName(), plug);
MainLog.Instance.Verbose("Inventorystorage: Added IInventoryData Interface");
}
typeInterface = null;
}
}
pluginAssembly = null;
}
/// <summary>
///
/// </summary>
/// <param name="userID"></param>
/// <returns></returns>
public List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID)
{
List<InventoryFolderBase> inventoryList = new List<InventoryFolderBase>();
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
{
InventoryFolderBase rootFolder = plugin.Value.getUserRootFolder(userID);
if (rootFolder != null)
{
inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID);
inventoryList.Insert(0, rootFolder);
return inventoryList;
}
}
return inventoryList;
}
/// <summary>
///
/// </summary>
public InventoryFolderBase RequestUsersRoot(LLUUID userID)
{
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
{
return plugin.Value.getUserRootFolder(userID);
}
return null;
}
/// <summary>
///
/// </summary>
/// <param name="parentFolderID"></param>
/// <returns></returns>
public List<InventoryFolderBase> RequestSubFolders(LLUUID parentFolderID)
{
List<InventoryFolderBase> inventoryList = new List<InventoryFolderBase>();
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
{
return plugin.Value.getInventoryFolders(parentFolderID);
}
return inventoryList;
}
public List<InventoryItemBase> RequestFolderItems(LLUUID folderID)
{
List<InventoryItemBase> itemsList = new List<InventoryItemBase>();
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
{
itemsList = plugin.Value.getInventoryInFolder(folderID);
return itemsList;
}
return itemsList;
}
/// <summary>
///
/// </summary>
/// <param name="inventory"></param>
public void AddNewInventorySet(UsersInventory inventory)
{
}
public class UsersInventory
{
public Dictionary<LLUUID, InventoryFolderBase> Folders = new Dictionary<LLUUID, InventoryFolderBase>();
public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>();
public UsersInventory()
{
}
protected virtual void CreateNewInventorySet()
{
}
}
}
}

View File

@ -1,13 +1,15 @@
using System.Reflection;
using System.Runtime.CompilerServices;
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.Caches")]
[assembly: AssemblyTitle("InventoryServiceBase")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OpenSim.Region.Caches")]
[assembly: AssemblyProduct("InventoryServiceBase")]
[assembly: AssemblyCopyright("Copyright © 2007")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
@ -18,7 +20,7 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("2b15ddbf-0341-49a6-85c0-cece268a4518")]
[assembly: Guid("7e1fbd0b-4a25-4804-a01f-89b04eb5b349")]
// Version information for an assembly consists of the following four values:
//

View File

@ -39,14 +39,16 @@ using OpenSim.Framework.Servers;
using OpenSim.Framework.Types;
using OpenSim.Framework.Configuration;
using OpenSim.Physics.Manager;
using OpenSim.Region.Caches;
using OpenSim.Region.ClientStack;
using OpenSim.Region.Communications.Local;
using OpenSim.Region.Communications.OGS1;
using OpenSim.Framework.Communications.Caches;
using OpenSim.Region.Environment.Scenes;
using OpenSim.Region.Environment;
using System.Text;
using System.Collections.Generic;
using OpenSim.Framework.Utilities;
namespace OpenSim
{
@ -97,11 +99,11 @@ namespace OpenSim
if (m_sandbox)
{
m_commsManager = new CommunicationsLocal( m_networkServersInfo, m_httpServer);
m_commsManager = new CommunicationsLocal( m_networkServersInfo, m_httpServer, m_assetCache);
}
else
{
m_commsManager = new CommunicationsOGS1( m_networkServersInfo, m_httpServer );
m_commsManager = new CommunicationsOGS1( m_networkServersInfo, m_httpServer , m_assetCache);
}
string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Regions");
@ -137,6 +139,7 @@ namespace OpenSim
this.m_udpServers[i].ServerListener();
}
}
protected override StorageManager CreateStorageManager(RegionInfo regionInfo)

View File

@ -1,669 +0,0 @@
/*
* 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;
using System.Collections.Generic;
using System.Reflection;
using System.Threading;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
namespace OpenSim.Region.Caches
{
public delegate void DownloadComplete(AssetCache.TextureSender sender);
/// <summary>
/// Manages local cache of assets and their sending to viewers.
/// </summary>
public class AssetCache : IAssetReceiver
{
public Dictionary<LLUUID, AssetInfo> Assets;
public Dictionary<LLUUID, TextureImage> Textures;
public List<AssetRequest> AssetRequests = new List<AssetRequest>(); //assets ready to be sent to viewers
public List<AssetRequest> TextureRequests = new List<AssetRequest>(); //textures ready to be sent
public Dictionary<LLUUID, AssetRequest> RequestedAssets = new Dictionary<LLUUID, AssetRequest>(); //Assets requested from the asset server
public Dictionary<LLUUID, AssetRequest> RequestedTextures = new Dictionary<LLUUID, AssetRequest>(); //Textures requested from the asset server
public Dictionary<LLUUID, TextureSender> SendingTextures = new Dictionary<LLUUID, TextureSender>();
private IAssetServer _assetServer;
private Thread _assetCacheThread;
private LLUUID[] textureList = new LLUUID[5];
/// <summary>
///
/// </summary>
public AssetCache(IAssetServer assetServer)
{
Console.WriteLine("Creating Asset cache");
_assetServer = assetServer;
_assetServer.SetReceiver(this);
Assets = new Dictionary<LLUUID, AssetInfo>();
Textures = new Dictionary<LLUUID, TextureImage>();
this._assetCacheThread = new Thread(new ThreadStart(RunAssetManager));
this._assetCacheThread.IsBackground = true;
this._assetCacheThread.Start();
}
public AssetCache(string assetServerDLLName, string assetServerURL, string assetServerKey)
{
Console.WriteLine("Creating Asset cache");
_assetServer = this.LoadAssetDll(assetServerDLLName);
_assetServer.SetServerInfo(assetServerURL, assetServerKey);
_assetServer.SetReceiver(this);
Assets = new Dictionary<LLUUID, AssetInfo>();
Textures = new Dictionary<LLUUID, TextureImage>();
this._assetCacheThread = new Thread(new ThreadStart(RunAssetManager));
this._assetCacheThread.IsBackground = true;
this._assetCacheThread.Start();
}
/// <summary>
///
/// </summary>
public void RunAssetManager()
{
while (true)
{
try
{
//Console.WriteLine("Asset cache loop");
this.ProcessAssetQueue();
this.ProcessTextureQueue();
Thread.Sleep(500);
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
public void LoadDefaultTextureSet()
{
//hack: so we can give each user a set of textures
textureList[0] = new LLUUID("00000000-0000-0000-9999-000000000001");
textureList[1] = new LLUUID("00000000-0000-0000-9999-000000000002");
textureList[2] = new LLUUID("00000000-0000-0000-9999-000000000003");
textureList[3] = new LLUUID("00000000-0000-0000-9999-000000000004");
textureList[4] = new LLUUID("00000000-0000-0000-9999-000000000005");
for (int i = 0; i < textureList.Length; i++)
{
this._assetServer.RequestAsset(textureList[i], true);
}
}
public AssetBase[] CreateNewInventorySet(LLUUID agentID)
{
AssetBase[] inventorySet = new AssetBase[this.textureList.Length];
for (int i = 0; i < textureList.Length; i++)
{
if (this.Textures.ContainsKey(textureList[i]))
{
inventorySet[i] = this.CloneImage(agentID, this.Textures[textureList[i]]);
TextureImage image = new TextureImage(inventorySet[i]);
this.Textures.Add(image.FullID, image);
this._assetServer.UploadNewAsset(image); //save the asset to the asset server
}
}
return inventorySet;
}
public AssetBase GetAsset(LLUUID assetID)
{
AssetBase asset = null;
if (this.Textures.ContainsKey(assetID))
{
asset = this.Textures[assetID];
}
else if (this.Assets.ContainsKey(assetID))
{
asset = this.Assets[assetID];
}
return asset;
}
public void AddAsset(AssetBase asset)
{
// Console.WriteLine("adding asset " + asset.FullID.ToStringHyphenated());
if (asset.Type == 0)
{
//Console.WriteLine("which is a texture");
if (!this.Textures.ContainsKey(asset.FullID))
{ //texture
TextureImage textur = new TextureImage(asset);
this.Textures.Add(textur.FullID, textur);
this._assetServer.UploadNewAsset(asset);
}
}
else
{
if (!this.Assets.ContainsKey(asset.FullID))
{
AssetInfo assetInf = new AssetInfo(asset);
this.Assets.Add(assetInf.FullID, assetInf);
this._assetServer.UploadNewAsset(asset);
}
}
}
/// <summary>
///
/// </summary>
private void ProcessTextureQueue()
{
if (this.TextureRequests.Count == 0)
{
//no requests waiting
return;
}
int num;
num = this.TextureRequests.Count;
AssetRequest req;
for (int i = 0; i < num; i++)
{
req = (AssetRequest)this.TextureRequests[i];
if (!this.SendingTextures.ContainsKey(req.ImageInfo.FullID))
{
TextureSender sender = new TextureSender(req);
sender.OnComplete += this.TextureSent;
lock (this.SendingTextures)
{
this.SendingTextures.Add(req.ImageInfo.FullID, sender);
}
}
}
this.TextureRequests.Clear();
}
/// <summary>
/// Event handler, called by a TextureSender object to say that texture has been sent
/// </summary>
/// <param name="sender"></param>
public void TextureSent(TextureSender sender)
{
if (this.SendingTextures.ContainsKey(sender.request.ImageInfo.FullID))
{
lock (this.SendingTextures)
{
this.SendingTextures.Remove(sender.request.ImageInfo.FullID);
}
}
}
public void AssetReceived(AssetBase asset, bool IsTexture)
{
if (asset.FullID != LLUUID.Zero) // if it is set to zero then the asset wasn't found by the server
{
//check if it is a texture or not
//then add to the correct cache list
//then check for waiting requests for this asset/texture (in the Requested lists)
//and move those requests into the Requests list.
if (IsTexture)
{
TextureImage image = new TextureImage(asset);
this.Textures.Add(image.FullID, image);
if (this.RequestedTextures.ContainsKey(image.FullID))
{
AssetRequest req = this.RequestedTextures[image.FullID];
req.ImageInfo = image;
if (image.Data.LongLength > 600)
{
//over 600 bytes so split up file
req.NumPackets = 1 + (int)(image.Data.Length - 600 + 999) / 1000;
}
else
{
req.NumPackets = 1;
}
this.RequestedTextures.Remove(image.FullID);
this.TextureRequests.Add(req);
}
}
else
{
AssetInfo assetInf = new AssetInfo(asset);
this.Assets.Add(assetInf.FullID, assetInf);
if (this.RequestedAssets.ContainsKey(assetInf.FullID))
{
AssetRequest req = this.RequestedAssets[assetInf.FullID];
req.AssetInf = assetInf;
if (assetInf.Data.LongLength > 600)
{
//over 600 bytes so split up file
req.NumPackets = 1 + (int)(assetInf.Data.Length - 600 + 999) / 1000;
}
else
{
req.NumPackets = 1;
}
this.RequestedAssets.Remove(assetInf.FullID);
this.AssetRequests.Add(req);
}
}
}
}
public void AssetNotFound(AssetBase asset)
{
//the asset server had no knowledge of requested asset
}
#region Assets
/// <summary>
///
/// </summary>
/// <param name="userInfo"></param>
/// <param name="transferRequest"></param>
public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest)
{
LLUUID requestID = new LLUUID(transferRequest.TransferInfo.Params, 0);
//check to see if asset is in local cache, if not we need to request it from asset server.
if (!this.Assets.ContainsKey(requestID))
{
//not found asset
// so request from asset server
if (!this.RequestedAssets.ContainsKey(requestID))
{
AssetRequest request = new AssetRequest();
request.RequestUser = userInfo;
request.RequestAssetID = requestID;
request.TransferRequestID = transferRequest.TransferInfo.TransferID;
this.RequestedAssets.Add(requestID, request);
this._assetServer.RequestAsset(requestID, false);
}
return;
}
//it is in our cache
AssetInfo asset = this.Assets[requestID];
//work out how many packets it should be sent in
// and add to the AssetRequests list
AssetRequest req = new AssetRequest();
req.RequestUser = userInfo;
req.RequestAssetID = requestID;
req.TransferRequestID = transferRequest.TransferInfo.TransferID;
req.AssetInf = asset;
if (asset.Data.LongLength > 600)
{
//over 600 bytes so split up file
req.NumPackets = 1 + (int)(asset.Data.Length - 600 + 999) / 1000;
}
else
{
req.NumPackets = 1;
}
this.AssetRequests.Add(req);
}
/// <summary>
///
/// </summary>
private void ProcessAssetQueue()
{
if (this.AssetRequests.Count == 0)
{
//no requests waiting
return;
}
int num;
if (this.AssetRequests.Count < 5)
{
//lower than 5 so do all of them
num = this.AssetRequests.Count;
}
else
{
num = 5;
}
AssetRequest req;
for (int i = 0; i < num; i++)
{
req = (AssetRequest)this.AssetRequests[i];
TransferInfoPacket Transfer = new TransferInfoPacket();
Transfer.TransferInfo.ChannelType = 2;
Transfer.TransferInfo.Status = 0;
Transfer.TransferInfo.TargetType = 0;
Transfer.TransferInfo.Params = req.RequestAssetID.GetBytes();
Transfer.TransferInfo.Size = (int)req.AssetInf.Data.Length;
Transfer.TransferInfo.TransferID = req.TransferRequestID;
req.RequestUser.OutPacket(Transfer);
if (req.NumPackets == 1)
{
TransferPacketPacket TransferPacket = new TransferPacketPacket();
TransferPacket.TransferData.Packet = 0;
TransferPacket.TransferData.ChannelType = 2;
TransferPacket.TransferData.TransferID = req.TransferRequestID;
TransferPacket.TransferData.Data = req.AssetInf.Data;
TransferPacket.TransferData.Status = 1;
req.RequestUser.OutPacket(TransferPacket);
}
else
{
//more than one packet so split file up , for now it can't be bigger than 2000 bytes
TransferPacketPacket TransferPacket = new TransferPacketPacket();
TransferPacket.TransferData.Packet = 0;
TransferPacket.TransferData.ChannelType = 2;
TransferPacket.TransferData.TransferID = req.TransferRequestID;
byte[] chunk = new byte[1000];
Array.Copy(req.AssetInf.Data, chunk, 1000);
TransferPacket.TransferData.Data = chunk;
TransferPacket.TransferData.Status = 0;
req.RequestUser.OutPacket(TransferPacket);
TransferPacket = new TransferPacketPacket();
TransferPacket.TransferData.Packet = 1;
TransferPacket.TransferData.ChannelType = 2;
TransferPacket.TransferData.TransferID = req.TransferRequestID;
byte[] chunk1 = new byte[(req.AssetInf.Data.Length - 1000)];
Array.Copy(req.AssetInf.Data, 1000, chunk1, 0, chunk1.Length);
TransferPacket.TransferData.Data = chunk1;
TransferPacket.TransferData.Status = 1;
req.RequestUser.OutPacket(TransferPacket);
}
}
//remove requests that have been completed
for (int i = 0; i < num; i++)
{
this.AssetRequests.RemoveAt(0);
}
}
public AssetInfo CloneAsset(LLUUID newOwner, AssetInfo sourceAsset)
{
AssetInfo newAsset = new AssetInfo();
newAsset.Data = new byte[sourceAsset.Data.Length];
Array.Copy(sourceAsset.Data, newAsset.Data, sourceAsset.Data.Length);
newAsset.FullID = LLUUID.Random();
newAsset.Type = sourceAsset.Type;
newAsset.InvType = sourceAsset.InvType;
return (newAsset);
}
#endregion
#region Textures
/// <summary>
///
/// </summary>
/// <param name="userInfo"></param>
/// <param name="imageID"></param>
public void AddTextureRequest(IClientAPI userInfo, LLUUID imageID)
{
//Console.WriteLine("texture request for " + imageID.ToStringHyphenated());
//check to see if texture is in local cache, if not request from asset server
if (!this.Textures.ContainsKey(imageID))
{
if (!this.RequestedTextures.ContainsKey(imageID))
{
//not is cache so request from asset server
AssetRequest request = new AssetRequest();
request.RequestUser = userInfo;
request.RequestAssetID = imageID;
request.IsTextureRequest = true;
this.RequestedTextures.Add(imageID, request);
this._assetServer.RequestAsset(imageID, true);
}
return;
}
//Console.WriteLine("texture already in cache");
TextureImage imag = this.Textures[imageID];
AssetRequest req = new AssetRequest();
req.RequestUser = userInfo;
req.RequestAssetID = imageID;
req.IsTextureRequest = true;
req.ImageInfo = imag;
if (imag.Data.LongLength > 600)
{
//over 600 bytes so split up file
req.NumPackets = 1 + (int)(imag.Data.Length - 600 + 999) / 1000;
}
else
{
req.NumPackets = 1;
}
this.TextureRequests.Add(req);
}
public TextureImage CloneImage(LLUUID newOwner, TextureImage source)
{
TextureImage newImage = new TextureImage();
newImage.Data = new byte[source.Data.Length];
Array.Copy(source.Data, newImage.Data, source.Data.Length);
//newImage.filename = source.filename;
newImage.FullID = LLUUID.Random();
newImage.Name = source.Name;
return (newImage);
}
#endregion
private IAssetServer LoadAssetDll(string dllName)
{
Assembly pluginAssembly = Assembly.LoadFrom(dllName);
IAssetServer server = null;
foreach (Type pluginType in pluginAssembly.GetTypes())
{
if (pluginType.IsPublic)
{
if (!pluginType.IsAbstract)
{
Type typeInterface = pluginType.GetInterface("IAssetPlugin", true);
if (typeInterface != null)
{
IAssetPlugin plug = (IAssetPlugin)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
server = plug.GetAssetServer();
break;
}
typeInterface = null;
}
}
}
pluginAssembly = null;
return server;
}
public class AssetRequest
{
public IClientAPI RequestUser;
public LLUUID RequestAssetID;
public AssetInfo AssetInf;
public TextureImage ImageInfo;
public LLUUID TransferRequestID;
public long DataPointer = 0;
public int NumPackets = 0;
public int PacketCounter = 0;
public bool IsTextureRequest;
//public bool AssetInCache;
//public int TimeRequested;
public AssetRequest()
{
}
}
public class AssetInfo : AssetBase
{
public AssetInfo()
{
}
public AssetInfo(AssetBase aBase)
{
Data = aBase.Data;
FullID = aBase.FullID;
Type = aBase.Type;
InvType = aBase.InvType;
Name = aBase.Name;
Description = aBase.Description;
}
}
public class TextureImage : AssetBase
{
public TextureImage()
{
}
public TextureImage(AssetBase aBase)
{
Data = aBase.Data;
FullID = aBase.FullID;
Type = aBase.Type;
InvType = aBase.InvType;
Name = aBase.Name;
Description = aBase.Description;
}
}
public class TextureSender
{
public AssetRequest request;
public event DownloadComplete OnComplete;
Thread m_thread;
public TextureSender(AssetRequest req)
{
request = req;
//Console.WriteLine("creating worker thread for texture " + req.ImageInfo.FullID.ToStringHyphenated());
//Console.WriteLine("texture data length is " + req.ImageInfo.Data.Length);
// Console.WriteLine("in " + req.NumPackets + " packets");
//ThreadPool.QueueUserWorkItem(new WaitCallback(SendTexture), new object());
//need some sort of custom threadpool here, as using the .net one, overloads it and stops the handling of incoming packets etc
//but don't really want to create a thread for every texture download
m_thread = new Thread(new ThreadStart(SendTexture));
m_thread.IsBackground = true;
m_thread.Start();
}
public void SendTexture()
{
//Console.WriteLine("starting to send sending texture " + request.ImageInfo.FullID.ToStringHyphenated());
while (request.PacketCounter != request.NumPackets)
{
SendPacket();
Thread.Sleep(500);
}
//Console.WriteLine("finished sending texture " + request.ImageInfo.FullID.ToStringHyphenated());
if (OnComplete != null)
{
OnComplete(this);
}
}
public void SendPacket()
{
AssetRequest req = request;
// Console.WriteLine("sending " + req.ImageInfo.FullID);
// if (req.ImageInfo.FullID == new LLUUID("00000000-0000-0000-5005-000000000005"))
if (req.PacketCounter == 0)
{
//first time for this request so send imagedata packet
if (req.NumPackets == 1)
{
//only one packet so send whole file
ImageDataPacket im = new ImageDataPacket();
im.ImageID.Packets = 1;
im.ImageID.ID = req.ImageInfo.FullID;
im.ImageID.Size = (uint)req.ImageInfo.Data.Length;
im.ImageData.Data = req.ImageInfo.Data;
im.ImageID.Codec = 2;
req.RequestUser.OutPacket(im);
req.PacketCounter++;
//req.ImageInfo.l= time;
//System.Console.WriteLine("sent texture: " + req.ImageInfo.FullID);
// Console.WriteLine("sending packet 1 for " + req.ImageInfo.FullID.ToStringHyphenated());
}
else
{
//more than one packet so split file up
ImageDataPacket im = new ImageDataPacket();
im.ImageID.Packets = (ushort)req.NumPackets;
im.ImageID.ID = req.ImageInfo.FullID;
im.ImageID.Size = (uint)req.ImageInfo.Data.Length;
im.ImageData.Data = new byte[600];
Array.Copy(req.ImageInfo.Data, 0, im.ImageData.Data, 0, 600);
im.ImageID.Codec = 2;
req.RequestUser.OutPacket(im);
req.PacketCounter++;
//req.ImageInfo.last_used = time;
//System.Console.WriteLine("sent first packet of texture:
// Console.WriteLine("sending packet 1 for " + req.ImageInfo.FullID.ToStringHyphenated());
}
}
else
{
//Console.WriteLine("sending packet" + req.PacketCounter + "for " + req.ImageInfo.FullID.ToStringHyphenated());
//send imagepacket
//more than one packet so split file up
ImagePacketPacket im = new ImagePacketPacket();
im.ImageID.Packet = (ushort)req.PacketCounter;
im.ImageID.ID = req.ImageInfo.FullID;
int size = req.ImageInfo.Data.Length - 600 - 1000 * (req.PacketCounter - 1);
if (size > 1000) size = 1000;
im.ImageData.Data = new byte[size];
Array.Copy(req.ImageInfo.Data, 600 + 1000 * (req.PacketCounter - 1), im.ImageData.Data, 0, size);
req.RequestUser.OutPacket(im);
req.PacketCounter++;
//req.ImageInfo.last_used = time;
//System.Console.WriteLine("sent a packet of texture: "+req.image_info.FullID);
}
}
}
}
}

View File

@ -81,8 +81,10 @@ namespace OpenSim.Region.ClientStack
public event RequestMapBlocks OnRequestMapBlocks;
public event TeleportLocationRequest OnTeleportLocationRequest;
public event CreateNewInventoryItem OnCreateNewInventoryItem;
public event CreateInventoryFolder OnCreateNewInventoryFolder;
public event FetchInventoryDescendents OnFetchInventoryDescendents;
public event FetchInventory OnFetchInventory;
public event RequestTaskInventory OnRequestTaskInventory;
public event UUIDNameRequest OnNameFromUUIDRequest;
@ -549,7 +551,7 @@ namespace OpenSim.Region.ClientStack
}
public void SendInventoryItemDetails(LLUUID ownerID, LLUUID folderID, InventoryItemBase item)
public void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item)
{
Encoding enc = Encoding.ASCII;
uint FULL_MASK_PERMISSIONS = 2147483647;

View File

@ -33,7 +33,8 @@ using OpenSim.Assets;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
using OpenSim.Region.Caches;
using OpenSim.Framework.Communications.Caches;
namespace OpenSim.Region.ClientStack
{

View File

@ -387,11 +387,9 @@ namespace OpenSim.Region.ClientStack
{
CreateInventoryFolderPacket invFolder = (CreateInventoryFolderPacket)Pack;
this.OnCreateNewInventoryFolder(this, invFolder.FolderData.FolderID, (ushort)invFolder.FolderData.Type, Util.FieldToString(invFolder.FolderData.Name), invFolder.FolderData.ParentID);
//m_inventoryCache.CreateNewInventoryFolder(this, invFolder.FolderData.FolderID, (ushort)invFolder.FolderData.Type, Util.FieldToString(invFolder.FolderData.Name), invFolder.FolderData.ParentID);
}
break;
case PacketType.CreateInventoryItem:
//Console.WriteLine(Pack.ToString());
CreateInventoryItemPacket createItem = (CreateInventoryItemPacket)Pack;
if (createItem.InventoryBlock.TransactionID != LLUUID.Zero)
{
@ -399,20 +397,28 @@ namespace OpenSim.Region.ClientStack
}
else
{
// Console.Write(Pack.ToString());
this.CreateInventoryItem(createItem);
if (this.OnCreateNewInventoryItem != null)
{
this.OnCreateNewInventoryItem(this, createItem.InventoryBlock.TransactionID, createItem.InventoryBlock.FolderID, createItem.InventoryBlock.CallbackID,
Util.FieldToString(createItem.InventoryBlock.Description), Util.FieldToString(createItem.InventoryBlock.Name), createItem.InventoryBlock.InvType,
createItem.InventoryBlock.Type, createItem.InventoryBlock.WearableType, createItem.InventoryBlock.NextOwnerMask);
}
}
break;
case PacketType.FetchInventory:
//Console.WriteLine("fetch item packet");
if (this.OnFetchInventory != null)
{
FetchInventoryPacket FetchInventory = (FetchInventoryPacket)Pack;
m_inventoryCache.FetchInventory(this, FetchInventory);
for (int i = 0; i < FetchInventory.InventoryData.Length; i++)
{
this.OnFetchInventory(this, FetchInventory.InventoryData[i].ItemID, FetchInventory.InventoryData[i].OwnerID);
}
}
break;
case PacketType.FetchInventoryDescendents:
if (this.OnFetchInventoryDescendents != null)
{
FetchInventoryDescendentsPacket Fetch = (FetchInventoryDescendentsPacket)Pack;
// m_inventoryCache.FetchInventoryDescendents(this, Fetch);
this.OnFetchInventoryDescendents(this, Fetch.InventoryData.FolderID, Fetch.InventoryData.OwnerID, Fetch.InventoryData.FetchFolders, Fetch.InventoryData.FetchItems, Fetch.InventoryData.SortOrder);
}
break;
@ -450,7 +456,6 @@ namespace OpenSim.Region.ClientStack
}
break;
case PacketType.RequestTaskInventory:
// Console.WriteLine(Pack.ToString());
RequestTaskInventoryPacket requesttask = (RequestTaskInventoryPacket)Pack;
if (this.OnRequestTaskInventory != null)
{

View File

@ -40,7 +40,8 @@ using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Inventory;
using OpenSim.Framework.Types;
using OpenSim.Framework.Utilities;
using OpenSim.Region.Caches;
using OpenSim.Framework.Communications.Caches;
using Timer=System.Timers.Timer;
namespace OpenSim.Region.ClientStack

View File

@ -33,7 +33,7 @@ using OpenSim.Assets;
using OpenSim.Framework;
using OpenSim.Framework.Types;
using OpenSim.Framework.Interfaces;
using OpenSim.Region.Caches;
using OpenSim.Framework.Communications.Caches;
namespace OpenSim.Region.ClientStack
{

View File

@ -36,11 +36,11 @@ using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Types;
using OpenSim.Physics.Manager;
using OpenSim.Region.Caches;
using OpenSim.Region.Environment;
using libsecondlife;
using OpenSim.Region.Environment.Scenes;
using OpenSim.Framework.Communications;
using OpenSim.Framework.Communications.Caches;
namespace OpenSim.Region.ClientStack
{

View File

@ -35,7 +35,7 @@ using OpenSim.Framework;
using OpenSim.Framework.Types;
using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces;
using OpenSim.Region.Caches;
using OpenSim.Framework.Communications.Caches;
namespace OpenSim.Region.ClientStack
{

View File

@ -28,6 +28,7 @@
using OpenSim.Framework.Communications;
using OpenSim.Framework.Types;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Communications.Caches;
namespace OpenSim.Region.Communications.Local
{
@ -36,8 +37,8 @@ namespace OpenSim.Region.Communications.Local
public LocalBackEndServices SandBoxServices = new LocalBackEndServices();
public LocalUserServices UserServices;
public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer )
: base(serversInfo, httpServer)
public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache )
: base(serversInfo, httpServer, assetCache)
{
UserServices = new LocalUserServices(this, serversInfo);
UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll");

View File

@ -161,12 +161,21 @@ namespace OpenSim.Region.Communications.Local
/// <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, bool isFlying)
{
if (this.regionHosts.ContainsKey(regionHandle))
{
// Console.WriteLine("CommsManager- Informing a region to expect avatar crossing");
this.regionHosts[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position);
this.regionHosts[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position, isFlying);
return true;
}
return false;
}
public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentID)
{
if (this.regionHosts.ContainsKey(regionHandle))
{
return true;
}
return false;

View File

@ -1,13 +1,15 @@
using OpenSim.Framework.Communications;
using OpenSim.Framework.Types;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Communications.Caches;
namespace OpenSim.Region.Communications.OGS1
{
public class CommunicationsOGS1 : CommunicationsManager
{
public CommunicationsOGS1(NetworkServersInfo serversInfo, BaseHttpServer httpServer ) :base(serversInfo, httpServer)
public CommunicationsOGS1(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache ) :base(serversInfo, httpServer, assetCache)
{
OGS1GridServices gridInterComms = new OGS1GridServices(serversInfo, httpServer);
GridServer = gridInterComms;

View File

@ -382,13 +382,13 @@ namespace OpenSim.Region.Communications.OGS1
/// <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, bool isFlying)
{
try
{
if (this.listeners.ContainsKey(regionHandle))
{
this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position);
this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position, isFlying);
return true;
}
RegionInfo regInfo = this.RequestNeighbourInfo(regionHandle);
@ -400,7 +400,7 @@ namespace OpenSim.Region.Communications.OGS1
"tcp://" + regInfo.RemotingAddress + ":" + regInfo.RemotingPort + "/InterRegions");
if (remObject != null)
{
retValue = remObject.ExpectAvatarCrossing(regionHandle, agentID, position);
retValue = remObject.ExpectAvatarCrossing(regionHandle, agentID, position, isFlying);
}
else
{
@ -420,6 +420,15 @@ namespace OpenSim.Region.Communications.OGS1
return false;
}
}
public bool AcknowledgeAgentCrossed(ulong regionHandle, LLUUID agentID)
{
if (this.listeners.ContainsKey(regionHandle))
{
return true;
}
return false;
}
#endregion
#region Methods triggered by calls from external instances
@ -453,13 +462,13 @@ namespace OpenSim.Region.Communications.OGS1
/// <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, bool isFlying)
{
try
{
if (this.listeners.ContainsKey(regionHandle))
{
this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position);
this.listeners[regionHandle].TriggerExpectAvatarCrossing(regionHandle, agentID, position, isFlying);
return true;
}
}

View File

@ -5,7 +5,7 @@ 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 delegate bool ExpectArrival(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying);
public sealed class InterRegionSingleton
{
@ -39,11 +39,11 @@ namespace OpenSim.Region.Communications.OGS1
return false;
}
public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying)
{
if (OnArrival != null)
{
return OnArrival(regionHandle, agentID, position);
return OnArrival(regionHandle, agentID, position, isFlying);
}
return false;
}
@ -69,11 +69,11 @@ namespace OpenSim.Region.Communications.OGS1
}
}
public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying)
{
try
{
return InterRegionSingleton.Instance.ExpectAvatarCrossing(regionHandle, agentID, position);
return InterRegionSingleton.Instance.ExpectAvatarCrossing(regionHandle, agentID, position, isFlying);
}
catch (System.Runtime.Remoting.RemotingException e)
{

View File

@ -587,6 +587,16 @@ namespace OpenSim.Region.Environment.Scenes
#endregion
#region Inventory
public void GetInventory(IClientAPI client, uint localID)
{
if (localID == this.m_localId)
{
client.SendTaskInventory(this.m_uuid, 0, new byte[0]);
}
}
#endregion
public void UpdateExtraParam(ushort type, bool inUse, byte[] data)
{
this.m_Shape.ExtraParams = new byte[data.Length + 7];

View File

@ -26,11 +26,14 @@
*
*/
using System;
using System.IO;
using System.Collections.Generic;
using libsecondlife;
using libsecondlife.Packets;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.Framework.Communications.Caches;
using OpenSim.Framework.Data;
namespace OpenSim.Region.Environment.Scenes
{
@ -343,6 +346,29 @@ namespace OpenSim.Region.Environment.Scenes
}
}
}
/// <summary>
///
/// </summary>
/// <param name="remoteClient"></param>
/// <param name="primLocalID"></param>
public void RequestTaskInventory(IClientAPI remoteClient, uint primLocalID)
{
Primitive prim = null;
foreach (EntityBase ent in Entities.Values)
{
if (ent is SceneObject)
{
prim = ((SceneObject)ent).HasChildPrim(primLocalID);
if (prim != null)
{
prim.GetInventory(remoteClient, primLocalID);
break;
}
}
}
}
/// <summary>
///
/// </summary>
@ -622,6 +648,50 @@ namespace OpenSim.Region.Environment.Scenes
}
}
/// <summary>
/// temporary method to test out creating new inventory items
/// </summary>
/// <param name="remoteClient"></param>
/// <param name="transActionID"></param>
/// <param name="folderID"></param>
/// <param name="callbackID"></param>
/// <param name="description"></param>
/// <param name="name"></param>
/// <param name="invType"></param>
/// <param name="type"></param>
/// <param name="wearableType"></param>
/// <param name="nextOwnerMask"></param>
public void CreateNewInventoryItem(IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID, uint callbackID, string description, string name, sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask)
{
CachedUserInfo userInfo = commsManager.UserProfilesCache.GetUserDetails(remoteClient.AgentId);
if (userInfo != null)
{
AssetBase asset = new AssetBase();
asset.Name = name;
asset.Description = description;
asset.InvType = invType;
asset.Type = type;
asset.FullID = LLUUID.Random();
asset.Data = new byte[0];
this.assetCache.AddAsset(asset);
InventoryItemBase item = new InventoryItemBase();
item.avatarID = remoteClient.AgentId;
item.creatorsID = remoteClient.AgentId;
item.inventoryID = LLUUID.Random();
item.assetID = asset.FullID;
item.inventoryDescription = description;
item.inventoryName = name;
item.type = invType;
item.parentFolderID = folderID;
item.inventoryCurrentPermissions = 2147483647;
item.inventoryNextPermissions = nextOwnerMask;
userInfo.ItemReceive(remoteClient.AgentId, item);
remoteClient.SendInventoryItemUpdate(item);
}
}
/// <summary>
/// Sends prims to a client
/// </summary>

View File

@ -37,7 +37,7 @@ using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Types;
using OpenSim.Physics.Manager;
using OpenSim.Region.Caches;
using OpenSim.Framework.Communications.Caches;
using OpenSim.Region.Environment.LandManagement;
using OpenSim.Region.Scripting;
using OpenSim.Region.Terrain;
@ -550,13 +550,14 @@ namespace OpenSim.Region.Environment.Scenes
m_estateManager.sendRegionHandshake(client);
CreateAndAddScenePresence(client);
m_LandManager.sendParcelOverlay(client);
//commsManager.UserProfilesCache.AddNewUser(client.AgentId);
commsManager.UserProfilesCache.AddNewUser(client.AgentId);
}
protected virtual void SubscribeToClientEvents(IClientAPI client)
{
client.OnRegionHandShakeReply += SendLayerData;
//remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims);
client.OnModifyTerrain += ModifyTerrain;
client.OnChatFromViewer += SimChat;
client.OnInstantMessage += InstantMessage;
client.OnRequestWearables += InformClientOfNeighbours;
@ -593,8 +594,10 @@ namespace OpenSim.Region.Environment.Scenes
client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(m_estateManager.handleEstateOwnerMessage);
// client.OnCreateNewInventoryItem += CreateNewInventoryItem;
// client.OnCreateNewInventoryFolder += commsManager.UserProfilesCache.HandleCreateInventoryFolder;
// client.OnFetchInventoryDescendents += commsManager.UserProfilesCache.HandleFecthInventoryDescendents;
// client.OnRequestTaskInventory += RequestTaskInventory;
}
protected ScenePresence CreateAndAddScenePresence(IClientAPI client)
@ -819,13 +822,13 @@ namespace OpenSim.Region.Environment.Scenes
}
}
public void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
public void AgentCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position, bool isFlying)
{
if (regionHandle == m_regInfo.RegionHandle)
{
if (Avatars.ContainsKey(agentID))
{
Avatars[agentID].MakeAvatar(position);
Avatars[agentID].MakeAvatar(position, isFlying);
}
}
}
@ -909,7 +912,7 @@ namespace OpenSim.Region.Environment.Scenes
agent.startpos = new LLVector3(128, 128, 70);
agent.child = true;
commsManager.InterRegion.InformRegionOfChildAgent(regionHandle, agent);
commsManager.InterRegion.ExpectAvatarCrossing(regionHandle, remoteClient.AgentId, position);
commsManager.InterRegion.ExpectAvatarCrossing(regionHandle, remoteClient.AgentId, position, false);
remoteClient.SendRegionTeleport(regionHandle, 13, reg.ExternalEndPoint, 4, (1 << 4));
}
@ -922,9 +925,9 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="regionhandle"></param>
/// <param name="agentID"></param>
/// <param name="position"></param>
public bool InformNeighbourOfCrossing(ulong regionhandle, LLUUID agentID, LLVector3 position)
public bool InformNeighbourOfCrossing(ulong regionhandle, LLUUID agentID, LLVector3 position, bool isFlying)
{
return commsManager.InterRegion.ExpectAvatarCrossing(regionhandle, agentID, position);
return commsManager.InterRegion.ExpectAvatarCrossing(regionhandle, agentID, position, isFlying);
}
public void performParcelPrimCountUpdate()

View File

@ -32,7 +32,7 @@ using libsecondlife;
using OpenSim.Framework.Console;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Types;
using OpenSim.Region.Caches;
using OpenSim.Framework.Communications.Caches;
using OpenSim.Region.Terrain;
using OpenSim.Framework;

View File

@ -40,13 +40,8 @@ namespace OpenSim.Region.Environment.Scenes
private Encoding enc = Encoding.ASCII;
private Dictionary<LLUUID, Primitive> ChildPrimitives = new Dictionary<LLUUID, Primitive>(); //list of all primitive id's that are part of this group
public Primitive rootPrimitive;
private new Scene m_world;
protected ulong m_regionHandle;
private bool physicsEnabled = false; // HOUSEKEEPING : Do we really need this?
private PhysicsScene m_PhysScene; // HOUSEKEEPING : Do we really need this?
private PhysicsActor m_PhysActor; // HOUSEKEEPING : Do we really need this?
private EventManager m_eventManager;
public bool isSelected = false;

View File

@ -66,6 +66,7 @@ namespace OpenSim.Region.Environment.Scenes
private IScenePresenceBody m_body; // HOUSEKEEPING : Do we really need this?
protected RegionInfo m_regionInfo;
protected ulong crossingFromRegion = 0;
private Vector3[] Dir_Vectors = new Vector3[6];
private enum Dir_ControlFlags
@ -183,10 +184,11 @@ namespace OpenSim.Region.Environment.Scenes
///
/// </summary>
/// <param name="pos"></param>
public void MakeAvatar(LLVector3 pos)
public void MakeAvatar(LLVector3 pos, bool isFlying)
{
//this.childAvatar = false;
this.Pos = pos;
this._physActor.Flying = isFlying;
this.newAvatar = true;
this.childAgent = false;
}
@ -194,8 +196,8 @@ namespace OpenSim.Region.Environment.Scenes
protected void MakeChildAgent()
{
this.Velocity = new LLVector3(0, 0, 0);
this.Pos = new LLVector3(128, 128, 70);
this.childAgent = true;
//this.Pos = new LLVector3(128, 128, 70);
}
/// <summary>
@ -551,11 +553,11 @@ namespace OpenSim.Region.Environment.Scenes
RegionInfo neighbourRegion = this.m_world.RequestNeighbouringRegionInfo(neighbourHandle);
if (neighbourRegion != null)
{
bool res = this.m_world.InformNeighbourOfCrossing(neighbourHandle, this.ControllingClient.AgentId, newpos);
bool res = this.m_world.InformNeighbourOfCrossing(neighbourHandle, this.ControllingClient.AgentId, newpos, this._physActor.Flying);
if (res)
{
this.MakeChildAgent();
this.ControllingClient.CrossRegion(neighbourHandle, newpos, vel, neighbourRegion.ExternalEndPoint);
this.MakeChildAgent();
}
}
}

View File

@ -66,8 +66,10 @@ namespace SimpleApp
public event NewAvatar OnNewAvatar;
public event GenericCall6 OnRemoveAvatar;
public event CreateNewInventoryItem OnCreateNewInventoryItem;
public event CreateInventoryFolder OnCreateNewInventoryFolder;
public event FetchInventoryDescendents OnFetchInventoryDescendents;
public event FetchInventory OnFetchInventory;
public event RequestTaskInventory OnRequestTaskInventory;
public event UUIDNameRequest OnNameFromUUIDRequest;
@ -142,7 +144,7 @@ namespace SimpleApp
public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, LLQuaternion rotation) { }
public virtual void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items) { }
public virtual void SendInventoryItemDetails(LLUUID ownerID, LLUUID folderID, InventoryItemBase item) { }
public virtual void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item) { }
public virtual void SendInventoryItemUpdate(InventoryItemBase Item) { }
public virtual void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName) { }
public virtual void SendNameReply(LLUUID profileId, string firstname, string lastname) { }

View File

@ -5,10 +5,11 @@ using OpenSim.Framework.Communications;
using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Types;
using OpenSim.Region.Caches;
using OpenSim.Region.Environment.Scenes;
using OpenSim.Region.Terrain;
using OpenSim.Region.Environment;
using OpenSim.Framework.Communications.Caches;
using Avatar=OpenSim.Region.Environment.Scenes.ScenePresence;

View File

@ -8,10 +8,11 @@ using OpenSim.Framework.Interfaces;
using OpenSim.Framework.Servers;
using OpenSim.Framework.Types;
using OpenSim.Physics.Manager;
using OpenSim.Region.Caches;
using OpenSim.Region.Capabilities;
using OpenSim.Region.ClientStack;
using OpenSim.Region.Communications.Local;
using OpenSim.Framework.Communications.Caches;
using OpenSim.Region.GridInterfaces.Local;
using System.Timers;
using OpenSim.Region.Environment.Scenes;
@ -47,7 +48,7 @@ namespace SimpleApp
{
base.StartUp();
m_commsManager = new CommunicationsLocal(m_networkServersInfo, m_httpServer);
m_commsManager = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache);
m_log.Notice(m_log.LineInfo);

View File

@ -157,54 +157,6 @@
</Files>
</Project>
<Project name="OpenSim.Region.Caches" path="OpenSim/Region/Caches" 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"/>
<Reference name="System.Xml"/>
<Reference name="libsecondlife.dll"/>
<Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Framework.Data"/>
<Files>
<Match pattern="*.cs" recurse="true"/>
</Files>
</Project>
<Project name="OpenSim.Region.Capabilities" path="OpenSim/Region/Capabilities" 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"/>
<Reference name="System.Xml"/>
<Reference name="libsecondlife.dll"/>
<Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Framework.Servers"/>
<Reference name="OpenSim.Region.Caches"/>
<Reference name="XMLRPC.dll"/>
<Files>
<Match pattern="*.cs" recurse="true"/>
</Files>
</Project>
<!-- Grid Server Plug-ins -->
<Project name="OpenSim.Region.GridInterfaces.Local" path="OpenSim/Region/GridInterfaces/Local" type="Library">
@ -427,6 +379,33 @@
</Files>
</Project>
<Project name="OpenSim.Framework.InventoryServiceBase" path="OpenSim/Framework/InventoryServiceBase" 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.Data" localCopy="false"/>
<Reference name="System.Xml" localCopy="false"/>
<Reference name="XMLRPC.dll"/>
<Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Framework.Data"/>
<Reference name="libsecondlife.dll"/>
<Files>
<Match pattern="*.cs" recurse="true"/>
</Files>
</Project>
<!-- OpenSim.Framework.Communications -->
<Project name="OpenSim.Framework.Communications" path="OpenSim/Framework/Communications" type="Library">
<Configuration name="Debug">
@ -532,10 +511,9 @@
<Reference name="OpenSim.Region.Terrain.BasicTerrain"/>
<Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Framework.Data" />
<Reference name="OpenSim.Region.Physics.Manager"/>
<Reference name="OpenSim.Framework.Servers"/>
<Reference name="OpenSim.Region.Caches"/>
<Reference name="OpenSim.Region.Capabilities"/>
<!-- For scripting in funny languages by default -->
<Reference name="Microsoft.JScript"/>
<Reference name="XMLRPC.dll"/>
@ -571,7 +549,6 @@
<Reference name="OpenSim.Framework.Communications"/>
<Reference name="OpenSim.Region.Physics.Manager"/>
<Reference name="OpenSim.Framework.Servers"/>
<Reference name="OpenSim.Region.Caches"/>
<Reference name="OpenSim.Framework.Data"/>
<Reference name="XMLRPC.dll"/>
@ -636,7 +613,6 @@
<Reference name="OpenSim.Region.ClientStack"/>
<Reference name="OpenSim.Framework.Communications"/>
<Reference name="OpenSim.Region.Communications.OGS1"/>
<Reference name="OpenSim.Region.Caches"/>
<Reference name="XMLRPC.dll"/>
<Reference name="OpenSim.Framework.UserManagement" />
<Reference name="OpenSim.Region.Communications.Local"/>
@ -673,13 +649,11 @@
<Reference name="OpenSim.Framework.UserManagement"/>
<Reference name="OpenSim.Framework.Data"/>
<Reference name="OpenSim.Region.Physics.Manager"/>
<Reference name="OpenSim.Region.Capabilities"/>
<Reference name="XMLRPC.dll"/>
<Reference name="OpenSim.Region.GridInterfaces.Local"/>
<Reference name="OpenSim.Framework.Servers"/>
<Reference name="OpenSim.Framework.Communications"/>
<Reference name="OpenSim.Region.Communications.Local"/>
<Reference name="OpenSim.Region.Caches"/>
<Reference name="OpenSim.Region.ClientStack"/>
<Reference name="OpenSim.Region.Environment"/>
<Reference name="OpenSim.Region.Terrain.BasicTerrain"/>