* Added database and UserManagerBase glue for FriendsList management

* Don't forget to run prebuild
This commit is contained in:
Teravus Ovares
2007-12-31 22:56:43 +00:00
parent e0cf45fe21
commit 3180432deb
9 changed files with 482 additions and 7 deletions

View File

@@ -196,6 +196,80 @@ namespace OpenSim.Framework.UserManagement
return null;
}
/// <summary>
/// Loads a user's friend list
/// </summary>
/// <param name="name">the UUID of the friend list owner</param>
/// <returns>A List of FriendListItems that contains info about the user's friends</returns>
public List<FriendListItem> GetUserFriendList(LLUUID ownerID)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
{
try
{
return plugin.Value.GetUserFriendList(ownerID);
}
catch (Exception e)
{
MainLog.Instance.Verbose("USERSTORAGE",
"Unable to GetUserFriendList via " + plugin.Key + "(" + e.ToString() + ")");
}
}
return null;
}
public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
{
try
{
plugin.Value.AddNewUserFriend(friendlistowner,friend,perms);
}
catch (Exception e)
{
MainLog.Instance.Verbose("USERSTORAGE",
"Unable to AddNewUserFriend via " + plugin.Key + "(" + e.ToString() + ")");
}
}
}
public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
{
try
{
plugin.Value.RemoveUserFriend(friendlistowner, friend);
}
catch (Exception e)
{
MainLog.Instance.Verbose("USERSTORAGE",
"Unable to RemoveUserFriend via " + plugin.Key + "(" + e.ToString() + ")");
}
}
}
public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms)
{
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
{
try
{
plugin.Value.UpdateUserFriendPerms(friendlistowner, friend, perms);
}
catch (Exception e)
{
MainLog.Instance.Verbose("USERSTORAGE",
"Unable to UpdateUserFriendPerms via " + plugin.Key + "(" + e.ToString() + ")");
}
}
}
/// <summary>
/// Loads a user agent by name (not called directly)
/// </summary>