aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/LoginService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/LoginService.cs')
-rw-r--r--OpenSim/Framework/Communications/LoginService.cs50
1 files changed, 29 insertions, 21 deletions
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs
index bef20f7..a9d5d8b 100644
--- a/OpenSim/Framework/Communications/LoginService.cs
+++ b/OpenSim/Framework/Communications/LoginService.cs
@@ -28,9 +28,12 @@
28 28
29using System; 29using System;
30using System.Collections; 30using System.Collections;
31using System.Collections.Generic;
31using System.Threading; 32using System.Threading;
32using libsecondlife; 33using libsecondlife;
33using Nwc.XmlRpc; 34using Nwc.XmlRpc;
35
36using OpenSim.Framework.Communications.Cache;
34using OpenSim.Framework.Console; 37using OpenSim.Framework.Console;
35 38
36namespace OpenSim.Framework.UserManagement 39namespace OpenSim.Framework.UserManagement
@@ -40,10 +43,18 @@ namespace OpenSim.Framework.UserManagement
40 protected string m_welcomeMessage = "Welcome to OpenSim"; 43 protected string m_welcomeMessage = "Welcome to OpenSim";
41 protected UserManagerBase m_userManager = null; 44 protected UserManagerBase m_userManager = null;
42 protected Mutex m_loginMutex = new Mutex(false); 45 protected Mutex m_loginMutex = new Mutex(false);
46
47 /// <summary>
48 /// Used during login to send the skeleton of the OpenSim Library to the client.
49 /// </summary>
50 protected LibraryRootFolder m_libraryRootFolder;
43 51
44 public LoginService(UserManagerBase userManager, string welcomeMess) 52 public LoginService(
53 UserManagerBase userManager, LibraryRootFolder libraryRootFolder, string welcomeMess)
45 { 54 {
46 m_userManager = userManager; 55 m_userManager = userManager;
56 m_libraryRootFolder = libraryRootFolder;
57
47 if (welcomeMess != "") 58 if (welcomeMess != "")
48 { 59 {
49 m_welcomeMessage = welcomeMess; 60 m_welcomeMessage = welcomeMess;
@@ -255,30 +266,27 @@ namespace OpenSim.Framework.UserManagement
255 } 266 }
256 267
257 /// <summary> 268 /// <summary>
258 /// 269 /// Converts the inventory library skeleton into the form required by the rpc request.
259 /// </summary> 270 /// </summary>
260 /// <returns></returns> 271 /// <returns></returns>
261 protected virtual ArrayList GetInventoryLibrary() 272 protected virtual ArrayList GetInventoryLibrary()
262 { 273 {
263 //return new ArrayList(); 274 Dictionary<LLUUID, InventoryFolderImpl> rootFolders
264 Hashtable TempHash = new Hashtable(); 275 = m_libraryRootFolder.RequestSelfAndDescendentFolders();
265 TempHash["name"] = "OpenSim Library"; 276 ArrayList folderHashes = new ArrayList();
266 TempHash["parent_id"] = LLUUID.Zero.ToString(); 277
267 TempHash["version"] = 1; 278 foreach (InventoryFolderBase folder in rootFolders.Values)
268 TempHash["type_default"] = -1; 279 {
269 TempHash["folder_id"] = "00000112-000f-0000-0000-000100bba000"; 280 Hashtable TempHash = new Hashtable();
270 ArrayList temp = new ArrayList(); 281 TempHash["name"] = folder.name;
271 temp.Add(TempHash); 282 TempHash["parent_id"] = folder.parentID.ToString();
272 283 TempHash["version"] = folder.version;
273 TempHash = new Hashtable(); 284 TempHash["type_default"] = folder.type;
274 TempHash["name"] = "Texture Library"; 285 TempHash["folder_id"] = folder.folderID.ToString();
275 TempHash["parent_id"] = "00000112-000f-0000-0000-000100bba000"; 286 folderHashes.Add(TempHash);
276 TempHash["version"] = 1; 287 }
277 TempHash["type_default"] = -1; 288
278 TempHash["folder_id"] = "00000112-000f-0000-0000-000100bba001"; 289 return folderHashes;
279 temp.Add(TempHash);
280
281 return temp;
282 } 290 }
283 291
284 /// <summary> 292 /// <summary>