* Weird didnt commit inventory before

zircon^2
Adam Frisby 2007-06-05 20:22:10 +00:00
parent 75f9b25b41
commit 65268a51ca
28 changed files with 312 additions and 25 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -0,0 +1,98 @@
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<string, IInventoryData> _plugins = new Dictionary<string, IInventoryData>();
/// <summary>
/// Adds a new inventory server plugin - user servers will be requested in the order they were loaded.
/// </summary>
/// <param name="FileName">The filename to the inventory server plugin DLL</param>
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<InventoryFolderBase> getRootFolders(LLUUID user)
{
foreach (KeyValuePair<string, IInventoryData> 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;
}
}
}

View File

@ -0,0 +1,61 @@
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)
{
}
}
}

View File

@ -0,0 +1,128 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{338FA00B-0000-0000-0000-000000000000}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon></ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>OpenGridServices.InventoryServer</AssemblyName>
<DefaultClientScript>JScript</DefaultClientScript>
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Exe</OutputType>
<AppDesignerFolder></AppDesignerFolder>
<RootNamespace>OpenGridServices.InventoryServer</RootNamespace>
<StartupObject></StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DocumentationFile></DocumentationFile>
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
<OutputPath>..\..\bin\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn></NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile></DocumentationFile>
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
<OutputPath>..\..\bin\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn></NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" >
<HintPath>System.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Data" >
<HintPath>System.Data.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Xml" >
<HintPath>System.Xml.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="OpenSim.Framework" >
<HintPath>OpenSim.Framework.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="OpenSim.Framework.Console" >
<HintPath>OpenSim.Framework.Console.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="OpenSim.GridInterfaces.Local" >
<HintPath>OpenSim.GridInterfaces.Local.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="OpenSim.Servers" >
<HintPath>OpenSim.Servers.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="libsecondlife.dll" >
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Db4objects.Db4o.dll" >
<HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="XMLRPC" >
<HintPath>XMLRPC.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj">
<Name>OpenGrid.Framework.Data</Name>
<Project>{62CDF671-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="InventoryManager.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Main.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) OpenSim project, http://sim.opensecondlife.org/ * Copyright (c) OpenSim project, http://www.openmetaverse.org/
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:

View File

@ -225,7 +225,7 @@ public class OpenGridMasterService : System.ServiceProcess.ServiceBase {
try { try {
ServiceBase.Run(new OpenGridMasterService()); ServiceBase.Run(new OpenGridMasterService());
} catch(Exception e) { } catch(Exception e) {
Console.WriteLine("THIS SHOULD NEVER HAPPEN!!!!!!!!!!!!!!!!!!!!!"); Console.WriteLine("An error occured while initialising OGS master service.");
Console.WriteLine(e.ToString()); Console.WriteLine(e.ToString());
} }
} }