aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/LLLoginService/LLLoginResponse.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/LLLoginResponse.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/LLLoginResponse.cs')
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginResponse.cs34
1 files changed, 18 insertions, 16 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
index c80ab7f..4db6a05 100644
--- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
@@ -215,12 +215,12 @@ namespace OpenSim.Services.LLLoginService
215 } 215 }
216 216
217 public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, PresenceInfo pinfo, 217 public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, PresenceInfo pinfo,
218 GridRegion destination, List<InventoryFolderBase> invSkel, 218 GridRegion destination, List<InventoryFolderBase> invSkel, ILibraryService libService,
219 string where, string startlocation, Vector3 position, Vector3 lookAt, string message, 219 string where, string startlocation, Vector3 position, Vector3 lookAt, string message,
220 GridRegion home, IPEndPoint clientIP) 220 GridRegion home, IPEndPoint clientIP)
221 : this() 221 : this()
222 { 222 {
223 FillOutInventoryData(invSkel); 223 FillOutInventoryData(invSkel, libService);
224 224
225 CircuitCode = (int)aCircuit.circuitcode; 225 CircuitCode = (int)aCircuit.circuitcode;
226 Lastname = account.LastName; 226 Lastname = account.LastName;
@@ -243,7 +243,7 @@ namespace OpenSim.Services.LLLoginService
243 243
244 } 244 }
245 245
246 private void FillOutInventoryData(List<InventoryFolderBase> invSkel) 246 private void FillOutInventoryData(List<InventoryFolderBase> invSkel, ILibraryService libService)
247 { 247 {
248 InventoryData inventData = null; 248 InventoryData inventData = null;
249 249
@@ -272,13 +272,16 @@ namespace OpenSim.Services.LLLoginService
272 } 272 }
273 273
274 // Inventory Library Section 274 // Inventory Library Section
275 Hashtable InventoryLibRootHash = new Hashtable(); 275 if (libService != null && libService.LibraryRootFolder != null)
276 InventoryLibRootHash["folder_id"] = "00000112-000f-0000-0000-000100bba000"; 276 {
277 InventoryLibRoot = new ArrayList(); 277 Hashtable InventoryLibRootHash = new Hashtable();
278 InventoryLibRoot.Add(InventoryLibRootHash); 278 InventoryLibRootHash["folder_id"] = "00000112-000f-0000-0000-000100bba000";
279 InventoryLibRoot = new ArrayList();
280 InventoryLibRoot.Add(InventoryLibRootHash);
279 281
280 InventoryLibraryOwner = GetLibraryOwner(); 282 InventoryLibraryOwner = GetLibraryOwner(libService.LibraryRootFolder);
281 InventoryLibrary = GetInventoryLibrary(); 283 InventoryLibrary = GetInventoryLibrary(libService);
284 }
282 } 285 }
283 286
284 private void FillOutHomeData(PresenceInfo pinfo, GridRegion home) 287 private void FillOutHomeData(PresenceInfo pinfo, GridRegion home)
@@ -646,12 +649,11 @@ namespace OpenSim.Services.LLLoginService
646 /// Converts the inventory library skeleton into the form required by the rpc request. 649 /// Converts the inventory library skeleton into the form required by the rpc request.
647 /// </summary> 650 /// </summary>
648 /// <returns></returns> 651 /// <returns></returns>
649 protected virtual ArrayList GetInventoryLibrary() 652 protected virtual ArrayList GetInventoryLibrary(ILibraryService library)
650 { 653 {
651 // While we don't have library... 654 Dictionary<UUID, InventoryFolderImpl> rootFolders = library.GetAllFolders();
652 //Dictionary<UUID, InventoryFolderImpl> rootFolders 655 m_log.DebugFormat("[LLOGIN]: Library has {0} folders", rootFolders.Count);
653 // = m_libraryRootFolder.RequestSelfAndDescendentFolders(); 656 //Dictionary<UUID, InventoryFolderImpl> rootFolders = new Dictionary<UUID,InventoryFolderImpl>();
654 Dictionary<UUID, InventoryFolderImpl> rootFolders = new Dictionary<UUID,InventoryFolderImpl>();
655 ArrayList folderHashes = new ArrayList(); 657 ArrayList folderHashes = new ArrayList();
656 658
657 foreach (InventoryFolderBase folder in rootFolders.Values) 659 foreach (InventoryFolderBase folder in rootFolders.Values)
@@ -672,11 +674,11 @@ namespace OpenSim.Services.LLLoginService
672 /// 674 ///
673 /// </summary> 675 /// </summary>
674 /// <returns></returns> 676 /// <returns></returns>
675 protected virtual ArrayList GetLibraryOwner() 677 protected virtual ArrayList GetLibraryOwner(InventoryFolderImpl libFolder)
676 { 678 {
677 //for now create random inventory library owner 679 //for now create random inventory library owner
678 Hashtable TempHash = new Hashtable(); 680 Hashtable TempHash = new Hashtable();
679 TempHash["agent_id"] = "11111111-1111-0000-0000-000100bba000"; 681 TempHash["agent_id"] = "11111111-1111-0000-0000-000100bba000"; // libFolder.Owner
680 ArrayList inventoryLibOwner = new ArrayList(); 682 ArrayList inventoryLibOwner = new ArrayList();
681 inventoryLibOwner.Add(TempHash); 683 inventoryLibOwner.Add(TempHash);
682 return inventoryLibOwner; 684 return inventoryLibOwner;