mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
add some wiring to have GetUserAccounts for multiple IDs on a single request to grid services. Unfinished, untested
This commit is contained in:
@@ -182,6 +182,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||
return UserAccountService.GetUserAccount(scopeID, Email);
|
||||
}
|
||||
|
||||
public List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs, out bool suported)
|
||||
{
|
||||
return UserAccountService.GetUserAccounts(scopeID, IDs, out suported);
|
||||
}
|
||||
|
||||
|
||||
public List<UserAccount> GetUserAccountsWhere(UUID scopeID, string query)
|
||||
{
|
||||
return null;
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Nini.Config;
|
||||
using log4net;
|
||||
using Mono.Addins;
|
||||
@@ -158,6 +160,39 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts
|
||||
return account;
|
||||
}
|
||||
|
||||
public override List<UserAccount> GetUserAccounts(UUID scopeID, List<string> IDs, out bool suported)
|
||||
{
|
||||
suported = true;
|
||||
List<UserAccount> accs = new List<UserAccount>();
|
||||
List<string> missing = new List<string>();
|
||||
|
||||
UUID uuid = UUID.Zero;;
|
||||
UserAccount account;
|
||||
bool inCache = false;
|
||||
|
||||
foreach(string id in IDs)
|
||||
{
|
||||
if(UUID.TryParse(id, out uuid))
|
||||
{
|
||||
account = m_Cache.Get(uuid, out inCache);
|
||||
if (inCache)
|
||||
accs.Add(account);
|
||||
else
|
||||
missing.Add(id);
|
||||
}
|
||||
}
|
||||
|
||||
if(missing.Count > 0)
|
||||
{
|
||||
List<UserAccount> ext = base.GetUserAccounts(scopeID, missing, out suported);
|
||||
if(suported && ext != null)
|
||||
accs.AddRange(ext);
|
||||
}
|
||||
|
||||
return accs;
|
||||
}
|
||||
|
||||
|
||||
public override bool StoreUserAccount(UserAccount data)
|
||||
{
|
||||
// This remote connector refuses to serve this method
|
||||
|
||||
Reference in New Issue
Block a user