aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/GridService/GridService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services/GridService/GridService.cs')
-rw-r--r--OpenSim/Services/GridService/GridService.cs43
1 files changed, 43 insertions, 0 deletions
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index 013cc53..e8a545c 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -59,6 +59,8 @@ namespace OpenSim.Services.GridService
59 59
60 protected bool m_SuppressVarregionOverlapCheckOnRegistration = false; 60 protected bool m_SuppressVarregionOverlapCheckOnRegistration = false;
61 61
62 private static Dictionary<string,object> m_ExtraFeatures = new Dictionary<string, object>();
63
62 public GridService(IConfigSource config) 64 public GridService(IConfigSource config)
63 : base(config) 65 : base(config)
64 { 66 {
@@ -139,10 +141,38 @@ namespace OpenSim.Services.GridService
139 HandleSetFlags); 141 HandleSetFlags);
140 } 142 }
141 143
144 if (!suppressConsoleCommands)
145 SetExtraServiceURLs(config);
146
142 m_HypergridLinker = new HypergridLinker(m_config, this, m_Database); 147 m_HypergridLinker = new HypergridLinker(m_config, this, m_Database);
143 } 148 }
144 } 149 }
145 150
151 private void SetExtraServiceURLs(IConfigSource config)
152 {
153 IConfig loginConfig = config.Configs["LoginService"];
154 IConfig gridConfig = config.Configs["GridService"];
155
156 if (loginConfig == null || gridConfig == null)
157 return;
158
159 string configVal;
160
161 configVal = loginConfig.GetString("SearchURL", string.Empty);
162 if (!string.IsNullOrEmpty(configVal))
163 m_ExtraFeatures["search-server-url"] = configVal;
164
165 configVal = loginConfig.GetString("MapTileURL", string.Empty);
166 if (!string.IsNullOrEmpty(configVal))
167 m_ExtraFeatures["map-server-url"] = configVal;
168
169 configVal = loginConfig.GetString("DestinationGuide", string.Empty);
170 if (!string.IsNullOrEmpty(configVal))
171 m_ExtraFeatures["destination-guide-url"] = configVal;
172
173 m_ExtraFeatures["ExportSupported"] = gridConfig.GetString("ExportSupported", "true");
174 }
175
146 #region IGridService 176 #region IGridService
147 177
148 public string RegisterRegion(UUID scopeID, GridRegion regionInfos) 178 public string RegisterRegion(UUID scopeID, GridRegion regionInfos)
@@ -928,5 +958,18 @@ namespace OpenSim.Services.GridService
928 m_Database.Store(r); 958 m_Database.Store(r);
929 } 959 }
930 } 960 }
961
962 /// <summary>
963 /// Gets the grid extra service URls we wish for the region to send in OpenSimExtras to dynamically refresh
964 /// parameters in the viewer used to access services like map, search and destination guides.
965 /// <para>see "SimulatorFeaturesModule" </para>
966 /// </summary>
967 /// <returns>
968 /// The grid extra service URls.
969 /// </returns>
970 public Dictionary<string,object> GetExtraFeatures()
971 {
972 return m_ExtraFeatures;
973 }
931 } 974 }
932} 975}