* Refactor: Remove unused inventory methods, some of which weren't properly implemented anyway.

0.6.0-stable
Justin Clarke Casey 2008-03-29 23:07:48 +00:00
parent 7722a87b69
commit a6999f8a5d
6 changed files with 16 additions and 73 deletions

View File

@ -80,14 +80,6 @@ namespace OpenSim.Framework.Communications
/// <returns>null if no root folder was found</returns>
InventoryFolderBase RequestRootFolder(LLUUID userID);
/// <summary>
/// Returns the root folder plus any folders in root (so down one level in the Inventory folders tree)
/// for the given user.
/// </summary>
/// <param name="userID"></param>
/// <returns></returns>
List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID);
/// <summary>
/// Returns a list of all the folders in a given user's inventory.
/// </summary>
@ -95,13 +87,5 @@ namespace OpenSim.Framework.Communications
/// <returns>A flat list of the user's inventory folder tree.
/// Null if there is no inventory for this user</returns>
List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId);
/// <summary>
/// Returns the named folder in that users inventory, returns null if folder is not found.
/// </summary>
/// <param name="userID"></param>
/// <param name="folderName"></param>
/// <returns></returns>
InventoryFolderBase RequestNamedFolder(LLUUID userID, string folderName);
}
}

View File

@ -77,28 +77,11 @@ namespace OpenSim.Framework.Communications
#region IInventoryServices methods
/// <summary>
/// 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.
/// </summary>
/// <param name="rawUserID"></param>
/// <param name="userID"></param>
/// <returns></returns>
public List<InventoryFolderBase> RequestFirstLevelFolders(Guid rawUserID)
{
LLUUID userID = new LLUUID(rawUserID);
return RequestFirstLevelFolders(userID);
}
/// <summary>
/// Guid to UUID wrapper for same name IInventoryServices method
/// </summary>
/// <param name="rawUserID"></param>
/// <returns></returns>
public List<InventoryFolderBase> GetInventorySkeleton(Guid rawUserID)
{
LLUUID userID = new LLUUID(rawUserID);
return GetInventorySkeleton(userID);
}
// See IInventoryServices
public List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID)
{
List<InventoryFolderBase> inventoryList = new List<InventoryFolderBase>();
@ -175,12 +158,6 @@ namespace OpenSim.Framework.Communications
return null;
}
// See IInventoryServices
public virtual InventoryFolderBase RequestNamedFolder(LLUUID userID, string folderName)
{
return null;
}
// See IInventoryServices
public void CreateNewUserInventory(LLUUID user)
{

View File

@ -137,6 +137,17 @@ namespace OpenSim.Grid.InventoryServer
return invCollection;
}
/// <summary>
/// Guid to UUID wrapper for same name IInventoryServices method
/// </summary>
/// <param name="rawUserID"></param>
/// <returns></returns>
public List<InventoryFolderBase> GetInventorySkeleton(Guid rawUserID)
{
LLUUID userID = new LLUUID(rawUserID);
return GetInventorySkeleton(userID);
}
public bool CreateUsersInventory(Guid rawUserID)
{
LLUUID userID = new LLUUID(rawUserID);

View File

@ -42,7 +42,6 @@ namespace OpenSim.Region.Communications.Local
public override void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack,
InventoryItemInfo itemCallBack)
{
//List<InventoryFolderBase> folders = RequestFirstLevelFolders(userID);
List<InventoryFolderBase> folders = GetInventorySkeleton(userID);
InventoryFolderImpl rootFolder = null;
@ -101,24 +100,6 @@ namespace OpenSim.Region.Communications.Local
}
}
public override InventoryFolderBase RequestNamedFolder(LLUUID userID, string folderName)
{
List<InventoryFolderBase> 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;
}
/// <summary>
/// Send the given inventory folder and its item contents back to the requester.
/// </summary>

View File

@ -216,7 +216,7 @@ namespace OpenSim.Region.Communications.Local
protected override InventoryData GetInventorySkeleton(LLUUID userID)
{
List<InventoryFolderBase> folders = m_Parent.InventoryService.GetInventorySkeleton(userID);
//List<InventoryFolderBase> folders = m_Parent.InventoryService.RequestFirstLevelFolders(userID);
if (folders.Count > 0)
{
LLUUID rootID = LLUUID.Zero;

View File

@ -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<InventoryFolderBase>();
}
public List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID)
{
return new List<InventoryFolderBase>();
}
#endregion
public class InventoryRequest