Implementing updateinventoryfolder: Should now be able to rename folders in inventory
parent
b7178ec241
commit
16903ec488
|
@ -127,6 +127,26 @@ namespace OpenSim.Framework.Communications.Cache
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void HandleUpdateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort type, string name, LLUUID parentID)
|
||||||
|
{
|
||||||
|
CachedUserInfo userProfile;
|
||||||
|
|
||||||
|
if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile))
|
||||||
|
{
|
||||||
|
if (userProfile.RootFolder != null)
|
||||||
|
{
|
||||||
|
InventoryFolderBase baseFolder = new InventoryFolderBase();
|
||||||
|
baseFolder.agentID = remoteClient.AgentId;
|
||||||
|
baseFolder.folderID = folderID;
|
||||||
|
baseFolder.name = name;
|
||||||
|
baseFolder.parentID = parentID;
|
||||||
|
baseFolder.type = (short)type;
|
||||||
|
baseFolder.version = userProfile.RootFolder.version;
|
||||||
|
m_parent.InventoryService.AddNewInventoryFolder(remoteClient.AgentId, baseFolder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Tell the client about the various child items and folders contained in the requested folder.
|
/// Tell the client about the various child items and folders contained in the requested folder.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -327,6 +327,9 @@ namespace OpenSim.Framework
|
||||||
public delegate void CreateInventoryFolder(
|
public delegate void CreateInventoryFolder(
|
||||||
IClientAPI remoteClient, LLUUID folderID, ushort folderType, string folderName, LLUUID parentID);
|
IClientAPI remoteClient, LLUUID folderID, ushort folderType, string folderName, LLUUID parentID);
|
||||||
|
|
||||||
|
public delegate void UpdateInventoryFolder(
|
||||||
|
IClientAPI remoteClient, LLUUID folderID, ushort type, string name, LLUUID parentID);
|
||||||
|
|
||||||
public delegate void CreateNewInventoryItem(
|
public delegate void CreateNewInventoryItem(
|
||||||
IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID, uint callbackID, string description, string name,
|
IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID, uint callbackID, string description, string name,
|
||||||
sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask);
|
sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask);
|
||||||
|
@ -428,6 +431,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
event CreateNewInventoryItem OnCreateNewInventoryItem;
|
event CreateNewInventoryItem OnCreateNewInventoryItem;
|
||||||
event CreateInventoryFolder OnCreateNewInventoryFolder;
|
event CreateInventoryFolder OnCreateNewInventoryFolder;
|
||||||
|
event UpdateInventoryFolder OnUpdateInventoryFolder;
|
||||||
event FetchInventoryDescendents OnFetchInventoryDescendents;
|
event FetchInventoryDescendents OnFetchInventoryDescendents;
|
||||||
event PurgeInventoryDescendents OnPurgeInventoryDescendents;
|
event PurgeInventoryDescendents OnPurgeInventoryDescendents;
|
||||||
event FetchInventory OnFetchInventory;
|
event FetchInventory OnFetchInventory;
|
||||||
|
|
|
@ -430,6 +430,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
|
|
||||||
public event CreateNewInventoryItem OnCreateNewInventoryItem;
|
public event CreateNewInventoryItem OnCreateNewInventoryItem;
|
||||||
public event CreateInventoryFolder OnCreateNewInventoryFolder;
|
public event CreateInventoryFolder OnCreateNewInventoryFolder;
|
||||||
|
public event UpdateInventoryFolder OnUpdateInventoryFolder;
|
||||||
public event FetchInventoryDescendents OnFetchInventoryDescendents;
|
public event FetchInventoryDescendents OnFetchInventoryDescendents;
|
||||||
public event PurgeInventoryDescendents OnPurgeInventoryDescendents;
|
public event PurgeInventoryDescendents OnPurgeInventoryDescendents;
|
||||||
public event FetchInventory OnFetchInventory;
|
public event FetchInventory OnFetchInventory;
|
||||||
|
@ -2809,6 +2810,19 @@ namespace OpenSim.Region.ClientStack
|
||||||
invFolder.FolderData.ParentID);
|
invFolder.FolderData.ParentID);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case PacketType.UpdateInventoryFolder:
|
||||||
|
if (OnUpdateInventoryFolder != null)
|
||||||
|
{
|
||||||
|
UpdateInventoryFolderPacket invFolder = (UpdateInventoryFolderPacket)Pack;
|
||||||
|
for (int i = 0; i < invFolder.FolderData.Length; i++)
|
||||||
|
{
|
||||||
|
OnUpdateInventoryFolder(this, invFolder.FolderData[i].FolderID,
|
||||||
|
(ushort)invFolder.FolderData[i].Type,
|
||||||
|
Util.FieldToString(invFolder.FolderData[i].Name),
|
||||||
|
invFolder.FolderData[i].ParentID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case PacketType.CreateInventoryItem:
|
case PacketType.CreateInventoryItem:
|
||||||
CreateInventoryItemPacket createItem = (CreateInventoryItemPacket) Pack;
|
CreateInventoryItemPacket createItem = (CreateInventoryItemPacket) Pack;
|
||||||
if (OnCreateNewInventoryItem != null)
|
if (OnCreateNewInventoryItem != null)
|
||||||
|
|
|
@ -1036,6 +1036,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
client.OnCreateNewInventoryItem += CreateNewInventoryItem;
|
client.OnCreateNewInventoryItem += CreateNewInventoryItem;
|
||||||
client.OnCreateNewInventoryFolder += CommsManager.UserProfileCacheService.HandleCreateInventoryFolder;
|
client.OnCreateNewInventoryFolder += CommsManager.UserProfileCacheService.HandleCreateInventoryFolder;
|
||||||
|
client.OnUpdateInventoryFolder += CommsManager.UserProfileCacheService.HandleUpdateInventoryFolder;
|
||||||
client.OnFetchInventoryDescendents += CommsManager.UserProfileCacheService.HandleFetchInventoryDescendents;
|
client.OnFetchInventoryDescendents += CommsManager.UserProfileCacheService.HandleFetchInventoryDescendents;
|
||||||
client.OnPurgeInventoryDescendents += CommsManager.UserProfileCacheService.HandlePurgeInventoryDescendents;
|
client.OnPurgeInventoryDescendents += CommsManager.UserProfileCacheService.HandlePurgeInventoryDescendents;
|
||||||
client.OnRequestTaskInventory += RequestTaskInventory;
|
client.OnRequestTaskInventory += RequestTaskInventory;
|
||||||
|
|
|
@ -107,6 +107,7 @@ namespace SimpleApp
|
||||||
|
|
||||||
public event CreateNewInventoryItem OnCreateNewInventoryItem;
|
public event CreateNewInventoryItem OnCreateNewInventoryItem;
|
||||||
public event CreateInventoryFolder OnCreateNewInventoryFolder;
|
public event CreateInventoryFolder OnCreateNewInventoryFolder;
|
||||||
|
public event UpdateInventoryFolder OnUpdateInventoryFolder;
|
||||||
public event FetchInventoryDescendents OnFetchInventoryDescendents;
|
public event FetchInventoryDescendents OnFetchInventoryDescendents;
|
||||||
public event PurgeInventoryDescendents OnPurgeInventoryDescendents;
|
public event PurgeInventoryDescendents OnPurgeInventoryDescendents;
|
||||||
public event FetchInventory OnFetchInventory;
|
public event FetchInventory OnFetchInventory;
|
||||||
|
|
Loading…
Reference in New Issue