aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Capabilities
diff options
context:
space:
mode:
authorTeravus Ovares2008-03-25 05:56:27 +0000
committerTeravus Ovares2008-03-25 05:56:27 +0000
commit301c25950d77c521f12bf75e90ea011c75c31aa3 (patch)
treea2700d83dae3078a3db0a9d6c2664d22e31e6670 /OpenSim/Framework/Communications/Capabilities
parentsvn:ignore monodevelop-generated files (diff)
downloadopensim-SC_OLD-301c25950d77c521f12bf75e90ea011c75c31aa3.zip
opensim-SC_OLD-301c25950d77c521f12bf75e90ea011c75c31aa3.tar.gz
opensim-SC_OLD-301c25950d77c521f12bf75e90ea011c75c31aa3.tar.bz2
opensim-SC_OLD-301c25950d77c521f12bf75e90ea011c75c31aa3.tar.xz
* Committing some voice related caps with hard coded responses so more debugging can occur.
Diffstat (limited to 'OpenSim/Framework/Communications/Capabilities')
-rw-r--r--OpenSim/Framework/Communications/Capabilities/Caps.cs99
-rw-r--r--OpenSim/Framework/Communications/Capabilities/LLSDCapsDetails.cs4
2 files changed, 102 insertions, 1 deletions
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs
index fad4741..194407f 100644
--- a/OpenSim/Framework/Communications/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs
@@ -75,6 +75,8 @@ namespace OpenSim.Region.Capabilities
75 private string m_notecardUpdatePath = "0004/"; 75 private string m_notecardUpdatePath = "0004/";
76 private string m_notecardTaskUpdatePath = "0005/"; 76 private string m_notecardTaskUpdatePath = "0005/";
77 private string m_fetchInventoryPath = "0006/"; 77 private string m_fetchInventoryPath = "0006/";
78 private string m_parcelVoiceInfoRequestPath = "0007/";
79 private string m_provisionVoiceAccountRequestPath = "0008/";
78 80
79 //private string eventQueue = "0100/"; 81 //private string eventQueue = "0100/";
80 private BaseHttpServer m_httpListener; 82 private BaseHttpServer m_httpListener;
@@ -133,6 +135,8 @@ namespace OpenSim.Region.Capabilities
133 135
134 AddLegacyCapsHandler(m_httpListener, m_requestPath, CapsRequest); 136 AddLegacyCapsHandler(m_httpListener, m_requestPath, CapsRequest);
135 //AddLegacyCapsHandler(m_httpListener, m_requestTexture , RequestTexture); 137 //AddLegacyCapsHandler(m_httpListener, m_requestTexture , RequestTexture);
138 AddLegacyCapsHandler(m_httpListener, m_parcelVoiceInfoRequestPath, ParcelVoiceInfoRequest);
139 AddLegacyCapsHandler(m_httpListener, m_provisionVoiceAccountRequestPath, ProvisionVoiceAccountRequest);
136 AddLegacyCapsHandler(m_httpListener, m_notecardUpdatePath, NoteCardAgentInventory); 140 AddLegacyCapsHandler(m_httpListener, m_notecardUpdatePath, NoteCardAgentInventory);
137 AddLegacyCapsHandler(m_httpListener, m_notecardTaskUpdatePath, ScriptTaskInventory); 141 AddLegacyCapsHandler(m_httpListener, m_notecardTaskUpdatePath, ScriptTaskInventory);
138 AddLegacyCapsHandler(m_httpListener, m_fetchInventoryPath, FetchInventoryRequest); 142 AddLegacyCapsHandler(m_httpListener, m_fetchInventoryPath, FetchInventoryRequest);
@@ -184,6 +188,9 @@ namespace OpenSim.Region.Capabilities
184 caps.UpdateScriptAgentInventory = capsBaseUrl + m_notecardUpdatePath; 188 caps.UpdateScriptAgentInventory = capsBaseUrl + m_notecardUpdatePath;
185 caps.UpdateScriptTaskInventory = capsBaseUrl + m_notecardTaskUpdatePath; 189 caps.UpdateScriptTaskInventory = capsBaseUrl + m_notecardTaskUpdatePath;
186 caps.FetchInventoryDescendents = capsBaseUrl + m_fetchInventoryPath; 190 caps.FetchInventoryDescendents = capsBaseUrl + m_fetchInventoryPath;
191 caps.ParcelVoiceInfoRequest = capsBaseUrl + m_parcelVoiceInfoRequestPath;
192 caps.ProvisionVoiceAccountRequest = capsBaseUrl + m_provisionVoiceAccountRequestPath;
193
187 return caps; 194 return caps;
188 } 195 }
189 196
@@ -411,6 +418,98 @@ namespace OpenSim.Region.Capabilities
411 return null; 418 return null;
412 } 419 }
413 420
421
422 public string ParcelVoiceInfoRequest(string request, string path, string param)
423 {
424 try
425 {
426 m_log.DebugFormat("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param);
427
428 //Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request));
429 //LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate();
430 //LLSDHelpers.DeserialiseLLSDMap(hash, llsdUpdateRequest);
431
432 //string capsBase = "/CAPS/" + m_capsObjectPath;
433 //string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
434
435 //TaskInventoryScriptUpdater uploader =
436 //new TaskInventoryScriptUpdater(
437 //llsdUpdateRequest.item_id,
438 //llsdUpdateRequest.task_id,
439 //llsdUpdateRequest.is_script_running,
440 //capsBase + uploaderPath,
441 //m_httpListener,
442 //m_dumpAssetsToFile);
443 //uploader.OnUpLoad += TaskScriptUpdated;
444
445 //m_httpListener.AddStreamHandler(
446 //new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps));
447 //string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase +
448 //uploaderPath;
449
450 //LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse();
451 //uploadResponse.uploader = uploaderURL;
452 //uploadResponse.state = "upload";
453
454 // m_log.InfoFormat("[CAPS]: " +
455 // "ScriptTaskInventory response: {0}",
456 // LLSDHelpers.SerialiseLLSDReply(uploadResponse)));
457
458 return LLSDHelpers.SerialiseLLSDReply("<llsd><map><key>parcel_local_id</key><integer>16</integer><key>region_name</key><string>Limbo</string><key>voice_credentials</key><map><key>channel_uri</key><string>sip:confctl-49730-1@bhr.vivox.com</string></map></map></llsd>");
459 }
460 catch (Exception e)
461 {
462 m_log.Error("[CAPS]: " + e.ToString());
463 }
464
465 return null;
466 }
467
468 public string ProvisionVoiceAccountRequest(string request, string path, string param)
469 {
470 try
471 {
472 m_log.DebugFormat("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param);
473
474 //Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request));
475 //LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate();
476 //LLSDHelpers.DeserialiseLLSDMap(hash, llsdUpdateRequest);
477
478 //string capsBase = "/CAPS/" + m_capsObjectPath;
479 //string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
480
481 //TaskInventoryScriptUpdater uploader =
482 //new TaskInventoryScriptUpdater(
483 //llsdUpdateRequest.item_id,
484 //llsdUpdateRequest.task_id,
485 //llsdUpdateRequest.is_script_running,
486 //capsBase + uploaderPath,
487 //m_httpListener,
488 //m_dumpAssetsToFile);
489 //uploader.OnUpLoad += TaskScriptUpdated;
490
491 //m_httpListener.AddStreamHandler(
492 //new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps));
493 //string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase +
494 //uploaderPath;
495
496 //LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse();
497 //uploadResponse.uploader = uploaderURL;
498 //uploadResponse.state = "upload";
499
500 // m_log.InfoFormat("[CAPS]: " +
501 // "ScriptTaskInventory response: {0}",
502 // LLSDHelpers.SerialiseLLSDReply(uploadResponse)));
503
504 return LLSDHelpers.SerialiseLLSDReply("<llsd><map><key>events</key><array><map><key>body</key><map><key>major_version</key><integer>1</integer><key>minor_version</key><integer>0</integer><key>region_name</key><string>Cathedral</string></map><key>message</key><string>RequiredVoiceVersion</string></map></array><key>id</key><integer>152477222</integer></map></llsd>");
505 }
506 catch (Exception e)
507 {
508 m_log.Error("[CAPS]: " + e.ToString());
509 }
510
511 return null;
512 }
414 /// <summary> 513 /// <summary>
415 /// Called by the notecard update handler. Provides a URL to which the client can upload a new asset. 514 /// Called by the notecard update handler. Provides a URL to which the client can upload a new asset.
416 /// </summary> 515 /// </summary>
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDCapsDetails.cs b/OpenSim/Framework/Communications/Capabilities/LLSDCapsDetails.cs
index f9ab0ef..bd1c9da 100644
--- a/OpenSim/Framework/Communications/Capabilities/LLSDCapsDetails.cs
+++ b/OpenSim/Framework/Communications/Capabilities/LLSDCapsDetails.cs
@@ -40,8 +40,10 @@ namespace OpenSim.Region.Capabilities
40 public string UpdateNotecardAgentInventory = String.Empty; 40 public string UpdateNotecardAgentInventory = String.Empty;
41 public string UpdateScriptAgentInventory = String.Empty; 41 public string UpdateScriptAgentInventory = String.Empty;
42 public string UpdateScriptTaskInventory = String.Empty; 42 public string UpdateScriptTaskInventory = String.Empty;
43 // public string ParcelVoiceInfoRequest = String.Empty; 43 public string ParcelVoiceInfoRequest = String.Empty;
44 public string FetchInventoryDescendents = String.Empty; 44 public string FetchInventoryDescendents = String.Empty;
45 public string ProvisionVoiceAccountRequest = String.Empty;
46
45 47
46 public LLSDCapsDetails() 48 public LLSDCapsDetails()
47 { 49 {