From c176caeb05c2264654b764e4d010561da60c24fc Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Thu, 10 Apr 2008 13:53:06 +0000 Subject: moved fields to properties for UserDataProfile, which was actually a little more work than I expected given the copious use of out params. --- OpenSim/Framework/UserProfileData.cs | 244 +++++++++++++++++++++++++++++++---- 1 file changed, 221 insertions(+), 23 deletions(-) (limited to 'OpenSim/Framework/UserProfileData.cs') diff --git a/OpenSim/Framework/UserProfileData.cs b/OpenSim/Framework/UserProfileData.cs index 6a49f0d..016dc8d 100644 --- a/OpenSim/Framework/UserProfileData.cs +++ b/OpenSim/Framework/UserProfileData.cs @@ -38,37 +38,37 @@ namespace OpenSim.Framework /// /// The ID value for this user /// - public LLUUID UUID; + private LLUUID _id; /// /// The last used Web_login_key /// - public LLUUID webLoginKey; + private LLUUID webLoginKey; /// /// The first component of a users account name /// - public string username; + private string username; /// /// The second component of a users account name /// - public 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 - public string passwordHash; + private string passwordHash; /// /// The salt used for the users hash, should be 32 bytes or longer /// - public 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 + public ulong HomeRegion { get { return Helpers.UIntsToLong((homeRegionX * (uint)Constants.RegionSize), (homeRegionY * (uint)Constants.RegionSize)); } set @@ -78,74 +78,272 @@ namespace OpenSim.Framework } } - public uint homeRegionX; - public uint homeRegionY; + public LLUUID Id { + get { + return _id; + } + set { + _id = value; + } + } + + public LLUUID WebLoginKey { + get { + return webLoginKey; + } + set { + webLoginKey = value; + } + } + + public string FirstName { + get { + return username; + } + set { + username = value; + } + } + + public string SurName { + get { + return surname; + } + set { + surname = value; + } + } + + public string PasswordHash { + get { + return passwordHash; + } + set { + passwordHash = value; + } + } + + public string PasswordSalt { + get { + return passwordSalt; + } + set { + passwordSalt = value; + } + } + + public uint HomeRegionX { + get { + return homeRegionX; + } + set { + homeRegionX = value; + } + } + + public uint HomeRegionY { + get { + return homeRegionY; + } + set { + homeRegionY = value; + } + } + + public LLVector3 HomeLocation { + get { + return homeLocation; + } + set { + homeLocation = value; + } + } + + public LLVector3 HomeLookAt { + get { + return homeLookAt; + } + set { + homeLookAt = value; + } + } + + public int Created { + get { + return created; + } + set { + created = value; + } + } + + public int LastLogin { + get { + return lastLogin; + } + set { + lastLogin = value; + } + } + + public LLUUID RootInventoryFolderID { + get { + return rootInventoryFolderID; + } + set { + rootInventoryFolderID = value; + } + } + + public string UserInventoryURI { + get { + return userInventoryURI; + } + set { + userInventoryURI = value; + } + } + + public string UserAssetURI { + get { + return userAssetURI; + } + set { + userAssetURI = value; + } + } + + public uint ProfileCanDoMask { + get { + return profileCanDoMask; + } + set { + profileCanDoMask = value; + } + } + + public uint ProfileWantDoMask { + get { + return profileWantDoMask; + } + set { + profileWantDoMask = value; + } + } + + public string ProfileAboutText { + get { + return profileAboutText; + } + set { + profileAboutText = value; + } + } + + public string ProfileFirstText { + get { + return profileFirstText; + } + set { + profileFirstText = value; + } + } + + public LLUUID ProfileImage { + get { + return profileImage; + } + set { + profileImage = value; + } + } + + public LLUUID ProfileFirstImage { + get { + return profileFirstImage; + } + set { + profileFirstImage = value; + } + } + + public UserAgentData CurrentAgent { + get { + return currentAgent; + } + set { + currentAgent = value; + } + } + + private uint homeRegionX; + private uint homeRegionY; /// /// The coordinates inside the region of the home location /// - public LLVector3 homeLocation; + private LLVector3 homeLocation; /// /// Where the user will be looking when they rez. /// - public LLVector3 homeLookAt; + private LLVector3 homeLookAt; /// /// A UNIX Timestamp (seconds since epoch) for the users creation /// - public int created; + private int created; /// /// A UNIX Timestamp for the users last login date / time /// - public int lastLogin; + private int lastLogin; - public LLUUID rootInventoryFolderID; + private LLUUID rootInventoryFolderID; /// /// A URI to the users inventory server, used for foreigners and large grids /// - public string userInventoryURI = String.Empty; + private string userInventoryURI = String.Empty; /// /// A URI to the users asset server, used for foreigners and large grids. /// - public string userAssetURI = String.Empty; + private string userAssetURI = String.Empty; /// /// A uint mask containing the "I can do" fields of the users profile /// - public uint profileCanDoMask; + private uint profileCanDoMask; /// /// A uint mask containing the "I want to do" part of the users profile /// - public 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. /// - public string profileAboutText = String.Empty; + private string profileAboutText = String.Empty; /// /// The first life about text listed in a users profile /// - public string profileFirstText = String.Empty; + private string profileFirstText = String.Empty; /// /// The profile image for an avatar stored on the asset server /// - public LLUUID profileImage; + private LLUUID profileImage; /// /// The profile image for the users first life tab /// - public LLUUID profileFirstImage; + private LLUUID profileFirstImage; /// /// The users last registered agent (filled in on the user server) /// - public UserAgentData currentAgent; + private UserAgentData currentAgent; } } -- cgit v1.1