Implement llSetContentType using the new OpenID auth support for authentication

This commit is contained in:
Melanie
2013-05-05 22:01:07 +02:00
parent 2332453974
commit a8faed6f76
5 changed files with 71 additions and 1 deletions

View File

@@ -13386,6 +13386,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return null;
}
public void llSetContentType(LSL_Key id, LSL_Integer content_type)
{
if (m_UrlModule != null)
{
string type = "text.plain";
if (content_type == (int)ScriptBaseClass.CONTENT_TYPE_HTML)
type = "text/html";
m_UrlModule.HttpContentType(new UUID(id),type);
}
}
}
public class NotecardCache

View File

@@ -434,5 +434,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
void llSetKeyframedMotion(LSL_List frames, LSL_List options);
LSL_List GetPrimitiveParamsEx(LSL_Key prim, LSL_List rules);
LSL_List llGetPhysicsMaterial();
void llSetContentType(LSL_Key id, LSL_Integer content_type);
}
}

View File

@@ -771,5 +771,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
/// process message parameter as regex
/// </summary>
public const int OS_LISTEN_REGEX_MESSAGE = 0x2;
public const int CONTENT_TYPE_TEXT = 0;
public const int CONTENT_TYPE_HTML = 1;
}
}

View File

@@ -2014,5 +2014,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
{
return m_LSL_Functions.llGetPhysicsMaterial();
}
public void llSetContentType(LSL_Key id, LSL_Integer content_type)
{
m_LSL_Functions.llSetContentType(id, content_type);
}
}
}