From 301c25950d77c521f12bf75e90ea011c75c31aa3 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Tue, 25 Mar 2008 05:56:27 +0000 Subject: * Committing some voice related caps with hard coded responses so more debugging can occur. --- .../Framework/Communications/Capabilities/Caps.cs | 99 ++++++++++++++++++++++ 1 file changed, 99 insertions(+) (limited to 'OpenSim/Framework/Communications/Capabilities/Caps.cs') 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 private string m_notecardUpdatePath = "0004/"; private string m_notecardTaskUpdatePath = "0005/"; private string m_fetchInventoryPath = "0006/"; + private string m_parcelVoiceInfoRequestPath = "0007/"; + private string m_provisionVoiceAccountRequestPath = "0008/"; //private string eventQueue = "0100/"; private BaseHttpServer m_httpListener; @@ -133,6 +135,8 @@ namespace OpenSim.Region.Capabilities AddLegacyCapsHandler(m_httpListener, m_requestPath, CapsRequest); //AddLegacyCapsHandler(m_httpListener, m_requestTexture , RequestTexture); + AddLegacyCapsHandler(m_httpListener, m_parcelVoiceInfoRequestPath, ParcelVoiceInfoRequest); + AddLegacyCapsHandler(m_httpListener, m_provisionVoiceAccountRequestPath, ProvisionVoiceAccountRequest); AddLegacyCapsHandler(m_httpListener, m_notecardUpdatePath, NoteCardAgentInventory); AddLegacyCapsHandler(m_httpListener, m_notecardTaskUpdatePath, ScriptTaskInventory); AddLegacyCapsHandler(m_httpListener, m_fetchInventoryPath, FetchInventoryRequest); @@ -184,6 +188,9 @@ namespace OpenSim.Region.Capabilities caps.UpdateScriptAgentInventory = capsBaseUrl + m_notecardUpdatePath; caps.UpdateScriptTaskInventory = capsBaseUrl + m_notecardTaskUpdatePath; caps.FetchInventoryDescendents = capsBaseUrl + m_fetchInventoryPath; + caps.ParcelVoiceInfoRequest = capsBaseUrl + m_parcelVoiceInfoRequestPath; + caps.ProvisionVoiceAccountRequest = capsBaseUrl + m_provisionVoiceAccountRequestPath; + return caps; } @@ -411,6 +418,98 @@ namespace OpenSim.Region.Capabilities return null; } + + public string ParcelVoiceInfoRequest(string request, string path, string param) + { + try + { + m_log.DebugFormat("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param); + + //Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request)); + //LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate(); + //LLSDHelpers.DeserialiseLLSDMap(hash, llsdUpdateRequest); + + //string capsBase = "/CAPS/" + m_capsObjectPath; + //string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); + + //TaskInventoryScriptUpdater uploader = + //new TaskInventoryScriptUpdater( + //llsdUpdateRequest.item_id, + //llsdUpdateRequest.task_id, + //llsdUpdateRequest.is_script_running, + //capsBase + uploaderPath, + //m_httpListener, + //m_dumpAssetsToFile); + //uploader.OnUpLoad += TaskScriptUpdated; + + //m_httpListener.AddStreamHandler( + //new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); + //string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase + + //uploaderPath; + + //LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse(); + //uploadResponse.uploader = uploaderURL; + //uploadResponse.state = "upload"; + + // m_log.InfoFormat("[CAPS]: " + + // "ScriptTaskInventory response: {0}", + // LLSDHelpers.SerialiseLLSDReply(uploadResponse))); + + return LLSDHelpers.SerialiseLLSDReply("parcel_local_id16region_nameLimbovoice_credentialschannel_urisip:confctl-49730-1@bhr.vivox.com"); + } + catch (Exception e) + { + m_log.Error("[CAPS]: " + e.ToString()); + } + + return null; + } + + public string ProvisionVoiceAccountRequest(string request, string path, string param) + { + try + { + m_log.DebugFormat("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param); + + //Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request)); + //LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate(); + //LLSDHelpers.DeserialiseLLSDMap(hash, llsdUpdateRequest); + + //string capsBase = "/CAPS/" + m_capsObjectPath; + //string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); + + //TaskInventoryScriptUpdater uploader = + //new TaskInventoryScriptUpdater( + //llsdUpdateRequest.item_id, + //llsdUpdateRequest.task_id, + //llsdUpdateRequest.is_script_running, + //capsBase + uploaderPath, + //m_httpListener, + //m_dumpAssetsToFile); + //uploader.OnUpLoad += TaskScriptUpdated; + + //m_httpListener.AddStreamHandler( + //new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); + //string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase + + //uploaderPath; + + //LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse(); + //uploadResponse.uploader = uploaderURL; + //uploadResponse.state = "upload"; + + // m_log.InfoFormat("[CAPS]: " + + // "ScriptTaskInventory response: {0}", + // LLSDHelpers.SerialiseLLSDReply(uploadResponse))); + + return LLSDHelpers.SerialiseLLSDReply("eventsbodymajor_version1minor_version0region_nameCathedralmessageRequiredVoiceVersionid152477222"); + } + catch (Exception e) + { + m_log.Error("[CAPS]: " + e.ToString()); + } + + return null; + } /// /// Called by the notecard update handler. Provides a URL to which the client can upload a new asset. /// -- cgit v1.1