aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs20
-rw-r--r--OpenSim/Framework/IClientAPI.cs4
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs14
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs1
-rw-r--r--OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs1
5 files changed, 40 insertions, 0 deletions
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
index 70aec47..32d941c 100644
--- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
+++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs
@@ -127,6 +127,26 @@ namespace OpenSim.Framework.Communications.Cache
127 } 127 }
128 } 128 }
129 129
130 public void HandleUpdateInventoryFolder(IClientAPI remoteClient, LLUUID folderID, ushort type, string name, LLUUID parentID)
131 {
132 CachedUserInfo userProfile;
133
134 if (m_userProfiles.TryGetValue(remoteClient.AgentId, out userProfile))
135 {
136 if (userProfile.RootFolder != null)
137 {
138 InventoryFolderBase baseFolder = new InventoryFolderBase();
139 baseFolder.agentID = remoteClient.AgentId;
140 baseFolder.folderID = folderID;
141 baseFolder.name = name;
142 baseFolder.parentID = parentID;
143 baseFolder.type = (short)type;
144 baseFolder.version = userProfile.RootFolder.version;
145 m_parent.InventoryService.AddNewInventoryFolder(remoteClient.AgentId, baseFolder);
146 }
147 }
148 }
149
130 /// <summary> 150 /// <summary>
131 /// Tell the client about the various child items and folders contained in the requested folder. 151 /// Tell the client about the various child items and folders contained in the requested folder.
132 /// </summary> 152 /// </summary>
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 98c7a18..8075d0d 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -327,6 +327,9 @@ namespace OpenSim.Framework
327 public delegate void CreateInventoryFolder( 327 public delegate void CreateInventoryFolder(
328 IClientAPI remoteClient, LLUUID folderID, ushort folderType, string folderName, LLUUID parentID); 328 IClientAPI remoteClient, LLUUID folderID, ushort folderType, string folderName, LLUUID parentID);
329 329
330 public delegate void UpdateInventoryFolder(
331 IClientAPI remoteClient, LLUUID folderID, ushort type, string name, LLUUID parentID);
332
330 public delegate void CreateNewInventoryItem( 333 public delegate void CreateNewInventoryItem(
331 IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID, uint callbackID, string description, string name, 334 IClientAPI remoteClient, LLUUID transActionID, LLUUID folderID, uint callbackID, string description, string name,
332 sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask); 335 sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask);
@@ -428,6 +431,7 @@ namespace OpenSim.Framework
428 431
429 event CreateNewInventoryItem OnCreateNewInventoryItem; 432 event CreateNewInventoryItem OnCreateNewInventoryItem;
430 event CreateInventoryFolder OnCreateNewInventoryFolder; 433 event CreateInventoryFolder OnCreateNewInventoryFolder;
434 event UpdateInventoryFolder OnUpdateInventoryFolder;
431 event FetchInventoryDescendents OnFetchInventoryDescendents; 435 event FetchInventoryDescendents OnFetchInventoryDescendents;
432 event PurgeInventoryDescendents OnPurgeInventoryDescendents; 436 event PurgeInventoryDescendents OnPurgeInventoryDescendents;
433 event FetchInventory OnFetchInventory; 437 event FetchInventory OnFetchInventory;
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index db25ee6..a94c5da 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -430,6 +430,7 @@ namespace OpenSim.Region.ClientStack
430 430
431 public event CreateNewInventoryItem OnCreateNewInventoryItem; 431 public event CreateNewInventoryItem OnCreateNewInventoryItem;
432 public event CreateInventoryFolder OnCreateNewInventoryFolder; 432 public event CreateInventoryFolder OnCreateNewInventoryFolder;
433 public event UpdateInventoryFolder OnUpdateInventoryFolder;
433 public event FetchInventoryDescendents OnFetchInventoryDescendents; 434 public event FetchInventoryDescendents OnFetchInventoryDescendents;
434 public event PurgeInventoryDescendents OnPurgeInventoryDescendents; 435 public event PurgeInventoryDescendents OnPurgeInventoryDescendents;
435 public event FetchInventory OnFetchInventory; 436 public event FetchInventory OnFetchInventory;
@@ -2809,6 +2810,19 @@ namespace OpenSim.Region.ClientStack
2809 invFolder.FolderData.ParentID); 2810 invFolder.FolderData.ParentID);
2810 } 2811 }
2811 break; 2812 break;
2813 case PacketType.UpdateInventoryFolder:
2814 if (OnUpdateInventoryFolder != null)
2815 {
2816 UpdateInventoryFolderPacket invFolder = (UpdateInventoryFolderPacket)Pack;
2817 for (int i = 0; i < invFolder.FolderData.Length; i++)
2818 {
2819 OnUpdateInventoryFolder(this, invFolder.FolderData[i].FolderID,
2820 (ushort)invFolder.FolderData[i].Type,
2821 Util.FieldToString(invFolder.FolderData[i].Name),
2822 invFolder.FolderData[i].ParentID);
2823 }
2824 }
2825 break;
2812 case PacketType.CreateInventoryItem: 2826 case PacketType.CreateInventoryItem:
2813 CreateInventoryItemPacket createItem = (CreateInventoryItemPacket) Pack; 2827 CreateInventoryItemPacket createItem = (CreateInventoryItemPacket) Pack;
2814 if (OnCreateNewInventoryItem != null) 2828 if (OnCreateNewInventoryItem != null)
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index d808a88..fd743c9 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1036,6 +1036,7 @@ namespace OpenSim.Region.Environment.Scenes
1036 1036
1037 client.OnCreateNewInventoryItem += CreateNewInventoryItem; 1037 client.OnCreateNewInventoryItem += CreateNewInventoryItem;
1038 client.OnCreateNewInventoryFolder += CommsManager.UserProfileCacheService.HandleCreateInventoryFolder; 1038 client.OnCreateNewInventoryFolder += CommsManager.UserProfileCacheService.HandleCreateInventoryFolder;
1039 client.OnUpdateInventoryFolder += CommsManager.UserProfileCacheService.HandleUpdateInventoryFolder;
1039 client.OnFetchInventoryDescendents += CommsManager.UserProfileCacheService.HandleFetchInventoryDescendents; 1040 client.OnFetchInventoryDescendents += CommsManager.UserProfileCacheService.HandleFetchInventoryDescendents;
1040 client.OnPurgeInventoryDescendents += CommsManager.UserProfileCacheService.HandlePurgeInventoryDescendents; 1041 client.OnPurgeInventoryDescendents += CommsManager.UserProfileCacheService.HandlePurgeInventoryDescendents;
1041 client.OnRequestTaskInventory += RequestTaskInventory; 1042 client.OnRequestTaskInventory += RequestTaskInventory;
diff --git a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
index 530b933..9864074 100644
--- a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
@@ -107,6 +107,7 @@ namespace SimpleApp
107 107
108 public event CreateNewInventoryItem OnCreateNewInventoryItem; 108 public event CreateNewInventoryItem OnCreateNewInventoryItem;
109 public event CreateInventoryFolder OnCreateNewInventoryFolder; 109 public event CreateInventoryFolder OnCreateNewInventoryFolder;
110 public event UpdateInventoryFolder OnUpdateInventoryFolder;
110 public event FetchInventoryDescendents OnFetchInventoryDescendents; 111 public event FetchInventoryDescendents OnFetchInventoryDescendents;
111 public event PurgeInventoryDescendents OnPurgeInventoryDescendents; 112 public event PurgeInventoryDescendents OnPurgeInventoryDescendents;
112 public event FetchInventory OnFetchInventory; 113 public event FetchInventory OnFetchInventory;