aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs6
-rw-r--r--OpenSim/Services/HypergridService/HGInventoryService.cs4
-rw-r--r--OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs82
-rw-r--r--OpenSim/Services/Interfaces/IInventoryService.cs2
-rw-r--r--OpenSim/Services/InventoryService/XInventoryService.cs100
-rw-r--r--OpenSim/Services/LLLoginService/LLLoginResponse.cs2
-rw-r--r--OpenSim/Services/UserAccountService/UserAccountService.cs4
8 files changed, 102 insertions, 100 deletions
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
index 597d92b..b0615b8 100644
--- a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs
@@ -189,7 +189,7 @@ namespace OpenSim.Services.Connectors
189 return BuildFolder((Dictionary<string, object>)ret["folder"]); 189 return BuildFolder((Dictionary<string, object>)ret["folder"]);
190 } 190 }
191 191
192 public InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) 192 public InventoryFolderBase GetFolderForType(UUID principalID, FolderType type)
193 { 193 {
194 Dictionary<string,object> ret = MakeRequest("GETFOLDERFORTYPE", 194 Dictionary<string,object> ret = MakeRequest("GETFOLDERFORTYPE",
195 new Dictionary<string,object> { 195 new Dictionary<string,object> {
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
index a92c4fb..e793420 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs
@@ -240,7 +240,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
240 /// <param name="userID"></param> 240 /// <param name="userID"></param>
241 /// <param name="type"></param> 241 /// <param name="type"></param>
242 /// <returns></returns> 242 /// <returns></returns>
243 public InventoryFolderBase GetFolderForType(UUID userID, AssetType type) 243 public InventoryFolderBase GetFolderForType(UUID userID, FolderType type)
244 { 244 {
245 string contentType = SLUtil.SLAssetTypeToContentType((int)type); 245 string contentType = SLUtil.SLAssetTypeToContentType((int)type);
246 246
@@ -580,7 +580,9 @@ namespace OpenSim.Services.Connectors.SimianGrid
580 // A folder of UUID.Zero means we need to find the most appropriate home for this item 580 // A folder of UUID.Zero means we need to find the most appropriate home for this item
581 if (item.Folder == UUID.Zero) 581 if (item.Folder == UUID.Zero)
582 { 582 {
583 InventoryFolderBase folder = GetFolderForType(item.Owner, (AssetType)item.AssetType); 583 InventoryFolderBase folder = null;
584 if (Enum.IsDefined(typeof(FolderType), (sbyte)item.AssetType))
585 folder = GetFolderForType(item.Owner, (FolderType)item.AssetType);
584 if (folder != null && folder.ID != UUID.Zero) 586 if (folder != null && folder.ID != UUID.Zero)
585 item.Folder = folder.ID; 587 item.Folder = folder.ID;
586 else 588 else
diff --git a/OpenSim/Services/HypergridService/HGInventoryService.cs b/OpenSim/Services/HypergridService/HGInventoryService.cs
index 5f245e4..9158b41 100644
--- a/OpenSim/Services/HypergridService/HGInventoryService.cs
+++ b/OpenSim/Services/HypergridService/HGInventoryService.cs
@@ -115,7 +115,7 @@ namespace OpenSim.Services.HypergridService
115 return ConvertToOpenSim(folders[0]); 115 return ConvertToOpenSim(folders[0]);
116 116
117 // make one 117 // make one
118 XInventoryFolder suitcase = CreateFolder(principalID, UUID.Zero, (int)AssetType.Folder, "My Suitcase"); 118 XInventoryFolder suitcase = CreateFolder(principalID, UUID.Zero, (int)FolderType.Suitcase, "My Suitcase");
119 return ConvertToOpenSim(suitcase); 119 return ConvertToOpenSim(suitcase);
120 } 120 }
121 121
@@ -141,7 +141,7 @@ namespace OpenSim.Services.HypergridService
141 //} 141 //}
142 142
143 143
144 public override InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) 144 public override InventoryFolderBase GetFolderForType(UUID principalID, FolderType type)
145 { 145 {
146 //m_log.DebugFormat("[HG INVENTORY SERVICE]: GetFolderForType for {0} {0}", principalID, type); 146 //m_log.DebugFormat("[HG INVENTORY SERVICE]: GetFolderForType for {0} {0}", principalID, type);
147 return GetRootFolder(principalID); 147 return GetRootFolder(principalID);
diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
index d158537..319c2db 100644
--- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
+++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
@@ -158,7 +158,7 @@ namespace OpenSim.Services.HypergridService
158 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: User {0} does not have a Suitcase folder. Creating it...", principalID); 158 m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: User {0} does not have a Suitcase folder. Creating it...", principalID);
159 // Create the My Suitcase folder under the user's root folder. 159 // Create the My Suitcase folder under the user's root folder.
160 // In the DB we tag it as type 100, but we use type 8 (Folder) outside, as this affects the sort order. 160 // In the DB we tag it as type 100, but we use type 8 (Folder) outside, as this affects the sort order.
161 suitcase = CreateFolder(principalID, root.folderID, InventoryItemBase.SUITCASE_FOLDER_TYPE, InventoryItemBase.SUITCASE_FOLDER_NAME); 161 suitcase = CreateFolder(principalID, root.folderID, (int)FolderType.Suitcase, InventoryFolderBase.SUITCASE_FOLDER_NAME);
162 if (suitcase == null) 162 if (suitcase == null)
163 { 163 {
164 m_log.ErrorFormat("[HG SUITCASE INVENTORY SERVICE]: Unable to create suitcase folder"); 164 m_log.ErrorFormat("[HG SUITCASE INVENTORY SERVICE]: Unable to create suitcase folder");
@@ -178,41 +178,41 @@ namespace OpenSim.Services.HypergridService
178 m_log.Debug("[HG SUITCASE INVENTORY SERVICE]: Creating System folders under Suitcase..."); 178 m_log.Debug("[HG SUITCASE INVENTORY SERVICE]: Creating System folders under Suitcase...");
179 XInventoryFolder[] sysFolders = GetSystemFolders(principalID, rootID); 179 XInventoryFolder[] sysFolders = GetSystemFolders(principalID, rootID);
180 180
181 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Animation) return true; return false; })) 181 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Animation) return true; return false; }))
182 CreateFolder(principalID, rootID, (int)AssetType.Animation, "Animations"); 182 CreateFolder(principalID, rootID, (int)FolderType.Animation, "Animations");
183 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Bodypart) return true; return false; })) 183 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.BodyPart) return true; return false; }))
184 CreateFolder(principalID, rootID, (int)AssetType.Bodypart, "Body Parts"); 184 CreateFolder(principalID, rootID, (int)FolderType.BodyPart, "Body Parts");
185 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.CallingCard) return true; return false; })) 185 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.CallingCard) return true; return false; }))
186 CreateFolder(principalID, rootID, (int)AssetType.CallingCard, "Calling Cards"); 186 CreateFolder(principalID, rootID, (int)FolderType.CallingCard, "Calling Cards");
187 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Clothing) return true; return false; })) 187 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Clothing) return true; return false; }))
188 CreateFolder(principalID, rootID, (int)AssetType.Clothing, "Clothing"); 188 CreateFolder(principalID, rootID, (int)FolderType.Clothing, "Clothing");
189 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.CurrentOutfitFolder) return true; return false; })) 189 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.CurrentOutfit) return true; return false; }))
190 CreateFolder(principalID, rootID, (int)AssetType.CurrentOutfitFolder, "Current Outfit"); 190 CreateFolder(principalID, rootID, (int)FolderType.CurrentOutfit, "Current Outfit");
191 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.FavoriteFolder) return true; return false; })) 191 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Favorites) return true; return false; }))
192 CreateFolder(principalID, rootID, (int)AssetType.FavoriteFolder, "Favorites"); 192 CreateFolder(principalID, rootID, (int)FolderType.Favorites, "Favorites");
193 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Gesture) return true; return false; })) 193 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Gesture) return true; return false; }))
194 CreateFolder(principalID, rootID, (int)AssetType.Gesture, "Gestures"); 194 CreateFolder(principalID, rootID, (int)FolderType.Gesture, "Gestures");
195 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Landmark) return true; return false; })) 195 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Landmark) return true; return false; }))
196 CreateFolder(principalID, rootID, (int)AssetType.Landmark, "Landmarks"); 196 CreateFolder(principalID, rootID, (int)FolderType.Landmark, "Landmarks");
197 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.LostAndFoundFolder) return true; return false; })) 197 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.LostAndFound) return true; return false; }))
198 CreateFolder(principalID, rootID, (int)AssetType.LostAndFoundFolder, "Lost And Found"); 198 CreateFolder(principalID, rootID, (int)FolderType.LostAndFound, "Lost And Found");
199 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Notecard) return true; return false; })) 199 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Notecard) return true; return false; }))
200 CreateFolder(principalID, rootID, (int)AssetType.Notecard, "Notecards"); 200 CreateFolder(principalID, rootID, (int)FolderType.Notecard, "Notecards");
201 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Object) return true; return false; })) 201 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Object) return true; return false; }))
202 CreateFolder(principalID, rootID, (int)AssetType.Object, "Objects"); 202 CreateFolder(principalID, rootID, (int)FolderType.Object, "Objects");
203 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.SnapshotFolder) return true; return false; })) 203 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Snapshot) return true; return false; }))
204 CreateFolder(principalID, rootID, (int)AssetType.SnapshotFolder, "Photo Album"); 204 CreateFolder(principalID, rootID, (int)FolderType.Snapshot, "Photo Album");
205 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.LSLText) return true; return false; })) 205 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.LSLText) return true; return false; }))
206 CreateFolder(principalID, rootID, (int)AssetType.LSLText, "Scripts"); 206 CreateFolder(principalID, rootID, (int)FolderType.LSLText, "Scripts");
207 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Sound) return true; return false; })) 207 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Sound) return true; return false; }))
208 CreateFolder(principalID, rootID, (int)AssetType.Sound, "Sounds"); 208 CreateFolder(principalID, rootID, (int)FolderType.Sound, "Sounds");
209 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Texture) return true; return false; })) 209 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Texture) return true; return false; }))
210 CreateFolder(principalID, rootID, (int)AssetType.Texture, "Textures"); 210 CreateFolder(principalID, rootID, (int)FolderType.Texture, "Textures");
211 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.TrashFolder) return true; return false; })) 211 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Trash) return true; return false; }))
212 CreateFolder(principalID, rootID, (int)AssetType.TrashFolder, "Trash"); 212 CreateFolder(principalID, rootID, (int)FolderType.Trash, "Trash");
213 } 213 }
214 214
215 public override InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) 215 public override InventoryFolderBase GetFolderForType(UUID principalID, FolderType type)
216 { 216 {
217 //m_log.DebugFormat("[HG INVENTORY SERVICE]: GetFolderForType for {0} {0}", principalID, type); 217 //m_log.DebugFormat("[HG INVENTORY SERVICE]: GetFolderForType for {0} {0}", principalID, type);
218 XInventoryFolder suitcase = GetSuitcaseXFolder(principalID); 218 XInventoryFolder suitcase = GetSuitcaseXFolder(principalID);
@@ -468,7 +468,7 @@ namespace OpenSim.Services.HypergridService
468 { 468 {
469 XInventoryFolder[] folders = m_Database.GetFolders( 469 XInventoryFolder[] folders = m_Database.GetFolders(
470 new string[] { "agentID", "folderName", "type" }, 470 new string[] { "agentID", "folderName", "type" },
471 new string[] { principalID.ToString(), "My Inventory", ((int)AssetType.RootFolder).ToString() }); 471 new string[] { principalID.ToString(), InventoryFolderBase.ROOT_FOLDER_NAME, ((int)FolderType.Root).ToString() });
472 472
473 if (folders != null && folders.Length > 0) 473 if (folders != null && folders.Length > 0)
474 return folders[0]; 474 return folders[0];
@@ -476,7 +476,7 @@ namespace OpenSim.Services.HypergridService
476 // OK, so the RootFolder type didn't work. Let's look for any type with parent UUID.Zero. 476 // OK, so the RootFolder type didn't work. Let's look for any type with parent UUID.Zero.
477 folders = m_Database.GetFolders( 477 folders = m_Database.GetFolders(
478 new string[] { "agentID", "folderName", "parentFolderID" }, 478 new string[] { "agentID", "folderName", "parentFolderID" },
479 new string[] { principalID.ToString(), "My Inventory", UUID.Zero.ToString() }); 479 new string[] { principalID.ToString(), InventoryFolderBase.ROOT_FOLDER_NAME, UUID.Zero.ToString() });
480 480
481 if (folders != null && folders.Length > 0) 481 if (folders != null && folders.Length > 0)
482 return folders[0]; 482 return folders[0];
@@ -492,7 +492,7 @@ namespace OpenSim.Services.HypergridService
492 492
493 XInventoryFolder[] folders = m_Database.GetFolders( 493 XInventoryFolder[] folders = m_Database.GetFolders(
494 new string[] { "agentID", "type", "parentFolderID" }, 494 new string[] { "agentID", "type", "parentFolderID" },
495 new string[] { userID.ToString(), ((int)AssetType.CurrentOutfitFolder).ToString(), root.folderID.ToString() }); 495 new string[] { userID.ToString(), ((int)FolderType.CurrentOutfit).ToString(), root.folderID.ToString() });
496 496
497 if (folders.Length == 0) 497 if (folders.Length == 0)
498 return null; 498 return null;
@@ -505,7 +505,7 @@ namespace OpenSim.Services.HypergridService
505 // Warp! Root folder for travelers 505 // Warp! Root folder for travelers
506 XInventoryFolder[] folders = m_Database.GetFolders( 506 XInventoryFolder[] folders = m_Database.GetFolders(
507 new string[] { "agentID", "type" }, 507 new string[] { "agentID", "type" },
508 new string[] { principalID.ToString(), InventoryItemBase.SUITCASE_FOLDER_TYPE.ToString() }); // This is a special folder type... 508 new string[] { principalID.ToString(), FolderType.Suitcase.ToString() });
509 509
510 if (folders != null && folders.Length > 0) 510 if (folders != null && folders.Length > 0)
511 return folders[0]; 511 return folders[0];
@@ -513,13 +513,13 @@ namespace OpenSim.Services.HypergridService
513 // check to see if we have the old Suitcase folder 513 // check to see if we have the old Suitcase folder
514 folders = m_Database.GetFolders( 514 folders = m_Database.GetFolders(
515 new string[] { "agentID", "folderName", "parentFolderID" }, 515 new string[] { "agentID", "folderName", "parentFolderID" },
516 new string[] { principalID.ToString(), InventoryItemBase.SUITCASE_FOLDER_NAME, UUID.Zero.ToString() }); 516 new string[] { principalID.ToString(), InventoryFolderBase.SUITCASE_FOLDER_NAME, UUID.Zero.ToString() });
517 if (folders != null && folders.Length > 0) 517 if (folders != null && folders.Length > 0)
518 { 518 {
519 // Move it to under the root folder 519 // Move it to under the root folder
520 XInventoryFolder root = GetRootXFolder(principalID); 520 XInventoryFolder root = GetRootXFolder(principalID);
521 folders[0].parentFolderID = root.folderID; 521 folders[0].parentFolderID = root.folderID;
522 folders[0].type = InventoryItemBase.SUITCASE_FOLDER_TYPE; 522 folders[0].type = (int)FolderType.Suitcase;
523 m_Database.StoreFolder(folders[0]); 523 m_Database.StoreFolder(folders[0]);
524 return folders[0]; 524 return folders[0];
525 } 525 }
@@ -529,7 +529,7 @@ namespace OpenSim.Services.HypergridService
529 529
530 private void SetAsNormalFolder(XInventoryFolder suitcase) 530 private void SetAsNormalFolder(XInventoryFolder suitcase)
531 { 531 {
532 suitcase.type = InventoryItemBase.SUITCASE_FOLDER_FAKE_TYPE; 532 //suitcase.type = InventoryItemBase.SUITCASE_FOLDER_FAKE_TYPE;
533 } 533 }
534 534
535 private List<XInventoryFolder> GetFolderTree(UUID principalID, UUID folder) 535 private List<XInventoryFolder> GetFolderTree(UUID principalID, UUID folder)
diff --git a/OpenSim/Services/Interfaces/IInventoryService.cs b/OpenSim/Services/Interfaces/IInventoryService.cs
index 1e8652c..4289bba 100644
--- a/OpenSim/Services/Interfaces/IInventoryService.cs
+++ b/OpenSim/Services/Interfaces/IInventoryService.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Services.Interfaces
67 /// <param name="userID"></param> 67 /// <param name="userID"></param>
68 /// <param name="type"></param> 68 /// <param name="type"></param>
69 /// <returns></returns> 69 /// <returns></returns>
70 InventoryFolderBase GetFolderForType(UUID userID, AssetType type); 70 InventoryFolderBase GetFolderForType(UUID userID, FolderType type);
71 71
72 /// <summary> 72 /// <summary>
73 /// Gets everything (folders and items) inside a folder 73 /// Gets everything (folders and items) inside a folder
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index 64f727c..b75193f 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -111,48 +111,48 @@ namespace OpenSim.Services.InventoryService
111 111
112 if (rootFolder == null) 112 if (rootFolder == null)
113 { 113 {
114 rootFolder = ConvertToOpenSim(CreateFolder(principalID, UUID.Zero, (int)AssetType.RootFolder, "My Inventory")); 114 rootFolder = ConvertToOpenSim(CreateFolder(principalID, UUID.Zero, (int)FolderType.Root, InventoryFolderBase.ROOT_FOLDER_NAME));
115 result = true; 115 result = true;
116 } 116 }
117 117
118 XInventoryFolder[] sysFolders = GetSystemFolders(principalID, rootFolder.ID); 118 XInventoryFolder[] sysFolders = GetSystemFolders(principalID, rootFolder.ID);
119 119
120 if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.Animation) return true; return false; })) 120 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Animation) return true; return false; }))
121 CreateFolder(principalID, rootFolder.ID, (int)AssetType.Animation, "Animations"); 121 CreateFolder(principalID, rootFolder.ID, (int)FolderType.Animation, "Animations");
122 if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.Bodypart) return true; return false; })) 122 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.BodyPart) return true; return false; }))
123 CreateFolder(principalID, rootFolder.ID, (int)AssetType.Bodypart, "Body Parts"); 123 CreateFolder(principalID, rootFolder.ID, (int)FolderType.BodyPart, "Body Parts");
124 if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.CallingCard) return true; return false; })) 124 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.CallingCard) return true; return false; }))
125 { 125 {
126 XInventoryFolder folder = CreateFolder(principalID, rootFolder.ID, (int)AssetType.CallingCard, "Calling Cards"); 126 XInventoryFolder folder = CreateFolder(principalID, rootFolder.ID, (int)FolderType.CallingCard, "Calling Cards");
127 folder = CreateFolder(principalID, folder.folderID, (int)AssetType.CallingCard, "Friends"); 127 folder = CreateFolder(principalID, folder.folderID, (int)FolderType.CallingCard, "Friends");
128 CreateFolder(principalID, folder.folderID, (int)AssetType.CallingCard, "All"); 128 CreateFolder(principalID, folder.folderID, (int)FolderType.CallingCard, "All");
129 } 129 }
130 if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.Clothing) return true; return false; })) 130 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Clothing) return true; return false; }))
131 CreateFolder(principalID, rootFolder.ID, (int)AssetType.Clothing, "Clothing"); 131 CreateFolder(principalID, rootFolder.ID, (int)FolderType.Clothing, "Clothing");
132 if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.CurrentOutfitFolder) return true; return false; })) 132 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.CurrentOutfit) return true; return false; }))
133 CreateFolder(principalID, rootFolder.ID, (int)AssetType.CurrentOutfitFolder, "Current Outfit"); 133 CreateFolder(principalID, rootFolder.ID, (int)FolderType.CurrentOutfit, "Current Outfit");
134 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.FavoriteFolder) return true; return false; })) 134 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Favorites) return true; return false; }))
135 CreateFolder(principalID, rootFolder.ID, (int)AssetType.FavoriteFolder, "Favorites"); 135 CreateFolder(principalID, rootFolder.ID, (int)FolderType.Favorites, "Favorites");
136 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)AssetType.Gesture) return true; return false; })) 136 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Gesture) return true; return false; }))
137 CreateFolder(principalID, rootFolder.ID, (int)AssetType.Gesture, "Gestures"); 137 CreateFolder(principalID, rootFolder.ID, (int)FolderType.Gesture, "Gestures");
138 if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.Landmark) return true; return false; })) 138 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Landmark) return true; return false; }))
139 CreateFolder(principalID, rootFolder.ID, (int)AssetType.Landmark, "Landmarks"); 139 CreateFolder(principalID, rootFolder.ID, (int)FolderType.Landmark, "Landmarks");
140 if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.LostAndFoundFolder) return true; return false; })) 140 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.LostAndFound) return true; return false; }))
141 CreateFolder(principalID, rootFolder.ID, (int)AssetType.LostAndFoundFolder, "Lost And Found"); 141 CreateFolder(principalID, rootFolder.ID, (int)FolderType.LostAndFound, "Lost And Found");
142 if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.Notecard) return true; return false; })) 142 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Notecard) return true; return false; }))
143 CreateFolder(principalID, rootFolder.ID, (int)AssetType.Notecard, "Notecards"); 143 CreateFolder(principalID, rootFolder.ID, (int)FolderType.Notecard, "Notecards");
144 if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.Object) return true; return false; })) 144 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Object) return true; return false; }))
145 CreateFolder(principalID, rootFolder.ID, (int)AssetType.Object, "Objects"); 145 CreateFolder(principalID, rootFolder.ID, (int)FolderType.Object, "Objects");
146 if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.SnapshotFolder) return true; return false; })) 146 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Snapshot) return true; return false; }))
147 CreateFolder(principalID, rootFolder.ID, (int)AssetType.SnapshotFolder, "Photo Album"); 147 CreateFolder(principalID, rootFolder.ID, (int)FolderType.Snapshot, "Photo Album");
148 if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.LSLText) return true; return false; })) 148 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.LSLText) return true; return false; }))
149 CreateFolder(principalID, rootFolder.ID, (int)AssetType.LSLText, "Scripts"); 149 CreateFolder(principalID, rootFolder.ID, (int)FolderType.LSLText, "Scripts");
150 if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.Sound) return true; return false; })) 150 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Sound) return true; return false; }))
151 CreateFolder(principalID, rootFolder.ID, (int)AssetType.Sound, "Sounds"); 151 CreateFolder(principalID, rootFolder.ID, (int)FolderType.Sound, "Sounds");
152 if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.Texture) return true; return false; })) 152 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Texture) return true; return false; }))
153 CreateFolder(principalID, rootFolder.ID, (int)AssetType.Texture, "Textures"); 153 CreateFolder(principalID, rootFolder.ID, (int)FolderType.Texture, "Textures");
154 if (!Array.Exists(sysFolders, delegate (XInventoryFolder f) { if (f.type == (int)AssetType.TrashFolder) return true; return false; })) 154 if (!Array.Exists(sysFolders, delegate(XInventoryFolder f) { if (f.type == (int)FolderType.Trash) return true; return false; }))
155 CreateFolder(principalID, rootFolder.ID, (int)AssetType.TrashFolder, "Trash"); 155 CreateFolder(principalID, rootFolder.ID, (int)FolderType.Trash, "Trash");
156 156
157 return result; 157 return result;
158 } 158 }
@@ -228,7 +228,7 @@ namespace OpenSim.Services.InventoryService
228 XInventoryFolder root = null; 228 XInventoryFolder root = null;
229 foreach (XInventoryFolder folder in folders) 229 foreach (XInventoryFolder folder in folders)
230 { 230 {
231 if (folder.folderName == "My Inventory") 231 if (folder.folderName == InventoryFolderBase.ROOT_FOLDER_NAME)
232 { 232 {
233 root = folder; 233 root = folder;
234 break; 234 break;
@@ -241,7 +241,7 @@ namespace OpenSim.Services.InventoryService
241 return ConvertToOpenSim(root); 241 return ConvertToOpenSim(root);
242 } 242 }
243 243
244 public virtual InventoryFolderBase GetFolderForType(UUID principalID, AssetType type) 244 public virtual InventoryFolderBase GetFolderForType(UUID principalID, FolderType type)
245 { 245 {
246// m_log.DebugFormat("[XINVENTORY SERVICE]: Getting folder type {0} for user {1}", type, principalID); 246// m_log.DebugFormat("[XINVENTORY SERVICE]: Getting folder type {0} for user {1}", type, principalID);
247 247
@@ -259,11 +259,11 @@ namespace OpenSim.Services.InventoryService
259 return GetSystemFolderForType(rootFolder, type); 259 return GetSystemFolderForType(rootFolder, type);
260 } 260 }
261 261
262 private InventoryFolderBase GetSystemFolderForType(InventoryFolderBase rootFolder, AssetType type) 262 private InventoryFolderBase GetSystemFolderForType(InventoryFolderBase rootFolder, FolderType type)
263 { 263 {
264 //m_log.DebugFormat("[XINVENTORY SERVICE]: Getting folder type {0}", type); 264 //m_log.DebugFormat("[XINVENTORY SERVICE]: Getting folder type {0}", type);
265 265
266 if (type == AssetType.RootFolder) 266 if (type == FolderType.Root)
267 return rootFolder; 267 return rootFolder;
268 268
269 XInventoryFolder[] folders = m_Database.GetFolders( 269 XInventoryFolder[] folders = m_Database.GetFolders(
@@ -363,7 +363,7 @@ namespace OpenSim.Services.InventoryService
363 if (check != null) 363 if (check != null)
364 return false; 364 return false;
365 365
366 if (folder.Type != (short)AssetType.Folder && folder.Type != (short)AssetType.Unknown) 366 if (folder.Type != (short)FolderType.None)
367 { 367 {
368 InventoryFolderBase rootFolder = GetRootFolder(folder.Owner); 368 InventoryFolderBase rootFolder = GetRootFolder(folder.Owner);
369 369
@@ -380,7 +380,7 @@ namespace OpenSim.Services.InventoryService
380 if (folder.ParentID == rootFolder.ID) 380 if (folder.ParentID == rootFolder.ID)
381 { 381 {
382 InventoryFolderBase existingSystemFolder 382 InventoryFolderBase existingSystemFolder
383 = GetSystemFolderForType(rootFolder, (AssetType)folder.Type); 383 = GetSystemFolderForType(rootFolder, (FolderType)folder.Type);
384 384
385 if (existingSystemFolder != null) 385 if (existingSystemFolder != null)
386 { 386 {
@@ -407,8 +407,8 @@ namespace OpenSim.Services.InventoryService
407 if (check == null) 407 if (check == null)
408 return AddFolder(folder); 408 return AddFolder(folder);
409 409
410 if ((check.Type != (short)AssetType.Unknown || xFolder.type != (short)AssetType.Unknown) 410 if ((check.Type != (short)FolderType.None || xFolder.type != (short)FolderType.None)
411 && (check.Type != (short)AssetType.OutfitFolder || xFolder.type != (short)AssetType.OutfitFolder)) 411 && (check.Type != (short)FolderType.Outfit || xFolder.type != (short)FolderType.Outfit))
412 { 412 {
413 if (xFolder.version < check.Version) 413 if (xFolder.version < check.Version)
414 { 414 {
@@ -672,9 +672,9 @@ namespace OpenSim.Services.InventoryService
672 672
673 newFolder.ParentID = folder.parentFolderID; 673 newFolder.ParentID = folder.parentFolderID;
674 newFolder.Type = (short)folder.type; 674 newFolder.Type = (short)folder.type;
675 // Viewer can't understand anything that's not in it's LLFolderType enum 675 //// Viewer can't understand anything that's not in it's LLFolderType enum
676 if (newFolder.Type == InventoryItemBase.SUITCASE_FOLDER_TYPE) 676 //if (newFolder.Type == InventoryItemBase.SUITCASE_FOLDER_TYPE)
677 newFolder.Type = InventoryItemBase.SUITCASE_FOLDER_FAKE_TYPE; 677 // newFolder.Type = InventoryItemBase.SUITCASE_FOLDER_FAKE_TYPE;
678 newFolder.Version = (ushort)folder.version; 678 newFolder.Version = (ushort)folder.version;
679 newFolder.Name = folder.folderName; 679 newFolder.Name = folder.folderName;
680 newFolder.Owner = folder.agentID; 680 newFolder.Owner = folder.agentID;
@@ -765,7 +765,7 @@ namespace OpenSim.Services.InventoryService
765 if (folder.Length < 1) 765 if (folder.Length < 1)
766 return false; 766 return false;
767 767
768 if (folder[0].type == (int)AssetType.TrashFolder) 768 if (folder[0].type == (int)FolderType.Trash)
769 return true; 769 return true;
770 770
771 UUID parentFolder = folder[0].parentFolderID; 771 UUID parentFolder = folder[0].parentFolderID;
@@ -776,9 +776,9 @@ namespace OpenSim.Services.InventoryService
776 if (parent.Length < 1) 776 if (parent.Length < 1)
777 return false; 777 return false;
778 778
779 if (parent[0].type == (int)AssetType.TrashFolder) 779 if (parent[0].type == (int)FolderType.Trash)
780 return true; 780 return true;
781 if (parent[0].type == (int)AssetType.RootFolder) 781 if (parent[0].type == (int)FolderType.Root)
782 return false; 782 return false;
783 783
784 parentFolder = parent[0].parentFolderID; 784 parentFolder = parent[0].parentFolderID;
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
index fdf89be..c3756d0 100644
--- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs
+++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs
@@ -788,7 +788,7 @@ namespace OpenSim.Services.LLLoginService
788 Hashtable TempHash; 788 Hashtable TempHash;
789 foreach (InventoryFolderBase InvFolder in folders) 789 foreach (InventoryFolderBase InvFolder in folders)
790 { 790 {
791 if (InvFolder.ParentID == UUID.Zero && InvFolder.Name == "My Inventory") 791 if (InvFolder.ParentID == UUID.Zero && InvFolder.Name == InventoryFolderBase.ROOT_FOLDER_NAME)
792 { 792 {
793 rootID = InvFolder.ID; 793 rootID = InvFolder.ID;
794 } 794 }
diff --git a/OpenSim/Services/UserAccountService/UserAccountService.cs b/OpenSim/Services/UserAccountService/UserAccountService.cs
index 4705445..2e19ece 100644
--- a/OpenSim/Services/UserAccountService/UserAccountService.cs
+++ b/OpenSim/Services/UserAccountService/UserAccountService.cs
@@ -595,7 +595,7 @@ namespace OpenSim.Services.UserAccountService
595 { 595 {
596 m_log.DebugFormat("[USER ACCOUNT SERVICE]: Creating default appearance items for {0}", principalID); 596 m_log.DebugFormat("[USER ACCOUNT SERVICE]: Creating default appearance items for {0}", principalID);
597 597
598 InventoryFolderBase bodyPartsFolder = m_InventoryService.GetFolderForType(principalID, AssetType.Bodypart); 598 InventoryFolderBase bodyPartsFolder = m_InventoryService.GetFolderForType(principalID, FolderType.BodyPart);
599 599
600 InventoryItemBase eyes = new InventoryItemBase(UUID.Random(), principalID); 600 InventoryItemBase eyes = new InventoryItemBase(UUID.Random(), principalID);
601 eyes.AssetID = new UUID("4bb6fa4d-1cd2-498a-a84c-95c1a0e745a7"); 601 eyes.AssetID = new UUID("4bb6fa4d-1cd2-498a-a84c-95c1a0e745a7");
@@ -657,7 +657,7 @@ namespace OpenSim.Services.UserAccountService
657 hair.Flags = (uint)WearableType.Hair; 657 hair.Flags = (uint)WearableType.Hair;
658 m_InventoryService.AddItem(hair); 658 m_InventoryService.AddItem(hair);
659 659
660 InventoryFolderBase clothingFolder = m_InventoryService.GetFolderForType(principalID, AssetType.Clothing); 660 InventoryFolderBase clothingFolder = m_InventoryService.GetFolderForType(principalID, FolderType.Clothing);
661 661
662 InventoryItemBase shirt = new InventoryItemBase(UUID.Random(), principalID); 662 InventoryItemBase shirt = new InventoryItemBase(UUID.Random(), principalID);
663 shirt.AssetID = AvatarWearable.DEFAULT_SHIRT_ASSET; 663 shirt.AssetID = AvatarWearable.DEFAULT_SHIRT_ASSET;