more refactoring, this time on InventoryFolderBase

* wrap attributes in properties
 * clean up names a little bit
 * clean up name styles
0.6.0-stable
Sean Dague 2008-04-07 23:27:05 +00:00
parent f436815107
commit 5ee75998ce
20 changed files with 348 additions and 294 deletions

View File

@ -370,12 +370,12 @@ namespace OpenSim.Data.MSSQL
try try
{ {
InventoryFolderBase folder = new InventoryFolderBase(); InventoryFolderBase folder = new InventoryFolderBase();
folder.agentID = new LLUUID((string) reader["agentID"]); folder.AgentID = new LLUUID((string) reader["agentID"]);
folder.parentID = new LLUUID((string) reader["parentFolderID"]); folder.ParentID = new LLUUID((string) reader["parentFolderID"]);
folder.folderID = new LLUUID((string) reader["folderID"]); folder.ID = new LLUUID((string) reader["folderID"]);
folder.name = (string) reader["folderName"]; folder.Name = (string) reader["folderName"];
folder.type = (short) reader["type"]; folder.Type = (short) reader["type"];
folder.version = (ushort) ((int) reader["version"]); folder.Version = (ushort) ((int) reader["version"]);
return folder; return folder;
} }
catch (Exception e) catch (Exception e)
@ -557,12 +557,12 @@ namespace OpenSim.Data.MSSQL
Dictionary<string, string> param = new Dictionary<string, string>(); Dictionary<string, string> param = new Dictionary<string, string>();
param["folderID"] = folder.folderID.ToString(); param["folderID"] = folder.ID.ToString();
param["agentID"] = folder.agentID.ToString(); param["agentID"] = folder.AgentID.ToString();
param["parentFolderID"] = folder.parentID.ToString(); param["parentFolderID"] = folder.ParentID.ToString();
param["folderName"] = folder.name; param["folderName"] = folder.Name;
param["type"] = Convert.ToString(folder.type); param["type"] = Convert.ToString(folder.Type);
param["version"] = Convert.ToString(folder.version); param["version"] = Convert.ToString(folder.Version);
try try
{ {
@ -589,13 +589,13 @@ namespace OpenSim.Data.MSSQL
"type = @type," + "type = @type," +
"version = @version where " + "version = @version where " +
"folderID = @keyFolderID;", database.getConnection()); "folderID = @keyFolderID;", database.getConnection());
SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToString()); SqlParameter param1 = new SqlParameter("@folderID", folder.ID.ToString());
SqlParameter param2 = new SqlParameter("@agentID", folder.agentID.ToString()); SqlParameter param2 = new SqlParameter("@agentID", folder.AgentID.ToString());
SqlParameter param3 = new SqlParameter("@parentFolderID", folder.parentID.ToString()); SqlParameter param3 = new SqlParameter("@parentFolderID", folder.ParentID.ToString());
SqlParameter param4 = new SqlParameter("@folderName", folder.name); SqlParameter param4 = new SqlParameter("@folderName", folder.Name);
SqlParameter param5 = new SqlParameter("@type", folder.type); SqlParameter param5 = new SqlParameter("@type", folder.Type);
SqlParameter param6 = new SqlParameter("@version", folder.version); SqlParameter param6 = new SqlParameter("@version", folder.Version);
SqlParameter param7 = new SqlParameter("@keyFolderID", folder.folderID.ToString()); SqlParameter param7 = new SqlParameter("@keyFolderID", folder.ID.ToString());
command.Parameters.Add(param1); command.Parameters.Add(param1);
command.Parameters.Add(param2); command.Parameters.Add(param2);
command.Parameters.Add(param3); command.Parameters.Add(param3);
@ -623,9 +623,9 @@ namespace OpenSim.Data.MSSQL
SqlCommand command = new SqlCommand("UPDATE inventoryfolders set folderID = @folderID, " + SqlCommand command = new SqlCommand("UPDATE inventoryfolders set folderID = @folderID, " +
"parentFolderID = @parentFolderID," + "parentFolderID = @parentFolderID," +
"folderID = @keyFolderID;", database.getConnection()); "folderID = @keyFolderID;", database.getConnection());
SqlParameter param1 = new SqlParameter("@folderID", folder.folderID.ToString()); SqlParameter param1 = new SqlParameter("@folderID", folder.ID.ToString());
SqlParameter param2 = new SqlParameter("@parentFolderID", folder.parentID.ToString()); SqlParameter param2 = new SqlParameter("@parentFolderID", folder.ParentID.ToString());
SqlParameter param3 = new SqlParameter("@keyFolderID", folder.folderID.ToString()); SqlParameter param3 = new SqlParameter("@keyFolderID", folder.ID.ToString());
command.Parameters.Add(param1); command.Parameters.Add(param1);
command.Parameters.Add(param2); command.Parameters.Add(param2);
command.Parameters.Add(param3); command.Parameters.Add(param3);
@ -660,7 +660,7 @@ namespace OpenSim.Data.MSSQL
getInventoryFolders(ref folders, parentID); getInventoryFolders(ref folders, parentID);
for (int i = 0; i < folders.Count; i++) for (int i = 0; i < folders.Count; i++)
getInventoryFolders(ref folders, folders[i].folderID); getInventoryFolders(ref folders, folders[i].ID);
return folders; return folders;
} }
@ -716,8 +716,8 @@ namespace OpenSim.Data.MSSQL
//Delete all sub-folders //Delete all sub-folders
foreach (InventoryFolderBase f in subFolders) foreach (InventoryFolderBase f in subFolders)
{ {
deleteOneFolder(f.folderID); deleteOneFolder(f.ID);
deleteItemsInFolder(f.folderID); deleteItemsInFolder(f.ID);
} }
//Delete the actual row //Delete the actual row

View File

@ -381,12 +381,12 @@ namespace OpenSim.Data.MySQL
try try
{ {
InventoryFolderBase folder = new InventoryFolderBase(); InventoryFolderBase folder = new InventoryFolderBase();
folder.agentID = new LLUUID((string) reader["agentID"]); folder.AgentID = new LLUUID((string) reader["agentID"]);
folder.parentID = new LLUUID((string) reader["parentFolderID"]); folder.ParentID = new LLUUID((string) reader["parentFolderID"]);
folder.folderID = new LLUUID((string) reader["folderID"]); folder.ID = new LLUUID((string) reader["folderID"]);
folder.name = (string) reader["folderName"]; folder.Name = (string) reader["folderName"];
folder.type = (short) reader["type"]; folder.Type = (short) reader["type"];
folder.version = (ushort) ((int) reader["version"]); folder.Version = (ushort) ((int) reader["version"]);
return folder; return folder;
} }
catch (Exception e) catch (Exception e)
@ -507,12 +507,12 @@ namespace OpenSim.Data.MySQL
sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName, ?type, ?version)"; sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName, ?type, ?version)";
MySqlCommand cmd = new MySqlCommand(sql, database.Connection); MySqlCommand cmd = new MySqlCommand(sql, database.Connection);
cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToString()); cmd.Parameters.AddWithValue("?folderID", folder.ID.ToString());
cmd.Parameters.AddWithValue("?agentID", folder.agentID.ToString()); cmd.Parameters.AddWithValue("?agentID", folder.AgentID.ToString());
cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToString()); cmd.Parameters.AddWithValue("?parentFolderID", folder.ParentID.ToString());
cmd.Parameters.AddWithValue("?folderName", folder.name); cmd.Parameters.AddWithValue("?folderName", folder.Name);
cmd.Parameters.AddWithValue("?type", (short) folder.type); cmd.Parameters.AddWithValue("?type", (short) folder.Type);
cmd.Parameters.AddWithValue("?version", folder.version); cmd.Parameters.AddWithValue("?version", folder.Version);
try try
{ {
@ -545,8 +545,8 @@ namespace OpenSim.Data.MySQL
"UPDATE inventoryfolders SET parentFolderID=?parentFolderID WHERE folderID=?folderID"; "UPDATE inventoryfolders SET parentFolderID=?parentFolderID WHERE folderID=?folderID";
MySqlCommand cmd = new MySqlCommand(sql, database.Connection); MySqlCommand cmd = new MySqlCommand(sql, database.Connection);
cmd.Parameters.AddWithValue("?folderID", folder.folderID.ToString()); cmd.Parameters.AddWithValue("?folderID", folder.ID.ToString());
cmd.Parameters.AddWithValue("?parentFolderID", folder.parentID.ToString()); cmd.Parameters.AddWithValue("?parentFolderID", folder.ParentID.ToString());
try try
{ {
@ -581,7 +581,7 @@ namespace OpenSim.Data.MySQL
getInventoryFolders(ref folders, parentID); getInventoryFolders(ref folders, parentID);
for (int i = 0; i < folders.Count; i++) for (int i = 0; i < folders.Count; i++)
getInventoryFolders(ref folders, folders[i].folderID); getInventoryFolders(ref folders, folders[i].ID);
return folders; return folders;
} }
@ -637,8 +637,8 @@ namespace OpenSim.Data.MySQL
//Delete all sub-folders //Delete all sub-folders
foreach (InventoryFolderBase f in subFolders) foreach (InventoryFolderBase f in subFolders)
{ {
deleteOneFolder(f.folderID); deleteOneFolder(f.ID);
deleteItemsInFolder(f.folderID); deleteItemsInFolder(f.ID);
} }
//Delete the actual row //Delete the actual row

View File

@ -180,7 +180,7 @@ namespace OpenSim.Data.NHibernate
/// <param name="folder">The folder to be created</param> /// <param name="folder">The folder to be created</param>
public void addInventoryFolder(InventoryFolderBase folder) public void addInventoryFolder(InventoryFolderBase folder)
{ {
if (!ExistsFolder(folder.folderID)) { if (!ExistsFolder(folder.ID)) {
using(ISession session = factory.OpenSession()) { using(ISession session = factory.OpenSession()) {
using(ITransaction transaction = session.BeginTransaction()) { using(ITransaction transaction = session.BeginTransaction()) {
session.Save(folder); session.Save(folder);
@ -188,7 +188,7 @@ namespace OpenSim.Data.NHibernate
} }
} }
} else { } else {
m_log.ErrorFormat("Attempted to add Inventory Folder {0} that already exists, updating instead", folder.folderID); m_log.ErrorFormat("Attempted to add Inventory Folder {0} that already exists, updating instead", folder.ID);
updateInventoryFolder(folder); updateInventoryFolder(folder);
} }
} }
@ -199,7 +199,7 @@ namespace OpenSim.Data.NHibernate
/// <param name="folder">The updated folder</param> /// <param name="folder">The updated folder</param>
public void updateInventoryFolder(InventoryFolderBase folder) public void updateInventoryFolder(InventoryFolderBase folder)
{ {
if (ExistsFolder(folder.folderID)) { if (ExistsFolder(folder.ID)) {
using(ISession session = factory.OpenSession()) { using(ISession session = factory.OpenSession()) {
using(ITransaction transaction = session.BeginTransaction()) { using(ITransaction transaction = session.BeginTransaction()) {
session.Update(folder); session.Update(folder);
@ -207,7 +207,7 @@ namespace OpenSim.Data.NHibernate
} }
} }
} else { } else {
m_log.ErrorFormat("Attempted to add Inventory Folder {0} that already exists", folder.folderID); m_log.ErrorFormat("Attempted to add Inventory Folder {0} that already exists", folder.ID);
} }
} }
@ -375,7 +375,7 @@ namespace OpenSim.Data.NHibernate
getInventoryFolders(ref folders, Util.ToRawUuidString(parentID)); getInventoryFolders(ref folders, Util.ToRawUuidString(parentID));
for (int i = 0; i < folders.Count; i++) for (int i = 0; i < folders.Count; i++)
getInventoryFolders(ref folders, Util.ToRawUuidString(folders[i].folderID)); getInventoryFolders(ref folders, Util.ToRawUuidString(folders[i].ID));
return folders; return folders;
} }

View File

@ -132,11 +132,11 @@ namespace OpenSim.Data.SQLite
{ {
DataTable inventoryFolderTable = ds.Tables["inventoryfolders"]; DataTable inventoryFolderTable = ds.Tables["inventoryfolders"];
DataRow inventoryRow = inventoryFolderTable.Rows.Find(Util.ToRawUuidString(folder.folderID)); DataRow inventoryRow = inventoryFolderTable.Rows.Find(Util.ToRawUuidString(folder.ID));
if (inventoryRow == null) if (inventoryRow == null)
{ {
if (! add) if (! add)
m_log.ErrorFormat("Interface Misuse: Attempting to Update non-existant inventory folder: {0}", folder.folderID); m_log.ErrorFormat("Interface Misuse: Attempting to Update non-existant inventory folder: {0}", folder.ID);
inventoryRow = inventoryFolderTable.NewRow(); inventoryRow = inventoryFolderTable.NewRow();
fillFolderRow(inventoryRow, folder); fillFolderRow(inventoryRow, folder);
@ -145,7 +145,7 @@ namespace OpenSim.Data.SQLite
else else
{ {
if (add) if (add)
m_log.ErrorFormat("Interface Misuse: Attempting to Add inventory folder that already exists: {0}", folder.folderID); m_log.ErrorFormat("Interface Misuse: Attempting to Add inventory folder that already exists: {0}", folder.ID);
fillFolderRow(inventoryRow, folder); fillFolderRow(inventoryRow, folder);
} }
@ -160,7 +160,7 @@ namespace OpenSim.Data.SQLite
{ {
DataTable inventoryFolderTable = ds.Tables["inventoryfolders"]; DataTable inventoryFolderTable = ds.Tables["inventoryfolders"];
DataRow inventoryRow = inventoryFolderTable.Rows.Find(Util.ToRawUuidString(folder.folderID)); DataRow inventoryRow = inventoryFolderTable.Rows.Find(Util.ToRawUuidString(folder.ID));
if (inventoryRow == null) if (inventoryRow == null)
{ {
inventoryRow = inventoryFolderTable.NewRow(); inventoryRow = inventoryFolderTable.NewRow();
@ -339,7 +339,7 @@ namespace OpenSim.Data.SQLite
getInventoryFolders(ref folders, Util.ToRawUuidString(parentID)); getInventoryFolders(ref folders, Util.ToRawUuidString(parentID));
for (int i = 0; i < folders.Count; i++) for (int i = 0; i < folders.Count; i++)
getInventoryFolders(ref folders, Util.ToRawUuidString(folders[i].folderID)); getInventoryFolders(ref folders, Util.ToRawUuidString(folders[i].ID));
return folders; return folders;
} }
@ -488,10 +488,10 @@ namespace OpenSim.Data.SQLite
//Delete all sub-folders //Delete all sub-folders
foreach (InventoryFolderBase f in subFolders) foreach (InventoryFolderBase f in subFolders)
{ {
inventoryRow = inventoryFolderTable.Rows.Find(Util.ToRawUuidString(f.folderID)); inventoryRow = inventoryFolderTable.Rows.Find(Util.ToRawUuidString(f.ID));
if (inventoryRow != null) if (inventoryRow != null)
{ {
deleteItemsInFolder(Util.ToRawUuidString(f.folderID)); deleteItemsInFolder(Util.ToRawUuidString(f.ID));
inventoryRow.Delete(); inventoryRow.Delete();
} }
} }
@ -590,29 +590,29 @@ namespace OpenSim.Data.SQLite
private InventoryFolderBase buildFolder(DataRow row) private InventoryFolderBase buildFolder(DataRow row)
{ {
InventoryFolderBase folder = new InventoryFolderBase(); InventoryFolderBase folder = new InventoryFolderBase();
folder.folderID = new LLUUID((string) row["UUID"]); folder.ID = new LLUUID((string) row["UUID"]);
folder.name = (string) row["name"]; folder.Name = (string) row["name"];
folder.agentID = new LLUUID((string) row["agentID"]); folder.AgentID = new LLUUID((string) row["agentID"]);
folder.parentID = new LLUUID((string) row["parentID"]); folder.ParentID = new LLUUID((string) row["parentID"]);
folder.type = Convert.ToInt16(row["type"]); folder.Type = Convert.ToInt16(row["type"]);
folder.version = Convert.ToUInt16(row["version"]); folder.Version = Convert.ToUInt16(row["version"]);
return folder; return folder;
} }
private void fillFolderRow(DataRow row, InventoryFolderBase folder) private void fillFolderRow(DataRow row, InventoryFolderBase folder)
{ {
row["UUID"] = Util.ToRawUuidString(folder.folderID); row["UUID"] = Util.ToRawUuidString(folder.ID);
row["name"] = folder.name; row["name"] = folder.Name;
row["agentID"] = Util.ToRawUuidString(folder.agentID); row["agentID"] = Util.ToRawUuidString(folder.AgentID);
row["parentID"] = Util.ToRawUuidString(folder.parentID); row["parentID"] = Util.ToRawUuidString(folder.ParentID);
row["type"] = folder.type; row["type"] = folder.Type;
row["version"] = folder.version; row["version"] = folder.Version;
} }
private void moveFolderRow(DataRow row, InventoryFolderBase folder) private void moveFolderRow(DataRow row, InventoryFolderBase folder)
{ {
row["UUID"] = Util.ToRawUuidString(folder.folderID); row["UUID"] = Util.ToRawUuidString(folder.ID);
row["parentID"] = Util.ToRawUuidString(folder.parentID); row["parentID"] = Util.ToRawUuidString(folder.ParentID);
} }
/*********************************************************************** /***********************************************************************

View File

@ -60,7 +60,7 @@ namespace OpenSim.Framework.Communications.Cache
/// <param name="folder"></param> /// <param name="folder"></param>
private void AddPendingFolder(InventoryFolderImpl folder) private void AddPendingFolder(InventoryFolderImpl folder)
{ {
LLUUID parentFolderId = folder.parentID; LLUUID parentFolderId = folder.ParentID;
if (pendingCategorizationFolders.ContainsKey(parentFolderId)) if (pendingCategorizationFolders.ContainsKey(parentFolderId))
{ {
@ -83,17 +83,17 @@ namespace OpenSim.Framework.Communications.Cache
/// </param> /// </param>
private void ResolvePendingFolders(InventoryFolderImpl parent) private void ResolvePendingFolders(InventoryFolderImpl parent)
{ {
if (pendingCategorizationFolders.ContainsKey(parent.folderID)) if (pendingCategorizationFolders.ContainsKey(parent.ID))
{ {
foreach (InventoryFolderImpl folder in pendingCategorizationFolders[parent.folderID]) foreach (InventoryFolderImpl folder in pendingCategorizationFolders[parent.ID])
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[INVENTORY CACHE]: Resolving pending received folder {0} {1} into {2} {3}", // "[INVENTORY CACHE]: Resolving pending received folder {0} {1} into {2} {3}",
// folder.name, folder.folderID, parent.name, parent.folderID); // folder.name, folder.folderID, parent.name, parent.folderID);
if (!parent.SubFolders.ContainsKey(folder.folderID)) if (!parent.SubFolders.ContainsKey(folder.ID))
{ {
parent.SubFolders.Add(folder.folderID, folder); parent.SubFolders.Add(folder.ID, folder);
} }
} }
} }
@ -118,16 +118,16 @@ namespace OpenSim.Framework.Communications.Cache
{ {
if (RootFolder == null) if (RootFolder == null)
{ {
if (folderInfo.parentID == LLUUID.Zero) if (folderInfo.ParentID == LLUUID.Zero)
{ {
RootFolder = folderInfo; RootFolder = folderInfo;
} }
} }
else if (RootFolder.folderID == folderInfo.parentID) else if (RootFolder.ID == folderInfo.ParentID)
{ {
if (!RootFolder.SubFolders.ContainsKey(folderInfo.folderID)) if (!RootFolder.SubFolders.ContainsKey(folderInfo.ID))
{ {
RootFolder.SubFolders.Add(folderInfo.folderID, folderInfo); RootFolder.SubFolders.Add(folderInfo.ID, folderInfo);
} }
else else
{ {
@ -136,12 +136,12 @@ namespace OpenSim.Framework.Communications.Cache
} }
else else
{ {
InventoryFolderImpl folder = RootFolder.HasSubFolder(folderInfo.parentID); InventoryFolderImpl folder = RootFolder.HasSubFolder(folderInfo.ParentID);
if (folder != null) if (folder != null)
{ {
if (!folder.SubFolders.ContainsKey(folderInfo.folderID)) if (!folder.SubFolders.ContainsKey(folderInfo.ID))
{ {
folder.SubFolders.Add(folderInfo.folderID, folderInfo); folder.SubFolders.Add(folderInfo.ID, folderInfo);
} }
} }
else else
@ -171,7 +171,7 @@ namespace OpenSim.Framework.Communications.Cache
{ {
if ((userID == UserProfile.UUID) && (RootFolder != null)) if ((userID == UserProfile.UUID) && (RootFolder != null))
{ {
if (itemInfo.Folder == RootFolder.folderID) if (itemInfo.Folder == RootFolder.ID)
{ {
if (!RootFolder.Items.ContainsKey(itemInfo.ID)) if (!RootFolder.Items.ContainsKey(itemInfo.ID))
{ {

View File

@ -45,12 +45,12 @@ namespace OpenSim.Framework.Communications.Cache
// Constructors // Constructors
public InventoryFolderImpl(InventoryFolderBase folderbase) public InventoryFolderImpl(InventoryFolderBase folderbase)
{ {
agentID = folderbase.agentID; AgentID = folderbase.AgentID;
folderID = folderbase.folderID; ID = folderbase.ID;
name = folderbase.name; Name = folderbase.Name;
parentID = folderbase.parentID; ParentID = folderbase.ParentID;
type = folderbase.type; Type = folderbase.Type;
version = folderbase.version; Version = folderbase.Version;
} }
public InventoryFolderImpl() public InventoryFolderImpl()
@ -63,12 +63,12 @@ namespace OpenSim.Framework.Communications.Cache
if (!SubFolders.ContainsKey(folderID)) if (!SubFolders.ContainsKey(folderID))
{ {
InventoryFolderImpl subFold = new InventoryFolderImpl(); InventoryFolderImpl subFold = new InventoryFolderImpl();
subFold.name = folderName; subFold.Name = folderName;
subFold.folderID = folderID; subFold.ID = folderID;
subFold.type = (short) type; subFold.Type = (short) type;
subFold.parentID = this.folderID; subFold.ParentID = this.ID;
subFold.agentID = agentID; subFold.AgentID = AgentID;
SubFolders.Add(subFold.folderID, subFold); SubFolders.Add(subFold.ID, subFold);
return subFold; return subFold;
} }
return null; return null;

View File

@ -56,14 +56,14 @@ namespace OpenSim.Framework.Communications.Cache
{ {
m_log.Info("[LIBRARY INVENTORY]: Loading library inventory"); m_log.Info("[LIBRARY INVENTORY]: Loading library inventory");
agentID = libOwner; AgentID = libOwner;
folderID = new LLUUID("00000112-000f-0000-0000-000100bba000"); ID = new LLUUID("00000112-000f-0000-0000-000100bba000");
name = "OpenSim Library"; Name = "OpenSim Library";
parentID = LLUUID.Zero; ParentID = LLUUID.Zero;
type = (short) 8; Type = (short) 8;
version = (ushort) 1; Version = (ushort) 1;
libraryFolders.Add(folderID, this); libraryFolders.Add(ID, this);
LoadLibraries(Path.Combine(Util.inventoryDir(), "Libraries.xml")); LoadLibraries(Path.Combine(Util.inventoryDir(), "Libraries.xml"));
@ -172,20 +172,20 @@ namespace OpenSim.Framework.Communications.Cache
{ {
InventoryFolderImpl folderInfo = new InventoryFolderImpl(); InventoryFolderImpl folderInfo = new InventoryFolderImpl();
folderInfo.folderID = new LLUUID(config.GetString("folderID", folderID.ToString())); folderInfo.ID = new LLUUID(config.GetString("folderID", ID.ToString()));
folderInfo.name = config.GetString("name", "unknown"); folderInfo.Name = config.GetString("name", "unknown");
folderInfo.parentID = new LLUUID(config.GetString("parentFolderID", folderID.ToString())); folderInfo.ParentID = new LLUUID(config.GetString("parentFolderID", ID.ToString()));
folderInfo.type = (short)config.GetInt("type", 8); folderInfo.Type = (short)config.GetInt("type", 8);
folderInfo.agentID = libOwner; folderInfo.AgentID = libOwner;
folderInfo.version = 1; folderInfo.Version = 1;
if (libraryFolders.ContainsKey(folderInfo.parentID)) if (libraryFolders.ContainsKey(folderInfo.ParentID))
{ {
InventoryFolderImpl parentFolder = libraryFolders[folderInfo.parentID]; InventoryFolderImpl parentFolder = libraryFolders[folderInfo.ParentID];
libraryFolders.Add(folderInfo.folderID, folderInfo); libraryFolders.Add(folderInfo.ID, folderInfo);
parentFolder.SubFolders.Add(folderInfo.folderID, folderInfo); parentFolder.SubFolders.Add(folderInfo.ID, folderInfo);
// m_log.InfoFormat("[LIBRARY INVENTORY]: Adding folder {0} ({1})", folderInfo.name, folderInfo.folderID); // m_log.InfoFormat("[LIBRARY INVENTORY]: Adding folder {0} ({1})", folderInfo.name, folderInfo.folderID);
} }
@ -193,7 +193,7 @@ namespace OpenSim.Framework.Communications.Cache
{ {
m_log.WarnFormat( m_log.WarnFormat(
"[LIBRARY INVENTORY]: Couldn't add folder {0} ({1}) since parent folder with ID {2} does not exist!", "[LIBRARY INVENTORY]: Couldn't add folder {0} ({1}) since parent folder with ID {2} does not exist!",
folderInfo.name, folderInfo.folderID, folderInfo.parentID); folderInfo.Name, folderInfo.ID, folderInfo.ParentID);
} }
} }
@ -206,9 +206,9 @@ namespace OpenSim.Framework.Communications.Cache
InventoryItemBase item = new InventoryItemBase(); InventoryItemBase item = new InventoryItemBase();
item.Owner = libOwner; item.Owner = libOwner;
item.Creator = libOwner; item.Creator = libOwner;
item.ID = new LLUUID(config.GetString("inventoryID", folderID.ToString())); item.ID = new LLUUID(config.GetString("inventoryID", ID.ToString()));
item.AssetID = new LLUUID(config.GetString("assetID", LLUUID.Random().ToString())); item.AssetID = new LLUUID(config.GetString("assetID", LLUUID.Random().ToString()));
item.Folder = new LLUUID(config.GetString("folderID", folderID.ToString())); item.Folder = new LLUUID(config.GetString("folderID", ID.ToString()));
item.Description = config.GetString("description", System.String.Empty); item.Description = config.GetString("description", System.String.Empty);
item.Name = config.GetString("name", System.String.Empty); item.Name = config.GetString("name", System.String.Empty);
item.AssetType = config.GetInt("assetType", 0); item.AssetType = config.GetInt("assetType", 0);

View File

@ -105,7 +105,7 @@ namespace OpenSim.Framework.Communications.Cache
{ {
if (userProfile.RootFolder != null) if (userProfile.RootFolder != null)
{ {
if (userProfile.RootFolder.folderID == parentID) if (userProfile.RootFolder.ID == parentID)
{ {
InventoryFolderImpl createdFolder = InventoryFolderImpl createdFolder =
userProfile.RootFolder.CreateNewSubFolder(folderID, folderName, folderType); userProfile.RootFolder.CreateNewSubFolder(folderID, folderName, folderType);
@ -113,12 +113,12 @@ namespace OpenSim.Framework.Communications.Cache
if (createdFolder != null) if (createdFolder != null)
{ {
InventoryFolderBase createdBaseFolder = new InventoryFolderBase(); InventoryFolderBase createdBaseFolder = new InventoryFolderBase();
createdBaseFolder.agentID = createdFolder.agentID; createdBaseFolder.AgentID = createdFolder.AgentID;
createdBaseFolder.folderID = createdFolder.folderID; createdBaseFolder.ID = createdFolder.ID;
createdBaseFolder.name = createdFolder.name; createdBaseFolder.Name = createdFolder.Name;
createdBaseFolder.parentID = createdFolder.parentID; createdBaseFolder.ParentID = createdFolder.ParentID;
createdBaseFolder.type = createdFolder.type; createdBaseFolder.Type = createdFolder.Type;
createdBaseFolder.version = createdFolder.version; createdBaseFolder.Version = createdFolder.Version;
m_parent.InventoryService.AddNewInventoryFolder(remoteClient.AgentId, createdBaseFolder); m_parent.InventoryService.AddNewInventoryFolder(remoteClient.AgentId, createdBaseFolder);
} }
} }
@ -156,12 +156,12 @@ namespace OpenSim.Framework.Communications.Cache
if (userProfile.RootFolder != null) if (userProfile.RootFolder != null)
{ {
InventoryFolderBase baseFolder = new InventoryFolderBase(); InventoryFolderBase baseFolder = new InventoryFolderBase();
baseFolder.agentID = remoteClient.AgentId; baseFolder.AgentID = remoteClient.AgentId;
baseFolder.folderID = folderID; baseFolder.ID = folderID;
baseFolder.name = name; baseFolder.Name = name;
baseFolder.parentID = parentID; baseFolder.ParentID = parentID;
baseFolder.type = (short) type; baseFolder.Type = (short) type;
baseFolder.version = userProfile.RootFolder.version; baseFolder.Version = userProfile.RootFolder.Version;
m_parent.InventoryService.AddNewInventoryFolder(remoteClient.AgentId, baseFolder); m_parent.InventoryService.AddNewInventoryFolder(remoteClient.AgentId, baseFolder);
} }
} }
@ -176,9 +176,9 @@ namespace OpenSim.Framework.Communications.Cache
if (userProfile.RootFolder != null) if (userProfile.RootFolder != null)
{ {
InventoryFolderBase baseFolder = new InventoryFolderBase(); InventoryFolderBase baseFolder = new InventoryFolderBase();
baseFolder.agentID = remoteClient.AgentId; baseFolder.AgentID = remoteClient.AgentId;
baseFolder.folderID = folderID; baseFolder.ID = folderID;
baseFolder.parentID = parentID; baseFolder.ParentID = parentID;
m_parent.InventoryService.MoveInventoryFolder(remoteClient.AgentId, baseFolder); m_parent.InventoryService.MoveInventoryFolder(remoteClient.AgentId, baseFolder);
} }
} }
@ -199,10 +199,10 @@ namespace OpenSim.Framework.Communications.Cache
// XXX We're not handling sortOrder yet! // XXX We're not handling sortOrder yet!
InventoryFolderImpl fold = null; InventoryFolderImpl fold = null;
if (folderID == libraryRoot.folderID) if (folderID == libraryRoot.ID)
{ {
remoteClient.SendInventoryFolderDetails( remoteClient.SendInventoryFolderDetails(
libraryRoot.agentID, libraryRoot.folderID, libraryRoot.RequestListOfItems(), libraryRoot.AgentID, libraryRoot.ID, libraryRoot.RequestListOfItems(),
libraryRoot.RequestListOfFolders(), fetchFolders, fetchItems); libraryRoot.RequestListOfFolders(), fetchFolders, fetchItems);
return; return;
@ -211,7 +211,7 @@ namespace OpenSim.Framework.Communications.Cache
if ((fold = libraryRoot.HasSubFolder(folderID)) != null) if ((fold = libraryRoot.HasSubFolder(folderID)) != null)
{ {
remoteClient.SendInventoryFolderDetails( remoteClient.SendInventoryFolderDetails(
libraryRoot.agentID, folderID, fold.RequestListOfItems(), libraryRoot.AgentID, folderID, fold.RequestListOfItems(),
fold.RequestListOfFolders(), fetchFolders, fetchItems); fold.RequestListOfFolders(), fetchFolders, fetchItems);
return; return;
@ -242,7 +242,7 @@ namespace OpenSim.Framework.Communications.Cache
if (userProfile.RootFolder != null) if (userProfile.RootFolder != null)
{ {
if (userProfile.RootFolder.folderID == folderID) if (userProfile.RootFolder.ID == folderID)
{ {
// m_log.DebugFormat( // m_log.DebugFormat(
// "[AGENT INVENTORY]: Found root folder {0} for client {1}", // "[AGENT INVENTORY]: Found root folder {0} for client {1}",
@ -301,7 +301,7 @@ namespace OpenSim.Framework.Communications.Cache
// if (fetchItems) // if (fetchItems)
// { // {
InventoryFolderImpl fold = null; InventoryFolderImpl fold = null;
if (folderID == libraryRoot.folderID) if (folderID == libraryRoot.ID)
{ {
return libraryRoot.RequestListOfItems(); return libraryRoot.RequestListOfItems();
} }
@ -316,7 +316,7 @@ namespace OpenSim.Framework.Communications.Cache
{ {
if (userProfile.RootFolder != null) if (userProfile.RootFolder != null)
{ {
if (userProfile.RootFolder.folderID == folderID) if (userProfile.RootFolder.ID == folderID)
{ {
return userProfile.RootFolder.RequestListOfItems(); return userProfile.RootFolder.RequestListOfItems();
} }
@ -377,7 +377,7 @@ namespace OpenSim.Framework.Communications.Cache
public void HandleFetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID) public void HandleFetchInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID ownerID)
{ {
if (ownerID == libraryRoot.agentID) if (ownerID == libraryRoot.AgentID)
{ {
//Console.WriteLine("request info for library item"); //Console.WriteLine("request info for library item");

View File

@ -240,7 +240,7 @@ namespace OpenSim.Framework.Communications
public void HandleUUIDNameRequest(LLUUID uuid, IClientAPI remote_client) public void HandleUUIDNameRequest(LLUUID uuid, IClientAPI remote_client)
{ {
if (uuid == m_userProfileCacheService.libraryRoot.agentID) if (uuid == m_userProfileCacheService.libraryRoot.AgentID)
{ {
remote_client.SendNameReply(uuid, "Mr", "OpenSim"); remote_client.SendNameReply(uuid, "Mr", "OpenSim");
} }

View File

@ -95,7 +95,7 @@ namespace OpenSim.Framework.Communications
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
{ {
IList<InventoryFolderBase> folders = plugin.Value.getFolderHierarchy(rootFolder.folderID); IList<InventoryFolderBase> folders = plugin.Value.getFolderHierarchy(rootFolder.ID);
userFolders.AddRange(folders); userFolders.AddRange(folders);
} }
@ -190,7 +190,7 @@ namespace OpenSim.Framework.Communications
protected void AddFolder(InventoryFolderBase folder) protected void AddFolder(InventoryFolderBase folder)
{ {
m_log.DebugFormat( m_log.DebugFormat(
"[INVENTORY SERVICE BASE]: Adding folder {0}, {1} to {2}", folder.name, folder.folderID, folder.parentID); "[INVENTORY SERVICE BASE]: Adding folder {0}, {1} to {2}", folder.Name, folder.ID, folder.ParentID);
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
{ {
@ -239,141 +239,141 @@ namespace OpenSim.Framework.Communications
{ {
InventoryFolderBase folder = new InventoryFolderBase(); InventoryFolderBase folder = new InventoryFolderBase();
folder.parentID = LLUUID.Zero; folder.ParentID = LLUUID.Zero;
folder.agentID = user; folder.AgentID = user;
folder.folderID = LLUUID.Random(); folder.ID = LLUUID.Random();
folder.name = "My Inventory"; folder.Name = "My Inventory";
folder.type = (short)AssetType.Folder; folder.Type = (short)AssetType.Folder;
folder.version = 1; folder.Version = 1;
Folders.Add(folder.folderID, folder); Folders.Add(folder.ID, folder);
LLUUID rootFolder = folder.folderID; LLUUID rootFolder = folder.ID;
folder = new InventoryFolderBase(); folder = new InventoryFolderBase();
folder.parentID = rootFolder; folder.ParentID = rootFolder;
folder.agentID = user; folder.AgentID = user;
folder.folderID = LLUUID.Random(); folder.ID = LLUUID.Random();
folder.name = "Animations"; folder.Name = "Animations";
folder.type = (short)AssetType.Animation; folder.Type = (short)AssetType.Animation;
folder.version = 1; folder.Version = 1;
Folders.Add(folder.folderID, folder); Folders.Add(folder.ID, folder);
folder = new InventoryFolderBase(); folder = new InventoryFolderBase();
folder.parentID = rootFolder; folder.ParentID = rootFolder;
folder.agentID = user; folder.AgentID = user;
folder.folderID = LLUUID.Random(); folder.ID = LLUUID.Random();
folder.name = "Body Parts"; folder.Name = "Body Parts";
folder.type = (short)AssetType.Bodypart; folder.Type = (short)AssetType.Bodypart;
folder.version = 1; folder.Version = 1;
Folders.Add(folder.folderID, folder); Folders.Add(folder.ID, folder);
folder = new InventoryFolderBase(); folder = new InventoryFolderBase();
folder.parentID = rootFolder; folder.ParentID = rootFolder;
folder.agentID = user; folder.AgentID = user;
folder.folderID = LLUUID.Random(); folder.ID = LLUUID.Random();
folder.name = "Calling Cards"; folder.Name = "Calling Cards";
folder.type = (short)AssetType.CallingCard; folder.Type = (short)AssetType.CallingCard;
folder.version = 1; folder.Version = 1;
Folders.Add(folder.folderID, folder); Folders.Add(folder.ID, folder);
folder = new InventoryFolderBase(); folder = new InventoryFolderBase();
folder.parentID = rootFolder; folder.ParentID = rootFolder;
folder.agentID = user; folder.AgentID = user;
folder.folderID = LLUUID.Random(); folder.ID = LLUUID.Random();
folder.name = "Clothing"; folder.Name = "Clothing";
folder.type = (short)AssetType.Clothing; folder.Type = (short)AssetType.Clothing;
folder.version = 1; folder.Version = 1;
Folders.Add(folder.folderID, folder); Folders.Add(folder.ID, folder);
folder = new InventoryFolderBase(); folder = new InventoryFolderBase();
folder.parentID = rootFolder; folder.ParentID = rootFolder;
folder.agentID = user; folder.AgentID = user;
folder.folderID = LLUUID.Random(); folder.ID = LLUUID.Random();
folder.name = "Gestures"; folder.Name = "Gestures";
folder.type = (short)AssetType.Gesture; folder.Type = (short)AssetType.Gesture;
folder.version = 1; folder.Version = 1;
Folders.Add(folder.folderID, folder); Folders.Add(folder.ID, folder);
folder = new InventoryFolderBase(); folder = new InventoryFolderBase();
folder.parentID = rootFolder; folder.ParentID = rootFolder;
folder.agentID = user; folder.AgentID = user;
folder.folderID = LLUUID.Random(); folder.ID = LLUUID.Random();
folder.name = "Landmarks"; folder.Name = "Landmarks";
folder.type = (short)AssetType.Landmark; folder.Type = (short)AssetType.Landmark;
folder.version = 1; folder.Version = 1;
Folders.Add(folder.folderID, folder); Folders.Add(folder.ID, folder);
folder = new InventoryFolderBase(); folder = new InventoryFolderBase();
folder.parentID = rootFolder; folder.ParentID = rootFolder;
folder.agentID = user; folder.AgentID = user;
folder.folderID = LLUUID.Random(); folder.ID = LLUUID.Random();
folder.name = "Lost And Found"; folder.Name = "Lost And Found";
folder.type = (short)AssetType.LostAndFoundFolder; folder.Type = (short)AssetType.LostAndFoundFolder;
folder.version = 1; folder.Version = 1;
Folders.Add(folder.folderID, folder); Folders.Add(folder.ID, folder);
folder = new InventoryFolderBase(); folder = new InventoryFolderBase();
folder.parentID = rootFolder; folder.ParentID = rootFolder;
folder.agentID = user; folder.AgentID = user;
folder.folderID = LLUUID.Random(); folder.ID = LLUUID.Random();
folder.name = "Notecards"; folder.Name = "Notecards";
folder.type = (short)AssetType.Notecard; folder.Type = (short)AssetType.Notecard;
folder.version = 1; folder.Version = 1;
Folders.Add(folder.folderID, folder); Folders.Add(folder.ID, folder);
folder = new InventoryFolderBase(); folder = new InventoryFolderBase();
folder.parentID = rootFolder; folder.ParentID = rootFolder;
folder.agentID = user; folder.AgentID = user;
folder.folderID = LLUUID.Random(); folder.ID = LLUUID.Random();
folder.name = "Objects"; folder.Name = "Objects";
folder.type = (short)AssetType.Primitive; folder.Type = (short)AssetType.Primitive;
folder.version = 1; folder.Version = 1;
Folders.Add(folder.folderID, folder); Folders.Add(folder.ID, folder);
folder = new InventoryFolderBase(); folder = new InventoryFolderBase();
folder.parentID = rootFolder; folder.ParentID = rootFolder;
folder.agentID = user; folder.AgentID = user;
folder.folderID = LLUUID.Random(); folder.ID = LLUUID.Random();
folder.name = "Photo Album"; folder.Name = "Photo Album";
folder.type = (short)AssetType.SnapshotFolder; folder.Type = (short)AssetType.SnapshotFolder;
folder.version = 1; folder.Version = 1;
Folders.Add(folder.folderID, folder); Folders.Add(folder.ID, folder);
folder = new InventoryFolderBase(); folder = new InventoryFolderBase();
folder.parentID = rootFolder; folder.ParentID = rootFolder;
folder.agentID = user; folder.AgentID = user;
folder.folderID = LLUUID.Random(); folder.ID = LLUUID.Random();
folder.name = "Scripts"; folder.Name = "Scripts";
folder.type = (short)AssetType.LSLText; folder.Type = (short)AssetType.LSLText;
folder.version = 1; folder.Version = 1;
Folders.Add(folder.folderID, folder); Folders.Add(folder.ID, folder);
folder = new InventoryFolderBase(); folder = new InventoryFolderBase();
folder.parentID = rootFolder; folder.ParentID = rootFolder;
folder.agentID = user; folder.AgentID = user;
folder.folderID = LLUUID.Random(); folder.ID = LLUUID.Random();
folder.name = "Sounds"; folder.Name = "Sounds";
folder.type = (short)AssetType.Sound; folder.Type = (short)AssetType.Sound;
folder.version = 1; folder.Version = 1;
Folders.Add(folder.folderID, folder); Folders.Add(folder.ID, folder);
folder = new InventoryFolderBase(); folder = new InventoryFolderBase();
folder.parentID = rootFolder; folder.ParentID = rootFolder;
folder.agentID = user; folder.AgentID = user;
folder.folderID = LLUUID.Random(); folder.ID = LLUUID.Random();
folder.name = "Textures"; folder.Name = "Textures";
folder.type = (short)AssetType.Texture; folder.Type = (short)AssetType.Texture;
folder.version = 1; folder.Version = 1;
Folders.Add(folder.folderID, folder); Folders.Add(folder.ID, folder);
folder = new InventoryFolderBase(); folder = new InventoryFolderBase();
folder.parentID = rootFolder; folder.ParentID = rootFolder;
folder.agentID = user; folder.AgentID = user;
folder.folderID = LLUUID.Random(); folder.ID = LLUUID.Random();
folder.name = "Trash"; folder.Name = "Trash";
folder.type = (short)AssetType.TrashFolder; folder.Type = (short)AssetType.TrashFolder;
folder.version = 1; folder.Version = 1;
Folders.Add(folder.folderID, folder); Folders.Add(folder.ID, folder);
} }
} }
} }

View File

@ -734,11 +734,11 @@ namespace OpenSim.Framework.UserManagement
foreach (InventoryFolderBase folder in rootFolders.Values) foreach (InventoryFolderBase folder in rootFolders.Values)
{ {
Hashtable TempHash = new Hashtable(); Hashtable TempHash = new Hashtable();
TempHash["name"] = folder.name; TempHash["name"] = folder.Name;
TempHash["parent_id"] = folder.parentID.ToString(); TempHash["parent_id"] = folder.ParentID.ToString();
TempHash["version"] = (Int32)folder.version; TempHash["version"] = (Int32)folder.Version;
TempHash["type_default"] = (Int32)folder.type; TempHash["type_default"] = (Int32)folder.Type;
TempHash["folder_id"] = folder.folderID.ToString(); TempHash["folder_id"] = folder.ID.ToString();
folderHashes.Add(TempHash); folderHashes.Add(TempHash);
} }

View File

@ -40,31 +40,85 @@ namespace OpenSim.Framework
/// <summary> /// <summary>
/// The name of the folder (64 characters or less) /// The name of the folder (64 characters or less)
/// </summary> /// </summary>
public string name; private string _name;
/// <summary> /// <summary>
/// The agent who's inventory this is contained by /// The agent who's inventory this is contained by
/// </summary> /// </summary>
public LLUUID agentID; private LLUUID _agentID;
/// <summary> /// <summary>
/// The folder this folder is contained in /// The folder this folder is contained in
/// </summary> /// </summary>
public LLUUID parentID; private LLUUID _parentID;
/// <summary> /// <summary>
/// The UUID for this folder /// The UUID for this folder
/// </summary> /// </summary>
public LLUUID folderID; private LLUUID _id;
/// <summary> /// <summary>
/// Type of items normally stored in this folder /// Type of items normally stored in this folder
/// </summary> /// </summary>
public short type; private short _type;
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>
public ushort version; private ushort _version;
public string Name {
get {
return _name;
}
set {
_name = value;
}
}
public LLUUID AgentID {
get {
return _agentID;
}
set {
_agentID = value;
}
}
public LLUUID ParentID {
get {
return _parentID;
}
set {
_parentID = value;
}
}
public LLUUID ID {
get {
return _id;
}
set {
_id = value;
}
}
public short Type {
get {
return _type;
}
set {
_type = value;
}
}
public ushort Version {
get {
return _version;
}
set {
_version = value;
}
}
} }
} }

View File

@ -51,7 +51,7 @@ namespace OpenSim.Grid.InventoryServer
foreach (InventoryFolderBase folder in allFolders) foreach (InventoryFolderBase folder in allFolders)
{ {
List<InventoryItemBase> items = RequestFolderItems(folder.folderID); List<InventoryItemBase> items = RequestFolderItems(folder.ID);
if (items != null) if (items != null)
{ {
allItems.InsertRange(0, items); allItems.InsertRange(0, items);
@ -79,7 +79,7 @@ namespace OpenSim.Grid.InventoryServer
allFolders.InsertRange(0, folders); allFolders.InsertRange(0, folders);
foreach (InventoryFolderBase subfolder in folders) foreach (InventoryFolderBase subfolder in folders)
{ {
List<InventoryFolderBase> subFolders = GetAllFolders(subfolder.folderID); List<InventoryFolderBase> subFolders = GetAllFolders(subfolder.ID);
if (subFolders != null) if (subFolders != null)
{ {
allFolders.InsertRange(0, subFolders); allFolders.InsertRange(0, subFolders);
@ -166,10 +166,10 @@ namespace OpenSim.Grid.InventoryServer
// Right now, this actions act more like an update/insert combination than a simple create. // Right now, this actions act more like an update/insert combination than a simple create.
m_log.Info( m_log.Info(
"[AGENT INVENTORY]: " + "[AGENT INVENTORY]: " +
"Updating in " + folder.parentID.ToString() "Updating in " + folder.ParentID.ToString()
+ ", folder " + folder.name); + ", folder " + folder.Name);
AddNewInventoryFolder(folder.agentID, folder); AddNewInventoryFolder(folder.AgentID, folder);
return true; return true;
} }
@ -177,8 +177,8 @@ namespace OpenSim.Grid.InventoryServer
{ {
m_log.Info( m_log.Info(
"[AGENT INVENTORY]: " + "[AGENT INVENTORY]: " +
"Moving folder " + folder.folderID "Moving folder " + folder.ID
+ " to " + folder.parentID.ToString()); + " to " + folder.ParentID.ToString());
MoveExistingInventoryFolder(folder); MoveExistingInventoryFolder(folder);
return true; return true;

View File

@ -104,25 +104,25 @@ namespace OpenSim.Grid.InventoryServer
bool modified = false; bool modified = false;
// ensure we have a valid folder id // ensure we have a valid folder id
if (f.folderID == LLUUID.Zero) if (f.ID == LLUUID.Zero)
{ {
f.folderID = LLUUID.Random(); f.ID = LLUUID.Random();
modified = true; modified = true;
} }
// ensure we have valid agent id // ensure we have valid agent id
if (f.agentID == LLUUID.Zero) if (f.AgentID == LLUUID.Zero)
{ {
if (parent != null) if (parent != null)
f.agentID = parent.agentID; f.AgentID = parent.AgentID;
else else
f.agentID = f.folderID; f.AgentID = f.ID;
modified = true; modified = true;
} }
if (f.parentID == LLUUID.Zero && parent != null) if (f.ParentID == LLUUID.Zero && parent != null)
{ {
f.parentID = parent.folderID; f.ParentID = parent.ID;
modified = true; modified = true;
} }

View File

@ -325,16 +325,16 @@ namespace OpenSim.Grid.UserServer
{ {
// m_log.DebugFormat("[LOGIN]: Received agent inventory folder {0}", InvFolder.name); // m_log.DebugFormat("[LOGIN]: Received agent inventory folder {0}", InvFolder.name);
if (InvFolder.parentID == LLUUID.Zero) if (InvFolder.ParentID == LLUUID.Zero)
{ {
rootID = InvFolder.folderID; rootID = InvFolder.ID;
} }
TempHash = new Hashtable(); TempHash = new Hashtable();
TempHash["name"] = InvFolder.name; TempHash["name"] = InvFolder.Name;
TempHash["parent_id"] = InvFolder.parentID.ToString(); TempHash["parent_id"] = InvFolder.ParentID.ToString();
TempHash["version"] = (Int32) InvFolder.version; TempHash["version"] = (Int32) InvFolder.Version;
TempHash["type_default"] = (Int32) InvFolder.type; TempHash["type_default"] = (Int32) InvFolder.Type;
TempHash["folder_id"] = InvFolder.folderID.ToString(); TempHash["folder_id"] = InvFolder.ID.ToString();
AgentInventoryArray.Add(TempHash); AgentInventoryArray.Add(TempHash);
} }
return new InventoryData(AgentInventoryArray, rootID); return new InventoryData(AgentInventoryArray, rootID);

View File

@ -1307,10 +1307,10 @@ namespace OpenSim.Region.ClientStack
foreach (InventoryFolderBase folder in folders) foreach (InventoryFolderBase folder in folders)
{ {
descend.FolderData[i] = new InventoryDescendentsPacket.FolderDataBlock(); descend.FolderData[i] = new InventoryDescendentsPacket.FolderDataBlock();
descend.FolderData[i].FolderID = folder.folderID; descend.FolderData[i].FolderID = folder.ID;
descend.FolderData[i].Name = Helpers.StringToField(folder.name); descend.FolderData[i].Name = Helpers.StringToField(folder.Name);
descend.FolderData[i].ParentID = folder.parentID; descend.FolderData[i].ParentID = folder.ParentID;
descend.FolderData[i].Type = (sbyte) folder.type; descend.FolderData[i].Type = (sbyte) folder.Type;
i++; i++;
count++; count++;

View File

@ -49,7 +49,7 @@ namespace OpenSim.Region.Communications.Local
//need to make sure we send root folder first //need to make sure we send root folder first
foreach (InventoryFolderBase folder in folders) foreach (InventoryFolderBase folder in folders)
{ {
if (folder.parentID == LLUUID.Zero) if (folder.ParentID == LLUUID.Zero)
{ {
rootFolder = RequestInventoryFolder(userID, folder, folderCallBack, itemCallBack); rootFolder = RequestInventoryFolder(userID, folder, folderCallBack, itemCallBack);
} }
@ -59,7 +59,7 @@ namespace OpenSim.Region.Communications.Local
{ {
foreach (InventoryFolderBase folder in folders) foreach (InventoryFolderBase folder in folders)
{ {
if (folder.folderID != rootFolder.folderID) if (folder.ID != rootFolder.ID)
{ {
RequestInventoryFolder(userID, folder, folderCallBack, itemCallBack); RequestInventoryFolder(userID, folder, folderCallBack, itemCallBack);
} }
@ -112,7 +112,7 @@ namespace OpenSim.Region.Communications.Local
InventoryFolderImpl newFolder = new InventoryFolderImpl(folder); InventoryFolderImpl newFolder = new InventoryFolderImpl(folder);
folderCallBack(userID, newFolder); folderCallBack(userID, newFolder);
List<InventoryItemBase> items = RequestFolderItems(newFolder.folderID); List<InventoryItemBase> items = RequestFolderItems(newFolder.ID);
foreach (InventoryItemBase item in items) foreach (InventoryItemBase item in items)
{ {
itemCallBack(userID, item); itemCallBack(userID, item);

View File

@ -229,16 +229,16 @@ namespace OpenSim.Region.Communications.Local
Hashtable TempHash; Hashtable TempHash;
foreach (InventoryFolderBase InvFolder in folders) foreach (InventoryFolderBase InvFolder in folders)
{ {
if (InvFolder.parentID == LLUUID.Zero) if (InvFolder.ParentID == LLUUID.Zero)
{ {
rootID = InvFolder.folderID; rootID = InvFolder.ID;
} }
TempHash = new Hashtable(); TempHash = new Hashtable();
TempHash["name"] = InvFolder.name; TempHash["name"] = InvFolder.Name;
TempHash["parent_id"] = InvFolder.parentID.ToString(); TempHash["parent_id"] = InvFolder.ParentID.ToString();
TempHash["version"] = (Int32) InvFolder.version; TempHash["version"] = (Int32) InvFolder.Version;
TempHash["type_default"] = (Int32) InvFolder.type; TempHash["type_default"] = (Int32) InvFolder.Type;
TempHash["folder_id"] = InvFolder.folderID.ToString(); TempHash["folder_id"] = InvFolder.ID.ToString();
AgentInventoryArray.Add(TempHash); AgentInventoryArray.Add(TempHash);
} }

View File

@ -107,7 +107,7 @@ namespace OpenSim.Region.Communications.OGS1
InventoryRequest request = m_RequestingInventory[userID]; InventoryRequest request = m_RequestingInventory[userID];
foreach (InventoryFolderBase folder in response.Folders) foreach (InventoryFolderBase folder in response.Folders)
{ {
if (folder.parentID == LLUUID.Zero) if (folder.ParentID == LLUUID.Zero)
{ {
InventoryFolderImpl newfolder = new InventoryFolderImpl(folder); InventoryFolderImpl newfolder = new InventoryFolderImpl(folder);
rootFolder = newfolder; rootFolder = newfolder;
@ -119,7 +119,7 @@ namespace OpenSim.Region.Communications.OGS1
{ {
foreach (InventoryFolderBase folder in response.Folders) foreach (InventoryFolderBase folder in response.Folders)
{ {
if (folder.folderID != rootFolder.folderID) if (folder.ID != rootFolder.ID)
{ {
InventoryFolderImpl newfolder = new InventoryFolderImpl(folder); InventoryFolderImpl newfolder = new InventoryFolderImpl(folder);
request.FolderCallBack(userID, newfolder); request.FolderCallBack(userID, newfolder);

View File

@ -327,7 +327,7 @@ namespace OpenSim.Region.Environment.Scenes
itemCopy.Name = item.Name; itemCopy.Name = item.Name;
itemCopy.AssetType = item.AssetType; itemCopy.AssetType = item.AssetType;
itemCopy.InvType = item.InvType; itemCopy.InvType = item.InvType;
itemCopy.Folder = recipientUserInfo.RootFolder.folderID; itemCopy.Folder = recipientUserInfo.RootFolder.ID;
itemCopy.CurrentPermissions = 2147483647; itemCopy.CurrentPermissions = 2147483647;
itemCopy.NextPermissions = 2147483647; itemCopy.NextPermissions = 2147483647;
itemCopy.EveryOnePermissions = item.EveryOnePermissions; itemCopy.EveryOnePermissions = item.EveryOnePermissions;