mirror of
https://github.com/opensim/opensim.git
synced 2026-08-13 05:05:43 +08:00
Justin, I must have been dyslexic when I wrote UserGridService as the name for it. GridUserService makes more sense; it's the user of the grid, "grid user". I changed it everywhere.
This commit is contained in:
@@ -39,20 +39,20 @@ using log4net;
|
||||
|
||||
namespace OpenSim.Services.UserAccountService
|
||||
{
|
||||
public class UserGridService : UserGridServiceBase, IUserGridService
|
||||
public class GridUserService : GridUserServiceBase, IGridUserService
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public UserGridService(IConfigSource config) : base(config)
|
||||
public GridUserService(IConfigSource config) : base(config)
|
||||
{
|
||||
m_log.Debug("[USER GRID SERVICE]: Starting user grid service");
|
||||
}
|
||||
|
||||
public UserGridInfo GetUserGridInfo(string userID)
|
||||
public GridUserInfo GetGridUserInfo(string userID)
|
||||
{
|
||||
UserGridData d = m_Database.GetUserGridData(userID);
|
||||
GridUserData d = m_Database.GetGridUserData(userID);
|
||||
|
||||
UserGridInfo info = new UserGridInfo();
|
||||
GridUserInfo info = new GridUserInfo();
|
||||
info.UserID = d.UserID;
|
||||
info.HomeRegionID = new UUID(d.Data["HomeRegionID"]);
|
||||
info.HomePosition = Vector3.Parse(d.Data["HomePosition"]);
|
||||
@@ -61,16 +61,16 @@ namespace OpenSim.Services.UserAccountService
|
||||
return info;
|
||||
}
|
||||
|
||||
public bool StoreUserGridInfo(UserGridInfo info)
|
||||
public bool StoreGridUserInfo(GridUserInfo info)
|
||||
{
|
||||
UserGridData d = new UserGridData();
|
||||
GridUserData d = new GridUserData();
|
||||
|
||||
d.Data["UserID"] = info.UserID;
|
||||
d.Data["HomeRegionID"] = info.HomeRegionID.ToString();
|
||||
d.Data["HomePosition"] = info.HomePosition.ToString();
|
||||
d.Data["HomeLookAt"] = info.HomeLookAt.ToString();
|
||||
|
||||
return m_Database.StoreUserGridData(d);
|
||||
return m_Database.StoreGridUserData(d);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,15 +35,15 @@ using OpenSim.Services.Base;
|
||||
|
||||
namespace OpenSim.Services.UserAccountService
|
||||
{
|
||||
public class UserGridServiceBase : ServiceBase
|
||||
public class GridUserServiceBase : ServiceBase
|
||||
{
|
||||
protected IUserGridData m_Database = null;
|
||||
protected IGridUserData m_Database = null;
|
||||
|
||||
public UserGridServiceBase(IConfigSource config) : base(config)
|
||||
public GridUserServiceBase(IConfigSource config) : base(config)
|
||||
{
|
||||
string dllName = String.Empty;
|
||||
string connString = String.Empty;
|
||||
string realm = "UserGrid";
|
||||
string realm = "GridUser";
|
||||
|
||||
//
|
||||
// Try reading the [DatabaseService] section, if it exists
|
||||
@@ -58,9 +58,9 @@ namespace OpenSim.Services.UserAccountService
|
||||
}
|
||||
|
||||
//
|
||||
// [PresenceService] section overrides [DatabaseService], if it exists
|
||||
// [GridUsetService] section overrides [DatabaseService], if it exists
|
||||
//
|
||||
IConfig presenceConfig = config.Configs["PresenceService"];
|
||||
IConfig presenceConfig = config.Configs["GridUserService"];
|
||||
if (presenceConfig != null)
|
||||
{
|
||||
dllName = presenceConfig.GetString("StorageProvider", dllName);
|
||||
@@ -74,7 +74,7 @@ namespace OpenSim.Services.UserAccountService
|
||||
if (dllName.Equals(String.Empty))
|
||||
throw new Exception("No StorageProvider configured");
|
||||
|
||||
m_Database = LoadPlugin<IUserGridData>(dllName, new Object[] { connString, realm });
|
||||
m_Database = LoadPlugin<IGridUserData>(dllName, new Object[] { connString, realm });
|
||||
if (m_Database == null)
|
||||
throw new Exception("Could not find a storage interface in the given module " + dllName);
|
||||
}
|
||||
Reference in New Issue
Block a user