aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs
diff options
context:
space:
mode:
authorlbsa712008-03-28 19:58:45 +0000
committerlbsa712008-03-28 19:58:45 +0000
commitca718b6f8d5a76f4f4dcb6625c01c3ec15371bd6 (patch)
tree2115114e520a0ca0944e825e5928ab8a3dd310d0 /OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs
parent* Send full inventory folder skeleton to standalone client logins rather than... (diff)
downloadopensim-SC-ca718b6f8d5a76f4f4dcb6625c01c3ec15371bd6.zip
opensim-SC-ca718b6f8d5a76f4f4dcb6625c01c3ec15371bd6.tar.gz
opensim-SC-ca718b6f8d5a76f4f4dcb6625c01c3ec15371bd6.tar.bz2
opensim-SC-ca718b6f8d5a76f4f4dcb6625c01c3ec15371bd6.tar.xz
* Introduced common abstract UserDataBase provider
* Weeded out multiple AvatarPickerAvatar classes
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs42
1 files changed, 21 insertions, 21 deletions
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs
index 979e349..be0417d 100644
--- a/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs
+++ b/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Framework.Data.MSSQL
37 /// <summary> 37 /// <summary>
38 /// A database interface class to a user profile storage system 38 /// A database interface class to a user profile storage system
39 /// </summary> 39 /// </summary>
40 public class MSSQLUserData : IUserData 40 public class MSSQLUserData : UserDataBase
41 { 41 {
42 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 42 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
43 43
@@ -53,7 +53,7 @@ namespace OpenSim.Framework.Data.MSSQL
53 /// <summary> 53 /// <summary>
54 /// Loads and initialises the MySQL storage plugin 54 /// Loads and initialises the MySQL storage plugin
55 /// </summary> 55 /// </summary>
56 public void Initialise() 56 override public void Initialise()
57 { 57 {
58 // Load from an INI file connection details 58 // Load from an INI file connection details
59 // TODO: move this to XML? 59 // TODO: move this to XML?
@@ -131,7 +131,7 @@ namespace OpenSim.Framework.Data.MSSQL
131 /// <param name="user">The first part of the account name</param> 131 /// <param name="user">The first part of the account name</param>
132 /// <param name="last">The second part of the account name</param> 132 /// <param name="last">The second part of the account name</param>
133 /// <returns>A user profile</returns> 133 /// <returns>A user profile</returns>
134 public UserProfileData GetUserByName(string user, string last) 134 override public UserProfileData GetUserByName(string user, string last)
135 { 135 {
136 try 136 try
137 { 137 {
@@ -163,7 +163,7 @@ namespace OpenSim.Framework.Data.MSSQL
163 163
164 #region User Friends List Data 164 #region User Friends List Data
165 165
166 public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) 166 override public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms)
167 { 167 {
168 int dtvalue = Util.UnixTimeSinceEpoch(); 168 int dtvalue = Util.UnixTimeSinceEpoch();
169 169
@@ -206,7 +206,7 @@ namespace OpenSim.Framework.Data.MSSQL
206 } 206 }
207 } 207 }
208 208
209 public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) 209 override public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend)
210 { 210 {
211 Dictionary<string, string> param = new Dictionary<string, string>(); 211 Dictionary<string, string> param = new Dictionary<string, string>();
212 param["@ownerID"] = friendlistowner.UUID.ToString(); 212 param["@ownerID"] = friendlistowner.UUID.ToString();
@@ -239,7 +239,7 @@ namespace OpenSim.Framework.Data.MSSQL
239 } 239 }
240 } 240 }
241 241
242 public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) 242 override public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms)
243 { 243 {
244 Dictionary<string, string> param = new Dictionary<string, string>(); 244 Dictionary<string, string> param = new Dictionary<string, string>();
245 param["@ownerID"] = friendlistowner.UUID.ToString(); 245 param["@ownerID"] = friendlistowner.UUID.ToString();
@@ -270,7 +270,7 @@ namespace OpenSim.Framework.Data.MSSQL
270 } 270 }
271 271
272 272
273 public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) 273 override public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner)
274 { 274 {
275 List<FriendListItem> Lfli = new List<FriendListItem>(); 275 List<FriendListItem> Lfli = new List<FriendListItem>();
276 276
@@ -318,14 +318,14 @@ namespace OpenSim.Framework.Data.MSSQL
318 318
319 #endregion 319 #endregion
320 320
321 public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) 321 override public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid)
322 { 322 {
323 m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called"); 323 m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called");
324 } 324 }
325 325
326 326
327 327
328 public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) 328 override public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
329 { 329 {
330 List<Framework.AvatarPickerAvatar> returnlist = new List<Framework.AvatarPickerAvatar>(); 330 List<Framework.AvatarPickerAvatar> returnlist = new List<Framework.AvatarPickerAvatar>();
331 string[] querysplit; 331 string[] querysplit;
@@ -405,7 +405,7 @@ namespace OpenSim.Framework.Data.MSSQL
405 } 405 }
406 406
407 // See IUserData 407 // See IUserData
408 public UserProfileData GetUserByUUID(LLUUID uuid) 408 override public UserProfileData GetUserByUUID(LLUUID uuid)
409 { 409 {
410 try 410 try
411 { 411 {
@@ -438,7 +438,7 @@ namespace OpenSim.Framework.Data.MSSQL
438 /// </summary> 438 /// </summary>
439 /// <param name="name">The account name</param> 439 /// <param name="name">The account name</param>
440 /// <returns>The users session</returns> 440 /// <returns>The users session</returns>
441 public UserAgentData GetAgentByName(string name) 441 override public UserAgentData GetAgentByName(string name)
442 { 442 {
443 return GetAgentByName(name.Split(' ')[0], name.Split(' ')[1]); 443 return GetAgentByName(name.Split(' ')[0], name.Split(' ')[1]);
444 } 444 }
@@ -449,7 +449,7 @@ namespace OpenSim.Framework.Data.MSSQL
449 /// <param name="user">First part of the users account name</param> 449 /// <param name="user">First part of the users account name</param>
450 /// <param name="last">Second part of the users account name</param> 450 /// <param name="last">Second part of the users account name</param>
451 /// <returns>The users session</returns> 451 /// <returns>The users session</returns>
452 public UserAgentData GetAgentByName(string user, string last) 452 override public UserAgentData GetAgentByName(string user, string last)
453 { 453 {
454 UserProfileData profile = GetUserByName(user, last); 454 UserProfileData profile = GetUserByName(user, last);
455 return GetAgentByUUID(profile.UUID); 455 return GetAgentByUUID(profile.UUID);
@@ -460,7 +460,7 @@ namespace OpenSim.Framework.Data.MSSQL
460 /// </summary> 460 /// </summary>
461 /// <param name="uuid">The accounts UUID</param> 461 /// <param name="uuid">The accounts UUID</param>
462 /// <returns>The users session</returns> 462 /// <returns>The users session</returns>
463 public UserAgentData GetAgentByUUID(LLUUID uuid) 463 override public UserAgentData GetAgentByUUID(LLUUID uuid)
464 { 464 {
465 try 465 try
466 { 466 {
@@ -487,7 +487,7 @@ namespace OpenSim.Framework.Data.MSSQL
487 return null; 487 return null;
488 } 488 }
489 } 489 }
490 public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) 490 override public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey)
491 { 491 {
492 UserProfileData user = GetUserByUUID(AgentID); 492 UserProfileData user = GetUserByUUID(AgentID);
493 user.webLoginKey = WebLoginKey; 493 user.webLoginKey = WebLoginKey;
@@ -498,7 +498,7 @@ namespace OpenSim.Framework.Data.MSSQL
498 /// Creates a new users profile 498 /// Creates a new users profile
499 /// </summary> 499 /// </summary>
500 /// <param name="user">The user profile to create</param> 500 /// <param name="user">The user profile to create</param>
501 public void AddNewUserProfile(UserProfileData user) 501 override public void AddNewUserProfile(UserProfileData user)
502 { 502 {
503 try 503 try
504 { 504 {
@@ -618,13 +618,13 @@ namespace OpenSim.Framework.Data.MSSQL
618 /// Creates a new agent 618 /// Creates a new agent
619 /// </summary> 619 /// </summary>
620 /// <param name="agent">The agent to create</param> 620 /// <param name="agent">The agent to create</param>
621 public void AddNewUserAgent(UserAgentData agent) 621 override public void AddNewUserAgent(UserAgentData agent)
622 { 622 {
623 // Do nothing. 623 // Do nothing.
624 } 624 }
625 625
626 626
627 public bool UpdateUserProfile(UserProfileData user) 627 override public bool UpdateUserProfile(UserProfileData user)
628 { 628 {
629 SqlCommand command = new SqlCommand("UPDATE " + m_usersTableName + " set UUID = @uuid, " + 629 SqlCommand command = new SqlCommand("UPDATE " + m_usersTableName + " set UUID = @uuid, " +
630 "username = @username, " + 630 "username = @username, " +
@@ -724,7 +724,7 @@ namespace OpenSim.Framework.Data.MSSQL
724 /// <param name="to">The receivers account ID</param> 724 /// <param name="to">The receivers account ID</param>
725 /// <param name="amount">The amount to transfer</param> 725 /// <param name="amount">The amount to transfer</param>
726 /// <returns>Success?</returns> 726 /// <returns>Success?</returns>
727 public bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) 727 override public bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount)
728 { 728 {
729 return false; 729 return false;
730 } 730 }
@@ -737,7 +737,7 @@ namespace OpenSim.Framework.Data.MSSQL
737 /// <param name="to">The receivers account ID</param> 737 /// <param name="to">The receivers account ID</param>
738 /// <param name="item">The item to transfer</param> 738 /// <param name="item">The item to transfer</param>
739 /// <returns>Success?</returns> 739 /// <returns>Success?</returns>
740 public bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) 740 override public bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item)
741 { 741 {
742 return false; 742 return false;
743 } 743 }
@@ -746,7 +746,7 @@ namespace OpenSim.Framework.Data.MSSQL
746 /// Database provider name 746 /// Database provider name
747 /// </summary> 747 /// </summary>
748 /// <returns>Provider name</returns> 748 /// <returns>Provider name</returns>
749 public string getName() 749 override public string getName()
750 { 750 {
751 return "MSSQL Userdata Interface"; 751 return "MSSQL Userdata Interface";
752 } 752 }
@@ -755,7 +755,7 @@ namespace OpenSim.Framework.Data.MSSQL
755 /// Database provider version 755 /// Database provider version
756 /// </summary> 756 /// </summary>
757 /// <returns>provider version</returns> 757 /// <returns>provider version</returns>
758 public string GetVersion() 758 override public string GetVersion()
759 { 759 {
760 return database.getVersion(); 760 return database.getVersion();
761 } 761 }