From 906526bb9a28898771592fca12758ef19c19e56e Mon Sep 17 00:00:00 2001 From: gareth Date: Mon, 2 Apr 2007 11:41:45 +0000 Subject: [PATCH] Finished adding Db4o support to user profile manager --- .../OpenGridServices.UserServer.exe.build | 1 + .../OpenSim.Config.SimConfigDb4o.dll.build | 1 - OpenSim.Framework/OpenSim.Framework.dll.build | 1 + OpenSim.Framework/UserProfileManagerBase.cs | 15 ++++++++---- ...OpenSim.Storage.LocalStorageDb4o.dll.build | 1 + OpenSim.build | 1 - prebuild.xml | 23 ++----------------- 7 files changed, 16 insertions(+), 27 deletions(-) diff --git a/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build b/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build index 7ab3ed5f9d..fd1be1543a 100644 --- a/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build +++ b/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build @@ -26,6 +26,7 @@ + diff --git a/OpenSim.Config/SimConfigDb4o/OpenSim.Config.SimConfigDb4o.dll.build b/OpenSim.Config/SimConfigDb4o/OpenSim.Config.SimConfigDb4o.dll.build index 085dc5538d..fd22f7d64f 100644 --- a/OpenSim.Config/SimConfigDb4o/OpenSim.Config.SimConfigDb4o.dll.build +++ b/OpenSim.Config/SimConfigDb4o/OpenSim.Config.SimConfigDb4o.dll.build @@ -13,7 +13,6 @@ - diff --git a/OpenSim.Framework/OpenSim.Framework.dll.build b/OpenSim.Framework/OpenSim.Framework.dll.build index 417fa0c6d6..43f4542ba5 100644 --- a/OpenSim.Framework/OpenSim.Framework.dll.build +++ b/OpenSim.Framework/OpenSim.Framework.dll.build @@ -45,6 +45,7 @@ + diff --git a/OpenSim.Framework/UserProfileManagerBase.cs b/OpenSim.Framework/UserProfileManagerBase.cs index 218a98cd67..73f325d9d6 100644 --- a/OpenSim.Framework/UserProfileManagerBase.cs +++ b/OpenSim.Framework/UserProfileManagerBase.cs @@ -4,6 +4,7 @@ using System.Text; using libsecondlife; using OpenSim.Framework.Utilities; using OpenSim.Framework.Inventory; +using Db4objects.Db4o; namespace OpenSim.Framework.User { @@ -12,13 +13,19 @@ namespace OpenSim.Framework.User public Dictionary UserProfiles = new Dictionary(); - public UserProfileManagerBase() - { - } + public UserProfileManagerBase() { + } public virtual void InitUserProfiles() { - // TODO: need to load from database + IObjectContainer db; + db = Db4oFactory.OpenFile("userprofiles.yap"); + IObjectSet result = db.Get(typeof(UserProfile)); + foreach (UserProfile userprof in result) { + UserProfiles.Add(userprof.UUID, userprof); + } + Console.WriteLine("UserProfiles.Cs:InitUserProfiles() - Successfully loaded " + result.Count.ToString() + " from database"); + db.Close(); } public UserProfile GetProfileByName(string firstname, string lastname) diff --git a/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build b/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build index c9ae6609ec..439f440097 100644 --- a/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build +++ b/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build @@ -13,6 +13,7 @@ + diff --git a/OpenSim.build b/OpenSim.build index 3d090749e1..3472aaad77 100644 --- a/OpenSim.build +++ b/OpenSim.build @@ -68,7 +68,6 @@ - diff --git a/prebuild.xml b/prebuild.xml index 024102cbd0..59a90e0284 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -50,6 +50,7 @@ + @@ -74,27 +75,6 @@ - - - - ../bin/ - - - - - ../bin/ - - - - ../bin/ - - - - - - - - @@ -167,6 +147,7 @@ +