diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 57 |
1 files changed, 36 insertions, 21 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 8241e07..61b9045 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | |||
@@ -248,7 +248,19 @@ namespace OpenSim.Region.ClientStack.Linden | |||
248 | //m_capsHandlers["MapLayer"] = | 248 | //m_capsHandlers["MapLayer"] = |
249 | // new LLSDStreamhandler<OSDMapRequest, OSDMapLayerResponse>("POST", | 249 | // new LLSDStreamhandler<OSDMapRequest, OSDMapLayerResponse>("POST", |
250 | // capsBase + m_mapLayerPath, | 250 | // capsBase + m_mapLayerPath, |
251 | // GetMapLayer); | 251 | // GetMapLayer); |
252 | |||
253 | IRequestHandler getObjectPhysicsDataHandler | ||
254 | = new RestStreamHandler( | ||
255 | "POST", capsBase + m_getObjectPhysicsDataPath, GetObjectPhysicsData, "GetObjectPhysicsData", null); | ||
256 | m_HostCapsObj.RegisterHandler("GetObjectPhysicsData", getObjectPhysicsDataHandler); | ||
257 | |||
258 | IRequestHandler getObjectCostHandler = new RestStreamHandler("POST", capsBase + m_getObjectCostPath, GetObjectCost); | ||
259 | m_HostCapsObj.RegisterHandler("GetObjectCost", getObjectCostHandler); | ||
260 | IRequestHandler ResourceCostSelectedHandler = new RestStreamHandler("POST", capsBase + m_ResourceCostSelectedPath, ResourceCostSelected); | ||
261 | m_HostCapsObj.RegisterHandler("ResourceCostSelected", ResourceCostSelectedHandler); | ||
262 | |||
263 | |||
252 | IRequestHandler req | 264 | IRequestHandler req |
253 | = new RestStreamHandler( | 265 | = new RestStreamHandler( |
254 | "POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory, "UpdateScript", null); | 266 | "POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory, "UpdateScript", null); |
@@ -282,13 +294,12 @@ namespace OpenSim.Region.ClientStack.Linden | |||
282 | m_HostCapsObj.RegisterHandler("UpdateNotecardAgentInventory", req); | 294 | m_HostCapsObj.RegisterHandler("UpdateNotecardAgentInventory", req); |
283 | m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req); | 295 | m_HostCapsObj.RegisterHandler("UpdateScriptAgentInventory", req); |
284 | m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req); | 296 | m_HostCapsObj.RegisterHandler("UpdateScriptAgent", req); |
285 | IRequestHandler getObjectPhysicsDataHandler = new RestStreamHandler("POST", capsBase + m_getObjectPhysicsDataPath, GetObjectPhysicsData); | 297 | |
286 | m_HostCapsObj.RegisterHandler("GetObjectPhysicsData", getObjectPhysicsDataHandler); | 298 | |
287 | IRequestHandler getObjectCostHandler = new RestStreamHandler("POST", capsBase + m_getObjectCostPath, GetObjectCost); | 299 | |
288 | m_HostCapsObj.RegisterHandler("GetObjectCost", getObjectCostHandler); | 300 | IRequestHandler UpdateAgentInformationHandler |
289 | IRequestHandler ResourceCostSelectedHandler = new RestStreamHandler("POST", capsBase + m_ResourceCostSelectedPath, ResourceCostSelected); | 301 | = new RestStreamHandler( |
290 | m_HostCapsObj.RegisterHandler("ResourceCostSelected", ResourceCostSelectedHandler); | 302 | "POST", capsBase + m_UpdateAgentInformationPath, UpdateAgentInformation, "UpdateAgentInformation", null); |
291 | IRequestHandler UpdateAgentInformationHandler = new RestStreamHandler("POST", capsBase + m_UpdateAgentInformationPath, UpdateAgentInformation); | ||
292 | m_HostCapsObj.RegisterHandler("UpdateAgentInformation", UpdateAgentInformationHandler); | 303 | m_HostCapsObj.RegisterHandler("UpdateAgentInformation", UpdateAgentInformationHandler); |
293 | 304 | ||
294 | m_HostCapsObj.RegisterHandler( | 305 | m_HostCapsObj.RegisterHandler( |
@@ -361,18 +372,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
361 | foreach (OSD c in capsRequested) | 372 | foreach (OSD c in capsRequested) |
362 | validCaps.Add(c.AsString()); | 373 | validCaps.Add(c.AsString()); |
363 | 374 | ||
364 | Hashtable caps = m_HostCapsObj.CapsHandlers.GetCapsDetails(true, validCaps); | 375 | string result = LLSDHelpers.SerialiseLLSDReply(m_HostCapsObj.GetCapsDetails(true, validCaps)); |
365 | |||
366 | // Add the external too | ||
367 | foreach (KeyValuePair<string, string> kvp in m_HostCapsObj.ExternalCapsHandlers) | ||
368 | { | ||
369 | if (!validCaps.Contains(kvp.Key)) | ||
370 | continue; | ||
371 | |||
372 | caps[kvp.Key] = kvp.Value; | ||
373 | } | ||
374 | |||
375 | string result = LLSDHelpers.SerialiseLLSDReply(caps); | ||
376 | 376 | ||
377 | //m_log.DebugFormat("[CAPS] CapsRequest {0}", result); | 377 | //m_log.DebugFormat("[CAPS] CapsRequest {0}", result); |
378 | 378 | ||
@@ -748,6 +748,10 @@ namespace OpenSim.Region.ClientStack.Linden | |||
748 | inType = (sbyte)InventoryType.Sound; | 748 | inType = (sbyte)InventoryType.Sound; |
749 | assType = (sbyte)AssetType.Sound; | 749 | assType = (sbyte)AssetType.Sound; |
750 | } | 750 | } |
751 | else if (inventoryType == "snapshot") | ||
752 | { | ||
753 | inType = (sbyte)InventoryType.Snapshot; | ||
754 | } | ||
751 | else if (inventoryType == "animation") | 755 | else if (inventoryType == "animation") |
752 | { | 756 | { |
753 | inType = (sbyte)InventoryType.Animation; | 757 | inType = (sbyte)InventoryType.Animation; |
@@ -1380,6 +1384,17 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1380 | 1384 | ||
1381 | resp[uuid.ToString()] = object_data; | 1385 | resp[uuid.ToString()] = object_data; |
1382 | } | 1386 | } |
1387 | else | ||
1388 | { | ||
1389 | OSDMap object_data = new OSDMap(); | ||
1390 | object_data["linked_set_resource_cost"] = 0; | ||
1391 | object_data["resource_cost"] = 0; | ||
1392 | object_data["physics_cost"] = 0; | ||
1393 | object_data["linked_set_physics_cost"] = 0; | ||
1394 | |||
1395 | resp[uuid.ToString()] = object_data; | ||
1396 | } | ||
1397 | |||
1383 | } | 1398 | } |
1384 | } | 1399 | } |
1385 | 1400 | ||
@@ -1444,7 +1459,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
1444 | } | 1459 | } |
1445 | } | 1460 | } |
1446 | 1461 | ||
1447 | if (simul != 0) | 1462 | // if (simul != 0) |
1448 | { | 1463 | { |
1449 | OSDMap object_data = new OSDMap(); | 1464 | OSDMap object_data = new OSDMap(); |
1450 | 1465 | ||