diff options
author | BlueWall | 2014-07-30 11:19:34 -0400 |
---|---|---|
committer | BlueWall | 2014-07-30 11:24:39 -0400 |
commit | e0d8f42e6be70974c1cdbf6ba3ff80c2eea7294d (patch) | |
tree | 7c84f3b616b287fc26d44f04f10201d5c3c06af4 | |
parent | In TerrainModule, lock m_perClientPatchUpdates when removing entries. (diff) | |
download | opensim-SC_OLD-e0d8f42e6be70974c1cdbf6ba3ff80c2eea7294d.zip opensim-SC_OLD-e0d8f42e6be70974c1cdbf6ba3ff80c2eea7294d.tar.gz opensim-SC_OLD-e0d8f42e6be70974c1cdbf6ba3ff80c2eea7294d.tar.bz2 opensim-SC_OLD-e0d8f42e6be70974c1cdbf6ba3ff80c2eea7294d.tar.xz |
Simulator Extra Features Service
Provide a means for regions to fetch extra features supported by modern viewers from a central location
.
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs | 74 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/LocalGridFeaturesServiceInConnector.cs | 129 | ||||
-rw-r--r-- | OpenSim/Server/Handlers/Grid/GridExtraFeaturesHandlers.cs | 118 | ||||
-rw-r--r-- | OpenSim/Server/Handlers/Grid/GridExtraFeaturesServerInConnector.cs | 50 | ||||
-rw-r--r-- | bin/OpenSim.ini.example | 5 | ||||
-rw-r--r-- | bin/Robust.HG.ini.example | 24 | ||||
-rw-r--r-- | bin/Robust.ini.example | 24 |
7 files changed, 415 insertions, 9 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs index e4d8a20..587cb70 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs | |||
@@ -56,13 +56,15 @@ namespace OpenSim.Region.ClientStack.Linden | |||
56 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimulatorFeaturesModule")] | 56 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimulatorFeaturesModule")] |
57 | public class SimulatorFeaturesModule : ISharedRegionModule, ISimulatorFeaturesModule | 57 | public class SimulatorFeaturesModule : ISharedRegionModule, ISimulatorFeaturesModule |
58 | { | 58 | { |
59 | // private static readonly ILog m_log = | 59 | private static readonly ILog m_log = |
60 | // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 60 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
61 | 61 | ||
62 | public event SimulatorFeaturesRequestDelegate OnSimulatorFeaturesRequest; | 62 | public event SimulatorFeaturesRequestDelegate OnSimulatorFeaturesRequest; |
63 | 63 | ||
64 | private Scene m_scene; | 64 | private Scene m_scene; |
65 | 65 | ||
66 | bool m_AllowOverride = true; | ||
67 | |||
66 | /// <summary> | 68 | /// <summary> |
67 | /// Simulator features | 69 | /// Simulator features |
68 | /// </summary> | 70 | /// </summary> |
@@ -75,8 +77,15 @@ namespace OpenSim.Region.ClientStack.Linden | |||
75 | 77 | ||
76 | public void Initialise(IConfigSource source) | 78 | public void Initialise(IConfigSource source) |
77 | { | 79 | { |
78 | IConfig config = source.Configs["SimulatorFeatures"]; | 80 | IConfig config = source.Configs ["SimulatorFeatures"]; |
79 | if (config != null) | 81 | string featuresURI = config.GetString ("ExtraFeaturesServiceURI", string.Empty); |
82 | if (string.IsNullOrEmpty (featuresURI)) { | ||
83 | m_log.Info ("ExtraFeaturesServiceURI is undefined. The grid's ExtraFeatures will not be available to regions in this instnace."); | ||
84 | } else { | ||
85 | GetGridExtraFeatures(featuresURI); | ||
86 | } | ||
87 | |||
88 | if (config != null && m_AllowOverride == true) | ||
80 | { | 89 | { |
81 | m_SearchURL = config.GetString("SearchServerURI", string.Empty); | 90 | m_SearchURL = config.GetString("SearchServerURI", string.Empty); |
82 | 91 | ||
@@ -126,6 +135,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
126 | /// </remarks> | 135 | /// </remarks> |
127 | private void AddDefaultFeatures() | 136 | private void AddDefaultFeatures() |
128 | { | 137 | { |
138 | |||
129 | lock (m_features) | 139 | lock (m_features) |
130 | { | 140 | { |
131 | m_features["MeshRezEnabled"] = true; | 141 | m_features["MeshRezEnabled"] = true; |
@@ -141,15 +151,21 @@ namespace OpenSim.Region.ClientStack.Linden | |||
141 | 151 | ||
142 | // Extra information for viewers that want to use it | 152 | // Extra information for viewers that want to use it |
143 | // TODO: Take these out of here into their respective modules, like map-server-url | 153 | // TODO: Take these out of here into their respective modules, like map-server-url |
144 | OSDMap extrasMap = new OSDMap(); | 154 | OSDMap extrasMap; |
145 | if (m_SearchURL != string.Empty) | 155 | if(m_features.ContainsKey("OpenSimExtras")) |
156 | { | ||
157 | extrasMap = (OSDMap)m_features["OpenSimExtras"]; | ||
158 | } | ||
159 | else | ||
160 | extrasMap = new OSDMap(); | ||
161 | |||
162 | if (m_SearchURL != string.Empty && m_AllowOverride == true) | ||
146 | extrasMap["search-server-url"] = m_SearchURL; | 163 | extrasMap["search-server-url"] = m_SearchURL; |
147 | if (m_ExportSupported) | 164 | if (m_ExportSupported && m_AllowOverride == true) |
148 | extrasMap["ExportSupported"] = true; | 165 | extrasMap["ExportSupported"] = true; |
149 | 166 | ||
150 | if (extrasMap.Count > 0) | 167 | if (extrasMap.Count > 0) |
151 | m_features["OpenSimExtras"] = extrasMap; | 168 | m_features["OpenSimExtras"] = extrasMap; |
152 | |||
153 | } | 169 | } |
154 | } | 170 | } |
155 | 171 | ||
@@ -204,7 +220,10 @@ namespace OpenSim.Region.ClientStack.Linden | |||
204 | OSDMap copy = DeepCopy(); | 220 | OSDMap copy = DeepCopy(); |
205 | 221 | ||
206 | SimulatorFeaturesRequestDelegate handlerOnSimulatorFeaturesRequest = OnSimulatorFeaturesRequest; | 222 | SimulatorFeaturesRequestDelegate handlerOnSimulatorFeaturesRequest = OnSimulatorFeaturesRequest; |
207 | if (handlerOnSimulatorFeaturesRequest != null) | 223 | |
224 | // We will not trigger the event if m_AllowOverride == False | ||
225 | // See Robust.ini/Robust.HG.ini [GridExtraFeatures] - AllowRegionOverride | ||
226 | if (handlerOnSimulatorFeaturesRequest != null && m_AllowOverride == true) | ||
208 | handlerOnSimulatorFeaturesRequest(agentID, ref copy); | 227 | handlerOnSimulatorFeaturesRequest(agentID, ref copy); |
209 | 228 | ||
210 | //Send back data | 229 | //Send back data |
@@ -217,5 +236,42 @@ namespace OpenSim.Region.ClientStack.Linden | |||
217 | 236 | ||
218 | return responsedata; | 237 | return responsedata; |
219 | } | 238 | } |
239 | |||
240 | /// <summary> | ||
241 | /// Gets the grid extra features. | ||
242 | /// </summary> | ||
243 | /// <param name='featuresURI'> | ||
244 | /// The URI Robust uses to handle the get_extra_features request | ||
245 | /// </param> | ||
246 | private void GetGridExtraFeatures(string featuresURI) | ||
247 | { | ||
248 | JsonRpcRequestManager rpc = new JsonRpcRequestManager (); | ||
249 | |||
250 | OSDMap parameters = new OSDMap (); | ||
251 | OSD Params = (OSD)parameters; | ||
252 | if (!rpc.JsonRpcRequest (ref Params, "get_extra_features", featuresURI, UUID.Random ().ToString ())) | ||
253 | { | ||
254 | m_log.Error("[SIMFEATURES]: Could not retrieve extra features from grid. Please check configuration."); | ||
255 | return; | ||
256 | } | ||
257 | parameters = (OSDMap)Params; | ||
258 | OSDMap features = (OSDMap)parameters ["result"]; | ||
259 | |||
260 | if(features.ContainsKey("region_override")) | ||
261 | m_AllowOverride = features ["region_override"].AsBoolean () ; | ||
262 | else | ||
263 | m_AllowOverride = true; | ||
264 | |||
265 | OSDMap test = (OSDMap)features ["extra_features"]; | ||
266 | lock (m_features) | ||
267 | { | ||
268 | OSDMap extrasMap = new OSDMap(); | ||
269 | foreach (string key in test.Keys) | ||
270 | { | ||
271 | extrasMap[key] = test[key]; | ||
272 | } | ||
273 | m_features["OpenSimExtras"] = extrasMap; | ||
274 | } | ||
275 | } | ||
220 | } | 276 | } |
221 | } | 277 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/LocalGridFeaturesServiceInConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/LocalGridFeaturesServiceInConnector.cs new file mode 100644 index 0000000..6cfb099 --- /dev/null +++ b/OpenSim/Region/CoreModules/ServiceConnectorsIn/Grid/LocalGridFeaturesServiceInConnector.cs | |||
@@ -0,0 +1,129 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Reflection; | ||
30 | using System.Collections.Generic; | ||
31 | using log4net; | ||
32 | using Mono.Addins; | ||
33 | using Nini.Config; | ||
34 | using OpenSim.Framework; | ||
35 | using OpenSim.Framework.Servers; | ||
36 | using OpenSim.Region.Framework.Scenes; | ||
37 | using OpenSim.Region.Framework.Interfaces; | ||
38 | using OpenSim.Server.Base; | ||
39 | using OpenSim.Server.Handlers.Base; | ||
40 | using OpenSim.Server.Handlers.Grid; | ||
41 | using OpenSim.Services.Interfaces; | ||
42 | using OpenSim.Framework.Servers.HttpServer; | ||
43 | |||
44 | namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Grid | ||
45 | { | ||
46 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LocalGridFeaturesServiceInConnector")] | ||
47 | public class LocalGridExtraFeaturesServiceInConnector : ISharedRegionModule | ||
48 | { | ||
49 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
50 | private static bool m_Enabled = false; | ||
51 | |||
52 | private IConfigSource m_Config; | ||
53 | bool m_Registered = false; | ||
54 | |||
55 | #region Region Module interface | ||
56 | |||
57 | public void Initialise(IConfigSource config) | ||
58 | { | ||
59 | m_Config = config; | ||
60 | IConfig moduleConfig = config.Configs["Modules"]; | ||
61 | if (moduleConfig != null) | ||
62 | { | ||
63 | string name = moduleConfig.GetString("GridExtraFeaturesServiceInConnector", ""); | ||
64 | if (name == Name) | ||
65 | { | ||
66 | m_log.Info("[GridExtraFeatures]: GridExtraFeatures Service In Connector enabled"); | ||
67 | InitializeService(config); | ||
68 | } | ||
69 | } | ||
70 | } | ||
71 | |||
72 | public void InitializeService(IConfigSource config) | ||
73 | { | ||
74 | GridExtraFeaturesHandlers handler = new GridExtraFeaturesHandlers(config); | ||
75 | |||
76 | IHttpServer Server = MainServer.Instance; | ||
77 | |||
78 | Server.AddJsonRPCHandler("get_extra_features", handler.JsonGetGridFeaturesMethod); | ||
79 | |||
80 | } | ||
81 | |||
82 | public void PostInitialise() | ||
83 | { | ||
84 | } | ||
85 | |||
86 | public void Close() | ||
87 | { | ||
88 | } | ||
89 | |||
90 | public Type ReplaceableInterface | ||
91 | { | ||
92 | get { return null; } | ||
93 | } | ||
94 | |||
95 | public string Name | ||
96 | { | ||
97 | get { return "LocalGridExtraFeaturesServiceInConnector"; } | ||
98 | } | ||
99 | |||
100 | public void AddRegion(Scene scene) | ||
101 | { | ||
102 | if (!m_Enabled) | ||
103 | return; | ||
104 | } | ||
105 | |||
106 | public void RemoveRegion(Scene scene) | ||
107 | { | ||
108 | if (!m_Enabled) | ||
109 | return; | ||
110 | } | ||
111 | |||
112 | public void RegionLoaded(Scene scene) | ||
113 | { | ||
114 | if (!m_Enabled) | ||
115 | return; | ||
116 | |||
117 | if (!m_Registered) | ||
118 | { | ||
119 | m_Registered = true; | ||
120 | |||
121 | m_log.Info("[GRID EXTRA FEATURES]: Starting..."); | ||
122 | |||
123 | new GridExtraFeaturesServerInConnector(m_Config, MainServer.Instance, "GridExtraFeaturesService"); | ||
124 | } | ||
125 | } | ||
126 | #endregion | ||
127 | |||
128 | } | ||
129 | } \ No newline at end of file | ||
diff --git a/OpenSim/Server/Handlers/Grid/GridExtraFeaturesHandlers.cs b/OpenSim/Server/Handlers/Grid/GridExtraFeaturesHandlers.cs new file mode 100644 index 0000000..8b9890c --- /dev/null +++ b/OpenSim/Server/Handlers/Grid/GridExtraFeaturesHandlers.cs | |||
@@ -0,0 +1,118 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections; | ||
30 | using System.IO; | ||
31 | using System.Net; | ||
32 | using System.Reflection; | ||
33 | using System.Security; | ||
34 | using System.Text; | ||
35 | using log4net; | ||
36 | using Nini.Config; | ||
37 | using Nwc.XmlRpc; | ||
38 | using OpenSim.Framework; | ||
39 | using OpenSim.Framework.Servers.HttpServer; | ||
40 | using OpenMetaverse.StructuredData; | ||
41 | |||
42 | |||
43 | namespace OpenSim.Server.Handlers.Grid | ||
44 | { | ||
45 | /// <summary> | ||
46 | /// Grid extra features handlers. | ||
47 | /// <para>Allows grid level configuration of OpenSimExtra items.</para> | ||
48 | /// <para>Option to control region override of these settings.</para> | ||
49 | /// </summary> | ||
50 | public class GridExtraFeaturesHandlers | ||
51 | { | ||
52 | private static readonly ILog m_Log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
53 | private Hashtable m_ExtraFeatures = new Hashtable(); | ||
54 | private bool m_AllowRegionOverride = true; | ||
55 | |||
56 | public GridExtraFeaturesHandlers(IConfigSource configSource) | ||
57 | { | ||
58 | try | ||
59 | { | ||
60 | IConfig featuresCfg = configSource.Configs["GridExtraFeatures"]; | ||
61 | |||
62 | foreach( string key in featuresCfg.GetKeys()) | ||
63 | { | ||
64 | if(key != "AllowRegionOverride") | ||
65 | { | ||
66 | string value = featuresCfg.GetString(key); | ||
67 | |||
68 | // map the value to the viewer supported extra features | ||
69 | // add additional ones here as support is added in the viewer | ||
70 | // and place the configuration option in [GridExtraFeatures]. | ||
71 | switch(key) | ||
72 | { | ||
73 | case "SearchServerURI": | ||
74 | m_ExtraFeatures["search-server-url"] = value; | ||
75 | break; | ||
76 | case "MapImageServerURI": | ||
77 | m_ExtraFeatures["map-server-url"] = value; | ||
78 | break; | ||
79 | case "DestinationGuideURI": | ||
80 | m_ExtraFeatures["destination-guide-url"] = value; | ||
81 | break; | ||
82 | case "ExportSupported": | ||
83 | m_ExtraFeatures["ExportSupported"] = value; | ||
84 | break; | ||
85 | default: | ||
86 | m_Log.InfoFormat("{0} not yet supported."); | ||
87 | break; | ||
88 | } | ||
89 | } | ||
90 | else | ||
91 | m_AllowRegionOverride = featuresCfg.GetBoolean(key); | ||
92 | } | ||
93 | } | ||
94 | catch (Exception) | ||
95 | { | ||
96 | m_Log.Warn("[GRID EXTRA FEATURES SERVICE]: Cannot get grid features from config source, allowing region override"); | ||
97 | } | ||
98 | } | ||
99 | |||
100 | public bool JsonGetGridFeaturesMethod(OSDMap json, ref JsonRpcResponse response) | ||
101 | { | ||
102 | OSDMap features = new OSDMap(); | ||
103 | OSDMap json_map = new OSDMap(); | ||
104 | |||
105 | foreach (string key in m_ExtraFeatures.Keys) | ||
106 | { | ||
107 | features[key] = OSD.FromString(m_ExtraFeatures[key].ToString()); | ||
108 | } | ||
109 | |||
110 | json_map["extra_features"] = features; | ||
111 | json_map["region_override"] = m_AllowRegionOverride.ToString(); | ||
112 | |||
113 | response.Result = json_map; | ||
114 | |||
115 | return true; | ||
116 | } | ||
117 | } | ||
118 | } \ No newline at end of file | ||
diff --git a/OpenSim/Server/Handlers/Grid/GridExtraFeaturesServerInConnector.cs b/OpenSim/Server/Handlers/Grid/GridExtraFeaturesServerInConnector.cs new file mode 100644 index 0000000..f57a4b3 --- /dev/null +++ b/OpenSim/Server/Handlers/Grid/GridExtraFeaturesServerInConnector.cs | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Reflection; | ||
31 | using log4net; | ||
32 | using OpenMetaverse; | ||
33 | using Nini.Config; | ||
34 | using OpenSim.Framework; | ||
35 | using OpenSim.Framework.Servers.HttpServer; | ||
36 | using OpenSim.Server.Handlers.Base; | ||
37 | |||
38 | namespace OpenSim.Server.Handlers.Grid | ||
39 | { | ||
40 | public class GridExtraFeaturesServerInConnector : ServiceConnector | ||
41 | { | ||
42 | public GridExtraFeaturesServerInConnector(IConfigSource config, IHttpServer server, string configName) : | ||
43 | base(config, server, configName) | ||
44 | { | ||
45 | GridExtraFeaturesHandlers handler = new GridExtraFeaturesHandlers(config); | ||
46 | |||
47 | server.AddJsonRPCHandler("get_extra_features", handler.JsonGetGridFeaturesMethod); | ||
48 | } | ||
49 | } | ||
50 | } | ||
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index b79a3cb..d83a154 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example | |||
@@ -538,6 +538,11 @@ | |||
538 | 538 | ||
539 | 539 | ||
540 | [SimulatorFeatures] | 540 | [SimulatorFeatures] |
541 | ;# {ExtraFeaturesServiceURI} {} {URL to the grid ExtraFeatures Service} {} | ||
542 | ;; The grid can supply global values for extra simulator features to be | ||
543 | ;; passed to supporting viewers. The grid may choose to disallow local | ||
544 | ;; settings. | ||
545 | ; ExtraFeaturesServiceURI = "http://127.0.0.1:9000/" | ||
541 | ;# {MapImageServerURI} {} {URL for the map server} {} | 546 | ;# {MapImageServerURI} {} {URL for the map server} {} |
542 | ; Experimental new information sent in SimulatorFeatures cap for Kokua | 547 | ; Experimental new information sent in SimulatorFeatures cap for Kokua |
543 | ; viewers | 548 | ; viewers |
diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index 489810e..fc81ef0 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example | |||
@@ -45,6 +45,7 @@ InventoryInConnector = "8003/OpenSim.Server.Handlers.dll:XInventoryInConnector" | |||
45 | ;VoiceConnector = "8004/OpenSim.Server.Handlers.dll:FreeswitchServerConnector" | 45 | ;VoiceConnector = "8004/OpenSim.Server.Handlers.dll:FreeswitchServerConnector" |
46 | GridServiceConnector = "8003/OpenSim.Server.Handlers.dll:GridServiceConnector" | 46 | GridServiceConnector = "8003/OpenSim.Server.Handlers.dll:GridServiceConnector" |
47 | GridInfoServerInConnector = "8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector" | 47 | GridInfoServerInConnector = "8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector" |
48 | GridExtraFeaturesServerInConnector = "8002/OpenSim.Server.Handlers.dll:GridExtraFeaturesServerInConnector" | ||
48 | AuthenticationServiceConnector = "8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector" | 49 | AuthenticationServiceConnector = "8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector" |
49 | OpenIdServerConnector = "8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector" | 50 | OpenIdServerConnector = "8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector" |
50 | AvatarServiceConnector = "8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector" | 51 | AvatarServiceConnector = "8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector" |
@@ -484,6 +485,29 @@ HGAssetServiceConnector = "HGAssetService@8002/OpenSim.Server.Handlers.dll:Asset | |||
484 | ; this is the entry point for all user-related HG services | 485 | ; this is the entry point for all user-related HG services |
485 | ; uas = http://127.0.0.1:8002/ | 486 | ; uas = http://127.0.0.1:8002/ |
486 | 487 | ||
488 | |||
489 | [GridExtraFeatures] | ||
490 | ; These are propagated out to the regions as default settings for the | ||
491 | ; SimulatorFeatures to be sent to user's viewer when they teleport via | ||
492 | ; Hypergrid into this grid. | ||
493 | ; | ||
494 | |||
495 | ; Allow regions to override our defaults. | ||
496 | ;AllowRegionOverride = true | ||
497 | |||
498 | ; Search Server URI | ||
499 | ;SearchServerURI = "http://example.com:8200/" | ||
500 | |||
501 | ; Map Server URI | ||
502 | ;MapImageServerURI = "http://example.com:8200/" | ||
503 | |||
504 | ; Grid Destination Guide URI | ||
505 | ;DestinationGuideURI = "http://example.com:8200/" | ||
506 | |||
507 | ; Grid Allow Export | ||
508 | ;ExportSupported = true | ||
509 | |||
510 | |||
487 | [GatekeeperService] | 511 | [GatekeeperService] |
488 | LocalServiceModule = "OpenSim.Services.HypergridService.dll:GatekeeperService" | 512 | LocalServiceModule = "OpenSim.Services.HypergridService.dll:GatekeeperService" |
489 | ;; for the service | 513 | ;; for the service |
diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example index 14c66a0..74987d4 100644 --- a/bin/Robust.ini.example +++ b/bin/Robust.ini.example | |||
@@ -36,6 +36,7 @@ InventoryInConnector = "8003/OpenSim.Server.Handlers.dll:XInventoryInConnector" | |||
36 | ;VoiceConnector = "8004/OpenSim.Server.Handlers.dll:FreeswitchServerConnector" | 36 | ;VoiceConnector = "8004/OpenSim.Server.Handlers.dll:FreeswitchServerConnector" |
37 | GridServiceConnector = "8003/OpenSim.Server.Handlers.dll:GridServiceConnector" | 37 | GridServiceConnector = "8003/OpenSim.Server.Handlers.dll:GridServiceConnector" |
38 | GridInfoServerInConnector = "8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector" | 38 | GridInfoServerInConnector = "8002/OpenSim.Server.Handlers.dll:GridInfoServerInConnector" |
39 | GridExtraFeaturesServerInConnector = "8002/OpenSim.Server.Handlers.dll:GridExtraFeaturesServerInConnector" | ||
39 | AuthenticationServiceConnector = "8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector" | 40 | AuthenticationServiceConnector = "8003/OpenSim.Server.Handlers.dll:AuthenticationServiceConnector" |
40 | OpenIdServerConnector = "8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector" | 41 | OpenIdServerConnector = "8002/OpenSim.Server.Handlers.dll:OpenIdServerConnector" |
41 | AvatarServiceConnector = "8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector" | 42 | AvatarServiceConnector = "8003/OpenSim.Server.Handlers.dll:AvatarServiceConnector" |
@@ -456,6 +457,29 @@ MapGetServiceConnector = "8002/OpenSim.Server.Handlers.dll:MapGetServiceConnecto | |||
456 | ; password help: optional: page providing password assistance for users of your grid | 457 | ; password help: optional: page providing password assistance for users of your grid |
457 | ;password = http://127.0.0.1/password | 458 | ;password = http://127.0.0.1/password |
458 | 459 | ||
460 | |||
461 | [GridExtraFeatures] | ||
462 | ; These are propagated out to the regions as default settings for the | ||
463 | ; SimulatorFeatures to be sent to user's viewer when they teleport via | ||
464 | ; Hypergrid into this grid. | ||
465 | ; | ||
466 | |||
467 | ; Allow regions to override our defaults. | ||
468 | ;AllowRegionOverride = true | ||
469 | |||
470 | ; Search Server URI | ||
471 | ;SearchServerURI = "http://example.com:8200/" | ||
472 | |||
473 | ; Map Server URI | ||
474 | ;MapImageServerURI = "http://example.com:8200/" | ||
475 | |||
476 | ; Grid Destination Guide URI | ||
477 | ;DestinationGuideURI = "http://example.com:8200/" | ||
478 | |||
479 | ; Grid Allow Export | ||
480 | ;ExportSupported = true | ||
481 | |||
482 | |||
459 | [UserProfilesService] | 483 | [UserProfilesService] |
460 | LocalServiceModule = "OpenSim.Services.UserProfilesService.dll:UserProfilesService" | 484 | LocalServiceModule = "OpenSim.Services.UserProfilesService.dll:UserProfilesService" |
461 | Enabled = false | 485 | Enabled = false |