From f7eac63e01d957bd9c115ac0f55d1dd6109f6aea Mon Sep 17 00:00:00 2001 From: diva Date: Sun, 29 Mar 2009 22:04:45 +0000 Subject: Another bit of refactoring to try to make sense of OpenSim.Framework.Communications. Everything that looks like a service, with service handlers, moved to .Services -- i.e. LoginService and Response, and GridInfoService. The rest of the changes were to adapt to the new locations of those files. --- .../Communications/Services/HGInventoryService.cs | 33 ++++++++++++++++++---- 1 file changed, 27 insertions(+), 6 deletions(-) (limited to 'OpenSim/Framework/Communications/Services/HGInventoryService.cs') diff --git a/OpenSim/Framework/Communications/Services/HGInventoryService.cs b/OpenSim/Framework/Communications/Services/HGInventoryService.cs index f0b2259..33d7722 100644 --- a/OpenSim/Framework/Communications/Services/HGInventoryService.cs +++ b/OpenSim/Framework/Communications/Services/HGInventoryService.cs @@ -52,19 +52,41 @@ namespace OpenSim.Framework.Communications.Services = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private InventoryServiceBase m_inventoryService; - private UserManagerBase m_userService; - IAssetDataPlugin m_assetProvider; IHttpServer httpServer; private string m_thisInventoryUrl = "http://localhost:9000"; private string m_thisHostname = "127.0.0.1"; private uint m_thisPort = 9000; + // These two used for local access, standalone mode + private UserManagerBase m_userService = null; + IAssetDataPlugin m_assetProvider = null; - public HGInventoryService(InventoryServiceBase invService, IAssetDataPlugin assetService, UserManagerBase userService, IHttpServer httpserver, string url) + // These two used for remote access + string m_UserServerURL = string.Empty; + string m_AssetServerURL = string.Empty; + + // Constructor for grid inventory server + public HGInventoryService(InventoryServiceBase invService, string assetServiceURL, string userServiceURL, IHttpServer httpserver, string thisurl) + { + m_UserServerURL = userServiceURL; + m_AssetServerURL = assetServiceURL; + + Init(invService, thisurl, httpserver); + } + + // Constructor for standalone mode + public HGInventoryService(InventoryServiceBase invService, IAssetDataPlugin assetService, UserManagerBase userService, IHttpServer httpserver, string thisurl) { - m_inventoryService = invService; m_userService = userService; - m_thisInventoryUrl = url; + m_assetProvider = assetService; + + Init(invService, thisurl, httpserver); + } + + private void Init(InventoryServiceBase invService, string thisurl, IHttpServer httpserver) + { + m_inventoryService = invService; + m_thisInventoryUrl = thisurl; if (!m_thisInventoryUrl.EndsWith("/")) m_thisInventoryUrl += "/"; @@ -75,7 +97,6 @@ namespace OpenSim.Framework.Communications.Services m_thisPort = (uint)uri.Port; } - m_assetProvider = assetService; httpServer = httpserver; AddHttpHandlers(); -- cgit v1.1