diff options
author | gareth | 2007-04-02 00:48:25 +0000 |
---|---|---|
committer | gareth | 2007-04-02 00:48:25 +0000 |
commit | e985e05a5ad7df4c5f01763dfe6b82cc1b37ab83 (patch) | |
tree | 7b07b8fae3ade588d11cdeeabf1f2479e80a8dff /OpenGridServices.GridServer/SimProfiles.cs | |
parent | More refactoring (diff) | |
download | opensim-SC_OLD-e985e05a5ad7df4c5f01763dfe6b82cc1b37ab83.zip opensim-SC_OLD-e985e05a5ad7df4c5f01763dfe6b82cc1b37ab83.tar.gz opensim-SC_OLD-e985e05a5ad7df4c5f01763dfe6b82cc1b37ab83.tar.bz2 opensim-SC_OLD-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 '')
-rw-r--r-- | OpenGridServices.GridServer/SimProfiles.cs | 13 |
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; | |||
33 | using System.Collections.Generic; | 33 | using System.Collections.Generic; |
34 | using libsecondlife; | 34 | using libsecondlife; |
35 | using OpenSim.Framework.Utilities; | 35 | using OpenSim.Framework.Utilities; |
36 | using OpenSim.Framework.Console; | ||
36 | using OpenSim.Framework.Sims; | 37 | using OpenSim.Framework.Sims; |
38 | using Db4objects.Db4o; | ||
37 | 39 | ||
38 | namespace OpenGridServices.GridServer | 40 | namespace 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) { |