diff options
Diffstat (limited to 'OpenSim/Framework/Communications/Capabilities/Caps.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Capabilities/Caps.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index ad3d79d..d794db3 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs | |||
@@ -208,7 +208,15 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
208 | 208 | ||
209 | // FIXME: these all should probably go into the respective region | 209 | // FIXME: these all should probably go into the respective region |
210 | // modules | 210 | // modules |
211 | |||
212 | /// <summary> | ||
213 | /// Processes a fetch inventory request and sends the reply | ||
211 | 214 | ||
215 | /// </summary> | ||
216 | /// <param name="request"></param> | ||
217 | /// <param name="path"></param> | ||
218 | /// <param name="param"></param> | ||
219 | /// <returns></returns> | ||
212 | // Request is like: | 220 | // Request is like: |
213 | //<llsd> | 221 | //<llsd> |
214 | // <map><key>folders</key> | 222 | // <map><key>folders</key> |
@@ -255,8 +263,10 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
255 | inventoryitemstr = LLSDHelpers.SerialiseLLSDReply(reply); | 263 | inventoryitemstr = LLSDHelpers.SerialiseLLSDReply(reply); |
256 | inventoryitemstr = inventoryitemstr.Replace("<llsd><map><key>folders</key><array>", ""); | 264 | inventoryitemstr = inventoryitemstr.Replace("<llsd><map><key>folders</key><array>", ""); |
257 | inventoryitemstr = inventoryitemstr.Replace("</array></map></llsd>", ""); | 265 | inventoryitemstr = inventoryitemstr.Replace("</array></map></llsd>", ""); |
266 | |||
258 | response += inventoryitemstr; | 267 | response += inventoryitemstr; |
259 | } | 268 | } |
269 | |||
260 | if (response.Length == 0) | 270 | if (response.Length == 0) |
261 | { | 271 | { |
262 | // Ter-guess: If requests fail a lot, the client seems to stop requesting descendants. | 272 | // Ter-guess: If requests fail a lot, the client seems to stop requesting descendants. |
@@ -276,6 +286,11 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
276 | return response; | 286 | return response; |
277 | } | 287 | } |
278 | 288 | ||
289 | /// <summary> | ||
290 | /// Construct an LLSD reply packet to a CAPS inventory request | ||
291 | /// </summary> | ||
292 | /// <param name="invFetch"></param> | ||
293 | /// <returns></returns> | ||
279 | private LLSDInventoryDescendents FetchInventoryReply(LLSDFetchInventoryDescendents invFetch) | 294 | private LLSDInventoryDescendents FetchInventoryReply(LLSDFetchInventoryDescendents invFetch) |
280 | { | 295 | { |
281 | LLSDInventoryDescendents reply = new LLSDInventoryDescendents(); | 296 | LLSDInventoryDescendents reply = new LLSDInventoryDescendents(); |
@@ -333,6 +348,11 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
333 | return reply; | 348 | return reply; |
334 | } | 349 | } |
335 | 350 | ||
351 | /// <summary> | ||
352 | /// Convert an internal inventory item object into an LLSD object. | ||
353 | /// </summary> | ||
354 | /// <param name="invItem"></param> | ||
355 | /// <returns></returns> | ||
336 | private LLSDInventoryItem ConvertInventoryItem(InventoryItemBase invItem) | 356 | private LLSDInventoryItem ConvertInventoryItem(InventoryItemBase invItem) |
337 | { | 357 | { |
338 | LLSDInventoryItem llsdItem = new LLSDInventoryItem(); | 358 | LLSDInventoryItem llsdItem = new LLSDInventoryItem(); |