aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSean Dague2008-05-14 19:13:54 +0000
committerSean Dague2008-05-14 19:13:54 +0000
commit4a07038bbe616d05fbb3dfad79ec72a3169de589 (patch)
tree2ce85f8ef8818acf92c7f7ce1adbb9b772feb45d
parentFrom: Dr Schofield <hud@zurich.ibm.com> (diff)
downloadopensim-SC_OLD-4a07038bbe616d05fbb3dfad79ec72a3169de589.zip
opensim-SC_OLD-4a07038bbe616d05fbb3dfad79ec72a3169de589.tar.gz
opensim-SC_OLD-4a07038bbe616d05fbb3dfad79ec72a3169de589.tar.bz2
opensim-SC_OLD-4a07038bbe616d05fbb3dfad79ec72a3169de589.tar.xz
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.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Servers/RestStreamHandler.cs5
-rw-r--r--OpenSim/Region/Application/OpenSimMain.cs27
-rw-r--r--bin/OpenSim.ini.example12
-rw-r--r--prebuild.xml109
4 files changed, 138 insertions, 15 deletions
diff --git a/OpenSim/Framework/Servers/RestStreamHandler.cs b/OpenSim/Framework/Servers/RestStreamHandler.cs
index 64c7d40..cab5208 100644
--- a/OpenSim/Framework/Servers/RestStreamHandler.cs
+++ b/OpenSim/Framework/Servers/RestStreamHandler.cs
@@ -34,6 +34,11 @@ namespace OpenSim.Framework.Servers
34 { 34 {
35 private RestMethod m_restMethod; 35 private RestMethod m_restMethod;
36 36
37 public RestMethod Method
38 {
39 get { return m_restMethod; }
40 }
41
37 public override byte[] Handle(string path, Stream request) 42 public override byte[] Handle(string path, Stream request)
38 { 43 {
39 Encoding encoding = Encoding.UTF8; 44 Encoding encoding = Encoding.UTF8;
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs
index 639e3c2..bae7819 100644
--- a/OpenSim/Region/Application/OpenSimMain.cs
+++ b/OpenSim/Region/Application/OpenSimMain.cs
@@ -90,35 +90,40 @@ namespace OpenSim
90 private string m_standaloneUserSource; 90 private string m_standaloneUserSource;
91 91
92 protected string m_assetStorage = "local"; 92 protected string m_assetStorage = "local";
93 93
94 public ConsoleCommand CreateAccount = null; 94 public ConsoleCommand CreateAccount = null;
95 protected bool m_dumpAssetsToFile; 95 protected bool m_dumpAssetsToFile;
96 96
97 protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>(); 97 protected List<IApplicationPlugin> m_plugins = new List<IApplicationPlugin>();
98 98
99 protected IniConfigSource m_config; 99 protected IniConfigSource m_config;
100 100
101 public IniConfigSource ConfigSource 101 public IniConfigSource ConfigSource
102 { 102 {
103 get { return m_config; } 103 get { return m_config; }
104 set { m_config = value; } 104 set { m_config = value; }
105 } 105 }
106 106
107 public BaseHttpServer HttpServer
108 {
109 get { return m_httpServer; }
110 }
111
112 public List<IClientNetworkServer> ClientServers 107 public List<IClientNetworkServer> ClientServers
113 { 108 {
114 get { return m_clientServers; } 109 get { return m_clientServers; }
115 } 110 }
116 111
117 public List<RegionInfo> RegionData 112 public List<RegionInfo> RegionData
118 { 113 {
119 get { return m_regionData; } 114 get { return m_regionData; }
120 } 115 }
121 116
117 public new BaseHttpServer HttpServer
118 {
119 get { return m_httpServer; }
120 }
121
122 public new uint HttpServerPort
123 {
124 get { return m_httpServerPort; }
125 }
126
122 protected ModuleLoader m_moduleLoader; 127 protected ModuleLoader m_moduleLoader;
123 128
124 public ModuleLoader ModuleLoader 129 public ModuleLoader ModuleLoader
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index 62c03f0..7c877f0 100644
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -162,6 +162,14 @@ shout_distance = 100
162enabled = false 162enabled = false
163access_password = unknown 163access_password = unknown
164 164
165[RestPlugins]
166enabled = false
167password = unknown
168prefix = /admin
169
170[RestRegionPlugin]
171enabled = false
172
165; Uncomment the following for IRC bridge 173; Uncomment the following for IRC bridge
166; experimental, so if it breaks... keep both parts... yada yada 174; experimental, so if it breaks... keep both parts... yada yada
167; also, not good error detection when it fails 175; also, not good error detection when it fails
@@ -326,10 +334,6 @@ CleanUpOldScriptsOnStartup=true
326; Set the following to true to allow administrator owned scripts to execute console commands 334; Set the following to true to allow administrator owned scripts to execute console commands
327AllowosConsoleCommand=false 335AllowosConsoleCommand=false
328 336
329; Maximum number of llListen events we allow globally in the region
330; Set this to 0 to have no limit imposed.
331max_listens_per_region = 1000
332
333; Maximum number of llListen events we allow per script 337; Maximum number of llListen events we allow per script
334; Set this to 0 to have no limit imposed. 338; Set this to 0 to have no limit imposed.
335max_listens_per_script = 64 339max_listens_per_script = 64
diff --git a/prebuild.xml b/prebuild.xml
index 544f626..530b3fb 100644
--- a/prebuild.xml
+++ b/prebuild.xml
@@ -1075,6 +1075,115 @@
1075 </Files> 1075 </Files>
1076 </Project> 1076 </Project>
1077 1077
1078 <!-- REST plugins -->
1079 <Project name="OpenSim.ApplicationPlugins.Rest"
1080 path="OpenSim/ApplicationPlugins/Rest" type="Library">
1081 <Configuration name="Debug">
1082 <Options>
1083 <OutputPath>../../../bin/</OutputPath>
1084 </Options>
1085 </Configuration>
1086 <Configuration name="Release">
1087 <Options>
1088 <OutputPath>../../../bin/</OutputPath>
1089 </Options>
1090 </Configuration>
1091
1092 <ReferencePath>../../../bin/</ReferencePath>
1093 <Reference name="Mono.Addins.dll" />
1094 <Reference name="System"/>
1095 <Reference name="System.Xml"/>
1096 <Reference name="System.Xml.Serialization"/>
1097 <Reference name="libsecondlife.dll" />
1098 <Reference name="Nini.dll" />
1099 <Reference name="XMLRPC.dll" />
1100 <Reference name="OpenSim"/>
1101 <Reference name="OpenSim.Region.ClientStack"/>
1102 <Reference name="OpenSim.Region.Environment"/>
1103 <Reference name="OpenSim.Framework.Communications"/>
1104 <Reference name="OpenSim.Framework"/>
1105 <Reference name="OpenSim.Framework.Servers"/>
1106 <Reference name="OpenSim.Framework.Console"/>
1107 <Reference name="log4net"/>
1108
1109 <Files>
1110 <Match pattern="*.cs" recurse="false"/>
1111 </Files>
1112 </Project>
1113 <Project name="OpenSim.ApplicationPlugins.Rest.Regions"
1114 path="OpenSim/ApplicationPlugins/Rest/Regions" type="Library">
1115 <Configuration name="Debug">
1116 <Options>
1117 <OutputPath>../../../../bin/</OutputPath>
1118 </Options>
1119 </Configuration>
1120 <Configuration name="Release">
1121 <Options>
1122 <OutputPath>../../../../bin/</OutputPath>
1123 </Options>
1124 </Configuration>
1125
1126 <ReferencePath>../../../../bin/</ReferencePath>
1127 <Reference name="Mono.Addins.dll" />
1128 <Reference name="System"/>
1129 <Reference name="System.IO"/>
1130 <Reference name="System.Xml"/>
1131 <Reference name="System.Xml.Serialization"/>
1132 <Reference name="libsecondlife.dll" />
1133 <Reference name="Nini.dll" />
1134 <Reference name="XMLRPC.dll" />
1135 <Reference name="OpenSim"/>
1136 <Reference name="OpenSim.Region.ClientStack"/>
1137 <Reference name="OpenSim.Region.Environment"/>
1138 <Reference name="OpenSim.Framework.Communications"/>
1139 <Reference name="OpenSim.Framework"/>
1140 <Reference name="OpenSim.Framework.Servers"/>
1141 <Reference name="OpenSim.Framework.Console"/>
1142 <Reference name="OpenSim.ApplicationPlugins.Rest"/>
1143 <Reference name="log4net"/>
1144
1145 <Files>
1146 <Match pattern="*.cs" recurse="true"/>
1147 </Files>
1148 </Project>
1149 <!-- /REST plugins -->
1150
1151
1152
1153 <Project name="OpenSim.ApplicationPlugins.RemoteInventoryController" path="OpenSim/ApplicationPlugins/RemoteInventoryController" type="Library">
1154 <Configuration name="Debug">
1155 <Options>
1156 <OutputPath>../../../bin/</OutputPath>
1157 </Options>
1158 </Configuration>
1159 <Configuration name="Release">
1160 <Options>
1161 <OutputPath>../../../bin/</OutputPath>
1162 </Options>
1163 </Configuration>
1164
1165 <ReferencePath>../../../bin/</ReferencePath>
1166 <Reference name="Mono.Addins.dll" />
1167 <Reference name="System"/>
1168 <Reference name="System.Xml"/>
1169 <Reference name="libsecondlife.dll" />
1170 <Reference name="Nini.dll" />
1171 <Reference name="XMLRPC.dll" />
1172 <Reference name="OpenSim"/>
1173 <Reference name="OpenSim.Region.ClientStack"/>
1174 <Reference name="OpenSim.Region.Environment"/>
1175 <Reference name="OpenSim.Framework"/>
1176 <Reference name="OpenSim.Framework.Servers"/>
1177 <Reference name="OpenSim.Framework.Console"/>
1178 <Reference name="OpenSim.Framework.Communications"/>
1179 <Reference name="OpenSim.Framework.Communications.Cache"/>
1180 <Reference name="log4net"/>
1181
1182 <Files>
1183 <Match pattern="*.cs" recurse="true"/>
1184 </Files>
1185 </Project>
1186
1078 <!-- Scene Server API Example Apps --> 1187 <!-- Scene Server API Example Apps -->
1079 1188
1080 <Project name="OpenSim.Region.DataSnapshot" path="OpenSim/Region/DataSnapshot" type="Library"> 1189 <Project name="OpenSim.Region.DataSnapshot" path="OpenSim/Region/DataSnapshot" type="Library">