aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Server')
-rw-r--r--OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
index 4f01e36..cf0762b 100644
--- a/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
+++ b/OpenSim/Server/Handlers/Inventory/XInventoryInConnector.cs
@@ -149,6 +149,8 @@ namespace OpenSim.Server.Handlers.Inventory
149 return HandleDeleteItems(request); 149 return HandleDeleteItems(request);
150 case "GETITEM": 150 case "GETITEM":
151 return HandleGetItem(request); 151 return HandleGetItem(request);
152 case "GETMULTIPLEITEMS":
153 return HandleGetMultipleItems(request);
152 case "GETFOLDER": 154 case "GETFOLDER":
153 return HandleGetFolder(request); 155 return HandleGetFolder(request);
154 case "GETACTIVEGESTURES": 156 case "GETACTIVEGESTURES":
@@ -576,6 +578,40 @@ namespace OpenSim.Server.Handlers.Inventory
576 return Util.UTF8NoBomEncoding.GetBytes(xmlString); 578 return Util.UTF8NoBomEncoding.GetBytes(xmlString);
577 } 579 }
578 580
581 byte[] HandleGetMultipleItems(Dictionary<string, object> request)
582 {
583 Dictionary<string, object> resultSet = new Dictionary<string, object>();
584 UUID principal = UUID.Zero;
585 UUID.TryParse(request["PRINCIPAL"].ToString(), out principal);
586 string itemIDstr = request["ITEMS"].ToString();
587 int count = 0;
588 Int32.TryParse(request["COUNT"].ToString(), out count);
589
590 UUID[] fids = new UUID[count];
591 string[] uuids = itemIDstr.Split(',');
592 int i = 0;
593 foreach (string id in uuids)
594 {
595 UUID fid = UUID.Zero;
596 if (UUID.TryParse(id, out fid))
597 fids[i] = fid;
598 i += 1;
599 }
600
601 InventoryItemBase[] itemsList = m_InventoryService.GetMultipleItems(principal, fids);
602 if (itemsList != null && itemsList.Length > 0)
603 {
604 count = 0;
605 foreach (InventoryItemBase item in itemsList)
606 resultSet["item_" + count++] = (item == null) ? (object)"NULL" : EncodeItem(item);
607 }
608
609 string xmlString = ServerUtils.BuildXmlResponse(resultSet);
610
611 //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
612 return Util.UTF8NoBomEncoding.GetBytes(xmlString);
613 }
614
579 byte[] HandleGetFolder(Dictionary<string,object> request) 615 byte[] HandleGetFolder(Dictionary<string,object> request)
580 { 616 {
581 Dictionary<string, object> result = new Dictionary<string, object>(); 617 Dictionary<string, object> result = new Dictionary<string, object>();