* Moved setup of LocalInventoryService and LocalUserServices to the app layer
* Killed off 'parent' relation from LocalUserServices to CommunicationsLocal * Deleted obsolete project InventoryServiceBase * Deleted superfluous createCol functionafrisby
parent
625164d3e2
commit
b5eaea7b0c
|
@ -350,13 +350,7 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
*
|
*
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
private void createCol(DataTable dt, string name, System.Type type)
|
private static DataTable createInventoryItemsTable()
|
||||||
{
|
|
||||||
DataColumn col = new DataColumn(name, type);
|
|
||||||
dt.Columns.Add(col);
|
|
||||||
}
|
|
||||||
|
|
||||||
private DataTable createInventoryItemsTable()
|
|
||||||
{
|
{
|
||||||
DataTable inv = new DataTable("inventoryitems");
|
DataTable inv = new DataTable("inventoryitems");
|
||||||
|
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
|
||||||
// set of attributes. Change these attribute values to modify the information
|
|
||||||
// associated with an assembly.
|
|
||||||
[assembly: AssemblyTitle("InventoryServiceBase")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("")]
|
|
||||||
[assembly: AssemblyProduct("InventoryServiceBase")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright © 2007")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
|
||||||
// to COM components. If you need to access a type in this assembly from
|
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|
||||||
[assembly: Guid("7e1fbd0b-4a25-4804-a01f-89b04eb5b349")]
|
|
||||||
|
|
||||||
// Version information for an assembly consists of the following four values:
|
|
||||||
//
|
|
||||||
// Major Version
|
|
||||||
// Minor Version
|
|
||||||
// Build Number
|
|
||||||
// Revision
|
|
||||||
//
|
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
|
||||||
// by using the '*' as shown below:
|
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
|
@ -157,8 +157,13 @@ namespace OpenSim
|
||||||
|
|
||||||
if (m_sandbox)
|
if (m_sandbox)
|
||||||
{
|
{
|
||||||
CommunicationsLocal.LocalSettings settings = new CommunicationsLocal.LocalSettings(standaloneWelcomeMessage, standaloneAuthenticate, standaloneInventoryPlugin, standaloneUserPlugin);
|
CommunicationsLocal.LocalSettings settings = new CommunicationsLocal.LocalSettings(standaloneWelcomeMessage, standaloneAuthenticate, standaloneInventoryPlugin);
|
||||||
CommunicationsLocal localComms = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, settings);
|
|
||||||
|
LocalInventoryService inventoryService = new LocalInventoryService();
|
||||||
|
LocalUserServices userService = new LocalUserServices(m_networkServersInfo, m_networkServersInfo.DefaultHomeLocX, m_networkServersInfo.DefaultHomeLocY, inventoryService );
|
||||||
|
userService.AddPlugin( standaloneUserPlugin );
|
||||||
|
|
||||||
|
CommunicationsLocal localComms = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, settings, userService);
|
||||||
m_commsManager = localComms;
|
m_commsManager = localComms;
|
||||||
if (standaloneAuthenticate)
|
if (standaloneAuthenticate)
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,15 +39,13 @@ namespace OpenSim.Region.Communications.Local
|
||||||
{
|
{
|
||||||
public class CommunicationsLocal : CommunicationsManager
|
public class CommunicationsLocal : CommunicationsManager
|
||||||
{
|
{
|
||||||
public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, LocalSettings settings)
|
public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, LocalSettings settings, LocalUserServices userService)
|
||||||
: base(serversInfo, httpServer, assetCache)
|
: base(serversInfo, httpServer, assetCache)
|
||||||
{
|
{
|
||||||
LocalInventoryService inventoryService = new LocalInventoryService();
|
LocalInventoryService inventoryService = new LocalInventoryService();
|
||||||
inventoryService.AddPlugin(settings.InventoryPlugin);
|
inventoryService.AddPlugin(settings.InventoryPlugin);
|
||||||
m_inventoryService = inventoryService;
|
m_inventoryService = inventoryService;
|
||||||
|
|
||||||
LocalUserServices userService = new LocalUserServices(this, serversInfo);
|
|
||||||
userService.AddPlugin(settings.UserDatabasePlugin);
|
|
||||||
m_userService = userService;
|
m_userService = userService;
|
||||||
|
|
||||||
LocalBackEndServices backendService = new LocalBackEndServices();
|
LocalBackEndServices backendService = new LocalBackEndServices();
|
||||||
|
@ -118,14 +116,12 @@ namespace OpenSim.Region.Communications.Local
|
||||||
public string WelcomeMessage;
|
public string WelcomeMessage;
|
||||||
public bool AccountAuthentication = false;
|
public bool AccountAuthentication = false;
|
||||||
public string InventoryPlugin;
|
public string InventoryPlugin;
|
||||||
public string UserDatabasePlugin;
|
|
||||||
|
|
||||||
public LocalSettings(string welcomeMessage, bool accountsAuthenticate, string inventoryPlugin, string userPlugin)
|
public LocalSettings(string welcomeMessage, bool accountsAuthenticate, string inventoryPlugin)
|
||||||
{
|
{
|
||||||
WelcomeMessage = welcomeMessage;
|
WelcomeMessage = welcomeMessage;
|
||||||
AccountAuthentication = accountsAuthenticate;
|
AccountAuthentication = accountsAuthenticate;
|
||||||
InventoryPlugin = inventoryPlugin;
|
InventoryPlugin = inventoryPlugin;
|
||||||
UserDatabasePlugin = userPlugin;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,20 +8,20 @@ namespace OpenSim.Region.Communications.Local
|
||||||
{
|
{
|
||||||
public class LocalUserServices : UserManagerBase
|
public class LocalUserServices : UserManagerBase
|
||||||
{
|
{
|
||||||
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;
|
||||||
|
private IInventoryServices m_inventoryService;
|
||||||
|
|
||||||
|
|
||||||
public LocalUserServices(CommunicationsLocal parent, NetworkServersInfo serversInfo)
|
public LocalUserServices(NetworkServersInfo serversInfo, uint defaultHomeLocX, uint defaultHomeLocY, IInventoryServices inventoryService)
|
||||||
{
|
{
|
||||||
m_parent = parent;
|
|
||||||
m_serversInfo = serversInfo;
|
m_serversInfo = serversInfo;
|
||||||
|
|
||||||
m_defaultHomeX = m_serversInfo.DefaultHomeLocX;
|
m_defaultHomeX = defaultHomeLocX;
|
||||||
m_defaultHomeY = m_serversInfo.DefaultHomeLocY;
|
m_defaultHomeY = defaultHomeLocY;
|
||||||
|
|
||||||
|
m_inventoryService = inventoryService;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override UserProfileData SetupMasterUser(string firstName, string lastName)
|
public override UserProfileData SetupMasterUser(string firstName, string lastName)
|
||||||
|
@ -48,7 +48,7 @@ namespace OpenSim.Region.Communications.Local
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_parent.InventoryService.CreateNewUserInventory(profile.UUID);
|
m_inventoryService.CreateNewUserInventory(profile.UUID);
|
||||||
}
|
}
|
||||||
|
|
||||||
return profile;
|
return profile;
|
||||||
|
|
|
@ -41,8 +41,12 @@ namespace SimpleApp
|
||||||
{
|
{
|
||||||
base.StartUp();
|
base.StartUp();
|
||||||
|
|
||||||
CommunicationsLocal.LocalSettings settings = new CommunicationsLocal.LocalSettings("", false, "", "");
|
CommunicationsLocal.LocalSettings settings = new CommunicationsLocal.LocalSettings("", false, "");
|
||||||
m_commsManager = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, settings);
|
|
||||||
|
LocalInventoryService inventoryService = new LocalInventoryService();
|
||||||
|
LocalUserServices userService = new LocalUserServices(m_networkServersInfo, m_networkServersInfo.DefaultHomeLocX, m_networkServersInfo.DefaultHomeLocY, inventoryService);
|
||||||
|
|
||||||
|
m_commsManager = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, settings, userService );
|
||||||
|
|
||||||
m_log.Notice(m_log.LineInfo);
|
m_log.Notice(m_log.LineInfo);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue