From 7d89e122930be39e84a6d174548fa2d12ac0484a Mon Sep 17 00:00:00 2001
From: Teravus Ovares
Date: Sat, 6 Sep 2008 07:52:41 +0000
Subject: * This is the fabled LibOMV update with all of the libOMV types from
JHurliman * This is a HUGE OMG update and will definitely have unknown side
effects.. so this is really only for the strong hearted at this point.
Regular people should let the dust settle. * This has been tested to work
with most basic functions. However.. make sure you back up 'everything'
before using this. It's that big! * Essentially we're back at square 1 in
the testing phase.. so lets identify things that broke.
---
.../Framework/Communications/Cache/AssetCache.cs | 52 ++++++++++-----------
.../Communications/Cache/AssetServerBase.cs | 4 +-
.../Communications/Cache/CachedUserInfo.cs | 54 +++++++++++-----------
.../Communications/Cache/FileAssetClient.cs | 16 ++++---
.../Communications/Cache/InventoryFolderImpl.cs | 14 +++---
.../Communications/Cache/LibraryRootFolder.cs | 46 +++++++++---------
.../Cache/UserProfileCacheService.cs | 38 +++++++--------
7 files changed, 114 insertions(+), 110 deletions(-)
(limited to 'OpenSim/Framework/Communications/Cache')
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs
index e924b3f..3e88eba 100644
--- a/OpenSim/Framework/Communications/Cache/AssetCache.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs
@@ -29,14 +29,14 @@ using System;
using System.Collections.Generic;
using System.Reflection;
using System.Threading;
-using libsecondlife;
-using libsecondlife.Packets;
+using OpenMetaverse;
+using OpenMetaverse.Packets;
using log4net;
using OpenSim.Framework.Statistics;
namespace OpenSim.Framework.Communications.Cache
{
- public delegate void AssetRequestCallback(LLUUID assetID, AssetBase asset);
+ public delegate void AssetRequestCallback(UUID assetID, AssetBase asset);
///
/// Manages local cache of assets and their sending to viewers.
@@ -58,17 +58,17 @@ namespace OpenSim.Framework.Communications.Cache
///
/// The cache of assets. This does not include textures.
///
- private Dictionary Assets;
+ private Dictionary Assets;
///
/// The cache of textures.
///
- private Dictionary Textures;
+ private Dictionary Textures;
///
/// Assets requests which are waiting for asset server data. This includes texture requests
///
- private Dictionary RequestedAssets;
+ private Dictionary RequestedAssets;
///
/// Asset requests with data which are ready to be sent back to requesters. This includes textures.
@@ -78,7 +78,7 @@ namespace OpenSim.Framework.Communications.Cache
///
/// Until the asset request is fulfilled, each asset request is associated with a list of requesters
///
- private Dictionary RequestLists;
+ private Dictionary RequestLists;
private readonly IAssetServer m_assetServer;
@@ -155,12 +155,12 @@ namespace OpenSim.Framework.Communications.Cache
///
private void Initialize()
{
- Assets = new Dictionary();
- Textures = new Dictionary();
+ Assets = new Dictionary();
+ Textures = new Dictionary();
AssetRequests = new List();
- RequestedAssets = new Dictionary();
- RequestLists = new Dictionary();
+ RequestedAssets = new Dictionary();
+ RequestLists = new Dictionary();
}
///
@@ -207,7 +207,7 @@ namespace OpenSim.Framework.Communications.Cache
///
///
///
- //private AssetBase GetCachedAsset(LLUUID assetId)
+ //private AssetBase GetCachedAsset(UUID assetId)
//{
// AssetBase asset = null;
@@ -223,7 +223,7 @@ namespace OpenSim.Framework.Communications.Cache
// return asset;
//}
- private bool TryGetCachedAsset(LLUUID assetId, out AssetBase asset)
+ private bool TryGetCachedAsset(UUID assetId, out AssetBase asset)
{
if (Textures.ContainsKey(assetId))
{
@@ -248,7 +248,7 @@ namespace OpenSim.Framework.Communications.Cache
/// A callback invoked when the asset has either been found or not found.
/// If the asset was found this is called with the asset UUID and the asset data
/// If the asset was not found this is still called with the asset UUID but with a null asset data reference
- public void GetAsset(LLUUID assetId, AssetRequestCallback callback, bool isTexture)
+ public void GetAsset(UUID assetId, AssetRequestCallback callback, bool isTexture)
{
//m_log.DebugFormat("[ASSET CACHE]: Requesting {0} {1}", isTexture ? "texture" : "asset", assetId);
@@ -308,7 +308,7 @@ namespace OpenSim.Framework.Communications.Cache
///
///
/// null if the asset could not be retrieved
- public AssetBase GetAsset(LLUUID assetID, bool isTexture)
+ public AssetBase GetAsset(UUID assetID, bool isTexture)
{
// I'm not going over 3 seconds since this will be blocking processing of all the other inbound
// packets from the client.
@@ -390,7 +390,7 @@ namespace OpenSim.Framework.Communications.Cache
/// this is a stop gap measure until we have such a thing.
///
- public void ExpireAsset(LLUUID uuid)
+ public void ExpireAsset(UUID uuid)
{
// uuid is unique, so no need to worry about it showing up
// in the 2 caches differently. Also, locks are probably
@@ -495,7 +495,7 @@ namespace OpenSim.Framework.Communications.Cache
}
// See IAssetReceiver
- public void AssetNotFound(LLUUID assetID, bool IsTexture)
+ public void AssetNotFound(UUID assetID, bool IsTexture)
{
//m_log.WarnFormat("[ASSET CACHE]: AssetNotFound for {0}", assetID);
@@ -567,17 +567,17 @@ namespace OpenSim.Framework.Communications.Cache
///
public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest)
{
- LLUUID requestID = null;
+ UUID requestID = null;
byte source = 2;
if (transferRequest.TransferInfo.SourceType == 2)
{
//direct asset request
- requestID = new LLUUID(transferRequest.TransferInfo.Params, 0);
+ requestID = new UUID(transferRequest.TransferInfo.Params, 0);
}
else if (transferRequest.TransferInfo.SourceType == 3)
{
//inventory asset request
- requestID = new LLUUID(transferRequest.TransferInfo.Params, 80);
+ requestID = new UUID(transferRequest.TransferInfo.Params, 80);
source = 3;
//Console.WriteLine("asset request " + requestID);
}
@@ -678,10 +678,10 @@ namespace OpenSim.Framework.Communications.Cache
public class AssetRequest
{
public IClientAPI RequestUser;
- public LLUUID RequestAssetID;
+ public UUID RequestAssetID;
public AssetInfo AssetInf;
public TextureImage ImageInfo;
- public LLUUID TransferRequestID;
+ public UUID TransferRequestID;
public long DataPointer = 0;
public int NumPackets = 0;
public int PacketCounter = 0;
@@ -731,10 +731,10 @@ namespace OpenSim.Framework.Communications.Cache
public class AssetRequestsList
{
- public LLUUID AssetID;
+ public UUID AssetID;
public List Requests = new List();
- public AssetRequestsList(LLUUID assetID)
+ public AssetRequestsList(UUID assetID)
{
AssetID = assetID;
}
@@ -742,10 +742,10 @@ namespace OpenSim.Framework.Communications.Cache
public class NewAssetRequest
{
- public LLUUID AssetID;
+ public UUID AssetID;
public AssetRequestCallback Callback;
- public NewAssetRequest(LLUUID assetID, AssetRequestCallback callback)
+ public NewAssetRequest(UUID assetID, AssetRequestCallback callback)
{
AssetID = assetID;
Callback = callback;
diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
index 2c8e685..9f4f480 100644
--- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs
@@ -28,7 +28,7 @@
using System;
using System.Reflection;
using System.Threading;
-using libsecondlife;
+using OpenMetaverse;
using log4net;
using OpenSim.Framework.AssetLoader.Filesystem;
using OpenSim.Framework.Statistics;
@@ -146,7 +146,7 @@ namespace OpenSim.Framework.Communications.Cache
m_receiver = receiver;
}
- public void RequestAsset(LLUUID assetID, bool isTexture)
+ public void RequestAsset(UUID assetID, bool isTexture)
{
AssetRequest req = new AssetRequest();
req.AssetID = assetID;
diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
index 8e3be81..339bb31 100644
--- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
+++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs
@@ -30,24 +30,24 @@ using System.Collections.Generic;
using System.Reflection;
using System.Threading;
-using libsecondlife;
+using OpenMetaverse;
using log4net;
namespace OpenSim.Framework.Communications.Cache
{
internal delegate void AddItemDelegate(InventoryItemBase itemInfo);
internal delegate void UpdateItemDelegate(InventoryItemBase itemInfo);
- internal delegate void DeleteItemDelegate(LLUUID itemID);
+ internal delegate void DeleteItemDelegate(UUID itemID);
- internal delegate void CreateFolderDelegate(string folderName, LLUUID folderID, ushort folderType, LLUUID parentID);
- internal delegate void MoveFolderDelegate(LLUUID folderID, LLUUID parentID);
- internal delegate void PurgeFolderDelegate(LLUUID folderID);
- internal delegate void UpdateFolderDelegate(string name, LLUUID folderID, ushort type, LLUUID parentID);
+ internal delegate void CreateFolderDelegate(string folderName, UUID folderID, ushort folderType, UUID parentID);
+ internal delegate void MoveFolderDelegate(UUID folderID, UUID parentID);
+ internal delegate void PurgeFolderDelegate(UUID folderID);
+ internal delegate void UpdateFolderDelegate(string name, UUID folderID, ushort type, UUID parentID);
internal delegate void SendInventoryDescendentsDelegate(
- IClientAPI client, LLUUID folderID, bool fetchFolders, bool fetchItems);
+ IClientAPI client, UUID folderID, bool fetchFolders, bool fetchItems);
- public delegate void OnItemReceivedDelegate(LLUUID itemID);
+ public delegate void OnItemReceivedDelegate(UUID itemID);
///
/// Stores user profile and inventory data received from backend services for a particular user.
@@ -84,12 +84,12 @@ namespace OpenSim.Framework.Communications.Cache
public InventoryFolderImpl RootFolder { get { return m_rootFolder; } }
private InventoryFolderImpl m_rootFolder;
- public LLUUID SessionID
+ public UUID SessionID
{
get { return m_session_id; }
set { m_session_id = value; }
}
- private LLUUID m_session_id = LLUUID.Zero;
+ private UUID m_session_id = UUID.Zero;
///
/// Constructor
@@ -127,9 +127,9 @@ namespace OpenSim.Framework.Communications.Cache
/// Helper function for InventoryReceive() - Store a folder temporarily until we've received entire folder list
///
///
- private void AddFolderToDictionary(InventoryFolderImpl folder, IDictionary> dictionary)
+ private void AddFolderToDictionary(InventoryFolderImpl folder, IDictionary> dictionary)
{
- LLUUID parentFolderId = folder.ParentID;
+ UUID parentFolderId = folder.ParentID;
if (dictionary.ContainsKey(parentFolderId))
dictionary[parentFolderId].Add(folder);
@@ -148,9 +148,9 @@ namespace OpenSim.Framework.Communications.Cache
/// heirarchy
///
///
- /// A
+ /// A
///
- private void ResolveReceivedFolders(InventoryFolderImpl parentFolder, IDictionary> folderDictionary)
+ private void ResolveReceivedFolders(InventoryFolderImpl parentFolder, IDictionary> folderDictionary)
{
if (folderDictionary.ContainsKey(parentFolder.ID))
{
@@ -208,19 +208,19 @@ namespace OpenSim.Framework.Communications.Cache
try
{
// collection of all received folders, indexed by their parent ID
- IDictionary> receivedFolders =
- new Dictionary>();
+ IDictionary> receivedFolders =
+ new Dictionary>();
// Take all received folders, find the root folder, and put ther rest into
// the pendingCategorizationFolders collection
foreach (InventoryFolderImpl folder in folders)
AddFolderToDictionary(folder, receivedFolders);
- if (!receivedFolders.ContainsKey(LLUUID.Zero))
+ if (!receivedFolders.ContainsKey(UUID.Zero))
throw new Exception("Database did not return a root inventory folder");
else
{
- IList rootFolderList = receivedFolders[LLUUID.Zero];
+ IList rootFolderList = receivedFolders[UUID.Zero];
m_rootFolder = rootFolderList[0];
if (rootFolderList.Count > 1)
{
@@ -231,7 +231,7 @@ namespace OpenSim.Framework.Communications.Cache
rootFolderList[i].ID, RootFolder.ID);
}
}
- receivedFolders.Remove(LLUUID.Zero);
+ receivedFolders.Remove(UUID.Zero);
}
// Now take the pendingCategorizationFolders collection, and turn that into a tree,
@@ -240,7 +240,7 @@ namespace OpenSim.Framework.Communications.Cache
ResolveReceivedFolders(RootFolder, receivedFolders);
// Generate a warning for folders that are not part of the heirarchy
- foreach (KeyValuePair> folderList in receivedFolders)
+ foreach (KeyValuePair> folderList in receivedFolders)
{
foreach (InventoryFolderImpl folder in folderList.Value)
m_log.WarnFormat("[INVENTORY CACHE]: Malformed Database: Unresolved Pending Folder {0}", folder.Name);
@@ -314,7 +314,7 @@ namespace OpenSim.Framework.Communications.Cache
///
///
///
- public bool CreateFolder(string folderName, LLUUID folderID, ushort folderType, LLUUID parentID)
+ public bool CreateFolder(string folderName, UUID folderID, ushort folderType, UUID parentID)
{
// m_log.DebugFormat(
// "[AGENT INVENTORY]: Creating inventory folder {0} {1} for {2} {3}", folderID, folderName, remoteClient.Name, remoteClient.AgentId);
@@ -389,7 +389,7 @@ namespace OpenSim.Framework.Communications.Cache
///
///
///
- public bool UpdateFolder(string name, LLUUID folderID, ushort type, LLUUID parentID)
+ public bool UpdateFolder(string name, UUID folderID, ushort type, UUID parentID)
{
// m_log.DebugFormat(
// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
@@ -440,7 +440,7 @@ namespace OpenSim.Framework.Communications.Cache
///
///
///
- public bool MoveFolder(LLUUID folderID, LLUUID parentID)
+ public bool MoveFolder(UUID folderID, UUID parentID)
{
// m_log.DebugFormat(
// "[AGENT INVENTORY]: Moving inventory folder {0} into folder {1} for {2} {3}",
@@ -487,7 +487,7 @@ namespace OpenSim.Framework.Communications.Cache
///
///
///
- public bool PurgeFolder(LLUUID folderID)
+ public bool PurgeFolder(UUID folderID)
{
// m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}",
// folderID, remoteClient.Name, remoteClient.AgentId);
@@ -542,7 +542,7 @@ namespace OpenSim.Framework.Communications.Cache
{
if (m_hasReceivedInventory)
{
- if (item.Folder == LLUUID.Zero)
+ if (item.Folder == UUID.Zero)
{
InventoryFolderImpl f = FindFolderForType(item.AssetType);
if (f != null)
@@ -607,7 +607,7 @@ namespace OpenSim.Framework.Communications.Cache
/// true on a successful delete or a if the request is queued.
/// Returns false on an immediate failure
///
- public bool DeleteItem(LLUUID itemID)
+ public bool DeleteItem(UUID itemID)
{
if (m_hasReceivedInventory)
{
@@ -655,7 +655,7 @@ namespace OpenSim.Framework.Communications.Cache
///
///
/// true if the request was queued or successfully processed, false otherwise
- public bool SendInventoryDecendents(IClientAPI client, LLUUID folderID, bool fetchFolders, bool fetchItems)
+ public bool SendInventoryDecendents(IClientAPI client, UUID folderID, bool fetchFolders, bool fetchItems)
{
if (m_hasReceivedInventory)
{
diff --git a/OpenSim/Framework/Communications/Cache/FileAssetClient.cs b/OpenSim/Framework/Communications/Cache/FileAssetClient.cs
index 3c74d4d..e793feb 100644
--- a/OpenSim/Framework/Communications/Cache/FileAssetClient.cs
+++ b/OpenSim/Framework/Communications/Cache/FileAssetClient.cs
@@ -18,11 +18,13 @@ namespace OpenSim.Framework.Communications.Cache
}
public override void StoreAsset(AssetBase asset)
{
- string cdir = m_dir + Path.DirectorySeparatorChar + asset.FullID.Data[0]
- + Path.DirectorySeparatorChar + asset.FullID.Data[1];
+ byte[] idBytes = asset.FullID.Guid.ToByteArray();
- if (!Directory.Exists(m_dir + Path.DirectorySeparatorChar + asset.FullID.Data[0]))
- Directory.CreateDirectory(m_dir + Path.DirectorySeparatorChar + asset.FullID.Data[0]);
+ string cdir = m_dir + Path.DirectorySeparatorChar + idBytes[0]
+ + Path.DirectorySeparatorChar + idBytes[1];
+
+ if (!Directory.Exists(m_dir + Path.DirectorySeparatorChar + idBytes[0]))
+ Directory.CreateDirectory(m_dir + Path.DirectorySeparatorChar + idBytes[0]);
if (!Directory.Exists(cdir))
Directory.CreateDirectory(cdir);
@@ -41,8 +43,10 @@ namespace OpenSim.Framework.Communications.Cache
protected override AssetBase GetAsset(AssetRequest req)
{
- string cdir = m_dir + Path.DirectorySeparatorChar + req.AssetID.Data[0]
- + Path.DirectorySeparatorChar + req.AssetID.Data[1];
+ byte[] idBytes = req.AssetID.Guid.ToByteArray();
+
+ string cdir = m_dir + Path.DirectorySeparatorChar + idBytes[0]
+ + Path.DirectorySeparatorChar + idBytes[1];
if (File.Exists(cdir + Path.DirectorySeparatorChar + req.AssetID + ".xml"))
{
FileStream x = File.OpenRead(cdir + Path.DirectorySeparatorChar + req.AssetID + ".xml");
diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
index 61cfc1a..debcbfb 100644
--- a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
+++ b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs
@@ -27,7 +27,7 @@
using System;
using System.Collections.Generic;
-using libsecondlife;
+using OpenMetaverse;
//using System.Reflection;
//using log4net;
@@ -43,12 +43,12 @@ namespace OpenSim.Framework.Communications.Cache
///
/// Items that are contained in this folder
///
- public Dictionary Items = new Dictionary();
+ public Dictionary Items = new Dictionary();
///
/// Child folders that are contained in this folder
///
- public Dictionary SubFolders = new Dictionary();
+ public Dictionary SubFolders = new Dictionary();
// Constructors
public InventoryFolderImpl(InventoryFolderBase folderbase)
@@ -72,7 +72,7 @@ namespace OpenSim.Framework.Communications.Cache
///
///
/// The newly created subfolder. Returns null if the folder already exists
- public InventoryFolderImpl CreateChildFolder(LLUUID folderID, string folderName, ushort type)
+ public InventoryFolderImpl CreateChildFolder(UUID folderID, string folderName, ushort type)
{
lock (SubFolders)
{
@@ -112,7 +112,7 @@ namespace OpenSim.Framework.Communications.Cache
///
///
/// null if the item is not found
- public InventoryItemBase FindItem(LLUUID itemID)
+ public InventoryItemBase FindItem(UUID itemID)
{
lock (Items)
{
@@ -143,7 +143,7 @@ namespace OpenSim.Framework.Communications.Cache
///
///
///
- public bool DeleteItem(LLUUID itemID)
+ public bool DeleteItem(UUID itemID)
{
bool found = false;
@@ -177,7 +177,7 @@ namespace OpenSim.Framework.Communications.Cache
/// first.
///
/// The requested folder if it exists, null if it does not.
- public InventoryFolderImpl FindFolder(LLUUID folderID)
+ public InventoryFolderImpl FindFolder(UUID folderID)
{
if (folderID == ID)
return this;
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
index 1ff6350..7e561b5 100644
--- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
+++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Xml;
-using libsecondlife;
+using OpenMetaverse;
using log4net;
using Nini.Config;
@@ -44,29 +44,29 @@ namespace OpenSim.Framework.Communications.Cache
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
- private LLUUID libOwner = new LLUUID("11111111-1111-0000-0000-000100bba000");
+ private UUID libOwner = new UUID("11111111-1111-0000-0000-000100bba000");
///
/// Holds the root library folder and all its descendents. This is really only used during inventory
/// setup so that we don't have to repeatedly search the tree of library folders.
///
- protected Dictionary libraryFolders
- = new Dictionary();
+ protected Dictionary libraryFolders
+ = new Dictionary();
public LibraryRootFolder()
{
m_log.Info("[LIBRARY INVENTORY]: Loading library inventory");
Owner = libOwner;
- ID = new LLUUID("00000112-000f-0000-0000-000100bba000");
+ ID = new UUID("00000112-000f-0000-0000-000100bba000");
Name = "OpenSim Library";
- ParentID = LLUUID.Zero;
+ ParentID = UUID.Zero;
Type = (short) 8;
Version = (ushort) 1;
libraryFolders.Add(ID, this);
- LoadLibraries(Path.Combine(Util.inventoryDir(), "Libraries.xml"));
+ LoadLibraries(Path.Combine(Util.inventoryDir(), "Libraries.Xml"));
// CreateLibraryItems();
}
@@ -81,40 +81,40 @@ namespace OpenSim.Framework.Communications.Cache
//private void CreateLibraryItems()
//{
// InventoryItemBase item =
- // CreateItem(new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9"),
- // new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"), "Default Shape", "Default Shape",
+ // CreateItem(new UUID("66c41e39-38f9-f75a-024e-585989bfaba9"),
+ // new UUID("66c41e39-38f9-f75a-024e-585989bfab73"), "Default Shape", "Default Shape",
// (int) AssetType.Bodypart, (int) InventoryType.Wearable, folderID);
// item.inventoryCurrentPermissions = 0;
// item.inventoryNextPermissions = 0;
// Items.Add(item.inventoryID, item);
// item =
- // CreateItem(new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9"),
- // new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"), "Default Skin", "Default Skin",
+ // CreateItem(new UUID("77c41e39-38f9-f75a-024e-585989bfabc9"),
+ // new UUID("77c41e39-38f9-f75a-024e-585989bbabbb"), "Default Skin", "Default Skin",
// (int) AssetType.Bodypart, (int) InventoryType.Wearable, folderID);
// item.inventoryCurrentPermissions = 0;
// item.inventoryNextPermissions = 0;
// Items.Add(item.inventoryID, item);
// item =
- // CreateItem(new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000"),
- // new LLUUID("00000000-38f9-1111-024e-222222111110"), "Default Shirt", "Default Shirt",
+ // CreateItem(new UUID("77c41e39-38f9-f75a-0000-585989bf0000"),
+ // new UUID("00000000-38f9-1111-024e-222222111110"), "Default Shirt", "Default Shirt",
// (int) AssetType.Clothing, (int) InventoryType.Wearable, folderID);
// item.inventoryCurrentPermissions = 0;
// item.inventoryNextPermissions = 0;
// Items.Add(item.inventoryID, item);
// item =
- // CreateItem(new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111"),
- // new LLUUID("00000000-38f9-1111-024e-222222111120"), "Default Pants", "Default Pants",
+ // CreateItem(new UUID("77c41e39-38f9-f75a-0000-5859892f1111"),
+ // new UUID("00000000-38f9-1111-024e-222222111120"), "Default Pants", "Default Pants",
// (int) AssetType.Clothing, (int) InventoryType.Wearable, folderID);
// item.inventoryCurrentPermissions = 0;
// item.inventoryNextPermissions = 0;
// Items.Add(item.inventoryID, item);
//}
- public InventoryItemBase CreateItem(LLUUID inventoryID, LLUUID assetID, string name, string description,
- int assetType, int invType, LLUUID parentFolderID)
+ public InventoryItemBase CreateItem(UUID inventoryID, UUID assetID, string name, string description,
+ int assetType, int invType, UUID parentFolderID)
{
InventoryItemBase item = new InventoryItemBase();
item.Owner = libOwner;
@@ -173,9 +173,9 @@ namespace OpenSim.Framework.Communications.Cache
{
InventoryFolderImpl folderInfo = new InventoryFolderImpl();
- folderInfo.ID = new LLUUID(config.GetString("folderID", ID.ToString()));
+ folderInfo.ID = new UUID(config.GetString("folderID", ID.ToString()));
folderInfo.Name = config.GetString("name", "unknown");
- folderInfo.ParentID = new LLUUID(config.GetString("parentFolderID", ID.ToString()));
+ folderInfo.ParentID = new UUID(config.GetString("parentFolderID", ID.ToString()));
folderInfo.Type = (short)config.GetInt("type", 8);
folderInfo.Owner = libOwner;
@@ -207,9 +207,9 @@ namespace OpenSim.Framework.Communications.Cache
InventoryItemBase item = new InventoryItemBase();
item.Owner = libOwner;
item.Creator = libOwner;
- item.ID = new LLUUID(config.GetString("inventoryID", ID.ToString()));
- item.AssetID = new LLUUID(config.GetString("assetID", item.ID.ToString()));
- item.Folder = new LLUUID(config.GetString("folderID", ID.ToString()));
+ item.ID = new UUID(config.GetString("inventoryID", ID.ToString()));
+ item.AssetID = new UUID(config.GetString("assetID", item.ID.ToString()));
+ item.Folder = new UUID(config.GetString("folderID", ID.ToString()));
item.Name = config.GetString("name", String.Empty);
item.Description = config.GetString("description", item.Name);
item.InvType = config.GetInt("inventoryType", 0);
@@ -270,7 +270,7 @@ namespace OpenSim.Framework.Communications.Cache
/// methods in the superclass
///
///
- public Dictionary RequestSelfAndDescendentFolders()
+ public Dictionary RequestSelfAndDescendentFolders()
{
return libraryFolders;
}
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 45f6c7e..3675053 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -29,7 +29,7 @@ using System;
using System.Collections.Generic;
using System.Reflection;
using System.Threading;
-using libsecondlife;
+using OpenMetaverse;
using log4net;
namespace OpenSim.Framework.Communications.Cache
@@ -49,7 +49,7 @@ namespace OpenSim.Framework.Communications.Cache
///
/// Each user has a cached profile.
///
- private readonly Dictionary m_userProfiles = new Dictionary();
+ private readonly Dictionary m_userProfiles = new Dictionary();
public readonly LibraryRootFolder libraryRoot = new LibraryRootFolder();
@@ -63,9 +63,9 @@ namespace OpenSim.Framework.Communications.Cache
/// A new user has moved into a region in this instance so retrieve their profile from the user service.
///
///
- public void AddNewUser(LLUUID userID)
+ public void AddNewUser(UUID userID)
{
- if (userID == LLUUID.Zero)
+ if (userID == UUID.Zero)
return;
m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID);
GetUserDetails(userID);
@@ -76,7 +76,7 @@ namespace OpenSim.Framework.Communications.Cache
///
///
/// true if the user was successfully removed, false otherwise
- public bool RemoveUser(LLUUID userId)
+ public bool RemoveUser(UUID userId)
{
lock (m_userProfiles)
{
@@ -99,7 +99,7 @@ namespace OpenSim.Framework.Communications.Cache
///
///
///
- public void RequestInventoryForUser(LLUUID userID)
+ public void RequestInventoryForUser(UUID userID)
{
CachedUserInfo userInfo = GetUserDetails(userID);
if (userInfo != null)
@@ -130,9 +130,9 @@ namespace OpenSim.Framework.Communications.Cache
///
///
/// null if no user details are found
- public CachedUserInfo GetUserDetails(LLUUID userID)
+ public CachedUserInfo GetUserDetails(UUID userID)
{
- if (userID == LLUUID.Zero)
+ if (userID == UUID.Zero)
return null;
lock (m_userProfiles)
@@ -164,9 +164,9 @@ namespace OpenSim.Framework.Communications.Cache
///
///
///
- public void PreloadUserCache(LLUUID userID, UserProfileData userData)
+ public void PreloadUserCache(UUID userID, UserProfileData userData)
{
- if (userID == LLUUID.Zero)
+ if (userID == UUID.Zero)
return;
lock (m_userProfiles)
@@ -192,8 +192,8 @@ namespace OpenSim.Framework.Communications.Cache
///
///
///
- public void HandleCreateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort folderType,
- string folderName, LLUUID parentID)
+ public void HandleCreateInventoryFolder(IClientAPI remoteClient, UUID folderID, ushort folderType,
+ string folderName, UUID parentID)
{
CachedUserInfo userProfile;
@@ -226,8 +226,8 @@ namespace OpenSim.Framework.Communications.Cache
///
///
///
- public void HandleUpdateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort type, string name,
- LLUUID parentID)
+ public void HandleUpdateInventoryFolder(IClientAPI remoteClient, UUID folderID, ushort type, string name,
+ UUID parentID)
{
// m_log.DebugFormat(
// "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId);
@@ -257,7 +257,7 @@ namespace OpenSim.Framework.Communications.Cache
///
///
///
- public void HandleMoveInventoryFolder(IClientAPI remoteClient, LLUUID folderID, LLUUID parentID)
+ public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID)
{
CachedUserInfo userProfile;
@@ -287,7 +287,7 @@ namespace OpenSim.Framework.Communications.Cache
///
///
///
- public void HandleFetchInventoryDescendents(IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID,
+ public void HandleFetchInventoryDescendents(IClientAPI remoteClient, UUID folderID, UUID ownerID,
bool fetchFolders, bool fetchItems, int sortOrder)
{
// FIXME MAYBE: We're not handling sortOrder!
@@ -327,7 +327,7 @@ namespace OpenSim.Framework.Communications.Cache
///
///
/// null if the inventory look up failed
- public List HandleFetchInventoryDescendentsCAPS(LLUUID agentID, LLUUID folderID, LLUUID ownerID,
+ public List HandleFetchInventoryDescendentsCAPS(UUID agentID, UUID folderID, UUID ownerID,
bool fetchFolders, bool fetchItems, int sortOrder)
{
// m_log.DebugFormat(
@@ -405,7 +405,7 @@ namespace OpenSim.Framework.Communications.Cache
///
///
///
- public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, LLUUID folderID)
+ public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID)
{
CachedUserInfo userProfile;
@@ -426,7 +426,7 @@ namespace OpenSim.Framework.Communications.Cache
}
}
- public void HandleFetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID)
+ public void HandleFetchInventory(IClientAPI remoteClient, UUID itemID, UUID ownerID)
{
if (ownerID == libraryRoot.Owner)
{
--
cgit v1.1