From 5c7ffdde0b9642a42e8f5987e06eb01220ff7776 Mon Sep 17 00:00:00 2001
From: Adam Frisby
Date: Wed, 11 Jul 2007 08:02:47 +0000
Subject: * Wiping trunk in prep for Sugilite
---
.../OpenGrid.Config/GridConfigDb4o/AssemblyInfo.cs | 58 --
.../OpenGrid.Config/GridConfigDb4o/DbGridConfig.cs | 161 -----
.../OpenGrid.Config.GridConfigDb4o.csproj | 107 ----
.../OpenGrid.Config.GridConfigDb4o.dll.build | 46 --
.../OpenGrid.Framework.Data.DB4o/DB4oGridData.cs | 161 -----
.../OpenGrid.Framework.Data.DB4o/DB4oManager.cs | 165 -----
.../OpenGrid.Framework.Data.DB4o/DB4oUserData.cs | 205 -------
.../OpenGrid.Framework.Data.DB4o.csproj | 111 ----
.../OpenGrid.Framework.Data.DB4o.dll.build | 47 --
.../Properties/AssemblyInfo.cs | 35 --
.../OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs | 190 ------
.../OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs | 214 -------
.../OpenGrid.Framework.Data.MSSQL.csproj | 104 ----
.../OpenGrid.Framework.Data.MSSQL.dll.build | 45 --
.../Properties/AssemblyInfo.cs | 35 --
.../OpenGrid.Framework.Data.MySQL/MySQLGridData.cs | 258 --------
.../MySQLInventoryData.cs | 309 ----------
.../OpenGrid.Framework.Data.MySQL/MySQLLogData.cs | 107 ----
.../OpenGrid.Framework.Data.MySQL/MySQLManager.cs | 665 ---------------------
.../OpenGrid.Framework.Data.MySQL/MySQLUserData.cs | 271 ---------
.../OpenGrid.Framework.Data.MySQL.csproj | 117 ----
.../OpenGrid.Framework.Data.MySQL.dll.build | 49 --
.../Properties/AssemblyInfo.cs | 35 --
.../OpenGrid.Framework.Data.SQLite.csproj | 108 ----
.../OpenGrid.Framework.Data.SQLite.dll.build | 46 --
.../Properties/AssemblyInfo.cs | 35 --
.../SQLiteGridData.cs | 190 ------
.../SQLiteManager.cs | 209 -------
.../OpenGrid.Framework.Data/GridData.cs | 110 ----
.../OpenGrid.Framework.Data/ILogData.cs | 94 ---
.../OpenGrid.Framework.Data/IniConfig.cs | 100 ----
.../OpenGrid.Framework.Data/InventoryData.cs | 187 ------
.../OpenGrid.Framework.Data.csproj | 113 ----
.../OpenGrid.Framework.Data.dll.build | 49 --
.../Properties/AssemblyInfo.cs | 35 --
.../OpenGrid.Framework.Data/SimProfileData.cs | 114 ----
.../OpenGrid.Framework.Data/UserData.cs | 131 ----
.../OpenGrid.Framework.Data/UserProfileData.cs | 182 ------
.../GridManagementAgent.cs | 140 -----
.../GridServerManager.cs | 94 ---
.../OpenGrid.Framework.Manager.csproj | 99 ---
.../OpenGrid.Framework.Manager.dll.build | 44 --
.../AssetHttpServer.cs | 130 ----
.../OpenGridServices.AssetServer/Main.cs | 338 -----------
.../OpenGridServices.AssetServer.csproj | 122 ----
.../OpenGridServices.AssetServer.exe.build | 50 --
.../OpenGridServices.GridServer.csproj | 126 ----
.../OpenGridServices.GridServer.exe.build | 49 --
.../Properties/AssemblyInfo.cs | 33 -
.../OpenGridServices.GridServer/GridManager.cs | 589 ------------------
.../OpenGridServices.GridServer/Main.cs | 271 ---------
.../OpenGridServices.GridServer.csproj | 134 -----
.../OpenGridServices.GridServer.exe.build | 52 --
.../Properties/AssemblyInfo.cs | 33 -
.../InventoryManager.cs | 126 ----
.../OpenGridServices.InventoryServer/Main.cs | 87 ---
.../OpenGridServices.InventoryServer.csproj | 125 ----
.../OpenGridServices.InventoryServer.csproj.user | 12 -
.../OpenGridServices.InventoryServer.exe.build | 50 --
.../OpenGridServices.Manager.mds | 16 -
.../OpenGridServices.Manager.userprefs | 39 --
.../OpenGridServices.Manager.usertasks | 2 -
.../OpenGridServices.Manager/AssemblyInfo.cs | 32 -
.../OpenGridServices.Manager/BlockingQueue.cs | 33 -
.../Connect to grid server.cs | 16 -
.../ConnectToGridServerDialog.cs | 29 -
.../GridServerConnectionManager.cs | 106 ----
.../OpenGridServices.Manager/Main.cs | 96 ---
.../OpenGridServices.Manager/MainWindow.cs | 76 ---
.../OpenGridServices.Manager.mdp | 43 --
.../OpenGridServices.Manager.pidb | Bin 12308 -> 0 bytes
.../OpenGridServices.Manager/RegionBlock.cs | 37 --
.../OpenGridServices.Manager/Util.cs | 133 -----
...idServices.Manager.ConnectToGridServerDialog.cs | 226 -------
.../gtk-gui/OpenGridServices.Manager.MainWindow.cs | 256 --------
.../OpenGridServices.Manager/gtk-gui/generated.cs | 35 --
.../OpenGridServices.Manager/gtk-gui/gui.stetic | 502 ----------------
.../OpenGridServices.UserServer/Main.cs | 216 -------
.../OGS-UserServer.csproj | 63 --
.../OpenGridServices.UserServer.csproj | 128 ----
.../OpenGridServices.UserServer.exe.build | 51 --
.../Properties/AssemblyInfo.cs | 33 -
.../OpenGridServices.UserServer/UserManager.cs | 660 --------------------
.../OpenUser.Config/UserConfigDb4o/AssemblyInfo.cs | 58 --
.../OpenUser.Config/UserConfigDb4o/DbUserConfig.cs | 96 ---
.../OpenUser.Config.UserConfigDb4o.csproj | 107 ----
.../OpenUser.Config.UserConfigDb4o.dll.build | 46 --
OpenGridServices/ServiceManager/ServiceManager.cs | 259 --------
.../ServiceManager/ServiceManager.csproj | 107 ----
.../ServiceManager/ServiceManager.exe.build | 44 --
90 files changed, 11447 deletions(-)
delete mode 100644 OpenGridServices/OpenGrid.Config/GridConfigDb4o/AssemblyInfo.cs
delete mode 100644 OpenGridServices/OpenGrid.Config/GridConfigDb4o/DbGridConfig.cs
delete mode 100644 OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.csproj
delete mode 100644 OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oManager.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.DB4o/Properties/AssemblyInfo.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.csproj
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.dll.build
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.MSSQL/Properties/AssemblyInfo.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLInventoryData.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLLogData.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLUserData.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.MySQL/Properties/AssemblyInfo.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.dll.build
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.SQLite/Properties/AssemblyInfo.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteGridData.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/GridData.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/ILogData.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/IniConfig.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/InventoryData.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/SimProfileData.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/UserData.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Data/UserProfileData.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs
delete mode 100644 OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj
delete mode 100644 OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build
delete mode 100644 OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs
delete mode 100644 OpenGridServices/OpenGridServices.AssetServer/Main.cs
delete mode 100644 OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj
delete mode 100644 OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build
delete mode 100644 OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.csproj
delete mode 100644 OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.exe.build
delete mode 100644 OpenGridServices/OpenGridServices.AssetServer/Properties/AssemblyInfo.cs
delete mode 100644 OpenGridServices/OpenGridServices.GridServer/GridManager.cs
delete mode 100644 OpenGridServices/OpenGridServices.GridServer/Main.cs
delete mode 100644 OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.csproj
delete mode 100644 OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build
delete mode 100644 OpenGridServices/OpenGridServices.GridServer/Properties/AssemblyInfo.cs
delete mode 100644 OpenGridServices/OpenGridServices.InventoryServer/InventoryManager.cs
delete mode 100644 OpenGridServices/OpenGridServices.InventoryServer/Main.cs
delete mode 100644 OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj
delete mode 100644 OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj.user
delete mode 100644 OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.exe.build
delete mode 100644 OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.mds
delete mode 100644 OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.userprefs
delete mode 100644 OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.usertasks
delete mode 100644 OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/AssemblyInfo.cs
delete mode 100644 OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/BlockingQueue.cs
delete mode 100644 OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Connect to grid server.cs
delete mode 100644 OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs
delete mode 100644 OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs
delete mode 100644 OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Main.cs
delete mode 100644 OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/MainWindow.cs
delete mode 100644 OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.mdp
delete mode 100644 OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.pidb
delete mode 100644 OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs
delete mode 100644 OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Util.cs
delete mode 100644 OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs
delete mode 100644 OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs
delete mode 100644 OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/generated.cs
delete mode 100644 OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/gui.stetic
delete mode 100644 OpenGridServices/OpenGridServices.UserServer/Main.cs
delete mode 100644 OpenGridServices/OpenGridServices.UserServer/OGS-UserServer.csproj
delete mode 100644 OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj
delete mode 100644 OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build
delete mode 100644 OpenGridServices/OpenGridServices.UserServer/Properties/AssemblyInfo.cs
delete mode 100644 OpenGridServices/OpenGridServices.UserServer/UserManager.cs
delete mode 100644 OpenGridServices/OpenUser.Config/UserConfigDb4o/AssemblyInfo.cs
delete mode 100644 OpenGridServices/OpenUser.Config/UserConfigDb4o/DbUserConfig.cs
delete mode 100644 OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj
delete mode 100644 OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build
delete mode 100644 OpenGridServices/ServiceManager/ServiceManager.cs
delete mode 100644 OpenGridServices/ServiceManager/ServiceManager.csproj
delete mode 100644 OpenGridServices/ServiceManager/ServiceManager.exe.build
(limited to 'OpenGridServices')
diff --git a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Config/GridConfigDb4o/AssemblyInfo.cs
deleted file mode 100644
index c9701d6..0000000
--- a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/AssemblyInfo.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// Information about this assembly is defined by the following
-// attributes.
-//
-// change them to the information which is associated with the assembly
-// you compile.
-
-[assembly: AssemblyTitle("GridConfig")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("GridConfig")]
-[assembly: AssemblyCopyright("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// This sets the default COM visibility of types in the assembly to invisible.
-// If you need to expose a type to COM, use [ComVisible(true)] on that type.
-[assembly: ComVisible(false)]
-
-// The assembly version has following format :
-//
-// Major.Minor.Build.Revision
-//
-// You can specify all values by your own or you can build default build and revision
-// numbers with the '*' character (the default):
-
-[assembly: AssemblyVersion("1.0.*")]
diff --git a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/DbGridConfig.cs b/OpenGridServices/OpenGrid.Config/GridConfigDb4o/DbGridConfig.cs
deleted file mode 100644
index e69515a..0000000
--- a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/DbGridConfig.cs
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using OpenSim.Framework.Console;
-using OpenSim.Framework.Interfaces;
-using Db4objects.Db4o;
-
-namespace OpenGrid.Config.GridConfigDb4o
-{
- ///
- /// A grid configuration interface for returning the DB4o Config Provider
- ///
- public class Db40ConfigPlugin: IGridConfig
- {
- ///
- /// Loads and returns a configuration objeect
- ///
- /// A grid configuration object
- public GridConfig GetConfigObject()
- {
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Loading Db40Config dll");
- return ( new DbGridConfig());
- }
- }
-
- ///
- /// A DB4o based Gridserver configuration object
- ///
- public class DbGridConfig : GridConfig
- {
- ///
- /// The DB4o Database
- ///
- private IObjectContainer db;
-
- ///
- /// User configuration for the Grid Config interfaces
- ///
- public void LoadDefaults() {
- OpenSim.Framework.Console.MainConsole.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
-
- // About the grid options
- this.GridOwner = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid owner", "OGS development team");
-
- // Asset Options
- this.DefaultAssetServer = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default asset server","http://127.0.0.1:8003/");
- this.AssetSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to asset server","null");
- this.AssetRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from asset server","null");
-
- // User Server Options
- this.DefaultUserServer = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default user server","http://127.0.0.1:8002/");
- this.UserSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to user server","null");
- this.UserRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from user server","null");
-
- // Region Server Options
- this.SimSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to sims","null");
- this.SimRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from sims","null");
- }
-
- ///
- /// Initialises a new configuration object
- ///
- public override void InitConfig() {
- try {
- // Perform Db4o initialisation
- db = Db4oFactory.OpenFile("opengrid.yap");
-
- // Locate the grid configuration object
- IObjectSet result = db.Get(typeof(DbGridConfig));
- // Found?
- if(result.Count==1) {
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Config.cs:InitConfig() - Found a GridConfig object in the local database, loading");
- foreach (DbGridConfig cfg in result) {
- // Import each setting into this class
- // Grid Settings
- this.GridOwner=cfg.GridOwner;
- // Asset Settings
- this.DefaultAssetServer=cfg.DefaultAssetServer;
- this.AssetSendKey=cfg.AssetSendKey;
- this.AssetRecvKey=cfg.AssetRecvKey;
- // User Settings
- this.DefaultUserServer=cfg.DefaultUserServer;
- this.UserSendKey=cfg.UserSendKey;
- this.UserRecvKey=cfg.UserRecvKey;
- // Region Settings
- this.SimSendKey=cfg.SimSendKey;
- this.SimRecvKey=cfg.SimRecvKey;
- }
- // Create a new configuration object from this class
- } else {
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults");
-
- // Load default settings into this class
- LoadDefaults();
-
- // Saves to the database file...
- OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Writing out default settings to local database");
- db.Set(this);
-
- // Closes file locks
- db.Close();
- }
- } catch(Exception e) {
- OpenSim.Framework.Console.MainConsole.Instance.Warn("Config.cs:InitConfig() - Exception occured");
- OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString());
- }
-
- // Grid Settings
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Grid settings loaded:");
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Grid owner: " + this.GridOwner);
-
- // Asset Settings
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Default asset server: " + this.DefaultAssetServer);
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Key to send to asset server: " + this.AssetSendKey);
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Key to expect from asset server: " + this.AssetRecvKey);
-
- // User Settings
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Default user server: " + this.DefaultUserServer);
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Key to send to user server: " + this.UserSendKey);
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Key to expect from user server: " + this.UserRecvKey);
-
- // Region Settings
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Key to send to sims: " + this.SimSendKey);
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Key to expect from sims: " + this.SimRecvKey);
- }
-
- ///
- /// Closes down the database and releases filesystem locks
- ///
- public void Shutdown() {
- db.Close();
- }
- }
-
-}
diff --git a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.csproj b/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.csproj
deleted file mode 100644
index ddb48af..0000000
--- a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.csproj
+++ /dev/null
@@ -1,107 +0,0 @@
-
-
- Local
- 8.0.50727
- 2.0
- {B0027747-0000-0000-0000-000000000000}
- Debug
- AnyCPU
-
-
-
- OpenGrid.Config.GridConfigDb4o
- JScript
- Grid
- IE50
- false
- Library
-
- OpenGrid.Config.GridConfigDb4o
-
-
-
-
-
- False
- 285212672
- False
-
-
- TRACE;DEBUG
-
- True
- 4096
- False
- ..\..\..\bin\
- False
- False
- False
- 4
-
-
-
- False
- 285212672
- False
-
-
- TRACE
-
- False
- 4096
- True
- ..\..\..\bin\
- False
- False
- False
- 4
-
-
-
-
- ..\..\..\bin\Db4objects.Db4o.dll
- False
-
-
- ..\..\..\bin\libsecondlife.dll
- False
-
-
- OpenSim.Framework.dll
- False
-
-
- OpenSim.Framework.Console.dll
- False
-
-
- System.dll
- False
-
-
- ..\..\..\bin\System.Data.dll
- False
-
-
- System.Xml.dll
- False
-
-
-
-
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build b/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build
deleted file mode 100644
index 075593b..0000000
--- a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs b/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs
deleted file mode 100644
index 2b23131..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using OpenGrid.Framework.Data;
-using libsecondlife;
-
-
-namespace OpenGrid.Framework.Data.DB4o
-{
- ///
- /// A grid server storage mechanism employing the DB4o database system
- ///
- class DB4oGridData : IGridData
- {
- ///
- /// The database manager object
- ///
- DB4oGridManager manager;
-
- ///
- /// Called when the plugin is first loaded (as constructors are not called)
- ///
- public void Initialise() {
- manager = new DB4oGridManager("gridserver.yap");
- }
-
- ///
- /// Returns a list of regions within the specified ranges
- ///
- /// minimum X coordinate
- /// minimum Y coordinate
- /// maximum X coordinate
- /// maximum Y coordinate
- /// An array of region profiles
- public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d)
- {
- return null;
- }
-
- ///
- /// Returns a region located at the specified regionHandle (warning multiple regions may occupy the one spot, first found is returned)
- ///
- /// The handle to search for
- /// A region profile
- public SimProfileData GetProfileByHandle(ulong handle) {
- lock (manager.simProfiles)
- {
- foreach (LLUUID UUID in manager.simProfiles.Keys)
- {
- if (manager.simProfiles[UUID].regionHandle == handle)
- {
- return manager.simProfiles[UUID];
- }
- }
- }
- throw new Exception("Unable to find profile with handle (" + handle.ToString() + ")");
- }
-
- ///
- /// Returns a specific region
- ///
- /// The region ID code
- /// A region profile
- public SimProfileData GetProfileByLLUUID(LLUUID uuid)
- {
- lock (manager.simProfiles)
- {
- if (manager.simProfiles.ContainsKey(uuid))
- return manager.simProfiles[uuid];
- }
- throw new Exception("Unable to find profile with UUID (" + uuid.ToStringHyphenated() + ")");
- }
-
- ///
- /// Adds a new specified region to the database
- ///
- /// The profile to add
- /// A dataresponse enum indicating success
- public DataResponse AddProfile(SimProfileData profile)
- {
- lock (manager.simProfiles)
- {
- if (manager.AddRow(profile))
- {
- return DataResponse.RESPONSE_OK;
- }
- else
- {
- return DataResponse.RESPONSE_ERROR;
- }
- }
- }
-
- ///
- /// Authenticates a new region using the shared secrets. NOT SECURE.
- ///
- /// The UUID the region is authenticating with
- /// The location the region is logging into (unused in Db4o)
- /// The shared secret
- /// Authenticated?
- public bool AuthenticateSim(LLUUID uuid, ulong handle, string key) {
- if (manager.simProfiles[uuid].regionRecvKey == key)
- return true;
- return false;
- }
-
- ///
- /// Shuts down the database
- ///
- public void Close()
- {
- manager = null;
- }
-
- ///
- /// Returns the providers name
- ///
- /// The name of the storage system
- public string getName()
- {
- return "DB4o Grid Provider";
- }
-
- ///
- /// Returns the providers version
- ///
- /// The version of the storage system
- public string getVersion()
- {
- return "0.1";
- }
- }
-}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oManager.cs b/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oManager.cs
deleted file mode 100644
index 356a49c..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oManager.cs
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-using Db4objects.Db4o;
-using OpenGrid.Framework.Data;
-using libsecondlife;
-
-namespace OpenGrid.Framework.Data.DB4o
-{
- ///
- /// A Database manager for Db4o
- ///
- class DB4oGridManager
- {
- ///
- /// A list of the current regions connected (in-memory cache)
- ///
- public Dictionary simProfiles = new Dictionary();
- ///
- /// Database File Name
- ///
- string dbfl;
-
- ///
- /// Creates a new grid storage manager
- ///
- /// Filename to the database file
- public DB4oGridManager(string db4odb)
- {
- dbfl = db4odb;
- IObjectContainer database;
- database = Db4oFactory.OpenFile(dbfl);
- IObjectSet result = database.Get(typeof(SimProfileData));
- // Loads the file into the in-memory cache
- foreach(SimProfileData row in result) {
- simProfiles.Add(row.UUID, row);
- }
- database.Close();
- }
-
- ///
- /// Adds a new profile to the database (Warning: Probably slow.)
- ///
- /// The profile to add
- /// Successful?
- public bool AddRow(SimProfileData row)
- {
- if (simProfiles.ContainsKey(row.UUID))
- {
- simProfiles[row.UUID] = row;
- }
- else
- {
- simProfiles.Add(row.UUID, row);
- }
-
- try
- {
- IObjectContainer database;
- database = Db4oFactory.OpenFile(dbfl);
- database.Set(row);
- database.Close();
- return true;
- }
- catch (Exception e)
- {
- return false;
- }
- }
-
-
- }
-
- ///
- /// A manager for the DB4o database (user profiles)
- ///
- class DB4oUserManager
- {
- ///
- /// A list of the user profiles (in memory cache)
- ///
- public Dictionary userProfiles = new Dictionary();
- ///
- /// Database filename
- ///
- string dbfl;
-
- ///
- /// Initialises a new DB manager
- ///
- /// The filename to the database
- public DB4oUserManager(string db4odb)
- {
- dbfl = db4odb;
- IObjectContainer database;
- database = Db4oFactory.OpenFile(dbfl);
- // Load to cache
- IObjectSet result = database.Get(typeof(UserProfileData));
- foreach (UserProfileData row in result)
- {
- userProfiles.Add(row.UUID, row);
- }
- database.Close();
- }
-
- ///
- /// Adds a new profile to the database (Warning: Probably slow.)
- ///
- /// The profile to add
- /// Successful?
- public bool AddRow(UserProfileData row)
- {
- if (userProfiles.ContainsKey(row.UUID))
- {
- userProfiles[row.UUID] = row;
- }
- else
- {
- userProfiles.Add(row.UUID, row);
- }
-
- try
- {
- IObjectContainer database;
- database = Db4oFactory.OpenFile(dbfl);
- database.Set(row);
- database.Close();
- return true;
- }
- catch (Exception e)
- {
- return false;
- }
- }
-
-
- }
-}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs b/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs
deleted file mode 100644
index 315f48d..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-using OpenGrid.Framework.Data;
-using libsecondlife;
-
-namespace OpenGrid.Framework.Data.DB4o
-{
- ///
- /// A User storage interface for the DB4o database system
- ///
- public class DB4oUserData : IUserData
- {
- ///
- /// The database manager
- ///
- DB4oUserManager manager;
-
- ///
- /// Artificial constructor called upon plugin load
- ///
- public void Initialise()
- {
- manager = new DB4oUserManager("userprofiles.yap");
- }
-
- ///
- /// Loads a specified user profile from a UUID
- ///
- /// The users UUID
- /// A user profile
- public UserProfileData getUserByUUID(LLUUID uuid)
- {
- if(manager.userProfiles.ContainsKey(uuid))
- return manager.userProfiles[uuid];
- return null;
- }
-
- ///
- /// Returns a user by searching for its name
- ///
- /// The users account name
- /// A matching users profile
- public UserProfileData getUserByName(string name)
- {
- return getUserByName(name.Split(' ')[0], name.Split(' ')[1]);
- }
-
- ///
- /// Returns a user by searching for its name
- ///
- /// The first part of the users account name
- /// The second part of the users account name
- /// A matching users profile
- public UserProfileData getUserByName(string fname, string lname)
- {
- foreach (UserProfileData profile in manager.userProfiles.Values)
- {
- if (profile.username == fname && profile.surname == lname)
- return profile;
- }
- return null;
- }
-
- ///
- /// Returns a user by UUID direct
- ///
- /// The users account ID
- /// A matching users profile
- public UserAgentData getAgentByUUID(LLUUID uuid)
- {
- try
- {
- return getUserByUUID(uuid).currentAgent;
- }
- catch (Exception e)
- {
- return null;
- }
- }
-
- ///
- /// Returns a session by account name
- ///
- /// The account name
- /// The users session agent
- public UserAgentData getAgentByName(string name)
- {
- return getAgentByName(name.Split(' ')[0], name.Split(' ')[1]);
- }
-
- ///
- /// Returns a session by account name
- ///
- /// The first part of the users account name
- /// The second part of the users account name
- /// A user agent
- public UserAgentData getAgentByName(string fname, string lname)
- {
- try
- {
- return getUserByName(fname,lname).currentAgent;
- }
- catch (Exception e)
- {
- return null;
- }
- }
-
- ///
- /// Creates a new user profile
- ///
- /// The profile to add to the database
- public void addNewUserProfile(UserProfileData user)
- {
- try
- {
- manager.AddRow(user);
- }
- catch (Exception e)
- {
- Console.WriteLine(e.ToString());
- }
- }
-
- ///
- /// Creates a new user agent
- ///
- /// The agent to add to the database
- public void addNewUserAgent(UserAgentData agent)
- {
- // Do nothing. yet.
- }
-
- ///
- /// Transfers money between two user accounts
- ///
- /// Starting account
- /// End account
- /// The amount to move
- /// Success?
- public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount)
- {
- return true;
- }
-
- ///
- /// Transfers inventory between two accounts
- ///
- /// Move to inventory server
- /// Senders account
- /// Recievers account
- /// Inventory item
- /// Success?
- public bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item)
- {
- return true;
- }
-
- ///
- /// Returns the name of the storage provider
- ///
- /// Storage provider name
- public string getName()
- {
- return "DB4o Userdata";
- }
-
- ///
- /// Returns the version of the storage provider
- ///
- /// Storage provider version
- public string getVersion()
- {
- return "0.1";
- }
- }
-}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj
deleted file mode 100644
index d2d6140..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
- Local
- 8.0.50727
- 2.0
- {39BD9497-0000-0000-0000-000000000000}
- Debug
- AnyCPU
-
-
-
- OpenGrid.Framework.Data.DB4o
- JScript
- Grid
- IE50
- false
- Library
-
- OpenGrid.Framework.Data.DB4o
-
-
-
-
-
- False
- 285212672
- False
-
-
- TRACE;DEBUG
-
- True
- 4096
- False
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
- False
- 285212672
- False
-
-
- TRACE
-
- False
- 4096
- True
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
-
- ..\..\bin\Db4objects.Db4o.dll
- False
-
-
- ..\..\bin\libsecondlife.dll
- False
-
-
- System.dll
- False
-
-
- System.Data.dll
- False
-
-
- System.Xml.dll
- False
-
-
-
-
- OpenGrid.Framework.Data
- {62CDF671-0000-0000-0000-000000000000}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
-
-
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build
deleted file mode 100644
index d82d751..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Framework.Data.DB4o/Properties/AssemblyInfo.cs
deleted file mode 100644
index dc4a9a1..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.DB4o/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("OpenGrid.Framework.Data.DB4o")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("OpenGrid.Framework.Data.DB4o")]
-[assembly: AssemblyCopyright("Copyright © 2007")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("57991e15-79da-41b7-aa06-2e6b49165a63")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs
deleted file mode 100644
index 92169c4..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-using OpenGrid.Framework.Data;
-
-namespace OpenGrid.Framework.Data.MSSQL
-{
- ///
- /// A grid data interface for Microsoft SQL Server
- ///
- public class SqlGridData : IGridData
- {
- ///
- /// Database manager
- ///
- private MSSqlManager database;
-
- ///
- /// Initialises the Grid Interface
- ///
- public void Initialise()
- {
- database = new MSSqlManager("localhost", "db", "user", "password", "false");
- }
-
- ///
- /// Shuts down the grid interface
- ///
- public void Close()
- {
- database.Close();
- }
-
- ///
- /// Returns the storage system name
- ///
- /// A string containing the storage system name
- public string getName()
- {
- return "Sql OpenGridData";
- }
-
- ///
- /// Returns the storage system version
- ///
- /// A string containing the storage system version
- public string getVersion()
- {
- return "0.1";
- }
-
- ///
- /// Returns a list of regions within the specified ranges
- ///
- /// minimum X coordinate
- /// minimum Y coordinate
- /// maximum X coordinate
- /// maximum Y coordinate
- /// An array of region profiles
- public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d)
- {
- return null;
- }
-
- ///
- /// Returns a sim profile from it's location
- ///
- /// Region location handle
- /// Sim profile
- public SimProfileData GetProfileByHandle(ulong handle)
- {
- Dictionary param = new Dictionary();
- param["handle"] = handle.ToString();
-
- System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param);
- System.Data.IDataReader reader = result.ExecuteReader();
-
- SimProfileData row = database.getRow(reader);
- reader.Close();
- result.Dispose();
-
- return row;
- }
-
- ///
- /// Returns a sim profile from it's UUID
- ///
- /// The region UUID
- /// The sim profile
- public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid)
- {
- Dictionary param = new Dictionary();
- param["uuid"] = uuid.ToStringHyphenated();
-
- System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param);
- System.Data.IDataReader reader = result.ExecuteReader();
-
- SimProfileData row = database.getRow(reader);
- reader.Close();
- result.Dispose();
-
- return row;
- }
-
- ///
- /// Adds a new specified region to the database
- ///
- /// The profile to add
- /// A dataresponse enum indicating success
- public DataResponse AddProfile(SimProfileData profile)
- {
- if (database.insertRow(profile))
- {
- return DataResponse.RESPONSE_OK;
- }
- else
- {
- return DataResponse.RESPONSE_ERROR;
- }
- }
-
- ///
- /// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret.
- ///
- /// The UUID of the challenger
- /// The attempted regionHandle of the challenger
- /// The secret
- /// Whether the secret and regionhandle match the database entry for UUID
- public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey)
- {
- bool throwHissyFit = false; // Should be true by 1.0
-
- if (throwHissyFit)
- throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential.");
-
- SimProfileData data = GetProfileByLLUUID(uuid);
-
- return (handle == data.regionHandle && authkey == data.regionSecret);
- }
-
- ///
- /// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region
- ///
- /// This requires a security audit.
- ///
- ///
- ///
- ///
- ///
- public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authhash, string challenge)
- {
- System.Security.Cryptography.SHA512Managed HashProvider = new System.Security.Cryptography.SHA512Managed();
- System.Text.ASCIIEncoding TextProvider = new ASCIIEncoding();
-
- byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge);
- byte[] hash = HashProvider.ComputeHash(stream);
-
- return false;
- }
- }
-
-
-}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs
deleted file mode 100644
index 475a3e7..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Data;
-
-using System.Data.SqlClient;
-
-using OpenGrid.Framework.Data;
-
-namespace OpenGrid.Framework.Data.MSSQL
-{
- ///
- /// A management class for the MS SQL Storage Engine
- ///
- class MSSqlManager
- {
- ///
- /// The database connection object
- ///
- IDbConnection dbcon;
-
- ///
- /// Initialises and creates a new Sql connection and maintains it.
- ///
- /// The Sql server being connected to
- /// The name of the Sql database being used
- /// The username logging into the database
- /// The password for the user logging in
- /// Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.
- public MSSqlManager(string hostname, string database, string username, string password, string cpooling)
- {
- try
- {
- string connectionString = "Server=" + hostname + ";Database=" + database + ";User ID=" + username + ";Password=" + password + ";Pooling=" + cpooling + ";";
- dbcon = new SqlConnection(connectionString);
-
- dbcon.Open();
- }
- catch (Exception e)
- {
- throw new Exception("Error initialising Sql Database: " + e.ToString());
- }
- }
-
- ///
- /// Shuts down the database connection
- ///
- public void Close()
- {
- dbcon.Close();
- dbcon = null;
- }
-
- ///
- /// Runs a query with protection against SQL Injection by using parameterised input.
- ///
- /// The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y
- /// The parameters - index so that @y is indexed as 'y'
- /// A Sql DB Command
- public IDbCommand Query(string sql, Dictionary parameters)
- {
- SqlCommand dbcommand = (SqlCommand)dbcon.CreateCommand();
- dbcommand.CommandText = sql;
- foreach (KeyValuePair param in parameters)
- {
- dbcommand.Parameters.AddWithValue(param.Key, param.Value);
- }
-
- return (IDbCommand)dbcommand;
- }
-
- ///
- /// Runs a database reader object and returns a region row
- ///
- /// An active database reader
- /// A region row
- public SimProfileData getRow(IDataReader reader)
- {
- SimProfileData regionprofile = new SimProfileData();
-
- if (reader.Read())
- {
- // Region Main
- regionprofile.regionHandle = (ulong)reader["regionHandle"];
- regionprofile.regionName = (string)reader["regionName"];
- regionprofile.UUID = new libsecondlife.LLUUID((string)reader["uuid"]);
-
- // Secrets
- regionprofile.regionRecvKey = (string)reader["regionRecvKey"];
- regionprofile.regionSecret = (string)reader["regionSecret"];
- regionprofile.regionSendKey = (string)reader["regionSendKey"];
-
- // Region Server
- regionprofile.regionDataURI = (string)reader["regionDataURI"];
- regionprofile.regionOnline = false; // Needs to be pinged before this can be set.
- regionprofile.serverIP = (string)reader["serverIP"];
- regionprofile.serverPort = (uint)reader["serverPort"];
- regionprofile.serverURI = (string)reader["serverURI"];
-
- // Location
- regionprofile.regionLocX = (uint)((int)reader["locX"]);
- regionprofile.regionLocY = (uint)((int)reader["locY"]);
- regionprofile.regionLocZ = (uint)((int)reader["locZ"]);
-
- // Neighbours - 0 = No Override
- regionprofile.regionEastOverrideHandle = (ulong)reader["eastOverrideHandle"];
- regionprofile.regionWestOverrideHandle = (ulong)reader["westOverrideHandle"];
- regionprofile.regionSouthOverrideHandle = (ulong)reader["southOverrideHandle"];
- regionprofile.regionNorthOverrideHandle = (ulong)reader["northOverrideHandle"];
-
- // Assets
- regionprofile.regionAssetURI = (string)reader["regionAssetURI"];
- regionprofile.regionAssetRecvKey = (string)reader["regionAssetRecvKey"];
- regionprofile.regionAssetSendKey = (string)reader["regionAssetSendKey"];
-
- // Userserver
- regionprofile.regionUserURI = (string)reader["regionUserURI"];
- regionprofile.regionUserRecvKey = (string)reader["regionUserRecvKey"];
- regionprofile.regionUserSendKey = (string)reader["regionUserSendKey"];
- }
- else
- {
- throw new Exception("No rows to return");
- }
- return regionprofile;
- }
-
- ///
- /// Creates a new region in the database
- ///
- /// The region profile to insert
- /// Successful?
- public bool insertRow(SimProfileData profile)
- {
- string sql = "REPLACE INTO regions VALUES (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, ";
- sql += "serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, ";
- sql += "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey) VALUES ";
-
- sql += "(@regionHandle, @regionName, @uuid, @regionRecvKey, @regionSecret, @regionSendKey, @regionDataURI, ";
- sql += "@serverIP, @serverPort, @serverURI, @locX, @locY, @locZ, @eastOverrideHandle, @westOverrideHandle, @southOverrideHandle, @northOverrideHandle, @regionAssetURI, @regionAssetRecvKey, ";
- sql += "@regionAssetSendKey, @regionUserURI, @regionUserRecvKey, @regionUserSendKey);";
-
- Dictionary parameters = new Dictionary();
-
- parameters["regionHandle"] = profile.regionHandle.ToString();
- parameters["regionName"] = profile.regionName;
- parameters["uuid"] = profile.UUID.ToString();
- parameters["regionRecvKey"] = profile.regionRecvKey;
- parameters["regionSendKey"] = profile.regionSendKey;
- parameters["regionDataURI"] = profile.regionDataURI;
- parameters["serverIP"] = profile.serverIP;
- parameters["serverPort"] = profile.serverPort.ToString();
- parameters["serverURI"] = profile.serverURI;
- parameters["locX"] = profile.regionLocX.ToString();
- parameters["locY"] = profile.regionLocY.ToString();
- parameters["locZ"] = profile.regionLocZ.ToString();
- parameters["eastOverrideHandle"] = profile.regionEastOverrideHandle.ToString();
- parameters["westOverrideHandle"] = profile.regionWestOverrideHandle.ToString();
- parameters["northOverrideHandle"] = profile.regionNorthOverrideHandle.ToString();
- parameters["southOverrideHandle"] = profile.regionSouthOverrideHandle.ToString();
- parameters["regionAssetURI"] = profile.regionAssetURI;
- parameters["regionAssetRecvKey"] = profile.regionAssetRecvKey;
- parameters["regionAssetSendKey"] = profile.regionAssetSendKey;
- parameters["regionUserURI"] = profile.regionUserURI;
- parameters["regionUserRecvKey"] = profile.regionUserRecvKey;
- parameters["regionUserSendKey"] = profile.regionUserSendKey;
-
- bool returnval = false;
-
- try
- {
- IDbCommand result = Query(sql, parameters);
-
- if (result.ExecuteNonQuery() == 1)
- returnval = true;
-
- result.Dispose();
- }
- catch (Exception e)
- {
- return false;
- }
-
- return returnval;
- }
- }
-}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.csproj b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.csproj
deleted file mode 100644
index fa18c28..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.csproj
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
- Local
- 8.0.50727
- 2.0
- {0A563AC1-0000-0000-0000-000000000000}
- Debug
- AnyCPU
-
-
-
- OpenGrid.Framework.Data.MSSQL
- JScript
- Grid
- IE50
- false
- Library
-
- OpenGrid.Framework.Data.MSSQL
-
-
-
-
-
- False
- 285212672
- False
-
-
- TRACE;DEBUG
-
- True
- 4096
- False
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
- False
- 285212672
- False
-
-
- TRACE
-
- False
- 4096
- True
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
-
- ..\..\bin\libsecondlife.dll
- False
-
-
- System.dll
- False
-
-
- System.Data.dll
- False
-
-
- System.Xml.dll
- False
-
-
-
-
- OpenGrid.Framework.Data
- {62CDF671-0000-0000-0000-000000000000}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
-
-
-
-
- Code
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.dll.build b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.dll.build
deleted file mode 100644
index 577da4b..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.dll.build
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/Properties/AssemblyInfo.cs
deleted file mode 100644
index bbe3cdf..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("OpenGrid.Framework.Data.MSSQL")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("OpenGrid.Framework.Data.MSSQL")]
-[assembly: AssemblyCopyright("Copyright © 2007")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("0e1c1ca4-2cf2-4315-b0e7-432c02feea8a")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
deleted file mode 100644
index d9a517d..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-using OpenGrid.Framework.Data;
-
-namespace OpenGrid.Framework.Data.MySQL
-{
- ///
- /// A MySQL Interface for the Grid Server
- ///
- public class MySQLGridData : IGridData
- {
- ///
- /// MySQL Database Manager
- ///
- private MySQLManager database;
-
- ///
- /// Initialises the Grid Interface
- ///
- public void Initialise()
- {
- IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
- string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
- string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database");
- string settingUsername = GridDataMySqlFile.ParseFileReadValue("username");
- string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
- string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling");
- string settingPort = GridDataMySqlFile.ParseFileReadValue("port");
-
- database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort);
- }
-
- ///
- /// Shuts down the grid interface
- ///
- public void Close()
- {
- database.Close();
- }
-
- ///
- /// Returns the plugin name
- ///
- /// Plugin name
- public string getName()
- {
- return "MySql OpenGridData";
- }
-
- ///
- /// Returns the plugin version
- ///
- /// Plugin version
- public string getVersion()
- {
- return "0.1";
- }
-
- ///
- /// Returns all the specified region profiles within coordates -- coordinates are inclusive
- ///
- /// Minimum X coordinate
- /// Minimum Y coordinate
- /// Maximum X coordinate
- /// Maximum Y coordinate
- ///
- public SimProfileData[] GetProfilesInRange(uint xmin, uint ymin, uint xmax, uint ymax)
- {
- try
- {
- lock (database)
- {
- Dictionary param = new Dictionary();
- param["?xmin"] = xmin.ToString();
- param["?ymin"] = ymin.ToString();
- param["?xmax"] = xmax.ToString();
- param["?ymax"] = ymax.ToString();
-
- System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE locX >= ?xmin AND locX <= ?xmax AND locY >= ?ymin AND locY <= ?ymax", param);
- System.Data.IDataReader reader = result.ExecuteReader();
-
- SimProfileData row;
-
- List rows = new List();
-
- while ((row = database.readSimRow(reader)) != null)
- {
- rows.Add(row);
- }
- reader.Close();
- result.Dispose();
-
- return rows.ToArray();
-
- }
- }
- catch (Exception e)
- {
- database.Reconnect();
- Console.WriteLine(e.ToString());
- return null;
- }
- }
-
- ///
- /// Returns a sim profile from it's location
- ///
- /// Region location handle
- /// Sim profile
- public SimProfileData GetProfileByHandle(ulong handle)
- {
- try
- {
- lock (database)
- {
- Dictionary param = new Dictionary();
- param["?handle"] = handle.ToString();
-
- System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE regionHandle = ?handle", param);
- System.Data.IDataReader reader = result.ExecuteReader();
-
- SimProfileData row = database.readSimRow(reader);
- reader.Close();
- result.Dispose();
-
- return row;
- }
- }
- catch (Exception e)
- {
- database.Reconnect();
- Console.WriteLine(e.ToString());
- return null;
- }
- }
-
- ///
- /// Returns a sim profile from it's UUID
- ///
- /// The region UUID
- /// The sim profile
- public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid)
- {
- try
- {
- lock (database)
- {
- Dictionary param = new Dictionary();
- param["?uuid"] = uuid.ToStringHyphenated();
-
- System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = ?uuid", param);
- System.Data.IDataReader reader = result.ExecuteReader();
-
- SimProfileData row = database.readSimRow(reader);
- reader.Close();
- result.Dispose();
-
- return row;
- }
- }
- catch (Exception e)
- {
- database.Reconnect();
- Console.WriteLine(e.ToString());
- return null;
- }
- }
-
- ///
- /// Adds a new profile to the database
- ///
- /// The profile to add
- /// Successful?
- public DataResponse AddProfile(SimProfileData profile)
- {
- lock (database)
- {
- if (database.insertRegion(profile))
- {
- return DataResponse.RESPONSE_OK;
- }
- else
- {
- return DataResponse.RESPONSE_ERROR;
- }
- }
- }
-
- ///
- /// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret.
- ///
- /// The UUID of the challenger
- /// The attempted regionHandle of the challenger
- /// The secret
- /// Whether the secret and regionhandle match the database entry for UUID
- public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey)
- {
- bool throwHissyFit = false; // Should be true by 1.0
-
- if (throwHissyFit)
- throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential.");
-
- SimProfileData data = GetProfileByLLUUID(uuid);
-
- return (handle == data.regionHandle && authkey == data.regionSecret);
- }
-
- ///
- /// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region
- ///
- /// This requires a security audit.
- ///
- ///
- ///
- ///
- ///
- public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authhash, string challenge)
- {
- System.Security.Cryptography.SHA512Managed HashProvider = new System.Security.Cryptography.SHA512Managed();
- System.Text.ASCIIEncoding TextProvider = new ASCIIEncoding();
-
- byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge);
- byte[] hash = HashProvider.ComputeHash(stream);
-
- return false;
- }
- }
-
-
-}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLInventoryData.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLInventoryData.cs
deleted file mode 100644
index fb429e4..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLInventoryData.cs
+++ /dev/null
@@ -1,309 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-using libsecondlife;
-
-namespace OpenGrid.Framework.Data.MySQL
-{
- ///
- /// A MySQL interface for the inventory server
- ///
- class MySQLInventoryData : IInventoryData
- {
- ///
- /// The database manager
- ///
- public MySQLManager database;
-
- ///
- /// Loads and initialises this database plugin
- ///
- public void Initialise()
- {
- IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
- string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
- string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database");
- string settingUsername = GridDataMySqlFile.ParseFileReadValue("username");
- string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
- string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling");
- string settingPort = GridDataMySqlFile.ParseFileReadValue("port");
-
- database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort);
- }
-
- ///
- /// The name of this DB provider
- ///
- /// Name of DB provider
- public string getName()
- {
- return "MySQL Inventory Data Interface";
- }
-
- ///
- /// Closes this DB provider
- ///
- public void Close()
- {
- // Do nothing.
- }
-
- ///
- /// Returns the version of this DB provider
- ///
- /// A string containing the DB provider
- public string getVersion()
- {
- return "0.1";
- }
-
- ///
- /// Returns a list of items in a specified folder
- ///
- /// The folder to search
- /// A list containing inventory items
- public List getInventoryInFolder(LLUUID folderID)
- {
- try
- {
- lock (database)
- {
- Dictionary param = new Dictionary();
- param["?uuid"] = folderID.ToStringHyphenated();
-
- System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE parentFolderID = ?uuid", param);
- System.Data.IDataReader reader = result.ExecuteReader();
-
- List items = database.readInventoryItems(reader);
-
- reader.Close();
- result.Dispose();
-
- return items;
- }
- }
- catch (Exception e)
- {
- database.Reconnect();
- Console.WriteLine(e.ToString());
- return null;
- }
- }
-
- ///
- /// Returns a list of the root folders within a users inventory
- ///
- /// The user whos inventory is to be searched
- /// A list of folder objects
- public List getUserRootFolders(LLUUID user)
- {
- try
- {
- lock (database)
- {
- Dictionary param = new Dictionary();
- param["?uuid"] = user.ToStringHyphenated();
- param["?zero"] = LLUUID.Zero.ToStringHyphenated();
-
- System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", param);
- System.Data.IDataReader reader = result.ExecuteReader();
-
- List items = database.readInventoryFolders(reader);
-
- reader.Close();
- result.Dispose();
-
- return items;
- }
- }
- catch (Exception e)
- {
- database.Reconnect();
- Console.WriteLine(e.ToString());
- return null;
- }
- }
-
- ///
- /// Returns a list of folders in a users inventory contained within the specified folder
- ///
- /// The folder to search
- /// A list of inventory folders
- public List getInventoryFolders(LLUUID parentID)
- {
- try
- {
- lock (database)
- {
- Dictionary param = new Dictionary();
- param["?uuid"] = parentID.ToStringHyphenated();
-
- System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = ?uuid", param);
- System.Data.IDataReader reader = result.ExecuteReader();
-
- List items = database.readInventoryFolders(reader);
-
- reader.Close();
- result.Dispose();
-
- return items;
- }
- }
- catch (Exception e)
- {
- database.Reconnect();
- Console.WriteLine(e.ToString());
- return null;
- }
- }
-
- ///
- /// Returns a specified inventory item
- ///
- /// The item to return
- /// An inventory item
- public InventoryItemBase getInventoryItem(LLUUID item)
- {
- try
- {
- lock (database)
- {
- Dictionary param = new Dictionary();
- param["?uuid"] = item.ToStringHyphenated();
-
- System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE inventoryID = ?uuid", param);
- System.Data.IDataReader reader = result.ExecuteReader();
-
- List items = database.readInventoryItems(reader);
-
- reader.Close();
- result.Dispose();
-
- if (items.Count > 0)
- {
- return items[0];
- }
- else
- {
- return null;
- }
- }
- }
- catch (Exception e)
- {
- database.Reconnect();
- Console.WriteLine(e.ToString());
- return null;
- }
- }
-
- ///
- /// Returns a specified inventory folder
- ///
- /// The folder to return
- /// A folder class
- public InventoryFolderBase getInventoryFolder(LLUUID folder)
- {
- try
- {
- lock (database)
- {
- Dictionary param = new Dictionary();
- param["?uuid"] = folder.ToStringHyphenated();
-
- System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE folderID = ?uuid", param);
- System.Data.IDataReader reader = result.ExecuteReader();
-
- List items = database.readInventoryFolders(reader);
-
- reader.Close();
- result.Dispose();
-
- if (items.Count > 0)
- {
- return items[0];
- }
- else
- {
- return null;
- }
- }
- }
- catch (Exception e)
- {
- database.Reconnect();
- Console.WriteLine(e.ToString());
- return null;
- }
- }
-
- ///
- /// Adds a specified item to the database
- ///
- /// The inventory item
- public void addInventoryItem(InventoryItemBase item)
- {
- lock (database)
- {
- database.insertItem(item);
- }
- }
-
- ///
- /// Updates the specified inventory item
- ///
- /// Inventory item to update
- public void updateInventoryItem(InventoryItemBase item)
- {
- addInventoryItem(item);
- }
-
- ///
- /// Creates a new inventory folder
- ///
- /// Folder to create
- public void addInventoryFolder(InventoryFolderBase folder)
- {
- lock (database)
- {
- database.insertFolder(folder);
- }
- }
-
- ///
- /// Updates an inventory folder
- ///
- /// Folder to update
- public void updateInventoryFolder(InventoryFolderBase folder)
- {
- addInventoryFolder(folder);
- }
- }
-}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLLogData.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLLogData.cs
deleted file mode 100644
index c88b39f..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLLogData.cs
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace OpenGrid.Framework.Data.MySQL
-{
- ///
- /// An interface to the log database for MySQL
- ///
- class MySQLLogData : ILogData
- {
- ///
- /// The database manager
- ///
- public MySQLManager database;
-
- ///
- /// Artificial constructor called when the plugin is loaded
- ///
- public void Initialise()
- {
- IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
- string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
- string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database");
- string settingUsername = GridDataMySqlFile.ParseFileReadValue("username");
- string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
- string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling");
- string settingPort = GridDataMySqlFile.ParseFileReadValue("port");
-
- database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort);
- }
-
- ///
- /// Saves a log item to the database
- ///
- /// The daemon triggering the event
- /// The target of the action (region / agent UUID, etc)
- /// The method call where the problem occured
- /// The arguments passed to the method
- /// How critical is this?
- /// The message to log
- public void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage)
- {
- try
- {
- database.insertLogRow(serverDaemon, target, methodCall, arguments, priority, logMessage);
- }
- catch (Exception e)
- {
- database.Reconnect();
- }
- }
-
- ///
- /// Returns the name of this DB provider
- ///
- /// A string containing the DB provider name
- public string getName()
- {
- return "MySQL Logdata Interface";
- }
-
- ///
- /// Closes the database provider
- ///
- public void Close()
- {
- // Do nothing.
- }
-
- ///
- /// Returns the version of this DB provider
- ///
- /// A string containing the provider version
- public string getVersion()
- {
- return "0.1";
- }
- }
-}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
deleted file mode 100644
index b42ec09..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
+++ /dev/null
@@ -1,665 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Data;
-
-// MySQL Native
-using MySql;
-using MySql.Data;
-using MySql.Data.Types;
-using MySql.Data.MySqlClient;
-
-using OpenGrid.Framework.Data;
-
-namespace OpenGrid.Framework.Data.MySQL
-{
- ///
- /// A MySQL Database manager
- ///
- class MySQLManager
- {
- ///
- /// The database connection object
- ///
- IDbConnection dbcon;
- ///
- /// Connection string for ADO.net
- ///
- string connectionString;
-
- ///
- /// Initialises and creates a new MySQL connection and maintains it.
- ///
- /// The MySQL server being connected to
- /// The name of the MySQL database being used
- /// The username logging into the database
- /// The password for the user logging in
- /// Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.
- public MySQLManager(string hostname, string database, string username, string password, string cpooling, string port)
- {
- try
- {
- connectionString = "Server=" + hostname + ";Port=" + port + ";Database=" + database + ";User ID=" + username + ";Password=" + password + ";Pooling=" + cpooling + ";";
- dbcon = new MySqlConnection(connectionString);
-
- dbcon.Open();
-
- System.Console.WriteLine("MySQL connection established");
- }
- catch (Exception e)
- {
- throw new Exception("Error initialising MySql Database: " + e.ToString());
- }
- }
-
- ///
- /// Shuts down the database connection
- ///
- public void Close()
- {
- dbcon.Close();
- dbcon = null;
- }
-
- ///
- /// Reconnects to the database
- ///
- public void Reconnect()
- {
- lock (dbcon)
- {
- try
- {
- // Close the DB connection
- dbcon.Close();
- // Try reopen it
- dbcon = new MySqlConnection(connectionString);
- dbcon.Open();
- }
- catch (Exception e)
- {
- Console.WriteLine("Unable to reconnect to database " + e.ToString());
- }
- }
- }
-
- ///
- /// Runs a query with protection against SQL Injection by using parameterised input.
- ///
- /// The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y
- /// The parameters - index so that @y is indexed as 'y'
- /// A MySQL DB Command
- public IDbCommand Query(string sql, Dictionary parameters)
- {
- try
- {
- MySqlCommand dbcommand = (MySqlCommand)dbcon.CreateCommand();
- dbcommand.CommandText = sql;
- foreach (KeyValuePair param in parameters)
- {
- dbcommand.Parameters.Add(param.Key, param.Value);
- }
-
- return (IDbCommand)dbcommand;
- }
- catch
- {
- lock (dbcon)
- {
- // Close the DB connection
- try
- {
- dbcon.Close();
- }
- catch { }
-
- // Try reopen it
- try
- {
- dbcon = new MySqlConnection(connectionString);
- dbcon.Open();
- }
- catch (Exception e)
- {
- Console.WriteLine("Unable to reconnect to database " + e.ToString());
- }
-
- // Run the query again
- try
- {
- MySqlCommand dbcommand = (MySqlCommand)dbcon.CreateCommand();
- dbcommand.CommandText = sql;
- foreach (KeyValuePair param in parameters)
- {
- dbcommand.Parameters.Add(param.Key, param.Value);
- }
-
- return (IDbCommand)dbcommand;
- }
- catch (Exception e)
- {
- // Return null if it fails.
- Console.WriteLine("Failed during Query generation: " + e.ToString());
- return null;
- }
- }
- }
- }
-
- ///
- /// Reads a region row from a database reader
- ///
- /// An active database reader
- /// A region profile
- public SimProfileData readSimRow(IDataReader reader)
- {
- SimProfileData retval = new SimProfileData();
-
- if (reader.Read())
- {
- // Region Main
- retval.regionHandle = Convert.ToUInt64(reader["regionHandle"].ToString());
- retval.regionName = (string)reader["regionName"];
- retval.UUID = new libsecondlife.LLUUID((string)reader["uuid"]);
-
- // Secrets
- retval.regionRecvKey = (string)reader["regionRecvKey"];
- retval.regionSecret = (string)reader["regionSecret"];
- retval.regionSendKey = (string)reader["regionSendKey"];
-
- // Region Server
- retval.regionDataURI = (string)reader["regionDataURI"];
- retval.regionOnline = false; // Needs to be pinged before this can be set.
- retval.serverIP = (string)reader["serverIP"];
- retval.serverPort = (uint)reader["serverPort"];
- retval.serverURI = (string)reader["serverURI"];
-
- // Location
- retval.regionLocX = Convert.ToUInt32(reader["locX"].ToString());
- retval.regionLocY = Convert.ToUInt32(reader["locY"].ToString());
- retval.regionLocZ = Convert.ToUInt32(reader["locZ"].ToString());
-
- // Neighbours - 0 = No Override
- retval.regionEastOverrideHandle = Convert.ToUInt64(reader["eastOverrideHandle"].ToString());
- retval.regionWestOverrideHandle = Convert.ToUInt64(reader["westOverrideHandle"].ToString());
- retval.regionSouthOverrideHandle = Convert.ToUInt64(reader["southOverrideHandle"].ToString());
- retval.regionNorthOverrideHandle = Convert.ToUInt64(reader["northOverrideHandle"].ToString());
-
- // Assets
- retval.regionAssetURI = (string)reader["regionAssetURI"];
- retval.regionAssetRecvKey = (string)reader["regionAssetRecvKey"];
- retval.regionAssetSendKey = (string)reader["regionAssetSendKey"];
-
- // Userserver
- retval.regionUserURI = (string)reader["regionUserURI"];
- retval.regionUserRecvKey = (string)reader["regionUserRecvKey"];
- retval.regionUserSendKey = (string)reader["regionUserSendKey"];
-
- // World Map Addition
- string tempRegionMap = reader["regionMapTexture"].ToString();
- if (tempRegionMap != "")
- {
- retval.regionMapTextureID = new libsecondlife.LLUUID(tempRegionMap);
- }
- else
- {
- retval.regionMapTextureID = new libsecondlife.LLUUID();
- }
- }
- else
- {
- return null;
- }
- return retval;
- }
-
- ///
- /// Reads an agent row from a database reader
- ///
- /// An active database reader
- /// A user session agent
- public UserAgentData readAgentRow(IDataReader reader)
- {
- UserAgentData retval = new UserAgentData();
-
- if (reader.Read())
- {
- // Agent IDs
- retval.UUID = new libsecondlife.LLUUID((string)reader["UUID"]);
- retval.sessionID = new libsecondlife.LLUUID((string)reader["sessionID"]);
- retval.secureSessionID = new libsecondlife.LLUUID((string)reader["secureSessionID"]);
-
- // Agent Who?
- retval.agentIP = (string)reader["agentIP"];
- retval.agentPort = Convert.ToUInt32(reader["agentPort"].ToString());
- retval.agentOnline = Convert.ToBoolean(reader["agentOnline"].ToString());
-
- // Login/Logout times (UNIX Epoch)
- retval.loginTime = Convert.ToInt32(reader["loginTime"].ToString());
- retval.logoutTime = Convert.ToInt32(reader["logoutTime"].ToString());
-
- // Current position
- retval.currentRegion = (string)reader["currentRegion"];
- retval.currentHandle = Convert.ToUInt64(reader["currentHandle"].ToString());
- libsecondlife.LLVector3.TryParse((string)reader["currentPos"], out retval.currentPos);
- }
- else
- {
- return null;
- }
- return retval;
- }
-
- ///
- /// Reads a user profile from an active data reader
- ///
- /// An active database reader
- /// A user profile
- public UserProfileData readUserRow(IDataReader reader)
- {
- UserProfileData retval = new UserProfileData();
-
- if (reader.Read())
- {
- retval.UUID = new libsecondlife.LLUUID((string)reader["UUID"]);
- retval.username = (string)reader["username"];
- retval.surname = (string)reader["lastname"];
-
- retval.passwordHash = (string)reader["passwordHash"];
- retval.passwordSalt = (string)reader["passwordSalt"];
-
- retval.homeRegion = Convert.ToUInt64(reader["homeRegion"].ToString());
- retval.homeLocation = new libsecondlife.LLVector3(
- Convert.ToSingle(reader["homeLocationX"].ToString()),
- Convert.ToSingle(reader["homeLocationY"].ToString()),
- Convert.ToSingle(reader["homeLocationZ"].ToString()));
- retval.homeLookAt = new libsecondlife.LLVector3(
- Convert.ToSingle(reader["homeLookAtX"].ToString()),
- Convert.ToSingle(reader["homeLookAtY"].ToString()),
- Convert.ToSingle(reader["homeLookAtZ"].ToString()));
-
- retval.created = Convert.ToInt32(reader["created"].ToString());
- retval.lastLogin = Convert.ToInt32(reader["lastLogin"].ToString());
-
- retval.userInventoryURI = (string)reader["userInventoryURI"];
- retval.userAssetURI = (string)reader["userAssetURI"];
-
- retval.profileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString());
- retval.profileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString());
-
- retval.profileAboutText = (string)reader["profileAboutText"];
- retval.profileFirstText = (string)reader["profileFirstText"];
-
- retval.profileImage = new libsecondlife.LLUUID((string)reader["profileImage"]);
- retval.profileFirstImage = new libsecondlife.LLUUID((string)reader["profileFirstImage"]);
-
- }
- else
- {
- return null;
- }
- return retval;
- }
-
- ///
- /// Reads a list of inventory folders returned by a query.
- ///
- /// A MySQL Data Reader
- /// A List containing inventory folders
- public List readInventoryFolders(IDataReader reader)
- {
- List rows = new List();
-
- while(reader.Read())
- {
- try
- {
- InventoryFolderBase folder = new InventoryFolderBase();
-
- folder.agentID = new libsecondlife.LLUUID((string)reader["agentID"]);
- folder.parentID = new libsecondlife.LLUUID((string)reader["parentFolderID"]);
- folder.folderID = new libsecondlife.LLUUID((string)reader["folderID"]);
- folder.name = (string)reader["folderName"];
-
- rows.Add(folder);
- }
- catch (Exception e)
- {
- Console.WriteLine(e.ToString());
- }
- }
-
- return rows;
- }
-
- ///
- /// Reads a collection of items from an SQL result
- ///
- /// The SQL Result
- /// A List containing Inventory Items
- public List readInventoryItems(IDataReader reader)
- {
- List rows = new List();
-
- while (reader.Read())
- {
- try
- {
- InventoryItemBase item = new InventoryItemBase();
-
- item.assetID = new libsecondlife.LLUUID((string)reader["assetID"]);
- item.avatarID = new libsecondlife.LLUUID((string)reader["avatarID"]);
- item.inventoryCurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"].ToString());
- item.inventoryDescription = (string)reader["inventoryDescription"];
- item.inventoryID = new libsecondlife.LLUUID((string)reader["inventoryID"]);
- item.inventoryName = (string)reader["inventoryName"];
- item.inventoryNextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"].ToString());
- item.parentFolderID = new libsecondlife.LLUUID((string)reader["parentFolderID"]);
- item.type = Convert.ToInt32(reader["type"].ToString());
-
- rows.Add(item);
- }
- catch (Exception e)
- {
- Console.WriteLine(e.ToString());
- }
- }
-
- return rows;
- }
-
- ///
- /// Inserts a new row into the log database
- ///
- /// The daemon which triggered this event
- /// Who were we operating on when this occured (region UUID, user UUID, etc)
- /// The method call where the problem occured
- /// The arguments passed to the method
- /// How critical is this?
- /// Extra message info
- /// Saved successfully?
- public bool insertLogRow(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage)
- {
- string sql = "INSERT INTO logs (`target`, `server`, `method`, `arguments`, `priority`, `message`) VALUES ";
- sql += "(?target, ?server, ?method, ?arguments, ?priority, ?message)";
-
- Dictionary parameters = new Dictionary();
- parameters["?server"] = serverDaemon;
- parameters["?target"] = target;
- parameters["?method"] = methodCall;
- parameters["?arguments"] = arguments;
- parameters["?priority"] = priority.ToString();
- parameters["?message"] = logMessage;
-
- bool returnval = false;
-
- try
- {
- IDbCommand result = Query(sql, parameters);
-
- if (result.ExecuteNonQuery() == 1)
- returnval = true;
-
- result.Dispose();
- }
- catch (Exception e)
- {
- Console.WriteLine(e.ToString());
- return false;
- }
-
- return returnval;
- }
-
- ///
- /// Inserts a new item into the database
- ///
- /// The item
- /// Success?
- public bool insertItem(InventoryItemBase item)
- {
- string sql = "REPLACE INTO inventoryitems (inventoryID, assetID, type, parentFolderID, avatarID, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions) VALUES ";
- sql += "(?inventoryID, ?assetID, ?type, ?parentFolderID, ?avatarID, ?inventoryName, ?inventoryDescription, ?inventoryNextPermissions, ?inventoryCurrentPermissions)";
-
- Dictionary parameters = new Dictionary();
- parameters["?inventoryID"] = item.inventoryID.ToStringHyphenated();
- parameters["?assetID"] = item.assetID.ToStringHyphenated();
- parameters["?type"] = item.type.ToString();
- parameters["?parentFolderID"] = item.parentFolderID.ToStringHyphenated();
- parameters["?avatarID"] = item.avatarID.ToStringHyphenated();
- parameters["?inventoryName"] = item.inventoryName;
- parameters["?inventoryDescription"] = item.inventoryDescription;
- parameters["?inventoryNextPermissions"] = item.inventoryNextPermissions.ToString();
- parameters["?inventoryCurrentPermissions"] = item.inventoryCurrentPermissions.ToString();
-
- bool returnval = false;
-
- try
- {
- IDbCommand result = Query(sql, parameters);
-
- if (result.ExecuteNonQuery() == 1)
- returnval = true;
-
- result.Dispose();
- }
- catch (Exception e)
- {
- Console.WriteLine(e.ToString());
- return false;
- }
-
- return returnval;
- }
-
- ///
- /// Inserts a new folder into the database
- ///
- /// The folder
- /// Success?
- public bool insertFolder(InventoryFolderBase folder)
- {
- string sql = "REPLACE INTO inventoryfolders (folderID, agentID, parentFolderID, folderName) VALUES ";
- sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName)";
-
- Dictionary parameters = new Dictionary();
- parameters["?folderID"] = folder.folderID.ToStringHyphenated();
- parameters["?agentID"] = folder.agentID.ToStringHyphenated();
- parameters["?parentFolderID"] = folder.parentID.ToStringHyphenated();
- parameters["?folderName"] = folder.name;
-
- bool returnval = false;
- try
- {
- IDbCommand result = Query(sql, parameters);
-
- if (result.ExecuteNonQuery() == 1)
- returnval = true;
-
- result.Dispose();
- }
- catch (Exception e)
- {
- Console.WriteLine(e.ToString());
- return false;
- }
- return returnval;
- }
-
- ///
- /// Creates a new user and inserts it into the database
- ///
- /// User ID
- /// First part of the login
- /// Second part of the login
- /// A salted hash of the users password
- /// The salt used for the password hash
- /// A regionHandle of the users home region
- /// Home region position vector
- /// Home region position vector
- /// Home region position vector
- /// Home region 'look at' vector
- /// Home region 'look at' vector
- /// Home region 'look at' vector
- /// Account created (unix timestamp)
- /// Last login (unix timestamp)
- /// Users inventory URI
- /// Users asset URI
- /// I can do mask
- /// I want to do mask
- /// Profile text
- /// Firstlife text
- /// UUID for profile image
- /// UUID for firstlife image
- /// Success?
- public bool insertUserRow(libsecondlife.LLUUID uuid, string username, string lastname, string passwordHash, string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ,
- float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, string aboutText, string firstText,
- libsecondlife.LLUUID profileImage, libsecondlife.LLUUID firstImage)
- {
- string sql = "INSERT INTO users (`UUID`, `username`, `lastname`, `passwordHash`, `passworldSalt`, `homeRegion`, ";
- sql += "`homeLocationX`, `homeLocationY`, `homeLocationZ`, `homeLookAtX`, `homeLookAtY`, `homeLookAtZ`, `created`, ";
- sql += "`lastLogin`, `userInventoryURI`, `userAssetURI`, `profileCanDoMask`, `profileWantDoMask`, `profileAboutText`, ";
- sql += "`profileFirstText`, `profileImage`, profileFirstImage`) VALUES ";
-
- sql += "(?UUID, ?username, ?lastname, ?passwordHash, ?passworldSalt, ?homeRegion, ";
- sql += "?homeLocationX, ?homeLocationY, ?homeLocationZ, ?homeLookAtX`, ?homeLookAtY, ?homeLookAtZ, ?created, ";
- sql += "?lastLogin`, ?userInventoryURI, ?userAssetURI, ?profileCanDoMask, ?profileWantDoMask, ?profileAboutText, ";
- sql += "?profileFirstText, ?profileImage, ?profileFirstImage)";
-
- Dictionary parameters = new Dictionary();
- parameters["?UUID"] = uuid.ToStringHyphenated();
- parameters["?username"] = username.ToString();
- parameters["?lastname"] = lastname.ToString();
- parameters["?passwordHash"] = passwordHash.ToString();
- parameters["?passworldSalt"] = passwordSalt.ToString();
- parameters["?homeRegion"] = homeRegion.ToString();
- parameters["?homeLocationX"] = homeLocX.ToString();
- parameters["?homeLocationY"] = homeLocY.ToString();
- parameters["?homeLocationZ"] = homeLocZ.ToString();
- parameters["?homeLookAtX"] = homeLookAtX.ToString();
- parameters["?homeLookAtY"] = homeLookAtY.ToString();
- parameters["?homeLookAtZ"] = homeLookAtZ.ToString();
- parameters["?created"] = created.ToString();
- parameters["?lastLogin"] = lastlogin.ToString();
- parameters["?userInventoryURI"] = inventoryURI.ToString();
- parameters["?userAssetURI"] = assetURI.ToString();
- parameters["?profileCanDoMask"] = canDoMask.ToString();
- parameters["?profileWantDoMask"] = wantDoMask.ToString();
- parameters["?profileAboutText"] = aboutText.ToString();
- parameters["?profileFirstText"] = firstText.ToString();
- parameters["?profileImage"] = profileImage.ToStringHyphenated();
- parameters["?profileFirstImage"] = firstImage.ToStringHyphenated();
-
- bool returnval = false;
-
- try
- {
- IDbCommand result = Query(sql, parameters);
-
- if (result.ExecuteNonQuery() == 1)
- returnval = true;
-
- result.Dispose();
- }
- catch (Exception e)
- {
- Console.WriteLine(e.ToString());
- return false;
- }
-
- return returnval;
- }
-
- ///
- /// Inserts a new region into the database
- ///
- /// The region to insert
- /// Success?
- public bool insertRegion(SimProfileData regiondata)
- {
- string sql = "REPLACE INTO regions (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, ";
- sql += "serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, ";
- sql += "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture) VALUES ";
-
- sql += "(?regionHandle, ?regionName, ?uuid, ?regionRecvKey, ?regionSecret, ?regionSendKey, ?regionDataURI, ";
- sql += "?serverIP, ?serverPort, ?serverURI, ?locX, ?locY, ?locZ, ?eastOverrideHandle, ?westOverrideHandle, ?southOverrideHandle, ?northOverrideHandle, ?regionAssetURI, ?regionAssetRecvKey, ";
- sql += "?regionAssetSendKey, ?regionUserURI, ?regionUserRecvKey, ?regionUserSendKey, ?regionMapTexture);";
-
- Dictionary parameters = new Dictionary();
-
- parameters["?regionHandle"] = regiondata.regionHandle.ToString();
- parameters["?regionName"] = regiondata.regionName.ToString();
- parameters["?uuid"] = regiondata.UUID.ToStringHyphenated();
- parameters["?regionRecvKey"] = regiondata.regionRecvKey.ToString();
- parameters["?regionSecret"] = regiondata.regionSecret.ToString();
- parameters["?regionSendKey"] = regiondata.regionSendKey.ToString();
- parameters["?regionDataURI"] = regiondata.regionDataURI.ToString();
- parameters["?serverIP"] = regiondata.serverIP.ToString();
- parameters["?serverPort"] = regiondata.serverPort.ToString();
- parameters["?serverURI"] = regiondata.serverURI.ToString();
- parameters["?locX"] = regiondata.regionLocX.ToString();
- parameters["?locY"] = regiondata.regionLocY.ToString();
- parameters["?locZ"] = regiondata.regionLocZ.ToString();
- parameters["?eastOverrideHandle"] = regiondata.regionEastOverrideHandle.ToString();
- parameters["?westOverrideHandle"] = regiondata.regionWestOverrideHandle.ToString();
- parameters["?northOverrideHandle"] = regiondata.regionNorthOverrideHandle.ToString();
- parameters["?southOverrideHandle"] = regiondata.regionSouthOverrideHandle.ToString();
- parameters["?regionAssetURI"] = regiondata.regionAssetURI.ToString();
- parameters["?regionAssetRecvKey"] = regiondata.regionAssetRecvKey.ToString();
- parameters["?regionAssetSendKey"] = regiondata.regionAssetSendKey.ToString();
- parameters["?regionUserURI"] = regiondata.regionUserURI.ToString();
- parameters["?regionUserRecvKey"] = regiondata.regionUserRecvKey.ToString();
- parameters["?regionUserSendKey"] = regiondata.regionUserSendKey.ToString();
- parameters["?regionMapTexture"] = regiondata.regionMapTextureID.ToStringHyphenated();
-
- bool returnval = false;
-
- try
- {
-
- IDbCommand result = Query(sql, parameters);
-
- //Console.WriteLine(result.CommandText);
-
- if (result.ExecuteNonQuery() == 1)
- returnval = true;
-
- result.Dispose();
- }
- catch (Exception e)
- {
- Console.WriteLine(e.ToString());
- return false;
- }
-
- return returnval;
- }
- }
-}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLUserData.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLUserData.cs
deleted file mode 100644
index e988c94..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLUserData.cs
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-using OpenGrid.Framework.Data;
-using libsecondlife;
-
-namespace OpenGrid.Framework.Data.MySQL
-{
- ///
- /// A database interface class to a user profile storage system
- ///
- class MySQLUserData : IUserData
- {
- ///
- /// Database manager for MySQL
- ///
- public MySQLManager database;
-
- ///
- /// Loads and initialises the MySQL storage plugin
- ///
- public void Initialise()
- {
- // Load from an INI file connection details
- // TODO: move this to XML?
- IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini");
- string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname");
- string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database");
- string settingUsername = GridDataMySqlFile.ParseFileReadValue("username");
- string settingPassword = GridDataMySqlFile.ParseFileReadValue("password");
- string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling");
- string settingPort = GridDataMySqlFile.ParseFileReadValue("port");
-
- database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort);
- }
-
- ///
- /// Searches the database for a specified user profile
- ///
- /// The account name of the user
- /// A user profile
- public UserProfileData getUserByName(string name)
- {
- return getUserByName(name.Split(' ')[0], name.Split(' ')[1]);
- }
-
- ///
- /// Searches the database for a specified user profile by name components
- ///
- /// The first part of the account name
- /// The second part of the account name
- /// A user profile
- public UserProfileData getUserByName(string user, string last)
- {
- try
- {
- lock (database)
- {
- Dictionary param = new Dictionary();
- param["?first"] = user;
- param["?second"] = last;
-
- System.Data.IDbCommand result = database.Query("SELECT * FROM users WHERE username = ?first AND lastname = ?second", param);
- System.Data.IDataReader reader = result.ExecuteReader();
-
- UserProfileData row = database.readUserRow(reader);
-
- reader.Close();
- result.Dispose();
-
- return row;
- }
- }
- catch (Exception e)
- {
- database.Reconnect();
- Console.WriteLine(e.ToString());
- return null;
- }
- }
-
- ///
- /// Searches the database for a specified user profile by UUID
- ///
- /// The account ID
- /// The users profile
- public UserProfileData getUserByUUID(LLUUID uuid)
- {
- try
- {
- lock (database)
- {
- Dictionary param = new Dictionary();
- param["?uuid"] = uuid.ToStringHyphenated();
-
- System.Data.IDbCommand result = database.Query("SELECT * FROM users WHERE UUID = ?uuid", param);
- System.Data.IDataReader reader = result.ExecuteReader();
-
- UserProfileData row = database.readUserRow(reader);
-
- reader.Close();
- result.Dispose();
-
- return row;
- }
- }
- catch (Exception e)
- {
- database.Reconnect();
- Console.WriteLine(e.ToString());
- return null;
- }
- }
-
- ///
- /// Returns a user session searching by name
- ///
- /// The account name
- /// The users session
- public UserAgentData getAgentByName(string name)
- {
- return getAgentByName(name.Split(' ')[0], name.Split(' ')[1]);
- }
-
- ///
- /// Returns a user session by account name
- ///
- /// First part of the users account name
- /// Second part of the users account name
- /// The users session
- public UserAgentData getAgentByName(string user, string last)
- {
- UserProfileData profile = getUserByName(user, last);
- return getAgentByUUID(profile.UUID);
- }
-
- ///
- /// Returns an agent session by account UUID
- ///
- /// The accounts UUID
- /// The users session
- public UserAgentData getAgentByUUID(LLUUID uuid)
- {
- try
- {
- lock (database)
- {
- Dictionary param = new Dictionary();
- param["?uuid"] = uuid.ToStringHyphenated();
-
- System.Data.IDbCommand result = database.Query("SELECT * FROM agents WHERE UUID = ?uuid", param);
- System.Data.IDataReader reader = result.ExecuteReader();
-
- UserAgentData row = database.readAgentRow(reader);
-
- reader.Close();
- result.Dispose();
-
- return row;
- }
- }
- catch (Exception e)
- {
- database.Reconnect();
- Console.WriteLine(e.ToString());
- return null;
- }
- }
-
- ///
- /// Creates a new users profile
- ///
- /// The user profile to create
- public void addNewUserProfile(UserProfileData user)
- {
- try
- {
- lock (database)
- {
- database.insertUserRow(user.UUID, user.username, user.surname, user.passwordHash, user.passwordSalt, user.homeRegion, user.homeLocation.X, user.homeLocation.Y, user.homeLocation.Z,
- user.homeLookAt.X, user.homeLookAt.Y, user.homeLookAt.Z, user.created, user.lastLogin, user.userInventoryURI, user.userAssetURI, user.profileCanDoMask, user.profileWantDoMask,
- user.profileAboutText, user.profileFirstText, user.profileImage, user.profileFirstImage);
- }
- }
- catch (Exception e)
- {
- database.Reconnect();
- Console.WriteLine(e.ToString());
- }
- }
-
- ///
- /// Creates a new agent
- ///
- /// The agent to create
- public void addNewUserAgent(UserAgentData agent)
- {
- // Do nothing.
- }
-
- ///
- /// Performs a money transfer request between two accounts
- ///
- /// The senders account ID
- /// The recievers account ID
- /// The amount to transfer
- /// Success?
- public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount)
- {
- return false;
- }
-
- ///
- /// Performs an inventory transfer request between two accounts
- ///
- /// TODO: Move to inventory server
- /// The senders account ID
- /// The recievers account ID
- /// The item to transfer
- /// Success?
- public bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item)
- {
- return false;
- }
-
- ///
- /// Database provider name
- ///
- /// Provider name
- public string getName()
- {
- return "MySQL Userdata Interface";
- }
-
- ///
- /// Database provider version
- ///
- /// provider version
- public string getVersion()
- {
- return "0.1";
- }
- }
-}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj b/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj
deleted file mode 100644
index cc3aacb..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
- Local
- 8.0.50727
- 2.0
- {0F3C3AC1-0000-0000-0000-000000000000}
- Debug
- AnyCPU
-
-
-
- OpenGrid.Framework.Data.MySQL
- JScript
- Grid
- IE50
- false
- Library
-
- OpenGrid.Framework.Data.MySQL
-
-
-
-
-
- False
- 285212672
- False
-
-
- TRACE;DEBUG
-
- True
- 4096
- False
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
- False
- 285212672
- False
-
-
- TRACE
-
- False
- 4096
- True
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
-
- ..\..\bin\libsecondlife.dll
- False
-
-
- ..\..\bin\MySql.Data.dll
- False
-
-
- System.dll
- False
-
-
- System.Data.dll
- False
-
-
- System.Xml.dll
- False
-
-
-
-
- OpenGrid.Framework.Data
- {62CDF671-0000-0000-0000-000000000000}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
-
-
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build b/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build
deleted file mode 100644
index a5f4028..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/Properties/AssemblyInfo.cs
deleted file mode 100644
index 0bfd1d6..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("OpenGrid.Framework.Data.MySQL")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("OpenGrid.Framework.Data.MySQL")]
-[assembly: AssemblyCopyright("Copyright © 2007")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("e49826b2-dcef-41be-a5bd-596733fa3304")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj b/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj
deleted file mode 100644
index 63d0bd9..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj
+++ /dev/null
@@ -1,108 +0,0 @@
-
-
- Local
- 8.0.50727
- 2.0
- {1E3F341A-0000-0000-0000-000000000000}
- Debug
- AnyCPU
-
-
-
- OpenGrid.Framework.Data.SQLite
- JScript
- Grid
- IE50
- false
- Library
-
- OpenGrid.Framework.Data.SQLite
-
-
-
-
-
- False
- 285212672
- False
-
-
- TRACE;DEBUG
-
- True
- 4096
- False
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
- False
- 285212672
- False
-
-
- TRACE
-
- False
- 4096
- True
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
-
- ..\..\bin\libsecondlife.dll
- False
-
-
- System.dll
- False
-
-
- System.Data.dll
- False
-
-
- ..\..\bin\System.Data.SQLite.dll
- False
-
-
- System.Xml.dll
- False
-
-
-
-
- OpenGrid.Framework.Data
- {62CDF671-0000-0000-0000-000000000000}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
-
-
-
-
- Code
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.dll.build b/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.dll.build
deleted file mode 100644
index 79b0edf..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.dll.build
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGrid.Framework.Data.SQLite/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Framework.Data.SQLite/Properties/AssemblyInfo.cs
deleted file mode 100644
index 57c4bae..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("OpenGrid.Framework.Data.SQLite")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("OpenGrid.Framework.Data.SQLite")]
-[assembly: AssemblyCopyright("Copyright © 2007")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("6113d5ce-4547-49f4-9236-0dcc503457b1")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteGridData.cs b/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteGridData.cs
deleted file mode 100644
index 94ed46f..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteGridData.cs
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-using OpenGrid.Framework.Data;
-
-namespace OpenGrid.Framework.Data.SQLite
-{
- ///
- /// A Grid Interface to the SQLite database
- ///
- public class SQLiteGridData : IGridData
- {
- ///
- /// A database manager
- ///
- private SQLiteManager database;
-
- ///
- /// Initialises the Grid Interface
- ///
- public void Initialise()
- {
- database = new SQLiteManager("localhost", "db", "user", "password", "false");
- }
-
- ///
- /// Shuts down the grid interface
- ///
- public void Close()
- {
- database.Close();
- }
-
- ///
- /// Returns the name of this grid interface
- ///
- /// A string containing the grid interface
- public string getName()
- {
- return "SQLite OpenGridData";
- }
-
- ///
- /// Returns the version of this grid interface
- ///
- /// A string containing the version
- public string getVersion()
- {
- return "0.1";
- }
-
- ///
- /// Returns a list of regions within the specified ranges
- ///
- /// minimum X coordinate
- /// minimum Y coordinate
- /// maximum X coordinate
- /// maximum Y coordinate
- /// An array of region profiles
- public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d)
- {
- return null;
- }
-
- ///
- /// Returns a sim profile from it's location
- ///
- /// Region location handle
- /// Sim profile
- public SimProfileData GetProfileByHandle(ulong handle)
- {
- Dictionary param = new Dictionary();
- param["handle"] = handle.ToString();
-
- System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param);
- System.Data.IDataReader reader = result.ExecuteReader();
-
- SimProfileData row = database.getRow(reader);
- reader.Close();
- result.Dispose();
-
- return row;
- }
-
- ///
- /// Returns a sim profile from it's UUID
- ///
- /// The region UUID
- /// The sim profile
- public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid)
- {
- Dictionary param = new Dictionary();
- param["uuid"] = uuid.ToStringHyphenated();
-
- System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param);
- System.Data.IDataReader reader = result.ExecuteReader();
-
- SimProfileData row = database.getRow(reader);
- reader.Close();
- result.Dispose();
-
- return row;
- }
-
- ///
- /// Adds a new specified region to the database
- ///
- /// The profile to add
- /// A dataresponse enum indicating success
- public DataResponse AddProfile(SimProfileData profile)
- {
- if (database.insertRow(profile))
- {
- return DataResponse.RESPONSE_OK;
- }
- else
- {
- return DataResponse.RESPONSE_ERROR;
- }
- }
-
- ///
- /// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret.
- ///
- /// The UUID of the challenger
- /// The attempted regionHandle of the challenger
- /// The secret
- /// Whether the secret and regionhandle match the database entry for UUID
- public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey)
- {
- bool throwHissyFit = false; // Should be true by 1.0
-
- if (throwHissyFit)
- throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential.");
-
- SimProfileData data = GetProfileByLLUUID(uuid);
-
- return (handle == data.regionHandle && authkey == data.regionSecret);
- }
-
- ///
- /// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region
- ///
- /// This requires a security audit.
- ///
- ///
- ///
- ///
- ///
- public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authhash, string challenge)
- {
- System.Security.Cryptography.SHA512Managed HashProvider = new System.Security.Cryptography.SHA512Managed();
- System.Text.ASCIIEncoding TextProvider = new ASCIIEncoding();
-
- byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge);
- byte[] hash = HashProvider.ComputeHash(stream);
-
- return false;
- }
- }
-
-
-}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs b/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs
deleted file mode 100644
index 9689356..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs
+++ /dev/null
@@ -1,209 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Data;
-
-using System.Data.SQLite;
-
-using OpenGrid.Framework.Data;
-
-namespace OpenGrid.Framework.Data.SQLite
-{
- class SQLiteManager
- {
- IDbConnection dbcon;
-
- ///
- /// Initialises and creates a new SQLite connection and maintains it.
- ///
- /// The SQLite server being connected to
- /// The name of the SQLite database being used
- /// The username logging into the database
- /// The password for the user logging in
- /// Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.
- public SQLiteManager(string hostname, string database, string username, string password, string cpooling)
- {
- try
- {
- string connectionString = "URI=file:GridServerSqlite.db;";
- dbcon = new SQLiteConnection(connectionString);
-
- dbcon.Open();
- }
- catch (Exception e)
- {
- throw new Exception("Error initialising SQLite Database: " + e.ToString());
- }
- }
-
- ///
- /// Shuts down the database connection
- ///
- public void Close()
- {
- dbcon.Close();
- dbcon = null;
- }
-
- ///
- /// Runs a query with protection against SQL Injection by using parameterised input.
- ///
- /// The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y
- /// The parameters - index so that @y is indexed as 'y'
- /// A SQLite DB Command
- public IDbCommand Query(string sql, Dictionary parameters)
- {
- SQLiteCommand dbcommand = (SQLiteCommand)dbcon.CreateCommand();
- dbcommand.CommandText = sql;
- foreach (KeyValuePair param in parameters)
- {
- SQLiteParameter paramx = new SQLiteParameter(param.Key,param.Value);
- dbcommand.Parameters.Add(paramx);
- }
-
- return (IDbCommand)dbcommand;
- }
-
- ///
- /// Reads a region row from a database reader
- ///
- /// An active database reader
- /// A region profile
- public SimProfileData getRow(IDataReader reader)
- {
- SimProfileData retval = new SimProfileData();
-
- if (reader.Read())
- {
- // Region Main
- retval.regionHandle = (ulong)reader["regionHandle"];
- retval.regionName = (string)reader["regionName"];
- retval.UUID = new libsecondlife.LLUUID((string)reader["uuid"]);
-
- // Secrets
- retval.regionRecvKey = (string)reader["regionRecvKey"];
- retval.regionSecret = (string)reader["regionSecret"];
- retval.regionSendKey = (string)reader["regionSendKey"];
-
- // Region Server
- retval.regionDataURI = (string)reader["regionDataURI"];
- retval.regionOnline = false; // Needs to be pinged before this can be set.
- retval.serverIP = (string)reader["serverIP"];
- retval.serverPort = (uint)reader["serverPort"];
- retval.serverURI = (string)reader["serverURI"];
-
- // Location
- retval.regionLocX = (uint)((int)reader["locX"]);
- retval.regionLocY = (uint)((int)reader["locY"]);
- retval.regionLocZ = (uint)((int)reader["locZ"]);
-
- // Neighbours - 0 = No Override
- retval.regionEastOverrideHandle = (ulong)reader["eastOverrideHandle"];
- retval.regionWestOverrideHandle = (ulong)reader["westOverrideHandle"];
- retval.regionSouthOverrideHandle = (ulong)reader["southOverrideHandle"];
- retval.regionNorthOverrideHandle = (ulong)reader["northOverrideHandle"];
-
- // Assets
- retval.regionAssetURI = (string)reader["regionAssetURI"];
- retval.regionAssetRecvKey = (string)reader["regionAssetRecvKey"];
- retval.regionAssetSendKey = (string)reader["regionAssetSendKey"];
-
- // Userserver
- retval.regionUserURI = (string)reader["regionUserURI"];
- retval.regionUserRecvKey = (string)reader["regionUserRecvKey"];
- retval.regionUserSendKey = (string)reader["regionUserSendKey"];
- }
- else
- {
- throw new Exception("No rows to return");
- }
- return retval;
- }
-
- ///
- /// Inserts a new region into the database
- ///
- /// The region to insert
- /// Success?
- public bool insertRow(SimProfileData profile)
- {
- string sql = "REPLACE INTO regions VALUES (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, ";
- sql += "serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, ";
- sql += "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey) VALUES ";
-
- sql += "(@regionHandle, @regionName, @uuid, @regionRecvKey, @regionSecret, @regionSendKey, @regionDataURI, ";
- sql += "@serverIP, @serverPort, @serverURI, @locX, @locY, @locZ, @eastOverrideHandle, @westOverrideHandle, @southOverrideHandle, @northOverrideHandle, @regionAssetURI, @regionAssetRecvKey, ";
- sql += "@regionAssetSendKey, @regionUserURI, @regionUserRecvKey, @regionUserSendKey);";
-
- Dictionary parameters = new Dictionary();
-
- parameters["regionHandle"] = profile.regionHandle.ToString();
- parameters["regionName"] = profile.regionName;
- parameters["uuid"] = profile.UUID.ToString();
- parameters["regionRecvKey"] = profile.regionRecvKey;
- parameters["regionSendKey"] = profile.regionSendKey;
- parameters["regionDataURI"] = profile.regionDataURI;
- parameters["serverIP"] = profile.serverIP;
- parameters["serverPort"] = profile.serverPort.ToString();
- parameters["serverURI"] = profile.serverURI;
- parameters["locX"] = profile.regionLocX.ToString();
- parameters["locY"] = profile.regionLocY.ToString();
- parameters["locZ"] = profile.regionLocZ.ToString();
- parameters["eastOverrideHandle"] = profile.regionEastOverrideHandle.ToString();
- parameters["westOverrideHandle"] = profile.regionWestOverrideHandle.ToString();
- parameters["northOverrideHandle"] = profile.regionNorthOverrideHandle.ToString();
- parameters["southOverrideHandle"] = profile.regionSouthOverrideHandle.ToString();
- parameters["regionAssetURI"] = profile.regionAssetURI;
- parameters["regionAssetRecvKey"] = profile.regionAssetRecvKey;
- parameters["regionAssetSendKey"] = profile.regionAssetSendKey;
- parameters["regionUserURI"] = profile.regionUserURI;
- parameters["regionUserRecvKey"] = profile.regionUserRecvKey;
- parameters["regionUserSendKey"] = profile.regionUserSendKey;
-
- bool returnval = false;
-
- try
- {
- IDbCommand result = Query(sql, parameters);
-
- if (result.ExecuteNonQuery() == 1)
- returnval = true;
-
- result.Dispose();
- }
- catch (Exception e)
- {
- return false;
- }
-
- return returnval;
- }
- }
-}
diff --git a/OpenGridServices/OpenGrid.Framework.Data/GridData.cs b/OpenGridServices/OpenGrid.Framework.Data/GridData.cs
deleted file mode 100644
index e9fb215..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data/GridData.cs
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace OpenGrid.Framework.Data
-{
- public enum DataResponse
- {
- RESPONSE_OK,
- RESPONSE_AUTHREQUIRED,
- RESPONSE_INVALIDCREDENTIALS,
- RESPONSE_ERROR
- }
-
- ///
- /// A standard grid interface
- ///
- public interface IGridData
- {
- ///
- /// Returns a sim profile from a regionHandle
- ///
- /// A 64bit Region Handle
- /// A simprofile
- SimProfileData GetProfileByHandle(ulong regionHandle);
-
- ///
- /// Returns a sim profile from a UUID
- ///
- /// A 128bit UUID
- /// A sim profile
- SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID UUID);
-
- ///
- /// Returns all profiles within the specified range
- ///
- /// Minimum sim coordinate (X)
- /// Minimum sim coordinate (Y)
- /// Maximum sim coordinate (X)
- /// Maximum sim coordinate (Y)
- /// An array containing all the sim profiles in the specified range
- SimProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax);
-
- ///
- /// Authenticates a sim by use of it's recv key.
- /// WARNING: Insecure
- ///
- /// The UUID sent by the sim
- /// The regionhandle sent by the sim
- /// The recieving key sent by the sim
- /// Whether the sim has been authenticated
- bool AuthenticateSim(libsecondlife.LLUUID UUID, ulong regionHandle, string simrecvkey);
-
- ///
- /// Initialises the interface
- ///
- void Initialise();
-
- ///
- /// Closes the interface
- ///
- void Close();
-
- ///
- /// The plugin being loaded
- ///
- /// A string containing the plugin name
- string getName();
-
- ///
- /// The plugins version
- ///
- /// A string containing the plugin version
- string getVersion();
-
- ///
- /// Adds a new profile to the database
- ///
- /// The profile to add
- /// RESPONSE_OK if successful, error if not.
- DataResponse AddProfile(SimProfileData profile);
- }
-}
diff --git a/OpenGridServices/OpenGrid.Framework.Data/ILogData.cs b/OpenGridServices/OpenGrid.Framework.Data/ILogData.cs
deleted file mode 100644
index 2ac0bfe..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data/ILogData.cs
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace OpenGrid.Framework.Data
-{
- ///
- /// The severity of an individual log message
- ///
- public enum LogSeverity : int
- {
- ///
- /// Critical: systems failure
- ///
- CRITICAL = 1,
- ///
- /// Major: warning prior to systems failure
- ///
- MAJOR = 2,
- ///
- /// Medium: an individual non-critical task failed
- ///
- MEDIUM = 3,
- ///
- /// Low: Informational warning
- ///
- LOW = 4,
- ///
- /// Info: Information
- ///
- INFO = 5,
- ///
- /// Verbose: Debug Information
- ///
- VERBOSE = 6
- }
-
- ///
- /// An interface to a LogData storage system
- ///
- public interface ILogData
- {
- void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority,string logMessage);
- ///
- /// Initialises the interface
- ///
- void Initialise();
-
- ///
- /// Closes the interface
- ///
- void Close();
-
- ///
- /// The plugin being loaded
- ///
- /// A string containing the plugin name
- string getName();
-
- ///
- /// The plugins version
- ///
- /// A string containing the plugin version
- string getVersion();
- }
-
-}
diff --git a/OpenGridServices/OpenGrid.Framework.Data/IniConfig.cs b/OpenGridServices/OpenGrid.Framework.Data/IniConfig.cs
deleted file mode 100644
index d17afac..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data/IniConfig.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.IO;
-using System.Text.RegularExpressions;
-
-/*
- Taken from public code listing at by Alex Pinsker
- http://alexpinsker.blogspot.com/2005/12/reading-ini-file-from-c_113432097333021549.html
- */
-
-namespace OpenGrid.Framework.Data
-{
- ///
- /// Parse settings from ini-like files
- ///
- public class IniFile
- {
- static IniFile()
- {
- _iniKeyValuePatternRegex = new Regex(
- @"((\s)*(?([^\=^\s^\n]+))[\s^\n]*
- # key part (surrounding whitespace stripped)
- \=
- (\s)*(?([^\n^\s]+(\n){0,1})))
- # value part (surrounding whitespace stripped)
- ",
- RegexOptions.IgnorePatternWhitespace |
- RegexOptions.Compiled |
- RegexOptions.CultureInvariant);
- }
- static private Regex _iniKeyValuePatternRegex;
-
- public IniFile(string iniFileName)
- {
- _iniFileName = iniFileName;
- }
-
- public string ParseFileReadValue(string key)
- {
- using (StreamReader reader =
- new StreamReader(_iniFileName))
- {
- do
- {
- string line = reader.ReadLine();
- Match match =
- _iniKeyValuePatternRegex.Match(line);
- if (match.Success)
- {
- string currentKey =
- match.Groups["Key"].Value as string;
- if (currentKey != null &&
- currentKey.Trim().CompareTo(key) == 0)
- {
- string value =
- match.Groups["Value"].Value as string;
- return value;
- }
- }
-
- }
- while (reader.Peek() != -1);
- }
- return null;
- }
-
- public string IniFileName
- {
- get { return _iniFileName; }
- } private string _iniFileName;
- }
-}
diff --git a/OpenGridServices/OpenGrid.Framework.Data/InventoryData.cs b/OpenGridServices/OpenGrid.Framework.Data/InventoryData.cs
deleted file mode 100644
index 12f559b..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data/InventoryData.cs
+++ /dev/null
@@ -1,187 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-using libsecondlife;
-
-namespace OpenGrid.Framework.Data
-{
- ///
- /// Inventory Item - contains all the properties associated with an individual inventory piece.
- ///
- public class InventoryItemBase
- {
- ///
- /// A UUID containing the ID for the inventory item itself
- ///
- public LLUUID inventoryID;
- ///
- /// The UUID of the associated asset on the asset server
- ///
- public LLUUID assetID;
- ///
- /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
- ///
- public int type;
- ///
- /// The folder this item is contained in (NULL_KEY = Inventory Root)
- ///
- public LLUUID parentFolderID;
- ///
- /// The owner of this inventory item
- ///
- public LLUUID avatarID;
- ///
- /// The name of the inventory item (must be less than 64 characters)
- ///
- public string inventoryName;
- ///
- /// The description of the inventory item (must be less than 64 characters)
- ///
- public string inventoryDescription;
- ///
- /// A mask containing the permissions for the next owner (cannot be enforced)
- ///
- public uint inventoryNextPermissions;
- ///
- /// A mask containing permissions for the current owner (cannot be enforced)
- ///
- public uint inventoryCurrentPermissions;
- }
-
- ///
- /// A Class for folders which contain users inventory
- ///
- public class InventoryFolderBase
- {
- ///
- /// The name of the folder (64 characters or less)
- ///
- public string name;
- ///
- /// The agent who's inventory this is contained by
- ///
- public LLUUID agentID;
- ///
- /// The folder this folder is contained in (NULL_KEY for root)
- ///
- public LLUUID parentID;
- ///
- /// The UUID for this folder
- ///
- public LLUUID folderID;
- }
-
- ///
- /// An interface for accessing inventory data from a storage server
- ///
- public interface IInventoryData
- {
- ///
- /// Initialises the interface
- ///
- void Initialise();
-
- ///
- /// Closes the interface
- ///
- void Close();
-
- ///
- /// The plugin being loaded
- ///
- /// A string containing the plugin name
- string getName();
-
- ///
- /// The plugins version
- ///
- /// A string containing the plugin version
- string getVersion();
-
- ///
- /// Returns a list of inventory items contained within the specified folder
- ///
- /// The UUID of the target folder
- /// A List of InventoryItemBase items
- List getInventoryInFolder(LLUUID folderID);
-
- ///
- /// Returns a list of folders in the users inventory root.
- ///
- /// The UUID of the user who is having inventory being returned
- /// A list of folders
- List getUserRootFolders(LLUUID user);
-
- ///
- /// Returns a list of inventory folders contained in the folder 'parentID'
- ///
- /// The folder to get subfolders for
- /// A list of inventory folders
- List getInventoryFolders(LLUUID parentID);
-
- ///
- /// Returns an inventory item by its UUID
- ///
- /// The UUID of the item to be returned
- /// A class containing item information
- InventoryItemBase getInventoryItem(LLUUID item);
-
- ///
- /// Returns a specified inventory folder by its UUID
- ///
- /// The UUID of the folder to be returned
- /// A class containing folder information
- InventoryFolderBase getInventoryFolder(LLUUID folder);
-
- ///
- /// Creates a new inventory item based on item
- ///
- /// The item to be created
- void addInventoryItem(InventoryItemBase item);
-
- ///
- /// Updates an inventory item with item (updates based on ID)
- ///
- /// The updated item
- void updateInventoryItem(InventoryItemBase item);
-
- ///
- /// Adds a new folder specified by folder
- ///
- /// The inventory folder
- void addInventoryFolder(InventoryFolderBase folder);
-
- ///
- /// Updates a folder based on its ID with folder
- ///
- /// The inventory folder
- void updateInventoryFolder(InventoryFolderBase folder);
- }
-}
diff --git a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj
deleted file mode 100644
index 0b53b02..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj
+++ /dev/null
@@ -1,113 +0,0 @@
-
-
- Local
- 8.0.50727
- 2.0
- {62CDF671-0000-0000-0000-000000000000}
- Debug
- AnyCPU
-
-
-
- OpenGrid.Framework.Data
- JScript
- Grid
- IE50
- false
- Library
-
- OpenGrid.Framework.Data
-
-
-
-
-
- False
- 285212672
- False
-
-
- TRACE;DEBUG
-
- True
- 4096
- False
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
- False
- 285212672
- False
-
-
- TRACE
-
- False
- 4096
- True
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
-
- ..\..\bin\libsecondlife.dll
- False
-
-
- System.dll
- False
-
-
- System.Data.dll
- False
-
-
- System.Xml.dll
- False
-
-
-
-
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build
deleted file mode 100644
index 7abebeb..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs
deleted file mode 100644
index 1446673..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("OpenGrid.Framework.Data")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("OpenGrid.Framework.Data")]
-[assembly: AssemblyCopyright("Copyright © 2007")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("3a711c34-b0c0-4264-b0fe-f366eabf9d7b")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenGridServices/OpenGrid.Framework.Data/SimProfileData.cs b/OpenGridServices/OpenGrid.Framework.Data/SimProfileData.cs
deleted file mode 100644
index a3e7cb7..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data/SimProfileData.cs
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace OpenGrid.Framework.Data
-{
- ///
- /// A class which contains information known to the grid server about a region
- ///
- public class SimProfileData
- {
- ///
- /// The name of the region
- ///
- public string regionName = "";
-
- ///
- /// A 64-bit number combining map position into a (mostly) unique ID
- ///
- public ulong regionHandle;
-
- ///
- /// OGS/OpenSim Specific ID for a region
- ///
- public libsecondlife.LLUUID UUID;
-
- ///
- /// Coordinates of the region
- ///
- public uint regionLocX;
- public uint regionLocY;
- public uint regionLocZ; // Reserved (round-robin, layers, etc)
-
- ///
- /// Authentication secrets
- ///
- /// Not very secure, needs improvement.
- public string regionSendKey = "";
- public string regionRecvKey = "";
- public string regionSecret = "";
-
- ///
- /// Whether the region is online
- ///
- public bool regionOnline;
-
- ///
- /// Information about the server that the region is currently hosted on
- ///
- public string serverIP = "";
- public uint serverPort;
- public string serverURI = "";
-
- ///
- /// Set of optional overrides. Can be used to create non-eulicidean spaces.
- ///
- public ulong regionNorthOverrideHandle;
- public ulong regionSouthOverrideHandle;
- public ulong regionEastOverrideHandle;
- public ulong regionWestOverrideHandle;
-
- ///
- /// Optional: URI Location of the region database
- ///
- /// Used for floating sim pools where the region data is not nessecarily coupled to a specific server
- public string regionDataURI = "";
-
- ///
- /// Region Asset Details
- ///
- public string regionAssetURI = "";
- public string regionAssetSendKey = "";
- public string regionAssetRecvKey = "";
-
- ///
- /// Region Userserver Details
- ///
- public string regionUserURI = "";
- public string regionUserSendKey = "";
- public string regionUserRecvKey = "";
-
- ///
- /// Region Map Texture Asset
- ///
- public libsecondlife.LLUUID regionMapTextureID = new libsecondlife.LLUUID("00000000-0000-0000-9999-000000000006");
- }
-}
diff --git a/OpenGridServices/OpenGrid.Framework.Data/UserData.cs b/OpenGridServices/OpenGrid.Framework.Data/UserData.cs
deleted file mode 100644
index c2d5a72..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data/UserData.cs
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-using libsecondlife;
-
-namespace OpenGrid.Framework.Data
-{
- ///
- /// An interface for connecting to user storage servers.
- ///
- public interface IUserData
- {
- ///
- /// Returns a user profile from a database via their UUID
- ///
- /// The accounts UUID
- /// The user data profile
- UserProfileData getUserByUUID(LLUUID user);
-
- ///
- /// Returns a users profile by searching their username
- ///
- /// The users username
- /// The user data profile
- UserProfileData getUserByName(string name);
-
- ///
- /// Returns a users profile by searching their username parts
- ///
- /// Account firstname
- /// Account lastname
- /// The user data profile
- UserProfileData getUserByName(string fname, string lname);
-
- ///
- /// Returns the current agent for a user searching by it's UUID
- ///
- /// The users UUID
- /// The current agent session
- UserAgentData getAgentByUUID(LLUUID user);
-
- ///
- /// Returns the current session agent for a user searching by username
- ///
- /// The users account name
- /// The current agent session
- UserAgentData getAgentByName(string name);
-
- ///
- /// Returns the current session agent for a user searching by username parts
- ///
- /// The users first account name
- /// The users account surname
- /// The current agent session
- UserAgentData getAgentByName(string fname, string lname);
-
- ///
- /// Adds a new User profile to the database
- ///
- /// UserProfile to add
- void addNewUserProfile(UserProfileData user);
-
- ///
- /// Adds a new agent to the database
- ///
- /// The agent to add
- void addNewUserAgent(UserAgentData agent);
-
- ///
- /// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES)
- ///
- /// The account to transfer from
- /// The account to transfer to
- /// The amount to transfer
- /// Successful?
- bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount);
-
- ///
- /// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account.
- ///
- /// User to transfer from
- /// User to transfer to
- /// Specified inventory item
- /// Successful?
- bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory);
-
- ///
- /// Returns the plugin version
- ///
- /// Plugin version in MAJOR.MINOR.REVISION.BUILD format
- string getVersion();
-
- ///
- /// Returns the plugin name
- ///
- /// Plugin name, eg MySQL User Provider
- string getName();
-
- ///
- /// Initialises the plugin (artificial constructor)
- ///
- void Initialise();
- }
-}
diff --git a/OpenGridServices/OpenGrid.Framework.Data/UserProfileData.cs b/OpenGridServices/OpenGrid.Framework.Data/UserProfileData.cs
deleted file mode 100644
index 82633e1..0000000
--- a/OpenGridServices/OpenGrid.Framework.Data/UserProfileData.cs
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-using libsecondlife;
-
-namespace OpenGrid.Framework.Data
-{
- ///
- /// Information about a particular user known to the userserver
- ///
- public class UserProfileData
- {
- ///
- /// The ID value for this user
- ///
- public LLUUID UUID;
-
- ///
- /// The first component of a users account name
- ///
- public string username;
- ///
- /// The second component of a users account name
- ///
- public string surname;
-
- ///
- /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt)
- ///
- /// This is double MD5'd because the client sends an unsalted MD5 to the loginserver
- public string passwordHash;
- ///
- /// The salt used for the users hash, should be 32 bytes or longer
- ///
- public string passwordSalt;
-
- ///
- /// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into
- ///
- public ulong homeRegion;
- ///
- /// The coordinates inside the region of the home location
- ///
- public LLVector3 homeLocation;
- ///
- /// Where the user will be looking when they rez.
- ///
- public LLVector3 homeLookAt;
-
- ///
- /// A UNIX Timestamp (seconds since epoch) for the users creation
- ///
- public int created;
- ///
- /// A UNIX Timestamp for the users last login date / time
- ///
- public int lastLogin;
-
- ///
- /// A URI to the users inventory server, used for foreigners and large grids
- ///
- public string userInventoryURI;
- ///
- /// A URI to the users asset server, used for foreigners and large grids.
- ///
- public string userAssetURI;
-
- ///
- /// A uint mask containing the "I can do" fields of the users profile
- ///
- public uint profileCanDoMask;
- ///
- /// A uint mask containing the "I want to do" part of the users profile
- ///
- public uint profileWantDoMask; // Profile window "I want to" mask
-
- ///
- /// The about text listed in a users profile.
- ///
- public string profileAboutText;
- ///
- /// The first life about text listed in a users profile
- ///
- public string profileFirstText;
-
- ///
- /// The profile image for an avatar stored on the asset server
- ///
- public LLUUID profileImage;
- ///
- /// The profile image for the users first life tab
- ///
- public LLUUID profileFirstImage;
- ///
- /// The users last registered agent (filled in on the user server)
- ///
- public UserAgentData currentAgent;
- }
-
- ///
- /// Information about a users session
- ///
- public class UserAgentData
- {
- ///
- /// The UUID of the users avatar (not the agent!)
- ///
- public LLUUID UUID;
- ///
- /// The IP address of the user
- ///
- public string agentIP;
- ///
- /// The port of the user
- ///
- public uint agentPort;
- ///
- /// Is the user online?
- ///
- public bool agentOnline;
- ///
- /// The session ID for the user (also the agent ID)
- ///
- public LLUUID sessionID;
- ///
- /// The "secure" session ID for the user
- ///
- /// Not very secure. Dont rely on it for anything more than Linden Lab does.
- public LLUUID secureSessionID;
- ///
- /// The region the user logged into initially
- ///
- public LLUUID regionID;
- ///
- /// A unix timestamp from when the user logged in
- ///
- public int loginTime;
- ///
- /// When this agent expired and logged out, 0 if still online
- ///
- public int logoutTime;
- ///
- /// Current region the user is logged into
- ///
- public LLUUID currentRegion;
- ///
- /// Region handle of the current region the user is in
- ///
- public ulong currentHandle;
- ///
- /// The position of the user within the region
- ///
- public LLVector3 currentPos;
- }
-}
diff --git a/OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs b/OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs
deleted file mode 100644
index dfc572a..0000000
--- a/OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using Nwc.XmlRpc;
-using OpenSim.Framework;
-using OpenSim.Servers;
-using System.Collections;
-using System.Collections.Generic;
-using libsecondlife;
-
-namespace OpenGrid.Framework.Manager
-{
- ///
- /// Used to pass messages to the gridserver
- ///
- /// Pass this argument
- public delegate void GridManagerCallback(string param);
-
- ///
- /// Serverside listener for grid commands
- ///
- public class GridManagementAgent
- {
- ///
- /// Passes grid server messages
- ///
- private GridManagerCallback thecallback;
-
- ///
- /// Security keys
- ///
- private string sendkey;
- private string recvkey;
-
- ///
- /// Our component type
- ///
- private string component_type;
-
- ///
- /// List of active sessions
- ///
- private static ArrayList Sessions;
-
- ///
- /// Initialises a new GridManagementAgent
- ///
- /// HTTP Daemon for this server
- /// What component type are we?
- /// Security send key
- /// Security recieve key
- /// Message callback
- public GridManagementAgent(BaseHttpServer app_httpd, string component_type, string sendkey, string recvkey, GridManagerCallback thecallback)
- {
- this.sendkey = sendkey;
- this.recvkey = recvkey;
- this.component_type = component_type;
- this.thecallback = thecallback;
- Sessions = new ArrayList();
-
- app_httpd.AddXmlRPCHandler("manager_login", XmlRpcLoginMethod);
-
- switch (component_type)
- {
- case "gridserver":
- GridServerManager.sendkey = this.sendkey;
- GridServerManager.recvkey = this.recvkey;
- GridServerManager.thecallback = thecallback;
- app_httpd.AddXmlRPCHandler("shutdown", GridServerManager.XmlRpcShutdownMethod);
- break;
- }
- }
-
- ///
- /// Checks if a session exists
- ///
- /// The session ID
- /// Exists?
- public static bool SessionExists(LLUUID sessionID)
- {
- return Sessions.Contains(sessionID);
- }
-
- ///
- /// Logs a new session to the grid manager
- ///
- /// the XMLRPC request
- /// An XMLRPC reply
- public static XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
- {
- XmlRpcResponse response = new XmlRpcResponse();
- Hashtable requestData = (Hashtable)request.Params[0];
- Hashtable responseData = new Hashtable();
-
- // TODO: Switch this over to using OpenGrid.Framework.Data
- if (requestData["username"].Equals("admin") && requestData["password"].Equals("supersecret"))
- {
- response.IsFault = false;
- LLUUID new_session = LLUUID.Random();
- Sessions.Add(new_session);
- responseData["session_id"] = new_session.ToString();
- responseData["msg"] = "Login OK";
- }
- else
- {
- response.IsFault = true;
- responseData["error"] = "Invalid username or password";
- }
-
- response.Value = responseData;
- return response;
-
- }
-
- }
-}
diff --git a/OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs b/OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs
deleted file mode 100644
index d665ab4..0000000
--- a/OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using Nwc.XmlRpc;
-using System.Threading;
-using libsecondlife;
-
-namespace OpenGrid.Framework.Manager {
-
- ///
- /// A remote management system for the grid server
- ///
- public class GridServerManager
- {
- ///
- /// Triggers events from the grid manager
- ///
- public static GridManagerCallback thecallback;
-
- ///
- /// Security keys
- ///
- public static string sendkey;
- public static string recvkey;
-
- ///
- /// Disconnects the grid server and shuts it down
- ///
- /// XmlRpc Request
- /// An XmlRpc response containing either a "msg" or an "error"
- public static XmlRpcResponse XmlRpcShutdownMethod(XmlRpcRequest request)
- {
- XmlRpcResponse response = new XmlRpcResponse();
- Hashtable requestData = (Hashtable)request.Params[0];
- Hashtable responseData = new Hashtable();
-
- if(requestData.ContainsKey("session_id")) {
- if(GridManagementAgent.SessionExists(new LLUUID((string)requestData["session_id"]))) {
- responseData["msg"]="Shutdown command accepted";
- (new Thread(new ThreadStart(ShutdownServer))).Start();
- } else {
- response.IsFault=true;
- responseData["error"]="bad session ID";
- }
- } else {
- response.IsFault=true;
- responseData["error"]="no session ID";
- }
-
- response.Value = responseData;
- return response;
- }
-
- ///
- /// Shuts down the grid server
- ///
- public static void ShutdownServer()
- {
- Console.WriteLine("Shutting down the grid server - recieved a grid manager request");
- Console.WriteLine("Terminating in three seconds...");
- Thread.Sleep(3000);
- thecallback("shutdown");
- }
- }
-}
-
diff --git a/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj b/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj
deleted file mode 100644
index 83ba00f..0000000
--- a/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
- Local
- 8.0.50727
- 2.0
- {7924FD35-0000-0000-0000-000000000000}
- Debug
- AnyCPU
-
-
-
- OpenGrid.Framework.Manager
- JScript
- Grid
- IE50
- false
- Library
-
- OpenGrid.Framework.Manager
-
-
-
-
-
- False
- 285212672
- False
-
-
- TRACE;DEBUG
-
- True
- 4096
- False
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
- False
- 285212672
- False
-
-
- TRACE
-
- False
- 4096
- True
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
-
- ..\..\bin\libsecondlife.dll
- False
-
-
- ..\..\bin\OpenSim.Framework.dll
- False
-
-
- ..\..\bin\OpenSim.Servers.dll
- False
-
-
- System.dll
- False
-
-
- XMLRPC.dll
- False
-
-
-
-
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build b/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build
deleted file mode 100644
index 9430ab9..0000000
--- a/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs b/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs
deleted file mode 100644
index 6fc6bf8..0000000
--- a/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Net;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Threading;
-//using OpenSim.CAPS;
-using Nwc.XmlRpc;
-using System.Collections;
-using OpenSim.Framework.Console;
-using OpenSim.Servers;
-
-namespace OpenGridServices.AssetServer
-{
- ///
- /// An HTTP server for sending assets
- ///
- public class AssetHttpServer :BaseHttpServer
- {
- ///
- /// Creates the new asset server
- ///
- /// Port to initalise on
- public AssetHttpServer(int port)
- : base(port)
- {
- }
-
- ///
- /// Handles an HTTP request
- ///
- /// HTTP State Info
- public override void HandleRequest(Object stateinfo)
- {
- try
- {
- HttpListenerContext context = (HttpListenerContext)stateinfo;
-
- HttpListenerRequest request = context.Request;
- HttpListenerResponse response = context.Response;
-
- response.KeepAlive = false;
- response.SendChunked = false;
-
- System.IO.Stream body = request.InputStream;
- System.Text.Encoding encoding = System.Text.Encoding.UTF8;
- System.IO.StreamReader reader = new System.IO.StreamReader(body, encoding);
-
- string requestBody = reader.ReadToEnd();
- body.Close();
- reader.Close();
-
- //Console.WriteLine(request.HttpMethod + " " + request.RawUrl + " Http/" + request.ProtocolVersion.ToString() + " content type: " + request.ContentType);
- //Console.WriteLine(requestBody);
-
- string responseString = "";
- switch (request.ContentType)
- {
- case "text/xml":
- // must be XML-RPC, so pass to the XML-RPC parser
-
- responseString = ParseXMLRPC(requestBody);
- responseString = Regex.Replace(responseString, "utf-16", "utf-8");
-
- response.AddHeader("Content-type", "text/xml");
- break;
-
- case "application/xml":
- // probably LLSD we hope, otherwise it should be ignored by the parser
- responseString = ParseLLSDXML(requestBody);
- response.AddHeader("Content-type", "application/xml");
- break;
-
- case "application/x-www-form-urlencoded":
- // a form data POST so send to the REST parser
- responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod);
- response.AddHeader("Content-type", "text/plain");
- break;
-
- case null:
- // must be REST or invalid crap, so pass to the REST parser
- responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod);
- response.AddHeader("Content-type", "text/plain");
- break;
-
- }
-
- Encoding Windows1252Encoding = Encoding.GetEncoding(1252);
- byte[] buffer = Windows1252Encoding.GetBytes(responseString);
- System.IO.Stream output = response.OutputStream;
- response.SendChunked = false;
- response.ContentLength64 = buffer.Length;
- output.Write(buffer, 0, buffer.Length);
- output.Close();
- }
- catch (Exception e)
- {
- Console.WriteLine(e.ToString());
- }
- }
-
- }
-}
diff --git a/OpenGridServices/OpenGridServices.AssetServer/Main.cs b/OpenGridServices/OpenGridServices.AssetServer/Main.cs
deleted file mode 100644
index e9b94ea..0000000
--- a/OpenGridServices/OpenGridServices.AssetServer/Main.cs
+++ /dev/null
@@ -1,338 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-
-using System;
-using System.IO;
-using System.Text;
-using System.Timers;
-using System.Net;
-using System.Reflection;
-using System.Threading;
-using libsecondlife;
-using OpenSim.Framework;
-using OpenSim.Framework.Sims;
-using OpenSim.Framework.Console;
-using OpenSim.Framework.Types;
-using OpenSim.Framework.Interfaces;
-using OpenSim.Framework.Utilities;
-using OpenSim.GridInterfaces.Local; // REFACTORING IS NEEDED!!!!!!!!!!!
-using OpenSim.Servers;
-using Db4objects.Db4o;
-using Db4objects.Db4o.Query;
-
-namespace OpenGridServices.AssetServer
-{
- ///
- /// An asset server
- ///
- public class OpenAsset_Main : BaseServer, conscmd_callback
- {
- private IObjectContainer db;
-
- public static OpenAsset_Main assetserver;
-
- private ConsoleBase m_console;
-
- [STAThread]
- public static void Main(string[] args)
- {
- Console.WriteLine("Starting...\n");
-
- assetserver = new OpenAsset_Main();
- assetserver.Startup();
-
- assetserver.Work();
- }
-
- private void Work()
- {
- m_console.Notice("Enter help for a list of commands");
-
- while (true)
- {
- m_console.MainConsolePrompt();
- }
- }
-
- private OpenAsset_Main()
- {
- m_console = new ConsoleBase("opengrid-AssetServer-console.log", "OpenAsset", this, false);
- MainConsole.Instance = m_console;
- }
-
- public void Startup()
- {
- m_console.Verbose( "Main.cs:Startup() - Setting up asset DB");
- setupDB();
-
- m_console.Verbose( "Main.cs:Startup() - Starting HTTP process");
- AssetHttpServer httpServer = new AssetHttpServer(8003);
-
-
- httpServer.AddRestHandler("GET", "/assets/", this.assetGetMethod);
- httpServer.AddRestHandler("POST", "/assets/", this.assetPostMethod);
-
- httpServer.Start();
-
- }
-
- public string assetPostMethod(string requestBody, string path, string param)
- {
- AssetBase asset = new AssetBase();
- asset.Name = "";
- asset.FullID = new LLUUID(param);
- Encoding Windows1252Encoding = Encoding.GetEncoding(1252);
- byte[] buffer = Windows1252Encoding.GetBytes(requestBody);
- asset.Data = buffer;
- AssetStorage store = new AssetStorage();
- store.Data = asset.Data;
- store.Name = asset.Name;
- store.UUID = asset.FullID;
- db.Set(store);
- db.Commit();
- return "";
- }
-
- public string assetGetMethod(string request, string path, string param)
- {
- Console.WriteLine("got a request " + param);
- byte[] assetdata = getAssetData(new LLUUID(param), false);
- if (assetdata != null)
- {
- Encoding Windows1252Encoding = Encoding.GetEncoding(1252);
- string ret = Windows1252Encoding.GetString(assetdata);
- //string ret = System.Text.Encoding.Unicode.GetString(assetdata);
-
- return ret;
-
- }
- else
- {
- return "";
- }
-
- }
-
- public byte[] getAssetData(LLUUID assetID, bool isTexture)
- {
- bool found = false;
- AssetStorage foundAsset = null;
-
- IObjectSet result = db.Get(new AssetStorage(assetID));
- if (result.Count > 0)
- {
- foundAsset = (AssetStorage)result.Next();
- found = true;
- }
-
- if (found)
- {
- return foundAsset.Data;
- }
- else
- {
- return null;
- }
- }
-
- public void setupDB()
- {
- bool yapfile = System.IO.File.Exists("assets.yap");
- try
- {
- db = Db4oFactory.OpenFile("assets.yap");
- OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Main.cs:setupDB() - creation");
- }
- catch (Exception e)
- {
- db.Close();
- OpenSim.Framework.Console.MainConsole.Instance.Warn("Main.cs:setupDB() - Exception occured");
- OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString());
- }
- if (!yapfile)
- {
- this.LoadDB();
- }
- }
-
- public void LoadDB()
- {
- try
- {
-
- Console.WriteLine("setting up Asset database");
-
- AssetBase Image = new AssetBase();
- Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000001");
- Image.Name = "Bricks";
- this.LoadAsset(Image, true, "bricks.jp2");
- AssetStorage store = new AssetStorage();
- store.Data = Image.Data;
- store.Name = Image.Name;
- store.UUID = Image.FullID;
- db.Set(store);
- db.Commit();
-
- Image = new AssetBase();
- Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000002");
- Image.Name = "Plywood";
- this.LoadAsset(Image, true, "plywood.jp2");
- store = new AssetStorage();
- store.Data = Image.Data;
- store.Name = Image.Name;
- store.UUID = Image.FullID;
- db.Set(store);
- db.Commit();
-
- Image = new AssetBase();
- Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000003");
- Image.Name = "Rocks";
- this.LoadAsset(Image, true, "rocks.jp2");
- store = new AssetStorage();
- store.Data = Image.Data;
- store.Name = Image.Name;
- store.UUID = Image.FullID;
- db.Set(store);
- db.Commit();
-
- Image = new AssetBase();
- Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000004");
- Image.Name = "Granite";
- this.LoadAsset(Image, true, "granite.jp2");
- store = new AssetStorage();
- store.Data = Image.Data;
- store.Name = Image.Name;
- store.UUID = Image.FullID;
- db.Set(store);
- db.Commit();
-
- Image = new AssetBase();
- Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000005");
- Image.Name = "Hardwood";
- this.LoadAsset(Image, true, "hardwood.jp2");
- store = new AssetStorage();
- store.Data = Image.Data;
- store.Name = Image.Name;
- store.UUID = Image.FullID;
- db.Set(store);
- db.Commit();
-
- Image = new AssetBase();
- Image.FullID = new LLUUID("00000000-0000-0000-5005-000000000005");
- Image.Name = "Prim Base Texture";
- this.LoadAsset(Image, true, "plywood.jp2");
- store = new AssetStorage();
- store.Data = Image.Data;
- store.Name = Image.Name;
- store.UUID = Image.FullID;
- db.Set(store);
- db.Commit();
-
- Image = new AssetBase();
- Image.FullID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
- Image.Name = "Shape";
- this.LoadAsset(Image, false, "base_shape.dat");
- store = new AssetStorage();
- store.Data = Image.Data;
- store.Name = Image.Name;
- store.UUID = Image.FullID;
- db.Set(store);
- db.Commit();
- }
- catch (Exception e)
- {
- Console.WriteLine(e.Message);
- }
- }
-
- private void LoadAsset(AssetBase info, bool image, string filename)
- {
-
-
- string dataPath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder;
- string fileName = Path.Combine(dataPath, filename);
- FileInfo fInfo = new FileInfo(fileName);
- long numBytes = fInfo.Length;
- FileStream fStream = new FileStream(fileName, FileMode.Open, FileAccess.Read);
- byte[] idata = new byte[numBytes];
- BinaryReader br = new BinaryReader(fStream);
- idata = br.ReadBytes((int)numBytes);
- br.Close();
- fStream.Close();
- info.Data = idata;
- //info.loaded=true;
- }
-
- /*private GridConfig LoadConfigDll(string dllName)
- {
- Assembly pluginAssembly = Assembly.LoadFrom(dllName);
- GridConfig config = null;
-
- foreach (Type pluginType in pluginAssembly.GetTypes())
- {
- if (pluginType.IsPublic)
- {
- if (!pluginType.IsAbstract)
- {
- Type typeInterface = pluginType.GetInterface("IGridConfig", true);
-
- if (typeInterface != null)
- {
- IGridConfig plug = (IGridConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
- config = plug.GetConfigObject();
- break;
- }
-
- typeInterface = null;
- }
- }
- }
- pluginAssembly = null;
- return config;
- }*/
-
- public void RunCmd(string cmd, string[] cmdparams)
- {
- switch (cmd)
- {
- case "help":
- m_console.Notice("shutdown - shutdown this asset server (USE CAUTION!)");
- break;
-
- case "shutdown":
- m_console.Close();
- Environment.Exit(0);
- break;
- }
- }
-
- public void Show(string ShowWhat)
- {
- }
- }
-}
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj
deleted file mode 100644
index 50ffb36..0000000
--- a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj
+++ /dev/null
@@ -1,122 +0,0 @@
-
-
- Local
- 8.0.50727
- 2.0
- {0021261B-0000-0000-0000-000000000000}
- Debug
- AnyCPU
-
-
-
- OpenGridServices.AssetServer
- JScript
- Grid
- IE50
- false
- Exe
-
- OpenGridServices.AssetServer
-
-
-
-
-
- False
- 285212672
- False
-
-
- TRACE;DEBUG
-
- True
- 4096
- False
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
- False
- 285212672
- False
-
-
- TRACE
-
- False
- 4096
- True
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
-
- ..\..\bin\Db4objects.Db4o.dll
- False
-
-
- ..\..\bin\libsecondlife.dll
- False
-
-
- OpenSim.Framework.dll
- False
-
-
- OpenSim.Framework.Console.dll
- False
-
-
- OpenSim.GridInterfaces.Local.dll
- False
-
-
- OpenSim.Servers.dll
- False
-
-
- System.dll
- False
-
-
- System.Data.dll
- False
-
-
- System.Xml.dll
- False
-
-
- XMLRPC.dll
- False
-
-
-
-
-
-
- Code
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build
deleted file mode 100644
index 808f015..0000000
--- a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.csproj b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.csproj
deleted file mode 100644
index 9b8cc87..0000000
--- a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.csproj
+++ /dev/null
@@ -1,126 +0,0 @@
-
-
- Local
- 8.0.50727
- 2.0
- {21BFC8E2-0000-0000-0000-000000000000}
- Debug
- AnyCPU
-
-
-
- OpenGridServices.GridServer
- JScript
- Grid
- IE50
- false
- Exe
-
- OpenGridServices.GridServer
-
-
-
-
-
- False
- 285212672
- False
-
-
- TRACE;DEBUG
-
- True
- 4096
- False
- ..\bin\
- False
- False
- False
- 4
-
-
-
- False
- 285212672
- False
-
-
- TRACE
-
- False
- 4096
- True
- ..\bin\
- False
- False
- False
- 4
-
-
-
-
- System.dll
- False
-
-
- System.Data.dll
- False
-
-
- System.Xml.dll
- False
-
-
- ..\bin\libsecondlife.dll
- False
-
-
- ..\bin\Db4objects.Db4o.dll
- False
-
-
-
-
- OpenSim.Framework
- {8ACA2445-0000-0000-0000-000000000000}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
-
-
- OpenSim.Framework.Console
- {A7CD0630-0000-0000-0000-000000000000}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
-
-
- OpenSim.Servers
- {8BB20F0A-0000-0000-0000-000000000000}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
-
-
- XMLRPC
- {8E81D43C-0000-0000-0000-000000000000}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
-
-
-
-
- Code
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.exe.build b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.exe.build
deleted file mode 100644
index 6bef534..0000000
--- a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.exe.build
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGridServices.AssetServer/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGridServices.AssetServer/Properties/AssemblyInfo.cs
deleted file mode 100644
index 7014284..0000000
--- a/OpenGridServices/OpenGridServices.AssetServer/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("OGS-AssetServer")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("OGS-AssetServer")]
-[assembly: AssemblyCopyright("Copyright © 2007")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("b541b244-3d1d-4625-9003-bc2a3a6a39a4")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenGridServices/OpenGridServices.GridServer/GridManager.cs b/OpenGridServices/OpenGridServices.GridServer/GridManager.cs
deleted file mode 100644
index 45d3676..0000000
--- a/OpenGridServices/OpenGridServices.GridServer/GridManager.cs
+++ /dev/null
@@ -1,589 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using System.Reflection;
-using OpenGrid.Framework.Data;
-using OpenSim.Framework.Utilities;
-using OpenSim.Framework.Console;
-using OpenSim.Framework.Sims;
-using libsecondlife;
-using Nwc.XmlRpc;
-using System.Xml;
-
-namespace OpenGridServices.GridServer
-{
- class GridManager
- {
- Dictionary _plugins = new Dictionary();
- Dictionary _logplugins = new Dictionary();
-
- public OpenSim.Framework.Interfaces.GridConfig config;
-
- ///
- /// Adds a new grid server plugin - grid servers will be requested in the order they were loaded.
- ///
- /// The filename to the grid server plugin DLL
- public void AddPlugin(string FileName)
- {
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Storage: Attempting to load " + FileName);
- Assembly pluginAssembly = Assembly.LoadFrom(FileName);
-
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Storage: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
- foreach (Type pluginType in pluginAssembly.GetTypes())
- {
- if (!pluginType.IsAbstract)
- {
- // Regions go here
- Type typeInterface = pluginType.GetInterface("IGridData", true);
-
- if (typeInterface != null)
- {
- IGridData plug = (IGridData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
- plug.Initialise();
- this._plugins.Add(plug.getName(), plug);
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Storage: Added IGridData Interface");
- }
-
- typeInterface = null;
-
- // Logs go here
- typeInterface = pluginType.GetInterface("ILogData", true);
-
- if (typeInterface != null)
- {
- ILogData plug = (ILogData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
- plug.Initialise();
- this._logplugins.Add(plug.getName(), plug);
- OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Storage: Added ILogData Interface");
- }
-
- typeInterface = null;
- }
- }
-
- pluginAssembly = null;
- }
-
- ///
- /// Logs a piece of information to the database
- ///
- /// What you were operating on (in grid server, this will likely be the region UUIDs)
- /// Which method is being called?
- /// What arguments are being passed?
- /// How high priority is this? 1 = Max, 6 = Verbose
- /// The message to log
- private void logToDB(string target, string method, string args, int priority, string message)
- {
- foreach (KeyValuePair kvp in _logplugins)
- {
- try
- {
- kvp.Value.saveLog("Gridserver", target, method, args, priority, message);
- }
- catch (Exception e)
- {
- OpenSim.Framework.Console.MainConsole.Instance.Warn("Storage: unable to write log via " + kvp.Key);
- }
- }
- }
-
- ///
- /// Returns a region by argument
- ///
- /// A UUID key of the region to return
- /// A SimProfileData for the region
- public SimProfileData getRegion(libsecondlife.LLUUID uuid)
- {
- foreach(KeyValuePair kvp in _plugins) {
- try
- {
- return kvp.Value.GetProfileByLLUUID(uuid);
- }
- catch (Exception e)
- {
- OpenSim.Framework.Console.MainConsole.Instance.Warn("Storage: Unable to find region " + uuid.ToStringHyphenated() + " via " + kvp.Key);
- }
- }
- return null;
- }
-
- ///
- /// Returns a region by argument
- ///
- /// A regionHandle of the region to return
- /// A SimProfileData for the region
- public SimProfileData getRegion(ulong handle)
- {
- foreach (KeyValuePair kvp in _plugins)
- {
- try
- {
- return kvp.Value.GetProfileByHandle(handle);
- }
- catch (Exception e)
- {
- OpenSim.Framework.Console.MainConsole.Instance.Warn("Storage: Unable to find region " + handle.ToString() + " via " + kvp.Key);
- }
- }
- return null;
- }
-
- public Dictionary getRegions(uint xmin, uint ymin, uint xmax, uint ymax)
- {
- Dictionary regions = new Dictionary();
-
- SimProfileData[] neighbours;
-
- foreach (KeyValuePair kvp in _plugins)
- {
- try
- {
- neighbours = kvp.Value.GetProfilesInRange(xmin, ymin, xmax, ymax);
- foreach (SimProfileData neighbour in neighbours)
- {
- regions[neighbour.regionHandle] = neighbour;
- }
- }
- catch (Exception e)
- {
- OpenSim.Framework.Console.MainConsole.Instance.Warn("Storage: Unable to query regionblock via " + kvp.Key);
- }
- }
-
- return regions;
- }
-
- ///
- /// Returns a XML String containing a list of the neighbouring regions
- ///
- /// The regionhandle for the center sim
- /// An XML string containing neighbour entities
- public string GetXMLNeighbours(ulong reqhandle)
- {
- string response = "";
- SimProfileData central_region = getRegion(reqhandle);
- SimProfileData neighbour;
- for (int x = -1; x < 2; x++) for (int y = -1; y < 2; y++)
- {
- if (getRegion(Util.UIntsToLong((uint)((central_region.regionLocX + x) * 256), (uint)(central_region.regionLocY + y) * 256)) != null)
- {
- neighbour = getRegion(Util.UIntsToLong((uint)((central_region.regionLocX + x) * 256), (uint)(central_region.regionLocY + y) * 256));
- response += "";
- response += "" + neighbour.serverIP + "";
- response += "" + neighbour.serverPort.ToString() + "";
- response += "" + neighbour.regionLocX.ToString() + "";
- response += "" + neighbour.regionLocY.ToString() + "";
- response += "" + neighbour.regionHandle.ToString() + "";
- response += "";
-
- }
- }
- return response;
- }
-
- ///
- /// Performed when a region connects to the grid server initially.
- ///
- /// The XMLRPC Request
- /// Startup parameters
- public XmlRpcResponse XmlRpcLoginToSimulatorMethod(XmlRpcRequest request)
- {
- XmlRpcResponse response = new XmlRpcResponse();
- Hashtable responseData = new Hashtable();
- response.Value = responseData;
-
- SimProfileData TheSim = null;
- Hashtable requestData = (Hashtable)request.Params[0];
-
- if (requestData.ContainsKey("UUID"))
- {
- TheSim = getRegion(new LLUUID((string)requestData["UUID"]));
- logToDB((new LLUUID((string)requestData["UUID"])).ToStringHyphenated(),"XmlRpcLoginToSimulatorMethod","", 5,"Region attempting login with UUID.");
- }
- else if (requestData.ContainsKey("region_handle"))
- {
- TheSim = getRegion((ulong)Convert.ToUInt64(requestData["region_handle"]));
- logToDB((string)requestData["region_handle"], "XmlRpcLoginToSimulatorMethod", "", 5, "Region attempting login with regionHandle.");
- }
- else
- {
- responseData["error"] = "No UUID or region_handle passed to grid server - unable to connect you";
- return response;
- }
-
- if (TheSim == null)
- {
- responseData["error"] = "sim not found";
- return response;
- }
- else
- {
-
- ArrayList SimNeighboursData = new ArrayList();
-
- SimProfileData neighbour;
- Hashtable NeighbourBlock;
-
- bool fastMode = false; // Only compatible with MySQL right now
-
- if (fastMode)
- {
- Dictionary neighbours = getRegions(TheSim.regionLocX - 1, TheSim.regionLocY - 1, TheSim.regionLocX + 1, TheSim.regionLocY + 1);
-
- foreach (KeyValuePair aSim in neighbours)
- {
- NeighbourBlock = new Hashtable();
- NeighbourBlock["sim_ip"] = aSim.Value.serverIP.ToString();
- NeighbourBlock["sim_port"] = aSim.Value.serverPort.ToString();
- NeighbourBlock["region_locx"] = aSim.Value.regionLocX.ToString();
- NeighbourBlock["region_locy"] = aSim.Value.regionLocY.ToString();
- NeighbourBlock["UUID"] = aSim.Value.UUID.ToString();
-
- if (aSim.Value.UUID != TheSim.UUID)
- SimNeighboursData.Add(NeighbourBlock);
- }
- }
- else
- {
- for (int x = -1; x < 2; x++) for (int y = -1; y < 2; y++)
- {
- if (getRegion(Helpers.UIntsToLong((uint)((TheSim.regionLocX + x) * 256), (uint)(TheSim.regionLocY + y) * 256)) != null)
- {
- neighbour = getRegion(Helpers.UIntsToLong((uint)((TheSim.regionLocX + x) * 256), (uint)(TheSim.regionLocY + y) * 256));
-
- NeighbourBlock = new Hashtable();
- NeighbourBlock["sim_ip"] = neighbour.serverIP;
- NeighbourBlock["sim_port"] = neighbour.serverPort.ToString();
- NeighbourBlock["region_locx"] = neighbour.regionLocX.ToString();
- NeighbourBlock["region_locy"] = neighbour.regionLocY.ToString();
- NeighbourBlock["UUID"] = neighbour.UUID.ToString();
-
- if (neighbour.UUID != TheSim.UUID) SimNeighboursData.Add(NeighbourBlock);
- }
- }
- }
-
- responseData["UUID"] = TheSim.UUID.ToString();
- responseData["region_locx"] = TheSim.regionLocX.ToString();
- responseData["region_locy"] = TheSim.regionLocY.ToString();
- responseData["regionname"] = TheSim.regionName;
- responseData["estate_id"] = "1";
- responseData["neighbours"] = SimNeighboursData;
-
- responseData["sim_ip"] = TheSim.serverIP;
- responseData["sim_port"] = TheSim.serverPort.ToString();
- responseData["asset_url"] = TheSim.regionAssetURI;
- responseData["asset_sendkey"] = TheSim.regionAssetSendKey;
- responseData["asset_recvkey"] = TheSim.regionAssetRecvKey;
- responseData["user_url"] = TheSim.regionUserURI;
- responseData["user_sendkey"] = TheSim.regionUserSendKey;
- responseData["user_recvkey"] = TheSim.regionUserRecvKey;
- responseData["authkey"] = TheSim.regionSecret;
-
- // New! If set, use as URL to local sim storage (ie http://remotehost/region.yap)
- responseData["data_uri"] = TheSim.regionDataURI;
- }
-
- return response;
- }
-
- public XmlRpcResponse XmlRpcMapBlockMethod(XmlRpcRequest request)
- {
- int xmin=980, ymin=980, xmax=1020, ymax=1020;
-
- Hashtable requestData = (Hashtable)request.Params[0];
- if (requestData.ContainsKey("xmin"))
- {
- xmin = (Int32)requestData["xmin"];
- }
- if (requestData.ContainsKey("ymin"))
- {
- ymin = (Int32)requestData["ymin"];
- }
- if (requestData.ContainsKey("xmax"))
- {
- xmax = (Int32)requestData["xmax"];
- }
- if (requestData.ContainsKey("ymax"))
- {
- ymax = (Int32)requestData["ymax"];
- }
-
- XmlRpcResponse response = new XmlRpcResponse();
- Hashtable responseData = new Hashtable();
- response.Value = responseData;
- IList simProfileList = new ArrayList();
-
- bool fastMode = true; // MySQL Only
-
- if (fastMode)
- {
- Dictionary neighbours = getRegions((uint)xmin, (uint)ymin, (uint)xmax, (uint)ymax);
-
- foreach (KeyValuePair aSim in neighbours)
- {
- Hashtable simProfileBlock = new Hashtable();
- simProfileBlock["x"] = aSim.Value.regionLocX.ToString();
- simProfileBlock["y"] = aSim.Value.regionLocY.ToString();
- simProfileBlock["name"] = aSim.Value.regionName;
- simProfileBlock["access"] = 21;
- simProfileBlock["region-flags"] = 512;
- simProfileBlock["water-height"] = 0;
- simProfileBlock["agents"] = 1;
- simProfileBlock["map-image-id"] = aSim.Value.regionMapTextureID.ToString();
-
- // For Sugilite compatibility
- simProfileBlock["regionhandle"] = aSim.Value.regionHandle.ToString();
- simProfileBlock["sim_ip"] = aSim.Value.serverIP.ToString();
- simProfileBlock["sim_port"] = aSim.Value.serverPort.ToString();
- simProfileBlock["sim_uri"] = aSim.Value.serverURI.ToString();
- simProfileBlock["uuid"] = aSim.Value.UUID.ToStringHyphenated();
-
- simProfileList.Add(simProfileBlock);
- }
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via FastMode");
- }
- else
- {
- SimProfileData simProfile;
- for (int x = xmin; x < xmax; x++)
- {
- for (int y = ymin; y < ymax; y++)
- {
- simProfile = getRegion(Helpers.UIntsToLong((uint)(x * 256), (uint)(y * 256)));
- if (simProfile != null)
- {
- Hashtable simProfileBlock = new Hashtable();
- simProfileBlock["x"] = x;
- simProfileBlock["y"] = y;
- simProfileBlock["name"] = simProfile.regionName;
- simProfileBlock["access"] = 0;
- simProfileBlock["region-flags"] = 0;
- simProfileBlock["water-height"] = 20;
- simProfileBlock["agents"] = 1;
- simProfileBlock["map-image-id"] = simProfile.regionMapTextureID.ToString();
-
- // For Sugilite compatibility
- simProfileBlock["regionhandle"] = simProfile.regionHandle.ToString();
- simProfileBlock["sim_ip"] = simProfile.serverIP.ToString();
- simProfileBlock["sim_port"] = simProfile.serverPort.ToString();
- simProfileBlock["sim_uri"] = simProfile.serverURI.ToString();
- simProfileBlock["uuid"] = simProfile.UUID.ToStringHyphenated();
-
- simProfileList.Add(simProfileBlock);
- }
- }
- }
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via Standard Mode");
- }
-
- responseData["sim-profiles"] = simProfileList;
-
- return response;
- }
-
-
-
- ///
- /// Performs a REST Get Operation
- ///
- ///
- ///
- ///
- ///
- public string RestGetRegionMethod(string request, string path, string param)
- {
- return RestGetSimMethod("", "/sims/", param);
- }
-
- ///
- /// Performs a REST Set Operation
- ///
- ///
- ///
- ///
- ///
- public string RestSetRegionMethod(string request, string path, string param)
- {
- return RestSetSimMethod("", "/sims/", param);
- }
-
- ///
- /// Returns information about a sim via a REST Request
- ///
- ///
- ///
- ///
- /// Information about the sim in XML
- public string RestGetSimMethod(string request, string path, string param)
- {
- string respstring = String.Empty;
-
- SimProfileData TheSim;
- LLUUID UUID = new LLUUID(param);
- TheSim = getRegion(UUID);
-
- if (!(TheSim == null))
- {
- respstring = "";
- respstring += "" + TheSim.regionSendKey + "";
- respstring += "";
- respstring += "" + TheSim.UUID.ToString() + "";
- respstring += "" + TheSim.regionName + "";
- respstring += "" + TheSim.serverIP + "";
- respstring += "" + TheSim.serverPort.ToString() + "";
- respstring += "" + TheSim.regionLocX.ToString() + "";
- respstring += "" + TheSim.regionLocY.ToString() + "";
- respstring += "1";
- respstring += "";
- respstring += "";
- }
-
- return respstring;
- }
-
- ///
- /// Creates or updates a sim via a REST Method Request
- /// BROKEN with SQL Update
- ///
- ///
- ///
- ///
- /// "OK" or an error
- public string RestSetSimMethod(string request, string path, string param)
- {
- Console.WriteLine("Processing region update");
- SimProfileData TheSim;
- TheSim = getRegion(new LLUUID(param));
- if ((TheSim) == null)
- {
- TheSim = new SimProfileData();
- LLUUID UUID = new LLUUID(param);
- TheSim.UUID = UUID;
- TheSim.regionRecvKey = config.SimRecvKey;
- }
-
- XmlDocument doc = new XmlDocument();
- doc.LoadXml(request);
- XmlNode rootnode = doc.FirstChild;
- XmlNode authkeynode = rootnode.ChildNodes[0];
- if (authkeynode.Name != "authkey")
- {
- return "ERROR! bad XML - expected authkey tag";
- }
-
- XmlNode simnode = rootnode.ChildNodes[1];
- if (simnode.Name != "sim")
- {
- return "ERROR! bad XML - expected sim tag";
- }
-
- if (authkeynode.InnerText != TheSim.regionRecvKey)
- {
- return "ERROR! invalid key";
- }
-
- //TheSim.regionSendKey = Cfg;
- TheSim.regionRecvKey = config.SimRecvKey;
- TheSim.regionSendKey = config.SimSendKey;
- TheSim.regionSecret = config.SimRecvKey;
- TheSim.regionDataURI = "";
- TheSim.regionAssetURI = config.DefaultAssetServer;
- TheSim.regionAssetRecvKey = config.AssetRecvKey;
- TheSim.regionAssetSendKey = config.AssetSendKey;
- TheSim.regionUserURI = config.DefaultUserServer;
- TheSim.regionUserSendKey = config.UserSendKey;
- TheSim.regionUserRecvKey = config.UserRecvKey;
-
-
- for (int i = 0; i < simnode.ChildNodes.Count; i++)
- {
- switch (simnode.ChildNodes[i].Name)
- {
- case "regionname":
- TheSim.regionName = simnode.ChildNodes[i].InnerText;
- break;
-
- case "sim_ip":
- TheSim.serverIP = simnode.ChildNodes[i].InnerText;
- break;
-
- case "sim_port":
- TheSim.serverPort = Convert.ToUInt32(simnode.ChildNodes[i].InnerText);
- break;
-
- case "region_locx":
- TheSim.regionLocX = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText);
- TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256));
- break;
-
- case "region_locy":
- TheSim.regionLocY = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText);
- TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256));
- break;
- }
- }
-
- TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/";
-
- bool requirePublic = false;
-
- if (requirePublic && (TheSim.serverIP.StartsWith("172.16") || TheSim.serverIP.StartsWith("192.168") || TheSim.serverIP.StartsWith("10.") || TheSim.serverIP.StartsWith("0.") || TheSim.serverIP.StartsWith("255.")))
- {
- return "ERROR! Servers must register with public addresses.";
- }
-
- try
- {
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Updating / adding via " + _plugins.Count + " storage provider(s) registered.");
- foreach (KeyValuePair kvp in _plugins)
- {
- try
- {
- kvp.Value.AddProfile(TheSim);
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("New sim added to grid (" + TheSim.regionName + ")");
- logToDB(TheSim.UUID.ToStringHyphenated(), "RestSetSimMethod", "", 5, "Region successfully updated and connected to grid.");
- }
- catch (Exception e)
- {
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " + e.ToString());
- }
- }
- return "OK";
- }
- catch (Exception e)
- {
- return "ERROR! Could not save to database! (" + e.ToString() + ")";
- }
- }
-
- }
-}
diff --git a/OpenGridServices/OpenGridServices.GridServer/Main.cs b/OpenGridServices/OpenGridServices.GridServer/Main.cs
deleted file mode 100644
index 9a7eb00..0000000
--- a/OpenGridServices/OpenGridServices.GridServer/Main.cs
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-
-using System;
-using System.IO;
-using System.Text;
-using System.Timers;
-using System.Net;
-using System.Threading;
-using System.Reflection;
-using libsecondlife;
-using OpenGrid.Framework.Manager;
-using OpenSim.Framework;
-using OpenSim.Framework.Sims;
-using OpenSim.Framework.Console;
-using OpenSim.Framework.Interfaces;
-using OpenSim.Servers;
-using OpenSim.GenericConfig;
-
-namespace OpenGridServices.GridServer
-{
- ///
- ///
- public class OpenGrid_Main : BaseServer, conscmd_callback
- {
- private string ConfigDll = "OpenGrid.Config.GridConfigDb4o.dll";
- private string GridDll = "OpenGrid.Framework.Data.MySQL.dll";
- public GridConfig Cfg;
-
- public static OpenGrid_Main thegrid;
- protected IGenericConfig localXMLConfig;
-
- public static bool setuponly;
-
- //public LLUUID highestUUID;
-
- // private SimProfileManager m_simProfileManager;
-
- private GridManager m_gridManager;
-
- private ConsoleBase m_console;
-
- [STAThread]
- public static void Main(string[] args)
- {
- if (args.Length > 0)
- {
- if (args[0] == "-setuponly") setuponly = true;
- }
- Console.WriteLine("Starting...\n");
-
- thegrid = new OpenGrid_Main();
- thegrid.Startup();
-
- thegrid.Work();
- }
-
- private void Work()
- {
- while (true)
- {
- Thread.Sleep(5000);
- // should flush the DB etc here
- }
- }
-
- private OpenGrid_Main()
- {
- m_console = new ConsoleBase("opengrid-gridserver-console.log", "OpenGrid", this, false);
- MainConsole.Instance = m_console;
-
-
- }
-
- public void managercallback(string cmd)
- {
- switch (cmd)
- {
- case "shutdown":
- RunCmd("shutdown", new string[0]);
- break;
- }
- }
-
-
- public void Startup()
- {
- this.localXMLConfig = new XmlConfig("GridServerConfig.xml");
- this.localXMLConfig.LoadData();
- this.ConfigDB(this.localXMLConfig);
- this.localXMLConfig.Close();
-
- m_console.Verbose( "Main.cs:Startup() - Loading configuration");
- Cfg = this.LoadConfigDll(this.ConfigDll);
- Cfg.InitConfig();
- if (setuponly) Environment.Exit(0);
-
- m_console.Verbose( "Main.cs:Startup() - Connecting to Storage Server");
- m_gridManager = new GridManager();
- m_gridManager.AddPlugin(GridDll); // Made of win
- m_gridManager.config = Cfg;
-
- m_console.Verbose( "Main.cs:Startup() - Starting HTTP process");
- BaseHttpServer httpServer = new BaseHttpServer(8001);
- //GridManagementAgent GridManagerAgent = new GridManagementAgent(httpServer, "gridserver", Cfg.SimSendKey, Cfg.SimRecvKey, managercallback);
-
- httpServer.AddXmlRPCHandler("simulator_login", m_gridManager.XmlRpcLoginToSimulatorMethod);
- httpServer.AddXmlRPCHandler("map_block", m_gridManager.XmlRpcMapBlockMethod);
-
- 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.
- // I have no idea what this was supposed to do - looks like an infinite recursion to me.
- // case "regions":
- //// DIRTY HACK ALERT
- //Console.Notice("/regions/ accessed");
- //TheSim = OpenGrid_Main.thegrid._regionmanager.GetProfileByHandle((ulong)Convert.ToUInt64(rest_params[1]));
- //respstring = ParseREST("/regions/" + rest_params[1], requestBody, HTTPmethod);
- //break;
-
- // lbsa71 : I guess these were never used?
- //Listener.Prefixes.Add("http://+:8001/gods/");
- //Listener.Prefixes.Add("http://+:8001/highestuuid/");
- //Listener.Prefixes.Add("http://+:8001/uuidblocks/");
-
- httpServer.Start();
-
- m_console.Verbose( "Main.cs:Startup() - Starting sim status checker");
-
- System.Timers.Timer simCheckTimer = new System.Timers.Timer(3600000 * 3); // 3 Hours between updates.
- simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims);
- simCheckTimer.Enabled = true;
- }
-
- private GridConfig LoadConfigDll(string dllName)
- {
- Assembly pluginAssembly = Assembly.LoadFrom(dllName);
- GridConfig config = null;
-
- foreach (Type pluginType in pluginAssembly.GetTypes())
- {
- if (pluginType.IsPublic)
- {
- if (!pluginType.IsAbstract)
- {
- Type typeInterface = pluginType.GetInterface("IGridConfig", true);
-
- if (typeInterface != null)
- {
- IGridConfig plug = (IGridConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
- config = plug.GetConfigObject();
- break;
- }
-
- typeInterface = null;
- }
- }
- }
- pluginAssembly = null;
- return config;
- }
-
- public void CheckSims(object sender, ElapsedEventArgs e)
- {
- /*
- foreach (SimProfileBase sim in m_simProfileManager.SimProfiles.Values)
- {
- string SimResponse = "";
- try
- {
- WebRequest CheckSim = WebRequest.Create("http://" + sim.sim_ip + ":" + sim.sim_port.ToString() + "/checkstatus/");
- CheckSim.Method = "GET";
- CheckSim.ContentType = "text/plaintext";
- CheckSim.ContentLength = 0;
-
- StreamWriter stOut = new StreamWriter(CheckSim.GetRequestStream(), System.Text.Encoding.ASCII);
- stOut.Write("");
- stOut.Close();
-
- StreamReader stIn = new StreamReader(CheckSim.GetResponse().GetResponseStream());
- SimResponse = stIn.ReadToEnd();
- stIn.Close();
- }
- catch
- {
- }
-
- if (SimResponse == "OK")
- {
- m_simProfileManager.SimProfiles[sim.UUID].online = true;
- }
- else
- {
- m_simProfileManager.SimProfiles[sim.UUID].online = false;
- }
- }
- */
- }
-
- public void RunCmd(string cmd, string[] cmdparams)
- {
- switch (cmd)
- {
- case "help":
- m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)");
- break;
-
- case "shutdown":
- m_console.Close();
- Environment.Exit(0);
- break;
- }
- }
-
- public void Show(string ShowWhat)
- {
- }
-
- private void ConfigDB(IGenericConfig configData)
- {
- try
- {
- string attri = "";
- attri = configData.GetAttribute("DataBaseProvider");
- if (attri == "")
- {
- GridDll = "OpenGrid.Framework.Data.DB4o.dll";
- configData.SetAttribute("DataBaseProvider", "OpenGrid.Framework.Data.DB4o.dll");
- }
- else
- {
- GridDll = attri;
- }
- configData.Commit();
- }
- catch (Exception e)
- {
-
- }
- }
- }
-}
diff --git a/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.csproj b/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.csproj
deleted file mode 100644
index 55a0e02..0000000
--- a/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.csproj
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
- Local
- 8.0.50727
- 2.0
- {21BFC8E2-0000-0000-0000-000000000000}
- Debug
- AnyCPU
-
-
-
- OpenGridServices.GridServer
- JScript
- Grid
- IE50
- false
- Exe
-
- OpenGridServices.GridServer
-
-
-
-
-
- False
- 285212672
- False
-
-
- TRACE;DEBUG
-
- True
- 4096
- False
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
- False
- 285212672
- False
-
-
- TRACE
-
- False
- 4096
- True
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
-
- ..\..\bin\Db4objects.Db4o.dll
- False
-
-
- ..\..\bin\libsecondlife.dll
- False
-
-
- OpenSim.Framework.dll
- False
-
-
- OpenSim.Framework.Console.dll
- False
-
-
- OpenSim.GenericConfig.Xml.dll
- False
-
-
- OpenSim.Servers.dll
- False
-
-
- System.dll
- False
-
-
- System.Data.dll
- False
-
-
- System.Xml.dll
- False
-
-
- XMLRPC.dll
- False
-
-
-
-
- OpenGrid.Framework.Data
- {62CDF671-0000-0000-0000-000000000000}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
-
-
- OpenGrid.Framework.Manager
- {7924FD35-0000-0000-0000-000000000000}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
-
-
-
-
- Code
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build b/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build
deleted file mode 100644
index 60c0f85..0000000
--- a/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGridServices.GridServer/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGridServices.GridServer/Properties/AssemblyInfo.cs
deleted file mode 100644
index 8471e6b..0000000
--- a/OpenGridServices/OpenGridServices.GridServer/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("OGS-GridServer")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("OGS-GridServer")]
-[assembly: AssemblyCopyright("Copyright © 2007")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("b541b244-3d1d-4625-9003-bc2a3a6a39a4")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenGridServices/OpenGridServices.InventoryServer/InventoryManager.cs b/OpenGridServices/OpenGridServices.InventoryServer/InventoryManager.cs
deleted file mode 100644
index 928e7c6..0000000
--- a/OpenGridServices/OpenGridServices.InventoryServer/InventoryManager.cs
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using OpenGrid.Framework.Data;
-using libsecondlife;
-using System.Reflection;
-
-using System.Xml;
-using Nwc.XmlRpc;
-using OpenSim.Framework.Sims;
-using OpenSim.Framework.Inventory;
-using OpenSim.Framework.Utilities;
-
-using System.Security.Cryptography;
-
-namespace OpenGridServices.InventoryServer
-{
- class InventoryManager
- {
- Dictionary _plugins = new Dictionary();
-
- ///
- /// Adds a new inventory server plugin - user servers will be requested in the order they were loaded.
- ///
- /// The filename to the inventory server plugin DLL
- public void AddPlugin(string FileName)
- {
- OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Invenstorage: Attempting to load " + FileName);
- Assembly pluginAssembly = Assembly.LoadFrom(FileName);
-
- OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Invenstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
- foreach (Type pluginType in pluginAssembly.GetTypes())
- {
- if (!pluginType.IsAbstract)
- {
- Type typeInterface = pluginType.GetInterface("IInventoryData", true);
-
- if (typeInterface != null)
- {
- IInventoryData plug = (IInventoryData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
- plug.Initialise();
- this._plugins.Add(plug.getName(), plug);
- OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Invenstorage: Added IUserData Interface");
- }
-
- typeInterface = null;
- }
- }
-
- pluginAssembly = null;
- }
-
- public List getRootFolders(LLUUID user)
- {
- foreach (KeyValuePair kvp in _plugins)
- {
- try
- {
- return kvp.Value.getUserRootFolders(user);
- }
- catch (Exception e)
- {
- OpenSim.Framework.Console.MainConsole.Instance.Notice("Unable to get root folders via " + kvp.Key + " (" + e.ToString() + ")");
- }
- }
- return null;
- }
-
- public XmlRpcResponse XmlRpcInventoryRequest(XmlRpcRequest request)
- {
- XmlRpcResponse response = new XmlRpcResponse();
- Hashtable requestData = (Hashtable)request.Params[0];
-
- Hashtable responseData = new Hashtable();
-
- // Stuff happens here
-
- if (requestData.ContainsKey("Access-type"))
- {
- if (requestData["access-type"] == "rootfolders")
- {
-
-// responseData["rootfolders"] =
- }
- }
- else
- {
- responseData["error"] = "No access-type specified.";
- }
-
-
- // Stuff stops happening here
-
- response.Value = responseData;
- return response;
- }
- }
-}
diff --git a/OpenGridServices/OpenGridServices.InventoryServer/Main.cs b/OpenGridServices/OpenGridServices.InventoryServer/Main.cs
deleted file mode 100644
index f479a79..0000000
--- a/OpenGridServices/OpenGridServices.InventoryServer/Main.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Reflection;
-using System.IO;
-using System.Text;
-using libsecondlife;
-using OpenSim.Framework.User;
-using OpenSim.Framework.Sims;
-using OpenSim.Framework.Inventory;
-using OpenSim.Framework.Interfaces;
-using OpenSim.Framework.Console;
-using OpenSim.Servers;
-using OpenSim.Framework.Utilities;
-
-namespace OpenGridServices.InventoryServer
-{
- public class OpenInventory_Main : BaseServer, conscmd_callback
- {
- ConsoleBase m_console;
- InventoryManager m_inventoryManager;
-
- public static void Main(string[] args)
- {
- }
-
- public OpenInventory_Main()
- {
- m_console = new ConsoleBase("opengrid-inventory-console.log", "OpenInventory", this, false);
- MainConsole.Instance = m_console;
- }
-
- public void Startup()
- {
- MainConsole.Instance.Notice("Initialising inventory manager...");
- m_inventoryManager = new InventoryManager();
-
- MainConsole.Instance.Notice("Starting HTTP server");
- BaseHttpServer httpServer = new BaseHttpServer(8004);
-
- httpServer.AddXmlRPCHandler("rootfolders", m_inventoryManager.XmlRpcInventoryRequest);
- //httpServer.AddRestHandler("GET","/rootfolders/",Rest
- }
-
- public void RunCmd(string cmd, string[] cmdparams)
- {
- switch (cmd)
- {
- case "shutdown":
- m_console.Close();
- Environment.Exit(0);
- break;
- }
- }
-
- public void Show(string ShowWhat)
- {
- }
- }
-}
diff --git a/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj b/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj
deleted file mode 100644
index b5a25bf..0000000
--- a/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
- Local
- 8.0.50727
- 2.0
- {338FA00B-0000-0000-0000-000000000000}
- Debug
- AnyCPU
-
-
-
- OpenGridServices.InventoryServer
- JScript
- Grid
- IE50
- false
- Exe
-
- OpenGridServices.InventoryServer
-
-
-
-
-
- False
- 285212672
- False
-
-
- TRACE;DEBUG
-
- True
- 4096
- False
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
- False
- 285212672
- False
-
-
- TRACE
-
- False
- 4096
- True
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
-
- ..\..\bin\Db4objects.Db4o.dll
- False
-
-
- ..\..\bin\libsecondlife.dll
- False
-
-
- OpenSim.Framework.dll
- False
-
-
- OpenSim.Framework.Console.dll
- False
-
-
- OpenSim.GridInterfaces.Local.dll
- False
-
-
- OpenSim.Servers.dll
- False
-
-
- System.dll
- False
-
-
- System.Data.dll
- False
-
-
- System.Xml.dll
- False
-
-
- XMLRPC.dll
- False
-
-
-
-
- OpenGrid.Framework.Data
- {62CDF671-0000-0000-0000-000000000000}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
-
-
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj.user b/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj.user
deleted file mode 100644
index 179959e..0000000
--- a/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj.user
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- Debug
- AnyCPU
- E:\work\oslauth\sim\trunk\bin\
- 8.0.50727
- ProjectFiles
- 0
-
-
-
-
diff --git a/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.exe.build b/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.exe.build
deleted file mode 100644
index 5e67af1..0000000
--- a/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.exe.build
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.mds b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.mds
deleted file mode 100644
index ed7bc24..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.mds
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.userprefs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.userprefs
deleted file mode 100644
index f221509..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.userprefs
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.usertasks b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.usertasks
deleted file mode 100644
index d887d0e..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.usertasks
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/AssemblyInfo.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/AssemblyInfo.cs
deleted file mode 100644
index af4e275..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/AssemblyInfo.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-// Information about this assembly is defined by the following
-// attributes.
-//
-// change them to the information which is associated with the assembly
-// you compile.
-
-[assembly: AssemblyTitle("")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// The assembly version has following format :
-//
-// Major.Minor.Build.Revision
-//
-// You can specify all values by your own or you can build default build and revision
-// numbers with the '*' character (the default):
-
-[assembly: AssemblyVersion("1.0.*")]
-
-// The following attributes specify the key for the sign of your assembly. See the
-// .NET Framework documentation for more information about signing.
-// This is not required, if you don't want signing let these attributes like they're.
-[assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyFile("")]
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/BlockingQueue.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/BlockingQueue.cs
deleted file mode 100644
index 83685fc..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/BlockingQueue.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using System;
-using System.Threading;
-using System.Collections.Generic;
-using System.Text;
-
-namespace OpenGridServices.Manager
-{
- public class BlockingQueue
- {
- private Queue _queue = new Queue();
- private object _queueSync = new object();
-
- public void Enqueue(T value)
- {
- lock (_queueSync)
- {
- _queue.Enqueue(value);
- Monitor.Pulse(_queueSync);
- }
- }
-
- public T Dequeue()
- {
- lock (_queueSync)
- {
- if (_queue.Count < 1)
- Monitor.Wait(_queueSync);
-
- return _queue.Dequeue();
- }
- }
- }
-}
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Connect to grid server.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Connect to grid server.cs
deleted file mode 100644
index 0d509ef..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Connect to grid server.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-
-using System;
-
-namespace OpenGridServices.Manager
-{
-
-
- public partial class Connect to grid server : Gtk.Dialog
- {
-
- public Connect to grid server()
- {
- this.Build();
- }
- }
-}
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs
deleted file mode 100644
index 8a80b1d..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using Gtk;
-using System;
-
-namespace OpenGridServices.Manager {
- public partial class ConnectToGridServerDialog : Gtk.Dialog
- {
-
- public ConnectToGridServerDialog()
- {
- this.Build();
- }
-
- protected virtual void OnResponse(object o, Gtk.ResponseArgs args)
- {
- switch(args.ResponseId) {
- case Gtk.ResponseType.Ok:
- MainClass.PendingOperations.Enqueue("connect_to_gridserver " + this.entry1.Text + " " + this.entry2.Text + " " + this.entry3.Text);
- break;
-
- case Gtk.ResponseType.Cancel:
- break;
- }
- this.Hide();
-
- }
-
- }
-
-}
\ No newline at end of file
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs
deleted file mode 100644
index 6b632d6..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs
+++ /dev/null
@@ -1,106 +0,0 @@
-using Nwc.XmlRpc;
-using System;
-using System.Net;
-using System.IO;
-using System.Xml;
-using System.Collections;
-using System.Collections.Generic;
-using libsecondlife;
-
-namespace OpenGridServices.Manager
-{
- public class GridServerConnectionManager
- {
- private string ServerURL;
- public LLUUID SessionID;
- public bool connected=false;
-
- public RegionBlock[][] WorldMap;
-
- public bool Connect(string GridServerURL, string username, string password)
- {
- try {
- this.ServerURL=GridServerURL;
- Hashtable LoginParamsHT = new Hashtable();
- LoginParamsHT["username"]=username;
- LoginParamsHT["password"]=password;
- ArrayList LoginParams = new ArrayList();
- LoginParams.Add(LoginParamsHT);
- XmlRpcRequest GridLoginReq = new XmlRpcRequest("manager_login",LoginParams);
- XmlRpcResponse GridResp = GridLoginReq.Send(ServerURL,3000);
- if(GridResp.IsFault) {
- connected=false;
- return false;
- } else {
- Hashtable gridrespData = (Hashtable)GridResp.Value;
- this.SessionID = new LLUUID((string)gridrespData["session_id"]);
- connected=true;
- return true;
- }
- } catch(Exception e) {
- Console.WriteLine(e.ToString());
- connected=false;
- return false;
- }
- }
-
- public void DownloadMap()
- {
- System.Net.WebClient mapdownloader = new WebClient();
- Stream regionliststream = mapdownloader.OpenRead(ServerURL + "/regionlist");
-
- RegionBlock TempRegionData;
-
- XmlDocument doc = new XmlDocument();
- doc.Load(regionliststream);
- regionliststream.Close();
- XmlNode rootnode = doc.FirstChild;
- if (rootnode.Name != "regions")
- {
- // TODO - ERROR!
- }
-
- for(int i=0; i<=rootnode.ChildNodes.Count; i++)
- {
- if(rootnode.ChildNodes.Item(i).Name != "region") {
- // TODO - ERROR!
- } else {
- TempRegionData = new RegionBlock();
-
-
- }
- }
- }
-
- public bool RestartServer()
- {
- return true;
- }
-
- public bool ShutdownServer()
- {
- try {
- Hashtable ShutdownParamsHT = new Hashtable();
- ArrayList ShutdownParams = new ArrayList();
- ShutdownParamsHT["session_id"]=this.SessionID.ToString();
- ShutdownParams.Add(ShutdownParamsHT);
- XmlRpcRequest GridShutdownReq = new XmlRpcRequest("shutdown",ShutdownParams);
- XmlRpcResponse GridResp = GridShutdownReq.Send(this.ServerURL,3000);
- if(GridResp.IsFault) {
- return false;
- } else {
- connected=false;
- return true;
- }
- } catch(Exception e) {
- Console.WriteLine(e.ToString());
- return false;
- }
- }
-
- public void DisconnectServer()
- {
- this.connected=false;
- }
- }
-}
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Main.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Main.cs
deleted file mode 100644
index 42e09e0..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Main.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-// project created on 5/14/2007 at 2:04 PM
-using System;
-using System.Threading;
-using Gtk;
-
-namespace OpenGridServices.Manager
-{
- class MainClass
- {
-
- public static bool QuitReq=false;
- public static BlockingQueue PendingOperations = new BlockingQueue();
-
- private static Thread OperationsRunner;
-
- private static GridServerConnectionManager gridserverConn;
-
- private static MainWindow win;
-
- public static void DoMainLoop()
- {
- while(!QuitReq)
- {
- Application.RunIteration();
- }
- }
-
- public static void RunOperations()
- {
- string operation;
- string cmd;
- char[] sep = new char[1];
- sep[0]=' ';
- while(!QuitReq)
- {
- operation=PendingOperations.Dequeue();
- Console.WriteLine(operation);
- cmd = operation.Split(sep)[0];
- switch(cmd) {
- case "connect_to_gridserver":
- win.SetStatus("Connecting to grid server...");
- if(gridserverConn.Connect(operation.Split(sep)[1],operation.Split(sep)[2],operation.Split(sep)[3])) {
- win.SetStatus("Connected OK with session ID:" + gridserverConn.SessionID);
- win.SetGridServerConnected(true);
- Thread.Sleep(3000);
- win.SetStatus("Downloading region maps...");
- gridserverConn.DownloadMap();
- } else {
- win.SetStatus("Could not connect");
- }
- break;
-
- case "restart_gridserver":
- win.SetStatus("Restarting grid server...");
- if(gridserverConn.RestartServer()) {
- win.SetStatus("Restarted server OK");
- Thread.Sleep(3000);
- win.SetStatus("");
- } else {
- win.SetStatus("Error restarting grid server!!!");
- }
- break;
-
- case "shutdown_gridserver":
- win.SetStatus("Shutting down grid server...");
- if(gridserverConn.ShutdownServer()) {
- win.SetStatus("Grid server shutdown");
- win.SetGridServerConnected(false);
- Thread.Sleep(3000);
- win.SetStatus("");
- } else {
- win.SetStatus("Could not shutdown grid server!!!");
- }
- break;
-
- case "disconnect_gridserver":
- gridserverConn.DisconnectServer();
- win.SetGridServerConnected(false);
- break;
- }
- }
- }
-
- public static void Main (string[] args)
- {
- gridserverConn = new GridServerConnectionManager();
- Application.Init ();
- win = new MainWindow ();
- win.Show ();
- OperationsRunner = new Thread(new ThreadStart(RunOperations));
- OperationsRunner.IsBackground=true;
- OperationsRunner.Start();
- DoMainLoop();
- }
- }
-}
\ No newline at end of file
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/MainWindow.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/MainWindow.cs
deleted file mode 100644
index 1db38f0..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/MainWindow.cs
+++ /dev/null
@@ -1,76 +0,0 @@
-using System;
-using Gtk;
-
-namespace OpenGridServices.Manager {
- public partial class MainWindow: Gtk.Window
- {
- public MainWindow (): base (Gtk.WindowType.Toplevel)
- {
- Build ();
- }
-
- public void SetStatus(string statustext)
- {
- this.statusbar1.Pop(0);
- this.statusbar1.Push(0,statustext);
- }
-
- public void DrawGrid(RegionBlock[][] regions)
- {
- for(int x=0; x<=regions.GetUpperBound(0); x++) {
- for(int y=0; y<=regions.GetUpperBound(1); y++) {
- Gdk.Image themap = new Gdk.Image(Gdk.ImageType.Fastest,Gdk.Visual.System,256,256);
- this.drawingarea1.GdkWindow.DrawImage(new Gdk.GC(this.drawingarea1.GdkWindow),themap,0,0,x*256,y*256,256,256);
- }
- }
- }
-
- public void SetGridServerConnected(bool connected)
- {
- if(connected) {
- this.ConnectToGridserver.Visible=false;
- this.DisconnectFromGridServer.Visible=true;
- } else {
- this.ConnectToGridserver.Visible=true;
- this.DisconnectFromGridServer.Visible=false;
- }
- }
-
- protected void OnDeleteEvent (object sender, DeleteEventArgs a)
- {
- Application.Quit ();
- MainClass.QuitReq=true;
- a.RetVal = true;
- }
-
- protected virtual void QuitMenu(object sender, System.EventArgs e)
- {
- MainClass.QuitReq=true;
- Application.Quit();
- }
-
- protected virtual void ConnectToGridServerMenu(object sender, System.EventArgs e)
- {
- ConnectToGridServerDialog griddialog = new ConnectToGridServerDialog ();
- griddialog.Show();
- }
-
- protected virtual void RestartGridserverMenu(object sender, System.EventArgs e)
- {
- MainClass.PendingOperations.Enqueue("restart_gridserver");
- }
-
- protected virtual void ShutdownGridserverMenu(object sender, System.EventArgs e)
- {
- MainClass.PendingOperations.Enqueue("shutdown_gridserver");
- }
-
- protected virtual void DisconnectGridServerMenu(object sender, System.EventArgs e)
- {
- MainClass.PendingOperations.Enqueue("disconnect_gridserver");
- }
-
- }
-}
-
-
\ No newline at end of file
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.mdp b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.mdp
deleted file mode 100644
index cfdc085..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.mdp
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.pidb b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.pidb
deleted file mode 100644
index 44e7a61..0000000
Binary files a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.pidb and /dev/null differ
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs
deleted file mode 100644
index 00f7c65..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System;
-using System.Xml;
-using libsecondlife;
-using OpenSim.Framework.Utilities;
-
-namespace OpenGridServices.Manager
-{
-
-
- public class RegionBlock
- {
- public uint regloc_x;
- public uint regloc_y;
-
- public string httpd_url;
-
- public string region_name;
-
- public ulong regionhandle {
- get { return Util.UIntsToLong(regloc_x*256,regloc_y*256); }
- }
-
- public Gdk.Pixbuf MiniMap;
-
- public RegionBlock()
- {
- }
-
- public void LoadFromXmlNode(XmlNode sourcenode)
- {
- this.regloc_x=Convert.ToUInt32(sourcenode.Attributes.GetNamedItem("loc_x").Value);
- this.regloc_y=Convert.ToUInt32(sourcenode.Attributes.GetNamedItem("loc_y").Value);
- this.region_name=sourcenode.Attributes.GetNamedItem("region_name").Value;
- this.httpd_url=sourcenode.Attributes.GetNamedItem("httpd_url").Value;
- }
- }
-}
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Util.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Util.cs
deleted file mode 100644
index 5bf7ff9..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Util.cs
+++ /dev/null
@@ -1,133 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using libsecondlife;
-using libsecondlife.Packets;
-
-namespace OpenSim.Framework.Utilities
-{
- public class Util
- {
- private static Random randomClass = new Random();
- private static uint nextXferID = 5000;
- private static object XferLock = new object();
-
- public static ulong UIntsToLong(uint X, uint Y)
- {
- return Helpers.UIntsToLong(X, Y);
- }
-
- public static Random RandomClass
- {
- get
- {
- return randomClass;
- }
- }
-
- public static uint GetNextXferID()
- {
- uint id = 0;
- lock(XferLock)
- {
- id = nextXferID;
- nextXferID++;
- }
- return id;
- }
-
- //public static int fast_distance2d(int x, int y)
- //{
- // x = System.Math.Abs(x);
- // y = System.Math.Abs(y);
-
- // int min = System.Math.Min(x, y);
-
- // return (x + y - (min >> 1) - (min >> 2) + (min >> 4));
- //}
-
- public static string FieldToString(byte[] bytes)
- {
- return FieldToString(bytes, String.Empty);
- }
-
- ///
- /// Convert a variable length field (byte array) to a string, with a
- /// field name prepended to each line of the output
- ///
- /// If the byte array has unprintable characters in it, a
- /// hex dump will be put in the string instead
- /// The byte array to convert to a string
- /// A field name to prepend to each line of output
- /// An ASCII string or a string containing a hex dump, minus
- /// the null terminator
- public static string FieldToString(byte[] bytes, string fieldName)
- {
- // Check for a common case
- if (bytes.Length == 0) return String.Empty;
-
- StringBuilder output = new StringBuilder();
- bool printable = true;
-
- for (int i = 0; i < bytes.Length; ++i)
- {
- // Check if there are any unprintable characters in the array
- if ((bytes[i] < 0x20 || bytes[i] > 0x7E) && bytes[i] != 0x09
- && bytes[i] != 0x0D && bytes[i] != 0x0A && bytes[i] != 0x00)
- {
- printable = false;
- break;
- }
- }
-
- if (printable)
- {
- if (fieldName.Length > 0)
- {
- output.Append(fieldName);
- output.Append(": ");
- }
-
- if (bytes[bytes.Length - 1] == 0x00)
- output.Append(UTF8Encoding.UTF8.GetString(bytes, 0, bytes.Length - 1));
- else
- output.Append(UTF8Encoding.UTF8.GetString(bytes));
- }
- else
- {
- for (int i = 0; i < bytes.Length; i += 16)
- {
- if (i != 0)
- output.Append(Environment.NewLine);
- if (fieldName.Length > 0)
- {
- output.Append(fieldName);
- output.Append(": ");
- }
-
- for (int j = 0; j < 16; j++)
- {
- if ((i + j) < bytes.Length)
- output.Append(String.Format("{0:X2} ", bytes[i + j]));
- else
- output.Append(" ");
- }
-
- for (int j = 0; j < 16 && (i + j) < bytes.Length; j++)
- {
- if (bytes[i + j] >= 0x20 && bytes[i + j] < 0x7E)
- output.Append((char)bytes[i + j]);
- else
- output.Append(".");
- }
- }
- }
-
- return output.ToString();
- }
- public Util()
- {
-
- }
- }
-}
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs
deleted file mode 100644
index da6739e..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs
+++ /dev/null
@@ -1,226 +0,0 @@
-// ------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Mono Runtime Version: 2.0.50727.42
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-// ------------------------------------------------------------------------------
-
-namespace OpenGridServices.Manager {
-
-
- public partial class ConnectToGridServerDialog {
-
- private Gtk.VBox vbox2;
-
- private Gtk.VBox vbox3;
-
- private Gtk.HBox hbox1;
-
- private Gtk.Label label1;
-
- private Gtk.Entry entry1;
-
- private Gtk.HBox hbox2;
-
- private Gtk.Label label2;
-
- private Gtk.Entry entry2;
-
- private Gtk.HBox hbox3;
-
- private Gtk.Label label3;
-
- private Gtk.Entry entry3;
-
- private Gtk.Button button2;
-
- private Gtk.Button button8;
-
- protected virtual void Build() {
- Stetic.Gui.Initialize();
- // Widget OpenGridServices.Manager.ConnectToGridServerDialog
- this.Events = ((Gdk.EventMask)(256));
- this.Name = "OpenGridServices.Manager.ConnectToGridServerDialog";
- this.Title = Mono.Unix.Catalog.GetString("Connect to Grid server");
- this.WindowPosition = ((Gtk.WindowPosition)(4));
- this.HasSeparator = false;
- // Internal child OpenGridServices.Manager.ConnectToGridServerDialog.VBox
- Gtk.VBox w1 = this.VBox;
- w1.Events = ((Gdk.EventMask)(256));
- w1.Name = "dialog_VBox";
- w1.BorderWidth = ((uint)(2));
- // Container child dialog_VBox.Gtk.Box+BoxChild
- this.vbox2 = new Gtk.VBox();
- this.vbox2.Name = "vbox2";
- // Container child vbox2.Gtk.Box+BoxChild
- this.vbox3 = new Gtk.VBox();
- this.vbox3.Name = "vbox3";
- // Container child vbox3.Gtk.Box+BoxChild
- this.hbox1 = new Gtk.HBox();
- this.hbox1.Name = "hbox1";
- // Container child hbox1.Gtk.Box+BoxChild
- this.label1 = new Gtk.Label();
- this.label1.Name = "label1";
- this.label1.Xalign = 1F;
- this.label1.LabelProp = Mono.Unix.Catalog.GetString("Grid server URL: ");
- this.label1.Justify = ((Gtk.Justification)(1));
- this.hbox1.Add(this.label1);
- Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.label1]));
- w2.Position = 0;
- // Container child hbox1.Gtk.Box+BoxChild
- this.entry1 = new Gtk.Entry();
- this.entry1.CanFocus = true;
- this.entry1.Name = "entry1";
- this.entry1.Text = Mono.Unix.Catalog.GetString("http://gridserver:8001");
- this.entry1.IsEditable = true;
- this.entry1.MaxLength = 255;
- this.entry1.InvisibleChar = '•';
- this.hbox1.Add(this.entry1);
- Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.hbox1[this.entry1]));
- w3.Position = 1;
- this.vbox3.Add(this.hbox1);
- Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox3[this.hbox1]));
- w4.Position = 0;
- w4.Expand = false;
- w4.Fill = false;
- // Container child vbox3.Gtk.Box+BoxChild
- this.hbox2 = new Gtk.HBox();
- this.hbox2.Name = "hbox2";
- // Container child hbox2.Gtk.Box+BoxChild
- this.label2 = new Gtk.Label();
- this.label2.Name = "label2";
- this.label2.Xalign = 1F;
- this.label2.LabelProp = Mono.Unix.Catalog.GetString("Username:");
- this.label2.Justify = ((Gtk.Justification)(1));
- this.hbox2.Add(this.label2);
- Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.hbox2[this.label2]));
- w5.Position = 0;
- // Container child hbox2.Gtk.Box+BoxChild
- this.entry2 = new Gtk.Entry();
- this.entry2.CanFocus = true;
- this.entry2.Name = "entry2";
- this.entry2.IsEditable = true;
- this.entry2.InvisibleChar = '•';
- this.hbox2.Add(this.entry2);
- Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox2[this.entry2]));
- w6.Position = 1;
- this.vbox3.Add(this.hbox2);
- Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox3[this.hbox2]));
- w7.Position = 1;
- w7.Expand = false;
- w7.Fill = false;
- // Container child vbox3.Gtk.Box+BoxChild
- this.hbox3 = new Gtk.HBox();
- this.hbox3.Name = "hbox3";
- // Container child hbox3.Gtk.Box+BoxChild
- this.label3 = new Gtk.Label();
- this.label3.Name = "label3";
- this.label3.Xalign = 1F;
- this.label3.LabelProp = Mono.Unix.Catalog.GetString("Password:");
- this.label3.Justify = ((Gtk.Justification)(1));
- this.hbox3.Add(this.label3);
- Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox3[this.label3]));
- w8.Position = 0;
- // Container child hbox3.Gtk.Box+BoxChild
- this.entry3 = new Gtk.Entry();
- this.entry3.CanFocus = true;
- this.entry3.Name = "entry3";
- this.entry3.IsEditable = true;
- this.entry3.InvisibleChar = '•';
- this.hbox3.Add(this.entry3);
- Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.hbox3[this.entry3]));
- w9.Position = 1;
- this.vbox3.Add(this.hbox3);
- Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.vbox3[this.hbox3]));
- w10.Position = 2;
- w10.Expand = false;
- w10.Fill = false;
- this.vbox2.Add(this.vbox3);
- Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.vbox2[this.vbox3]));
- w11.Position = 2;
- w11.Expand = false;
- w11.Fill = false;
- w1.Add(this.vbox2);
- Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(w1[this.vbox2]));
- w12.Position = 0;
- // Internal child OpenGridServices.Manager.ConnectToGridServerDialog.ActionArea
- Gtk.HButtonBox w13 = this.ActionArea;
- w13.Events = ((Gdk.EventMask)(256));
- w13.Name = "OpenGridServices.Manager.ConnectToGridServerDialog_ActionArea";
- w13.Spacing = 6;
- w13.BorderWidth = ((uint)(5));
- w13.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
- // Container child OpenGridServices.Manager.ConnectToGridServerDialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild
- this.button2 = new Gtk.Button();
- this.button2.CanDefault = true;
- this.button2.CanFocus = true;
- this.button2.Name = "button2";
- this.button2.UseUnderline = true;
- // Container child button2.Gtk.Container+ContainerChild
- Gtk.Alignment w14 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
- w14.Name = "GtkAlignment";
- // Container child GtkAlignment.Gtk.Container+ContainerChild
- Gtk.HBox w15 = new Gtk.HBox();
- w15.Name = "GtkHBox";
- w15.Spacing = 2;
- // Container child GtkHBox.Gtk.Container+ContainerChild
- Gtk.Image w16 = new Gtk.Image();
- w16.Name = "image1";
- w16.Pixbuf = Gtk.IconTheme.Default.LoadIcon("gtk-apply", 16, 0);
- w15.Add(w16);
- // Container child GtkHBox.Gtk.Container+ContainerChild
- Gtk.Label w18 = new Gtk.Label();
- w18.Name = "GtkLabel";
- w18.LabelProp = Mono.Unix.Catalog.GetString("Connect");
- w18.UseUnderline = true;
- w15.Add(w18);
- w14.Add(w15);
- this.button2.Add(w14);
- this.AddActionWidget(this.button2, -5);
- Gtk.ButtonBox.ButtonBoxChild w22 = ((Gtk.ButtonBox.ButtonBoxChild)(w13[this.button2]));
- w22.Expand = false;
- w22.Fill = false;
- // Container child OpenGridServices.Manager.ConnectToGridServerDialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild
- this.button8 = new Gtk.Button();
- this.button8.CanDefault = true;
- this.button8.CanFocus = true;
- this.button8.Name = "button8";
- this.button8.UseUnderline = true;
- // Container child button8.Gtk.Container+ContainerChild
- Gtk.Alignment w23 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
- w23.Name = "GtkAlignment1";
- // Container child GtkAlignment1.Gtk.Container+ContainerChild
- Gtk.HBox w24 = new Gtk.HBox();
- w24.Name = "GtkHBox1";
- w24.Spacing = 2;
- // Container child GtkHBox1.Gtk.Container+ContainerChild
- Gtk.Image w25 = new Gtk.Image();
- w25.Name = "image2";
- w25.Pixbuf = Gtk.IconTheme.Default.LoadIcon("gtk-cancel", 16, 0);
- w24.Add(w25);
- // Container child GtkHBox1.Gtk.Container+ContainerChild
- Gtk.Label w27 = new Gtk.Label();
- w27.Name = "GtkLabel1";
- w27.LabelProp = Mono.Unix.Catalog.GetString("Cancel");
- w27.UseUnderline = true;
- w24.Add(w27);
- w23.Add(w24);
- this.button8.Add(w23);
- this.AddActionWidget(this.button8, -6);
- Gtk.ButtonBox.ButtonBoxChild w31 = ((Gtk.ButtonBox.ButtonBoxChild)(w13[this.button8]));
- w31.Position = 1;
- w31.Expand = false;
- w31.Fill = false;
- if ((this.Child != null)) {
- this.Child.ShowAll();
- }
- this.DefaultWidth = 476;
- this.DefaultHeight = 137;
- this.Show();
- this.Response += new Gtk.ResponseHandler(this.OnResponse);
- }
- }
-}
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs
deleted file mode 100644
index 8798dac..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs
+++ /dev/null
@@ -1,256 +0,0 @@
-// ------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Mono Runtime Version: 2.0.50727.42
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-// ------------------------------------------------------------------------------
-
-namespace OpenGridServices.Manager {
-
-
- public partial class MainWindow {
-
- private Gtk.Action Grid;
-
- private Gtk.Action User;
-
- private Gtk.Action Asset;
-
- private Gtk.Action Region;
-
- private Gtk.Action Services;
-
- private Gtk.Action ConnectToGridserver;
-
- private Gtk.Action RestartWholeGrid;
-
- private Gtk.Action ShutdownWholeGrid;
-
- private Gtk.Action ExitGridManager;
-
- private Gtk.Action ConnectToUserserver;
-
- private Gtk.Action AccountManagment;
-
- private Gtk.Action GlobalNotice;
-
- private Gtk.Action DisableAllLogins;
-
- private Gtk.Action DisableNonGodUsersOnly;
-
- private Gtk.Action ShutdownUserServer;
-
- private Gtk.Action ShutdownGridserverOnly;
-
- private Gtk.Action RestartGridserverOnly;
-
- private Gtk.Action DefaultLocalGridUserserver;
-
- private Gtk.Action CustomUserserver;
-
- private Gtk.Action RemoteGridDefaultUserserver;
-
- private Gtk.Action DisconnectFromGridServer;
-
- private Gtk.Action UploadAsset;
-
- private Gtk.Action AssetManagement;
-
- private Gtk.Action ConnectToAssetServer;
-
- private Gtk.Action ConnectToDefaultAssetServerForGrid;
-
- private Gtk.Action DefaultForLocalGrid;
-
- private Gtk.Action DefaultForRemoteGrid;
-
- private Gtk.Action CustomAssetServer;
-
- private Gtk.VBox vbox1;
-
- private Gtk.MenuBar menubar2;
-
- private Gtk.HBox hbox1;
-
- private Gtk.ScrolledWindow scrolledwindow1;
-
- private Gtk.DrawingArea drawingarea1;
-
- private Gtk.TreeView treeview1;
-
- private Gtk.Statusbar statusbar1;
-
- protected virtual void Build() {
- Stetic.Gui.Initialize();
- // Widget OpenGridServices.Manager.MainWindow
- Gtk.UIManager w1 = new Gtk.UIManager();
- Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default");
- this.Grid = new Gtk.Action("Grid", Mono.Unix.Catalog.GetString("Grid"), null, null);
- this.Grid.HideIfEmpty = false;
- this.Grid.ShortLabel = Mono.Unix.Catalog.GetString("Grid");
- w2.Add(this.Grid, "g");
- this.User = new Gtk.Action("User", Mono.Unix.Catalog.GetString("User"), null, null);
- this.User.HideIfEmpty = false;
- this.User.ShortLabel = Mono.Unix.Catalog.GetString("User");
- w2.Add(this.User, null);
- this.Asset = new Gtk.Action("Asset", Mono.Unix.Catalog.GetString("Asset"), null, null);
- this.Asset.HideIfEmpty = false;
- this.Asset.ShortLabel = Mono.Unix.Catalog.GetString("Asset");
- w2.Add(this.Asset, null);
- this.Region = new Gtk.Action("Region", Mono.Unix.Catalog.GetString("Region"), null, null);
- this.Region.ShortLabel = Mono.Unix.Catalog.GetString("Region");
- w2.Add(this.Region, null);
- this.Services = new Gtk.Action("Services", Mono.Unix.Catalog.GetString("Services"), null, null);
- this.Services.ShortLabel = Mono.Unix.Catalog.GetString("Services");
- w2.Add(this.Services, null);
- this.ConnectToGridserver = new Gtk.Action("ConnectToGridserver", Mono.Unix.Catalog.GetString("Connect to gridserver..."), null, "gtk-connect");
- this.ConnectToGridserver.HideIfEmpty = false;
- this.ConnectToGridserver.ShortLabel = Mono.Unix.Catalog.GetString("Connect to gridserver");
- w2.Add(this.ConnectToGridserver, null);
- this.RestartWholeGrid = new Gtk.Action("RestartWholeGrid", Mono.Unix.Catalog.GetString("Restart whole grid"), null, "gtk-refresh");
- this.RestartWholeGrid.ShortLabel = Mono.Unix.Catalog.GetString("Restart whole grid");
- w2.Add(this.RestartWholeGrid, null);
- this.ShutdownWholeGrid = new Gtk.Action("ShutdownWholeGrid", Mono.Unix.Catalog.GetString("Shutdown whole grid"), null, "gtk-stop");
- this.ShutdownWholeGrid.ShortLabel = Mono.Unix.Catalog.GetString("Shutdown whole grid");
- w2.Add(this.ShutdownWholeGrid, null);
- this.ExitGridManager = new Gtk.Action("ExitGridManager", Mono.Unix.Catalog.GetString("Exit grid manager"), null, "gtk-close");
- this.ExitGridManager.ShortLabel = Mono.Unix.Catalog.GetString("Exit grid manager");
- w2.Add(this.ExitGridManager, null);
- this.ConnectToUserserver = new Gtk.Action("ConnectToUserserver", Mono.Unix.Catalog.GetString("Connect to userserver"), null, "gtk-connect");
- this.ConnectToUserserver.ShortLabel = Mono.Unix.Catalog.GetString("Connect to userserver");
- w2.Add(this.ConnectToUserserver, null);
- this.AccountManagment = new Gtk.Action("AccountManagment", Mono.Unix.Catalog.GetString("Account managment"), null, "gtk-properties");
- this.AccountManagment.ShortLabel = Mono.Unix.Catalog.GetString("Account managment");
- w2.Add(this.AccountManagment, null);
- this.GlobalNotice = new Gtk.Action("GlobalNotice", Mono.Unix.Catalog.GetString("Global notice"), null, "gtk-network");
- this.GlobalNotice.ShortLabel = Mono.Unix.Catalog.GetString("Global notice");
- w2.Add(this.GlobalNotice, null);
- this.DisableAllLogins = new Gtk.Action("DisableAllLogins", Mono.Unix.Catalog.GetString("Disable all logins"), null, "gtk-no");
- this.DisableAllLogins.ShortLabel = Mono.Unix.Catalog.GetString("Disable all logins");
- w2.Add(this.DisableAllLogins, null);
- this.DisableNonGodUsersOnly = new Gtk.Action("DisableNonGodUsersOnly", Mono.Unix.Catalog.GetString("Disable non-god users only"), null, "gtk-no");
- this.DisableNonGodUsersOnly.ShortLabel = Mono.Unix.Catalog.GetString("Disable non-god users only");
- w2.Add(this.DisableNonGodUsersOnly, null);
- this.ShutdownUserServer = new Gtk.Action("ShutdownUserServer", Mono.Unix.Catalog.GetString("Shutdown user server"), null, "gtk-stop");
- this.ShutdownUserServer.ShortLabel = Mono.Unix.Catalog.GetString("Shutdown user server");
- w2.Add(this.ShutdownUserServer, null);
- this.ShutdownGridserverOnly = new Gtk.Action("ShutdownGridserverOnly", Mono.Unix.Catalog.GetString("Shutdown gridserver only"), null, "gtk-stop");
- this.ShutdownGridserverOnly.ShortLabel = Mono.Unix.Catalog.GetString("Shutdown gridserver only");
- w2.Add(this.ShutdownGridserverOnly, null);
- this.RestartGridserverOnly = new Gtk.Action("RestartGridserverOnly", Mono.Unix.Catalog.GetString("Restart gridserver only"), null, "gtk-refresh");
- this.RestartGridserverOnly.ShortLabel = Mono.Unix.Catalog.GetString("Restart gridserver only");
- w2.Add(this.RestartGridserverOnly, null);
- this.DefaultLocalGridUserserver = new Gtk.Action("DefaultLocalGridUserserver", Mono.Unix.Catalog.GetString("Default local grid userserver"), null, null);
- this.DefaultLocalGridUserserver.ShortLabel = Mono.Unix.Catalog.GetString("Default local grid userserver");
- w2.Add(this.DefaultLocalGridUserserver, null);
- this.CustomUserserver = new Gtk.Action("CustomUserserver", Mono.Unix.Catalog.GetString("Custom userserver..."), null, null);
- this.CustomUserserver.ShortLabel = Mono.Unix.Catalog.GetString("Custom userserver");
- w2.Add(this.CustomUserserver, null);
- this.RemoteGridDefaultUserserver = new Gtk.Action("RemoteGridDefaultUserserver", Mono.Unix.Catalog.GetString("Remote grid default userserver..."), null, null);
- this.RemoteGridDefaultUserserver.ShortLabel = Mono.Unix.Catalog.GetString("Remote grid default userserver");
- w2.Add(this.RemoteGridDefaultUserserver, null);
- this.DisconnectFromGridServer = new Gtk.Action("DisconnectFromGridServer", Mono.Unix.Catalog.GetString("Disconnect from grid server"), null, "gtk-disconnect");
- this.DisconnectFromGridServer.ShortLabel = Mono.Unix.Catalog.GetString("Disconnect from grid server");
- this.DisconnectFromGridServer.Visible = false;
- w2.Add(this.DisconnectFromGridServer, null);
- this.UploadAsset = new Gtk.Action("UploadAsset", Mono.Unix.Catalog.GetString("Upload asset"), null, null);
- this.UploadAsset.ShortLabel = Mono.Unix.Catalog.GetString("Upload asset");
- w2.Add(this.UploadAsset, null);
- this.AssetManagement = new Gtk.Action("AssetManagement", Mono.Unix.Catalog.GetString("Asset management"), null, null);
- this.AssetManagement.ShortLabel = Mono.Unix.Catalog.GetString("Asset management");
- w2.Add(this.AssetManagement, null);
- this.ConnectToAssetServer = new Gtk.Action("ConnectToAssetServer", Mono.Unix.Catalog.GetString("Connect to asset server"), null, null);
- this.ConnectToAssetServer.ShortLabel = Mono.Unix.Catalog.GetString("Connect to asset server");
- w2.Add(this.ConnectToAssetServer, null);
- this.ConnectToDefaultAssetServerForGrid = new Gtk.Action("ConnectToDefaultAssetServerForGrid", Mono.Unix.Catalog.GetString("Connect to default asset server for grid"), null, null);
- this.ConnectToDefaultAssetServerForGrid.ShortLabel = Mono.Unix.Catalog.GetString("Connect to default asset server for grid");
- w2.Add(this.ConnectToDefaultAssetServerForGrid, null);
- this.DefaultForLocalGrid = new Gtk.Action("DefaultForLocalGrid", Mono.Unix.Catalog.GetString("Default for local grid"), null, null);
- this.DefaultForLocalGrid.ShortLabel = Mono.Unix.Catalog.GetString("Default for local grid");
- w2.Add(this.DefaultForLocalGrid, null);
- this.DefaultForRemoteGrid = new Gtk.Action("DefaultForRemoteGrid", Mono.Unix.Catalog.GetString("Default for remote grid..."), null, null);
- this.DefaultForRemoteGrid.ShortLabel = Mono.Unix.Catalog.GetString("Default for remote grid...");
- w2.Add(this.DefaultForRemoteGrid, null);
- this.CustomAssetServer = new Gtk.Action("CustomAssetServer", Mono.Unix.Catalog.GetString("Custom asset server..."), null, null);
- this.CustomAssetServer.ShortLabel = Mono.Unix.Catalog.GetString("Custom asset server...");
- w2.Add(this.CustomAssetServer, null);
- w1.InsertActionGroup(w2, 0);
- this.AddAccelGroup(w1.AccelGroup);
- this.WidthRequest = 800;
- this.HeightRequest = 600;
- this.Name = "OpenGridServices.Manager.MainWindow";
- this.Title = Mono.Unix.Catalog.GetString("Open Grid Services Manager");
- this.Icon = Gtk.IconTheme.Default.LoadIcon("gtk-network", 48, 0);
- // Container child OpenGridServices.Manager.MainWindow.Gtk.Container+ContainerChild
- this.vbox1 = new Gtk.VBox();
- this.vbox1.Name = "vbox1";
- // Container child vbox1.Gtk.Box+BoxChild
- w1.AddUiFromString("");
- this.menubar2 = ((Gtk.MenuBar)(w1.GetWidget("/menubar2")));
- this.menubar2.HeightRequest = 25;
- this.menubar2.Name = "menubar2";
- this.vbox1.Add(this.menubar2);
- Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar2]));
- w3.Position = 0;
- w3.Expand = false;
- w3.Fill = false;
- // Container child vbox1.Gtk.Box+BoxChild
- this.hbox1 = new Gtk.HBox();
- this.hbox1.Name = "hbox1";
- // Container child hbox1.Gtk.Box+BoxChild
- this.scrolledwindow1 = new Gtk.ScrolledWindow();
- this.scrolledwindow1.CanFocus = true;
- this.scrolledwindow1.Name = "scrolledwindow1";
- this.scrolledwindow1.VscrollbarPolicy = ((Gtk.PolicyType)(1));
- this.scrolledwindow1.HscrollbarPolicy = ((Gtk.PolicyType)(1));
- // Container child scrolledwindow1.Gtk.Container+ContainerChild
- Gtk.Viewport w4 = new Gtk.Viewport();
- w4.Name = "GtkViewport";
- w4.ShadowType = ((Gtk.ShadowType)(0));
- // Container child GtkViewport.Gtk.Container+ContainerChild
- this.drawingarea1 = new Gtk.DrawingArea();
- this.drawingarea1.Name = "drawingarea1";
- w4.Add(this.drawingarea1);
- this.scrolledwindow1.Add(w4);
- this.hbox1.Add(this.scrolledwindow1);
- Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.hbox1[this.scrolledwindow1]));
- w7.Position = 1;
- // Container child hbox1.Gtk.Box+BoxChild
- this.treeview1 = new Gtk.TreeView();
- this.treeview1.CanFocus = true;
- this.treeview1.Name = "treeview1";
- this.hbox1.Add(this.treeview1);
- Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox1[this.treeview1]));
- w8.Position = 2;
- this.vbox1.Add(this.hbox1);
- Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox1]));
- w9.Position = 1;
- // Container child vbox1.Gtk.Box+BoxChild
- this.statusbar1 = new Gtk.Statusbar();
- this.statusbar1.Name = "statusbar1";
- this.statusbar1.Spacing = 5;
- this.vbox1.Add(this.statusbar1);
- Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.vbox1[this.statusbar1]));
- w10.PackType = ((Gtk.PackType)(1));
- w10.Position = 2;
- w10.Expand = false;
- w10.Fill = false;
- this.Add(this.vbox1);
- if ((this.Child != null)) {
- this.Child.ShowAll();
- }
- this.DefaultWidth = 800;
- this.DefaultHeight = 800;
- this.Show();
- this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent);
- this.ConnectToGridserver.Activated += new System.EventHandler(this.ConnectToGridServerMenu);
- this.ExitGridManager.Activated += new System.EventHandler(this.QuitMenu);
- this.ShutdownGridserverOnly.Activated += new System.EventHandler(this.ShutdownGridserverMenu);
- this.RestartGridserverOnly.Activated += new System.EventHandler(this.RestartGridserverMenu);
- this.DisconnectFromGridServer.Activated += new System.EventHandler(this.DisconnectGridServerMenu);
- }
- }
-}
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/generated.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/generated.cs
deleted file mode 100644
index dd4abdd..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/generated.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-// ------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Mono Runtime Version: 2.0.50727.42
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-// ------------------------------------------------------------------------------
-
-namespace Stetic {
-
-
- internal class Gui {
-
- private static bool initialized;
-
- internal static void Initialize() {
- if ((Stetic.Gui.initialized == false)) {
- Stetic.Gui.initialized = true;
- }
- }
- }
-
- internal class ActionGroups {
-
- public static Gtk.ActionGroup GetActionGroup(System.Type type) {
- return Stetic.ActionGroups.GetActionGroup(type.FullName);
- }
-
- public static Gtk.ActionGroup GetActionGroup(string name) {
- return null;
- }
- }
-}
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/gui.stetic b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/gui.stetic
deleted file mode 100644
index c883f08..0000000
--- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/gui.stetic
+++ /dev/null
@@ -1,502 +0,0 @@
-
-
-
-
-
- Action
- <Alt><Mod2>g
- False
- Grid
- Grid
-
-
- Action
- False
- User
- User
-
-
- Action
- False
- Asset
- Asset
-
-
- Action
- Region
- Region
-
-
- Action
- Services
- Services
-
-
- Action
- False
- Connect to gridserver...
- Connect to gridserver
- gtk-connect
-
-
-
- Action
- Restart whole grid
- Restart whole grid
- gtk-refresh
-
-
- Action
- Shutdown whole grid
- Shutdown whole grid
- gtk-stop
-
-
- Action
- Exit grid manager
- Exit grid manager
- gtk-close
-
-
-
- Action
- Connect to userserver
- Connect to userserver
- gtk-connect
-
-
- Action
- Account managment
- Account managment
- gtk-properties
-
-
- Action
- Global notice
- Global notice
- gtk-network
-
-
- Action
- Disable all logins
- Disable all logins
- gtk-no
-
-
- Action
- Disable non-god users only
- Disable non-god users only
- gtk-no
-
-
- Action
- Shutdown user server
- Shutdown user server
- gtk-stop
-
-
- Action
- Shutdown gridserver only
- Shutdown gridserver only
- gtk-stop
-
-
-
- Action
- Restart gridserver only
- Restart gridserver only
- gtk-refresh
-
-
-
- Action
- Default local grid userserver
- Default local grid userserver
-
-
- Action
- Custom userserver...
- Custom userserver
-
-
- Action
- Remote grid default userserver...
- Remote grid default userserver
-
-
- Action
- Disconnect from grid server
- Disconnect from grid server
- gtk-disconnect
- False
-
-
-
- Action
- Upload asset
- Upload asset
-
-
- Action
- Asset management
- Asset management
-
-
- Action
- Connect to asset server
- Connect to asset server
-
-
- Action
- Connect to default asset server for grid
- Connect to default asset server for grid
-
-
- Action
- Default for local grid
- Default for local grid
-
-
- Action
- Default for remote grid...
- Default for remote grid...
-
-
- Action
- Custom asset server...
- Custom asset server...
-
-
-
- 800
- 600
- Open Grid Services Manager
- stock:gtk-network Dialog
-
-
-
-
-
-
-
- 0
- False
- False
- False
-
-
-
-
-
-
-
-
-
-
-
- True
- Automatic
- Automatic
-
-
-
- None
-
-
-
-
-
-
-
-
-
- 1
- True
-
-
-
-
-
- True
-
-
- 2
- True
-
-
-
-
- 1
- True
-
-
-
-
- statusBar1
- 5
-
-
-
-
-
-
-
-
- End
- 2
- False
- False
- False
-
-
-
-
-
-
-
- ButtonPressMask
- Connect to Grid server
- CenterOnParent
- 2
- False
- False
-
-
-
-
- ButtonPressMask
- 2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1
- Grid server URL:
- Right
-
-
- 0
- False
-
-
-
-
-
- True
- http://gridserver:8001
- True
- 255
- •
-
-
- 1
- False
-
-
-
-
-
-
-
- 0
- True
- False
- False
-
-
-
-
-
-
-
-
- 1
- Username:
- Right
-
-
- 0
- False
-
-
-
-
-
- True
- True
- •
-
-
- 1
- True
-
-
-
-
-
-
-
- 1
- False
- False
- False
-
-
-
-
-
-
-
-
- 1
- Password:
- Right
-
-
- 0
- False
-
-
-
-
-
- True
- True
- •
-
-
- 1
- True
-
-
-
-
-
-
-
- 2
- True
- False
- False
-
-
-
-
- 2
- True
- False
- False
-
-
-
-
- 0
- True
-
-
-
-
-
-
-
- ButtonPressMask
- 6
- 5
- 2
- End
-
-
-
- True
- True
- TextAndIcon
- stock:gtk-apply Menu
- Connect
- True
- True
- -5
-
-
- False
- False
-
-
-
-
-
- True
- True
- TextAndIcon
- stock:gtk-cancel Menu
- Cancel
- True
- True
- -6
-
-
- 1
- False
- False
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OpenGridServices/OpenGridServices.UserServer/Main.cs b/OpenGridServices/OpenGridServices.UserServer/Main.cs
deleted file mode 100644
index bb20576..0000000
--- a/OpenGridServices/OpenGridServices.UserServer/Main.cs
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Reflection;
-using System.IO;
-using System.Text;
-using libsecondlife;
-using OpenSim.Framework.User;
-using OpenSim.Framework.Sims;
-using OpenSim.Framework.Inventory;
-using OpenSim.Framework.Interfaces;
-using OpenSim.Framework.Console;
-using OpenSim.Servers;
-using OpenSim.Framework.Utilities;
-using OpenSim.GenericConfig;
-
-namespace OpenGridServices.UserServer
-{
- ///
- ///
- public class OpenUser_Main : BaseServer, conscmd_callback
- {
- private string ConfigDll = "OpenUser.Config.UserConfigDb4o.dll";
- private string StorageDll = "OpenGrid.Framework.Data.MySQL.dll";
- private UserConfig Cfg;
- protected IGenericConfig localXMLConfig;
-
- public UserManager m_userManager; // Replaces below.
-
- //private UserProfileManager m_userProfileManager; // Depreciated
-
- public Dictionary UserSessions = new Dictionary();
-
- ConsoleBase m_console;
-
- [STAThread]
- public static void Main(string[] args)
- {
- Console.WriteLine("Starting...\n");
-
- OpenUser_Main userserver = new OpenUser_Main();
-
- userserver.Startup();
- userserver.Work();
- }
-
- private OpenUser_Main()
- {
- m_console = new ConsoleBase("opengrid-userserver-console.log", "OpenUser", this , false);
- MainConsole.Instance = m_console;
- }
-
- private void Work()
- {
- m_console.Notice("Enter help for a list of commands\n");
-
- while (true)
- {
- m_console.MainConsolePrompt();
- }
- }
-
- public void Startup()
- {
- this.localXMLConfig = new XmlConfig("UserServerConfig.xml");
- this.localXMLConfig.LoadData();
- this.ConfigDB(this.localXMLConfig);
- this.localXMLConfig.Close();
-
- MainConsole.Instance.Verbose("Main.cs:Startup() - Loading configuration");
- Cfg = this.LoadConfigDll(this.ConfigDll);
- Cfg.InitConfig();
-
- MainConsole.Instance.Verbose( "Main.cs:Startup() - Establishing data connection");
- m_userManager = new UserManager();
- m_userManager._config = Cfg;
- m_userManager.AddPlugin(StorageDll);
-
- MainConsole.Instance.Verbose("Main.cs:Startup() - Starting HTTP process");
- BaseHttpServer httpServer = new BaseHttpServer(8002);
-
- httpServer.AddXmlRPCHandler("login_to_simulator", m_userManager.XmlRpcLoginMethod);
- httpServer.AddRestHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod);
-
- httpServer.Start();
- }
-
-
- public void do_create(string what)
- {
- switch (what)
- {
- case "user":
- string tempfirstname;
- string templastname;
- string tempMD5Passwd;
- uint regX = 997;
- uint regY = 996;
-
- tempfirstname = m_console.CmdPrompt("First name");
- templastname = m_console.CmdPrompt("Last name");
- tempMD5Passwd = m_console.PasswdPrompt("Password");
- regX = Convert.ToUInt32(m_console.CmdPrompt("Start Region X"));
- regY = Convert.ToUInt32(m_console.CmdPrompt("Start Region Y"));
-
- tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + "");
-
- m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
- break;
- }
- }
-
- public void RunCmd(string cmd, string[] cmdparams)
- {
- switch (cmd)
- {
- case "help":
- m_console.Notice("create user - create a new user");
- m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)");
- break;
-
- case "create":
- do_create(cmdparams[0]);
- break;
-
- case "shutdown":
- m_console.Close();
- Environment.Exit(0);
- break;
- }
- }
-
- private void ConfigDB(IGenericConfig configData)
- {
- try
- {
- string attri = "";
- attri = configData.GetAttribute("DataBaseProvider");
- if (attri == "")
- {
- StorageDll = "OpenGrid.Framework.Data.DB4o.dll";
- configData.SetAttribute("DataBaseProvider", "OpenGrid.Framework.Data.DB4o.dll");
- }
- else
- {
- StorageDll = attri;
- }
- configData.Commit();
- }
- catch (Exception e)
- {
-
- }
- }
-
- private UserConfig LoadConfigDll(string dllName)
- {
- Assembly pluginAssembly = Assembly.LoadFrom(dllName);
- UserConfig config = null;
-
- foreach (Type pluginType in pluginAssembly.GetTypes())
- {
- if (pluginType.IsPublic)
- {
- if (!pluginType.IsAbstract)
- {
- Type typeInterface = pluginType.GetInterface("IUserConfig", true);
-
- if (typeInterface != null)
- {
- IUserConfig plug = (IUserConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
- config = plug.GetConfigObject();
- break;
- }
-
- typeInterface = null;
- }
- }
- }
- pluginAssembly = null;
- return config;
- }
-
- public void Show(string ShowWhat)
- {
- }
- }
-}
diff --git a/OpenGridServices/OpenGridServices.UserServer/OGS-UserServer.csproj b/OpenGridServices/OpenGridServices.UserServer/OGS-UserServer.csproj
deleted file mode 100644
index f4fa8b6..0000000
--- a/OpenGridServices/OpenGridServices.UserServer/OGS-UserServer.csproj
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
- Debug
- AnyCPU
- 8.0.50727
- 2.0
- {D45B6E48-5668-478D-B9CB-6D46E665FACF}
- Exe
- Properties
- OGS_UserServer
- OGS-UserServer
- OpenGridServices.OpenUser_Main
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
- False
- ..\..\common\bin\libsecondlife.dll
-
-
-
-
-
-
-
- OGS-Console.cs
-
-
- VersionInfo.cs
-
-
-
-
-
-
-
-
- {2E46A825-3168-492F-93BC-637126B5B72B}
- OpenSim.Framework
-
-
- {7667E6E2-F227-41A2-B1B2-315613E1BAFC}
- ServerConsole
-
-
-
-
\ No newline at end of file
diff --git a/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj b/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj
deleted file mode 100644
index b3d318c..0000000
--- a/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj
+++ /dev/null
@@ -1,128 +0,0 @@
-
-
- Local
- 8.0.50727
- 2.0
- {66591469-0000-0000-0000-000000000000}
- Debug
- AnyCPU
-
-
-
- OpenGridServices.UserServer
- JScript
- Grid
- IE50
- false
- Exe
-
- OpenGridServices.UserServer
-
-
-
-
-
- False
- 285212672
- False
-
-
- TRACE;DEBUG
-
- True
- 4096
- False
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
- False
- 285212672
- False
-
-
- TRACE
-
- False
- 4096
- True
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
-
- ..\..\bin\Db4objects.Db4o.dll
- False
-
-
- ..\..\bin\libsecondlife.dll
- False
-
-
- OpenSim.Framework.dll
- False
-
-
- OpenSim.Framework.Console.dll
- False
-
-
- OpenSim.GenericConfig.Xml.dll
- False
-
-
- OpenSim.Servers.dll
- False
-
-
- System.dll
- False
-
-
- System.Data.dll
- False
-
-
- System.Xml.dll
- False
-
-
- XMLRPC.dll
- False
-
-
-
-
- OpenGrid.Framework.Data
- {62CDF671-0000-0000-0000-000000000000}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- False
-
-
-
-
- Code
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build b/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build
deleted file mode 100644
index 68cbef7..0000000
--- a/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenGridServices.UserServer/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGridServices.UserServer/Properties/AssemblyInfo.cs
deleted file mode 100644
index 5d5ce8d..0000000
--- a/OpenGridServices/OpenGridServices.UserServer/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("OGS-UserServer")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("OGS-UserServer")]
-[assembly: AssemblyCopyright("Copyright © 2007")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("e266513a-090b-4d38-80f6-8599eef68c8c")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/OpenGridServices/OpenGridServices.UserServer/UserManager.cs b/OpenGridServices/OpenGridServices.UserServer/UserManager.cs
deleted file mode 100644
index 4fb7984..0000000
--- a/OpenGridServices/OpenGridServices.UserServer/UserManager.cs
+++ /dev/null
@@ -1,660 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using OpenGrid.Framework.Data;
-using libsecondlife;
-using System.Reflection;
-
-using System.Xml;
-using Nwc.XmlRpc;
-using OpenSim.Framework.Sims;
-using OpenSim.Framework.Inventory;
-using OpenSim.Framework.Utilities;
-
-using System.Security.Cryptography;
-
-namespace OpenGridServices.UserServer
-{
- public class UserManager
- {
- public OpenSim.Framework.Interfaces.UserConfig _config;
- Dictionary _plugins = new Dictionary();
-
- ///
- /// Adds a new user server plugin - user servers will be requested in the order they were loaded.
- ///
- /// The filename to the user server plugin DLL
- public void AddPlugin(string FileName)
- {
- OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Userstorage: Attempting to load " + FileName);
- Assembly pluginAssembly = Assembly.LoadFrom(FileName);
-
- OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Userstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
- foreach (Type pluginType in pluginAssembly.GetTypes())
- {
- if (!pluginType.IsAbstract)
- {
- Type typeInterface = pluginType.GetInterface("IUserData", true);
-
- if (typeInterface != null)
- {
- IUserData plug = (IUserData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
- plug.Initialise();
- this._plugins.Add(plug.getName(), plug);
- OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Userstorage: Added IUserData Interface");
- }
-
- typeInterface = null;
- }
- }
-
- pluginAssembly = null;
- }
-
- ///
- ///
- ///
- ///
- public void AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY)
- {
- UserProfileData user = new UserProfileData();
- user.homeLocation = new LLVector3(128, 128, 100);
- user.UUID = LLUUID.Random();
- user.username = firstName;
- user.surname = lastName;
- user.passwordHash = pass;
- user.passwordSalt = "";
- user.created = Util.UnixTimeSinceEpoch();
- user.homeLookAt = new LLVector3(100, 100, 100);
- user.homeRegion = Util.UIntsToLong((regX * 256), (regY * 256));
-
- foreach (KeyValuePair plugin in _plugins)
- {
- try
- {
- plugin.Value.addNewUserProfile(user);
-
- }
- catch (Exception e)
- {
- OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
- }
- }
- }
-
- ///
- /// Loads a user profile from a database by UUID
- ///
- /// The target UUID
- /// A user profile
- public UserProfileData getUserProfile(LLUUID uuid)
- {
- foreach (KeyValuePair plugin in _plugins)
- {
- try
- {
- UserProfileData profile = plugin.Value.getUserByUUID(uuid);
- profile.currentAgent = getUserAgent(profile.UUID);
- return profile;
- }
- catch (Exception e)
- {
- OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
- }
- }
-
- return null;
- }
-
-
- ///
- /// Loads a user profile by name
- ///
- /// The target name
- /// A user profile
- public UserProfileData getUserProfile(string name)
- {
- foreach (KeyValuePair plugin in _plugins)
- {
- try
- {
- UserProfileData profile = plugin.Value.getUserByName(name);
- profile.currentAgent = getUserAgent(profile.UUID);
- return profile;
- }
- catch (Exception e)
- {
- OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
- }
- }
-
- return null;
- }
-
- ///
- /// Loads a user profile by name
- ///
- /// First name
- /// Last name
- /// A user profile
- public UserProfileData getUserProfile(string fname, string lname)
- {
- foreach (KeyValuePair plugin in _plugins)
- {
- try
- {
- UserProfileData profile = plugin.Value.getUserByName(fname,lname);
- try
- {
- profile.currentAgent = getUserAgent(profile.UUID);
- }
- catch (Exception e)
- {
- // Ignore
- }
- return profile;
- }
- catch (Exception e)
- {
- OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
- }
- }
-
- return null;
- }
-
- ///
- /// Loads a user agent by uuid (not called directly)
- ///
- /// The agents UUID
- /// Agent profiles
- public UserAgentData getUserAgent(LLUUID uuid)
- {
- foreach (KeyValuePair plugin in _plugins)
- {
- try
- {
- return plugin.Value.getAgentByUUID(uuid);
- }
- catch (Exception e)
- {
- OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
- }
- }
-
- return null;
- }
-
- ///
- /// Loads a user agent by name (not called directly)
- ///
- /// The agents name
- /// A user agent
- public UserAgentData getUserAgent(string name)
- {
- foreach (KeyValuePair plugin in _plugins)
- {
- try
- {
- return plugin.Value.getAgentByName(name);
- }
- catch (Exception e)
- {
- OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
- }
- }
-
- return null;
- }
-
- ///
- /// Loads a user agent by name (not called directly)
- ///
- /// The agents firstname
- /// The agents lastname
- /// A user agent
- public UserAgentData getUserAgent(string fname, string lname)
- {
- foreach (KeyValuePair plugin in _plugins)
- {
- try
- {
- return plugin.Value.getAgentByName(fname,lname);
- }
- catch (Exception e)
- {
- OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
- }
- }
-
- return null;
- }
-
- ///
- /// Creates a error response caused by invalid XML
- ///
- /// An XMLRPC response
- private static XmlRpcResponse CreateErrorConnectingToGridResponse()
- {
- XmlRpcResponse response = new XmlRpcResponse();
- Hashtable ErrorRespData = new Hashtable();
- ErrorRespData["reason"] = "key";
- ErrorRespData["message"] = "Error connecting to grid. Could not percieve credentials from login XML.";
- ErrorRespData["login"] = "false";
- response.Value = ErrorRespData;
- return response;
- }
-
- ///
- /// Creates an error response caused by bad login credentials
- ///
- /// An XMLRPC response
- private static XmlRpcResponse CreateLoginErrorResponse()
- {
- XmlRpcResponse response = new XmlRpcResponse();
- Hashtable ErrorRespData = new Hashtable();
- ErrorRespData["reason"] = "key";
- ErrorRespData["message"] = "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist.";
- ErrorRespData["login"] = "false";
- response.Value = ErrorRespData;
- return response;
- }
-
- ///
- /// Creates an error response caused by being logged in already
- ///
- /// An XMLRPC Response
- private static XmlRpcResponse CreateAlreadyLoggedInResponse()
- {
- XmlRpcResponse response = new XmlRpcResponse();
- Hashtable PresenceErrorRespData = new Hashtable();
- PresenceErrorRespData["reason"] = "presence";
- PresenceErrorRespData["message"] = "You appear to be already logged in, if this is not the case please wait for your session to timeout, if this takes longer than a few minutes please contact the grid owner";
- PresenceErrorRespData["login"] = "false";
- response.Value = PresenceErrorRespData;
- return response;
- }
-
- ///
- /// Creates an error response caused by target region being down
- ///
- /// An XMLRPC Response
- private static XmlRpcResponse CreateDeadRegionResponse()
- {
- XmlRpcResponse response = new XmlRpcResponse();
- Hashtable PresenceErrorRespData = new Hashtable();
- PresenceErrorRespData["reason"] = "key";
- PresenceErrorRespData["message"] = "The region you are attempting to log into is not responding. Please select another region and try again.";
- PresenceErrorRespData["login"] = "false";
- response.Value = PresenceErrorRespData;
- return response;
- }
-
- ///
- /// Customises the login response and fills in missing values.
- ///
- /// The existing response
- /// The user profile
- public virtual void CustomiseResponse(ref Hashtable response, ref UserProfileData theUser)
- {
- // Load information from the gridserver
- SimProfile SimInfo = new SimProfile();
- SimInfo = SimInfo.LoadFromGrid(theUser.currentAgent.currentHandle, _config.GridServerURL, _config.GridSendKey, _config.GridRecvKey);
-
- // Customise the response
- // Home Location
- response["home"] = "{'region_handle':[r" + (SimInfo.RegionLocX * 256).ToString() + ",r" + (SimInfo.RegionLocY * 256).ToString() + "], " +
- "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " +
- "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}";
-
- // Destination
- response["sim_ip"] = SimInfo.sim_ip;
- response["sim_port"] = (Int32)SimInfo.sim_port;
- response["region_y"] = (Int32)SimInfo.RegionLocY * 256;
- response["region_x"] = (Int32)SimInfo.RegionLocX * 256;
-
- // Notify the target of an incoming user
- Console.WriteLine("Notifying " + SimInfo.regionname + " (" + SimInfo.caps_url + ")");
-
- // Prepare notification
- Hashtable SimParams = new Hashtable();
- SimParams["session_id"] = theUser.currentAgent.sessionID.ToString();
- SimParams["secure_session_id"] = theUser.currentAgent.secureSessionID.ToString();
- SimParams["firstname"] = theUser.username;
- SimParams["lastname"] = theUser.surname;
- SimParams["agent_id"] = theUser.UUID.ToString();
- SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response["circuit_code"]);
- SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString();
- SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString();
- SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString();
- SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString();
- ArrayList SendParams = new ArrayList();
- SendParams.Add(SimParams);
-
- // Update agent with target sim
- theUser.currentAgent.currentRegion = SimInfo.UUID;
- theUser.currentAgent.currentHandle = SimInfo.regionhandle;
-
- // Send
- XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams);
- XmlRpcResponse GridResp = GridReq.Send(SimInfo.caps_url, 3000);
- }
-
- ///
- /// Checks a user against it's password hash
- ///
- /// The users profile
- /// The supplied password
- /// Authenticated?
- public bool AuthenticateUser(ref UserProfileData profile, string password)
- {
- OpenSim.Framework.Console.MainConsole.Instance.Verbose(
- "Authenticating " + profile.username + " " + profile.surname);
-
- password = password.Remove(0, 3); //remove $1$
-
- string s = Util.Md5Hash(password + ":" + profile.passwordSalt);
-
- return profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase);
- }
-
- ///
- /// Creates and initialises a new user agent - make sure to use CommitAgent when done to submit to the DB
- ///
- /// The users profile
- /// The users loginrequest
- public void CreateAgent(ref UserProfileData profile, XmlRpcRequest request)
- {
- Hashtable requestData = (Hashtable)request.Params[0];
-
- UserAgentData agent = new UserAgentData();
-
- // User connection
- agent.agentIP = "";
- agent.agentOnline = true;
- agent.agentPort = 0;
-
- // Generate sessions
- RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider();
- byte[] randDataS = new byte[16];
- byte[] randDataSS = new byte[16];
- rand.GetBytes(randDataS);
- rand.GetBytes(randDataSS);
-
- agent.secureSessionID = new LLUUID(randDataSS, 0);
- agent.sessionID = new LLUUID(randDataS, 0);
-
- // Profile UUID
- agent.UUID = profile.UUID;
-
- // Current position (from Home)
- agent.currentHandle = profile.homeRegion;
- agent.currentPos = profile.homeLocation;
-
- // If user specified additional start, use that
- if (requestData.ContainsKey("start"))
- {
- string startLoc = ((string)requestData["start"]).Trim();
- if (!(startLoc == "last" || startLoc == "home"))
- {
- // Format: uri:Ahern&162&213&34
- try
- {
- string[] parts = startLoc.Remove(0, 4).Split('&');
- string region = parts[0];
-
- ////////////////////////////////////////////////////
- //SimProfile SimInfo = new SimProfile();
- //SimInfo = SimInfo.LoadFromGrid(theUser.currentAgent.currentHandle, _config.GridServerURL, _config.GridSendKey, _config.GridRecvKey);
- }
- catch (Exception e)
- {
-
- }
- }
- }
-
- // What time did the user login?
- agent.loginTime = Util.UnixTimeSinceEpoch();
- agent.logoutTime = 0;
-
- // Current location
- agent.regionID = new LLUUID(); // Fill in later
- agent.currentRegion = new LLUUID(); // Fill in later
-
- profile.currentAgent = agent;
- }
-
- ///
- /// Saves a target agent to the database
- ///
- /// The users profile
- /// Successful?
- public bool CommitAgent(ref UserProfileData profile)
- {
- // Saves the agent to database
- return true;
- }
-
- ///
- /// Main user login function
- ///
- /// The XMLRPC request
- /// The response to send
- public XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
- {
- XmlRpcResponse response = new XmlRpcResponse();
- Hashtable requestData = (Hashtable)request.Params[0];
-
- bool GoodXML = (requestData.Contains("first") && requestData.Contains("last") && requestData.Contains("passwd"));
- bool GoodLogin = false;
- string firstname = "";
- string lastname = "";
- string passwd = "";
-
- UserProfileData TheUser;
-
- if (GoodXML)
- {
- firstname = (string)requestData["first"];
- lastname = (string)requestData["last"];
- passwd = (string)requestData["passwd"];
-
- TheUser = getUserProfile(firstname, lastname);
- if (TheUser == null)
- return CreateLoginErrorResponse();
-
- GoodLogin = AuthenticateUser(ref TheUser, passwd);
- }
- else
- {
- return CreateErrorConnectingToGridResponse();
- }
-
- if (!GoodLogin)
- {
- return CreateLoginErrorResponse();
- }
- else
- {
- // If we already have a session...
- if (TheUser.currentAgent != null && TheUser.currentAgent.agentOnline)
- {
- // Reject the login
- return CreateAlreadyLoggedInResponse();
- }
- // Otherwise...
- // Create a new agent session
- CreateAgent(ref TheUser, request);
-
- try
- {
- Hashtable responseData = new Hashtable();
-
- LLUUID AgentID = TheUser.UUID;
-
- // Global Texture Section
- Hashtable GlobalT = new Hashtable();
- GlobalT["sun_texture_id"] = "cce0f112-878f-4586-a2e2-a8f104bba271";
- GlobalT["cloud_texture_id"] = "fc4b9f0b-d008-45c6-96a4-01dd947ac621";
- GlobalT["moon_texture_id"] = "fc4b9f0b-d008-45c6-96a4-01dd947ac621";
- ArrayList GlobalTextures = new ArrayList();
- GlobalTextures.Add(GlobalT);
-
- // Login Flags Section
- Hashtable LoginFlagsHash = new Hashtable();
- LoginFlagsHash["daylight_savings"] = "N";
- LoginFlagsHash["stipend_since_login"] = "N";
- LoginFlagsHash["gendered"] = "Y"; // Needs to be combined with below...
- LoginFlagsHash["ever_logged_in"] = "Y"; // Should allow male/female av selection
- ArrayList LoginFlags = new ArrayList();
- LoginFlags.Add(LoginFlagsHash);
-
- // UI Customisation Section
- Hashtable uiconfig = new Hashtable();
- uiconfig["allow_first_life"] = "Y";
- ArrayList ui_config = new ArrayList();
- ui_config.Add(uiconfig);
-
- // Classified Categories Section
- Hashtable ClassifiedCategoriesHash = new Hashtable();
- ClassifiedCategoriesHash["category_name"] = "Generic";
- ClassifiedCategoriesHash["category_id"] = (Int32)1;
- ArrayList ClassifiedCategories = new ArrayList();
- ClassifiedCategories.Add(ClassifiedCategoriesHash);
-
- // Inventory Library Section
- ArrayList AgentInventoryArray = new ArrayList();
- Hashtable TempHash;
-
- AgentInventory Library = new AgentInventory();
- Library.CreateRootFolder(AgentID, true);
-
- foreach (InventoryFolder InvFolder in Library.InventoryFolders.Values)
- {
- TempHash = new Hashtable();
- TempHash["name"] = InvFolder.FolderName;
- TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated();
- TempHash["version"] = (Int32)InvFolder.Version;
- TempHash["type_default"] = (Int32)InvFolder.DefaultType;
- TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated();
- AgentInventoryArray.Add(TempHash);
- }
-
- Hashtable InventoryRootHash = new Hashtable();
- InventoryRootHash["folder_id"] = Library.InventoryRoot.FolderID.ToStringHyphenated();
- ArrayList InventoryRoot = new ArrayList();
- InventoryRoot.Add(InventoryRootHash);
-
- Hashtable InitialOutfitHash = new Hashtable();
- InitialOutfitHash["folder_name"] = "Nightclub Female";
- InitialOutfitHash["gender"] = "female";
- ArrayList InitialOutfit = new ArrayList();
- InitialOutfit.Add(InitialOutfitHash);
-
- // Circuit Code
- uint circode = (uint)(Util.RandomClass.Next());
-
- // Generics
- responseData["last_name"] = TheUser.surname;
- responseData["ui-config"] = ui_config;
- responseData["sim_ip"] = "127.0.0.1"; //SimInfo.sim_ip.ToString();
- responseData["login-flags"] = LoginFlags;
- responseData["global-textures"] = GlobalTextures;
- responseData["classified_categories"] = ClassifiedCategories;
- responseData["event_categories"] = new ArrayList();
- responseData["inventory-skeleton"] = AgentInventoryArray;
- responseData["inventory-skel-lib"] = new ArrayList();
- responseData["inventory-root"] = InventoryRoot;
- responseData["event_notifications"] = new ArrayList();
- responseData["gestures"] = new ArrayList();
- responseData["inventory-lib-owner"] = new ArrayList();
- responseData["initial-outfit"] = InitialOutfit;
- responseData["seconds_since_epoch"] = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
- responseData["start_location"] = "last";
- responseData["home"] = "!!null temporary value {home}!!"; // Overwritten
- responseData["message"] = _config.DefaultStartupMsg;
- responseData["first_name"] = TheUser.username;
- responseData["circuit_code"] = (Int32)circode;
- responseData["sim_port"] = 0; //(Int32)SimInfo.sim_port;
- responseData["secure_session_id"] = TheUser.currentAgent.secureSessionID.ToStringHyphenated();
- responseData["look_at"] = "\n[r" + TheUser.homeLookAt.X.ToString() + ",r" + TheUser.homeLookAt.Y.ToString() + ",r" + TheUser.homeLookAt.Z.ToString() + "]\n";
- responseData["agent_id"] = AgentID.ToStringHyphenated();
- responseData["region_y"] = (Int32)0; // Overwritten
- responseData["region_x"] = (Int32)0; // Overwritten
- responseData["seed_capability"] = "";
- responseData["agent_access"] = "M";
- responseData["session_id"] = TheUser.currentAgent.sessionID.ToStringHyphenated();
- responseData["login"] = "true";
-
- try
- {
- this.CustomiseResponse(ref responseData, ref TheUser);
- }
- catch (Exception e)
- {
- Console.WriteLine(e.ToString());
- return CreateDeadRegionResponse();
- }
-
- CommitAgent(ref TheUser);
-
- response.Value = responseData;
- // TheUser.SendDataToSim(SimInfo);
- return response;
-
- }
- catch (Exception E)
- {
- Console.WriteLine(E.ToString());
- }
- //}
- }
- return response;
-
- }
-
- ///
- /// Deletes an active agent session
- ///
- /// The request
- /// The path (eg /bork/narf/test)
- /// Parameters sent
- /// Success "OK" else error
- public string RestDeleteUserSessionMethod(string request, string path, string param)
- {
- // TODO! Important!
-
- return "OK";
- }
-
- }
-}
diff --git a/OpenGridServices/OpenUser.Config/UserConfigDb4o/AssemblyInfo.cs b/OpenGridServices/OpenUser.Config/UserConfigDb4o/AssemblyInfo.cs
deleted file mode 100644
index 25e0211..0000000
--- a/OpenGridServices/OpenUser.Config/UserConfigDb4o/AssemblyInfo.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// Information about this assembly is defined by the following
-// attributes.
-//
-// change them to the information which is associated with the assembly
-// you compile.
-
-[assembly: AssemblyTitle("UserConfig")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("UserConfig")]
-[assembly: AssemblyCopyright("")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// This sets the default COM visibility of types in the assembly to invisible.
-// If you need to expose a type to COM, use [ComVisible(true)] on that type.
-[assembly: ComVisible(false)]
-
-// The assembly version has following format :
-//
-// Major.Minor.Build.Revision
-//
-// You can specify all values by your own or you can build default build and revision
-// numbers with the '*' character (the default):
-
-[assembly: AssemblyVersion("1.0.*")]
diff --git a/OpenGridServices/OpenUser.Config/UserConfigDb4o/DbUserConfig.cs b/OpenGridServices/OpenUser.Config/UserConfigDb4o/DbUserConfig.cs
deleted file mode 100644
index fe0e7aa..0000000
--- a/OpenGridServices/OpenUser.Config/UserConfigDb4o/DbUserConfig.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Collections.Generic;
-using OpenSim.Framework.Console;
-using OpenSim.Framework.Interfaces;
-using Db4objects.Db4o;
-
-namespace OpenUser.Config.UserConfigDb4o
-{
- public class Db4oConfigPlugin: IUserConfig
- {
- public UserConfig GetConfigObject()
- {
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Loading Db40Config dll");
- return ( new DbUserConfig());
- }
- }
-
- public class DbUserConfig : UserConfig
- {
- private IObjectContainer db;
-
- public void LoadDefaults() {
- OpenSim.Framework.Console.MainConsole.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
-
- this.DefaultStartupMsg = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default startup message", "Welcome to OGS");
-
- this.GridServerURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:8001/");
- this.GridSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to grid server","null");
- this.GridRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from grid server","null");
- }
-
- public override void InitConfig() {
- try {
- db = Db4oFactory.OpenFile("openuser.yap");
- IObjectSet result = db.Get(typeof(DbUserConfig));
- if(result.Count==1) {
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Config.cs:InitConfig() - Found a UserConfig object in the local database, loading");
- foreach (DbUserConfig cfg in result) {
- this.GridServerURL=cfg.GridServerURL;
- this.GridSendKey=cfg.GridSendKey;
- this.GridRecvKey=cfg.GridRecvKey;
- this.DefaultStartupMsg=cfg.DefaultStartupMsg;
- }
- } else {
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults");
- LoadDefaults();
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Writing out default settings to local database");
- db.Set(this);
- db.Close();
- }
- } catch(Exception e) {
- OpenSim.Framework.Console.MainConsole.Instance.Warn("Config.cs:InitConfig() - Exception occured");
- OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString());
- }
-
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("User settings loaded:");
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Default startup message: " + this.DefaultStartupMsg);
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Grid server URL: " + this.GridServerURL);
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Key to send to grid: " + this.GridSendKey);
- OpenSim.Framework.Console.MainConsole.Instance.Verbose("Key to expect from grid: " + this.GridRecvKey);
- }
-
-
- public void Shutdown() {
- db.Close();
- }
- }
-
-}
diff --git a/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj b/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj
deleted file mode 100644
index a89a38d..0000000
--- a/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj
+++ /dev/null
@@ -1,107 +0,0 @@
-
-
- Local
- 8.0.50727
- 2.0
- {7E494328-0000-0000-0000-000000000000}
- Debug
- AnyCPU
-
-
-
- OpenUser.Config.UserConfigDb4o
- JScript
- Grid
- IE50
- false
- Library
-
- OpenUser.Config.UserConfigDb4o
-
-
-
-
-
- False
- 285212672
- False
-
-
- TRACE;DEBUG
-
- True
- 4096
- False
- ..\..\..\bin\
- False
- False
- False
- 4
-
-
-
- False
- 285212672
- False
-
-
- TRACE
-
- False
- 4096
- True
- ..\..\..\bin\
- False
- False
- False
- 4
-
-
-
-
- ..\..\..\bin\Db4objects.Db4o.dll
- False
-
-
- ..\..\..\bin\libsecondlife.dll
- False
-
-
- OpenSim.Framework.dll
- False
-
-
- OpenSim.Framework.Console.dll
- False
-
-
- System.dll
- False
-
-
- ..\..\..\bin\System.Data.dll
- False
-
-
- System.Xml.dll
- False
-
-
-
-
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build b/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build
deleted file mode 100644
index bd5d49f..0000000
--- a/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/OpenGridServices/ServiceManager/ServiceManager.cs b/OpenGridServices/ServiceManager/ServiceManager.cs
deleted file mode 100644
index 8cb9c80..0000000
--- a/OpenGridServices/ServiceManager/ServiceManager.cs
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
-* Copyright (c) Contributors, http://www.openmetaverse.org/
-* See CONTRIBUTORS.TXT for a full list of copyright holders.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of the OpenSim Project nor the
-* names of its contributors may be used to endorse or promote products
-* derived from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
-* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-using System;
-using System.Diagnostics;
-using System.Threading;
-using System.ServiceProcess;
-using System.Xml;
-using System.IO;
-using libsecondlife;
-using OpenSim.GenericConfig;
-
-public class OpenGridMasterService : System.ServiceProcess.ServiceBase {
-
- private Thread ServiceWorkerThread;
- private static string GridURL; // URL of grid server
- private static string GridSimKey; // key sent from Grid>Sim
- private static string SimGridKey; // key sent Sim>Grid
- private static string AssetURL; // URL of asset server
- private static string UserSendKey; // key sent from user>sim
- private static string UserRecvKey; // key sent from sim>user
-
- public OpenGridMasterService()
- {
- CanPauseAndContinue = false;
- ServiceName = "OpenGridServices-master";
- }
-
- private void InitializeComponent()
- {
- this.CanPauseAndContinue = false;
- this.CanShutdown = true;
- this.ServiceName = "OpenGridServices-master";
- }
-
- protected override void OnStart(string[] args)
- {
- ServiceWorkerThread = new Thread(new ThreadStart(MainServiceThread));
- ServiceWorkerThread.Start();
- }
-
- protected override void OnStop()
- {
- ServiceWorkerThread.Abort();
- }
-
- private void MainServiceThread()
- {
- try {
- StreamReader reader=new StreamReader("opengrid-master-cfg.xml");
-
- string configxml = reader.ReadToEnd();
- XmlDocument doc = new XmlDocument();
- doc.LoadXml(configxml);
- XmlNode rootnode = doc.FirstChild;
- if (rootnode.Name != "regions")
- {
- EventLog.WriteEntry("ERROR! bad XML in opengrid-master-cfg.xml - expected regions tag");
- Console.WriteLine("Sorry, could not startup the service - please check your opengrid-master-cfg.xml file: missing regions tag");
- (new ServiceController("OpenGridServices-master")).Stop();
- }
-
- for(int i=0; i<=rootnode.ChildNodes.Count; i++)
- {
- if(rootnode.ChildNodes.Item(i).Name != "region") {
- EventLog.WriteEntry("nonfatal error - unexpected tag inside regions block of opengrid-master-cfg.xml");
- (new ServiceController("OpenGridServices-master")).Stop();
- }
- }
- } catch(Exception e) {
- Console.WriteLine(e.ToString());
- (new ServiceController("OpenGridServices-master")).Stop();
- }
-
- }
-
- private static string SetupGrid()
- {
- Console.WriteLine("Running external program (OpenGridServices.GridServer.exe) to configure the grid server");
- try {
- Process p = new Process();
-
- p.StartInfo.Arguments = "-setuponly";
- p.StartInfo.FileName = "OpenGridServices.GridServer.exe";
- p.Start();
-
- p.StartInfo.Arguments = "-dumpxmlconf";
- p.Start();
-
- XmlConfig GridConf = new XmlConfig("opengrid-cfg.xml");
- GridConf.LoadData();
- GridURL="http://" + GridConf.GetAttribute("ListenAddr") + ":" + GridConf.GetAttribute("ListenPort") + "/";
-
- StreamReader reader=new StreamReader("opengrid-cfg.xml");
- string configxml = reader.ReadToEnd();
-
- return configxml;
- } catch(Exception e) {
- Console.WriteLine("An error occurred while running the grid server, please rectify it and try again");
- Console.WriteLine(e.ToString());
- Environment.Exit(1);
- }
- return "";
- }
-
- private static string SetupUser()
- {
- return "";
- }
-
- private static string SetupAsset()
- {
- return "";
- }
-
- private static string SetupRegion()
- {
- string regionname;
- ulong regionlocx;
- ulong regionlocy;
- string default_terrain;
- uint terrain_multiplier;
- uint baseport;
-
- string listenaddr;
- string simconfigxml;
- LLUUID SimUUID;
-
- Console.WriteLine("Setting up region servers");
- Console.Write("Please specify a path to store your region data (e.g /etc/opensim/regions: ");
- string regionpath=Console.ReadLine();
-
- Console.Write("How many regions would you like to configure now? ");
- int numofregions=Convert.ToInt16(Console.ReadLine());
-
- Console.Write("What port should the region servers start listening at (first region is normally 9000, then 9001 the second etc, both TCP+UDP): ");
- baseport=Convert.ToUInt16(Console.ReadLine());
-
-
- listenaddr=Console.ReadLine();
-
- Console.WriteLine("Now ready to configure regions, please answer the questions about each region in turn");
- for(int i=0; i<=numofregions; i++) {
- Console.WriteLine("Configuring region number " + i.ToString());
-
- Console.Write("Region name: ");
- regionname=Console.ReadLine();
-
- Console.Write("Region location X: ");
- regionlocx=(ulong)Convert.ToUInt32(Console.ReadLine());
-
- Console.Write("Region location Y: ");
- regionlocy=(ulong)Convert.ToUInt32(Console.ReadLine());
-
- Console.Write("Default terrain file: ");
- default_terrain=Console.ReadLine();
- terrain_multiplier=Convert.ToUInt16(Console.ReadLine());
-
- SimUUID=LLUUID.Random();
-
- simconfigxml="";
-
- }
-
- return "";
- }
-
- public static void InitSetup()
- {
- string choice="";
-
- string GridInfo;
- string UserInfo;
- string AssetInfo;
- string RegionInfo;
-
- bool grid=false;
- bool user=false;
- bool asset=false;
- bool region=false;
- while(choice!="OK")
- {
- Console.Clear();
- Console.WriteLine("Please select the components you would like to run on this server:\n");
-
- Console.WriteLine("1 - [" + (grid ? "X" : " ") + "] Grid server - this service handles co-ordinates of regions/sims on the grid");
- Console.WriteLine("2 - [" + (user ? "X" : " ") + "] User server - this service handles user login, profiles, inventory and IM");
- Console.WriteLine("3 - [" + (asset ? "X" : " ") + "] Asset server - this service handles storage of assets such as textures, objects, sounds, scripts");
- Console.WriteLine("4 - [" + (region ? "X" : " ") + "] Region server - this is the main opensim server and can run without the above services, it handles physics simulation, terrain, building and other such features");
-
-
- Console.Write("Type a number to toggle a choice or type OK to accept your current choices: ");
- choice = Console.ReadLine();
- switch(choice)
- {
- case "1":
- grid = (!grid);
- break;
-
- case "2":
- user = (!user);
- break;
-
- case "3":
- asset = (!asset);
- break;
-
- case "4":
- region = (!region);
- break;
- }
- }
-
- if(grid) GridInfo = SetupGrid();
- if(user) UserInfo = SetupUser();
- if(asset) AssetInfo = SetupAsset();
- if(region) RegionInfo = SetupRegion();
- }
-
- public static void Main()
- {
- if(!File.Exists("opengrid-master-cfg.xml"))
- {
- Console.WriteLine("Could not find a config file, running initial setup");
- InitSetup();
- }
- Console.WriteLine("Starting up OGS master service");
- try {
- ServiceBase.Run(new OpenGridMasterService());
- } catch(Exception e) {
- Console.WriteLine("An error occured while initialising OGS master service.");
- Console.WriteLine(e.ToString());
- }
- }
-}
diff --git a/OpenGridServices/ServiceManager/ServiceManager.csproj b/OpenGridServices/ServiceManager/ServiceManager.csproj
deleted file mode 100644
index e07e5be..0000000
--- a/OpenGridServices/ServiceManager/ServiceManager.csproj
+++ /dev/null
@@ -1,107 +0,0 @@
-
-
- Local
- 8.0.50727
- 2.0
- {E141F4EE-0000-0000-0000-000000000000}
- Debug
- AnyCPU
-
-
-
-
- ServiceManager
- JScript
- Grid
- IE50
- false
- Exe
-
-
- ServiceManager
-
-
-
-
-
-
- False
- 285212672
- False
-
-
- TRACE;DEBUG
-
-
- True
- 4096
- False
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
-
- False
- 285212672
- False
-
-
- TRACE
-
-
- False
- 4096
- True
- ..\..\bin\
- False
- False
- False
- 4
-
-
-
-
-
- ..\..\bin\libsecondlife.dll
- False
-
-
- ..\..\bin\OpenSim.Framework.dll
- False
-
-
- OpenSim.GenericConfig.Xml.dll
- False
-
-
- System.dll
- False
-
-
- System.ServiceProcess.dll
- False
-
-
- System.Xml.dll
- False
-
-
-
-
-
-
- Component
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/OpenGridServices/ServiceManager/ServiceManager.exe.build b/OpenGridServices/ServiceManager/ServiceManager.exe.build
deleted file mode 100644
index e0502c6..0000000
--- a/OpenGridServices/ServiceManager/ServiceManager.exe.build
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
--
cgit v1.1