From 4a07038bbe616d05fbb3dfad79ec72a3169de589 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 14 May 2008 19:13:54 +0000 Subject: [PATCH] From: Dr Scofield 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/ -> returns detailed region information we'll be adding support for POST/DELETE/PUT and also for /admin/regions//name etc. --- .../Framework/Servers/RestStreamHandler.cs | 5 + OpenSim/Region/Application/OpenSimMain.cs | 27 +++-- bin/OpenSim.ini.example | 12 +- prebuild.xml | 109 ++++++++++++++++++ 4 files changed, 138 insertions(+), 15 deletions(-) diff --git a/OpenSim/Framework/Servers/RestStreamHandler.cs b/OpenSim/Framework/Servers/RestStreamHandler.cs index 64c7d40cb1..cab5208628 100644 --- a/OpenSim/Framework/Servers/RestStreamHandler.cs +++ b/OpenSim/Framework/Servers/RestStreamHandler.cs @@ -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; diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 639e3c2218..bae7819b36 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -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 m_plugins = new List(); protected IniConfigSource m_config; - + public IniConfigSource ConfigSource { get { return m_config; } set { m_config = value; } } - - public BaseHttpServer HttpServer - { - get { return m_httpServer; } - } - + public List ClientServers { get { return m_clientServers; } } - + public List 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 diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 62c03f0855..7c877f0611 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -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 diff --git a/prebuild.xml b/prebuild.xml index 544f6262ea..530b3fbe3d 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -1075,6 +1075,115 @@ + + + + + ../../../bin/ + + + + + ../../../bin/ + + + + ../../../bin/ + + + + + + + + + + + + + + + + + + + + + + + + ../../../../bin/ + + + + + ../../../../bin/ + + + + ../../../../bin/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ../../../bin/ + + + + + ../../../bin/ + + + + ../../../bin/ + + + + + + + + + + + + + + + + + + + + +