aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Framework
diff options
context:
space:
mode:
authorgareth2007-04-02 11:41:45 +0000
committergareth2007-04-02 11:41:45 +0000
commit906526bb9a28898771592fca12758ef19c19e56e (patch)
treef38b928b570e820442366f4b8d6de9f7c3146ee0 /OpenSim.Framework
parentMoved database storage of the world map to the Db4LocalStorage so its in the ... (diff)
downloadopensim-SC_OLD-906526bb9a28898771592fca12758ef19c19e56e.zip
opensim-SC_OLD-906526bb9a28898771592fca12758ef19c19e56e.tar.gz
opensim-SC_OLD-906526bb9a28898771592fca12758ef19c19e56e.tar.bz2
opensim-SC_OLD-906526bb9a28898771592fca12758ef19c19e56e.tar.xz
Finished adding Db4o support to user profile manager
Diffstat (limited to 'OpenSim.Framework')
-rw-r--r--OpenSim.Framework/OpenSim.Framework.dll.build1
-rw-r--r--OpenSim.Framework/UserProfileManagerBase.cs15
2 files changed, 12 insertions, 4 deletions
diff --git a/OpenSim.Framework/OpenSim.Framework.dll.build b/OpenSim.Framework/OpenSim.Framework.dll.build
index 417fa0c..43f4542 100644
--- a/OpenSim.Framework/OpenSim.Framework.dll.build
+++ b/OpenSim.Framework/OpenSim.Framework.dll.build
@@ -45,6 +45,7 @@
45 <include name="System.dll" /> 45 <include name="System.dll" />
46 <include name="System.Xml.dll" /> 46 <include name="System.Xml.dll" />
47 <include name="../bin/libsecondlife.dll" /> 47 <include name="../bin/libsecondlife.dll" />
48 <include name="../bin/Db4objects.Db4o.dll" />
48 </references> 49 </references>
49 </csc> 50 </csc>
50 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" /> 51 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" />
diff --git a/OpenSim.Framework/UserProfileManagerBase.cs b/OpenSim.Framework/UserProfileManagerBase.cs
index 218a98c..73f325d 100644
--- a/OpenSim.Framework/UserProfileManagerBase.cs
+++ b/OpenSim.Framework/UserProfileManagerBase.cs
@@ -4,6 +4,7 @@ using System.Text;
4using libsecondlife; 4using libsecondlife;
5using OpenSim.Framework.Utilities; 5using OpenSim.Framework.Utilities;
6using OpenSim.Framework.Inventory; 6using OpenSim.Framework.Inventory;
7using Db4objects.Db4o;
7 8
8namespace OpenSim.Framework.User 9namespace OpenSim.Framework.User
9{ 10{
@@ -12,13 +13,19 @@ namespace OpenSim.Framework.User
12 13
13 public Dictionary<LLUUID, UserProfile> UserProfiles = new Dictionary<LLUUID, UserProfile>(); 14 public Dictionary<LLUUID, UserProfile> UserProfiles = new Dictionary<LLUUID, UserProfile>();
14 15
15 public UserProfileManagerBase() 16 public UserProfileManagerBase() {
16 { 17 }
17 }
18 18
19 public virtual void InitUserProfiles() 19 public virtual void InitUserProfiles()
20 { 20 {
21 // TODO: need to load from database 21 IObjectContainer db;
22 db = Db4oFactory.OpenFile("userprofiles.yap");
23 IObjectSet result = db.Get(typeof(UserProfile));
24 foreach (UserProfile userprof in result) {
25 UserProfiles.Add(userprof.UUID, userprof);
26 }
27 Console.WriteLine("UserProfiles.Cs:InitUserProfiles() - Successfully loaded " + result.Count.ToString() + " from database");
28 db.Close();
22 } 29 }
23 30
24 public UserProfile GetProfileByName(string firstname, string lastname) 31 public UserProfile GetProfileByName(string firstname, string lastname)