From 25fea01b92a7682e10f57ce979217d31fee975ef Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 10 Apr 2008 14:09:30 +0000 Subject: further renaming of properties for clarity --- OpenSim/Data/DB4o/DB4oManager.cs | 12 +- OpenSim/Data/MSSQL/MSSQLManager.cs | 14 +- OpenSim/Data/MSSQL/MSSQLUserData.cs | 26 ++-- OpenSim/Data/MySQL/MySQLManager.cs | 22 ++-- OpenSim/Data/MySQL/MySQLUserData.cs | 16 +-- OpenSim/Data/SQLite/SQLiteUserData.cs | 36 ++--- .../Communications/Cache/CachedUserInfo.cs | 10 +- .../Communications/CommunicationsManager.cs | 6 +- OpenSim/Framework/Communications/LoginService.cs | 10 +- .../Framework/Communications/UserManagerBase.cs | 18 +-- OpenSim/Framework/UserProfileData.cs | 146 ++++++++++----------- OpenSim/Grid/UserServer/UserLoginService.cs | 8 +- OpenSim/Grid/UserServer/UserManager.cs | 22 ++-- OpenSim/Region/ClientStack/ClientView.cs | 10 +- .../Region/ClientStack/RegionApplicationBase.cs | 4 +- .../Communications/Local/LocalLoginService.cs | 4 +- .../Communications/Local/LocalUserServices.cs | 2 +- .../Region/Communications/OGS1/OGS1UserServices.cs | 24 ++-- .../Environment/Modules/AvatarProfilesModule.cs | 20 +-- 19 files changed, 205 insertions(+), 205 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/DB4o/DB4oManager.cs b/OpenSim/Data/DB4o/DB4oManager.cs index 13bd61c..a9368d5 100644 --- a/OpenSim/Data/DB4o/DB4oManager.cs +++ b/OpenSim/Data/DB4o/DB4oManager.cs @@ -125,10 +125,10 @@ namespace OpenSim.Data.DB4o IObjectSet result = database.Get(typeof (UserProfileData)); foreach (UserProfileData row in result) { - if (userProfiles.ContainsKey(row.Id)) - userProfiles[row.Id] = row; + if (userProfiles.ContainsKey(row.ID)) + userProfiles[row.ID] = row; else - userProfiles.Add(row.Id, row); + userProfiles.Add(row.ID, row); } database.Close(); } @@ -145,13 +145,13 @@ namespace OpenSim.Data.DB4o /// true on success, false on fail to persist to db public bool UpdateRecord(UserProfileData record) { - if (userProfiles.ContainsKey(record.Id)) + if (userProfiles.ContainsKey(record.ID)) { - userProfiles[record.Id] = record; + userProfiles[record.ID] = record; } else { - userProfiles.Add(record.Id, record); + userProfiles.Add(record.ID, record); } try diff --git a/OpenSim/Data/MSSQL/MSSQLManager.cs b/OpenSim/Data/MSSQL/MSSQLManager.cs index e33468a..e327c46 100644 --- a/OpenSim/Data/MSSQL/MSSQLManager.cs +++ b/OpenSim/Data/MSSQL/MSSQLManager.cs @@ -300,7 +300,7 @@ namespace OpenSim.Data.MSSQL if (reader.Read()) { - retval.Id = new LLUUID((string)reader["UUID"]); + retval.ID = new LLUUID((string)reader["UUID"]); retval.FirstName = (string)reader["username"]; retval.SurName = (string)reader["lastname"]; @@ -323,14 +323,14 @@ namespace OpenSim.Data.MSSQL retval.UserInventoryURI = (string)reader["userInventoryURI"]; retval.UserAssetURI = (string)reader["userAssetURI"]; - retval.ProfileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString()); - retval.ProfileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString()); + retval.CanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString()); + retval.WantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString()); - retval.ProfileAboutText = (string)reader["profileAboutText"]; - retval.ProfileFirstText = (string)reader["profileFirstText"]; + retval.AboutText = (string)reader["profileAboutText"]; + retval.FirstLifeAboutText = (string)reader["profileFirstText"]; - retval.ProfileImage = new LLUUID((string)reader["profileImage"]); - retval.ProfileFirstImage = new LLUUID((string)reader["profileFirstImage"]); + retval.Image = new LLUUID((string)reader["profileImage"]); + retval.FirstLifeImage = new LLUUID((string)reader["profileFirstImage"]); retval.WebLoginKey = new LLUUID((string)reader["webLoginKey"]); } else diff --git a/OpenSim/Data/MSSQL/MSSQLUserData.cs b/OpenSim/Data/MSSQL/MSSQLUserData.cs index aae0095..3d4cabf 100644 --- a/OpenSim/Data/MSSQL/MSSQLUserData.cs +++ b/OpenSim/Data/MSSQL/MSSQLUserData.cs @@ -453,7 +453,7 @@ namespace OpenSim.Data.MSSQL override public UserAgentData GetAgentByName(string user, string last) { UserProfileData profile = GetUserByName(user, last); - return GetAgentByUUID(profile.Id); + return GetAgentByUUID(profile.ID); } /// @@ -505,14 +505,14 @@ namespace OpenSim.Data.MSSQL { lock (database) { - InsertUserRow(user.Id, user.FirstName, user.SurName, user.PasswordHash, user.PasswordSalt, + InsertUserRow(user.ID, user.FirstName, user.SurName, user.PasswordHash, user.PasswordSalt, user.HomeRegion, user.HomeLocation.X, user.HomeLocation.Y, user.HomeLocation.Z, user.HomeLookAt.X, user.HomeLookAt.Y, user.HomeLookAt.Z, user.Created, user.LastLogin, user.UserInventoryURI, user.UserAssetURI, - user.ProfileCanDoMask, user.ProfileWantDoMask, - user.ProfileAboutText, user.ProfileFirstText, user.ProfileImage, - user.ProfileFirstImage, user.WebLoginKey); + user.CanDoMask, user.WantDoMask, + user.AboutText, user.FirstLifeAboutText, user.Image, + user.FirstLifeImage, user.WebLoginKey); } } catch (Exception e) @@ -651,7 +651,7 @@ namespace OpenSim.Data.MSSQL "profileFirstImage = @profileFirstImage, " + "webLoginKey = @webLoginKey where " + "UUID = @keyUUUID;", database.getConnection()); - SqlParameter param1 = new SqlParameter("@uuid", user.Id.ToString()); + SqlParameter param1 = new SqlParameter("@uuid", user.ID.ToString()); SqlParameter param2 = new SqlParameter("@username", user.FirstName); SqlParameter param3 = new SqlParameter("@lastname", user.SurName); SqlParameter param4 = new SqlParameter("@passwordHash", user.PasswordHash); @@ -667,13 +667,13 @@ namespace OpenSim.Data.MSSQL SqlParameter param14 = new SqlParameter("@lastLogin", Convert.ToInt32(user.LastLogin)); SqlParameter param15 = new SqlParameter("@userInventoryURI", user.UserInventoryURI); SqlParameter param16 = new SqlParameter("@userAssetURI", user.UserAssetURI); - SqlParameter param17 = new SqlParameter("@profileCanDoMask", Convert.ToInt32(user.ProfileCanDoMask)); - SqlParameter param18 = new SqlParameter("@profileWantDoMask", Convert.ToInt32(user.ProfileWantDoMask)); - SqlParameter param19 = new SqlParameter("@profileAboutText", user.ProfileAboutText); - SqlParameter param20 = new SqlParameter("@profileFirstText", user.ProfileFirstText); - SqlParameter param21 = new SqlParameter("@profileImage", user.ProfileImage.ToString()); - SqlParameter param22 = new SqlParameter("@profileFirstImage", user.ProfileFirstImage.ToString()); - SqlParameter param23 = new SqlParameter("@keyUUUID", user.Id.ToString()); + SqlParameter param17 = new SqlParameter("@profileCanDoMask", Convert.ToInt32(user.CanDoMask)); + SqlParameter param18 = new SqlParameter("@profileWantDoMask", Convert.ToInt32(user.WantDoMask)); + SqlParameter param19 = new SqlParameter("@profileAboutText", user.AboutText); + SqlParameter param20 = new SqlParameter("@profileFirstText", user.FirstLifeAboutText); + SqlParameter param21 = new SqlParameter("@profileImage", user.Image.ToString()); + SqlParameter param22 = new SqlParameter("@profileFirstImage", user.FirstLifeImage.ToString()); + SqlParameter param23 = new SqlParameter("@keyUUUID", user.ID.ToString()); SqlParameter param24 = new SqlParameter("@webLoginKey", user.WebLoginKey.UUID.ToString()); command.Parameters.Add(param1); command.Parameters.Add(param2); diff --git a/OpenSim/Data/MySQL/MySQLManager.cs b/OpenSim/Data/MySQL/MySQLManager.cs index 110f192..f4ef172 100644 --- a/OpenSim/Data/MySQL/MySQLManager.cs +++ b/OpenSim/Data/MySQL/MySQLManager.cs @@ -431,7 +431,7 @@ namespace OpenSim.Data.MySQL if (!LLUUID.TryParse((string)reader["UUID"], out id)) return null; - retval.Id = id; + retval.ID = id; retval.FirstName = (string) reader["username"]; retval.SurName = (string) reader["lastname"]; @@ -454,33 +454,33 @@ namespace OpenSim.Data.MySQL retval.UserInventoryURI = (string) reader["userInventoryURI"]; retval.UserAssetURI = (string) reader["userAssetURI"]; - retval.ProfileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString()); - retval.ProfileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString()); + retval.CanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString()); + retval.WantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString()); if (reader.IsDBNull(reader.GetOrdinal("profileAboutText"))) - retval.ProfileAboutText = ""; + retval.AboutText = ""; else - retval.ProfileAboutText = (string) reader["profileAboutText"]; + retval.AboutText = (string) reader["profileAboutText"]; if (reader.IsDBNull(reader.GetOrdinal("profileFirstText"))) - retval.ProfileFirstText = ""; + retval.FirstLifeAboutText = ""; else - retval.ProfileFirstText = (string)reader["profileFirstText"]; + retval.FirstLifeAboutText = (string)reader["profileFirstText"]; if (reader.IsDBNull(reader.GetOrdinal("profileImage"))) - retval.ProfileImage = LLUUID.Zero; + retval.Image = LLUUID.Zero; else { LLUUID tmp; LLUUID.TryParse((string)reader["profileImage"], out tmp); - retval.ProfileImage = tmp; + retval.Image = tmp; } if (reader.IsDBNull(reader.GetOrdinal("profileFirstImage"))) - retval.ProfileFirstImage = LLUUID.Zero; + retval.FirstLifeImage = LLUUID.Zero; else { LLUUID tmp; LLUUID.TryParse((string)reader["profileFirstImage"], out tmp); - retval.ProfileFirstImage = tmp; + retval.FirstLifeImage = tmp; } if(reader.IsDBNull(reader.GetOrdinal("webLoginKey"))) diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs index 5654207..5b2dc76 100644 --- a/OpenSim/Data/MySQL/MySQLUserData.cs +++ b/OpenSim/Data/MySQL/MySQLUserData.cs @@ -475,7 +475,7 @@ namespace OpenSim.Data.MySQL override public UserAgentData GetAgentByName(string user, string last) { UserProfileData profile = GetUserByName(user, last); - return GetAgentByUUID(profile.Id); + return GetAgentByUUID(profile.ID); } override public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) @@ -547,14 +547,14 @@ namespace OpenSim.Data.MySQL { lock (database) { - database.insertUserRow(user.Id, user.FirstName, user.SurName, user.PasswordHash, user.PasswordSalt, + database.insertUserRow(user.ID, user.FirstName, user.SurName, user.PasswordHash, user.PasswordSalt, user.HomeRegion, user.HomeLocation.X, user.HomeLocation.Y, user.HomeLocation.Z, user.HomeLookAt.X, user.HomeLookAt.Y, user.HomeLookAt.Z, user.Created, user.LastLogin, user.UserInventoryURI, user.UserAssetURI, - user.ProfileCanDoMask, user.ProfileWantDoMask, - user.ProfileAboutText, user.ProfileFirstText, user.ProfileImage, - user.ProfileFirstImage, user.WebLoginKey); + user.CanDoMask, user.WantDoMask, + user.AboutText, user.FirstLifeAboutText, user.Image, + user.FirstLifeImage, user.WebLoginKey); } } catch (Exception e) @@ -590,11 +590,11 @@ namespace OpenSim.Data.MySQL /// The profile data to use to update the DB override public bool UpdateUserProfile(UserProfileData user) { - database.updateUserRow(user.Id, user.FirstName, user.SurName, user.PasswordHash, user.PasswordSalt, + database.updateUserRow(user.ID, user.FirstName, user.SurName, user.PasswordHash, user.PasswordSalt, user.HomeRegion, user.HomeLocation.X, user.HomeLocation.Y, user.HomeLocation.Z, user.HomeLookAt.X, user.HomeLookAt.Y, user.HomeLookAt.Z, user.Created, user.LastLogin, user.UserInventoryURI, - user.UserAssetURI, user.ProfileCanDoMask, user.ProfileWantDoMask, user.ProfileAboutText, - user.ProfileFirstText, user.ProfileImage, user.ProfileFirstImage, user.WebLoginKey); + user.UserAssetURI, user.CanDoMask, user.WantDoMask, user.AboutText, + user.FirstLifeAboutText, user.Image, user.FirstLifeImage, user.WebLoginKey); return true; } diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs index e395565..815c1bb 100644 --- a/OpenSim/Data/SQLite/SQLiteUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteUserData.cs @@ -135,7 +135,7 @@ namespace OpenSim.Data.SQLite if (rows.Length > 0) { UserProfileData user = buildUserProfile(rows[0]); - DataRow row = ds.Tables["useragents"].Rows.Find(Util.ToRawUuidString(user.Id)); + DataRow row = ds.Tables["useragents"].Rows.Find(Util.ToRawUuidString(user.ID)); if (row != null) { user.CurrentAgent = buildUserAgent(row); @@ -365,7 +365,7 @@ namespace OpenSim.Data.SQLite DataTable users = ds.Tables["users"]; lock (ds) { - DataRow row = users.Rows.Find(Util.ToRawUuidString(user.Id)); + DataRow row = users.Rows.Find(Util.ToRawUuidString(user.ID)); if (row == null) { row = users.NewRow(); @@ -384,7 +384,7 @@ namespace OpenSim.Data.SQLite if (user.CurrentAgent != null) { DataTable ua = ds.Tables["useragents"]; - row = ua.Rows.Find(Util.ToRawUuidString(user.Id)); + row = ua.Rows.Find(Util.ToRawUuidString(user.ID)); if (row == null) { row = ua.NewRow(); @@ -401,7 +401,7 @@ namespace OpenSim.Data.SQLite // I just added this to help the standalone login situation. //It still needs to be looked at by a Database guy DataTable ua = ds.Tables["useragents"]; - row = ua.Rows.Find(Util.ToRawUuidString(user.Id)); + row = ua.Rows.Find(Util.ToRawUuidString(user.ID)); if (row == null) { @@ -593,7 +593,7 @@ namespace OpenSim.Data.SQLite UserProfileData user = new UserProfileData(); LLUUID tmp; LLUUID.TryParse((String)row["UUID"], out tmp); - user.Id = tmp; + user.ID = tmp; user.FirstName = (String) row["username"]; user.SurName = (String) row["surname"]; user.PasswordHash = (String) row["passwordHash"]; @@ -616,14 +616,14 @@ namespace OpenSim.Data.SQLite user.RootInventoryFolderID = new LLUUID((String) row["rootInventoryFolderID"]); user.UserInventoryURI = (String) row["userInventoryURI"]; user.UserAssetURI = (String) row["userAssetURI"]; - user.ProfileCanDoMask = Convert.ToUInt32(row["profileCanDoMask"]); - user.ProfileWantDoMask = Convert.ToUInt32(row["profileWantDoMask"]); - user.ProfileAboutText = (String) row["profileAboutText"]; - user.ProfileFirstText = (String) row["profileFirstText"]; + user.CanDoMask = Convert.ToUInt32(row["profileCanDoMask"]); + user.WantDoMask = Convert.ToUInt32(row["profileWantDoMask"]); + user.AboutText = (String) row["profileAboutText"]; + user.FirstLifeAboutText = (String) row["profileFirstText"]; LLUUID.TryParse((String)row["profileImage"], out tmp); - user.ProfileImage = tmp; + user.Image = tmp; LLUUID.TryParse((String)row["profileFirstImage"], out tmp); - user.ProfileFirstImage = tmp; + user.FirstLifeImage = tmp; user.WebLoginKey = new LLUUID((String) row["webLoginKey"]); return user; @@ -631,7 +631,7 @@ namespace OpenSim.Data.SQLite private void fillUserRow(DataRow row, UserProfileData user) { - row["UUID"] = Util.ToRawUuidString(user.Id); + row["UUID"] = Util.ToRawUuidString(user.ID); row["username"] = user.FirstName; row["surname"] = user.SurName; row["passwordHash"] = user.PasswordHash; @@ -652,12 +652,12 @@ namespace OpenSim.Data.SQLite row["rootInventoryFolderID"] = user.RootInventoryFolderID; row["userInventoryURI"] = user.UserInventoryURI; row["userAssetURI"] = user.UserAssetURI; - row["profileCanDoMask"] = user.ProfileCanDoMask; - row["profileWantDoMask"] = user.ProfileWantDoMask; - row["profileAboutText"] = user.ProfileAboutText; - row["profileFirstText"] = user.ProfileFirstText; - row["profileImage"] = user.ProfileImage; - row["profileFirstImage"] = user.ProfileFirstImage; + row["profileCanDoMask"] = user.CanDoMask; + row["profileWantDoMask"] = user.WantDoMask; + row["profileAboutText"] = user.AboutText; + row["profileFirstText"] = user.FirstLifeAboutText; + row["profileImage"] = user.Image; + row["profileFirstImage"] = user.FirstLifeImage; row["webLoginKey"] = user.WebLoginKey; // ADO.NET doesn't handle NULL very well diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index 75fe1aa..6e07e7c 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs @@ -114,7 +114,7 @@ namespace OpenSim.Framework.Communications.Cache // "[INVENTORY CACHE]: Received folder {0} {1} for user {2}", // folderInfo.name, folderInfo.folderID, userID); - if (userID == UserProfile.Id) + if (userID == UserProfile.ID) { if (RootFolder == null) { @@ -169,7 +169,7 @@ namespace OpenSim.Framework.Communications.Cache /// public void ItemReceive(LLUUID userID, InventoryItemBase itemInfo) { - if ((userID == UserProfile.Id) && (RootFolder != null)) + if ((userID == UserProfile.ID) && (RootFolder != null)) { if (itemInfo.Folder == RootFolder.ID) { @@ -194,7 +194,7 @@ namespace OpenSim.Framework.Communications.Cache public void AddItem(LLUUID userID, InventoryItemBase itemInfo) { - if ((userID == UserProfile.Id) && (RootFolder != null)) + if ((userID == UserProfile.ID) && (RootFolder != null)) { ItemReceive(userID, itemInfo); m_parentCommsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); @@ -203,7 +203,7 @@ namespace OpenSim.Framework.Communications.Cache public void UpdateItem(LLUUID userID, InventoryItemBase itemInfo) { - if ((userID == UserProfile.Id) && (RootFolder != null)) + if ((userID == UserProfile.ID) && (RootFolder != null)) { m_parentCommsManager.InventoryService.AddNewInventoryItem(userID, itemInfo); } @@ -212,7 +212,7 @@ namespace OpenSim.Framework.Communications.Cache public bool DeleteItem(LLUUID userID, InventoryItemBase item) { bool result = false; - if ((userID == UserProfile.Id) && (RootFolder != null)) + if ((userID == UserProfile.ID) && (RootFolder != null)) { result = RootFolder.DeleteItem(item.ID); if (result) diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index 6b01d8f..192c8e3 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs @@ -164,9 +164,9 @@ namespace OpenSim.Framework.Communications } else { - m_inventoryService.CreateNewUserInventory(userProf.Id); + m_inventoryService.CreateNewUserInventory(userProf.ID); m_log.Info("[USERS]: Created new inventory set for " + firstName + " " + lastName); - return userProf.Id; + return userProf.ID; } } @@ -249,7 +249,7 @@ namespace OpenSim.Framework.Communications UserProfileData profileData = m_userService.GetUserProfile(uuid); if (profileData != null) { - LLUUID profileId = profileData.Id; + LLUUID profileId = profileData.ID; string firstname = profileData.FirstName; string lastname = profileData.SurName; diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index e5ad7a0..4f314bc 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs @@ -207,7 +207,7 @@ namespace OpenSim.Framework.UserManagement try { - LLUUID agentID = userProfile.Id; + LLUUID agentID = userProfile.ID; // Inventory Library Section InventoryData inventData = GetInventorySkeleton(agentID); @@ -349,7 +349,7 @@ namespace OpenSim.Framework.UserManagement try { - LLUUID agentID = userProfile.Id; + LLUUID agentID = userProfile.ID; // Inventory Library Section InventoryData inventData = GetInventorySkeleton(agentID); @@ -491,7 +491,7 @@ namespace OpenSim.Framework.UserManagement if (goodweblogin) { LLUUID webloginkey = LLUUID.Random(); - m_userManager.StoreWebLoginKey(user.Id, webloginkey); + m_userManager.StoreWebLoginKey(user.ID, webloginkey); statuscode = 301; string redirectURL = "about:blank?redirect-http-hack=" + @@ -639,7 +639,7 @@ namespace OpenSim.Framework.UserManagement public virtual bool AuthenticateUser(UserProfileData profile, string password) { bool passwordSuccess = false; - m_log.InfoFormat("[LOGIN]: Authenticating {0} {1} ({2})", profile.FirstName, profile.SurName, profile.Id); + m_log.InfoFormat("[LOGIN]: Authenticating {0} {1} ({2})", profile.FirstName, profile.SurName, profile.ID); // Web Login method seems to also occasionally send the hashed password itself @@ -664,7 +664,7 @@ namespace OpenSim.Framework.UserManagement public virtual bool AuthenticateUser(UserProfileData profile, LLUUID webloginkey) { bool passwordSuccess = false; - m_log.InfoFormat("[LOGIN]: Authenticating {0} {1} ({2})", profile.FirstName, profile.SurName, profile.Id); + m_log.InfoFormat("[LOGIN]: Authenticating {0} {1} ({2})", profile.FirstName, profile.SurName, profile.ID); // Match web login key unless it's the default weblogin key LLUUID.Zero passwordSuccess = ((profile.WebLoginKey==webloginkey) && profile.WebLoginKey != LLUUID.Zero); diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 02be6bd..91c284c 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs @@ -96,7 +96,7 @@ namespace OpenSim.Framework.UserManagement if (profile != null) { - profile.CurrentAgent = getUserAgent(profile.Id); + profile.CurrentAgent = getUserAgent(profile.ID); return profile; } } @@ -113,7 +113,7 @@ namespace OpenSim.Framework.UserManagement if (null != profile) { - profile.CurrentAgent = getUserAgent(profile.Id); + profile.CurrentAgent = getUserAgent(profile.ID); return profile; } } @@ -355,7 +355,7 @@ namespace OpenSim.Framework.UserManagement agent.sessionID = new LLUUID(randDataS, 0); // Profile UUID - agent.UUID = profile.Id; + agent.UUID = profile.ID; // Current position (from Home) agent.currentHandle = profile.HomeRegion; @@ -481,7 +481,7 @@ namespace OpenSim.Framework.UserManagement agent.sessionID = new LLUUID(randDataS, 0); // Profile UUID - agent.UUID = profile.Id; + agent.UUID = profile.ID; // Current position (from Home) agent.currentHandle = profile.HomeRegion; @@ -523,7 +523,7 @@ namespace OpenSim.Framework.UserManagement { UserProfileData user = new UserProfileData(); user.HomeLocation = new LLVector3(128, 128, 100); - user.Id = LLUUID.Random(); + user.ID = LLUUID.Random(); user.FirstName = firstName; user.SurName = lastName; user.PasswordHash = pass; @@ -545,14 +545,14 @@ namespace OpenSim.Framework.UserManagement } } - return user.Id; + return user.ID; } public bool UpdateUserProfileProperties(UserProfileData UserProfile) { - if (null == GetUserProfile(UserProfile.Id)) + if (null == GetUserProfile(UserProfile.ID)) { - m_log.Info("[USERSTORAGE]: Failed to find User by UUID " + UserProfile.Id.ToString()); + m_log.Info("[USERSTORAGE]: Failed to find User by UUID " + UserProfile.ID.ToString()); return false; } foreach (KeyValuePair plugin in _plugins) @@ -563,7 +563,7 @@ namespace OpenSim.Framework.UserManagement } catch (Exception e) { - m_log.Info("[USERSTORAGE]: Unable to update user " + UserProfile.Id.ToString() + m_log.Info("[USERSTORAGE]: Unable to update user " + UserProfile.ID.ToString() + " via " + plugin.Key + "(" + e.ToString() + ")"); return false; } diff --git a/OpenSim/Framework/UserProfileData.cs b/OpenSim/Framework/UserProfileData.cs index 016dc8d..73c9137 100644 --- a/OpenSim/Framework/UserProfileData.cs +++ b/OpenSim/Framework/UserProfileData.cs @@ -43,42 +43,42 @@ namespace OpenSim.Framework /// /// The last used Web_login_key /// - private LLUUID webLoginKey; + private LLUUID _webLoginKey; /// /// The first component of a users account name /// - private string username; + private string _firstname; /// /// The second component of a users account name /// - private string surname; + private string _surname; /// /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt) /// /// This is double MD5'd because the client sends an unsalted MD5 to the loginserver - private string passwordHash; + private string _passwordHash; /// /// The salt used for the users hash, should be 32 bytes or longer /// - private string passwordSalt; + private string _passwordSalt; /// /// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into /// public ulong HomeRegion { - get { return Helpers.UIntsToLong((homeRegionX * (uint)Constants.RegionSize), (homeRegionY * (uint)Constants.RegionSize)); } + get { return Helpers.UIntsToLong((_homeRegionX * (uint)Constants.RegionSize), (_homeRegionY * (uint)Constants.RegionSize)); } set { - homeRegionX = (uint) (value >> 40); - homeRegionY = (((uint) (value)) >> 8); + _homeRegionX = (uint) (value >> 40); + _homeRegionY = (((uint) (value)) >> 8); } } - public LLUUID Id { + public LLUUID ID { get { return _id; } @@ -89,261 +89,261 @@ namespace OpenSim.Framework public LLUUID WebLoginKey { get { - return webLoginKey; + return _webLoginKey; } set { - webLoginKey = value; + _webLoginKey = value; } } public string FirstName { get { - return username; + return _firstname; } set { - username = value; + _firstname = value; } } public string SurName { get { - return surname; + return _surname; } set { - surname = value; + _surname = value; } } public string PasswordHash { get { - return passwordHash; + return _passwordHash; } set { - passwordHash = value; + _passwordHash = value; } } public string PasswordSalt { get { - return passwordSalt; + return _passwordSalt; } set { - passwordSalt = value; + _passwordSalt = value; } } public uint HomeRegionX { get { - return homeRegionX; + return _homeRegionX; } set { - homeRegionX = value; + _homeRegionX = value; } } public uint HomeRegionY { get { - return homeRegionY; + return _homeRegionY; } set { - homeRegionY = value; + _homeRegionY = value; } } public LLVector3 HomeLocation { get { - return homeLocation; + return _homeLocation; } set { - homeLocation = value; + _homeLocation = value; } } public LLVector3 HomeLookAt { get { - return homeLookAt; + return _homeLookAt; } set { - homeLookAt = value; + _homeLookAt = value; } } public int Created { get { - return created; + return _created; } set { - created = value; + _created = value; } } public int LastLogin { get { - return lastLogin; + return _lastLogin; } set { - lastLogin = value; + _lastLogin = value; } } public LLUUID RootInventoryFolderID { get { - return rootInventoryFolderID; + return _rootInventoryFolderID; } set { - rootInventoryFolderID = value; + _rootInventoryFolderID = value; } } public string UserInventoryURI { get { - return userInventoryURI; + return _userInventoryURI; } set { - userInventoryURI = value; + _userInventoryURI = value; } } public string UserAssetURI { get { - return userAssetURI; + return _userAssetURI; } set { - userAssetURI = value; + _userAssetURI = value; } } - public uint ProfileCanDoMask { + public uint CanDoMask { get { - return profileCanDoMask; + return _profileCanDoMask; } set { - profileCanDoMask = value; + _profileCanDoMask = value; } } - public uint ProfileWantDoMask { + public uint WantDoMask { get { - return profileWantDoMask; + return _profileWantDoMask; } set { - profileWantDoMask = value; + _profileWantDoMask = value; } } - public string ProfileAboutText { + public string AboutText { get { - return profileAboutText; + return _profileAboutText; } set { - profileAboutText = value; + _profileAboutText = value; } } - public string ProfileFirstText { + public string FirstLifeAboutText { get { - return profileFirstText; + return _profileFirstText; } set { - profileFirstText = value; + _profileFirstText = value; } } - public LLUUID ProfileImage { + public LLUUID Image { get { - return profileImage; + return _profileImage; } set { - profileImage = value; + _profileImage = value; } } - public LLUUID ProfileFirstImage { + public LLUUID FirstLifeImage { get { - return profileFirstImage; + return _profileFirstImage; } set { - profileFirstImage = value; + _profileFirstImage = value; } } public UserAgentData CurrentAgent { get { - return currentAgent; + return _currentAgent; } set { - currentAgent = value; + _currentAgent = value; } } - private uint homeRegionX; - private uint homeRegionY; + private uint _homeRegionX; + private uint _homeRegionY; /// /// The coordinates inside the region of the home location /// - private LLVector3 homeLocation; + private LLVector3 _homeLocation; /// /// Where the user will be looking when they rez. /// - private LLVector3 homeLookAt; + private LLVector3 _homeLookAt; /// /// A UNIX Timestamp (seconds since epoch) for the users creation /// - private int created; + private int _created; /// /// A UNIX Timestamp for the users last login date / time /// - private int lastLogin; + private int _lastLogin; - private LLUUID rootInventoryFolderID; + private LLUUID _rootInventoryFolderID; /// /// A URI to the users inventory server, used for foreigners and large grids /// - private string userInventoryURI = String.Empty; + private string _userInventoryURI = String.Empty; /// /// A URI to the users asset server, used for foreigners and large grids. /// - private string userAssetURI = String.Empty; + private string _userAssetURI = String.Empty; /// /// A uint mask containing the "I can do" fields of the users profile /// - private uint profileCanDoMask; + private uint _profileCanDoMask; /// /// A uint mask containing the "I want to do" part of the users profile /// - private uint profileWantDoMask; // Profile window "I want to" mask + private uint _profileWantDoMask; // Profile window "I want to" mask /// /// The about text listed in a users profile. /// - private string profileAboutText = String.Empty; + private string _profileAboutText = String.Empty; /// /// The first life about text listed in a users profile /// - private string profileFirstText = String.Empty; + private string _profileFirstText = String.Empty; /// /// The profile image for an avatar stored on the asset server /// - private LLUUID profileImage; + private LLUUID _profileImage; /// /// The profile image for the users first life tab /// - private LLUUID profileFirstImage; + private LLUUID _profileFirstImage; /// /// The users last registered agent (filled in on the user server) /// - private UserAgentData currentAgent; + private UserAgentData _currentAgent; } } diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index f655415..141aa3e 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs @@ -177,7 +177,7 @@ namespace OpenSim.Grid.UserServer SimParams["secure_session_id"] = theUser.CurrentAgent.secureSessionID.ToString(); SimParams["firstname"] = theUser.FirstName; SimParams["lastname"] = theUser.SurName; - SimParams["agent_id"] = theUser.Id.ToString(); + SimParams["agent_id"] = theUser.ID.ToString(); SimParams["circuit_code"] = (Int32) Convert.ToUInt32(response.CircuitCode); SimParams["startpos_x"] = theUser.CurrentAgent.currentPos.X.ToString(); SimParams["startpos_y"] = theUser.CurrentAgent.currentPos.Y.ToString(); @@ -206,7 +206,7 @@ namespace OpenSim.Grid.UserServer if (handlerUserLoggedInAtLocation != null) { m_log.Info("[LOGIN]: Letting other objects know about login"); - handlerUserLoggedInAtLocation(theUser.Id, theUser.CurrentAgent.sessionID, theUser.CurrentAgent.currentRegion, + handlerUserLoggedInAtLocation(theUser.ID, theUser.CurrentAgent.sessionID, theUser.CurrentAgent.currentRegion, theUser.CurrentAgent.currentHandle, theUser.CurrentAgent.currentPos.X,theUser.CurrentAgent.currentPos.Y,theUser.CurrentAgent.currentPos.Z, theUser.FirstName,theUser.SurName); } @@ -268,7 +268,7 @@ namespace OpenSim.Grid.UserServer SimParams["secure_session_id"] = theUser.CurrentAgent.secureSessionID.ToString(); SimParams["firstname"] = theUser.FirstName; SimParams["lastname"] = theUser.SurName; - SimParams["agent_id"] = theUser.Id.ToString(); + SimParams["agent_id"] = theUser.ID.ToString(); SimParams["circuit_code"] = (Int32) Convert.ToUInt32(response.CircuitCode); SimParams["startpos_x"] = theUser.CurrentAgent.currentPos.X.ToString(); SimParams["startpos_y"] = theUser.CurrentAgent.currentPos.Y.ToString(); @@ -286,7 +286,7 @@ namespace OpenSim.Grid.UserServer if (handlerUserLoggedInAtLocation != null) { m_log.Info("[LOGIN]: Letting other objects know about login"); - handlerUserLoggedInAtLocation(theUser.Id, theUser.CurrentAgent.sessionID, theUser.CurrentAgent.currentRegion, + handlerUserLoggedInAtLocation(theUser.ID, theUser.CurrentAgent.sessionID, theUser.CurrentAgent.currentRegion, theUser.CurrentAgent.currentHandle, theUser.CurrentAgent.currentPos.X, theUser.CurrentAgent.currentPos.Y, theUser.CurrentAgent.currentPos.Z, theUser.FirstName, theUser.SurName); } diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index cf05bfd..cf3f8d8 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs @@ -127,17 +127,17 @@ namespace OpenSim.Grid.UserServer // Account information responseData["firstname"] = profile.FirstName; responseData["lastname"] = profile.SurName; - responseData["uuid"] = profile.Id.ToString(); + responseData["uuid"] = profile.ID.ToString(); // Server Information responseData["server_inventory"] = profile.UserInventoryURI; responseData["server_asset"] = profile.UserAssetURI; // Profile Information - responseData["profile_about"] = profile.ProfileAboutText; - responseData["profile_firstlife_about"] = profile.ProfileFirstText; - responseData["profile_firstlife_image"] = profile.ProfileFirstImage.ToString(); - responseData["profile_can_do"] = profile.ProfileCanDoMask.ToString(); - responseData["profile_want_do"] = profile.ProfileWantDoMask.ToString(); - responseData["profile_image"] = profile.ProfileImage.ToString(); + responseData["profile_about"] = profile.AboutText; + responseData["profile_firstlife_about"] = profile.FirstLifeAboutText; + responseData["profile_firstlife_image"] = profile.FirstLifeImage.ToString(); + responseData["profile_can_do"] = profile.CanDoMask.ToString(); + responseData["profile_want_do"] = profile.WantDoMask.ToString(); + responseData["profile_image"] = profile.Image.ToString(); responseData["profile_created"] = profile.Created.ToString(); responseData["profile_lastlogin"] = profile.LastLogin.ToString(); // Home region information @@ -341,11 +341,11 @@ namespace OpenSim.Grid.UserServer } if (requestData.Contains("FLImageID")) { - userProfile.ProfileFirstImage = new LLUUID((string)requestData["FLImageID"]); + userProfile.FirstLifeImage = new LLUUID((string)requestData["FLImageID"]); } if (requestData.Contains("ImageID")) { - userProfile.ProfileImage = new LLUUID((string)requestData["ImageID"]); + userProfile.Image = new LLUUID((string)requestData["ImageID"]); } // dont' know how yet if (requestData.Contains("MaturePublish")) @@ -353,11 +353,11 @@ namespace OpenSim.Grid.UserServer } if (requestData.Contains("AboutText")) { - userProfile.ProfileAboutText = (string)requestData["AboutText"]; + userProfile.AboutText = (string)requestData["AboutText"]; } if (requestData.Contains("FLAboutText")) { - userProfile.ProfileFirstText = (string)requestData["FLAboutText"]; + userProfile.FirstLifeAboutText = (string)requestData["FLAboutText"]; } // not in DB yet. if (requestData.Contains("ProfileURL")) diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index e8c3f7c..939bd8f 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -3100,11 +3100,11 @@ namespace OpenSim.Region.ClientStack { AvatarPropertiesUpdatePacket.PropertiesDataBlock Properties = Packet.PropertiesData; UserProfileData UserProfile = new UserProfileData(); - UserProfile.Id = AgentId; - UserProfile.ProfileAboutText = Helpers.FieldToUTF8String(Properties.AboutText); - UserProfile.ProfileFirstText = Helpers.FieldToUTF8String(Properties.FLAboutText); - UserProfile.ProfileFirstImage = Properties.FLImageID; - UserProfile.ProfileImage = Properties.ImageID; + UserProfile.ID = AgentId; + UserProfile.AboutText = Helpers.FieldToUTF8String(Properties.AboutText); + UserProfile.FirstLifeAboutText = Helpers.FieldToUTF8String(Properties.FLAboutText); + UserProfile.FirstLifeImage = Properties.FLImageID; + UserProfile.Image = Properties.ImageID; handlerUpdateAvatarProperties(this, UserProfile); } diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index e91cab5..2b023a6 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs @@ -149,8 +149,8 @@ namespace OpenSim.Region.ClientStack if (masterAvatar != null) { - m_log.Info("[PARCEL]: Found master avatar [" + masterAvatar.Id.ToString() + "]"); - scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.Id; + m_log.Info("[PARCEL]: Found master avatar [" + masterAvatar.ID.ToString() + "]"); + scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.ID; } else { diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index d1d3e22..8895c6e 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs @@ -87,7 +87,7 @@ namespace OpenSim.Region.Communications.Local profile = m_userManager.GetUserProfile(firstname, lastname); if (profile != null) { - m_Parent.InventoryService.CreateNewUserInventory(profile.Id); + m_Parent.InventoryService.CreateNewUserInventory(profile.ID); } return profile; @@ -169,7 +169,7 @@ namespace OpenSim.Region.Communications.Local LoginResponse.BuddyList buddyList = new LoginResponse.BuddyList(); - response.BuddList = ConvertFriendListItem(m_userManager.GetUserFriendList(theUser.Id)); + response.BuddList = ConvertFriendListItem(m_userManager.GetUserFriendList(theUser.ID)); Login _login = new Login(); //copy data to login object diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs index 00514e8..c543762 100644 --- a/OpenSim/Region/Communications/Local/LocalUserServices.cs +++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs @@ -84,7 +84,7 @@ namespace OpenSim.Region.Communications.Local } else { - m_inventoryService.CreateNewUserInventory(profile.Id); + m_inventoryService.CreateNewUserInventory(profile.ID); } return profile; diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index 9796cf4..906101b 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs @@ -62,15 +62,15 @@ namespace OpenSim.Region.Communications.OGS1 UserProfileData userData = new UserProfileData(); userData.FirstName = (string) data["firstname"]; userData.SurName = (string) data["lastname"]; - userData.Id = new LLUUID((string) data["uuid"]); + userData.ID = new LLUUID((string) data["uuid"]); userData.UserInventoryURI = (string) data["server_inventory"]; userData.UserAssetURI = (string) data["server_asset"]; - userData.ProfileFirstText = (string) data["profile_firstlife_about"]; - userData.ProfileFirstImage = new LLUUID((string) data["profile_firstlife_image"]); - userData.ProfileCanDoMask = Convert.ToUInt32((string) data["profile_can_do"]); - userData.ProfileWantDoMask = Convert.ToUInt32(data["profile_want_do"]); - userData.ProfileAboutText = (string)data["profile_about"]; - userData.ProfileImage = new LLUUID((string) data["profile_image"]); + userData.FirstLifeAboutText = (string) data["profile_firstlife_about"]; + userData.FirstLifeImage = new LLUUID((string) data["profile_firstlife_image"]); + userData.CanDoMask = Convert.ToUInt32((string) data["profile_can_do"]); + userData.WantDoMask = Convert.ToUInt32(data["profile_want_do"]); + userData.AboutText = (string)data["profile_about"]; + userData.Image = new LLUUID((string) data["profile_image"]); userData.LastLogin = Convert.ToInt32((string) data["profile_lastlogin"]); userData.HomeRegion = Convert.ToUInt64((string) data["home_region"]); userData.HomeLocation = @@ -306,13 +306,13 @@ namespace OpenSim.Region.Communications.OGS1 { m_log.Debug("[OGS1 USER SERVICES]: Asking UserServer to update profile."); Hashtable param = new Hashtable(); - param["avatar_uuid"] = UserProfile.Id.ToString(); + param["avatar_uuid"] = UserProfile.ID.ToString(); //param["AllowPublish"] = UserProfile.ToString(); - param["FLImageID"] = UserProfile.ProfileFirstImage.ToString(); - param["ImageID"] = UserProfile.ProfileImage.ToString(); + param["FLImageID"] = UserProfile.FirstLifeImage.ToString(); + param["ImageID"] = UserProfile.Image.ToString(); //param["MaturePublish"] = MaturePublish.ToString(); - param["AboutText"] = UserProfile.ProfileAboutText; - param["FLAboutText"] = UserProfile.ProfileFirstText; + param["AboutText"] = UserProfile.AboutText; + param["FLAboutText"] = UserProfile.FirstLifeAboutText; //param["ProfileURL"] = UserProfile.ProfileURL.ToString(); IList parameters = new ArrayList(); parameters.Add(param); diff --git a/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs b/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs index 699e68d..e3ad297 100644 --- a/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs +++ b/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs @@ -90,10 +90,10 @@ namespace OpenSim.Region.Environment.Modules UserProfileData profile = m_scene.CommsManager.UserService.GetUserProfile(avatarID); if (null != profile) { - remoteClient.SendAvatarProperties(profile.Id, profile.ProfileAboutText, + remoteClient.SendAvatarProperties(profile.ID, profile.AboutText, Util.ToDateTime(profile.Created).ToString(), - System.String.Empty, profile.ProfileFirstText, profile.ProfileCanDoMask, - profile.ProfileFirstImage, profile.ProfileImage, System.String.Empty, partner); + System.String.Empty, profile.FirstLifeAboutText, profile.CanDoMask, + profile.FirstLifeImage, profile.Image, System.String.Empty, partner); } else { @@ -103,15 +103,15 @@ namespace OpenSim.Region.Environment.Modules public void UpdateAvatarProperties(IClientAPI remoteClient, UserProfileData newProfile) { - UserProfileData Profile = m_scene.CommsManager.UserService.GetUserProfile(newProfile.Id); + UserProfileData Profile = m_scene.CommsManager.UserService.GetUserProfile(newProfile.ID); // if it's the profile of the user requesting the update, then we change only a few things. - if (remoteClient.AgentId.CompareTo(Profile.Id) == 0) + if (remoteClient.AgentId.CompareTo(Profile.ID) == 0) { - Profile.ProfileImage = newProfile.ProfileImage; - Profile.ProfileFirstImage = newProfile.ProfileFirstImage; - Profile.ProfileAboutText = newProfile.ProfileAboutText; - Profile.ProfileFirstText = newProfile.ProfileFirstText; + Profile.Image = newProfile.Image; + Profile.FirstLifeImage = newProfile.FirstLifeImage; + Profile.AboutText = newProfile.AboutText; + Profile.FirstLifeAboutText = newProfile.FirstLifeAboutText; } else { @@ -119,7 +119,7 @@ namespace OpenSim.Region.Environment.Modules } if (m_scene.CommsManager.UserService.UpdateUserProfileProperties(Profile)) { - RequestAvatarProperty(remoteClient, newProfile.Id); + RequestAvatarProperty(remoteClient, newProfile.ID); } } } -- cgit v1.1