diff options
author | Jeff Ames | 2008-06-26 20:25:57 +0000 |
---|---|---|
committer | Jeff Ames | 2008-06-26 20:25:57 +0000 |
commit | f8ccf00f1cd8b99a2012558ded7de01ffcff7e35 (patch) | |
tree | 0aa16acb4bd909a9c746557ae068180ba681bbf0 /OpenSim/Data/MSSQL/MSSQLUserData.cs | |
parent | Apply patch from bug #1606 -- Documentation for Data/Null, Data/Base. Thanks... (diff) | |
download | opensim-SC_OLD-f8ccf00f1cd8b99a2012558ded7de01ffcff7e35.zip opensim-SC_OLD-f8ccf00f1cd8b99a2012558ded7de01ffcff7e35.tar.gz opensim-SC_OLD-f8ccf00f1cd8b99a2012558ded7de01ffcff7e35.tar.bz2 opensim-SC_OLD-f8ccf00f1cd8b99a2012558ded7de01ffcff7e35.tar.xz |
Apply patch from bug #1609 -- Documentation for Data/MSSQL. Thanks kerunix_Flan!
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLUserData.cs | 90 |
1 files changed, 82 insertions, 8 deletions
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 | |||
53 | private string m_userFriendsTableName; | 53 | private string m_userFriendsTableName; |
54 | 54 | ||
55 | /// <summary> | 55 | /// <summary> |
56 | /// Loads and initialises the MySQL storage plugin | 56 | /// Loads and initialises the MSSQL storage plugin |
57 | /// </summary> | 57 | /// </summary> |
58 | /// <param name="connect">TODO: do something with the connect string instead of ignoring it.</param> | ||
59 | /// <remarks>use mssql_connection.ini</remarks> | ||
58 | override public void Initialise(string connect) | 60 | override public void Initialise(string connect) |
59 | { | 61 | { |
60 | // TODO: do something with the connect string instead of | 62 | // TODO: do something with the connect string instead of |
@@ -92,6 +94,10 @@ namespace OpenSim.Data.MSSQL | |||
92 | TestTables(); | 94 | TestTables(); |
93 | } | 95 | } |
94 | 96 | ||
97 | /// <summary> | ||
98 | /// | ||
99 | /// </summary> | ||
100 | /// <returns></returns> | ||
95 | private bool TestTables() | 101 | private bool TestTables() |
96 | { | 102 | { |
97 | IDbCommand cmd; | 103 | IDbCommand cmd; |
@@ -128,6 +134,7 @@ namespace OpenSim.Data.MSSQL | |||
128 | 134 | ||
129 | return true; | 135 | return true; |
130 | } | 136 | } |
137 | |||
131 | /// <summary> | 138 | /// <summary> |
132 | /// Searches the database for a specified user profile by name components | 139 | /// Searches the database for a specified user profile by name components |
133 | /// </summary> | 140 | /// </summary> |
@@ -166,6 +173,12 @@ namespace OpenSim.Data.MSSQL | |||
166 | 173 | ||
167 | #region User Friends List Data | 174 | #region User Friends List Data |
168 | 175 | ||
176 | /// <summary> | ||
177 | /// Add a new friend in the friendlist | ||
178 | /// </summary> | ||
179 | /// <param name="friendlistowner">UUID of the friendlist owner</param> | ||
180 | /// <param name="friend">Friend's UUID</param> | ||
181 | /// <param name="perms">Permission flag</param> | ||
169 | override public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) | 182 | override public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) |
170 | { | 183 | { |
171 | int dtvalue = Util.UnixTimeSinceEpoch(); | 184 | int dtvalue = Util.UnixTimeSinceEpoch(); |
@@ -209,6 +222,11 @@ namespace OpenSim.Data.MSSQL | |||
209 | } | 222 | } |
210 | } | 223 | } |
211 | 224 | ||
225 | /// <summary> | ||
226 | /// Remove an friend from the friendlist | ||
227 | /// </summary> | ||
228 | /// <param name="friendlistowner">UUID of the friendlist owner</param> | ||
229 | /// <param name="friend">UUID of the not-so-friendly user to remove from the list</param> | ||
212 | override public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) | 230 | override public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) |
213 | { | 231 | { |
214 | Dictionary<string, string> param = new Dictionary<string, string>(); | 232 | Dictionary<string, string> param = new Dictionary<string, string>(); |
@@ -242,6 +260,12 @@ namespace OpenSim.Data.MSSQL | |||
242 | } | 260 | } |
243 | } | 261 | } |
244 | 262 | ||
263 | /// <summary> | ||
264 | /// Update friendlist permission flag for a friend | ||
265 | /// </summary> | ||
266 | /// <param name="friendlistowner">UUID of the friendlist owner</param> | ||
267 | /// <param name="friend">UUID of the friend</param> | ||
268 | /// <param name="perms">new permission flag</param> | ||
245 | override public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) | 269 | override public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) |
246 | { | 270 | { |
247 | Dictionary<string, string> param = new Dictionary<string, string>(); | 271 | Dictionary<string, string> param = new Dictionary<string, string>(); |
@@ -272,7 +296,11 @@ namespace OpenSim.Data.MSSQL | |||
272 | } | 296 | } |
273 | } | 297 | } |
274 | 298 | ||
275 | 299 | /// <summary> | |
300 | /// Get (fetch?) the user's friendlist | ||
301 | /// </summary> | ||
302 | /// <param name="friendlistowner">UUID of the friendlist owner</param> | ||
303 | /// <returns>Friendlist list</returns> | ||
276 | override public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) | 304 | override public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) |
277 | { | 305 | { |
278 | List<FriendListItem> Lfli = new List<FriendListItem>(); | 306 | List<FriendListItem> Lfli = new List<FriendListItem>(); |
@@ -321,13 +349,23 @@ namespace OpenSim.Data.MSSQL | |||
321 | 349 | ||
322 | #endregion | 350 | #endregion |
323 | 351 | ||
352 | /// <summary> | ||
353 | /// STUB ! Update current region | ||
354 | /// </summary> | ||
355 | /// <param name="avatarid">avatar uuid</param> | ||
356 | /// <param name="regionuuid">region uuid</param> | ||
357 | /// <param name="regionhandle">region handle</param> | ||
324 | override public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) | 358 | override public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) |
325 | { | 359 | { |
326 | //m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called"); | 360 | //m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called"); |
327 | } | 361 | } |
328 | 362 | ||
329 | 363 | /// <summary> | |
330 | 364 | /// | |
365 | /// </summary> | ||
366 | /// <param name="queryID"></param> | ||
367 | /// <param name="query"></param> | ||
368 | /// <returns></returns> | ||
331 | override public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) | 369 | override public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) |
332 | { | 370 | { |
333 | List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); | 371 | List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); |
@@ -407,7 +445,11 @@ namespace OpenSim.Data.MSSQL | |||
407 | return returnlist; | 445 | return returnlist; |
408 | } | 446 | } |
409 | 447 | ||
410 | // See IUserData | 448 | /// <summary> |
449 | /// See IUserData | ||
450 | /// </summary> | ||
451 | /// <param name="uuid"></param> | ||
452 | /// <returns></returns> | ||
411 | override public UserProfileData GetUserByUUID(LLUUID uuid) | 453 | override public UserProfileData GetUserByUUID(LLUUID uuid) |
412 | { | 454 | { |
413 | try | 455 | try |
@@ -490,6 +532,13 @@ namespace OpenSim.Data.MSSQL | |||
490 | return null; | 532 | return null; |
491 | } | 533 | } |
492 | } | 534 | } |
535 | |||
536 | /// <summary> | ||
537 | /// Store a weblogin key | ||
538 | /// </summary> | ||
539 | /// <param name="AgentID">The agent UUID</param> | ||
540 | /// <param name="WebLoginKey">the WebLogin Key</param> | ||
541 | /// <remarks>unused ?</remarks> | ||
493 | override public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) | 542 | override public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) |
494 | { | 543 | { |
495 | UserProfileData user = GetUserByUUID(AgentID); | 544 | UserProfileData user = GetUserByUUID(AgentID); |
@@ -626,7 +675,11 @@ namespace OpenSim.Data.MSSQL | |||
626 | // Do nothing. | 675 | // Do nothing. |
627 | } | 676 | } |
628 | 677 | ||
629 | 678 | /// <summary> | |
679 | /// update a user profile | ||
680 | /// </summary> | ||
681 | /// <param name="user">the profile to update</param> | ||
682 | /// <returns></returns> | ||
630 | override public bool UpdateUserProfile(UserProfileData user) | 683 | override public bool UpdateUserProfile(UserProfileData user) |
631 | { | 684 | { |
632 | SqlCommand command = new SqlCommand("UPDATE " + m_usersTableName + " set UUID = @uuid, " + | 685 | SqlCommand command = new SqlCommand("UPDATE " + m_usersTableName + " set UUID = @uuid, " + |
@@ -726,7 +779,7 @@ namespace OpenSim.Data.MSSQL | |||
726 | /// <param name="from">The senders account ID</param> | 779 | /// <param name="from">The senders account ID</param> |
727 | /// <param name="to">The receivers account ID</param> | 780 | /// <param name="to">The receivers account ID</param> |
728 | /// <param name="amount">The amount to transfer</param> | 781 | /// <param name="amount">The amount to transfer</param> |
729 | /// <returns>Success?</returns> | 782 | /// <returns>false</returns> |
730 | override public bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) | 783 | override public bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) |
731 | { | 784 | { |
732 | return false; | 785 | return false; |
@@ -739,7 +792,7 @@ namespace OpenSim.Data.MSSQL | |||
739 | /// <param name="from">The senders account ID</param> | 792 | /// <param name="from">The senders account ID</param> |
740 | /// <param name="to">The receivers account ID</param> | 793 | /// <param name="to">The receivers account ID</param> |
741 | /// <param name="item">The item to transfer</param> | 794 | /// <param name="item">The item to transfer</param> |
742 | /// <returns>Success?</returns> | 795 | /// <returns>false</returns> |
743 | override public bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) | 796 | override public bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) |
744 | { | 797 | { |
745 | return false; | 798 | return false; |
@@ -832,6 +885,11 @@ namespace OpenSim.Data.MSSQL | |||
832 | return null; | 885 | return null; |
833 | } | 886 | } |
834 | 887 | ||
888 | /// <summary> | ||
889 | /// Update a user appearence into database | ||
890 | /// </summary> | ||
891 | /// <param name="user">the used UUID</param> | ||
892 | /// <param name="appearance">the appearence</param> | ||
835 | override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) | 893 | override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) |
836 | { | 894 | { |
837 | string sql = String.Empty; | 895 | string sql = String.Empty; |
@@ -893,16 +951,32 @@ namespace OpenSim.Data.MSSQL | |||
893 | return; | 951 | return; |
894 | } | 952 | } |
895 | 953 | ||
954 | /// <summary> | ||
955 | /// add an attachement to an avatar | ||
956 | /// </summary> | ||
957 | /// <param name="user">the avatar UUID</param> | ||
958 | /// <param name="item">the item UUID</param> | ||
896 | override public void AddAttachment(LLUUID user, LLUUID item) | 959 | override public void AddAttachment(LLUUID user, LLUUID item) |
897 | { | 960 | { |
898 | return; | 961 | return; |
899 | } | 962 | } |
900 | 963 | ||
964 | /// <summary> | ||
965 | /// Remove an attachement from an avatar | ||
966 | /// </summary> | ||
967 | /// <param name="user">the avatar UUID</param> | ||
968 | /// <param name="item">the item UUID</param> | ||
901 | override public void RemoveAttachment(LLUUID user, LLUUID item) | 969 | override public void RemoveAttachment(LLUUID user, LLUUID item) |
902 | { | 970 | { |
903 | return; | 971 | return; |
904 | } | 972 | } |
905 | 973 | ||
974 | /// <summary> | ||
975 | /// get (fetch?) all attached item to an avatar | ||
976 | /// </summary> | ||
977 | /// <param name="user">the avatar UUID</param> | ||
978 | /// <returns>List of attached item</returns> | ||
979 | /// <remarks>return an empty list</remarks> | ||
906 | override public List<LLUUID> GetAttachments(LLUUID user) | 980 | override public List<LLUUID> GetAttachments(LLUUID user) |
907 | { | 981 | { |
908 | return new List<LLUUID>(); | 982 | return new List<LLUUID>(); |