From a6999f8a5d011d7540c04fa5434864fab53b2ef8 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Sat, 29 Mar 2008 23:07:48 +0000 Subject: * Refactor: Remove unused inventory methods, some of which weren't properly implemented anyway. --- .../Framework/Communications/IInventoryServices.cs | 16 ----------- .../Communications/InventoryServiceBase.cs | 31 +++------------------- .../Grid/InventoryServer/GridInventoryService.cs | 11 ++++++++ .../Communications/Local/LocalInventoryService.cs | 19 ------------- .../Communications/Local/LocalLoginService.cs | 2 +- .../Communications/OGS1/OGS1InventoryService.cs | 10 ------- 6 files changed, 16 insertions(+), 73 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/Communications/IInventoryServices.cs b/OpenSim/Framework/Communications/IInventoryServices.cs index d824e9d..eaa2350 100644 --- a/OpenSim/Framework/Communications/IInventoryServices.cs +++ b/OpenSim/Framework/Communications/IInventoryServices.cs @@ -79,14 +79,6 @@ namespace OpenSim.Framework.Communications /// /// null if no root folder was found InventoryFolderBase RequestRootFolder(LLUUID userID); - - /// - /// Returns the root folder plus any folders in root (so down one level in the Inventory folders tree) - /// for the given user. - /// - /// - /// - List RequestFirstLevelFolders(LLUUID userID); /// /// Returns a list of all the folders in a given user's inventory. @@ -95,13 +87,5 @@ namespace OpenSim.Framework.Communications /// A flat list of the user's inventory folder tree. /// Null if there is no inventory for this user List GetInventorySkeleton(LLUUID userId); - - /// - /// Returns the named folder in that users inventory, returns null if folder is not found. - /// - /// - /// - /// - InventoryFolderBase RequestNamedFolder(LLUUID userID, string folderName); } } diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs index 5515c77..719e0d6 100644 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs @@ -74,31 +74,14 @@ namespace OpenSim.Framework.Communications #endregion - #region IInventoryServices methods + #region IInventoryServices methods /// - /// Guid to UUID wrapper for same name IInventoryServices method + /// Returns the root folder plus any folders in root (so down one level in the Inventory folders tree) + /// for the given user. /// - /// + /// /// - public List RequestFirstLevelFolders(Guid rawUserID) - { - LLUUID userID = new LLUUID(rawUserID); - return RequestFirstLevelFolders(userID); - } - - /// - /// Guid to UUID wrapper for same name IInventoryServices method - /// - /// - /// - public List GetInventorySkeleton(Guid rawUserID) - { - LLUUID userID = new LLUUID(rawUserID); - return GetInventorySkeleton(userID); - } - - // See IInventoryServices public List RequestFirstLevelFolders(LLUUID userID) { List inventoryList = new List(); @@ -176,12 +159,6 @@ namespace OpenSim.Framework.Communications } // See IInventoryServices - public virtual InventoryFolderBase RequestNamedFolder(LLUUID userID, string folderName) - { - return null; - } - - // See IInventoryServices public void CreateNewUserInventory(LLUUID user) { InventoryFolderBase existingRootFolder = RequestRootFolder(user); diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs index cfe06e8..a003cd3 100644 --- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs +++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs @@ -136,6 +136,17 @@ namespace OpenSim.Grid.InventoryServer return invCollection; } + + /// + /// Guid to UUID wrapper for same name IInventoryServices method + /// + /// + /// + public List GetInventorySkeleton(Guid rawUserID) + { + LLUUID userID = new LLUUID(rawUserID); + return GetInventorySkeleton(userID); + } public bool CreateUsersInventory(Guid rawUserID) { diff --git a/OpenSim/Region/Communications/Local/LocalInventoryService.cs b/OpenSim/Region/Communications/Local/LocalInventoryService.cs index fc5cc6c..df735a9 100644 --- a/OpenSim/Region/Communications/Local/LocalInventoryService.cs +++ b/OpenSim/Region/Communications/Local/LocalInventoryService.cs @@ -42,7 +42,6 @@ namespace OpenSim.Region.Communications.Local public override void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, InventoryItemInfo itemCallBack) { - //List folders = RequestFirstLevelFolders(userID); List folders = GetInventorySkeleton(userID); InventoryFolderImpl rootFolder = null; @@ -101,24 +100,6 @@ namespace OpenSim.Region.Communications.Local } } - public override InventoryFolderBase RequestNamedFolder(LLUUID userID, string folderName) - { - List folders = RequestFirstLevelFolders(userID); - InventoryFolderBase requestedFolder = null; - - //need to make sure we send root folder first - foreach (InventoryFolderBase folder in folders) - { - if (folder.name == folderName) - { - requestedFolder = folder; - break; - } - } - - return requestedFolder; - } - /// /// Send the given inventory folder and its item contents back to the requester. /// diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 6bb505d..3cea82d 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs @@ -216,7 +216,7 @@ namespace OpenSim.Region.Communications.Local protected override InventoryData GetInventorySkeleton(LLUUID userID) { List folders = m_Parent.InventoryService.GetInventorySkeleton(userID); - //List folders = m_Parent.InventoryService.RequestFirstLevelFolders(userID); + if (folders.Count > 0) { LLUUID rootID = LLUUID.Zero; diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index e78fc1a..5c93962 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs @@ -208,11 +208,6 @@ namespace OpenSim.Region.Communications.OGS1 return null; } - public virtual InventoryFolderBase RequestNamedFolder(LLUUID userID, string folderName) - { - return null; - } - public void CreateNewUserInventory(LLUUID user) { } @@ -225,11 +220,6 @@ namespace OpenSim.Region.Communications.OGS1 return new List(); } - public List RequestFirstLevelFolders(LLUUID userID) - { - return new List(); - } - #endregion public class InventoryRequest -- cgit v1.1