aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices.GridServer/SimProfiles.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenGridServices.GridServer/SimProfiles.cs13
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenGridServices.GridServer/SimProfiles.cs b/OpenGridServices.GridServer/SimProfiles.cs
index 253c2d4..7aff434 100644
--- a/OpenGridServices.GridServer/SimProfiles.cs
+++ b/OpenGridServices.GridServer/SimProfiles.cs
@@ -33,7 +33,9 @@ using System.Collections;
33using System.Collections.Generic; 33using System.Collections.Generic;
34using libsecondlife; 34using libsecondlife;
35using OpenSim.Framework.Utilities; 35using OpenSim.Framework.Utilities;
36using OpenSim.Framework.Console;
36using OpenSim.Framework.Sims; 37using OpenSim.Framework.Sims;
38using Db4objects.Db4o;
37 39
38namespace OpenGridServices.GridServer 40namespace OpenGridServices.GridServer
39{ 41{
@@ -46,8 +48,15 @@ namespace OpenGridServices.GridServer
46 public SimProfileManager() { 48 public SimProfileManager() {
47 } 49 }
48 50
49 public void InitSimProfiles() { 51 public void LoadProfiles() { // should abstract this out
50 // TODO: need to load from database 52 IObjectContainer db;
53 db = Db4oFactory.OpenFile("simprofiles.yap");
54 IObjectSet result = db.Get(typeof(SimProfileBase));
55 foreach (SimProfileBase simprof in result) {
56 SimProfiles.Add(simprof.UUID, simprof);
57 }
58 MainConsole.Instance.WriteLine("SimProfiles.Cs:LoadProfiles() - Successfully loaded " + result.Count.ToString() + " from database");
59 db.Close();
51 } 60 }
52 61
53 public SimProfileBase GetProfileByHandle(ulong reqhandle) { 62 public SimProfileBase GetProfileByHandle(ulong reqhandle) {