* Renamed methods on IUserData

afrisby
lbsa71 2007-09-24 01:31:00 +00:00
parent ce071417d4
commit 47256cebda
7 changed files with 92 additions and 84 deletions

View File

@ -55,7 +55,7 @@ namespace OpenSim.Framework.Data.DB4o
/// </summary> /// </summary>
/// <param name="uuid">The users UUID</param> /// <param name="uuid">The users UUID</param>
/// <returns>A user profile</returns> /// <returns>A user profile</returns>
public UserProfileData getUserByUUID(LLUUID uuid) public UserProfileData GetUserByUUID(LLUUID uuid)
{ {
if(manager.userProfiles.ContainsKey(uuid)) if(manager.userProfiles.ContainsKey(uuid))
return manager.userProfiles[uuid]; return manager.userProfiles[uuid];
@ -67,9 +67,9 @@ namespace OpenSim.Framework.Data.DB4o
/// </summary> /// </summary>
/// <param name="name">The users account name</param> /// <param name="name">The users account name</param>
/// <returns>A matching users profile</returns> /// <returns>A matching users profile</returns>
public UserProfileData getUserByName(string name) public UserProfileData GetUserByName(string name)
{ {
return getUserByName(name.Split(' ')[0], name.Split(' ')[1]); return GetUserByName(name.Split(' ')[0], name.Split(' ')[1]);
} }
/// <summary> /// <summary>
@ -78,7 +78,7 @@ namespace OpenSim.Framework.Data.DB4o
/// <param name="fname">The first part of the users account name</param> /// <param name="fname">The first part of the users account name</param>
/// <param name="lname">The second part of the users account name</param> /// <param name="lname">The second part of the users account name</param>
/// <returns>A matching users profile</returns> /// <returns>A matching users profile</returns>
public UserProfileData getUserByName(string fname, string lname) public UserProfileData GetUserByName(string fname, string lname)
{ {
foreach (UserProfileData profile in manager.userProfiles.Values) foreach (UserProfileData profile in manager.userProfiles.Values)
{ {
@ -93,11 +93,11 @@ namespace OpenSim.Framework.Data.DB4o
/// </summary> /// </summary>
/// <param name="uuid">The users account ID</param> /// <param name="uuid">The users account ID</param>
/// <returns>A matching users profile</returns> /// <returns>A matching users profile</returns>
public UserAgentData getAgentByUUID(LLUUID uuid) public UserAgentData GetAgentByUUID(LLUUID uuid)
{ {
try try
{ {
return getUserByUUID(uuid).currentAgent; return GetUserByUUID(uuid).currentAgent;
} }
catch (Exception) catch (Exception)
{ {
@ -110,9 +110,9 @@ namespace OpenSim.Framework.Data.DB4o
/// </summary> /// </summary>
/// <param name="name">The account name</param> /// <param name="name">The account name</param>
/// <returns>The users session agent</returns> /// <returns>The users session agent</returns>
public UserAgentData getAgentByName(string name) public UserAgentData GetAgentByName(string name)
{ {
return getAgentByName(name.Split(' ')[0], name.Split(' ')[1]); return GetAgentByName(name.Split(' ')[0], name.Split(' ')[1]);
} }
/// <summary> /// <summary>
@ -121,11 +121,11 @@ namespace OpenSim.Framework.Data.DB4o
/// <param name="fname">The first part of the users account name</param> /// <param name="fname">The first part of the users account name</param>
/// <param name="lname">The second part of the users account name</param> /// <param name="lname">The second part of the users account name</param>
/// <returns>A user agent</returns> /// <returns>A user agent</returns>
public UserAgentData getAgentByName(string fname, string lname) public UserAgentData GetAgentByName(string fname, string lname)
{ {
try try
{ {
return getUserByName(fname,lname).currentAgent; return GetUserByName(fname,lname).currentAgent;
} }
catch (Exception) catch (Exception)
{ {
@ -137,7 +137,7 @@ namespace OpenSim.Framework.Data.DB4o
/// Creates a new user profile /// Creates a new user profile
/// </summary> /// </summary>
/// <param name="user">The profile to add to the database</param> /// <param name="user">The profile to add to the database</param>
public void addNewUserProfile(UserProfileData user) public void AddNewUserProfile(UserProfileData user)
{ {
try try
{ {
@ -154,7 +154,7 @@ namespace OpenSim.Framework.Data.DB4o
/// </summary> /// </summary>
/// <param name="user">The profile to add to the database</param> /// <param name="user">The profile to add to the database</param>
/// <returns>True on success, false on error</returns> /// <returns>True on success, false on error</returns>
public bool updateUserProfile(UserProfileData user) public bool UpdateUserProfile(UserProfileData user)
{ {
try { try {
return manager.UpdateRecord(user); return manager.UpdateRecord(user);
@ -170,7 +170,7 @@ namespace OpenSim.Framework.Data.DB4o
/// Creates a new user agent /// Creates a new user agent
/// </summary> /// </summary>
/// <param name="agent">The agent to add to the database</param> /// <param name="agent">The agent to add to the database</param>
public void addNewUserAgent(UserAgentData agent) public void AddNewUserAgent(UserAgentData agent)
{ {
// Do nothing. yet. // Do nothing. yet.
} }
@ -182,7 +182,7 @@ namespace OpenSim.Framework.Data.DB4o
/// <param name="to">End account</param> /// <param name="to">End account</param>
/// <param name="amount">The amount to move</param> /// <param name="amount">The amount to move</param>
/// <returns>Success?</returns> /// <returns>Success?</returns>
public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount) public bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount)
{ {
return true; return true;
} }
@ -195,7 +195,7 @@ namespace OpenSim.Framework.Data.DB4o
/// <param name="to">Recievers account</param> /// <param name="to">Recievers account</param>
/// <param name="item">Inventory item</param> /// <param name="item">Inventory item</param>
/// <returns>Success?</returns> /// <returns>Success?</returns>
public bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) public bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item)
{ {
return true; return true;
} }
@ -213,7 +213,7 @@ namespace OpenSim.Framework.Data.DB4o
/// Returns the version of the storage provider /// Returns the version of the storage provider
/// </summary> /// </summary>
/// <returns>Storage provider version</returns> /// <returns>Storage provider version</returns>
public string getVersion() public string GetVersion()
{ {
return "0.1"; return "0.1";
} }

View File

@ -65,9 +65,9 @@ namespace OpenSim.Framework.Data.MySQL
/// </summary> /// </summary>
/// <param name="name">The account name of the user</param> /// <param name="name">The account name of the user</param>
/// <returns>A user profile</returns> /// <returns>A user profile</returns>
public UserProfileData getUserByName(string name) public UserProfileData GetUserByName(string name)
{ {
return getUserByName(name.Split(' ')[0], name.Split(' ')[1]); return GetUserByName(name.Split(' ')[0], name.Split(' ')[1]);
} }
/// <summary> /// <summary>
@ -76,7 +76,7 @@ namespace OpenSim.Framework.Data.MySQL
/// <param name="user">The first part of the account name</param> /// <param name="user">The first part of the account name</param>
/// <param name="last">The second part of the account name</param> /// <param name="last">The second part of the account name</param>
/// <returns>A user profile</returns> /// <returns>A user profile</returns>
public UserProfileData getUserByName(string user, string last) public UserProfileData GetUserByName(string user, string last)
{ {
try try
{ {
@ -110,7 +110,7 @@ namespace OpenSim.Framework.Data.MySQL
/// </summary> /// </summary>
/// <param name="uuid">The account ID</param> /// <param name="uuid">The account ID</param>
/// <returns>The users profile</returns> /// <returns>The users profile</returns>
public UserProfileData getUserByUUID(LLUUID uuid) public UserProfileData GetUserByUUID(LLUUID uuid)
{ {
try try
{ {
@ -143,9 +143,9 @@ namespace OpenSim.Framework.Data.MySQL
/// </summary> /// </summary>
/// <param name="name">The account name</param> /// <param name="name">The account name</param>
/// <returns>The users session</returns> /// <returns>The users session</returns>
public UserAgentData getAgentByName(string name) public UserAgentData GetAgentByName(string name)
{ {
return getAgentByName(name.Split(' ')[0], name.Split(' ')[1]); return GetAgentByName(name.Split(' ')[0], name.Split(' ')[1]);
} }
/// <summary> /// <summary>
@ -154,10 +154,10 @@ namespace OpenSim.Framework.Data.MySQL
/// <param name="user">First part of the users account name</param> /// <param name="user">First part of the users account name</param>
/// <param name="last">Second part of the users account name</param> /// <param name="last">Second part of the users account name</param>
/// <returns>The users session</returns> /// <returns>The users session</returns>
public UserAgentData getAgentByName(string user, string last) public UserAgentData GetAgentByName(string user, string last)
{ {
UserProfileData profile = getUserByName(user, last); UserProfileData profile = GetUserByName(user, last);
return getAgentByUUID(profile.UUID); return GetAgentByUUID(profile.UUID);
} }
/// <summary> /// <summary>
@ -165,7 +165,7 @@ namespace OpenSim.Framework.Data.MySQL
/// </summary> /// </summary>
/// <param name="uuid">The accounts UUID</param> /// <param name="uuid">The accounts UUID</param>
/// <returns>The users session</returns> /// <returns>The users session</returns>
public UserAgentData getAgentByUUID(LLUUID uuid) public UserAgentData GetAgentByUUID(LLUUID uuid)
{ {
try try
{ {
@ -197,7 +197,7 @@ namespace OpenSim.Framework.Data.MySQL
/// Creates a new users profile /// Creates a new users profile
/// </summary> /// </summary>
/// <param name="user">The user profile to create</param> /// <param name="user">The user profile to create</param>
public void addNewUserProfile(UserProfileData user) public void AddNewUserProfile(UserProfileData user)
{ {
try try
{ {
@ -220,13 +220,13 @@ namespace OpenSim.Framework.Data.MySQL
/// Creates a new agent /// Creates a new agent
/// </summary> /// </summary>
/// <param name="agent">The agent to create</param> /// <param name="agent">The agent to create</param>
public void addNewUserAgent(UserAgentData agent) public void AddNewUserAgent(UserAgentData agent)
{ {
// Do nothing. // Do nothing.
} }
public bool updateUserProfile(UserProfileData user) public bool UpdateUserProfile(UserProfileData user)
{ {
return true; return true;
// TODO: implement // TODO: implement
@ -239,7 +239,7 @@ namespace OpenSim.Framework.Data.MySQL
/// <param name="to">The recievers account ID</param> /// <param name="to">The recievers account ID</param>
/// <param name="amount">The amount to transfer</param> /// <param name="amount">The amount to transfer</param>
/// <returns>Success?</returns> /// <returns>Success?</returns>
public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount) public bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount)
{ {
return false; return false;
} }
@ -252,7 +252,7 @@ namespace OpenSim.Framework.Data.MySQL
/// <param name="to">The recievers account ID</param> /// <param name="to">The recievers account ID</param>
/// <param name="item">The item to transfer</param> /// <param name="item">The item to transfer</param>
/// <returns>Success?</returns> /// <returns>Success?</returns>
public bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) public bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item)
{ {
return false; return false;
} }
@ -270,7 +270,7 @@ namespace OpenSim.Framework.Data.MySQL
/// Database provider version /// Database provider version
/// </summary> /// </summary>
/// <returns>provider version</returns> /// <returns>provider version</returns>
public string getVersion() public string GetVersion()
{ {
return "0.1"; return "0.1";
} }

View File

@ -76,7 +76,7 @@ namespace OpenSim.Framework.Data.SQLite
/// </summary> /// </summary>
/// <param name="uuid">The users UUID</param> /// <param name="uuid">The users UUID</param>
/// <returns>A user profile</returns> /// <returns>A user profile</returns>
public UserProfileData getUserByUUID(LLUUID uuid) public UserProfileData GetUserByUUID(LLUUID uuid)
{ {
lock (ds) { lock (ds) {
DataRow row = ds.Tables["users"].Rows.Find(uuid); DataRow row = ds.Tables["users"].Rows.Find(uuid);
@ -98,9 +98,9 @@ namespace OpenSim.Framework.Data.SQLite
/// </summary> /// </summary>
/// <param name="name">The users account name</param> /// <param name="name">The users account name</param>
/// <returns>A matching users profile</returns> /// <returns>A matching users profile</returns>
public UserProfileData getUserByName(string name) public UserProfileData GetUserByName(string name)
{ {
return getUserByName(name.Split(' ')[0], name.Split(' ')[1]); return GetUserByName(name.Split(' ')[0], name.Split(' ')[1]);
} }
/// <summary> /// <summary>
@ -109,7 +109,7 @@ namespace OpenSim.Framework.Data.SQLite
/// <param name="fname">The first part of the users account name</param> /// <param name="fname">The first part of the users account name</param>
/// <param name="lname">The second part of the users account name</param> /// <param name="lname">The second part of the users account name</param>
/// <returns>A matching users profile</returns> /// <returns>A matching users profile</returns>
public UserProfileData getUserByName(string fname, string lname) public UserProfileData GetUserByName(string fname, string lname)
{ {
string select = "surname = '" + lname + "' and username = '" + fname + "'"; string select = "surname = '" + lname + "' and username = '" + fname + "'";
lock (ds) { lock (ds) {
@ -132,11 +132,11 @@ namespace OpenSim.Framework.Data.SQLite
/// </summary> /// </summary>
/// <param name="uuid">The users account ID</param> /// <param name="uuid">The users account ID</param>
/// <returns>A matching users profile</returns> /// <returns>A matching users profile</returns>
public UserAgentData getAgentByUUID(LLUUID uuid) public UserAgentData GetAgentByUUID(LLUUID uuid)
{ {
try try
{ {
return getUserByUUID(uuid).currentAgent; return GetUserByUUID(uuid).currentAgent;
} }
catch (Exception) catch (Exception)
{ {
@ -149,9 +149,9 @@ namespace OpenSim.Framework.Data.SQLite
/// </summary> /// </summary>
/// <param name="name">The account name</param> /// <param name="name">The account name</param>
/// <returns>The users session agent</returns> /// <returns>The users session agent</returns>
public UserAgentData getAgentByName(string name) public UserAgentData GetAgentByName(string name)
{ {
return getAgentByName(name.Split(' ')[0], name.Split(' ')[1]); return GetAgentByName(name.Split(' ')[0], name.Split(' ')[1]);
} }
/// <summary> /// <summary>
@ -160,11 +160,11 @@ namespace OpenSim.Framework.Data.SQLite
/// <param name="fname">The first part of the users account name</param> /// <param name="fname">The first part of the users account name</param>
/// <param name="lname">The second part of the users account name</param> /// <param name="lname">The second part of the users account name</param>
/// <returns>A user agent</returns> /// <returns>A user agent</returns>
public UserAgentData getAgentByName(string fname, string lname) public UserAgentData GetAgentByName(string fname, string lname)
{ {
try try
{ {
return getUserByName(fname,lname).currentAgent; return GetUserByName(fname,lname).currentAgent;
} }
catch (Exception) catch (Exception)
{ {
@ -176,7 +176,7 @@ namespace OpenSim.Framework.Data.SQLite
/// Creates a new user profile /// Creates a new user profile
/// </summary> /// </summary>
/// <param name="user">The profile to add to the database</param> /// <param name="user">The profile to add to the database</param>
public void addNewUserProfile(UserProfileData user) public void AddNewUserProfile(UserProfileData user)
{ {
DataTable users = ds.Tables["users"]; DataTable users = ds.Tables["users"];
lock (ds) { lock (ds) {
@ -217,10 +217,10 @@ namespace OpenSim.Framework.Data.SQLite
/// </summary> /// </summary>
/// <param name="user">The profile to add to the database</param> /// <param name="user">The profile to add to the database</param>
/// <returns>True on success, false on error</returns> /// <returns>True on success, false on error</returns>
public bool updateUserProfile(UserProfileData user) public bool UpdateUserProfile(UserProfileData user)
{ {
try { try {
addNewUserProfile(user); AddNewUserProfile(user);
return true; return true;
} catch (Exception) { } catch (Exception) {
return false; return false;
@ -231,7 +231,7 @@ namespace OpenSim.Framework.Data.SQLite
/// Creates a new user agent /// Creates a new user agent
/// </summary> /// </summary>
/// <param name="agent">The agent to add to the database</param> /// <param name="agent">The agent to add to the database</param>
public void addNewUserAgent(UserAgentData agent) public void AddNewUserAgent(UserAgentData agent)
{ {
// Do nothing. yet. // Do nothing. yet.
} }
@ -243,7 +243,7 @@ namespace OpenSim.Framework.Data.SQLite
/// <param name="to">End account</param> /// <param name="to">End account</param>
/// <param name="amount">The amount to move</param> /// <param name="amount">The amount to move</param>
/// <returns>Success?</returns> /// <returns>Success?</returns>
public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount) public bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount)
{ {
return true; return true;
} }
@ -256,7 +256,7 @@ namespace OpenSim.Framework.Data.SQLite
/// <param name="to">Recievers account</param> /// <param name="to">Recievers account</param>
/// <param name="item">Inventory item</param> /// <param name="item">Inventory item</param>
/// <returns>Success?</returns> /// <returns>Success?</returns>
public bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) public bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item)
{ {
return true; return true;
} }
@ -274,7 +274,7 @@ namespace OpenSim.Framework.Data.SQLite
/// Returns the version of the storage provider /// Returns the version of the storage provider
/// </summary> /// </summary>
/// <returns>Storage provider version</returns> /// <returns>Storage provider version</returns>
public string getVersion() public string GetVersion()
{ {
return "0.1"; return "0.1";
} }

View File

@ -39,14 +39,14 @@ namespace OpenSim.Framework.Data
/// </summary> /// </summary>
/// <param name="user">The accounts UUID</param> /// <param name="user">The accounts UUID</param>
/// <returns>The user data profile</returns> /// <returns>The user data profile</returns>
UserProfileData getUserByUUID(LLUUID user); UserProfileData GetUserByUUID(LLUUID user);
/// <summary> /// <summary>
/// Returns a users profile by searching their username /// Returns a users profile by searching their username
/// </summary> /// </summary>
/// <param name="name">The users username</param> /// <param name="name">The users username</param>
/// <returns>The user data profile</returns> /// <returns>The user data profile</returns>
UserProfileData getUserByName(string name); UserProfileData GetUserByName(string name);
/// <summary> /// <summary>
/// Returns a users profile by searching their username parts /// Returns a users profile by searching their username parts
@ -54,21 +54,21 @@ namespace OpenSim.Framework.Data
/// <param name="fname">Account firstname</param> /// <param name="fname">Account firstname</param>
/// <param name="lname">Account lastname</param> /// <param name="lname">Account lastname</param>
/// <returns>The user data profile</returns> /// <returns>The user data profile</returns>
UserProfileData getUserByName(string fname, string lname); UserProfileData GetUserByName(string fname, string lname);
/// <summary> /// <summary>
/// Returns the current agent for a user searching by it's UUID /// Returns the current agent for a user searching by it's UUID
/// </summary> /// </summary>
/// <param name="user">The users UUID</param> /// <param name="user">The users UUID</param>
/// <returns>The current agent session</returns> /// <returns>The current agent session</returns>
UserAgentData getAgentByUUID(LLUUID user); UserAgentData GetAgentByUUID(LLUUID user);
/// <summary> /// <summary>
/// Returns the current session agent for a user searching by username /// Returns the current session agent for a user searching by username
/// </summary> /// </summary>
/// <param name="name">The users account name</param> /// <param name="name">The users account name</param>
/// <returns>The current agent session</returns> /// <returns>The current agent session</returns>
UserAgentData getAgentByName(string name); UserAgentData GetAgentByName(string name);
/// <summary> /// <summary>
/// Returns the current session agent for a user searching by username parts /// Returns the current session agent for a user searching by username parts
@ -76,25 +76,25 @@ namespace OpenSim.Framework.Data
/// <param name="fname">The users first account name</param> /// <param name="fname">The users first account name</param>
/// <param name="lname">The users account surname</param> /// <param name="lname">The users account surname</param>
/// <returns>The current agent session</returns> /// <returns>The current agent session</returns>
UserAgentData getAgentByName(string fname, string lname); UserAgentData GetAgentByName(string fname, string lname);
/// <summary> /// <summary>
/// Adds a new User profile to the database /// Adds a new User profile to the database
/// </summary> /// </summary>
/// <param name="user">UserProfile to add</param> /// <param name="user">UserProfile to add</param>
void addNewUserProfile(UserProfileData user); void AddNewUserProfile(UserProfileData user);
/// <summary> /// <summary>
/// Updates an existing user profile /// Updates an existing user profile
/// </summary> /// </summary>
/// <param name="user">UserProfile to update</param> /// <param name="user">UserProfile to update</param>
bool updateUserProfile(UserProfileData user); bool UpdateUserProfile(UserProfileData user);
/// <summary> /// <summary>
/// Adds a new agent to the database /// Adds a new agent to the database
/// </summary> /// </summary>
/// <param name="agent">The agent to add</param> /// <param name="agent">The agent to add</param>
void addNewUserAgent(UserAgentData agent); void AddNewUserAgent(UserAgentData agent);
/// <summary> /// <summary>
/// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES) /// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES)
@ -103,7 +103,7 @@ namespace OpenSim.Framework.Data
/// <param name="to">The account to transfer to</param> /// <param name="to">The account to transfer to</param>
/// <param name="amount">The amount to transfer</param> /// <param name="amount">The amount to transfer</param>
/// <returns>Successful?</returns> /// <returns>Successful?</returns>
bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount); bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount);
/// <summary> /// <summary>
/// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account. /// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account.
@ -112,13 +112,13 @@ namespace OpenSim.Framework.Data
/// <param name="to">User to transfer to</param> /// <param name="to">User to transfer to</param>
/// <param name="inventory">Specified inventory item</param> /// <param name="inventory">Specified inventory item</param>
/// <returns>Successful?</returns> /// <returns>Successful?</returns>
bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory); bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory);
/// <summary> /// <summary>
/// Returns the plugin version /// Returns the plugin version
/// </summary> /// </summary>
/// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns> /// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns>
string getVersion(); string GetVersion();
/// <summary> /// <summary>
/// Returns the plugin name /// Returns the plugin name

View File

@ -68,8 +68,7 @@ namespace OpenSim.Framework.UserManagement
{ {
IUserData plug = (IUserData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); IUserData plug = (IUserData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
plug.Initialise(); plug.Initialise();
this._plugins.Add(plug.getName(), plug); AddPlugin(plug);
MainLog.Instance.Verbose( "Userstorage: Added IUserData Interface");
} }
typeInterface = null; typeInterface = null;
@ -79,6 +78,12 @@ namespace OpenSim.Framework.UserManagement
pluginAssembly = null; pluginAssembly = null;
} }
private void AddPlugin(IUserData plug)
{
this._plugins.Add(plug.getName(), plug);
MainLog.Instance.Verbose( "Userstorage: Added IUserData Interface");
}
#region Get UserProfile #region Get UserProfile
/// <summary> /// <summary>
/// Loads a user profile from a database by UUID /// Loads a user profile from a database by UUID
@ -91,7 +96,7 @@ namespace OpenSim.Framework.UserManagement
{ {
try try
{ {
UserProfileData profile = plugin.Value.getUserByUUID(uuid); UserProfileData profile = plugin.Value.GetUserByUUID(uuid);
profile.currentAgent = getUserAgent(profile.UUID); profile.currentAgent = getUserAgent(profile.UUID);
return profile; return profile;
} }
@ -116,7 +121,7 @@ namespace OpenSim.Framework.UserManagement
{ {
try try
{ {
UserProfileData profile = plugin.Value.getUserByName(name); UserProfileData profile = plugin.Value.GetUserByName(name);
profile.currentAgent = getUserAgent(profile.UUID); profile.currentAgent = getUserAgent(profile.UUID);
return profile; return profile;
} }
@ -142,7 +147,7 @@ namespace OpenSim.Framework.UserManagement
{ {
try try
{ {
UserProfileData profile = plugin.Value.getUserByName(fname,lname); UserProfileData profile = plugin.Value.GetUserByName(fname,lname);
profile.currentAgent = getUserAgent(profile.UUID); profile.currentAgent = getUserAgent(profile.UUID);
@ -168,7 +173,7 @@ namespace OpenSim.Framework.UserManagement
foreach (KeyValuePair<string, IUserData> plugin in _plugins) foreach (KeyValuePair<string, IUserData> plugin in _plugins)
{ {
try { try {
plugin.Value.updateUserProfile(data); plugin.Value.UpdateUserProfile(data);
return true; return true;
} catch (Exception e) { } catch (Exception e) {
MainLog.Instance.Verbose( "Unable to set user via " + plugin.Key + "(" + e.ToString() + ")"); MainLog.Instance.Verbose( "Unable to set user via " + plugin.Key + "(" + e.ToString() + ")");
@ -192,7 +197,7 @@ namespace OpenSim.Framework.UserManagement
{ {
try try
{ {
return plugin.Value.getAgentByUUID(uuid); return plugin.Value.GetAgentByUUID(uuid);
} }
catch (Exception e) catch (Exception e)
{ {
@ -214,7 +219,7 @@ namespace OpenSim.Framework.UserManagement
{ {
try try
{ {
return plugin.Value.getAgentByName(name); return plugin.Value.GetAgentByName(name);
} }
catch (Exception e) catch (Exception e)
{ {
@ -246,7 +251,7 @@ namespace OpenSim.Framework.UserManagement
{ {
try try
{ {
return plugin.Value.getAgentByName(fname,lname); return plugin.Value.GetAgentByName(fname,lname);
} }
catch (Exception e) catch (Exception e)
{ {
@ -360,7 +365,7 @@ namespace OpenSim.Framework.UserManagement
{ {
try try
{ {
plugin.Value.addNewUserProfile(user); plugin.Value.AddNewUserProfile(user);
} }
catch (Exception e) catch (Exception e)

View File

@ -44,8 +44,14 @@ namespace OpenSim.Region.Communications.Local
public LocalUserServices UserServices; public LocalUserServices UserServices;
public LocalLoginService LoginServices; public LocalLoginService LoginServices;
public LocalInventoryService InvenServices; public LocalInventoryService InvenServices;
// public CAPSService CapsServices;
private readonly LocalSettings m_settings; protected LocalSettings m_settings;
protected CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache )
: base(serversInfo, httpServer, assetCache)
{
}
public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, LocalSettings settings) public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, LocalSettings settings)
: base(serversInfo, httpServer, assetCache) : base(serversInfo, httpServer, assetCache)

View File

@ -1,10 +1,8 @@
using System; using System;
using libsecondlife;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
using OpenSim.Framework.Data; using OpenSim.Framework.Data;
using OpenSim.Framework.Types; using OpenSim.Framework.Types;
using OpenSim.Framework.UserManagement; using OpenSim.Framework.UserManagement;
using OpenSim.Framework.Utilities;
namespace OpenSim.Region.Communications.Local namespace OpenSim.Region.Communications.Local
{ {
@ -13,7 +11,7 @@ namespace OpenSim.Region.Communications.Local
private readonly CommunicationsLocal m_parent; private readonly CommunicationsLocal m_parent;
private readonly NetworkServersInfo m_serversInfo; private readonly NetworkServersInfo m_serversInfo;
private readonly uint m_defaultHomeX ; private readonly uint m_defaultHomeX;
private readonly uint m_defaultHomeY; private readonly uint m_defaultHomeY;
@ -22,8 +20,8 @@ namespace OpenSim.Region.Communications.Local
m_parent = parent; m_parent = parent;
m_serversInfo = serversInfo; m_serversInfo = serversInfo;
m_defaultHomeX = this.m_serversInfo.DefaultHomeLocX; m_defaultHomeX = m_serversInfo.DefaultHomeLocX;
m_defaultHomeY = this.m_serversInfo.DefaultHomeLocY; m_defaultHomeY = m_serversInfo.DefaultHomeLocY;
} }
public UserProfileData SetupMasterUser(string firstName, string lastName) public UserProfileData SetupMasterUser(string firstName, string lastName)
@ -33,17 +31,16 @@ namespace OpenSim.Region.Communications.Local
public UserProfileData SetupMasterUser(string firstName, string lastName, string password) public UserProfileData SetupMasterUser(string firstName, string lastName, string password)
{ {
UserProfileData profile = base.GetUserProfile(firstName, lastName); UserProfileData profile = GetUserProfile(firstName, lastName);
if (profile != null) if (profile != null)
{ {
return profile; return profile;
} }
Console.WriteLine("Unknown Master User. Sandbox Mode: Creating Account"); Console.WriteLine("Unknown Master User. Sandbox Mode: Creating Account");
this.AddUserProfile(firstName, lastName, password, m_defaultHomeX, m_defaultHomeY); AddUserProfile(firstName, lastName, password, m_defaultHomeX, m_defaultHomeY);
profile = base.GetUserProfile(firstName, lastName); profile = GetUserProfile(firstName, lastName);
if (profile == null) if (profile == null)
{ {
@ -51,10 +48,10 @@ namespace OpenSim.Region.Communications.Local
} }
else else
{ {
m_parent.InvenServices.CreateNewUserInventory(profile.UUID); m_parent.InvenServices.CreateNewUserInventory(profile.UUID);
} }
return profile; return profile;
} }
} }
} }