From 75f9b25b41b5a80025e17808b5b2d9fe7295d54e Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Tue, 5 Jun 2007 13:18:44 +0000 Subject: * Fixed OGS build * Converted to new console interfaces * Fixed other minor issues which somehow snuck in --- .../InventoryManager.cs | 97 ---------------------- OpenGridServices.InventoryServer/Main.cs | 61 -------------- .../OpenGridServices.InventoryServer.csproj | 78 ----------------- .../Properties/AssemblyInfo.cs | 33 -------- 4 files changed, 269 deletions(-) delete mode 100644 OpenGridServices.InventoryServer/InventoryManager.cs delete mode 100644 OpenGridServices.InventoryServer/Main.cs delete mode 100644 OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj delete mode 100644 OpenGridServices.InventoryServer/Properties/AssemblyInfo.cs (limited to 'OpenGridServices.InventoryServer') diff --git a/OpenGridServices.InventoryServer/InventoryManager.cs b/OpenGridServices.InventoryServer/InventoryManager.cs deleted file mode 100644 index 01fd825..0000000 --- a/OpenGridServices.InventoryServer/InventoryManager.cs +++ /dev/null @@ -1,97 +0,0 @@ -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.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "Invenstorage: Attempting to load " + FileName); - Assembly pluginAssembly = Assembly.LoadFrom(FileName); - - OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "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.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "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.WriteLine("Unable to get root folders via " + kvp.Key + " (" + e.ToString() + ")"); - } - } - } - - 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.InventoryServer/Main.cs b/OpenGridServices.InventoryServer/Main.cs deleted file mode 100644 index 727b28d..0000000 --- a/OpenGridServices.InventoryServer/Main.cs +++ /dev/null @@ -1,61 +0,0 @@ - -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.WriteLine("Initialising inventory manager..."); - m_inventoryManager = new InventoryManager(); - - MainConsole.Instance.WriteLine("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.InventoryServer/OpenGridServices.InventoryServer.csproj b/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj deleted file mode 100644 index 4cfab2f..0000000 --- a/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj +++ /dev/null @@ -1,78 +0,0 @@ - - - Debug - AnyCPU - 8.0.50727 - 2.0 - {596B9D58-F27D-430B-99D2-4C1B95F74A76} - Exe - Properties - OpenGridServices.InventoryServer - OpenGridServices.InventoryServer - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\bin\libsecondlife.dll - - - False - ..\bin\OpenSim.Framework.dll - - - False - ..\bin\OpenSim.Framework.Console.dll - - - False - ..\bin\OpenSim.Servers.dll - - - - - - False - ..\bin\XMLRPC.dll - - - - - - - - - - {62CDF671-0000-0000-0000-000000000000} - OpenGrid.Framework.Data - - - {7924FD35-0000-0000-0000-000000000000} - OpenGrid.Framework.Manager - - - - - \ No newline at end of file diff --git a/OpenGridServices.InventoryServer/Properties/AssemblyInfo.cs b/OpenGridServices.InventoryServer/Properties/AssemblyInfo.cs deleted file mode 100644 index ba8dc8b..0000000 --- a/OpenGridServices.InventoryServer/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("OpenGridServices.InventoryServer")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenGridServices.InventoryServer")] -[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("d410d983-9489-46db-ac77-a7470291c01d")] - -// 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")] -- cgit v1.1