aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/Local/LocalLoginService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Communications/Local/LocalLoginService.cs')
-rw-r--r--OpenSim/Region/Communications/Local/LocalLoginService.cs49
1 files changed, 49 insertions, 0 deletions
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs
index 19a1e8c..661fbbe 100644
--- a/OpenSim/Region/Communications/Local/LocalLoginService.cs
+++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs
@@ -1,10 +1,13 @@
1using System; 1using System;
2using System.Collections;
3using System.Collections.Generic;
2using libsecondlife; 4using libsecondlife;
3using OpenSim.Framework.Communications; 5using OpenSim.Framework.Communications;
4using OpenSim.Framework.Data; 6using OpenSim.Framework.Data;
5using OpenSim.Framework.Types; 7using OpenSim.Framework.Types;
6using OpenSim.Framework.UserManagement; 8using OpenSim.Framework.UserManagement;
7using OpenSim.Framework.Utilities; 9using OpenSim.Framework.Utilities;
10using OpenSim.Framework.Inventory;
8 11
9namespace OpenSim.Region.Communications.Local 12namespace OpenSim.Region.Communications.Local
10{ 13{
@@ -109,5 +112,51 @@ namespace OpenSim.Region.Communications.Local
109 } 112 }
110 113
111 } 114 }
115
116 protected override InventoryData CreateInventoryData(LLUUID userID)
117 {
118 List<InventoryFolderBase> folders = this.m_Parent.InvenServices.RequestFirstLevelFolders(userID);
119 if (folders.Count > 0)
120 {
121 LLUUID rootID = LLUUID.Zero;
122 ArrayList AgentInventoryArray = new ArrayList();
123 Hashtable TempHash;
124 foreach (InventoryFolderBase InvFolder in folders)
125 {
126 if (InvFolder.parentID == LLUUID.Zero)
127 {
128 rootID = InvFolder.folderID;
129 }
130 TempHash = new Hashtable();
131 TempHash["name"] = InvFolder.name;
132 TempHash["parent_id"] = InvFolder.parentID.ToStringHyphenated();
133 TempHash["version"] = (Int32)InvFolder.version;
134 TempHash["type_default"] = (Int32)InvFolder.type;
135 TempHash["folder_id"] = InvFolder.folderID.ToStringHyphenated();
136 AgentInventoryArray.Add(TempHash);
137 }
138 return new InventoryData(AgentInventoryArray, rootID);
139 }
140 else
141 {
142 AgentInventory userInventory = new AgentInventory();
143 userInventory.CreateRootFolder(userID, false);
144
145 ArrayList AgentInventoryArray = new ArrayList();
146 Hashtable TempHash;
147 foreach (OpenSim.Framework.Inventory.InventoryFolder InvFolder in userInventory.InventoryFolders.Values)
148 {
149 TempHash = new Hashtable();
150 TempHash["name"] = InvFolder.FolderName;
151 TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated();
152 TempHash["version"] = (Int32)InvFolder.Version;
153 TempHash["type_default"] = (Int32)InvFolder.DefaultType;
154 TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated();
155 AgentInventoryArray.Add(TempHash);
156 }
157
158 return new InventoryData(AgentInventoryArray, userInventory.InventoryRoot.FolderID);
159 }
160 }
112 } 161 }
113} 162}