From 9d989612b0da9c5cc4e33a2f72d13d94116865d1 Mon Sep 17 00:00:00 2001 From: MW Date: Wed, 11 Jul 2007 14:39:03 +0000 Subject: updated libsecondlife.dll to a 1.18 version (from the libsecondlife aditi branch, so when they have a trunk version that is 1.18 ready, best to update again). Started some work on a userProfile/inventory cache. --- OpenSim/Region/Caches/CachedUserInfo.cs | 20 +++++++++ OpenSim/Region/Caches/InventoryFolder.cs | 51 +++++++++++++++++++++ OpenSim/Region/Caches/UserProfileCache.cs | 75 +++++++++++++++++++++++++++++++ 3 files changed, 146 insertions(+) create mode 100644 OpenSim/Region/Caches/CachedUserInfo.cs create mode 100644 OpenSim/Region/Caches/InventoryFolder.cs create mode 100644 OpenSim/Region/Caches/UserProfileCache.cs (limited to 'OpenSim/Region/Caches') diff --git a/OpenSim/Region/Caches/CachedUserInfo.cs b/OpenSim/Region/Caches/CachedUserInfo.cs new file mode 100644 index 0000000..08a7848 --- /dev/null +++ b/OpenSim/Region/Caches/CachedUserInfo.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Text; +using OpenSim.Framework.Data; +using libsecondlife; + +namespace OpenSim.Region.Caches +{ + public class CachedUserInfo + { + public UserProfileData UserProfile; + //public Dictionary Folders = new Dictionary(); + public InventoryFolder RootFolder; + + public CachedUserInfo() + { + + } + } +} diff --git a/OpenSim/Region/Caches/InventoryFolder.cs b/OpenSim/Region/Caches/InventoryFolder.cs new file mode 100644 index 0000000..364a184 --- /dev/null +++ b/OpenSim/Region/Caches/InventoryFolder.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Text; +using libsecondlife; +using OpenSim.Framework.Data; + +namespace OpenSim.Region.Caches +{ + public class InventoryFolder : InventoryFolderBase + { + public Dictionary SubFolders = new Dictionary(); + public Dictionary Items = new Dictionary(); + + 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; + } + } +} diff --git a/OpenSim/Region/Caches/UserProfileCache.cs b/OpenSim/Region/Caches/UserProfileCache.cs new file mode 100644 index 0000000..0717e55 --- /dev/null +++ b/OpenSim/Region/Caches/UserProfileCache.cs @@ -0,0 +1,75 @@ +using System; +using System.Collections.Generic; +using System.Text; +using libsecondlife; +using OpenSim.Framework.Data; + +namespace OpenSim.Region.Caches +{ + public class UserProfileCache + { + public Dictionary UserProfiles = new Dictionary(); + + public UserProfileCache() + { + + } + + /// + /// A new user has moved into a region in this instance + /// so get info from servers + /// + /// + public void AddNewUser(LLUUID userID) + { + + } + + /// + /// A user has left this instance + /// so make sure servers have been updated + /// Then remove cached info + /// + /// + public void UserLogOut(LLUUID userID) + { + + } + + /// + /// Request the user profile from User server + /// + /// + private void RequestUserProfileForUser(LLUUID userID) + { + + } + + /// + /// Request Iventory Info from Inventory server + /// + /// + private void RequestInventoryForUser(LLUUID userID) + { + + } + + /// + /// Make sure UserProfile is updated on user server + /// + /// + private void UpdateUserProfileToServer(LLUUID userID) + { + + } + + /// + /// Update Inventory data to Inventory server + /// + /// + private void UpdateInventoryToServer(LLUUID userID) + { + + } + } +} -- cgit v1.1