aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/LLLoginService/LLLoginService.cs
diff options
context:
space:
mode:
authorDiva Canto2010-01-01 21:12:46 -0800
committerDiva Canto2010-01-01 21:12:46 -0800
commit8a9677a5319793ff630d0761e204ae8961f375aa (patch)
tree0b92d2c9258383df59866945ebad7ba8479563d0 /OpenSim/Services/LLLoginService/LLLoginService.cs
parentForgotten modules in prior commit. (diff)
downloadopensim-SC_OLD-8a9677a5319793ff630d0761e204ae8961f375aa.zip
opensim-SC_OLD-8a9677a5319793ff630d0761e204ae8961f375aa.tar.gz
opensim-SC_OLD-8a9677a5319793ff630d0761e204ae8961f375aa.tar.bz2
opensim-SC_OLD-8a9677a5319793ff630d0761e204ae8961f375aa.tar.xz
The Library Service is now working. UserProfileCacheService.LibraryRoot is obsolete. Didn't delete it yet to avoid merge conflicts later -- want to stay out of core as much as possible.
Diffstat (limited to 'OpenSim/Services/LLLoginService/LLLoginService.cs')
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginService.cs24
1 files changed, 20 insertions, 4 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs
index 58038cb..2b74539 100644
--- a/OpenSim/Services/LLLoginService/LLLoginService.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginService.cs
@@ -26,13 +26,14 @@ namespace OpenSim.Services.LLLoginService
26 private IGridService m_GridService; 26 private IGridService m_GridService;
27 private IPresenceService m_PresenceService; 27 private IPresenceService m_PresenceService;
28 private ISimulationService m_LocalSimulationService; 28 private ISimulationService m_LocalSimulationService;
29 private ILibraryService m_LibraryService;
29 30
30 private string m_DefaultRegionName; 31 private string m_DefaultRegionName;
31 private string m_RemoteSimulationDll; 32 private string m_RemoteSimulationDll;
32 private string m_WelcomeMessage; 33 private string m_WelcomeMessage;
33 private bool m_RequireInventory; 34 private bool m_RequireInventory;
34 35
35 public LLLoginService(IConfigSource config, ISimulationService simService) 36 public LLLoginService(IConfigSource config, ISimulationService simService, ILibraryService libraryService)
36 { 37 {
37 IConfig serverConfig = config.Configs["LoginService"]; 38 IConfig serverConfig = config.Configs["LoginService"];
38 if (serverConfig == null) 39 if (serverConfig == null)
@@ -43,13 +44,14 @@ namespace OpenSim.Services.LLLoginService
43 string invService = serverConfig.GetString("InventoryService", String.Empty); 44 string invService = serverConfig.GetString("InventoryService", String.Empty);
44 string gridService = serverConfig.GetString("GridService", String.Empty); 45 string gridService = serverConfig.GetString("GridService", String.Empty);
45 string presenceService = serverConfig.GetString("PresenceService", String.Empty); 46 string presenceService = serverConfig.GetString("PresenceService", String.Empty);
47 string libService = serverConfig.GetString("LibraryService", String.Empty);
46 48
47 m_DefaultRegionName = serverConfig.GetString("DefaultRegion", String.Empty); 49 m_DefaultRegionName = serverConfig.GetString("DefaultRegion", String.Empty);
48 m_RemoteSimulationDll = serverConfig.GetString("RemoteSimulationService", String.Empty); 50 m_RemoteSimulationDll = serverConfig.GetString("RemoteSimulationService", String.Empty);
49 m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!"); 51 m_WelcomeMessage = serverConfig.GetString("WelcomeMessage", "Welcome to OpenSim!");
50 m_RequireInventory = serverConfig.GetBoolean("RequireInventory", true); 52 m_RequireInventory = serverConfig.GetBoolean("RequireInventory", true);
51 53
52 // These 3 are required; the other 2 aren't 54 // These 3 are required; the others aren't
53 if (accountService == string.Empty || authService == string.Empty || 55 if (accountService == string.Empty || authService == string.Empty ||
54 invService == string.Empty) 56 invService == string.Empty)
55 throw new Exception("LoginService is missing service specifications"); 57 throw new Exception("LoginService is missing service specifications");
@@ -62,13 +64,27 @@ namespace OpenSim.Services.LLLoginService
62 m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args); 64 m_GridService = ServerUtils.LoadPlugin<IGridService>(gridService, args);
63 if (presenceService != string.Empty) 65 if (presenceService != string.Empty)
64 m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args); 66 m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(presenceService, args);
67
68 //
69 // deal with the services given as argument
70 //
65 m_LocalSimulationService = simService; 71 m_LocalSimulationService = simService;
72 if (libraryService != null)
73 {
74 m_log.DebugFormat("[LLOGIN SERVICE]: Using LibraryService given as argument");
75 m_LibraryService = libraryService;
76 }
77 else if (libService != string.Empty)
78 {
79 m_log.DebugFormat("[LLOGIN SERVICE]: Using instantiated LibraryService");
80 m_LibraryService = ServerUtils.LoadPlugin<ILibraryService>(libService, args);
81 }
66 82
67 m_log.DebugFormat("[LLOGIN SERVICE]: Starting..."); 83 m_log.DebugFormat("[LLOGIN SERVICE]: Starting...");
68 84
69 } 85 }
70 86
71 public LLLoginService(IConfigSource config) : this(config, null) 87 public LLLoginService(IConfigSource config) : this(config, null, null)
72 { 88 {
73 } 89 }
74 90
@@ -171,7 +187,7 @@ namespace OpenSim.Services.LLLoginService
171 // TODO: Get Friends list... 187 // TODO: Get Friends list...
172 188
173 // Finally, fill out the response and return it 189 // Finally, fill out the response and return it
174 LLLoginResponse response = new LLLoginResponse(account, aCircuit, presence, destination, inventorySkel, 190 LLLoginResponse response = new LLLoginResponse(account, aCircuit, presence, destination, inventorySkel, m_LibraryService,
175 where, startLocation, position, lookAt, m_WelcomeMessage, home, clientIP); 191 where, startLocation, position, lookAt, m_WelcomeMessage, home, clientIP);
176 192
177 return response; 193 return response;