Small refactoring in Caps, no functional changes.

0.6.5-rc1
diva 2009-03-26 16:05:00 +00:00
parent 706a2df516
commit 28d9a73521
1 changed files with 25 additions and 5 deletions

View File

@ -153,6 +153,13 @@ namespace OpenSim.Framework.Communications.Capabilities
string capsBase = "/CAPS/" + m_capsObjectPath; string capsBase = "/CAPS/" + m_capsObjectPath;
RegisterRegionServiceHandlers(capsBase);
RegisterInventoryServiceHandlers(capsBase);
}
public void RegisterRegionServiceHandlers(string capsBase)
{
try try
{ {
// the root of all evil // the root of all evil
@ -164,6 +171,22 @@ namespace OpenSim.Framework.Communications.Capabilities
// new LLSDStreamhandler<OSDMapRequest, OSDMapLayerResponse>("POST", // new LLSDStreamhandler<OSDMapRequest, OSDMapLayerResponse>("POST",
// capsBase + m_mapLayerPath, // capsBase + m_mapLayerPath,
// GetMapLayer); // GetMapLayer);
m_capsHandlers["UpdateScriptTaskInventory"] =
new RestStreamHandler("POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory);
m_capsHandlers["UpdateScriptTask"] = m_capsHandlers["UpdateScriptTaskInventory"];
}
catch (Exception e)
{
m_log.Error("[CAPS]: " + e.ToString());
}
}
public void RegisterInventoryServiceHandlers(string capsBase)
{
try
{
// I don't think this one works...
m_capsHandlers["NewFileAgentInventory"] = m_capsHandlers["NewFileAgentInventory"] =
new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>("POST", new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>("POST",
capsBase + m_newInventory, capsBase + m_newInventory,
@ -171,10 +194,7 @@ namespace OpenSim.Framework.Communications.Capabilities
m_capsHandlers["UpdateNotecardAgentInventory"] = m_capsHandlers["UpdateNotecardAgentInventory"] =
new RestStreamHandler("POST", capsBase + m_notecardUpdatePath, NoteCardAgentInventory); new RestStreamHandler("POST", capsBase + m_notecardUpdatePath, NoteCardAgentInventory);
m_capsHandlers["UpdateScriptAgentInventory"] = m_capsHandlers["UpdateNotecardAgentInventory"]; m_capsHandlers["UpdateScriptAgentInventory"] = m_capsHandlers["UpdateNotecardAgentInventory"];
m_capsHandlers["UpdateScriptTaskInventory"] =
new RestStreamHandler("POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory);
m_capsHandlers["UpdateScriptAgent"] = m_capsHandlers["UpdateScriptAgentInventory"]; m_capsHandlers["UpdateScriptAgent"] = m_capsHandlers["UpdateScriptAgentInventory"];
m_capsHandlers["UpdateScriptTask"] = m_capsHandlers["UpdateScriptTaskInventory"];
// justincc: I've disabled the CAPS service for now to fix problems with selecting textures, and // justincc: I've disabled the CAPS service for now to fix problems with selecting textures, and
// subsequent inventory breakage, in the edit object pane (such as mantis 1085). This requires // subsequent inventory breakage, in the edit object pane (such as mantis 1085). This requires