diff --git a/OpenSim/Framework/Communications/IInventoryServices.cs b/OpenSim/Framework/Communications/IInventoryServices.cs index ddb19baae9..0e0961368b 100644 --- a/OpenSim/Framework/Communications/IInventoryServices.cs +++ b/OpenSim/Framework/Communications/IInventoryServices.cs @@ -88,5 +88,13 @@ namespace OpenSim.Framework.Communications /// /// List RequestFirstLevelFolders(LLUUID userID); + + /// + /// Returns the named folder in that users inventory, returns null if folder is not found. + /// + /// + /// + /// + InventoryFolderBase RequestNamedFolder(LLUUID userID, string folderName); } } \ No newline at end of file diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs index 74c07e1ef5..c8748fa03c 100644 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs @@ -140,6 +140,12 @@ namespace OpenSim.Framework.Communications return RequestUsersRoot(userID); } + // See IInventoryServices + public virtual InventoryFolderBase RequestNamedFolder(LLUUID userID, string folderName) + { + return null; + } + // See IInventoryServices public void CreateNewUserInventory(LLUUID user) { diff --git a/OpenSim/Region/Communications/Local/LocalInventoryService.cs b/OpenSim/Region/Communications/Local/LocalInventoryService.cs index 35eb89ae5b..77a2a6e405 100644 --- a/OpenSim/Region/Communications/Local/LocalInventoryService.cs +++ b/OpenSim/Region/Communications/Local/LocalInventoryService.cs @@ -100,6 +100,23 @@ 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/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index 81689edb7f..8ff62d022c 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs @@ -175,6 +175,11 @@ namespace OpenSim.Region.Communications.OGS1 return null; } + public virtual InventoryFolderBase RequestNamedFolder(LLUUID userID, string folderName) + { + return null; + } + public void CreateNewUserInventory(LLUUID user) { }