diff options
author | lbsa71 | 2007-10-02 00:00:12 +0000 |
---|---|---|
committer | lbsa71 | 2007-10-02 00:00:12 +0000 |
commit | b5eaea7b0c627c55544f4099b50e9ac1a504fe17 (patch) | |
tree | 5104246df864943f368d5a4ddc88d5101c3155b8 | |
parent | removed debug statements (diff) | |
download | opensim-SC_OLD-b5eaea7b0c627c55544f4099b50e9ac1a504fe17.zip opensim-SC_OLD-b5eaea7b0c627c55544f4099b50e9ac1a504fe17.tar.gz opensim-SC_OLD-b5eaea7b0c627c55544f4099b50e9ac1a504fe17.tar.bz2 opensim-SC_OLD-b5eaea7b0c627c55544f4099b50e9ac1a504fe17.tar.xz |
* 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 function
Diffstat (limited to '')
6 files changed, 23 insertions, 59 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs index 99fa740..d664e98 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs | |||
@@ -350,13 +350,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
350 | * | 350 | * |
351 | **********************************************************************/ | 351 | **********************************************************************/ |
352 | 352 | ||
353 | private void createCol(DataTable dt, string name, System.Type type) | 353 | private static DataTable createInventoryItemsTable() |
354 | { | ||
355 | DataColumn col = new DataColumn(name, type); | ||
356 | dt.Columns.Add(col); | ||
357 | } | ||
358 | |||
359 | private DataTable createInventoryItemsTable() | ||
360 | { | 354 | { |
361 | DataTable inv = new DataTable("inventoryitems"); | 355 | DataTable inv = new DataTable("inventoryitems"); |
362 | 356 | ||
diff --git a/OpenSim/Framework/InventoryServiceBase/Properties/AssemblyInfo.cs b/OpenSim/Framework/InventoryServiceBase/Properties/AssemblyInfo.cs deleted file mode 100644 index daf20b2..0000000 --- a/OpenSim/Framework/InventoryServiceBase/Properties/AssemblyInfo.cs +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | using System.Reflection; | ||
2 | using System.Runtime.CompilerServices; | ||
3 | using System.Runtime.InteropServices; | ||
4 | |||
5 | // General Information about an assembly is controlled through the following | ||
6 | // set of attributes. Change these attribute values to modify the information | ||
7 | // associated with an assembly. | ||
8 | [assembly: AssemblyTitle("InventoryServiceBase")] | ||
9 | [assembly: AssemblyDescription("")] | ||
10 | [assembly: AssemblyConfiguration("")] | ||
11 | [assembly: AssemblyCompany("")] | ||
12 | [assembly: AssemblyProduct("InventoryServiceBase")] | ||
13 | [assembly: AssemblyCopyright("Copyright © 2007")] | ||
14 | [assembly: AssemblyTrademark("")] | ||
15 | [assembly: AssemblyCulture("")] | ||
16 | |||
17 | // Setting ComVisible to false makes the types in this assembly not visible | ||
18 | // to COM components. If you need to access a type in this assembly from | ||
19 | // COM, set the ComVisible attribute to true on that type. | ||
20 | [assembly: ComVisible(false)] | ||
21 | |||
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM | ||
23 | [assembly: Guid("7e1fbd0b-4a25-4804-a01f-89b04eb5b349")] | ||
24 | |||
25 | // Version information for an assembly consists of the following four values: | ||
26 | // | ||
27 | // Major Version | ||
28 | // Minor Version | ||
29 | // Build Number | ||
30 | // Revision | ||
31 | // | ||
32 | // You can specify all the values or you can default the Revision and Build Numbers | ||
33 | // by using the '*' as shown below: | ||
34 | [assembly: AssemblyVersion("1.0.0.0")] | ||
35 | [assembly: AssemblyFileVersion("1.0.0.0")] | ||
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index dad6afd..e0ea212 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -157,8 +157,13 @@ namespace OpenSim | |||
157 | 157 | ||
158 | if (m_sandbox) | 158 | if (m_sandbox) |
159 | { | 159 | { |
160 | CommunicationsLocal.LocalSettings settings = new CommunicationsLocal.LocalSettings(standaloneWelcomeMessage, standaloneAuthenticate, standaloneInventoryPlugin, standaloneUserPlugin); | 160 | CommunicationsLocal.LocalSettings settings = new CommunicationsLocal.LocalSettings(standaloneWelcomeMessage, standaloneAuthenticate, standaloneInventoryPlugin); |
161 | CommunicationsLocal localComms = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, settings); | 161 | |
162 | LocalInventoryService inventoryService = new LocalInventoryService(); | ||
163 | LocalUserServices userService = new LocalUserServices(m_networkServersInfo, m_networkServersInfo.DefaultHomeLocX, m_networkServersInfo.DefaultHomeLocY, inventoryService ); | ||
164 | userService.AddPlugin( standaloneUserPlugin ); | ||
165 | |||
166 | CommunicationsLocal localComms = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, settings, userService); | ||
162 | m_commsManager = localComms; | 167 | m_commsManager = localComms; |
163 | if (standaloneAuthenticate) | 168 | if (standaloneAuthenticate) |
164 | { | 169 | { |
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index a00b35f..76814cf 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs | |||
@@ -39,15 +39,13 @@ namespace OpenSim.Region.Communications.Local | |||
39 | { | 39 | { |
40 | public class CommunicationsLocal : CommunicationsManager | 40 | public class CommunicationsLocal : CommunicationsManager |
41 | { | 41 | { |
42 | public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, LocalSettings settings) | 42 | public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, LocalSettings settings, LocalUserServices userService) |
43 | : base(serversInfo, httpServer, assetCache) | 43 | : base(serversInfo, httpServer, assetCache) |
44 | { | 44 | { |
45 | LocalInventoryService inventoryService = new LocalInventoryService(); | 45 | LocalInventoryService inventoryService = new LocalInventoryService(); |
46 | inventoryService.AddPlugin(settings.InventoryPlugin); | 46 | inventoryService.AddPlugin(settings.InventoryPlugin); |
47 | m_inventoryService = inventoryService; | 47 | m_inventoryService = inventoryService; |
48 | 48 | ||
49 | LocalUserServices userService = new LocalUserServices(this, serversInfo); | ||
50 | userService.AddPlugin(settings.UserDatabasePlugin); | ||
51 | m_userService = userService; | 49 | m_userService = userService; |
52 | 50 | ||
53 | LocalBackEndServices backendService = new LocalBackEndServices(); | 51 | LocalBackEndServices backendService = new LocalBackEndServices(); |
@@ -118,14 +116,12 @@ namespace OpenSim.Region.Communications.Local | |||
118 | public string WelcomeMessage; | 116 | public string WelcomeMessage; |
119 | public bool AccountAuthentication = false; | 117 | public bool AccountAuthentication = false; |
120 | public string InventoryPlugin; | 118 | public string InventoryPlugin; |
121 | public string UserDatabasePlugin; | ||
122 | 119 | ||
123 | public LocalSettings(string welcomeMessage, bool accountsAuthenticate, string inventoryPlugin, string userPlugin) | 120 | public LocalSettings(string welcomeMessage, bool accountsAuthenticate, string inventoryPlugin) |
124 | { | 121 | { |
125 | WelcomeMessage = welcomeMessage; | 122 | WelcomeMessage = welcomeMessage; |
126 | AccountAuthentication = accountsAuthenticate; | 123 | AccountAuthentication = accountsAuthenticate; |
127 | InventoryPlugin = inventoryPlugin; | 124 | InventoryPlugin = inventoryPlugin; |
128 | UserDatabasePlugin = userPlugin; | ||
129 | } | 125 | } |
130 | } | 126 | } |
131 | 127 | ||
diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs index 3bc4301..9e81fb8 100644 --- a/OpenSim/Region/Communications/Local/LocalUserServices.cs +++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs | |||
@@ -8,20 +8,20 @@ namespace OpenSim.Region.Communications.Local | |||
8 | { | 8 | { |
9 | public class LocalUserServices : UserManagerBase | 9 | public class LocalUserServices : UserManagerBase |
10 | { | 10 | { |
11 | private readonly CommunicationsLocal m_parent; | ||
12 | |||
13 | private readonly NetworkServersInfo m_serversInfo; | 11 | private readonly NetworkServersInfo m_serversInfo; |
14 | private readonly uint m_defaultHomeX; | 12 | private readonly uint m_defaultHomeX; |
15 | private readonly uint m_defaultHomeY; | 13 | private readonly uint m_defaultHomeY; |
14 | private IInventoryServices m_inventoryService; | ||
16 | 15 | ||
17 | 16 | ||
18 | public LocalUserServices(CommunicationsLocal parent, NetworkServersInfo serversInfo) | 17 | public LocalUserServices(NetworkServersInfo serversInfo, uint defaultHomeLocX, uint defaultHomeLocY, IInventoryServices inventoryService) |
19 | { | 18 | { |
20 | m_parent = parent; | ||
21 | m_serversInfo = serversInfo; | 19 | m_serversInfo = serversInfo; |
22 | 20 | ||
23 | m_defaultHomeX = m_serversInfo.DefaultHomeLocX; | 21 | m_defaultHomeX = defaultHomeLocX; |
24 | m_defaultHomeY = m_serversInfo.DefaultHomeLocY; | 22 | m_defaultHomeY = defaultHomeLocY; |
23 | |||
24 | m_inventoryService = inventoryService; | ||
25 | } | 25 | } |
26 | 26 | ||
27 | public override UserProfileData SetupMasterUser(string firstName, string lastName) | 27 | public override UserProfileData SetupMasterUser(string firstName, string lastName) |
@@ -48,7 +48,7 @@ namespace OpenSim.Region.Communications.Local | |||
48 | } | 48 | } |
49 | else | 49 | else |
50 | { | 50 | { |
51 | m_parent.InventoryService.CreateNewUserInventory(profile.UUID); | 51 | m_inventoryService.CreateNewUserInventory(profile.UUID); |
52 | } | 52 | } |
53 | 53 | ||
54 | return profile; | 54 | return profile; |
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index d693cce..eafa500 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs | |||
@@ -41,8 +41,12 @@ namespace SimpleApp | |||
41 | { | 41 | { |
42 | base.StartUp(); | 42 | base.StartUp(); |
43 | 43 | ||
44 | CommunicationsLocal.LocalSettings settings = new CommunicationsLocal.LocalSettings("", false, "", ""); | 44 | CommunicationsLocal.LocalSettings settings = new CommunicationsLocal.LocalSettings("", false, ""); |
45 | m_commsManager = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, settings); | 45 | |
46 | LocalInventoryService inventoryService = new LocalInventoryService(); | ||
47 | LocalUserServices userService = new LocalUserServices(m_networkServersInfo, m_networkServersInfo.DefaultHomeLocX, m_networkServersInfo.DefaultHomeLocY, inventoryService); | ||
48 | |||
49 | m_commsManager = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, settings, userService ); | ||
46 | 50 | ||
47 | m_log.Notice(m_log.LineInfo); | 51 | m_log.Notice(m_log.LineInfo); |
48 | 52 | ||