From f8ccf00f1cd8b99a2012558ded7de01ffcff7e35 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Thu, 26 Jun 2008 20:25:57 +0000 Subject: Apply patch from bug #1609 -- Documentation for Data/MSSQL. Thanks kerunix_Flan! --- OpenSim/Data/MSSQL/MSSQLUserData.cs | 90 +++++++++++++++++++++++++++++++++---- 1 file changed, 82 insertions(+), 8 deletions(-) (limited to 'OpenSim/Data/MSSQL/MSSQLUserData.cs') diff --git a/OpenSim/Data/MSSQL/MSSQLUserData.cs b/OpenSim/Data/MSSQL/MSSQLUserData.cs index 8714e2b..cb5ba24 100644 --- a/OpenSim/Data/MSSQL/MSSQLUserData.cs +++ b/OpenSim/Data/MSSQL/MSSQLUserData.cs @@ -53,8 +53,10 @@ namespace OpenSim.Data.MSSQL private string m_userFriendsTableName; /// - /// Loads and initialises the MySQL storage plugin + /// Loads and initialises the MSSQL storage plugin /// + /// TODO: do something with the connect string instead of ignoring it. + /// use mssql_connection.ini override public void Initialise(string connect) { // TODO: do something with the connect string instead of @@ -92,6 +94,10 @@ namespace OpenSim.Data.MSSQL TestTables(); } + /// + /// + /// + /// private bool TestTables() { IDbCommand cmd; @@ -128,6 +134,7 @@ namespace OpenSim.Data.MSSQL return true; } + /// /// Searches the database for a specified user profile by name components /// @@ -166,6 +173,12 @@ namespace OpenSim.Data.MSSQL #region User Friends List Data + /// + /// Add a new friend in the friendlist + /// + /// UUID of the friendlist owner + /// Friend's UUID + /// Permission flag override public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) { int dtvalue = Util.UnixTimeSinceEpoch(); @@ -209,6 +222,11 @@ namespace OpenSim.Data.MSSQL } } + /// + /// Remove an friend from the friendlist + /// + /// UUID of the friendlist owner + /// UUID of the not-so-friendly user to remove from the list override public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) { Dictionary param = new Dictionary(); @@ -242,6 +260,12 @@ namespace OpenSim.Data.MSSQL } } + /// + /// Update friendlist permission flag for a friend + /// + /// UUID of the friendlist owner + /// UUID of the friend + /// new permission flag override public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) { Dictionary param = new Dictionary(); @@ -272,7 +296,11 @@ namespace OpenSim.Data.MSSQL } } - + /// + /// Get (fetch?) the user's friendlist + /// + /// UUID of the friendlist owner + /// Friendlist list override public List GetUserFriendList(LLUUID friendlistowner) { List Lfli = new List(); @@ -321,13 +349,23 @@ namespace OpenSim.Data.MSSQL #endregion + /// + /// STUB ! Update current region + /// + /// avatar uuid + /// region uuid + /// region handle override public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) { //m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called"); } - - + /// + /// + /// + /// + /// + /// override public List GeneratePickerResults(LLUUID queryID, string query) { List returnlist = new List(); @@ -407,7 +445,11 @@ namespace OpenSim.Data.MSSQL return returnlist; } - // See IUserData + /// + /// See IUserData + /// + /// + /// override public UserProfileData GetUserByUUID(LLUUID uuid) { try @@ -490,6 +532,13 @@ namespace OpenSim.Data.MSSQL return null; } } + + /// + /// Store a weblogin key + /// + /// The agent UUID + /// the WebLogin Key + /// unused ? override public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) { UserProfileData user = GetUserByUUID(AgentID); @@ -626,7 +675,11 @@ namespace OpenSim.Data.MSSQL // Do nothing. } - + /// + /// update a user profile + /// + /// the profile to update + /// override public bool UpdateUserProfile(UserProfileData user) { SqlCommand command = new SqlCommand("UPDATE " + m_usersTableName + " set UUID = @uuid, " + @@ -726,7 +779,7 @@ namespace OpenSim.Data.MSSQL /// The senders account ID /// The receivers account ID /// The amount to transfer - /// Success? + /// false override public bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) { return false; @@ -739,7 +792,7 @@ namespace OpenSim.Data.MSSQL /// The senders account ID /// The receivers account ID /// The item to transfer - /// Success? + /// false override public bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) { return false; @@ -832,6 +885,11 @@ namespace OpenSim.Data.MSSQL return null; } + /// + /// Update a user appearence into database + /// + /// the used UUID + /// the appearence override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) { string sql = String.Empty; @@ -893,16 +951,32 @@ namespace OpenSim.Data.MSSQL return; } + /// + /// add an attachement to an avatar + /// + /// the avatar UUID + /// the item UUID override public void AddAttachment(LLUUID user, LLUUID item) { return; } + /// + /// Remove an attachement from an avatar + /// + /// the avatar UUID + /// the item UUID override public void RemoveAttachment(LLUUID user, LLUUID item) { return; } + /// + /// get (fetch?) all attached item to an avatar + /// + /// the avatar UUID + /// List of attached item + /// return an empty list override public List GetAttachments(LLUUID user) { return new List(); -- cgit v1.1