Committing the meat of the user server interface and the bones of the service implementation
parent
65d48a5e60
commit
044446821b
|
@ -71,6 +71,7 @@ namespace OpenSim.Framework
|
|||
protected uint m_remotingPort;
|
||||
public UUID RegionID = UUID.Zero;
|
||||
public string RemotingAddress;
|
||||
public UUID ScopeID = UUID.Zero;
|
||||
|
||||
public SimpleRegionInfo()
|
||||
{
|
||||
|
@ -470,6 +471,9 @@ namespace OpenSim.Framework
|
|||
|
||||
configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
|
||||
"Max objects this sim will hold", m_objectCapacity.ToString(), true);
|
||||
|
||||
configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
|
||||
"Scope ID for this region", ScopeID.ToString(), true);
|
||||
}
|
||||
|
||||
public void loadConfigurationOptions()
|
||||
|
@ -530,6 +534,9 @@ namespace OpenSim.Framework
|
|||
|
||||
configMember.addConfigurationOption("object_capacity", ConfigurationOption.ConfigurationTypes.TYPE_INT32,
|
||||
"Max objects this sim will hold", "0", true);
|
||||
|
||||
configMember.addConfigurationOption("scope_id", ConfigurationOption.ConfigurationTypes.TYPE_UUID,
|
||||
"Scope ID for this region", UUID.Zero.ToString(), true);
|
||||
}
|
||||
|
||||
public bool shouldMasterAvatarDetailsBeAsked(string configuration_key)
|
||||
|
@ -607,6 +614,9 @@ namespace OpenSim.Framework
|
|||
case "object_capacity":
|
||||
m_objectCapacity = (int)configuration_result;
|
||||
break;
|
||||
case "scope_id":
|
||||
ScopeID = (UUID)configuration_result;
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -46,17 +46,7 @@ namespace OpenSim.Services.AssetService
|
|||
string connString = String.Empty;
|
||||
|
||||
//
|
||||
// Try reading the [DatabaseService] section first, if it exists
|
||||
//
|
||||
IConfig dbConfig = config.Configs["DatabaseService"];
|
||||
if (dbConfig != null)
|
||||
{
|
||||
dllName = dbConfig.GetString("StorageProvider", String.Empty);
|
||||
connString = dbConfig.GetString("ConnectionString", String.Empty);
|
||||
}
|
||||
|
||||
//
|
||||
// Try reading the more specific [AssetService] section, if it exists
|
||||
// Try reading the [AssetService] section first, if it exists
|
||||
//
|
||||
IConfig assetConfig = config.Configs["AssetService"];
|
||||
if (assetConfig != null)
|
||||
|
@ -65,6 +55,18 @@ namespace OpenSim.Services.AssetService
|
|||
connString = assetConfig.GetString("ConnectionString", connString);
|
||||
}
|
||||
|
||||
//
|
||||
// Try reading the [DatabaseService] section, if it exists
|
||||
//
|
||||
IConfig dbConfig = config.Configs["DatabaseService"];
|
||||
if (dbConfig != null)
|
||||
{
|
||||
if (dllName != String.Empty)
|
||||
dllName = dbConfig.GetString("StorageProvider", String.Empty);
|
||||
if (connString != String.Empty)
|
||||
connString = dbConfig.GetString("ConnectionString", String.Empty);
|
||||
}
|
||||
|
||||
//
|
||||
// We tried, but this doesn't exist. We can't proceed.
|
||||
//
|
||||
|
|
|
@ -25,9 +25,54 @@
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Services.Interfaces
|
||||
{
|
||||
public class UserData
|
||||
{
|
||||
public string FirstName;
|
||||
public string LastName;
|
||||
public UUID UserID;
|
||||
public UUID scopeID;
|
||||
|
||||
// For informational purposes only!
|
||||
//
|
||||
public string HomeRegionName;
|
||||
|
||||
public UUID HomeRegionID;
|
||||
public float HomePositionX;
|
||||
public float HomePositionY;
|
||||
public float HomePositionZ;
|
||||
public float HomeLookAtX;
|
||||
public float HomeLookAtY;
|
||||
public float HomeLookAtZ;
|
||||
|
||||
// There are here because they
|
||||
// concern the account rather than
|
||||
// the profile. They just happen to
|
||||
// be used in the Linden profile as well
|
||||
//
|
||||
public int GodLevel;
|
||||
public int UserFlags;
|
||||
public string AccountType;
|
||||
};
|
||||
|
||||
public interface IUserService
|
||||
{
|
||||
UserData GetUserData(UUID scopeID, UUID userID);
|
||||
UserData GetUserData(UUID scopeID, string FirstName, string LastName);
|
||||
|
||||
// This will set only the home region portion of the data!
|
||||
// Can't be used to set god level, flags, type or change the name!
|
||||
//
|
||||
bool SetUserData(UserData data);
|
||||
|
||||
// Returns the list of avatars that matches both the search
|
||||
// criterion and the scope ID passed
|
||||
// ONLY THE NAME, SCOPE ID and UUID will be filled in!
|
||||
//
|
||||
List<UserData> GetAvatarPickerData(UUID scopeID, string query);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,8 @@ using System.Reflection;
|
|||
using Nini.Config;
|
||||
using OpenSim.Data;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using System.Collections.Generic;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Services.UserService
|
||||
{
|
||||
|
@ -38,5 +40,27 @@ namespace OpenSim.Services.UserService
|
|||
public UserService(IConfigSource config) : base(config)
|
||||
{
|
||||
}
|
||||
|
||||
public UserData GetUserData(UUID scopeID, string firstName,
|
||||
string lastName)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public UserData GetUserData(UUID scopeID, UUID userID)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public bool SetUserData(UserData data)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public List<UserData> GetAvatarPickerData(UUID scopeID,
|
||||
string query)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue