aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Framework/UserProfileManagerBase.cs
diff options
context:
space:
mode:
authorgareth2007-04-02 11:41:45 +0000
committergareth2007-04-02 11:41:45 +0000
commit906526bb9a28898771592fca12758ef19c19e56e (patch)
treef38b928b570e820442366f4b8d6de9f7c3146ee0 /OpenSim.Framework/UserProfileManagerBase.cs
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/UserProfileManagerBase.cs')
-rw-r--r--OpenSim.Framework/UserProfileManagerBase.cs15
1 files changed, 11 insertions, 4 deletions
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)