From 0c78fc3dbcb6414fe39afcf175a73bc1107c1910 Mon Sep 17 00:00:00 2001
From: Adam Frisby
Date: Fri, 4 May 2007 06:51:18 +0000
Subject: Grid server V2.0! Now with extra crunchy SQL support. Status: *
Prebuild will be broken, someone needs to update prebuild.xml with the new
dependencies. * The sim status check function does not yet function. * Sims
must be manually added to the database - automatic insertion isnt supported
yet.
---
OpenGrid.Framework.Data.MySQL/MySQLGridData.cs | 10 ++++++++++
OpenGrid.Framework.Data/GridData.cs | 2 ++
OpenGrid.Framework.Data/SimProfileData.cs | 8 ++++++++
OpenGridServices.GridServer/Main.cs | 24 +++++++++++++++---------
OpenSim.Framework/SimProfileBase.cs | 3 +++
5 files changed, 38 insertions(+), 9 deletions(-)
diff --git a/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs b/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
index 3db32f3..0a84cdb 100644
--- a/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
+++ b/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
@@ -25,6 +25,16 @@ namespace OpenGrid.Framework.Data.MySQL
database.Close();
}
+ public string getName()
+ {
+ return "MySql OpenGridData";
+ }
+
+ public string getVersion()
+ {
+ return "0.1";
+ }
+
///
/// Returns a sim profile from it's location
///
diff --git a/OpenGrid.Framework.Data/GridData.cs b/OpenGrid.Framework.Data/GridData.cs
index 8ace484..d6b5a2b 100644
--- a/OpenGrid.Framework.Data/GridData.cs
+++ b/OpenGrid.Framework.Data/GridData.cs
@@ -11,5 +11,7 @@ namespace OpenGrid.Framework.Data
bool AuthenticateSim(libsecondlife.LLUUID UUID, ulong regionHandle, string simrecvkey);
void Initialise();
void Close();
+ string getName();
+ string getVersion();
}
}
diff --git a/OpenGrid.Framework.Data/SimProfileData.cs b/OpenGrid.Framework.Data/SimProfileData.cs
index a701875..4cc9982 100644
--- a/OpenGrid.Framework.Data/SimProfileData.cs
+++ b/OpenGrid.Framework.Data/SimProfileData.cs
@@ -61,5 +61,13 @@ namespace OpenGrid.Framework.Data
///
/// Used for floating sim pools where the region data is not nessecarily coupled to a specific server
public string regionDataURI;
+
+ public string regionAssetURI;
+ public string regionAssetSendKey;
+ public string regionAssetRecvKey;
+
+ public string regionUserURI;
+ public string regionUserSendKey;
+ public string regionUserRecvKey;
}
}
diff --git a/OpenGridServices.GridServer/Main.cs b/OpenGridServices.GridServer/Main.cs
index 69cba9c..f7cfe71 100644
--- a/OpenGridServices.GridServer/Main.cs
+++ b/OpenGridServices.GridServer/Main.cs
@@ -53,7 +53,9 @@ namespace OpenGridServices.GridServer
//public LLUUID highestUUID;
- private SimProfileManager m_simProfileManager;
+// private SimProfileManager m_simProfileManager;
+
+ private GridManager m_gridManager;
private ConsoleBase m_console;
@@ -82,6 +84,8 @@ namespace OpenGridServices.GridServer
{
m_console = new ConsoleBase("opengrid-gridserver-console.log", "OpenGrid", this, false);
MainConsole.Instance = m_console;
+
+
}
public void Startup()
@@ -90,19 +94,19 @@ namespace OpenGridServices.GridServer
Cfg = this.LoadConfigDll(this.ConfigDll);
Cfg.InitConfig();
- m_console.WriteLine("Main.cs:Startup() - Loading sim profiles from database");
- m_simProfileManager = new SimProfileManager( this );
- m_simProfileManager.LoadProfiles();
+ m_console.WriteLine("Main.cs:Startup() - Connecting to MySql Server");
+ m_gridManager = new GridManager();
+ m_gridManager.AddPlugin("OpenGrid.Framework.Data.MySQL.dll"); // Made of win
m_console.WriteLine("Main.cs:Startup() - Starting HTTP process");
BaseHttpServer httpServer = new BaseHttpServer(8001);
- httpServer.AddXmlRPCHandler("simulator_login", m_simProfileManager.XmlRpcLoginToSimulatorMethod);
+ httpServer.AddXmlRPCHandler("simulator_login", m_gridManager.XmlRpcLoginToSimulatorMethod);
- httpServer.AddRestHandler("GET", "/sims/", m_simProfileManager.RestGetSimMethod);
- httpServer.AddRestHandler("POST", "/sims/", m_simProfileManager.RestSetSimMethod);
- httpServer.AddRestHandler("GET", "/regions/", m_simProfileManager.RestGetRegionMethod);
- httpServer.AddRestHandler("POST", "/regions/", m_simProfileManager.RestSetRegionMethod);
+ httpServer.AddRestHandler("GET", "/sims/", m_gridManager.RestGetSimMethod);
+ httpServer.AddRestHandler("POST", "/sims/", m_gridManager.RestSetSimMethod);
+ httpServer.AddRestHandler("GET", "/regions/", m_gridManager.RestGetRegionMethod);
+ httpServer.AddRestHandler("POST", "/regions/", m_gridManager.RestSetRegionMethod);
// lbsa71 : This code snippet taken from old http server.
@@ -158,6 +162,7 @@ namespace OpenGridServices.GridServer
public void CheckSims(object sender, ElapsedEventArgs e)
{
+ /*
foreach (SimProfileBase sim in m_simProfileManager.SimProfiles.Values)
{
string SimResponse = "";
@@ -189,6 +194,7 @@ namespace OpenGridServices.GridServer
m_simProfileManager.SimProfiles[sim.UUID].online = false;
}
}
+ */
}
public void RunCmd(string cmd, string[] cmdparams)
diff --git a/OpenSim.Framework/SimProfileBase.cs b/OpenSim.Framework/SimProfileBase.cs
index ffc66ec..cea21f0 100644
--- a/OpenSim.Framework/SimProfileBase.cs
+++ b/OpenSim.Framework/SimProfileBase.cs
@@ -5,6 +5,9 @@ using libsecondlife;
namespace OpenSim.Framework.Sims
{
+ ///
+ /// Depreciated
+ ///
public class SimProfileBase
{
public LLUUID UUID;
--
cgit v1.1