Plumb request and return URL functions.

Implements llRequestURL, llRequestSecureURL, llReleaseURL
0.6.5-rc1
Melanie Thielker 2009-05-13 03:09:30 +00:00
parent 80ce08d8b2
commit ba8850f254
3 changed files with 22 additions and 7 deletions

View File

@ -92,12 +92,14 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
{ {
} }
public void RequestURL(IScriptModule engine, SceneObjectPart host, UUID itemID) public UUID RequestURL(IScriptModule engine, SceneObjectPart host, UUID itemID)
{ {
return UUID.Zero;
} }
public void RequestSecureURL(IScriptModule engine, SceneObjectPart host, UUID itemID) public UUID RequestSecureURL(IScriptModule engine, SceneObjectPart host, UUID itemID)
{ {
return UUID.Zero;
} }
public void ReleaseURL(string url) public void ReleaseURL(string url)
@ -112,5 +114,10 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
{ {
return String.Empty; return String.Empty;
} }
public int GetFreeUrls()
{
return 0;
}
} }
} }

View File

@ -34,10 +34,11 @@ namespace OpenSim.Region.Framework.Interfaces
{ {
public interface IUrlModule public interface IUrlModule
{ {
void RequestURL(IScriptModule engine, SceneObjectPart host, UUID itemID); UUID RequestURL(IScriptModule engine, SceneObjectPart host, UUID itemID);
void RequestSecureURL(IScriptModule engine, SceneObjectPart host, UUID itemID); UUID RequestSecureURL(IScriptModule engine, SceneObjectPart host, UUID itemID);
void ReleaseURL(string url); void ReleaseURL(string url);
void HttpResponse(UUID request, int status, string body); void HttpResponse(UUID request, int status, string body);
string GetHttpHeader(UUID request, string header); string GetHttpHeader(UUID request, string header);
int GetFreeUrls();
} }
} }

View File

@ -82,6 +82,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
private bool m_automaticLinkPermission=false; private bool m_automaticLinkPermission=false;
private IMessageTransferModule m_TransferModule = null; private IMessageTransferModule m_TransferModule = null;
private int m_notecardLineReadCharsMax = 255; private int m_notecardLineReadCharsMax = 255;
private IUrlModule m_UrlModule = null;
//private static readonly ILog m_log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); //private static readonly ILog m_log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@ -107,6 +108,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_TransferModule = m_TransferModule =
m_ScriptEngine.World.RequestModuleInterface<IMessageTransferModule>(); m_ScriptEngine.World.RequestModuleInterface<IMessageTransferModule>();
m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>();
AsyncCommands = new AsyncCommandManager(ScriptEngine); AsyncCommands = new AsyncCommandManager(ScriptEngine);
} }
@ -2700,7 +2703,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llReleaseURL(string url) public void llReleaseURL(string url)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
NotImplemented("llReleaseURL"); if (m_UrlModule != null)
m_UrlModule.ReleaseURL(url);
} }
public void llAttachToAvatar(int attachment) public void llAttachToAvatar(int attachment)
@ -8030,7 +8034,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_String llRequestSecureURL() public LSL_String llRequestSecureURL()
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
NotImplemented("llRequestSecureURL"); if (m_UrlModule != null)
return m_UrlModule.RequestSecureURL(m_ScriptEngine.ScriptModule, m_host, m_itemID).ToString();
return UUID.Zero.ToString(); return UUID.Zero.ToString();
} }
@ -8110,7 +8115,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_String llRequestURL() public LSL_String llRequestURL()
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
NotImplemented("llRequestURL");
if (m_UrlModule != null)
return m_UrlModule.RequestURL(m_ScriptEngine.ScriptModule, m_host, m_itemID).ToString();
return UUID.Zero.ToString(); return UUID.Zero.ToString();
} }