diff options
Start of Inventory service, currently only (partially) functional in standalone mode and using sqlite).
In standalone mode, if you have account authenticate turned on (setting in opensim.ini) then when you create a new account, a set of inventory is created for that account and stored in database (currently only a set of empty folders). Then during login the database is search for that set and sent to the client in the login response.
More functions will be added soon, like creating new folders (and a bit later items) from the client inventory window.
Diffstat (limited to 'OpenSim/Region/Communications/Local/CommunicationsLocal.cs')
-rw-r--r-- | OpenSim/Region/Communications/Local/CommunicationsLocal.cs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index 3ad33f4..e2a953c 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs | |||
@@ -32,23 +32,32 @@ using OpenSim.Framework.Servers; | |||
32 | using OpenSim.Framework.Communications.Caches; | 32 | using OpenSim.Framework.Communications.Caches; |
33 | using OpenSim.Framework.Console; | 33 | using OpenSim.Framework.Console; |
34 | using OpenSim.Framework.Utilities; | 34 | using OpenSim.Framework.Utilities; |
35 | using OpenSim.Framework.Data; | ||
35 | 36 | ||
36 | namespace OpenSim.Region.Communications.Local | 37 | namespace OpenSim.Region.Communications.Local |
37 | { | 38 | { |
38 | public class CommunicationsLocal : CommunicationsManager | 39 | public class CommunicationsLocal : CommunicationsManager |
39 | { | 40 | { |
40 | public LocalBackEndServices InstanceServices = new LocalBackEndServices(); | 41 | public LocalBackEndServices InstanceServices; |
41 | public LocalUserServices UserServices; | 42 | public LocalUserServices UserServices; |
42 | public LocalLoginService LoginServices; | 43 | public LocalLoginService LoginServices; |
44 | public LocalInventoryService InvenServices; | ||
43 | 45 | ||
44 | public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, bool accountsAuthenticate, string welcomeMessage ) | 46 | public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, bool accountsAuthenticate, string welcomeMessage ) |
45 | : base(serversInfo, httpServer, assetCache) | 47 | : base(serversInfo, httpServer, assetCache) |
46 | { | 48 | { |
49 | InvenServices = new LocalInventoryService(); | ||
50 | InvenServices.AddPlugin("OpenSim.Framework.Data.SQLite.dll"); | ||
51 | InventoryServer = InvenServices; | ||
52 | |||
47 | UserServices = new LocalUserServices(this, serversInfo); | 53 | UserServices = new LocalUserServices(this, serversInfo); |
48 | UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll"); | 54 | UserServices.AddPlugin("OpenSim.Framework.Data.DB4o.dll"); |
49 | UserServer = UserServices; | 55 | UserServer = UserServices; |
56 | |||
57 | InstanceServices = new LocalBackEndServices(); | ||
50 | GridServer = InstanceServices; | 58 | GridServer = InstanceServices; |
51 | InterRegion = InstanceServices; | 59 | InterRegion = InstanceServices; |
60 | |||
52 | LoginServices = new LocalLoginService(UserServices, welcomeMessage, this, serversInfo, accountsAuthenticate); | 61 | LoginServices = new LocalLoginService(UserServices, welcomeMessage, this, serversInfo, accountsAuthenticate); |
53 | httpServer.AddXmlRPCHandler("login_to_simulator", LoginServices.XmlRpcLoginMethod); | 62 | httpServer.AddXmlRPCHandler("login_to_simulator", LoginServices.XmlRpcLoginMethod); |
54 | } | 63 | } |
@@ -78,6 +87,12 @@ namespace OpenSim.Region.Communications.Local | |||
78 | tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + ""); | 87 | tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + ""); |
79 | 88 | ||
80 | this.UserServices.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); | 89 | this.UserServices.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); |
90 | UserProfileData userProf = this.UserServer.GetUserProfile(tempfirstname, templastname); | ||
91 | if (userProf != null) | ||
92 | { | ||
93 | this.InvenServices.CreateNewUserInventory(userProf.UUID); | ||
94 | Console.WriteLine("created new inventory set for " + tempfirstname + " " + templastname); | ||
95 | } | ||
81 | break; | 96 | break; |
82 | } | 97 | } |
83 | } | 98 | } |