diff options
author | Teravus Ovares | 2008-09-06 07:52:41 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-09-06 07:52:41 +0000 |
commit | 7d89e122930be39e84a6d174548fa2d12ac0484a (patch) | |
tree | e5aa5752f988a9aba2a969f49e5e208985eda80c /OpenSim/Framework/Communications/Cache | |
parent | * minor: speculatively try a change to bamboo.build to see if this generates ... (diff) | |
download | opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.zip opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.gz opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.bz2 opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.xz |
* 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.
Diffstat (limited to 'OpenSim/Framework/Communications/Cache')
7 files changed, 114 insertions, 110 deletions
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; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | using System.Threading; | 31 | using System.Threading; |
32 | using libsecondlife; | 32 | using OpenMetaverse; |
33 | using libsecondlife.Packets; | 33 | using OpenMetaverse.Packets; |
34 | using log4net; | 34 | using log4net; |
35 | using OpenSim.Framework.Statistics; | 35 | using OpenSim.Framework.Statistics; |
36 | 36 | ||
37 | namespace OpenSim.Framework.Communications.Cache | 37 | namespace OpenSim.Framework.Communications.Cache |
38 | { | 38 | { |
39 | public delegate void AssetRequestCallback(LLUUID assetID, AssetBase asset); | 39 | public delegate void AssetRequestCallback(UUID assetID, AssetBase asset); |
40 | 40 | ||
41 | /// <summary> | 41 | /// <summary> |
42 | /// Manages local cache of assets and their sending to viewers. | 42 | /// Manages local cache of assets and their sending to viewers. |
@@ -58,17 +58,17 @@ namespace OpenSim.Framework.Communications.Cache | |||
58 | /// <summary> | 58 | /// <summary> |
59 | /// The cache of assets. This does not include textures. | 59 | /// The cache of assets. This does not include textures. |
60 | /// </summary> | 60 | /// </summary> |
61 | private Dictionary<LLUUID, AssetInfo> Assets; | 61 | private Dictionary<UUID, AssetInfo> Assets; |
62 | 62 | ||
63 | /// <summary> | 63 | /// <summary> |
64 | /// The cache of textures. | 64 | /// The cache of textures. |
65 | /// </summary> | 65 | /// </summary> |
66 | private Dictionary<LLUUID, TextureImage> Textures; | 66 | private Dictionary<UUID, TextureImage> Textures; |
67 | 67 | ||
68 | /// <summary> | 68 | /// <summary> |
69 | /// Assets requests which are waiting for asset server data. This includes texture requests | 69 | /// Assets requests which are waiting for asset server data. This includes texture requests |
70 | /// </summary> | 70 | /// </summary> |
71 | private Dictionary<LLUUID, AssetRequest> RequestedAssets; | 71 | private Dictionary<UUID, AssetRequest> RequestedAssets; |
72 | 72 | ||
73 | /// <summary> | 73 | /// <summary> |
74 | /// Asset requests with data which are ready to be sent back to requesters. This includes textures. | 74 | /// 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 | |||
78 | /// <summary> | 78 | /// <summary> |
79 | /// Until the asset request is fulfilled, each asset request is associated with a list of requesters | 79 | /// Until the asset request is fulfilled, each asset request is associated with a list of requesters |
80 | /// </summary> | 80 | /// </summary> |
81 | private Dictionary<LLUUID, AssetRequestsList> RequestLists; | 81 | private Dictionary<UUID, AssetRequestsList> RequestLists; |
82 | 82 | ||
83 | private readonly IAssetServer m_assetServer; | 83 | private readonly IAssetServer m_assetServer; |
84 | 84 | ||
@@ -155,12 +155,12 @@ namespace OpenSim.Framework.Communications.Cache | |||
155 | /// </summary> | 155 | /// </summary> |
156 | private void Initialize() | 156 | private void Initialize() |
157 | { | 157 | { |
158 | Assets = new Dictionary<LLUUID, AssetInfo>(); | 158 | Assets = new Dictionary<UUID, AssetInfo>(); |
159 | Textures = new Dictionary<LLUUID, TextureImage>(); | 159 | Textures = new Dictionary<UUID, TextureImage>(); |
160 | AssetRequests = new List<AssetRequest>(); | 160 | AssetRequests = new List<AssetRequest>(); |
161 | 161 | ||
162 | RequestedAssets = new Dictionary<LLUUID, AssetRequest>(); | 162 | RequestedAssets = new Dictionary<UUID, AssetRequest>(); |
163 | RequestLists = new Dictionary<LLUUID, AssetRequestsList>(); | 163 | RequestLists = new Dictionary<UUID, AssetRequestsList>(); |
164 | } | 164 | } |
165 | 165 | ||
166 | /// <summary> | 166 | /// <summary> |
@@ -207,7 +207,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
207 | /// </summary> | 207 | /// </summary> |
208 | /// <param name="assetId"></param></param> | 208 | /// <param name="assetId"></param></param> |
209 | /// <returns></returns> | 209 | /// <returns></returns> |
210 | //private AssetBase GetCachedAsset(LLUUID assetId) | 210 | //private AssetBase GetCachedAsset(UUID assetId) |
211 | //{ | 211 | //{ |
212 | // AssetBase asset = null; | 212 | // AssetBase asset = null; |
213 | 213 | ||
@@ -223,7 +223,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
223 | // return asset; | 223 | // return asset; |
224 | //} | 224 | //} |
225 | 225 | ||
226 | private bool TryGetCachedAsset(LLUUID assetId, out AssetBase asset) | 226 | private bool TryGetCachedAsset(UUID assetId, out AssetBase asset) |
227 | { | 227 | { |
228 | if (Textures.ContainsKey(assetId)) | 228 | if (Textures.ContainsKey(assetId)) |
229 | { | 229 | { |
@@ -248,7 +248,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
248 | /// A callback invoked when the asset has either been found or not found. | 248 | /// A callback invoked when the asset has either been found or not found. |
249 | /// If the asset was found this is called with the asset UUID and the asset data | 249 | /// If the asset was found this is called with the asset UUID and the asset data |
250 | /// If the asset was not found this is still called with the asset UUID but with a null asset data reference</param> | 250 | /// If the asset was not found this is still called with the asset UUID but with a null asset data reference</param> |
251 | public void GetAsset(LLUUID assetId, AssetRequestCallback callback, bool isTexture) | 251 | public void GetAsset(UUID assetId, AssetRequestCallback callback, bool isTexture) |
252 | { | 252 | { |
253 | //m_log.DebugFormat("[ASSET CACHE]: Requesting {0} {1}", isTexture ? "texture" : "asset", assetId); | 253 | //m_log.DebugFormat("[ASSET CACHE]: Requesting {0} {1}", isTexture ? "texture" : "asset", assetId); |
254 | 254 | ||
@@ -308,7 +308,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
308 | /// <param name="assetID"></param> | 308 | /// <param name="assetID"></param> |
309 | /// <param name="isTexture"></param> | 309 | /// <param name="isTexture"></param> |
310 | /// <returns>null if the asset could not be retrieved</returns> | 310 | /// <returns>null if the asset could not be retrieved</returns> |
311 | public AssetBase GetAsset(LLUUID assetID, bool isTexture) | 311 | public AssetBase GetAsset(UUID assetID, bool isTexture) |
312 | { | 312 | { |
313 | // I'm not going over 3 seconds since this will be blocking processing of all the other inbound | 313 | // I'm not going over 3 seconds since this will be blocking processing of all the other inbound |
314 | // packets from the client. | 314 | // packets from the client. |
@@ -390,7 +390,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
390 | /// this is a stop gap measure until we have such a thing. | 390 | /// this is a stop gap measure until we have such a thing. |
391 | /// </summary> | 391 | /// </summary> |
392 | 392 | ||
393 | public void ExpireAsset(LLUUID uuid) | 393 | public void ExpireAsset(UUID uuid) |
394 | { | 394 | { |
395 | // uuid is unique, so no need to worry about it showing up | 395 | // uuid is unique, so no need to worry about it showing up |
396 | // in the 2 caches differently. Also, locks are probably | 396 | // in the 2 caches differently. Also, locks are probably |
@@ -495,7 +495,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
495 | } | 495 | } |
496 | 496 | ||
497 | // See IAssetReceiver | 497 | // See IAssetReceiver |
498 | public void AssetNotFound(LLUUID assetID, bool IsTexture) | 498 | public void AssetNotFound(UUID assetID, bool IsTexture) |
499 | { | 499 | { |
500 | //m_log.WarnFormat("[ASSET CACHE]: AssetNotFound for {0}", assetID); | 500 | //m_log.WarnFormat("[ASSET CACHE]: AssetNotFound for {0}", assetID); |
501 | 501 | ||
@@ -567,17 +567,17 @@ namespace OpenSim.Framework.Communications.Cache | |||
567 | /// <param name="transferRequest"></param> | 567 | /// <param name="transferRequest"></param> |
568 | public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest) | 568 | public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest) |
569 | { | 569 | { |
570 | LLUUID requestID = null; | 570 | UUID requestID = null; |
571 | byte source = 2; | 571 | byte source = 2; |
572 | if (transferRequest.TransferInfo.SourceType == 2) | 572 | if (transferRequest.TransferInfo.SourceType == 2) |
573 | { | 573 | { |
574 | //direct asset request | 574 | //direct asset request |
575 | requestID = new LLUUID(transferRequest.TransferInfo.Params, 0); | 575 | requestID = new UUID(transferRequest.TransferInfo.Params, 0); |
576 | } | 576 | } |
577 | else if (transferRequest.TransferInfo.SourceType == 3) | 577 | else if (transferRequest.TransferInfo.SourceType == 3) |
578 | { | 578 | { |
579 | //inventory asset request | 579 | //inventory asset request |
580 | requestID = new LLUUID(transferRequest.TransferInfo.Params, 80); | 580 | requestID = new UUID(transferRequest.TransferInfo.Params, 80); |
581 | source = 3; | 581 | source = 3; |
582 | //Console.WriteLine("asset request " + requestID); | 582 | //Console.WriteLine("asset request " + requestID); |
583 | } | 583 | } |
@@ -678,10 +678,10 @@ namespace OpenSim.Framework.Communications.Cache | |||
678 | public class AssetRequest | 678 | public class AssetRequest |
679 | { | 679 | { |
680 | public IClientAPI RequestUser; | 680 | public IClientAPI RequestUser; |
681 | public LLUUID RequestAssetID; | 681 | public UUID RequestAssetID; |
682 | public AssetInfo AssetInf; | 682 | public AssetInfo AssetInf; |
683 | public TextureImage ImageInfo; | 683 | public TextureImage ImageInfo; |
684 | public LLUUID TransferRequestID; | 684 | public UUID TransferRequestID; |
685 | public long DataPointer = 0; | 685 | public long DataPointer = 0; |
686 | public int NumPackets = 0; | 686 | public int NumPackets = 0; |
687 | public int PacketCounter = 0; | 687 | public int PacketCounter = 0; |
@@ -731,10 +731,10 @@ namespace OpenSim.Framework.Communications.Cache | |||
731 | 731 | ||
732 | public class AssetRequestsList | 732 | public class AssetRequestsList |
733 | { | 733 | { |
734 | public LLUUID AssetID; | 734 | public UUID AssetID; |
735 | public List<NewAssetRequest> Requests = new List<NewAssetRequest>(); | 735 | public List<NewAssetRequest> Requests = new List<NewAssetRequest>(); |
736 | 736 | ||
737 | public AssetRequestsList(LLUUID assetID) | 737 | public AssetRequestsList(UUID assetID) |
738 | { | 738 | { |
739 | AssetID = assetID; | 739 | AssetID = assetID; |
740 | } | 740 | } |
@@ -742,10 +742,10 @@ namespace OpenSim.Framework.Communications.Cache | |||
742 | 742 | ||
743 | public class NewAssetRequest | 743 | public class NewAssetRequest |
744 | { | 744 | { |
745 | public LLUUID AssetID; | 745 | public UUID AssetID; |
746 | public AssetRequestCallback Callback; | 746 | public AssetRequestCallback Callback; |
747 | 747 | ||
748 | public NewAssetRequest(LLUUID assetID, AssetRequestCallback callback) | 748 | public NewAssetRequest(UUID assetID, AssetRequestCallback callback) |
749 | { | 749 | { |
750 | AssetID = assetID; | 750 | AssetID = assetID; |
751 | Callback = callback; | 751 | 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 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Reflection; | 29 | using System.Reflection; |
30 | using System.Threading; | 30 | using System.Threading; |
31 | using libsecondlife; | 31 | using OpenMetaverse; |
32 | using log4net; | 32 | using log4net; |
33 | using OpenSim.Framework.AssetLoader.Filesystem; | 33 | using OpenSim.Framework.AssetLoader.Filesystem; |
34 | using OpenSim.Framework.Statistics; | 34 | using OpenSim.Framework.Statistics; |
@@ -146,7 +146,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
146 | m_receiver = receiver; | 146 | m_receiver = receiver; |
147 | } | 147 | } |
148 | 148 | ||
149 | public void RequestAsset(LLUUID assetID, bool isTexture) | 149 | public void RequestAsset(UUID assetID, bool isTexture) |
150 | { | 150 | { |
151 | AssetRequest req = new AssetRequest(); | 151 | AssetRequest req = new AssetRequest(); |
152 | req.AssetID = assetID; | 152 | 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; | |||
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | using System.Threading; | 31 | using System.Threading; |
32 | 32 | ||
33 | using libsecondlife; | 33 | using OpenMetaverse; |
34 | using log4net; | 34 | using log4net; |
35 | 35 | ||
36 | namespace OpenSim.Framework.Communications.Cache | 36 | namespace OpenSim.Framework.Communications.Cache |
37 | { | 37 | { |
38 | internal delegate void AddItemDelegate(InventoryItemBase itemInfo); | 38 | internal delegate void AddItemDelegate(InventoryItemBase itemInfo); |
39 | internal delegate void UpdateItemDelegate(InventoryItemBase itemInfo); | 39 | internal delegate void UpdateItemDelegate(InventoryItemBase itemInfo); |
40 | internal delegate void DeleteItemDelegate(LLUUID itemID); | 40 | internal delegate void DeleteItemDelegate(UUID itemID); |
41 | 41 | ||
42 | internal delegate void CreateFolderDelegate(string folderName, LLUUID folderID, ushort folderType, LLUUID parentID); | 42 | internal delegate void CreateFolderDelegate(string folderName, UUID folderID, ushort folderType, UUID parentID); |
43 | internal delegate void MoveFolderDelegate(LLUUID folderID, LLUUID parentID); | 43 | internal delegate void MoveFolderDelegate(UUID folderID, UUID parentID); |
44 | internal delegate void PurgeFolderDelegate(LLUUID folderID); | 44 | internal delegate void PurgeFolderDelegate(UUID folderID); |
45 | internal delegate void UpdateFolderDelegate(string name, LLUUID folderID, ushort type, LLUUID parentID); | 45 | internal delegate void UpdateFolderDelegate(string name, UUID folderID, ushort type, UUID parentID); |
46 | 46 | ||
47 | internal delegate void SendInventoryDescendentsDelegate( | 47 | internal delegate void SendInventoryDescendentsDelegate( |
48 | IClientAPI client, LLUUID folderID, bool fetchFolders, bool fetchItems); | 48 | IClientAPI client, UUID folderID, bool fetchFolders, bool fetchItems); |
49 | 49 | ||
50 | public delegate void OnItemReceivedDelegate(LLUUID itemID); | 50 | public delegate void OnItemReceivedDelegate(UUID itemID); |
51 | 51 | ||
52 | /// <summary> | 52 | /// <summary> |
53 | /// Stores user profile and inventory data received from backend services for a particular user. | 53 | /// Stores user profile and inventory data received from backend services for a particular user. |
@@ -84,12 +84,12 @@ namespace OpenSim.Framework.Communications.Cache | |||
84 | public InventoryFolderImpl RootFolder { get { return m_rootFolder; } } | 84 | public InventoryFolderImpl RootFolder { get { return m_rootFolder; } } |
85 | private InventoryFolderImpl m_rootFolder; | 85 | private InventoryFolderImpl m_rootFolder; |
86 | 86 | ||
87 | public LLUUID SessionID | 87 | public UUID SessionID |
88 | { | 88 | { |
89 | get { return m_session_id; } | 89 | get { return m_session_id; } |
90 | set { m_session_id = value; } | 90 | set { m_session_id = value; } |
91 | } | 91 | } |
92 | private LLUUID m_session_id = LLUUID.Zero; | 92 | private UUID m_session_id = UUID.Zero; |
93 | 93 | ||
94 | /// <summary> | 94 | /// <summary> |
95 | /// Constructor | 95 | /// Constructor |
@@ -127,9 +127,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
127 | /// Helper function for InventoryReceive() - Store a folder temporarily until we've received entire folder list | 127 | /// Helper function for InventoryReceive() - Store a folder temporarily until we've received entire folder list |
128 | /// </summary> | 128 | /// </summary> |
129 | /// <param name="folder"></param> | 129 | /// <param name="folder"></param> |
130 | private void AddFolderToDictionary(InventoryFolderImpl folder, IDictionary<LLUUID, IList<InventoryFolderImpl>> dictionary) | 130 | private void AddFolderToDictionary(InventoryFolderImpl folder, IDictionary<UUID, IList<InventoryFolderImpl>> dictionary) |
131 | { | 131 | { |
132 | LLUUID parentFolderId = folder.ParentID; | 132 | UUID parentFolderId = folder.ParentID; |
133 | 133 | ||
134 | if (dictionary.ContainsKey(parentFolderId)) | 134 | if (dictionary.ContainsKey(parentFolderId)) |
135 | dictionary[parentFolderId].Add(folder); | 135 | dictionary[parentFolderId].Add(folder); |
@@ -148,9 +148,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
148 | /// heirarchy | 148 | /// heirarchy |
149 | /// </summary> | 149 | /// </summary> |
150 | /// <param name="parentId"> | 150 | /// <param name="parentId"> |
151 | /// A <see cref="LLUUID"/> | 151 | /// A <see cref="UUID"/> |
152 | /// </param> | 152 | /// </param> |
153 | private void ResolveReceivedFolders(InventoryFolderImpl parentFolder, IDictionary<LLUUID, IList<InventoryFolderImpl>> folderDictionary) | 153 | private void ResolveReceivedFolders(InventoryFolderImpl parentFolder, IDictionary<UUID, IList<InventoryFolderImpl>> folderDictionary) |
154 | { | 154 | { |
155 | if (folderDictionary.ContainsKey(parentFolder.ID)) | 155 | if (folderDictionary.ContainsKey(parentFolder.ID)) |
156 | { | 156 | { |
@@ -208,19 +208,19 @@ namespace OpenSim.Framework.Communications.Cache | |||
208 | try | 208 | try |
209 | { | 209 | { |
210 | // collection of all received folders, indexed by their parent ID | 210 | // collection of all received folders, indexed by their parent ID |
211 | IDictionary<LLUUID, IList<InventoryFolderImpl>> receivedFolders = | 211 | IDictionary<UUID, IList<InventoryFolderImpl>> receivedFolders = |
212 | new Dictionary<LLUUID, IList<InventoryFolderImpl>>(); | 212 | new Dictionary<UUID, IList<InventoryFolderImpl>>(); |
213 | 213 | ||
214 | // Take all received folders, find the root folder, and put ther rest into | 214 | // Take all received folders, find the root folder, and put ther rest into |
215 | // the pendingCategorizationFolders collection | 215 | // the pendingCategorizationFolders collection |
216 | foreach (InventoryFolderImpl folder in folders) | 216 | foreach (InventoryFolderImpl folder in folders) |
217 | AddFolderToDictionary(folder, receivedFolders); | 217 | AddFolderToDictionary(folder, receivedFolders); |
218 | 218 | ||
219 | if (!receivedFolders.ContainsKey(LLUUID.Zero)) | 219 | if (!receivedFolders.ContainsKey(UUID.Zero)) |
220 | throw new Exception("Database did not return a root inventory folder"); | 220 | throw new Exception("Database did not return a root inventory folder"); |
221 | else | 221 | else |
222 | { | 222 | { |
223 | IList<InventoryFolderImpl> rootFolderList = receivedFolders[LLUUID.Zero]; | 223 | IList<InventoryFolderImpl> rootFolderList = receivedFolders[UUID.Zero]; |
224 | m_rootFolder = rootFolderList[0]; | 224 | m_rootFolder = rootFolderList[0]; |
225 | if (rootFolderList.Count > 1) | 225 | if (rootFolderList.Count > 1) |
226 | { | 226 | { |
@@ -231,7 +231,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
231 | rootFolderList[i].ID, RootFolder.ID); | 231 | rootFolderList[i].ID, RootFolder.ID); |
232 | } | 232 | } |
233 | } | 233 | } |
234 | receivedFolders.Remove(LLUUID.Zero); | 234 | receivedFolders.Remove(UUID.Zero); |
235 | } | 235 | } |
236 | 236 | ||
237 | // Now take the pendingCategorizationFolders collection, and turn that into a tree, | 237 | // Now take the pendingCategorizationFolders collection, and turn that into a tree, |
@@ -240,7 +240,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
240 | ResolveReceivedFolders(RootFolder, receivedFolders); | 240 | ResolveReceivedFolders(RootFolder, receivedFolders); |
241 | 241 | ||
242 | // Generate a warning for folders that are not part of the heirarchy | 242 | // Generate a warning for folders that are not part of the heirarchy |
243 | foreach (KeyValuePair<LLUUID, IList<InventoryFolderImpl>> folderList in receivedFolders) | 243 | foreach (KeyValuePair<UUID, IList<InventoryFolderImpl>> folderList in receivedFolders) |
244 | { | 244 | { |
245 | foreach (InventoryFolderImpl folder in folderList.Value) | 245 | foreach (InventoryFolderImpl folder in folderList.Value) |
246 | m_log.WarnFormat("[INVENTORY CACHE]: Malformed Database: Unresolved Pending Folder {0}", folder.Name); | 246 | m_log.WarnFormat("[INVENTORY CACHE]: Malformed Database: Unresolved Pending Folder {0}", folder.Name); |
@@ -314,7 +314,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
314 | /// </summary> | 314 | /// </summary> |
315 | /// <param name="parentID"></param> | 315 | /// <param name="parentID"></param> |
316 | /// <returns></returns> | 316 | /// <returns></returns> |
317 | public bool CreateFolder(string folderName, LLUUID folderID, ushort folderType, LLUUID parentID) | 317 | public bool CreateFolder(string folderName, UUID folderID, ushort folderType, UUID parentID) |
318 | { | 318 | { |
319 | // m_log.DebugFormat( | 319 | // m_log.DebugFormat( |
320 | // "[AGENT INVENTORY]: Creating inventory folder {0} {1} for {2} {3}", folderID, folderName, remoteClient.Name, remoteClient.AgentId); | 320 | // "[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 | |||
389 | /// <param name="type"></param> | 389 | /// <param name="type"></param> |
390 | /// <param name="name"></param> | 390 | /// <param name="name"></param> |
391 | /// <param name="parentID"></param> | 391 | /// <param name="parentID"></param> |
392 | public bool UpdateFolder(string name, LLUUID folderID, ushort type, LLUUID parentID) | 392 | public bool UpdateFolder(string name, UUID folderID, ushort type, UUID parentID) |
393 | { | 393 | { |
394 | // m_log.DebugFormat( | 394 | // m_log.DebugFormat( |
395 | // "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId); | 395 | // "[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 | |||
440 | /// | 440 | /// |
441 | /// <param name="folderID"></param> | 441 | /// <param name="folderID"></param> |
442 | /// <param name="parentID"></param> | 442 | /// <param name="parentID"></param> |
443 | public bool MoveFolder(LLUUID folderID, LLUUID parentID) | 443 | public bool MoveFolder(UUID folderID, UUID parentID) |
444 | { | 444 | { |
445 | // m_log.DebugFormat( | 445 | // m_log.DebugFormat( |
446 | // "[AGENT INVENTORY]: Moving inventory folder {0} into folder {1} for {2} {3}", | 446 | // "[AGENT INVENTORY]: Moving inventory folder {0} into folder {1} for {2} {3}", |
@@ -487,7 +487,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
487 | /// </summary> | 487 | /// </summary> |
488 | /// | 488 | /// |
489 | /// <param name="folderID"></param> | 489 | /// <param name="folderID"></param> |
490 | public bool PurgeFolder(LLUUID folderID) | 490 | public bool PurgeFolder(UUID folderID) |
491 | { | 491 | { |
492 | // m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}", | 492 | // m_log.InfoFormat("[AGENT INVENTORY]: Purging folder {0} for {1} uuid {2}", |
493 | // folderID, remoteClient.Name, remoteClient.AgentId); | 493 | // folderID, remoteClient.Name, remoteClient.AgentId); |
@@ -542,7 +542,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
542 | { | 542 | { |
543 | if (m_hasReceivedInventory) | 543 | if (m_hasReceivedInventory) |
544 | { | 544 | { |
545 | if (item.Folder == LLUUID.Zero) | 545 | if (item.Folder == UUID.Zero) |
546 | { | 546 | { |
547 | InventoryFolderImpl f = FindFolderForType(item.AssetType); | 547 | InventoryFolderImpl f = FindFolderForType(item.AssetType); |
548 | if (f != null) | 548 | if (f != null) |
@@ -607,7 +607,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
607 | /// true on a successful delete or a if the request is queued. | 607 | /// true on a successful delete or a if the request is queued. |
608 | /// Returns false on an immediate failure | 608 | /// Returns false on an immediate failure |
609 | /// </returns> | 609 | /// </returns> |
610 | public bool DeleteItem(LLUUID itemID) | 610 | public bool DeleteItem(UUID itemID) |
611 | { | 611 | { |
612 | if (m_hasReceivedInventory) | 612 | if (m_hasReceivedInventory) |
613 | { | 613 | { |
@@ -655,7 +655,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
655 | /// <param name="fetchFolders"></param> | 655 | /// <param name="fetchFolders"></param> |
656 | /// <param name="fetchItems"></param> | 656 | /// <param name="fetchItems"></param> |
657 | /// <returns>true if the request was queued or successfully processed, false otherwise</returns> | 657 | /// <returns>true if the request was queued or successfully processed, false otherwise</returns> |
658 | public bool SendInventoryDecendents(IClientAPI client, LLUUID folderID, bool fetchFolders, bool fetchItems) | 658 | public bool SendInventoryDecendents(IClientAPI client, UUID folderID, bool fetchFolders, bool fetchItems) |
659 | { | 659 | { |
660 | if (m_hasReceivedInventory) | 660 | if (m_hasReceivedInventory) |
661 | { | 661 | { |
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 | |||
18 | } | 18 | } |
19 | public override void StoreAsset(AssetBase asset) | 19 | public override void StoreAsset(AssetBase asset) |
20 | { | 20 | { |
21 | string cdir = m_dir + Path.DirectorySeparatorChar + asset.FullID.Data[0] | 21 | byte[] idBytes = asset.FullID.Guid.ToByteArray(); |
22 | + Path.DirectorySeparatorChar + asset.FullID.Data[1]; | ||
23 | 22 | ||
24 | if (!Directory.Exists(m_dir + Path.DirectorySeparatorChar + asset.FullID.Data[0])) | 23 | string cdir = m_dir + Path.DirectorySeparatorChar + idBytes[0] |
25 | Directory.CreateDirectory(m_dir + Path.DirectorySeparatorChar + asset.FullID.Data[0]); | 24 | + Path.DirectorySeparatorChar + idBytes[1]; |
25 | |||
26 | if (!Directory.Exists(m_dir + Path.DirectorySeparatorChar + idBytes[0])) | ||
27 | Directory.CreateDirectory(m_dir + Path.DirectorySeparatorChar + idBytes[0]); | ||
26 | 28 | ||
27 | if (!Directory.Exists(cdir)) | 29 | if (!Directory.Exists(cdir)) |
28 | Directory.CreateDirectory(cdir); | 30 | Directory.CreateDirectory(cdir); |
@@ -41,8 +43,10 @@ namespace OpenSim.Framework.Communications.Cache | |||
41 | 43 | ||
42 | protected override AssetBase GetAsset(AssetRequest req) | 44 | protected override AssetBase GetAsset(AssetRequest req) |
43 | { | 45 | { |
44 | string cdir = m_dir + Path.DirectorySeparatorChar + req.AssetID.Data[0] | 46 | byte[] idBytes = req.AssetID.Guid.ToByteArray(); |
45 | + Path.DirectorySeparatorChar + req.AssetID.Data[1]; | 47 | |
48 | string cdir = m_dir + Path.DirectorySeparatorChar + idBytes[0] | ||
49 | + Path.DirectorySeparatorChar + idBytes[1]; | ||
46 | if (File.Exists(cdir + Path.DirectorySeparatorChar + req.AssetID + ".xml")) | 50 | if (File.Exists(cdir + Path.DirectorySeparatorChar + req.AssetID + ".xml")) |
47 | { | 51 | { |
48 | FileStream x = File.OpenRead(cdir + Path.DirectorySeparatorChar + req.AssetID + ".xml"); | 52 | 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 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using libsecondlife; | 30 | using OpenMetaverse; |
31 | //using System.Reflection; | 31 | //using System.Reflection; |
32 | 32 | ||
33 | //using log4net; | 33 | //using log4net; |
@@ -43,12 +43,12 @@ namespace OpenSim.Framework.Communications.Cache | |||
43 | /// <summary> | 43 | /// <summary> |
44 | /// Items that are contained in this folder | 44 | /// Items that are contained in this folder |
45 | /// </summary> | 45 | /// </summary> |
46 | public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>(); | 46 | public Dictionary<UUID, InventoryItemBase> Items = new Dictionary<UUID, InventoryItemBase>(); |
47 | 47 | ||
48 | /// <summary> | 48 | /// <summary> |
49 | /// Child folders that are contained in this folder | 49 | /// Child folders that are contained in this folder |
50 | /// </summary> | 50 | /// </summary> |
51 | public Dictionary<LLUUID, InventoryFolderImpl> SubFolders = new Dictionary<LLUUID, InventoryFolderImpl>(); | 51 | public Dictionary<UUID, InventoryFolderImpl> SubFolders = new Dictionary<UUID, InventoryFolderImpl>(); |
52 | 52 | ||
53 | // Constructors | 53 | // Constructors |
54 | public InventoryFolderImpl(InventoryFolderBase folderbase) | 54 | public InventoryFolderImpl(InventoryFolderBase folderbase) |
@@ -72,7 +72,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
72 | /// <param name="folderName"></param> | 72 | /// <param name="folderName"></param> |
73 | /// <param name="type"></param> | 73 | /// <param name="type"></param> |
74 | /// <returns>The newly created subfolder. Returns null if the folder already exists</returns> | 74 | /// <returns>The newly created subfolder. Returns null if the folder already exists</returns> |
75 | public InventoryFolderImpl CreateChildFolder(LLUUID folderID, string folderName, ushort type) | 75 | public InventoryFolderImpl CreateChildFolder(UUID folderID, string folderName, ushort type) |
76 | { | 76 | { |
77 | lock (SubFolders) | 77 | lock (SubFolders) |
78 | { | 78 | { |
@@ -112,7 +112,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
112 | /// </summary> | 112 | /// </summary> |
113 | /// <param name="itemID"></param> | 113 | /// <param name="itemID"></param> |
114 | /// <returns>null if the item is not found</returns> | 114 | /// <returns>null if the item is not found</returns> |
115 | public InventoryItemBase FindItem(LLUUID itemID) | 115 | public InventoryItemBase FindItem(UUID itemID) |
116 | { | 116 | { |
117 | lock (Items) | 117 | lock (Items) |
118 | { | 118 | { |
@@ -143,7 +143,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
143 | /// </summary> | 143 | /// </summary> |
144 | /// <param name="folderID"></param> | 144 | /// <param name="folderID"></param> |
145 | /// <returns></returns> | 145 | /// <returns></returns> |
146 | public bool DeleteItem(LLUUID itemID) | 146 | public bool DeleteItem(UUID itemID) |
147 | { | 147 | { |
148 | bool found = false; | 148 | bool found = false; |
149 | 149 | ||
@@ -177,7 +177,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
177 | /// first. | 177 | /// first. |
178 | /// </summary> | 178 | /// </summary> |
179 | /// <returns>The requested folder if it exists, null if it does not.</returns> | 179 | /// <returns>The requested folder if it exists, null if it does not.</returns> |
180 | public InventoryFolderImpl FindFolder(LLUUID folderID) | 180 | public InventoryFolderImpl FindFolder(UUID folderID) |
181 | { | 181 | { |
182 | if (folderID == ID) | 182 | if (folderID == ID) |
183 | return this; | 183 | 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; | |||
30 | using System.IO; | 30 | using System.IO; |
31 | using System.Reflection; | 31 | using System.Reflection; |
32 | using System.Xml; | 32 | using System.Xml; |
33 | using libsecondlife; | 33 | using OpenMetaverse; |
34 | using log4net; | 34 | using log4net; |
35 | using Nini.Config; | 35 | using Nini.Config; |
36 | 36 | ||
@@ -44,29 +44,29 @@ namespace OpenSim.Framework.Communications.Cache | |||
44 | { | 44 | { |
45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | private LLUUID libOwner = new LLUUID("11111111-1111-0000-0000-000100bba000"); | 47 | private UUID libOwner = new UUID("11111111-1111-0000-0000-000100bba000"); |
48 | 48 | ||
49 | /// <summary> | 49 | /// <summary> |
50 | /// Holds the root library folder and all its descendents. This is really only used during inventory | 50 | /// Holds the root library folder and all its descendents. This is really only used during inventory |
51 | /// setup so that we don't have to repeatedly search the tree of library folders. | 51 | /// setup so that we don't have to repeatedly search the tree of library folders. |
52 | /// </summary> | 52 | /// </summary> |
53 | protected Dictionary<LLUUID, InventoryFolderImpl> libraryFolders | 53 | protected Dictionary<UUID, InventoryFolderImpl> libraryFolders |
54 | = new Dictionary<LLUUID, InventoryFolderImpl>(); | 54 | = new Dictionary<UUID, InventoryFolderImpl>(); |
55 | 55 | ||
56 | public LibraryRootFolder() | 56 | public LibraryRootFolder() |
57 | { | 57 | { |
58 | m_log.Info("[LIBRARY INVENTORY]: Loading library inventory"); | 58 | m_log.Info("[LIBRARY INVENTORY]: Loading library inventory"); |
59 | 59 | ||
60 | Owner = libOwner; | 60 | Owner = libOwner; |
61 | ID = new LLUUID("00000112-000f-0000-0000-000100bba000"); | 61 | ID = new UUID("00000112-000f-0000-0000-000100bba000"); |
62 | Name = "OpenSim Library"; | 62 | Name = "OpenSim Library"; |
63 | ParentID = LLUUID.Zero; | 63 | ParentID = UUID.Zero; |
64 | Type = (short) 8; | 64 | Type = (short) 8; |
65 | Version = (ushort) 1; | 65 | Version = (ushort) 1; |
66 | 66 | ||
67 | libraryFolders.Add(ID, this); | 67 | libraryFolders.Add(ID, this); |
68 | 68 | ||
69 | LoadLibraries(Path.Combine(Util.inventoryDir(), "Libraries.xml")); | 69 | LoadLibraries(Path.Combine(Util.inventoryDir(), "Libraries.Xml")); |
70 | 70 | ||
71 | // CreateLibraryItems(); | 71 | // CreateLibraryItems(); |
72 | } | 72 | } |
@@ -81,40 +81,40 @@ namespace OpenSim.Framework.Communications.Cache | |||
81 | //private void CreateLibraryItems() | 81 | //private void CreateLibraryItems() |
82 | //{ | 82 | //{ |
83 | // InventoryItemBase item = | 83 | // InventoryItemBase item = |
84 | // CreateItem(new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9"), | 84 | // CreateItem(new UUID("66c41e39-38f9-f75a-024e-585989bfaba9"), |
85 | // new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"), "Default Shape", "Default Shape", | 85 | // new UUID("66c41e39-38f9-f75a-024e-585989bfab73"), "Default Shape", "Default Shape", |
86 | // (int) AssetType.Bodypart, (int) InventoryType.Wearable, folderID); | 86 | // (int) AssetType.Bodypart, (int) InventoryType.Wearable, folderID); |
87 | // item.inventoryCurrentPermissions = 0; | 87 | // item.inventoryCurrentPermissions = 0; |
88 | // item.inventoryNextPermissions = 0; | 88 | // item.inventoryNextPermissions = 0; |
89 | // Items.Add(item.inventoryID, item); | 89 | // Items.Add(item.inventoryID, item); |
90 | 90 | ||
91 | // item = | 91 | // item = |
92 | // CreateItem(new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9"), | 92 | // CreateItem(new UUID("77c41e39-38f9-f75a-024e-585989bfabc9"), |
93 | // new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb"), "Default Skin", "Default Skin", | 93 | // new UUID("77c41e39-38f9-f75a-024e-585989bbabbb"), "Default Skin", "Default Skin", |
94 | // (int) AssetType.Bodypart, (int) InventoryType.Wearable, folderID); | 94 | // (int) AssetType.Bodypart, (int) InventoryType.Wearable, folderID); |
95 | // item.inventoryCurrentPermissions = 0; | 95 | // item.inventoryCurrentPermissions = 0; |
96 | // item.inventoryNextPermissions = 0; | 96 | // item.inventoryNextPermissions = 0; |
97 | // Items.Add(item.inventoryID, item); | 97 | // Items.Add(item.inventoryID, item); |
98 | 98 | ||
99 | // item = | 99 | // item = |
100 | // CreateItem(new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000"), | 100 | // CreateItem(new UUID("77c41e39-38f9-f75a-0000-585989bf0000"), |
101 | // new LLUUID("00000000-38f9-1111-024e-222222111110"), "Default Shirt", "Default Shirt", | 101 | // new UUID("00000000-38f9-1111-024e-222222111110"), "Default Shirt", "Default Shirt", |
102 | // (int) AssetType.Clothing, (int) InventoryType.Wearable, folderID); | 102 | // (int) AssetType.Clothing, (int) InventoryType.Wearable, folderID); |
103 | // item.inventoryCurrentPermissions = 0; | 103 | // item.inventoryCurrentPermissions = 0; |
104 | // item.inventoryNextPermissions = 0; | 104 | // item.inventoryNextPermissions = 0; |
105 | // Items.Add(item.inventoryID, item); | 105 | // Items.Add(item.inventoryID, item); |
106 | 106 | ||
107 | // item = | 107 | // item = |
108 | // CreateItem(new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111"), | 108 | // CreateItem(new UUID("77c41e39-38f9-f75a-0000-5859892f1111"), |
109 | // new LLUUID("00000000-38f9-1111-024e-222222111120"), "Default Pants", "Default Pants", | 109 | // new UUID("00000000-38f9-1111-024e-222222111120"), "Default Pants", "Default Pants", |
110 | // (int) AssetType.Clothing, (int) InventoryType.Wearable, folderID); | 110 | // (int) AssetType.Clothing, (int) InventoryType.Wearable, folderID); |
111 | // item.inventoryCurrentPermissions = 0; | 111 | // item.inventoryCurrentPermissions = 0; |
112 | // item.inventoryNextPermissions = 0; | 112 | // item.inventoryNextPermissions = 0; |
113 | // Items.Add(item.inventoryID, item); | 113 | // Items.Add(item.inventoryID, item); |
114 | //} | 114 | //} |
115 | 115 | ||
116 | public InventoryItemBase CreateItem(LLUUID inventoryID, LLUUID assetID, string name, string description, | 116 | public InventoryItemBase CreateItem(UUID inventoryID, UUID assetID, string name, string description, |
117 | int assetType, int invType, LLUUID parentFolderID) | 117 | int assetType, int invType, UUID parentFolderID) |
118 | { | 118 | { |
119 | InventoryItemBase item = new InventoryItemBase(); | 119 | InventoryItemBase item = new InventoryItemBase(); |
120 | item.Owner = libOwner; | 120 | item.Owner = libOwner; |
@@ -173,9 +173,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
173 | { | 173 | { |
174 | InventoryFolderImpl folderInfo = new InventoryFolderImpl(); | 174 | InventoryFolderImpl folderInfo = new InventoryFolderImpl(); |
175 | 175 | ||
176 | folderInfo.ID = new LLUUID(config.GetString("folderID", ID.ToString())); | 176 | folderInfo.ID = new UUID(config.GetString("folderID", ID.ToString())); |
177 | folderInfo.Name = config.GetString("name", "unknown"); | 177 | folderInfo.Name = config.GetString("name", "unknown"); |
178 | folderInfo.ParentID = new LLUUID(config.GetString("parentFolderID", ID.ToString())); | 178 | folderInfo.ParentID = new UUID(config.GetString("parentFolderID", ID.ToString())); |
179 | folderInfo.Type = (short)config.GetInt("type", 8); | 179 | folderInfo.Type = (short)config.GetInt("type", 8); |
180 | 180 | ||
181 | folderInfo.Owner = libOwner; | 181 | folderInfo.Owner = libOwner; |
@@ -207,9 +207,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
207 | InventoryItemBase item = new InventoryItemBase(); | 207 | InventoryItemBase item = new InventoryItemBase(); |
208 | item.Owner = libOwner; | 208 | item.Owner = libOwner; |
209 | item.Creator = libOwner; | 209 | item.Creator = libOwner; |
210 | item.ID = new LLUUID(config.GetString("inventoryID", ID.ToString())); | 210 | item.ID = new UUID(config.GetString("inventoryID", ID.ToString())); |
211 | item.AssetID = new LLUUID(config.GetString("assetID", item.ID.ToString())); | 211 | item.AssetID = new UUID(config.GetString("assetID", item.ID.ToString())); |
212 | item.Folder = new LLUUID(config.GetString("folderID", ID.ToString())); | 212 | item.Folder = new UUID(config.GetString("folderID", ID.ToString())); |
213 | item.Name = config.GetString("name", String.Empty); | 213 | item.Name = config.GetString("name", String.Empty); |
214 | item.Description = config.GetString("description", item.Name); | 214 | item.Description = config.GetString("description", item.Name); |
215 | item.InvType = config.GetInt("inventoryType", 0); | 215 | item.InvType = config.GetInt("inventoryType", 0); |
@@ -270,7 +270,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
270 | /// methods in the superclass | 270 | /// methods in the superclass |
271 | /// </summary> | 271 | /// </summary> |
272 | /// <returns></returns> | 272 | /// <returns></returns> |
273 | public Dictionary<LLUUID, InventoryFolderImpl> RequestSelfAndDescendentFolders() | 273 | public Dictionary<UUID, InventoryFolderImpl> RequestSelfAndDescendentFolders() |
274 | { | 274 | { |
275 | return libraryFolders; | 275 | return libraryFolders; |
276 | } | 276 | } |
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; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | using System.Threading; | 31 | using System.Threading; |
32 | using libsecondlife; | 32 | using OpenMetaverse; |
33 | using log4net; | 33 | using log4net; |
34 | 34 | ||
35 | namespace OpenSim.Framework.Communications.Cache | 35 | namespace OpenSim.Framework.Communications.Cache |
@@ -49,7 +49,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
49 | /// <summary> | 49 | /// <summary> |
50 | /// Each user has a cached profile. | 50 | /// Each user has a cached profile. |
51 | /// </summary> | 51 | /// </summary> |
52 | private readonly Dictionary<LLUUID, CachedUserInfo> m_userProfiles = new Dictionary<LLUUID, CachedUserInfo>(); | 52 | private readonly Dictionary<UUID, CachedUserInfo> m_userProfiles = new Dictionary<UUID, CachedUserInfo>(); |
53 | 53 | ||
54 | public readonly LibraryRootFolder libraryRoot = new LibraryRootFolder(); | 54 | public readonly LibraryRootFolder libraryRoot = new LibraryRootFolder(); |
55 | 55 | ||
@@ -63,9 +63,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
63 | /// A new user has moved into a region in this instance so retrieve their profile from the user service. | 63 | /// A new user has moved into a region in this instance so retrieve their profile from the user service. |
64 | /// </summary> | 64 | /// </summary> |
65 | /// <param name="userID"></param> | 65 | /// <param name="userID"></param> |
66 | public void AddNewUser(LLUUID userID) | 66 | public void AddNewUser(UUID userID) |
67 | { | 67 | { |
68 | if (userID == LLUUID.Zero) | 68 | if (userID == UUID.Zero) |
69 | return; | 69 | return; |
70 | m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID); | 70 | m_log.DebugFormat("[USER CACHE]: Adding user profile for {0}", userID); |
71 | GetUserDetails(userID); | 71 | GetUserDetails(userID); |
@@ -76,7 +76,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
76 | /// </summary> | 76 | /// </summary> |
77 | /// <param name="userID"></param> | 77 | /// <param name="userID"></param> |
78 | /// <returns>true if the user was successfully removed, false otherwise</returns> | 78 | /// <returns>true if the user was successfully removed, false otherwise</returns> |
79 | public bool RemoveUser(LLUUID userId) | 79 | public bool RemoveUser(UUID userId) |
80 | { | 80 | { |
81 | lock (m_userProfiles) | 81 | lock (m_userProfiles) |
82 | { | 82 | { |
@@ -99,7 +99,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
99 | /// </summary> | 99 | /// </summary> |
100 | /// <param name="userID"></param> | 100 | /// <param name="userID"></param> |
101 | /// <param name="userInfo"></param> | 101 | /// <param name="userInfo"></param> |
102 | public void RequestInventoryForUser(LLUUID userID) | 102 | public void RequestInventoryForUser(UUID userID) |
103 | { | 103 | { |
104 | CachedUserInfo userInfo = GetUserDetails(userID); | 104 | CachedUserInfo userInfo = GetUserDetails(userID); |
105 | if (userInfo != null) | 105 | if (userInfo != null) |
@@ -130,9 +130,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
130 | /// </summary> | 130 | /// </summary> |
131 | /// <param name="userID"></param> | 131 | /// <param name="userID"></param> |
132 | /// <returns>null if no user details are found</returns> | 132 | /// <returns>null if no user details are found</returns> |
133 | public CachedUserInfo GetUserDetails(LLUUID userID) | 133 | public CachedUserInfo GetUserDetails(UUID userID) |
134 | { | 134 | { |
135 | if (userID == LLUUID.Zero) | 135 | if (userID == UUID.Zero) |
136 | return null; | 136 | return null; |
137 | 137 | ||
138 | lock (m_userProfiles) | 138 | lock (m_userProfiles) |
@@ -164,9 +164,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
164 | /// </summary> | 164 | /// </summary> |
165 | /// <param name="userID"></param> | 165 | /// <param name="userID"></param> |
166 | /// <param name="userData"></param> | 166 | /// <param name="userData"></param> |
167 | public void PreloadUserCache(LLUUID userID, UserProfileData userData) | 167 | public void PreloadUserCache(UUID userID, UserProfileData userData) |
168 | { | 168 | { |
169 | if (userID == LLUUID.Zero) | 169 | if (userID == UUID.Zero) |
170 | return; | 170 | return; |
171 | 171 | ||
172 | lock (m_userProfiles) | 172 | lock (m_userProfiles) |
@@ -192,8 +192,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
192 | /// <param name="folderType"></param> | 192 | /// <param name="folderType"></param> |
193 | /// <param name="folderName"></param> | 193 | /// <param name="folderName"></param> |
194 | /// <param name="parentID"></param> | 194 | /// <param name="parentID"></param> |
195 | public void HandleCreateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort folderType, | 195 | public void HandleCreateInventoryFolder(IClientAPI remoteClient, UUID folderID, ushort folderType, |
196 | string folderName, LLUUID parentID) | 196 | string folderName, UUID parentID) |
197 | { | 197 | { |
198 | CachedUserInfo userProfile; | 198 | CachedUserInfo userProfile; |
199 | 199 | ||
@@ -226,8 +226,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
226 | /// <param name="type"></param> | 226 | /// <param name="type"></param> |
227 | /// <param name="name"></param> | 227 | /// <param name="name"></param> |
228 | /// <param name="parentID"></param> | 228 | /// <param name="parentID"></param> |
229 | public void HandleUpdateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort type, string name, | 229 | public void HandleUpdateInventoryFolder(IClientAPI remoteClient, UUID folderID, ushort type, string name, |
230 | LLUUID parentID) | 230 | UUID parentID) |
231 | { | 231 | { |
232 | // m_log.DebugFormat( | 232 | // m_log.DebugFormat( |
233 | // "[AGENT INVENTORY]: Updating inventory folder {0} {1} for {2} {3}", folderID, name, remoteClient.Name, remoteClient.AgentId); | 233 | // "[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 | |||
257 | /// <param name="remoteClient"></param> | 257 | /// <param name="remoteClient"></param> |
258 | /// <param name="folderID"></param> | 258 | /// <param name="folderID"></param> |
259 | /// <param name="parentID"></param> | 259 | /// <param name="parentID"></param> |
260 | public void HandleMoveInventoryFolder(IClientAPI remoteClient, LLUUID folderID, LLUUID parentID) | 260 | public void HandleMoveInventoryFolder(IClientAPI remoteClient, UUID folderID, UUID parentID) |
261 | { | 261 | { |
262 | CachedUserInfo userProfile; | 262 | CachedUserInfo userProfile; |
263 | 263 | ||
@@ -287,7 +287,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
287 | /// <param name="fetchFolders"></param> | 287 | /// <param name="fetchFolders"></param> |
288 | /// <param name="fetchItems"></param> | 288 | /// <param name="fetchItems"></param> |
289 | /// <param name="sortOrder"></param> | 289 | /// <param name="sortOrder"></param> |
290 | public void HandleFetchInventoryDescendents(IClientAPI remoteClient, LLUUID folderID, LLUUID ownerID, | 290 | public void HandleFetchInventoryDescendents(IClientAPI remoteClient, UUID folderID, UUID ownerID, |
291 | bool fetchFolders, bool fetchItems, int sortOrder) | 291 | bool fetchFolders, bool fetchItems, int sortOrder) |
292 | { | 292 | { |
293 | // FIXME MAYBE: We're not handling sortOrder! | 293 | // FIXME MAYBE: We're not handling sortOrder! |
@@ -327,7 +327,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
327 | /// <param name="fetchItems"></param> | 327 | /// <param name="fetchItems"></param> |
328 | /// <param name="sortOrder"></param> | 328 | /// <param name="sortOrder"></param> |
329 | /// <returns>null if the inventory look up failed</returns> | 329 | /// <returns>null if the inventory look up failed</returns> |
330 | public List<InventoryItemBase> HandleFetchInventoryDescendentsCAPS(LLUUID agentID, LLUUID folderID, LLUUID ownerID, | 330 | public List<InventoryItemBase> HandleFetchInventoryDescendentsCAPS(UUID agentID, UUID folderID, UUID ownerID, |
331 | bool fetchFolders, bool fetchItems, int sortOrder) | 331 | bool fetchFolders, bool fetchItems, int sortOrder) |
332 | { | 332 | { |
333 | // m_log.DebugFormat( | 333 | // m_log.DebugFormat( |
@@ -405,7 +405,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
405 | /// </summary> | 405 | /// </summary> |
406 | /// <param name="remoteClient"></param> | 406 | /// <param name="remoteClient"></param> |
407 | /// <param name="folderID"></param> | 407 | /// <param name="folderID"></param> |
408 | public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, LLUUID folderID) | 408 | public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, UUID folderID) |
409 | { | 409 | { |
410 | CachedUserInfo userProfile; | 410 | CachedUserInfo userProfile; |
411 | 411 | ||
@@ -426,7 +426,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
426 | } | 426 | } |
427 | } | 427 | } |
428 | 428 | ||
429 | public void HandleFetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID) | 429 | public void HandleFetchInventory(IClientAPI remoteClient, UUID itemID, UUID ownerID) |
430 | { | 430 | { |
431 | if (ownerID == libraryRoot.Owner) | 431 | if (ownerID == libraryRoot.Owner) |
432 | { | 432 | { |