diff options
author | Justin Clarke Casey | 2009-04-22 22:19:43 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-04-22 22:19:43 +0000 |
commit | 342126b7b9ca386f9160daecb51ecc14487a5f9f (patch) | |
tree | a485a50aebead411fa2f38528b4c0b7ba19e91db /OpenSim/Region/Communications/Hypergrid | |
parent | * Resolve http://opensimulator.org/mantis/view.php?id=3509 by passing up the ... (diff) | |
download | opensim-SC_OLD-342126b7b9ca386f9160daecb51ecc14487a5f9f.zip opensim-SC_OLD-342126b7b9ca386f9160daecb51ecc14487a5f9f.tar.gz opensim-SC_OLD-342126b7b9ca386f9160daecb51ecc14487a5f9f.tar.bz2 opensim-SC_OLD-342126b7b9ca386f9160daecb51ecc14487a5f9f.tar.xz |
* Resolve http://opensimulator.org/mantis/view.php?id=3509 by putting some service initialization into CommsManager
* What is really needed is a plugin and interface request system as being done for region modules
Diffstat (limited to 'OpenSim/Region/Communications/Hypergrid')
-rw-r--r-- | OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs | 37 | ||||
-rw-r--r-- | OpenSim/Region/Communications/Hypergrid/HGUserServices.cs | 8 |
2 files changed, 29 insertions, 16 deletions
diff --git a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs index b649a91..126f42b 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGCommunicationsStandalone.cs | |||
@@ -25,32 +25,53 @@ | |||
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 | |||
29 | using OpenSim.Framework; | 28 | using OpenSim.Framework; |
30 | using OpenSim.Framework.Communications; | 29 | using OpenSim.Framework.Communications; |
31 | using OpenSim.Framework.Communications.Cache; | 30 | using OpenSim.Framework.Communications.Cache; |
32 | using OpenSim.Framework.Servers; | 31 | using OpenSim.Framework.Servers; |
33 | using OpenSim.Region.Communications.Local; | 32 | using OpenSim.Region.Communications.Local; |
33 | using OpenSim.Region.Communications.OGS1; | ||
34 | 34 | ||
35 | namespace OpenSim.Region.Communications.Hypergrid | 35 | namespace OpenSim.Region.Communications.Hypergrid |
36 | { | 36 | { |
37 | public class HGCommunicationsStandalone : CommunicationsLocal | 37 | public class HGCommunicationsStandalone : CommunicationsManager |
38 | { | 38 | { |
39 | public HGCommunicationsStandalone( | 39 | public HGCommunicationsStandalone( |
40 | ConfigSettings configSettings, | ||
40 | NetworkServersInfo serversInfo, | 41 | NetworkServersInfo serversInfo, |
41 | BaseHttpServer httpServer, | 42 | BaseHttpServer httpServer, |
42 | IAssetCache assetCache, | 43 | IAssetCache assetCache, |
43 | IUserService userService, | ||
44 | IUserAdminService userServiceAdmin, | ||
45 | LocalInventoryService inventoryService, | 44 | LocalInventoryService inventoryService, |
46 | HGGridServices gridService, IMessagingService messageService, LibraryRootFolder libraryRootFolder, bool dumpAssetsToFile) | 45 | HGGridServices gridService, |
47 | : base(serversInfo, httpServer, assetCache, userService, userServiceAdmin, inventoryService, gridService, messageService, libraryRootFolder, dumpAssetsToFile) | 46 | LibraryRootFolder libraryRootFolder, |
48 | { | 47 | bool dumpAssetsToFile) |
49 | gridService.UserProfileCache = m_userProfileCacheService; | 48 | : base(serversInfo, httpServer, assetCache, dumpAssetsToFile, libraryRootFolder) |
49 | { | ||
50 | LocalUserServices localUserService = | ||
51 | new LocalUserServices( | ||
52 | serversInfo.DefaultHomeLocX, serversInfo.DefaultHomeLocY, this); | ||
53 | localUserService.AddPlugin(configSettings.StandaloneUserPlugin, configSettings.StandaloneUserSource); | ||
54 | |||
55 | AddInventoryService(inventoryService); | ||
56 | m_defaultInventoryHost = inventoryService.Host; | ||
57 | m_interServiceInventoryService = inventoryService; | ||
58 | |||
50 | m_assetCache = assetCache; | 59 | m_assetCache = assetCache; |
51 | // Let's swap to always be secure access to inventory | 60 | // Let's swap to always be secure access to inventory |
52 | AddSecureInventoryService((ISecureInventoryService)inventoryService); | 61 | AddSecureInventoryService((ISecureInventoryService)inventoryService); |
53 | m_inventoryServices = null; | 62 | m_inventoryServices = null; |
63 | |||
64 | HGUserServices hgUserService = new HGUserServices(this, localUserService); | ||
65 | // This plugin arrangement could eventually be configurable rather than hardcoded here. | ||
66 | hgUserService.AddPlugin(new OGS1UserDataPlugin(this)); | ||
67 | |||
68 | m_userService = hgUserService; | ||
69 | m_userAdminService = hgUserService; | ||
70 | m_avatarService = hgUserService; | ||
71 | m_messageService = hgUserService; | ||
72 | |||
73 | gridService.UserProfileCache = m_userProfileCacheService; | ||
74 | m_gridService = gridService; | ||
54 | } | 75 | } |
55 | } | 76 | } |
56 | } | 77 | } |
diff --git a/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs b/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs index 25c6341..93d5434 100644 --- a/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs +++ b/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs | |||
@@ -47,7 +47,6 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
47 | { | 47 | { |
48 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 48 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
49 | 49 | ||
50 | //private CommunicationsManager m_parent; | ||
51 | //private OGS1UserServices m_remoteUserServices; | 50 | //private OGS1UserServices m_remoteUserServices; |
52 | private LocalUserServices m_localUserServices; | 51 | private LocalUserServices m_localUserServices; |
53 | 52 | ||
@@ -64,12 +63,6 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
64 | m_localUserServices = local; | 63 | m_localUserServices = local; |
65 | } | 64 | } |
66 | 65 | ||
67 | // Called for standalone mode only, to set up the communications manager | ||
68 | public void SetCommunicationsManager(CommunicationsManager parent) | ||
69 | { | ||
70 | m_commsManager = parent; | ||
71 | } | ||
72 | |||
73 | /// <summary> | 66 | /// <summary> |
74 | /// Get a user agent from the user server | 67 | /// Get a user agent from the user server |
75 | /// </summary> | 68 | /// </summary> |
@@ -84,7 +77,6 @@ namespace OpenSim.Region.Communications.Hypergrid | |||
84 | return base.GetAgentByUUID(userId); | 77 | return base.GetAgentByUUID(userId); |
85 | } | 78 | } |
86 | 79 | ||
87 | |||
88 | /// <summary> | 80 | /// <summary> |
89 | /// Logs off a user on the user server | 81 | /// Logs off a user on the user server |
90 | /// </summary> | 82 | /// </summary> |