From: Dr Scofield <DrScofield@xyzzyxyzzy.net>
the attached patch set adds the (still work-in-progress but already working) RestPlugin base class and the RestRegionPlugin code. we are using XML serialization. currently working: GET /admin/regions/ -> returns UUID list of known regions GET /admin/regions/<UUID> -> returns detailed region information we'll be adding support for POST/DELETE/PUT and also for /admin/regions/<UUID>/name etc.0.6.0-stable
parent
8fe9943293
commit
4a07038bbe
|
@ -34,6 +34,11 @@ namespace OpenSim.Framework.Servers
|
|||
{
|
||||
private RestMethod m_restMethod;
|
||||
|
||||
public RestMethod Method
|
||||
{
|
||||
get { return m_restMethod; }
|
||||
}
|
||||
|
||||
public override byte[] Handle(string path, Stream request)
|
||||
{
|
||||
Encoding encoding = Encoding.UTF8;
|
||||
|
|
|
@ -90,35 +90,40 @@ namespace OpenSim
|
|||
private string m_standaloneUserSource;
|
||||
|
||||
protected string m_assetStorage = "local";
|
||||
|
||||
|
||||
public ConsoleCommand CreateAccount = null;
|
||||
protected bool m_dumpAssetsToFile;
|
||||
|
||||
|
||||
protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>();
|
||||
|
||||
protected IniConfigSource m_config;
|
||||
|
||||
|
||||
public IniConfigSource ConfigSource
|
||||
{
|
||||
get { return m_config; }
|
||||
set { m_config = value; }
|
||||
}
|
||||
|
||||
public BaseHttpServer HttpServer
|
||||
{
|
||||
get { return m_httpServer; }
|
||||
}
|
||||
|
||||
|
||||
public List<IClientNetworkServer> ClientServers
|
||||
{
|
||||
get { return m_clientServers; }
|
||||
}
|
||||
|
||||
|
||||
public List<RegionInfo> RegionData
|
||||
{
|
||||
get { return m_regionData; }
|
||||
}
|
||||
|
||||
|
||||
public new BaseHttpServer HttpServer
|
||||
{
|
||||
get { return m_httpServer; }
|
||||
}
|
||||
|
||||
public new uint HttpServerPort
|
||||
{
|
||||
get { return m_httpServerPort; }
|
||||
}
|
||||
|
||||
protected ModuleLoader m_moduleLoader;
|
||||
|
||||
public ModuleLoader ModuleLoader
|
||||
|
|
|
@ -162,6 +162,14 @@ shout_distance = 100
|
|||
enabled = false
|
||||
access_password = unknown
|
||||
|
||||
[RestPlugins]
|
||||
enabled = false
|
||||
password = unknown
|
||||
prefix = /admin
|
||||
|
||||
[RestRegionPlugin]
|
||||
enabled = false
|
||||
|
||||
; Uncomment the following for IRC bridge
|
||||
; experimental, so if it breaks... keep both parts... yada yada
|
||||
; also, not good error detection when it fails
|
||||
|
@ -326,10 +334,6 @@ CleanUpOldScriptsOnStartup=true
|
|||
; Set the following to true to allow administrator owned scripts to execute console commands
|
||||
AllowosConsoleCommand=false
|
||||
|
||||
; Maximum number of llListen events we allow globally in the region
|
||||
; Set this to 0 to have no limit imposed.
|
||||
max_listens_per_region = 1000
|
||||
|
||||
; Maximum number of llListen events we allow per script
|
||||
; Set this to 0 to have no limit imposed.
|
||||
max_listens_per_script = 64
|
||||
|
|
109
prebuild.xml
109
prebuild.xml
|
@ -1075,6 +1075,115 @@
|
|||
</Files>
|
||||
</Project>
|
||||
|
||||
<!-- REST plugins -->
|
||||
<Project name="OpenSim.ApplicationPlugins.Rest"
|
||||
path="OpenSim/ApplicationPlugins/Rest" type="Library">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<OutputPath>../../../bin/</OutputPath>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<OutputPath>../../../bin/</OutputPath>
|
||||
</Options>
|
||||
</Configuration>
|
||||
|
||||
<ReferencePath>../../../bin/</ReferencePath>
|
||||
<Reference name="Mono.Addins.dll" />
|
||||
<Reference name="System"/>
|
||||
<Reference name="System.Xml"/>
|
||||
<Reference name="System.Xml.Serialization"/>
|
||||
<Reference name="libsecondlife.dll" />
|
||||
<Reference name="Nini.dll" />
|
||||
<Reference name="XMLRPC.dll" />
|
||||
<Reference name="OpenSim"/>
|
||||
<Reference name="OpenSim.Region.ClientStack"/>
|
||||
<Reference name="OpenSim.Region.Environment"/>
|
||||
<Reference name="OpenSim.Framework.Communications"/>
|
||||
<Reference name="OpenSim.Framework"/>
|
||||
<Reference name="OpenSim.Framework.Servers"/>
|
||||
<Reference name="OpenSim.Framework.Console"/>
|
||||
<Reference name="log4net"/>
|
||||
|
||||
<Files>
|
||||
<Match pattern="*.cs" recurse="false"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="OpenSim.ApplicationPlugins.Rest.Regions"
|
||||
path="OpenSim/ApplicationPlugins/Rest/Regions" type="Library">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<OutputPath>../../../../bin/</OutputPath>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<OutputPath>../../../../bin/</OutputPath>
|
||||
</Options>
|
||||
</Configuration>
|
||||
|
||||
<ReferencePath>../../../../bin/</ReferencePath>
|
||||
<Reference name="Mono.Addins.dll" />
|
||||
<Reference name="System"/>
|
||||
<Reference name="System.IO"/>
|
||||
<Reference name="System.Xml"/>
|
||||
<Reference name="System.Xml.Serialization"/>
|
||||
<Reference name="libsecondlife.dll" />
|
||||
<Reference name="Nini.dll" />
|
||||
<Reference name="XMLRPC.dll" />
|
||||
<Reference name="OpenSim"/>
|
||||
<Reference name="OpenSim.Region.ClientStack"/>
|
||||
<Reference name="OpenSim.Region.Environment"/>
|
||||
<Reference name="OpenSim.Framework.Communications"/>
|
||||
<Reference name="OpenSim.Framework"/>
|
||||
<Reference name="OpenSim.Framework.Servers"/>
|
||||
<Reference name="OpenSim.Framework.Console"/>
|
||||
<Reference name="OpenSim.ApplicationPlugins.Rest"/>
|
||||
<Reference name="log4net"/>
|
||||
|
||||
<Files>
|
||||
<Match pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<!-- /REST plugins -->
|
||||
|
||||
|
||||
|
||||
<Project name="OpenSim.ApplicationPlugins.RemoteInventoryController" path="OpenSim/ApplicationPlugins/RemoteInventoryController" type="Library">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<OutputPath>../../../bin/</OutputPath>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<OutputPath>../../../bin/</OutputPath>
|
||||
</Options>
|
||||
</Configuration>
|
||||
|
||||
<ReferencePath>../../../bin/</ReferencePath>
|
||||
<Reference name="Mono.Addins.dll" />
|
||||
<Reference name="System"/>
|
||||
<Reference name="System.Xml"/>
|
||||
<Reference name="libsecondlife.dll" />
|
||||
<Reference name="Nini.dll" />
|
||||
<Reference name="XMLRPC.dll" />
|
||||
<Reference name="OpenSim"/>
|
||||
<Reference name="OpenSim.Region.ClientStack"/>
|
||||
<Reference name="OpenSim.Region.Environment"/>
|
||||
<Reference name="OpenSim.Framework"/>
|
||||
<Reference name="OpenSim.Framework.Servers"/>
|
||||
<Reference name="OpenSim.Framework.Console"/>
|
||||
<Reference name="OpenSim.Framework.Communications"/>
|
||||
<Reference name="OpenSim.Framework.Communications.Cache"/>
|
||||
<Reference name="log4net"/>
|
||||
|
||||
<Files>
|
||||
<Match pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
|
||||
<!-- Scene Server API Example Apps -->
|
||||
|
||||
<Project name="OpenSim.Region.DataSnapshot" path="OpenSim/Region/DataSnapshot" type="Library">
|
||||
|
|
Loading…
Reference in New Issue