aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-09-15 18:23:36 +0000
committerJustin Clarke Casey2008-09-15 18:23:36 +0000
commitc2ee26399947be5e3c23ac3abc53f2ba907ff10f (patch)
tree563fa2cb85453ae6c3e65ab08ec1f6b307b9c5ff /OpenSim/Framework/Communications
parent* Complete refactoring accidentally left unfinished so that all server help r... (diff)
downloadopensim-SC_OLD-c2ee26399947be5e3c23ac3abc53f2ba907ff10f.zip
opensim-SC_OLD-c2ee26399947be5e3c23ac3abc53f2ba907ff10f.tar.gz
opensim-SC_OLD-c2ee26399947be5e3c23ac3abc53f2ba907ff10f.tar.bz2
opensim-SC_OLD-c2ee26399947be5e3c23ac3abc53f2ba907ff10f.tar.xz
* refactor: Break out IUserServiceAdmin out of IUserService since admin methods don't need to be implemented on Grid hosted region servers
Diffstat (limited to 'OpenSim/Framework/Communications')
-rw-r--r--OpenSim/Framework/Communications/CommunicationsManager.cs9
-rw-r--r--OpenSim/Framework/Communications/IUserService.cs17
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs2
3 files changed, 8 insertions, 20 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index 1ac5fe4..27cdd35 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -98,6 +98,11 @@ namespace OpenSim.Framework.Communications
98 get { return m_networkServersInfo; } 98 get { return m_networkServersInfo; }
99 } 99 }
100 protected NetworkServersInfo m_networkServersInfo; 100 protected NetworkServersInfo m_networkServersInfo;
101
102 /// <summary>
103 /// Interface to administrative user service calls.
104 /// </summary>
105 protected IUserServiceAdmin m_userServiceAdmin;
101 106
102 /// <summary> 107 /// <summary>
103 /// Constructor 108 /// Constructor
@@ -243,7 +248,7 @@ namespace OpenSim.Framework.Communications
243 { 248 {
244 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty); 249 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty);
245 250
246 m_userService.AddUserProfile(firstName, lastName, md5PasswdHash, regX, regY); 251 m_userServiceAdmin.AddUserProfile(firstName, lastName, md5PasswdHash, regX, regY);
247 UserProfileData userProf = UserService.GetUserProfile(firstName, lastName); 252 UserProfileData userProf = UserService.GetUserProfile(firstName, lastName);
248 if (userProf == null) 253 if (userProf == null)
249 { 254 {
@@ -266,7 +271,7 @@ namespace OpenSim.Framework.Communications
266 /// <returns>true if the update was successful, false otherwise</returns> 271 /// <returns>true if the update was successful, false otherwise</returns>
267 public bool ResetUserPassword(string firstName, string lastName, string newPassword) 272 public bool ResetUserPassword(string firstName, string lastName, string newPassword)
268 { 273 {
269 return m_userService.ResetUserPassword(firstName, lastName, newPassword); 274 return m_userServiceAdmin.ResetUserPassword(firstName, lastName, newPassword);
270 } 275 }
271 276
272 #region Friend Methods 277 #region Friend Methods
diff --git a/OpenSim/Framework/Communications/IUserService.cs b/OpenSim/Framework/Communications/IUserService.cs
index d52d1ea..64c6c68 100644
--- a/OpenSim/Framework/Communications/IUserService.cs
+++ b/OpenSim/Framework/Communications/IUserService.cs
@@ -40,8 +40,6 @@ namespace OpenSim.Framework.Communications
40 /// <returns>A user profile. Returns null if no profile is found</returns> 40 /// <returns>A user profile. Returns null if no profile is found</returns>
41 UserProfileData GetUserProfile(string firstName, string lastName); 41 UserProfileData GetUserProfile(string firstName, string lastName);
42 42
43 //UserProfileData GetUserProfile(string name);
44
45 /// <summary> 43 /// <summary>
46 /// Loads a user profile from a database by UUID 44 /// Loads a user profile from a database by UUID
47 /// </summary> 45 /// </summary>
@@ -59,27 +57,12 @@ namespace OpenSim.Framework.Communications
59 UserProfileData SetupMasterUser(UUID userId); 57 UserProfileData SetupMasterUser(UUID userId);
60 58
61 /// <summary> 59 /// <summary>
62 /// Add a new user profile
63 /// </summary>
64 /// <param name="user"></param>
65 UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY);
66
67 /// <summary>
68 /// Update the user's profile. 60 /// Update the user's profile.
69 /// </summary> 61 /// </summary>
70 /// <param name="data">UserProfileData object with updated data. Should be obtained 62 /// <param name="data">UserProfileData object with updated data. Should be obtained
71 /// via a call to GetUserProfile().</param> 63 /// via a call to GetUserProfile().</param>
72 /// <returns>true if the update could be applied, false if it could not be applied.</returns> 64 /// <returns>true if the update could be applied, false if it could not be applied.</returns>
73 bool UpdateUserProfile(UserProfileData data); 65 bool UpdateUserProfile(UserProfileData data);
74
75 /// <summary>
76 /// Reset a user password
77 /// </summary>
78 /// <param name="firstName"></param>
79 /// <param name="lastName"></param>
80 /// <param name="newPassword"></param>
81 /// <returns>true if the update was successful, false otherwise</returns>
82 bool ResetUserPassword(string firstName, string lastName, string newPassword);
83 66
84 /// <summary> 67 /// <summary>
85 /// Adds a new friend to the database for XUser 68 /// Adds a new friend to the database for XUser
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index 4fc2fea..f06a438 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -42,7 +42,7 @@ namespace OpenSim.Framework.Communications
42 /// <summary> 42 /// <summary>
43 /// Base class for user management (create, read, etc) 43 /// Base class for user management (create, read, etc)
44 /// </summary> 44 /// </summary>
45 public abstract class UserManagerBase : IUserService, IAvatarService 45 public abstract class UserManagerBase : IUserService, IUserServiceAdmin, IAvatarService
46 { 46 {
47 private static readonly ILog m_log 47 private static readonly ILog m_log
48 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 48 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);