aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie Thielker2009-05-13 03:09:30 +0000
committerMelanie Thielker2009-05-13 03:09:30 +0000
commitba8850f25446fafd0fe49b80be84a25d06303d65 (patch)
treec2389294796ffa5e32bf6039871aca1a0ca009bc /OpenSim
parentAdd a skeleton for the LSLHttpServer (diff)
downloadopensim-SC_OLD-ba8850f25446fafd0fe49b80be84a25d06303d65.zip
opensim-SC_OLD-ba8850f25446fafd0fe49b80be84a25d06303d65.tar.gz
opensim-SC_OLD-ba8850f25446fafd0fe49b80be84a25d06303d65.tar.bz2
opensim-SC_OLD-ba8850f25446fafd0fe49b80be84a25d06303d65.tar.xz
Plumb request and return URL functions.
Implements llRequestURL, llRequestSecureURL, llReleaseURL
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs11
-rw-r--r--OpenSim/Region/Framework/Interfaces/IUrlModule.cs5
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs13
3 files changed, 22 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
index 457de99..a79975c 100644
--- a/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs
@@ -92,12 +92,14 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
92 { 92 {
93 } 93 }
94 94
95 public void RequestURL(IScriptModule engine, SceneObjectPart host, UUID itemID) 95 public UUID RequestURL(IScriptModule engine, SceneObjectPart host, UUID itemID)
96 { 96 {
97 return UUID.Zero;
97 } 98 }
98 99
99 public void RequestSecureURL(IScriptModule engine, SceneObjectPart host, UUID itemID) 100 public UUID RequestSecureURL(IScriptModule engine, SceneObjectPart host, UUID itemID)
100 { 101 {
102 return UUID.Zero;
101 } 103 }
102 104
103 public void ReleaseURL(string url) 105 public void ReleaseURL(string url)
@@ -112,5 +114,10 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
112 { 114 {
113 return String.Empty; 115 return String.Empty;
114 } 116 }
117
118 public int GetFreeUrls()
119 {
120 return 0;
121 }
115 } 122 }
116} 123}
diff --git a/OpenSim/Region/Framework/Interfaces/IUrlModule.cs b/OpenSim/Region/Framework/Interfaces/IUrlModule.cs
index 494a223..fcf9228 100644
--- a/OpenSim/Region/Framework/Interfaces/IUrlModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IUrlModule.cs
@@ -34,10 +34,11 @@ namespace OpenSim.Region.Framework.Interfaces
34{ 34{
35 public interface IUrlModule 35 public interface IUrlModule
36 { 36 {
37 void RequestURL(IScriptModule engine, SceneObjectPart host, UUID itemID); 37 UUID RequestURL(IScriptModule engine, SceneObjectPart host, UUID itemID);
38 void RequestSecureURL(IScriptModule engine, SceneObjectPart host, UUID itemID); 38 UUID RequestSecureURL(IScriptModule engine, SceneObjectPart host, UUID itemID);
39 void ReleaseURL(string url); 39 void ReleaseURL(string url);
40 void HttpResponse(UUID request, int status, string body); 40 void HttpResponse(UUID request, int status, string body);
41 string GetHttpHeader(UUID request, string header); 41 string GetHttpHeader(UUID request, string header);
42 int GetFreeUrls();
42 } 43 }
43} 44}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index a6080d6..cdb91fb 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -82,6 +82,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
82 private bool m_automaticLinkPermission=false; 82 private bool m_automaticLinkPermission=false;
83 private IMessageTransferModule m_TransferModule = null; 83 private IMessageTransferModule m_TransferModule = null;
84 private int m_notecardLineReadCharsMax = 255; 84 private int m_notecardLineReadCharsMax = 255;
85 private IUrlModule m_UrlModule = null;
85 86
86 //private static readonly ILog m_log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 87 //private static readonly ILog m_log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
87 88
@@ -107,6 +108,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
107 108
108 m_TransferModule = 109 m_TransferModule =
109 m_ScriptEngine.World.RequestModuleInterface<IMessageTransferModule>(); 110 m_ScriptEngine.World.RequestModuleInterface<IMessageTransferModule>();
111 m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>();
112
110 AsyncCommands = new AsyncCommandManager(ScriptEngine); 113 AsyncCommands = new AsyncCommandManager(ScriptEngine);
111 } 114 }
112 115
@@ -2700,7 +2703,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2700 public void llReleaseURL(string url) 2703 public void llReleaseURL(string url)
2701 { 2704 {
2702 m_host.AddScriptLPS(1); 2705 m_host.AddScriptLPS(1);
2703 NotImplemented("llReleaseURL"); 2706 if (m_UrlModule != null)
2707 m_UrlModule.ReleaseURL(url);
2704 } 2708 }
2705 2709
2706 public void llAttachToAvatar(int attachment) 2710 public void llAttachToAvatar(int attachment)
@@ -8030,7 +8034,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8030 public LSL_String llRequestSecureURL() 8034 public LSL_String llRequestSecureURL()
8031 { 8035 {
8032 m_host.AddScriptLPS(1); 8036 m_host.AddScriptLPS(1);
8033 NotImplemented("llRequestSecureURL"); 8037 if (m_UrlModule != null)
8038 return m_UrlModule.RequestSecureURL(m_ScriptEngine.ScriptModule, m_host, m_itemID).ToString();
8034 return UUID.Zero.ToString(); 8039 return UUID.Zero.ToString();
8035 } 8040 }
8036 8041
@@ -8110,7 +8115,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8110 public LSL_String llRequestURL() 8115 public LSL_String llRequestURL()
8111 { 8116 {
8112 m_host.AddScriptLPS(1); 8117 m_host.AddScriptLPS(1);
8113 NotImplemented("llRequestURL"); 8118
8119 if (m_UrlModule != null)
8120 return m_UrlModule.RequestURL(m_ScriptEngine.ScriptModule, m_host, m_itemID).ToString();
8114 return UUID.Zero.ToString(); 8121 return UUID.Zero.ToString();
8115 } 8122 }
8116 8123