Formatting cleanup.

This commit is contained in:
Jeff Ames
2009-10-01 01:00:09 +09:00
parent 33515c75e4
commit ee205e7e81
223 changed files with 875 additions and 930 deletions

View File

@@ -55,7 +55,7 @@ namespace OpenSim.Framework.Communications.Cache
/// Stores user profile and inventory data received from backend services for a particular user.
/// </summary>
public class CachedUserInfo
{
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
//// <value>
@@ -190,7 +190,7 @@ namespace OpenSim.Framework.Communications.Cache
resolvedFolders.Add(folder);
resolvedFolderDictionary[folder.ID] = folder;
parentFolder.AddChildFolder(folder);
}
}
}
} // foreach (folder in pendingCategorizationFolders[parentFolder.ID])
@@ -422,7 +422,7 @@ namespace OpenSim.Framework.Communications.Cache
///
/// FIXME: We call add new inventory folder because in the data layer, we happen to use an SQL REPLACE
/// so this will work to rename an existing folder. Needless to say, to rely on this is very confusing,
/// and needs to be changed.
/// and needs to be changed.
///
/// <param name="folderID"></param>
/// <param name="type"></param>
@@ -500,7 +500,7 @@ namespace OpenSim.Framework.Communications.Cache
InventoryFolderImpl oldParentFolder = RootFolder.FindFolder(folder.ParentID);
if (oldParentFolder != null)
{
{
oldParentFolder.RemoveChildFolder(folderID);
parentFolder.AddChildFolder(folder);
}

View File

@@ -60,7 +60,7 @@ namespace OpenSim.Framework.Communications.Cache
/// User profiles indexed by name
/// </summary>
private readonly Dictionary<string, CachedUserInfo> m_userProfilesByName
= new Dictionary<string, CachedUserInfo>();
= new Dictionary<string, CachedUserInfo>();
/// <summary>
/// The root library folder.
@@ -125,26 +125,26 @@ namespace OpenSim.Framework.Communications.Cache
/// </summary>
/// If the user isn't in cache then the user is requested from the profile service.
/// <param name="userID"></param>
/// <returns>null if no user details are found</returns>
/// <returns>null if no user details are found</returns>
public CachedUserInfo GetUserDetails(string fname, string lname)
{
lock (m_userProfilesByName)
{
{
CachedUserInfo userInfo;
if (m_userProfilesByName.TryGetValue(string.Format(NAME_FORMAT, fname, lname), out userInfo))
if (m_userProfilesByName.TryGetValue(string.Format(NAME_FORMAT, fname, lname), out userInfo))
{
return userInfo;
}
}
else
{
{
UserProfileData userProfile = m_commsManager.UserService.GetUserProfile(fname, lname);
if (userProfile != null)
return AddToCaches(userProfile);
return AddToCaches(userProfile);
else
return null;
}
}
}
}
@@ -185,20 +185,20 @@ namespace OpenSim.Framework.Communications.Cache
// probably by making sure that the update doesn't use the UserCacheInfo.UserProfile directly (possibly via
// returning a read only class from the cache).
// public bool StoreProfile(UserProfileData userProfile)
// {
// {
// lock (m_userProfilesById)
// {
// {
// CachedUserInfo userInfo = GetUserDetails(userProfile.ID);
//
//
// if (userInfo != null)
// {
// userInfo.m_userProfile = userProfile;
// userInfo.m_userProfile = userProfile;
// m_commsManager.UserService.UpdateUserProfile(userProfile);
//
//
// return true;
// }
// }
//
//
// return false;
// }
@@ -220,7 +220,7 @@ namespace OpenSim.Framework.Communications.Cache
}
}
return createdUserInfo;
return createdUserInfo;
}
/// <summary>
@@ -234,7 +234,7 @@ namespace OpenSim.Framework.Communications.Cache
{
if (m_userProfilesById.ContainsKey(userId))
{
CachedUserInfo userInfo = m_userProfilesById[userId];
CachedUserInfo userInfo = m_userProfilesById[userId];
m_userProfilesById.Remove(userId);
lock (m_userProfilesByName)
@@ -244,7 +244,7 @@ namespace OpenSim.Framework.Communications.Cache
return true;
}
}
}
return false;
}

View File

@@ -90,8 +90,8 @@ namespace OpenSim.Framework.Communications
public IUserAdminService UserAdminService
{
get { return m_userAdminService; }
}
protected IUserAdminService m_userAdminService;
}
protected IUserAdminService m_userAdminService;
/// <summary>
/// Constructor

View File

@@ -42,7 +42,7 @@ namespace OpenSim.Framework.Communications
/// Update avatar appearance information
/// </summary>
/// <param name="user"></param>
/// <param name="appearance"></param>
/// <param name="appearance"></param>
void UpdateUserAppearance(UUID user, AvatarAppearance appearance);
}
}

View File

@@ -66,6 +66,6 @@ namespace OpenSim.Framework.Communications
/// <param name="lastName"></param>
/// <param name="newPassword"></param>
/// <returns>true if the update was successful, false otherwise</returns>
bool ResetUserPassword(string firstName, string lastName, string newPassword);
bool ResetUserPassword(string firstName, string lastName, string newPassword);
}
}

View File

@@ -98,7 +98,7 @@ namespace OpenSim.Framework.Communications
/// <param name="friendlistowner">The agent that who's friends list is being updated</param>
/// <param name="friend">The agent that is getting or loosing permissions</param>
/// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param>
void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms);
void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms);
/// <summary>
/// Logs off a user on the user server
@@ -130,7 +130,7 @@ namespace OpenSim.Framework.Communications
/// <returns>
/// A List of FriendListItems that contains info about the user's friends.
/// Always returns a list even if the user has no friends
/// </returns>
/// </returns>
List<FriendListItem> GetUserFriendList(UUID friendlistowner);
// This probably shouldn't be here, it belongs to IAuthentication
@@ -149,7 +149,7 @@ namespace OpenSim.Framework.Communications
/// <param name="userID"></param>
/// <param name="password"></param>
/// <returns></returns>
bool AuthenticateUserByPassword(UUID userID, string password);
bool AuthenticateUserByPassword(UUID userID, string password);
// Temporary Hack until we move everything to the new service model
void SetInventoryService(IInventoryService invService);

View File

@@ -47,7 +47,7 @@ namespace OpenSim.Framework.Communications.Osp
public string Name { get { return "OspInventoryWrapperPlugin"; } }
public string Version { get { return "0.1"; } }
public void Initialise() {}
public void Initialise() {}
public void Initialise(string connect) {}
public void Dispose() {}
@@ -80,9 +80,9 @@ namespace OpenSim.Framework.Communications.Osp
}
protected InventoryItemBase PostProcessItem(InventoryItemBase item)
{
{
item.CreatorIdAsUuid = OspResolver.ResolveOspa(item.CreatorId, m_commsManager);
return item;
return item;
}
public List<InventoryFolderBase> getFolderHierarchy(UUID parentID) { return m_wrappedPlugin.getFolderHierarchy(parentID); }

View File

@@ -33,13 +33,13 @@ using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
namespace OpenSim.Framework.Communications.Osp
{
{
/// <summary>
/// Resolves OpenSim Profile Anchors (OSPA). An OSPA is a string used to provide information for
/// identifying user profiles or supplying a simple name if no profile is available.
/// </summary>
public class OspResolver
{
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public const string OSPA_PREFIX = "ospa:";
@@ -73,7 +73,7 @@ namespace OpenSim.Framework.Communications.Osp
{
return
OSPA_PREFIX + OSPA_NAME_KEY + OSPA_PAIR_SEPARATOR + firstName + OSPA_NAME_VALUE_SEPARATOR + lastName;
}
}
/// <summary>
/// Resolve an osp string into the most suitable internal OpenSim identifier.
@@ -89,13 +89,13 @@ namespace OpenSim.Framework.Communications.Osp
/// is returned.
/// </returns>
public static UUID ResolveOspa(string ospa, CommunicationsManager commsManager)
{
{
if (!ospa.StartsWith(OSPA_PREFIX))
return UUID.Zero;
m_log.DebugFormat("[OSP RESOLVER]: Resolving {0}", ospa);
string ospaMeat = ospa.Substring(OSPA_PREFIX.Length);
string ospaMeat = ospa.Substring(OSPA_PREFIX.Length);
string[] ospaTuples = ospaMeat.Split(OSPA_TUPLE_SEPARATOR_ARRAY);
foreach (string tuple in ospaTuples)
@@ -162,7 +162,7 @@ namespace OpenSim.Framework.Communications.Osp
tempUserProfile.ID = HashName(tempUserProfile.Name);
m_log.DebugFormat(
"[OSP RESOLVER]: Adding temporary user profile for {0} {1}", tempUserProfile.Name, tempUserProfile.ID);
"[OSP RESOLVER]: Adding temporary user profile for {0} {1}", tempUserProfile.Name, tempUserProfile.ID);
commsManager.UserService.AddTemporaryUserProfile(tempUserProfile);
return tempUserProfile.ID;

View File

@@ -1072,7 +1072,7 @@ namespace OpenSim.Framework.Communications.Services
/// <param name="user"></param>
/// <param name="response"></param>
/// <param name="remoteClient"></param>
/// <returns>true if the region was successfully contacted, false otherwise</returns>
/// <returns>true if the region was successfully contacted, false otherwise</returns>
protected abstract bool PrepareLoginToRegion(
RegionInfo regionInfo, UserProfileData user, LoginResponse response, IPEndPoint client);

View File

@@ -33,7 +33,7 @@ using OpenMetaverse;
using OpenSim.Data;
namespace OpenSim.Framework.Communications
{
{
/// <summary>
/// Plugin for managing temporary user profiles.
/// </summary>
@@ -45,7 +45,7 @@ namespace OpenSim.Framework.Communications
public string Name { get { return "TemporaryUserProfilePlugin"; } }
public string Version { get { return "0.1"; } }
public void Initialise() {}
public void Initialise() {}
public void Initialise(string connect) {}
public void Dispose() {}

View File

@@ -152,8 +152,8 @@ namespace OpenSim.Framework.Communications.Tests
public virtual bool AuthenticateUserByPassword(UUID userID, string password)
{
throw new NotImplementedException();
}
throw new NotImplementedException();
}
}
}
}

View File

@@ -133,7 +133,7 @@ namespace OpenSim.Framework.Communications.Tests
timedOut = true;
lock (this)
{
{
UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
Monitor.Wait(this, 60000);
}
@@ -150,7 +150,7 @@ namespace OpenSim.Framework.Communications.Tests
CachedUserInfo userInfo;
lock (this)
{
{
userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
Monitor.Wait(this, 60000);
}
@@ -171,7 +171,7 @@ namespace OpenSim.Framework.Communications.Tests
CachedUserInfo userInfo;
lock (this)
{
{
userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
Monitor.Wait(this, 60000);
}
@@ -206,7 +206,7 @@ namespace OpenSim.Framework.Communications.Tests
CachedUserInfo userInfo;
lock (this)
{
{
userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
Monitor.Wait(this, 60000);
}
@@ -271,7 +271,7 @@ namespace OpenSim.Framework.Communications.Tests
CachedUserInfo userInfo;
lock (this)
{
{
userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
Monitor.Wait(this, 60000);
}
@@ -311,7 +311,7 @@ namespace OpenSim.Framework.Communications.Tests
CachedUserInfo userInfo;
lock (this)
{
{
userInfo = UserProfileTestUtils.CreateUserWithInventory(myScene.CommsManager, InventoryReceived);
Monitor.Wait(this, 60000);
}

View File

@@ -318,7 +318,7 @@ namespace OpenSim.Framework.Communications.Tests
{
TestHelper.InMethod();
//Console.WriteLine("Starting T023_TestAuthenticatedLoginAlreadyLoggedIn()");
//Console.WriteLine("Starting T023_TestAuthenticatedLoginAlreadyLoggedIn()");
//log4net.Config.XmlConfigurator.Configure();
string error_already_logged = "You appear to be already logged in. " +

View File

@@ -94,9 +94,9 @@ namespace OpenSim.Framework.Communications
public void AddPlugin(string provider, string connect)
{
m_plugins.AddRange(DataPluginFactory.LoadDataPlugins<IUserDataPlugin>(provider, connect));
}
}
#region UserProfile
#region UserProfile
public virtual void AddTemporaryUserProfile(UserProfileData userProfile)
{
@@ -924,8 +924,8 @@ namespace OpenSim.Framework.Communications
if (md5PasswordHash == userProfile.PasswordHash)
return true;
else
return false;
}
return false;
}
#endregion
}