diff options
author | Sean Dague | 2009-02-26 22:54:50 +0000 |
---|---|---|
committer | Sean Dague | 2009-02-26 22:54:50 +0000 |
commit | cddaaf3e13fdadf473bd8fd63e37c4805b48dde8 (patch) | |
tree | 83132771fc3890abddc997b119c631235b1de366 /OpenSim/ApplicationPlugins | |
parent | Added IRegionCreator interface that all ApplicationPlugins that are creators ... (diff) | |
download | opensim-SC-cddaaf3e13fdadf473bd8fd63e37c4805b48dde8.zip opensim-SC-cddaaf3e13fdadf473bd8fd63e37c4805b48dde8.tar.gz opensim-SC-cddaaf3e13fdadf473bd8fd63e37c4805b48dde8.tar.bz2 opensim-SC-cddaaf3e13fdadf473bd8fd63e37c4805b48dde8.tar.xz |
svn attribute fixes so that we can play nice between windows and linux
Diffstat (limited to 'OpenSim/ApplicationPlugins')
-rw-r--r-- | OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs | 512 | ||||
-rw-r--r-- | OpenSim/ApplicationPlugins/CreateCommsManager/Resources/CreateCommsManagerPlugin.addin.xml | 22 |
2 files changed, 267 insertions, 267 deletions
diff --git a/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs b/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs index 83c2426..a5ad028 100644 --- a/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs +++ b/OpenSim/ApplicationPlugins/CreateCommsManager/CreateCommsManagerPlugin.cs | |||
@@ -1,256 +1,256 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 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 | 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 | 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 | 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. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | using System.Threading; | 31 | using System.Threading; |
32 | using log4net; | 32 | using log4net; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Framework.RegionLoader.Filesystem; | 34 | using OpenSim.Framework.RegionLoader.Filesystem; |
35 | using OpenSim.Framework.RegionLoader.Web; | 35 | using OpenSim.Framework.RegionLoader.Web; |
36 | using OpenSim.Region.CoreModules.Agent.AssetTransaction; | 36 | using OpenSim.Region.CoreModules.Agent.AssetTransaction; |
37 | using OpenSim.Region.CoreModules.Avatar.InstantMessage; | 37 | using OpenSim.Region.CoreModules.Avatar.InstantMessage; |
38 | using OpenSim.Region.CoreModules.Scripting.DynamicTexture; | 38 | using OpenSim.Region.CoreModules.Scripting.DynamicTexture; |
39 | using OpenSim.Region.CoreModules.Scripting.LoadImageURL; | 39 | using OpenSim.Region.CoreModules.Scripting.LoadImageURL; |
40 | using OpenSim.Region.CoreModules.Scripting.XMLRPC; | 40 | using OpenSim.Region.CoreModules.Scripting.XMLRPC; |
41 | using OpenSim.Framework.Communications; | 41 | using OpenSim.Framework.Communications; |
42 | using OpenSim.Framework.Communications.Cache; | 42 | using OpenSim.Framework.Communications.Cache; |
43 | using OpenSim.Region.Communications.Hypergrid; | 43 | using OpenSim.Region.Communications.Hypergrid; |
44 | using OpenSim.Region.Communications.Local; | 44 | using OpenSim.Region.Communications.Local; |
45 | using OpenSim.Region.Communications.OGS1; | 45 | using OpenSim.Region.Communications.OGS1; |
46 | using OpenSim.Framework.Servers; | 46 | using OpenSim.Framework.Servers; |
47 | using OpenSim.ApplicationPlugins.LoadRegions; | 47 | using OpenSim.ApplicationPlugins.LoadRegions; |
48 | 48 | ||
49 | namespace OpenSim.ApplicationPlugins.CreateCommsManager | 49 | namespace OpenSim.ApplicationPlugins.CreateCommsManager |
50 | { | 50 | { |
51 | public class CreateCommsManagerPlugin : IApplicationPlugin | 51 | public class CreateCommsManagerPlugin : IApplicationPlugin |
52 | { | 52 | { |
53 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 53 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
54 | 54 | ||
55 | #region IApplicationPlugin Members | 55 | #region IApplicationPlugin Members |
56 | 56 | ||
57 | // TODO: required by IPlugin, but likely not at all right | 57 | // TODO: required by IPlugin, but likely not at all right |
58 | string m_name = "CreateCommsManagerPlugin"; | 58 | string m_name = "CreateCommsManagerPlugin"; |
59 | string m_version = "0.0"; | 59 | string m_version = "0.0"; |
60 | 60 | ||
61 | public string Version { get { return m_version; } } | 61 | public string Version { get { return m_version; } } |
62 | public string Name { get { return m_name; } } | 62 | public string Name { get { return m_name; } } |
63 | 63 | ||
64 | protected OpenSimBase m_openSim; | 64 | protected OpenSimBase m_openSim; |
65 | 65 | ||
66 | protected BaseHttpServer m_httpServer; | 66 | protected BaseHttpServer m_httpServer; |
67 | 67 | ||
68 | protected CommunicationsManager m_commsManager; | 68 | protected CommunicationsManager m_commsManager; |
69 | protected GridInfoService m_gridInfoService; | 69 | protected GridInfoService m_gridInfoService; |
70 | protected IHyperlink HGServices = null; | 70 | protected IHyperlink HGServices = null; |
71 | 71 | ||
72 | protected LoadRegionsPlugin m_loadRegionsPlugin; | 72 | protected LoadRegionsPlugin m_loadRegionsPlugin; |
73 | 73 | ||
74 | public void Initialise() | 74 | public void Initialise() |
75 | { | 75 | { |
76 | m_log.Info("[LOADREGIONS]: " + Name + " cannot be default-initialized!"); | 76 | m_log.Info("[LOADREGIONS]: " + Name + " cannot be default-initialized!"); |
77 | throw new PluginNotInitialisedException(Name); | 77 | throw new PluginNotInitialisedException(Name); |
78 | } | 78 | } |
79 | 79 | ||
80 | public void Initialise(OpenSimBase openSim) | 80 | public void Initialise(OpenSimBase openSim) |
81 | { | 81 | { |
82 | m_openSim = openSim; | 82 | m_openSim = openSim; |
83 | m_httpServer = openSim.HttpServer; | 83 | m_httpServer = openSim.HttpServer; |
84 | 84 | ||
85 | InitialiseCommsManager(openSim); | 85 | InitialiseCommsManager(openSim); |
86 | if (m_commsManager != null) | 86 | if (m_commsManager != null) |
87 | { | 87 | { |
88 | m_openSim.ApplicationRegistry.RegisterInterface<IUserService>(m_commsManager.UserService); | 88 | m_openSim.ApplicationRegistry.RegisterInterface<IUserService>(m_commsManager.UserService); |
89 | } | 89 | } |
90 | } | 90 | } |
91 | 91 | ||
92 | public void PostInitialise() | 92 | public void PostInitialise() |
93 | { | 93 | { |
94 | if (m_openSim.ApplicationRegistry.TryGet<LoadRegionsPlugin>(out m_loadRegionsPlugin)) | 94 | if (m_openSim.ApplicationRegistry.TryGet<LoadRegionsPlugin>(out m_loadRegionsPlugin)) |
95 | { | 95 | { |
96 | m_loadRegionsPlugin.OnNewRegionCreated += RegionCreated; | 96 | m_loadRegionsPlugin.OnNewRegionCreated += RegionCreated; |
97 | } | 97 | } |
98 | } | 98 | } |
99 | 99 | ||
100 | public void Dispose() | 100 | public void Dispose() |
101 | { | 101 | { |
102 | } | 102 | } |
103 | 103 | ||
104 | #endregion | 104 | #endregion |
105 | 105 | ||
106 | private void RegionCreated(IScene scene) | 106 | private void RegionCreated(IScene scene) |
107 | { | 107 | { |
108 | if (m_commsManager != null) | 108 | if (m_commsManager != null) |
109 | { | 109 | { |
110 | scene.RegisterModuleInterface<IUserService>(m_commsManager.UserService); | 110 | scene.RegisterModuleInterface<IUserService>(m_commsManager.UserService); |
111 | } | 111 | } |
112 | } | 112 | } |
113 | 113 | ||
114 | private void InitialiseCommsManager(OpenSimBase openSim) | 114 | private void InitialiseCommsManager(OpenSimBase openSim) |
115 | { | 115 | { |
116 | LibraryRootFolder libraryRootFolder = new LibraryRootFolder(m_openSim.ConfigurationSettings.LibrariesXMLFile); | 116 | LibraryRootFolder libraryRootFolder = new LibraryRootFolder(m_openSim.ConfigurationSettings.LibrariesXMLFile); |
117 | 117 | ||
118 | bool hgrid = m_openSim.ConfigSource.Source.Configs["Startup"].GetBoolean("hypergrid", false); | 118 | bool hgrid = m_openSim.ConfigSource.Source.Configs["Startup"].GetBoolean("hypergrid", false); |
119 | 119 | ||
120 | if (hgrid) | 120 | if (hgrid) |
121 | { | 121 | { |
122 | HGOpenSimNode hgNode = (HGOpenSimNode)openSim; | 122 | HGOpenSimNode hgNode = (HGOpenSimNode)openSim; |
123 | 123 | ||
124 | // Standalone mode is determined by !startupConfig.GetBoolean("gridmode", false) | 124 | // Standalone mode is determined by !startupConfig.GetBoolean("gridmode", false) |
125 | if (m_openSim.ConfigurationSettings.Standalone) | 125 | if (m_openSim.ConfigurationSettings.Standalone) |
126 | { | 126 | { |
127 | InitialiseHGStandaloneServices(libraryRootFolder); | 127 | InitialiseHGStandaloneServices(libraryRootFolder); |
128 | } | 128 | } |
129 | else | 129 | else |
130 | { | 130 | { |
131 | // We are in grid mode | 131 | // We are in grid mode |
132 | InitialiseHGGridServices(libraryRootFolder); | 132 | InitialiseHGGridServices(libraryRootFolder); |
133 | } | 133 | } |
134 | hgNode.HGServices = HGServices; | 134 | hgNode.HGServices = HGServices; |
135 | } | 135 | } |
136 | else | 136 | else |
137 | { | 137 | { |
138 | // Standalone mode is determined by !startupConfig.GetBoolean("gridmode", false) | 138 | // Standalone mode is determined by !startupConfig.GetBoolean("gridmode", false) |
139 | if (m_openSim.ConfigurationSettings.Standalone) | 139 | if (m_openSim.ConfigurationSettings.Standalone) |
140 | { | 140 | { |
141 | InitialiseStandaloneServices(libraryRootFolder); | 141 | InitialiseStandaloneServices(libraryRootFolder); |
142 | } | 142 | } |
143 | else | 143 | else |
144 | { | 144 | { |
145 | // We are in grid mode | 145 | // We are in grid mode |
146 | InitialiseGridServices(libraryRootFolder); | 146 | InitialiseGridServices(libraryRootFolder); |
147 | } | 147 | } |
148 | } | 148 | } |
149 | 149 | ||
150 | openSim.CommunicationsManager = m_commsManager; | 150 | openSim.CommunicationsManager = m_commsManager; |
151 | } | 151 | } |
152 | 152 | ||
153 | /// <summary> | 153 | /// <summary> |
154 | /// Initialises the backend services for standalone mode, and registers some http handlers | 154 | /// Initialises the backend services for standalone mode, and registers some http handlers |
155 | /// </summary> | 155 | /// </summary> |
156 | /// <param name="libraryRootFolder"></param> | 156 | /// <param name="libraryRootFolder"></param> |
157 | protected virtual void InitialiseStandaloneServices(LibraryRootFolder libraryRootFolder) | 157 | protected virtual void InitialiseStandaloneServices(LibraryRootFolder libraryRootFolder) |
158 | { | 158 | { |
159 | LocalInventoryService inventoryService = new LocalInventoryService(); | 159 | LocalInventoryService inventoryService = new LocalInventoryService(); |
160 | inventoryService.AddPlugin(m_openSim.ConfigurationSettings.StandaloneInventoryPlugin, m_openSim.ConfigurationSettings.StandaloneInventorySource); | 160 | inventoryService.AddPlugin(m_openSim.ConfigurationSettings.StandaloneInventoryPlugin, m_openSim.ConfigurationSettings.StandaloneInventorySource); |
161 | 161 | ||
162 | LocalUserServices userService = | 162 | LocalUserServices userService = |
163 | new LocalUserServices( | 163 | new LocalUserServices( |
164 | m_openSim.NetServersInfo.DefaultHomeLocX, m_openSim.NetServersInfo.DefaultHomeLocY, inventoryService); | 164 | m_openSim.NetServersInfo.DefaultHomeLocX, m_openSim.NetServersInfo.DefaultHomeLocY, inventoryService); |
165 | userService.AddPlugin(m_openSim.ConfigurationSettings.StandaloneUserPlugin, m_openSim.ConfigurationSettings.StandaloneUserSource); | 165 | userService.AddPlugin(m_openSim.ConfigurationSettings.StandaloneUserPlugin, m_openSim.ConfigurationSettings.StandaloneUserSource); |
166 | 166 | ||
167 | LocalBackEndServices backendService = new LocalBackEndServices(); | 167 | LocalBackEndServices backendService = new LocalBackEndServices(); |
168 | 168 | ||
169 | LocalLoginService loginService = | 169 | LocalLoginService loginService = |
170 | new LocalLoginService( | 170 | new LocalLoginService( |
171 | userService, m_openSim.ConfigurationSettings.StandaloneWelcomeMessage, inventoryService, backendService, m_openSim.NetServersInfo, | 171 | userService, m_openSim.ConfigurationSettings.StandaloneWelcomeMessage, inventoryService, backendService, m_openSim.NetServersInfo, |
172 | m_openSim.ConfigurationSettings.StandaloneAuthenticate, libraryRootFolder); | 172 | m_openSim.ConfigurationSettings.StandaloneAuthenticate, libraryRootFolder); |
173 | 173 | ||
174 | m_commsManager | 174 | m_commsManager |
175 | = new CommunicationsLocal( | 175 | = new CommunicationsLocal( |
176 | m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, userService, userService, | 176 | m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, userService, userService, |
177 | inventoryService, backendService, userService, | 177 | inventoryService, backendService, userService, |
178 | libraryRootFolder, m_openSim.ConfigurationSettings.DumpAssetsToFile); | 178 | libraryRootFolder, m_openSim.ConfigurationSettings.DumpAssetsToFile); |
179 | 179 | ||
180 | // set up XMLRPC handler for client's initial login request message | 180 | // set up XMLRPC handler for client's initial login request message |
181 | m_httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod); | 181 | m_httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod); |
182 | 182 | ||
183 | // provides the web form login | 183 | // provides the web form login |
184 | m_httpServer.AddHTTPHandler("login", loginService.ProcessHTMLLogin); | 184 | m_httpServer.AddHTTPHandler("login", loginService.ProcessHTMLLogin); |
185 | 185 | ||
186 | // Provides the LLSD login | 186 | // Provides the LLSD login |
187 | m_httpServer.SetDefaultLLSDHandler(loginService.LLSDLoginMethod); | 187 | m_httpServer.SetDefaultLLSDHandler(loginService.LLSDLoginMethod); |
188 | 188 | ||
189 | // provide grid info | 189 | // provide grid info |
190 | // m_gridInfoService = new GridInfoService(m_config.Source.Configs["Startup"].GetString("inifile", Path.Combine(Util.configDir(), "OpenSim.ini"))); | 190 | // m_gridInfoService = new GridInfoService(m_config.Source.Configs["Startup"].GetString("inifile", Path.Combine(Util.configDir(), "OpenSim.ini"))); |
191 | m_gridInfoService = new GridInfoService(m_openSim.ConfigSource.Source); | 191 | m_gridInfoService = new GridInfoService(m_openSim.ConfigSource.Source); |
192 | m_httpServer.AddXmlRPCHandler("get_grid_info", m_gridInfoService.XmlRpcGridInfoMethod); | 192 | m_httpServer.AddXmlRPCHandler("get_grid_info", m_gridInfoService.XmlRpcGridInfoMethod); |
193 | m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info", m_gridInfoService.RestGetGridInfoMethod)); | 193 | m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info", m_gridInfoService.RestGetGridInfoMethod)); |
194 | } | 194 | } |
195 | 195 | ||
196 | protected virtual void InitialiseGridServices(LibraryRootFolder libraryRootFolder) | 196 | protected virtual void InitialiseGridServices(LibraryRootFolder libraryRootFolder) |
197 | { | 197 | { |
198 | m_commsManager | 198 | m_commsManager |
199 | = new CommunicationsOGS1(m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, libraryRootFolder); | 199 | = new CommunicationsOGS1(m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, libraryRootFolder); |
200 | 200 | ||
201 | m_httpServer.AddStreamHandler(new OpenSim.SimStatusHandler()); | 201 | m_httpServer.AddStreamHandler(new OpenSim.SimStatusHandler()); |
202 | } | 202 | } |
203 | 203 | ||
204 | protected virtual void InitialiseHGStandaloneServices(LibraryRootFolder libraryRootFolder) | 204 | protected virtual void InitialiseHGStandaloneServices(LibraryRootFolder libraryRootFolder) |
205 | { | 205 | { |
206 | // Standalone mode | 206 | // Standalone mode |
207 | 207 | ||
208 | HGInventoryService inventoryService = new HGInventoryService(m_openSim.NetServersInfo.InventoryURL, null, false); | 208 | HGInventoryService inventoryService = new HGInventoryService(m_openSim.NetServersInfo.InventoryURL, null, false); |
209 | inventoryService.AddPlugin(m_openSim.ConfigurationSettings.StandaloneInventoryPlugin, m_openSim.ConfigurationSettings.StandaloneInventorySource); | 209 | inventoryService.AddPlugin(m_openSim.ConfigurationSettings.StandaloneInventoryPlugin, m_openSim.ConfigurationSettings.StandaloneInventorySource); |
210 | 210 | ||
211 | LocalUserServices userService = | 211 | LocalUserServices userService = |
212 | new LocalUserServices( | 212 | new LocalUserServices( |
213 | m_openSim.NetServersInfo.DefaultHomeLocX, m_openSim.NetServersInfo.DefaultHomeLocY, inventoryService); | 213 | m_openSim.NetServersInfo.DefaultHomeLocX, m_openSim.NetServersInfo.DefaultHomeLocY, inventoryService); |
214 | userService.AddPlugin(m_openSim.ConfigurationSettings.StandaloneUserPlugin, m_openSim.ConfigurationSettings.StandaloneUserSource); | 214 | userService.AddPlugin(m_openSim.ConfigurationSettings.StandaloneUserPlugin, m_openSim.ConfigurationSettings.StandaloneUserSource); |
215 | 215 | ||
216 | //LocalBackEndServices backendService = new LocalBackEndServices(); | 216 | //LocalBackEndServices backendService = new LocalBackEndServices(); |
217 | HGGridServicesStandalone gridService = new HGGridServicesStandalone(m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, m_openSim.SceneManager); | 217 | HGGridServicesStandalone gridService = new HGGridServicesStandalone(m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, m_openSim.SceneManager); |
218 | 218 | ||
219 | LocalLoginService loginService = | 219 | LocalLoginService loginService = |
220 | new LocalLoginService( | 220 | new LocalLoginService( |
221 | userService, m_openSim.ConfigurationSettings.StandaloneWelcomeMessage, inventoryService, gridService.LocalBackend, m_openSim.NetServersInfo, | 221 | userService, m_openSim.ConfigurationSettings.StandaloneWelcomeMessage, inventoryService, gridService.LocalBackend, m_openSim.NetServersInfo, |
222 | m_openSim.ConfigurationSettings.StandaloneAuthenticate, libraryRootFolder); | 222 | m_openSim.ConfigurationSettings.StandaloneAuthenticate, libraryRootFolder); |
223 | 223 | ||
224 | 224 | ||
225 | m_commsManager = new HGCommunicationsStandalone(m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, | 225 | m_commsManager = new HGCommunicationsStandalone(m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, |
226 | userService, userService, inventoryService, gridService, userService, libraryRootFolder, m_openSim.ConfigurationSettings.DumpAssetsToFile); | 226 | userService, userService, inventoryService, gridService, userService, libraryRootFolder, m_openSim.ConfigurationSettings.DumpAssetsToFile); |
227 | 227 | ||
228 | inventoryService.UserProfileCache = m_commsManager.UserProfileCacheService; | 228 | inventoryService.UserProfileCache = m_commsManager.UserProfileCacheService; |
229 | HGServices = gridService; | 229 | HGServices = gridService; |
230 | 230 | ||
231 | // set up XMLRPC handler for client's initial login request message | 231 | // set up XMLRPC handler for client's initial login request message |
232 | m_httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod); | 232 | m_httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod); |
233 | 233 | ||
234 | // provides the web form login | 234 | // provides the web form login |
235 | m_httpServer.AddHTTPHandler("login", loginService.ProcessHTMLLogin); | 235 | m_httpServer.AddHTTPHandler("login", loginService.ProcessHTMLLogin); |
236 | 236 | ||
237 | // Provides the LLSD login | 237 | // Provides the LLSD login |
238 | m_httpServer.SetDefaultLLSDHandler(loginService.LLSDLoginMethod); | 238 | m_httpServer.SetDefaultLLSDHandler(loginService.LLSDLoginMethod); |
239 | 239 | ||
240 | // provide grid info | 240 | // provide grid info |
241 | // m_gridInfoService = new GridInfoService(m_config.Source.Configs["Startup"].GetString("inifile", Path.Combine(Util.configDir(), "OpenSim.ini"))); | 241 | // m_gridInfoService = new GridInfoService(m_config.Source.Configs["Startup"].GetString("inifile", Path.Combine(Util.configDir(), "OpenSim.ini"))); |
242 | m_gridInfoService = new GridInfoService(m_openSim.ConfigSource.Source); | 242 | m_gridInfoService = new GridInfoService(m_openSim.ConfigSource.Source); |
243 | m_httpServer.AddXmlRPCHandler("get_grid_info", m_gridInfoService.XmlRpcGridInfoMethod); | 243 | m_httpServer.AddXmlRPCHandler("get_grid_info", m_gridInfoService.XmlRpcGridInfoMethod); |
244 | m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info", m_gridInfoService.RestGetGridInfoMethod)); | 244 | m_httpServer.AddStreamHandler(new RestStreamHandler("GET", "/get_grid_info", m_gridInfoService.RestGetGridInfoMethod)); |
245 | } | 245 | } |
246 | 246 | ||
247 | protected virtual void InitialiseHGGridServices(LibraryRootFolder libraryRootFolder) | 247 | protected virtual void InitialiseHGGridServices(LibraryRootFolder libraryRootFolder) |
248 | { | 248 | { |
249 | m_commsManager = new HGCommunicationsGridMode(m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, m_openSim.SceneManager, libraryRootFolder); | 249 | m_commsManager = new HGCommunicationsGridMode(m_openSim.NetServersInfo, m_httpServer, m_openSim.AssetCache, m_openSim.SceneManager, libraryRootFolder); |
250 | 250 | ||
251 | HGServices = ((HGCommunicationsGridMode)m_commsManager).HGServices; | 251 | HGServices = ((HGCommunicationsGridMode)m_commsManager).HGServices; |
252 | 252 | ||
253 | m_httpServer.AddStreamHandler(new OpenSim.SimStatusHandler()); | 253 | m_httpServer.AddStreamHandler(new OpenSim.SimStatusHandler()); |
254 | } | 254 | } |
255 | } | 255 | } |
256 | } | 256 | } |
diff --git a/OpenSim/ApplicationPlugins/CreateCommsManager/Resources/CreateCommsManagerPlugin.addin.xml b/OpenSim/ApplicationPlugins/CreateCommsManager/Resources/CreateCommsManagerPlugin.addin.xml index 2a488ef..ec042f3 100644 --- a/OpenSim/ApplicationPlugins/CreateCommsManager/Resources/CreateCommsManagerPlugin.addin.xml +++ b/OpenSim/ApplicationPlugins/CreateCommsManager/Resources/CreateCommsManagerPlugin.addin.xml | |||
@@ -1,11 +1,11 @@ | |||
1 | <Addin id="OpenSim.ApplicationPlugins.CreateCommsManager" version="0.1"> | 1 | <Addin id="OpenSim.ApplicationPlugins.CreateCommsManager" version="0.1"> |
2 | <Runtime> | 2 | <Runtime> |
3 | <Import assembly="OpenSim.ApplicationPlugins.CreateCommsManager.dll"/> | 3 | <Import assembly="OpenSim.ApplicationPlugins.CreateCommsManager.dll"/> |
4 | </Runtime> | 4 | </Runtime> |
5 | <Dependencies> | 5 | <Dependencies> |
6 | <Addin id="OpenSim" version="0.5" /> | 6 | <Addin id="OpenSim" version="0.5" /> |
7 | </Dependencies> | 7 | </Dependencies> |
8 | <Extension path = "/OpenSim/Startup"> | 8 | <Extension path = "/OpenSim/Startup"> |
9 | <Plugin id="CreateCommsManager" type="OpenSim.ApplicationPlugins.CreateCommsManager.CreateCommsManagerPlugin" /> | 9 | <Plugin id="CreateCommsManager" type="OpenSim.ApplicationPlugins.CreateCommsManager.CreateCommsManagerPlugin" /> |
10 | </Extension> | 10 | </Extension> |
11 | </Addin> | 11 | </Addin> |