aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices.GridServer/SimProfiles.cs
diff options
context:
space:
mode:
authorgareth2007-04-02 00:48:25 +0000
committergareth2007-04-02 00:48:25 +0000
commite985e05a5ad7df4c5f01763dfe6b82cc1b37ab83 (patch)
tree7b07b8fae3ade588d11cdeeabf1f2479e80a8dff /OpenGridServices.GridServer/SimProfiles.cs
parentMore refactoring (diff)
downloadopensim-SC-e985e05a5ad7df4c5f01763dfe6b82cc1b37ab83.zip
opensim-SC-e985e05a5ad7df4c5f01763dfe6b82cc1b37ab83.tar.gz
opensim-SC-e985e05a5ad7df4c5f01763dfe6b82cc1b37ab83.tar.bz2
opensim-SC-e985e05a5ad7df4c5f01763dfe6b82cc1b37ab83.tar.xz
Added new REST protocol (partially complete)
Made sim profiles load from DB Updated build files for grid server Added sim login
Diffstat (limited to 'OpenGridServices.GridServer/SimProfiles.cs')
-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) {