From 2dadbc2f70313899f517c8d1e1c7da443fd4324a Mon Sep 17 00:00:00 2001 From: Dr Scofield Date: Fri, 4 Jul 2008 10:19:58 +0000 Subject: mini-warnings-safari, plus cleanup of IUserServices method naming. --- OpenSim/Framework/Communications/IUserService.cs | 2 +- .../Framework/Communications/UserManagerBase.cs | 102 +++++++++++---------- 2 files changed, 53 insertions(+), 51 deletions(-) (limited to 'OpenSim/Framework/Communications') diff --git a/OpenSim/Framework/Communications/IUserService.cs b/OpenSim/Framework/Communications/IUserService.cs index 4bd2ad1..6ad72c0 100644 --- a/OpenSim/Framework/Communications/IUserService.cs +++ b/OpenSim/Framework/Communications/IUserService.cs @@ -51,7 +51,7 @@ namespace OpenSim.Framework.Communications UserAgentData GetAgentByUUID(LLUUID userId); - void clearUserAgent(LLUUID avatarID); + void ClearUserAgent(LLUUID avatarID); List GenerateAgentPickerRequestResponse(LLUUID QueryID, string Query); UserProfileData SetupMasterUser(string firstName, string lastName); diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 1e059fe..d5b1e74 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs @@ -96,7 +96,7 @@ namespace OpenSim.Framework.Communications if (profile != null) { - profile.CurrentAgent = getUserAgent(profile.ID); + profile.CurrentAgent = GetUserAgent(profile.ID); return profile; } } @@ -126,7 +126,7 @@ namespace OpenSim.Framework.Communications if (null != profile) { - profile.CurrentAgent = getUserAgent(profile.ID); + profile.CurrentAgent = GetUserAgent(profile.ID); return profile; } } @@ -157,7 +157,7 @@ namespace OpenSim.Framework.Communications /// /// /// - public bool setUserProfile(UserProfileData data) + public bool SetUserProfile(UserProfileData data) { foreach (KeyValuePair plugin in _plugins) { @@ -183,7 +183,7 @@ namespace OpenSim.Framework.Communications /// /// The agent's UUID /// Agent profiles - public UserAgentData getUserAgent(LLUUID uuid) + public UserAgentData GetUserAgent(LLUUID uuid) { foreach (KeyValuePair plugin in _plugins) { @@ -200,6 +200,51 @@ namespace OpenSim.Framework.Communications return null; } + /// + /// Loads a user agent by name (not called directly) + /// + /// The agent's name + /// A user agent + public UserAgentData GetUserAgent(string name) + { + foreach (KeyValuePair plugin in _plugins) + { + try + { + return plugin.Value.GetAgentByName(name); + } + catch (Exception e) + { + m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); + } + } + + return null; + } + + /// + /// Loads a user agent by name (not called directly) + /// + /// The agent's firstname + /// The agent's lastname + /// A user agent + public UserAgentData GetUserAgent(string fname, string lname) + { + foreach (KeyValuePair plugin in _plugins) + { + try + { + return plugin.Value.GetAgentByName(fname, lname); + } + catch (Exception e) + { + m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); + } + } + + return null; + } + public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) { foreach (KeyValuePair plugin in _plugins) @@ -297,62 +342,19 @@ namespace OpenSim.Framework.Communications } } - /// - /// Loads a user agent by name (not called directly) - /// - /// The agent's name - /// A user agent - public UserAgentData getUserAgent(string name) - { - foreach (KeyValuePair plugin in _plugins) - { - try - { - return plugin.Value.GetAgentByName(name); - } - catch (Exception e) - { - m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); - } - } - - return null; - } /// /// Resets the currentAgent in the user profile /// /// The agent's ID - public void clearUserAgent(LLUUID agentID) + public void ClearUserAgent(LLUUID agentID) { UserProfileData profile = GetUserProfile(agentID); profile.CurrentAgent = null; - setUserProfile(profile); + SetUserProfile(profile); } - /// - /// Loads a user agent by name (not called directly) - /// - /// The agent's firstname - /// The agent's lastname - /// A user agent - public UserAgentData getUserAgent(string fname, string lname) - { - foreach (KeyValuePair plugin in _plugins) - { - try - { - return plugin.Value.GetAgentByName(fname, lname); - } - catch (Exception e) - { - m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); - } - } - - return null; - } #endregion @@ -537,7 +539,7 @@ namespace OpenSim.Framework.Communications // TODO: what is the logic should be? bool ret = false; ret = AddUserAgent(profile.CurrentAgent); - ret = ret & setUserProfile(profile); + ret = ret & SetUserProfile(profile); return ret; } -- cgit v1.1