Re-imported OpenGridServices from trunk
parent
a8cabbd600
commit
591e170428
|
@ -0,0 +1,58 @@
|
||||||
|
/*
|
||||||
|
* 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.*")]
|
|
@ -0,0 +1,161 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A grid configuration interface for returning the DB4o Config Provider
|
||||||
|
/// </summary>
|
||||||
|
public class Db40ConfigPlugin: IGridConfig
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Loads and returns a configuration objeect
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A grid configuration object</returns>
|
||||||
|
public GridConfig GetConfigObject()
|
||||||
|
{
|
||||||
|
OpenSim.Framework.Console.MainConsole.Instance.Verbose("Loading Db40Config dll");
|
||||||
|
return ( new DbGridConfig());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A DB4o based Gridserver configuration object
|
||||||
|
/// </summary>
|
||||||
|
public class DbGridConfig : GridConfig
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The DB4o Database
|
||||||
|
/// </summary>
|
||||||
|
private IObjectContainer db;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// User configuration for the Grid Config interfaces
|
||||||
|
/// </summary>
|
||||||
|
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");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initialises a new configuration object
|
||||||
|
/// </summary>
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Closes down the database and releases filesystem locks
|
||||||
|
/// </summary>
|
||||||
|
public void Shutdown() {
|
||||||
|
db.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,107 @@
|
||||||
|
<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>{B0027747-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Config.GridConfigDb4o</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Config.GridConfigDb4o</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.dll" >
|
||||||
|
<HintPath>..\..\..\bin\System.Data.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Xml" >
|
||||||
|
<HintPath>System.Xml.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="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>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="AssemblyInfo.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DbGridConfig.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<PreBuildEvent>
|
||||||
|
</PreBuildEvent>
|
||||||
|
<PostBuildEvent>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
|
||||||
|
<LastOpenVersion>8.0.50727</LastOpenVersion>
|
||||||
|
<ProjectView>ProjectFiles</ProjectView>
|
||||||
|
<ProjectTrust>0</ProjectTrust>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
|
||||||
|
<PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
|
||||||
|
</Project>
|
|
@ -0,0 +1,46 @@
|
||||||
|
<?xml version="1.0" ?>
|
||||||
|
<project name="OpenGrid.Config.GridConfigDb4o" default="build">
|
||||||
|
<target name="build">
|
||||||
|
<echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<copy todir="${project::get-base-directory()}/${build.dir}">
|
||||||
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
|
<resources prefix="OpenGrid.Config.GridConfigDb4o" dynamicprefix="true" >
|
||||||
|
</resources>
|
||||||
|
<sources failonempty="true">
|
||||||
|
<include name="AssemblyInfo.cs" />
|
||||||
|
<include name="DbGridConfig.cs" />
|
||||||
|
</sources>
|
||||||
|
<references basedir="${project::get-base-directory()}">
|
||||||
|
<lib>
|
||||||
|
<include name="${project::get-base-directory()}" />
|
||||||
|
<include name="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
</lib>
|
||||||
|
<include name="System.dll" />
|
||||||
|
<include name="System.Data.dll.dll" />
|
||||||
|
<include name="System.Xml.dll" />
|
||||||
|
<include name="../../../bin/libsecondlife.dll" />
|
||||||
|
<include name="../../../bin/Db4objects.Db4o.dll" />
|
||||||
|
<include name="../../../bin/OpenSim.Framework.dll" />
|
||||||
|
<include name="../../../bin/OpenSim.Framework.Console.dll" />
|
||||||
|
</references>
|
||||||
|
</csc>
|
||||||
|
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/../../../bin/"/>
|
||||||
|
<copy todir="${project::get-base-directory()}/../../../bin/">
|
||||||
|
<fileset basedir="${project::get-base-directory()}/${build.dir}/" >
|
||||||
|
<include name="*.dll"/>
|
||||||
|
<include name="*.exe"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
<target name="clean">
|
||||||
|
<delete dir="${bin.dir}" failonerror="false" />
|
||||||
|
<delete dir="${obj.dir}" failonerror="false" />
|
||||||
|
</target>
|
||||||
|
<target name="doc" description="Creates documentation.">
|
||||||
|
</target>
|
||||||
|
</project>
|
|
@ -0,0 +1,161 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A grid server storage mechanism employing the DB4o database system
|
||||||
|
/// </summary>
|
||||||
|
class DB4oGridData : IGridData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The database manager object
|
||||||
|
/// </summary>
|
||||||
|
DB4oGridManager manager;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Called when the plugin is first loaded (as constructors are not called)
|
||||||
|
/// </summary>
|
||||||
|
public void Initialise() {
|
||||||
|
manager = new DB4oGridManager("gridserver.yap");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a list of regions within the specified ranges
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="a">minimum X coordinate</param>
|
||||||
|
/// <param name="b">minimum Y coordinate</param>
|
||||||
|
/// <param name="c">maximum X coordinate</param>
|
||||||
|
/// <param name="d">maximum Y coordinate</param>
|
||||||
|
/// <returns>An array of region profiles</returns>
|
||||||
|
public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a region located at the specified regionHandle (warning multiple regions may occupy the one spot, first found is returned)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="handle">The handle to search for</param>
|
||||||
|
/// <returns>A region profile</returns>
|
||||||
|
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() + ")");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a specific region
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="uuid">The region ID code</param>
|
||||||
|
/// <returns>A region profile</returns>
|
||||||
|
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() + ")");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new specified region to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="profile">The profile to add</param>
|
||||||
|
/// <returns>A dataresponse enum indicating success</returns>
|
||||||
|
public DataResponse AddProfile(SimProfileData profile)
|
||||||
|
{
|
||||||
|
lock (manager.simProfiles)
|
||||||
|
{
|
||||||
|
if (manager.AddRow(profile))
|
||||||
|
{
|
||||||
|
return DataResponse.RESPONSE_OK;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return DataResponse.RESPONSE_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Authenticates a new region using the shared secrets. NOT SECURE.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="uuid">The UUID the region is authenticating with</param>
|
||||||
|
/// <param name="handle">The location the region is logging into (unused in Db4o)</param>
|
||||||
|
/// <param name="key">The shared secret</param>
|
||||||
|
/// <returns>Authenticated?</returns>
|
||||||
|
public bool AuthenticateSim(LLUUID uuid, ulong handle, string key) {
|
||||||
|
if (manager.simProfiles[uuid].regionRecvKey == key)
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Shuts down the database
|
||||||
|
/// </summary>
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
manager = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the providers name
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>The name of the storage system</returns>
|
||||||
|
public string getName()
|
||||||
|
{
|
||||||
|
return "DB4o Grid Provider";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the providers version
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>The version of the storage system</returns>
|
||||||
|
public string getVersion()
|
||||||
|
{
|
||||||
|
return "0.1";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,165 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A Database manager for Db4o
|
||||||
|
/// </summary>
|
||||||
|
class DB4oGridManager
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A list of the current regions connected (in-memory cache)
|
||||||
|
/// </summary>
|
||||||
|
public Dictionary<LLUUID, SimProfileData> simProfiles = new Dictionary<LLUUID, SimProfileData>();
|
||||||
|
/// <summary>
|
||||||
|
/// Database File Name
|
||||||
|
/// </summary>
|
||||||
|
string dbfl;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new grid storage manager
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="db4odb">Filename to the database file</param>
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new profile to the database (Warning: Probably slow.)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="row">The profile to add</param>
|
||||||
|
/// <returns>Successful?</returns>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A manager for the DB4o database (user profiles)
|
||||||
|
/// </summary>
|
||||||
|
class DB4oUserManager
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A list of the user profiles (in memory cache)
|
||||||
|
/// </summary>
|
||||||
|
public Dictionary<LLUUID, UserProfileData> userProfiles = new Dictionary<LLUUID, UserProfileData>();
|
||||||
|
/// <summary>
|
||||||
|
/// Database filename
|
||||||
|
/// </summary>
|
||||||
|
string dbfl;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initialises a new DB manager
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="db4odb">The filename to the database</param>
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new profile to the database (Warning: Probably slow.)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="row">The profile to add</param>
|
||||||
|
/// <returns>Successful?</returns>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,205 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A User storage interface for the DB4o database system
|
||||||
|
/// </summary>
|
||||||
|
public class DB4oUserData : IUserData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The database manager
|
||||||
|
/// </summary>
|
||||||
|
DB4oUserManager manager;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Artificial constructor called upon plugin load
|
||||||
|
/// </summary>
|
||||||
|
public void Initialise()
|
||||||
|
{
|
||||||
|
manager = new DB4oUserManager("userprofiles.yap");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Loads a specified user profile from a UUID
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="uuid">The users UUID</param>
|
||||||
|
/// <returns>A user profile</returns>
|
||||||
|
public UserProfileData getUserByUUID(LLUUID uuid)
|
||||||
|
{
|
||||||
|
if(manager.userProfiles.ContainsKey(uuid))
|
||||||
|
return manager.userProfiles[uuid];
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a user by searching for its name
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name">The users account name</param>
|
||||||
|
/// <returns>A matching users profile</returns>
|
||||||
|
public UserProfileData getUserByName(string name)
|
||||||
|
{
|
||||||
|
return getUserByName(name.Split(' ')[0], name.Split(' ')[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a user by searching for its name
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="fname">The first part of the users account name</param>
|
||||||
|
/// <param name="lname">The second part of the users account name</param>
|
||||||
|
/// <returns>A matching users profile</returns>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a user by UUID direct
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="uuid">The users account ID</param>
|
||||||
|
/// <returns>A matching users profile</returns>
|
||||||
|
public UserAgentData getAgentByUUID(LLUUID uuid)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return getUserByUUID(uuid).currentAgent;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a session by account name
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name">The account name</param>
|
||||||
|
/// <returns>The users session agent</returns>
|
||||||
|
public UserAgentData getAgentByName(string name)
|
||||||
|
{
|
||||||
|
return getAgentByName(name.Split(' ')[0], name.Split(' ')[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a session by account name
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="fname">The first part of the users account name</param>
|
||||||
|
/// <param name="lname">The second part of the users account name</param>
|
||||||
|
/// <returns>A user agent</returns>
|
||||||
|
public UserAgentData getAgentByName(string fname, string lname)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return getUserByName(fname,lname).currentAgent;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new user profile
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="user">The profile to add to the database</param>
|
||||||
|
public void addNewUserProfile(UserProfileData user)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
manager.AddRow(user);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Console.WriteLine(e.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new user agent
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="agent">The agent to add to the database</param>
|
||||||
|
public void addNewUserAgent(UserAgentData agent)
|
||||||
|
{
|
||||||
|
// Do nothing. yet.
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Transfers money between two user accounts
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="from">Starting account</param>
|
||||||
|
/// <param name="to">End account</param>
|
||||||
|
/// <param name="amount">The amount to move</param>
|
||||||
|
/// <returns>Success?</returns>
|
||||||
|
public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Transfers inventory between two accounts
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>Move to inventory server</remarks>
|
||||||
|
/// <param name="from">Senders account</param>
|
||||||
|
/// <param name="to">Recievers account</param>
|
||||||
|
/// <param name="item">Inventory item</param>
|
||||||
|
/// <returns>Success?</returns>
|
||||||
|
public bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the name of the storage provider
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Storage provider name</returns>
|
||||||
|
public string getName()
|
||||||
|
{
|
||||||
|
return "DB4o Userdata";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the version of the storage provider
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Storage provider version</returns>
|
||||||
|
public string getVersion()
|
||||||
|
{
|
||||||
|
return "0.1";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,225 @@
|
||||||
|
<<<<<<< .mine
|
||||||
|
<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>{39BD9497-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data.DB4o</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data.DB4o</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.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.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>
|
||||||
|
</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="DB4oGridData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DB4oManager.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DB4oUserData.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>
|
||||||
|
=======
|
||||||
|
<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>{39BD9497-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data.DB4o</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data.DB4o</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.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.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>
|
||||||
|
</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="DB4oUserData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DB4oManager.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DB4oGridData.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>
|
||||||
|
>>>>>>> .r921
|
|
@ -0,0 +1,111 @@
|
||||||
|
<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>{39BD9497-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data.DB4o</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data.DB4o</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.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.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>
|
||||||
|
</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="DB4oGridData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DB4oManager.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DB4oUserData.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>
|
|
@ -0,0 +1,111 @@
|
||||||
|
<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>{BC0F052F-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data.DB4o</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data.DB4o</RootNamespace>
|
||||||
|
<StartupObject></StartupObject>
|
||||||
|
<FileUpgradeFlags>
|
||||||
|
</FileUpgradeFlags>
|
||||||
|
</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>
|
||||||
|
<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>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" >
|
||||||
|
<HintPath>System.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.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>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="../OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj">
|
||||||
|
<Name>OpenGrid.Framework.Data</Name>
|
||||||
|
<Project>{12DD8EB8-0000-0000-0000-000000000000}</Project>
|
||||||
|
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||||
|
<Private>False</Private>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="DB4oGridData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DB4oManager.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DB4oUserData.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>
|
|
@ -0,0 +1,111 @@
|
||||||
|
<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>{39BD9497-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data.DB4o</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data.DB4o</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.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.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>
|
||||||
|
</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="DB4oUserData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DB4oManager.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="DB4oGridData.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>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
|
||||||
|
<LastOpenVersion>8.0.50727</LastOpenVersion>
|
||||||
|
<ProjectView>ProjectFiles</ProjectView>
|
||||||
|
<ProjectTrust>0</ProjectTrust>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
|
||||||
|
<PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
|
||||||
|
</Project>
|
|
@ -0,0 +1,47 @@
|
||||||
|
<?xml version="1.0" ?>
|
||||||
|
<project name="OpenGrid.Framework.Data.DB4o" default="build">
|
||||||
|
<target name="build">
|
||||||
|
<echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<copy todir="${project::get-base-directory()}/${build.dir}">
|
||||||
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
|
<resources prefix="OpenGrid.Framework.Data.DB4o" dynamicprefix="true" >
|
||||||
|
</resources>
|
||||||
|
<sources failonempty="true">
|
||||||
|
<include name="DB4oUserData.cs" />
|
||||||
|
<include name="DB4oManager.cs" />
|
||||||
|
<include name="DB4oGridData.cs" />
|
||||||
|
<include name="Properties/AssemblyInfo.cs" />
|
||||||
|
</sources>
|
||||||
|
<references basedir="${project::get-base-directory()}">
|
||||||
|
<lib>
|
||||||
|
<include name="${project::get-base-directory()}" />
|
||||||
|
<include name="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
</lib>
|
||||||
|
<include name="System.dll" />
|
||||||
|
<include name="System.Xml.dll" />
|
||||||
|
<include name="System.Data.dll" />
|
||||||
|
<include name="../../bin/OpenGrid.Framework.Data.dll" />
|
||||||
|
<include name="../../bin/libsecondlife.dll" />
|
||||||
|
<include name="../../bin/Db4objects.Db4o.dll" />
|
||||||
|
</references>
|
||||||
|
</csc>
|
||||||
|
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/../../bin/"/>
|
||||||
|
<copy todir="${project::get-base-directory()}/../../bin/">
|
||||||
|
<fileset basedir="${project::get-base-directory()}/${build.dir}/" >
|
||||||
|
<include name="*.dll"/>
|
||||||
|
<include name="*.exe"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
<target name="clean">
|
||||||
|
<delete dir="${bin.dir}" failonerror="false" />
|
||||||
|
<delete dir="${obj.dir}" failonerror="false" />
|
||||||
|
</target>
|
||||||
|
<target name="doc" description="Creates documentation.">
|
||||||
|
</target>
|
||||||
|
</project>
|
|
@ -0,0 +1,35 @@
|
||||||
|
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")]
|
|
@ -0,0 +1,190 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A grid data interface for Microsoft SQL Server
|
||||||
|
/// </summary>
|
||||||
|
public class SqlGridData : IGridData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Database manager
|
||||||
|
/// </summary>
|
||||||
|
private MSSqlManager database;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initialises the Grid Interface
|
||||||
|
/// </summary>
|
||||||
|
public void Initialise()
|
||||||
|
{
|
||||||
|
database = new MSSqlManager("localhost", "db", "user", "password", "false");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Shuts down the grid interface
|
||||||
|
/// </summary>
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
database.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the storage system name
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A string containing the storage system name</returns>
|
||||||
|
public string getName()
|
||||||
|
{
|
||||||
|
return "Sql OpenGridData";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the storage system version
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A string containing the storage system version</returns>
|
||||||
|
public string getVersion()
|
||||||
|
{
|
||||||
|
return "0.1";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a list of regions within the specified ranges
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="a">minimum X coordinate</param>
|
||||||
|
/// <param name="b">minimum Y coordinate</param>
|
||||||
|
/// <param name="c">maximum X coordinate</param>
|
||||||
|
/// <param name="d">maximum Y coordinate</param>
|
||||||
|
/// <returns>An array of region profiles</returns>
|
||||||
|
public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a sim profile from it's location
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="handle">Region location handle</param>
|
||||||
|
/// <returns>Sim profile</returns>
|
||||||
|
public SimProfileData GetProfileByHandle(ulong handle)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a sim profile from it's UUID
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="uuid">The region UUID</param>
|
||||||
|
/// <returns>The sim profile</returns>
|
||||||
|
public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new specified region to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="profile">The profile to add</param>
|
||||||
|
/// <returns>A dataresponse enum indicating success</returns>
|
||||||
|
public DataResponse AddProfile(SimProfileData profile)
|
||||||
|
{
|
||||||
|
if (database.insertRow(profile))
|
||||||
|
{
|
||||||
|
return DataResponse.RESPONSE_OK;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return DataResponse.RESPONSE_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="uuid">The UUID of the challenger</param>
|
||||||
|
/// <param name="handle">The attempted regionHandle of the challenger</param>
|
||||||
|
/// <param name="authkey">The secret</param>
|
||||||
|
/// <returns>Whether the secret and regionhandle match the database entry for UUID</returns>
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>This requires a security audit.</remarks>
|
||||||
|
/// <param name="uuid"></param>
|
||||||
|
/// <param name="handle"></param>
|
||||||
|
/// <param name="authhash"></param>
|
||||||
|
/// <param name="challenge"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,214 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A management class for the MS SQL Storage Engine
|
||||||
|
/// </summary>
|
||||||
|
class MSSqlManager
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The database connection object
|
||||||
|
/// </summary>
|
||||||
|
IDbConnection dbcon;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initialises and creates a new Sql connection and maintains it.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="hostname">The Sql server being connected to</param>
|
||||||
|
/// <param name="database">The name of the Sql database being used</param>
|
||||||
|
/// <param name="username">The username logging into the database</param>
|
||||||
|
/// <param name="password">The password for the user logging in</param>
|
||||||
|
/// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param>
|
||||||
|
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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Shuts down the database connection
|
||||||
|
/// </summary>
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
dbcon.Close();
|
||||||
|
dbcon = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Runs a query with protection against SQL Injection by using parameterised input.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sql">The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y</param>
|
||||||
|
/// <param name="parameters">The parameters - index so that @y is indexed as 'y'</param>
|
||||||
|
/// <returns>A Sql DB Command</returns>
|
||||||
|
public IDbCommand Query(string sql, Dictionary<string, string> parameters)
|
||||||
|
{
|
||||||
|
SqlCommand dbcommand = (SqlCommand)dbcon.CreateCommand();
|
||||||
|
dbcommand.CommandText = sql;
|
||||||
|
foreach (KeyValuePair<string, string> param in parameters)
|
||||||
|
{
|
||||||
|
dbcommand.Parameters.AddWithValue(param.Key, param.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (IDbCommand)dbcommand;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Runs a database reader object and returns a region row
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="reader">An active database reader</param>
|
||||||
|
/// <returns>A region row</returns>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new region in the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="profile">The region profile to insert</param>
|
||||||
|
/// <returns>Successful?</returns>
|
||||||
|
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<string, string> parameters = new Dictionary<string, string>();
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,104 @@
|
||||||
|
<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>{0A563AC1-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data.MSSQL</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data.MSSQL</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.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="libsecondlife.dll" >
|
||||||
|
<HintPath>..\..\bin\libsecondlife.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="MSSQLGridData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MSSQLManager.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>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
|
||||||
|
<LastOpenVersion>8.0.50727</LastOpenVersion>
|
||||||
|
<ProjectView>ProjectFiles</ProjectView>
|
||||||
|
<ProjectTrust>0</ProjectTrust>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
|
||||||
|
<PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
|
||||||
|
</Project>
|
|
@ -0,0 +1,45 @@
|
||||||
|
<?xml version="1.0" ?>
|
||||||
|
<project name="OpenGrid.Framework.Data.MSSQL" default="build">
|
||||||
|
<target name="build">
|
||||||
|
<echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<copy todir="${project::get-base-directory()}/${build.dir}">
|
||||||
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
|
<resources prefix="OpenGrid.Framework.Data.MSSQL" dynamicprefix="true" >
|
||||||
|
</resources>
|
||||||
|
<sources failonempty="true">
|
||||||
|
<include name="MSSQLGridData.cs" />
|
||||||
|
<include name="MSSQLManager.cs" />
|
||||||
|
<include name="Properties/AssemblyInfo.cs" />
|
||||||
|
</sources>
|
||||||
|
<references basedir="${project::get-base-directory()}">
|
||||||
|
<lib>
|
||||||
|
<include name="${project::get-base-directory()}" />
|
||||||
|
<include name="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
</lib>
|
||||||
|
<include name="System.dll" />
|
||||||
|
<include name="System.Xml.dll" />
|
||||||
|
<include name="System.Data.dll" />
|
||||||
|
<include name="../../bin/OpenGrid.Framework.Data.dll" />
|
||||||
|
<include name="../../bin/libsecondlife.dll" />
|
||||||
|
</references>
|
||||||
|
</csc>
|
||||||
|
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/../../bin/"/>
|
||||||
|
<copy todir="${project::get-base-directory()}/../../bin/">
|
||||||
|
<fileset basedir="${project::get-base-directory()}/${build.dir}/" >
|
||||||
|
<include name="*.dll"/>
|
||||||
|
<include name="*.exe"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
<target name="clean">
|
||||||
|
<delete dir="${bin.dir}" failonerror="false" />
|
||||||
|
<delete dir="${obj.dir}" failonerror="false" />
|
||||||
|
</target>
|
||||||
|
<target name="doc" description="Creates documentation.">
|
||||||
|
</target>
|
||||||
|
</project>
|
|
@ -0,0 +1,35 @@
|
||||||
|
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")]
|
|
@ -0,0 +1,258 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A MySQL Interface for the Grid Server
|
||||||
|
/// </summary>
|
||||||
|
public class MySQLGridData : IGridData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// MySQL Database Manager
|
||||||
|
/// </summary>
|
||||||
|
private MySQLManager database;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initialises the Grid Interface
|
||||||
|
/// </summary>
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Shuts down the grid interface
|
||||||
|
/// </summary>
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
database.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the plugin name
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Plugin name</returns>
|
||||||
|
public string getName()
|
||||||
|
{
|
||||||
|
return "MySql OpenGridData";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the plugin version
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Plugin version</returns>
|
||||||
|
public string getVersion()
|
||||||
|
{
|
||||||
|
return "0.1";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns all the specified region profiles within coordates -- coordinates are inclusive
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="xmin">Minimum X coordinate</param>
|
||||||
|
/// <param name="ymin">Minimum Y coordinate</param>
|
||||||
|
/// <param name="xmax">Maximum X coordinate</param>
|
||||||
|
/// <param name="ymax">Maximum Y coordinate</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public SimProfileData[] GetProfilesInRange(uint xmin, uint ymin, uint xmax, uint ymax)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock (database)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
|
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<SimProfileData> rows = new List<SimProfileData>();
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a sim profile from it's location
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="handle">Region location handle</param>
|
||||||
|
/// <returns>Sim profile</returns>
|
||||||
|
public SimProfileData GetProfileByHandle(ulong handle)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock (database)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a sim profile from it's UUID
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="uuid">The region UUID</param>
|
||||||
|
/// <returns>The sim profile</returns>
|
||||||
|
public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock (database)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new profile to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="profile">The profile to add</param>
|
||||||
|
/// <returns>Successful?</returns>
|
||||||
|
public DataResponse AddProfile(SimProfileData profile)
|
||||||
|
{
|
||||||
|
lock (database)
|
||||||
|
{
|
||||||
|
if (database.insertRegion(profile))
|
||||||
|
{
|
||||||
|
return DataResponse.RESPONSE_OK;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return DataResponse.RESPONSE_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="uuid">The UUID of the challenger</param>
|
||||||
|
/// <param name="handle">The attempted regionHandle of the challenger</param>
|
||||||
|
/// <param name="authkey">The secret</param>
|
||||||
|
/// <returns>Whether the secret and regionhandle match the database entry for UUID</returns>
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>This requires a security audit.</remarks>
|
||||||
|
/// <param name="uuid"></param>
|
||||||
|
/// <param name="handle"></param>
|
||||||
|
/// <param name="authhash"></param>
|
||||||
|
/// <param name="challenge"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,309 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A MySQL interface for the inventory server
|
||||||
|
/// </summary>
|
||||||
|
class MySQLInventoryData : IInventoryData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The database manager
|
||||||
|
/// </summary>
|
||||||
|
public MySQLManager database;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Loads and initialises this database plugin
|
||||||
|
/// </summary>
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The name of this DB provider
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Name of DB provider</returns>
|
||||||
|
public string getName()
|
||||||
|
{
|
||||||
|
return "MySQL Inventory Data Interface";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Closes this DB provider
|
||||||
|
/// </summary>
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
// Do nothing.
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the version of this DB provider
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A string containing the DB provider</returns>
|
||||||
|
public string getVersion()
|
||||||
|
{
|
||||||
|
return "0.1";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a list of items in a specified folder
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="folderID">The folder to search</param>
|
||||||
|
/// <returns>A list containing inventory items</returns>
|
||||||
|
public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock (database)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
|
param["?uuid"] = folderID.ToStringHyphenated();
|
||||||
|
|
||||||
|
System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE parentFolderID = ?uuid", param);
|
||||||
|
System.Data.IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
|
List<InventoryItemBase> items = database.readInventoryItems(reader);
|
||||||
|
|
||||||
|
reader.Close();
|
||||||
|
result.Dispose();
|
||||||
|
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
database.Reconnect();
|
||||||
|
Console.WriteLine(e.ToString());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a list of the root folders within a users inventory
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="user">The user whos inventory is to be searched</param>
|
||||||
|
/// <returns>A list of folder objects</returns>
|
||||||
|
public List<InventoryFolderBase> getUserRootFolders(LLUUID user)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock (database)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
|
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<InventoryFolderBase> items = database.readInventoryFolders(reader);
|
||||||
|
|
||||||
|
reader.Close();
|
||||||
|
result.Dispose();
|
||||||
|
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
database.Reconnect();
|
||||||
|
Console.WriteLine(e.ToString());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a list of folders in a users inventory contained within the specified folder
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parentID">The folder to search</param>
|
||||||
|
/// <returns>A list of inventory folders</returns>
|
||||||
|
public List<InventoryFolderBase> getInventoryFolders(LLUUID parentID)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock (database)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
|
param["?uuid"] = parentID.ToStringHyphenated();
|
||||||
|
|
||||||
|
System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = ?uuid", param);
|
||||||
|
System.Data.IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
|
List<InventoryFolderBase> items = database.readInventoryFolders(reader);
|
||||||
|
|
||||||
|
reader.Close();
|
||||||
|
result.Dispose();
|
||||||
|
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
database.Reconnect();
|
||||||
|
Console.WriteLine(e.ToString());
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a specified inventory item
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="item">The item to return</param>
|
||||||
|
/// <returns>An inventory item</returns>
|
||||||
|
public InventoryItemBase getInventoryItem(LLUUID item)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock (database)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
|
param["?uuid"] = item.ToStringHyphenated();
|
||||||
|
|
||||||
|
System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE inventoryID = ?uuid", param);
|
||||||
|
System.Data.IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
|
List<InventoryItemBase> 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a specified inventory folder
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="folder">The folder to return</param>
|
||||||
|
/// <returns>A folder class</returns>
|
||||||
|
public InventoryFolderBase getInventoryFolder(LLUUID folder)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock (database)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
|
param["?uuid"] = folder.ToStringHyphenated();
|
||||||
|
|
||||||
|
System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE folderID = ?uuid", param);
|
||||||
|
System.Data.IDataReader reader = result.ExecuteReader();
|
||||||
|
|
||||||
|
List<InventoryFolderBase> 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a specified item to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="item">The inventory item</param>
|
||||||
|
public void addInventoryItem(InventoryItemBase item)
|
||||||
|
{
|
||||||
|
lock (database)
|
||||||
|
{
|
||||||
|
database.insertItem(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updates the specified inventory item
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="item">Inventory item to update</param>
|
||||||
|
public void updateInventoryItem(InventoryItemBase item)
|
||||||
|
{
|
||||||
|
addInventoryItem(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new inventory folder
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="folder">Folder to create</param>
|
||||||
|
public void addInventoryFolder(InventoryFolderBase folder)
|
||||||
|
{
|
||||||
|
lock (database)
|
||||||
|
{
|
||||||
|
database.insertFolder(folder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updates an inventory folder
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="folder">Folder to update</param>
|
||||||
|
public void updateInventoryFolder(InventoryFolderBase folder)
|
||||||
|
{
|
||||||
|
addInventoryFolder(folder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,107 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An interface to the log database for MySQL
|
||||||
|
/// </summary>
|
||||||
|
class MySQLLogData : ILogData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The database manager
|
||||||
|
/// </summary>
|
||||||
|
public MySQLManager database;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Artificial constructor called when the plugin is loaded
|
||||||
|
/// </summary>
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Saves a log item to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="serverDaemon">The daemon triggering the event</param>
|
||||||
|
/// <param name="target">The target of the action (region / agent UUID, etc)</param>
|
||||||
|
/// <param name="methodCall">The method call where the problem occured</param>
|
||||||
|
/// <param name="arguments">The arguments passed to the method</param>
|
||||||
|
/// <param name="priority">How critical is this?</param>
|
||||||
|
/// <param name="logMessage">The message to log</param>
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the name of this DB provider
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A string containing the DB provider name</returns>
|
||||||
|
public string getName()
|
||||||
|
{
|
||||||
|
return "MySQL Logdata Interface";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Closes the database provider
|
||||||
|
/// </summary>
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
// Do nothing.
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the version of this DB provider
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A string containing the provider version</returns>
|
||||||
|
public string getVersion()
|
||||||
|
{
|
||||||
|
return "0.1";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,581 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A MySQL Database manager
|
||||||
|
/// </summary>
|
||||||
|
class MySQLManager
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The database connection object
|
||||||
|
/// </summary>
|
||||||
|
IDbConnection dbcon;
|
||||||
|
/// <summary>
|
||||||
|
/// Connection string for ADO.net
|
||||||
|
/// </summary>
|
||||||
|
string connectionString;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initialises and creates a new MySQL connection and maintains it.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="hostname">The MySQL server being connected to</param>
|
||||||
|
/// <param name="database">The name of the MySQL database being used</param>
|
||||||
|
/// <param name="username">The username logging into the database</param>
|
||||||
|
/// <param name="password">The password for the user logging in</param>
|
||||||
|
/// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param>
|
||||||
|
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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Shuts down the database connection
|
||||||
|
/// </summary>
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
dbcon.Close();
|
||||||
|
dbcon = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Reconnects to the database
|
||||||
|
/// </summary>
|
||||||
|
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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Runs a query with protection against SQL Injection by using parameterised input.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sql">The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y</param>
|
||||||
|
/// <param name="parameters">The parameters - index so that @y is indexed as 'y'</param>
|
||||||
|
/// <returns>A MySQL DB Command</returns>
|
||||||
|
public IDbCommand Query(string sql, Dictionary<string, string> parameters)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
MySqlCommand dbcommand = (MySqlCommand)dbcon.CreateCommand();
|
||||||
|
dbcommand.CommandText = sql;
|
||||||
|
foreach (KeyValuePair<string, string> 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<string, string> 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Reads a region row from a database reader
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="reader">An active database reader</param>
|
||||||
|
/// <returns>A region profile</returns>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Reads an agent row from a database reader
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="reader">An active database reader</param>
|
||||||
|
/// <returns>A user session agent</returns>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Reads a user profile from an active data reader
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="reader">An active database reader</param>
|
||||||
|
/// <returns>A user profile</returns>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Reads a list of inventory folders returned by a query.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="reader">A MySQL Data Reader</param>
|
||||||
|
/// <returns>A List containing inventory folders</returns>
|
||||||
|
public List<InventoryFolderBase> readInventoryFolders(IDataReader reader)
|
||||||
|
{
|
||||||
|
List<InventoryFolderBase> rows = new List<InventoryFolderBase>();
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Reads a collection of items from an SQL result
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="reader">The SQL Result</param>
|
||||||
|
/// <returns>A List containing Inventory Items</returns>
|
||||||
|
public List<InventoryItemBase> readInventoryItems(IDataReader reader)
|
||||||
|
{
|
||||||
|
List<InventoryItemBase> rows = new List<InventoryItemBase>();
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inserts a new row into the log database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="serverDaemon">The daemon which triggered this event</param>
|
||||||
|
/// <param name="target">Who were we operating on when this occured (region UUID, user UUID, etc)</param>
|
||||||
|
/// <param name="methodCall">The method call where the problem occured</param>
|
||||||
|
/// <param name="arguments">The arguments passed to the method</param>
|
||||||
|
/// <param name="priority">How critical is this?</param>
|
||||||
|
/// <param name="logMessage">Extra message info</param>
|
||||||
|
/// <returns>Saved successfully?</returns>
|
||||||
|
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<string, string> parameters = new Dictionary<string, string>();
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inserts a new item into the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="item">The item</param>
|
||||||
|
/// <returns>Success?</returns>
|
||||||
|
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<string, string> parameters = new Dictionary<string, string>();
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inserts a new folder into the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="folder">The folder</param>
|
||||||
|
/// <returns>Success?</returns>
|
||||||
|
public bool insertFolder(InventoryFolderBase folder)
|
||||||
|
{
|
||||||
|
string sql = "REPLACE INTO inventoryfolders (folderID, agentID, parentFolderID, folderName) VALUES ";
|
||||||
|
sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName)";
|
||||||
|
|
||||||
|
Dictionary<string, string> parameters = new Dictionary<string, string>();
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inserts a new region into the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="profile">The region to insert</param>
|
||||||
|
/// <returns>Success?</returns>
|
||||||
|
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<string, string> parameters = new Dictionary<string, string>();
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,257 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A database interface class to a user profile storage system
|
||||||
|
/// </summary>
|
||||||
|
class MySQLUserData : IUserData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Database manager for MySQL
|
||||||
|
/// </summary>
|
||||||
|
public MySQLManager database;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Loads and initialises the MySQL storage plugin
|
||||||
|
/// </summary>
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Searches the database for a specified user profile
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name">The account name of the user</param>
|
||||||
|
/// <returns>A user profile</returns>
|
||||||
|
public UserProfileData getUserByName(string name)
|
||||||
|
{
|
||||||
|
return getUserByName(name.Split(' ')[0], name.Split(' ')[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Searches the database for a specified user profile by name components
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="user">The first part of the account name</param>
|
||||||
|
/// <param name="last">The second part of the account name</param>
|
||||||
|
/// <returns>A user profile</returns>
|
||||||
|
public UserProfileData getUserByName(string user, string last)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock (database)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Searches the database for a specified user profile by UUID
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="uuid">The account ID</param>
|
||||||
|
/// <returns>The users profile</returns>
|
||||||
|
public UserProfileData getUserByUUID(LLUUID uuid)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock (database)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a user session searching by name
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name">The account name</param>
|
||||||
|
/// <returns>The users session</returns>
|
||||||
|
public UserAgentData getAgentByName(string name)
|
||||||
|
{
|
||||||
|
return getAgentByName(name.Split(' ')[0], name.Split(' ')[1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a user session by account name
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="user">First part of the users account name</param>
|
||||||
|
/// <param name="last">Second part of the users account name</param>
|
||||||
|
/// <returns>The users session</returns>
|
||||||
|
public UserAgentData getAgentByName(string user, string last)
|
||||||
|
{
|
||||||
|
UserProfileData profile = getUserByName(user, last);
|
||||||
|
return getAgentByUUID(profile.UUID);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns an agent session by account UUID
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="uuid">The accounts UUID</param>
|
||||||
|
/// <returns>The users session</returns>
|
||||||
|
public UserAgentData getAgentByUUID(LLUUID uuid)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock (database)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new users profile
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="user">The user profile to create</param>
|
||||||
|
public void addNewUserProfile(UserProfileData user)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new agent
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="agent">The agent to create</param>
|
||||||
|
public void addNewUserAgent(UserAgentData agent)
|
||||||
|
{
|
||||||
|
// Do nothing.
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Performs a money transfer request between two accounts
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="from">The senders account ID</param>
|
||||||
|
/// <param name="to">The recievers account ID</param>
|
||||||
|
/// <param name="amount">The amount to transfer</param>
|
||||||
|
/// <returns>Success?</returns>
|
||||||
|
public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Performs an inventory transfer request between two accounts
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>TODO: Move to inventory server</remarks>
|
||||||
|
/// <param name="from">The senders account ID</param>
|
||||||
|
/// <param name="to">The recievers account ID</param>
|
||||||
|
/// <param name="item">The item to transfer</param>
|
||||||
|
/// <returns>Success?</returns>
|
||||||
|
public bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Database provider name
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Provider name</returns>
|
||||||
|
public string getName()
|
||||||
|
{
|
||||||
|
return "MySQL Userdata Interface";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Database provider version
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>provider version</returns>
|
||||||
|
public string getVersion()
|
||||||
|
{
|
||||||
|
return "0.1";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,237 @@
|
||||||
|
<<<<<<< .mine
|
||||||
|
<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>{0F3C3AC1-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data.MySQL</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data.MySQL</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.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="libsecondlife.dll" >
|
||||||
|
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="MySql.Data.dll" >
|
||||||
|
<HintPath>..\..\bin\MySql.Data.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="MySQLGridData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MySQLInventoryData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MySQLLogData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MySQLManager.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MySQLUserData.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>
|
||||||
|
=======
|
||||||
|
<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>{0F3C3AC1-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data.MySQL</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data.MySQL</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.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="libsecondlife.dll" >
|
||||||
|
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="MySql.Data.dll" >
|
||||||
|
<HintPath>..\..\bin\MySql.Data.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="MySQLInventoryData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MySQLUserData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MySQLManager.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MySQLLogData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MySQLGridData.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>
|
||||||
|
>>>>>>> .r921
|
|
@ -0,0 +1,117 @@
|
||||||
|
<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>{0F3C3AC1-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data.MySQL</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data.MySQL</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.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="libsecondlife.dll" >
|
||||||
|
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="MySql.Data.dll" >
|
||||||
|
<HintPath>..\..\bin\MySql.Data.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="MySQLGridData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MySQLInventoryData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MySQLLogData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MySQLManager.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MySQLUserData.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>
|
|
@ -0,0 +1,114 @@
|
||||||
|
<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>{C669E5AC-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data.MySQL</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data.MySQL</RootNamespace>
|
||||||
|
<StartupObject></StartupObject>
|
||||||
|
<FileUpgradeFlags>
|
||||||
|
</FileUpgradeFlags>
|
||||||
|
</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>
|
||||||
|
<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>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" >
|
||||||
|
<HintPath>System.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="libsecondlife.dll" >
|
||||||
|
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="MySql.Data.dll" >
|
||||||
|
<HintPath>..\..\bin\MySql.Data.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="../OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj">
|
||||||
|
<Name>OpenGrid.Framework.Data</Name>
|
||||||
|
<Project>{12DD8EB8-0000-0000-0000-000000000000}</Project>
|
||||||
|
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||||
|
<Private>False</Private>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="MySQLGridData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MySQLLogData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MySQLManager.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MySQLUserData.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>
|
|
@ -0,0 +1,117 @@
|
||||||
|
<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>{0F3C3AC1-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data.MySQL</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data.MySQL</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.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="libsecondlife.dll" >
|
||||||
|
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="MySql.Data.dll" >
|
||||||
|
<HintPath>..\..\bin\MySql.Data.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="MySQLInventoryData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MySQLUserData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MySQLManager.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MySQLLogData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="MySQLGridData.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>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
|
||||||
|
<LastOpenVersion>8.0.50727</LastOpenVersion>
|
||||||
|
<ProjectView>ProjectFiles</ProjectView>
|
||||||
|
<ProjectTrust>0</ProjectTrust>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
|
||||||
|
<PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
|
||||||
|
</Project>
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?xml version="1.0" ?>
|
||||||
|
<project name="OpenGrid.Framework.Data.MySQL" default="build">
|
||||||
|
<target name="build">
|
||||||
|
<echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<copy todir="${project::get-base-directory()}/${build.dir}">
|
||||||
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
|
<resources prefix="OpenGrid.Framework.Data.MySQL" dynamicprefix="true" >
|
||||||
|
</resources>
|
||||||
|
<sources failonempty="true">
|
||||||
|
<include name="MySQLInventoryData.cs" />
|
||||||
|
<include name="MySQLUserData.cs" />
|
||||||
|
<include name="MySQLManager.cs" />
|
||||||
|
<include name="MySQLLogData.cs" />
|
||||||
|
<include name="MySQLGridData.cs" />
|
||||||
|
<include name="Properties/AssemblyInfo.cs" />
|
||||||
|
</sources>
|
||||||
|
<references basedir="${project::get-base-directory()}">
|
||||||
|
<lib>
|
||||||
|
<include name="${project::get-base-directory()}" />
|
||||||
|
<include name="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
</lib>
|
||||||
|
<include name="System.dll" />
|
||||||
|
<include name="System.Xml.dll" />
|
||||||
|
<include name="System.Data.dll" />
|
||||||
|
<include name="../../bin/OpenGrid.Framework.Data.dll" />
|
||||||
|
<include name="../../bin/libsecondlife.dll" />
|
||||||
|
<include name="../../bin/MySql.Data.dll" />
|
||||||
|
</references>
|
||||||
|
</csc>
|
||||||
|
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/../../bin/"/>
|
||||||
|
<copy todir="${project::get-base-directory()}/../../bin/">
|
||||||
|
<fileset basedir="${project::get-base-directory()}/${build.dir}/" >
|
||||||
|
<include name="*.dll"/>
|
||||||
|
<include name="*.exe"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
<target name="clean">
|
||||||
|
<delete dir="${bin.dir}" failonerror="false" />
|
||||||
|
<delete dir="${obj.dir}" failonerror="false" />
|
||||||
|
</target>
|
||||||
|
<target name="doc" description="Creates documentation.">
|
||||||
|
</target>
|
||||||
|
</project>
|
|
@ -0,0 +1,35 @@
|
||||||
|
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")]
|
|
@ -0,0 +1,219 @@
|
||||||
|
<<<<<<< .mine
|
||||||
|
<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>{1E3F341A-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data.SQLite</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data.SQLite</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.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data.SQLite.dll" >
|
||||||
|
<HintPath>..\..\bin\System.Data.SQLite.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="libsecondlife.dll" >
|
||||||
|
<HintPath>..\..\bin\libsecondlife.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="SQLiteGridData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SQLiteManager.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>
|
||||||
|
=======
|
||||||
|
<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>{1E3F341A-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data.SQLite</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data.SQLite</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.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data.SQLite.dll" >
|
||||||
|
<HintPath>..\..\bin\System.Data.SQLite.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="libsecondlife.dll" >
|
||||||
|
<HintPath>..\..\bin\libsecondlife.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="SQLiteManager.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SQLiteGridData.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>
|
||||||
|
>>>>>>> .r921
|
|
@ -0,0 +1,108 @@
|
||||||
|
<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>{1E3F341A-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data.SQLite</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data.SQLite</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.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data.SQLite.dll" >
|
||||||
|
<HintPath>..\..\bin\System.Data.SQLite.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="libsecondlife.dll" >
|
||||||
|
<HintPath>..\..\bin\libsecondlife.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="SQLiteGridData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SQLiteManager.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>
|
|
@ -0,0 +1,108 @@
|
||||||
|
<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>{0ED96822-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data.SQLite</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data.SQLite</RootNamespace>
|
||||||
|
<StartupObject></StartupObject>
|
||||||
|
<FileUpgradeFlags>
|
||||||
|
</FileUpgradeFlags>
|
||||||
|
</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>
|
||||||
|
<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>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" >
|
||||||
|
<HintPath>System.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data.SQLite.dll" >
|
||||||
|
<HintPath>..\..\bin\System.Data.SQLite.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="libsecondlife.dll" >
|
||||||
|
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="../OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj">
|
||||||
|
<Name>OpenGrid.Framework.Data</Name>
|
||||||
|
<Project>{12DD8EB8-0000-0000-0000-000000000000}</Project>
|
||||||
|
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||||
|
<Private>False</Private>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="SQLiteGridData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SQLiteManager.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>
|
|
@ -0,0 +1,108 @@
|
||||||
|
<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>{1E3F341A-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data.SQLite</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data.SQLite</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.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data.SQLite.dll" >
|
||||||
|
<HintPath>..\..\bin\System.Data.SQLite.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="libsecondlife.dll" >
|
||||||
|
<HintPath>..\..\bin\libsecondlife.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="SQLiteManager.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SQLiteGridData.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>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
|
||||||
|
<LastOpenVersion>8.0.50727</LastOpenVersion>
|
||||||
|
<ProjectView>ProjectFiles</ProjectView>
|
||||||
|
<ProjectTrust>0</ProjectTrust>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
|
||||||
|
<PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
|
||||||
|
</Project>
|
|
@ -0,0 +1,46 @@
|
||||||
|
<?xml version="1.0" ?>
|
||||||
|
<project name="OpenGrid.Framework.Data.SQLite" default="build">
|
||||||
|
<target name="build">
|
||||||
|
<echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<copy todir="${project::get-base-directory()}/${build.dir}">
|
||||||
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
|
<resources prefix="OpenGrid.Framework.Data.SQLite" dynamicprefix="true" >
|
||||||
|
</resources>
|
||||||
|
<sources failonempty="true">
|
||||||
|
<include name="SQLiteManager.cs" />
|
||||||
|
<include name="SQLiteGridData.cs" />
|
||||||
|
<include name="Properties/AssemblyInfo.cs" />
|
||||||
|
</sources>
|
||||||
|
<references basedir="${project::get-base-directory()}">
|
||||||
|
<lib>
|
||||||
|
<include name="${project::get-base-directory()}" />
|
||||||
|
<include name="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
</lib>
|
||||||
|
<include name="System.dll" />
|
||||||
|
<include name="System.Xml.dll" />
|
||||||
|
<include name="System.Data.dll" />
|
||||||
|
<include name="../../bin/System.Data.SQLite.dll" />
|
||||||
|
<include name="../../bin/OpenGrid.Framework.Data.dll" />
|
||||||
|
<include name="../../bin/libsecondlife.dll" />
|
||||||
|
</references>
|
||||||
|
</csc>
|
||||||
|
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/../../bin/"/>
|
||||||
|
<copy todir="${project::get-base-directory()}/../../bin/">
|
||||||
|
<fileset basedir="${project::get-base-directory()}/${build.dir}/" >
|
||||||
|
<include name="*.dll"/>
|
||||||
|
<include name="*.exe"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
<target name="clean">
|
||||||
|
<delete dir="${bin.dir}" failonerror="false" />
|
||||||
|
<delete dir="${obj.dir}" failonerror="false" />
|
||||||
|
</target>
|
||||||
|
<target name="doc" description="Creates documentation.">
|
||||||
|
</target>
|
||||||
|
</project>
|
|
@ -0,0 +1,35 @@
|
||||||
|
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")]
|
|
@ -0,0 +1,190 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A Grid Interface to the SQLite database
|
||||||
|
/// </summary>
|
||||||
|
public class SQLiteGridData : IGridData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A database manager
|
||||||
|
/// </summary>
|
||||||
|
private SQLiteManager database;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initialises the Grid Interface
|
||||||
|
/// </summary>
|
||||||
|
public void Initialise()
|
||||||
|
{
|
||||||
|
database = new SQLiteManager("localhost", "db", "user", "password", "false");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Shuts down the grid interface
|
||||||
|
/// </summary>
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
database.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the name of this grid interface
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A string containing the grid interface</returns>
|
||||||
|
public string getName()
|
||||||
|
{
|
||||||
|
return "SQLite OpenGridData";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the version of this grid interface
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A string containing the version</returns>
|
||||||
|
public string getVersion()
|
||||||
|
{
|
||||||
|
return "0.1";
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a list of regions within the specified ranges
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="a">minimum X coordinate</param>
|
||||||
|
/// <param name="b">minimum Y coordinate</param>
|
||||||
|
/// <param name="c">maximum X coordinate</param>
|
||||||
|
/// <param name="d">maximum Y coordinate</param>
|
||||||
|
/// <returns>An array of region profiles</returns>
|
||||||
|
public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a sim profile from it's location
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="handle">Region location handle</param>
|
||||||
|
/// <returns>Sim profile</returns>
|
||||||
|
public SimProfileData GetProfileByHandle(ulong handle)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a sim profile from it's UUID
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="uuid">The region UUID</param>
|
||||||
|
/// <returns>The sim profile</returns>
|
||||||
|
public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid)
|
||||||
|
{
|
||||||
|
Dictionary<string, string> param = new Dictionary<string, string>();
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new specified region to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="profile">The profile to add</param>
|
||||||
|
/// <returns>A dataresponse enum indicating success</returns>
|
||||||
|
public DataResponse AddProfile(SimProfileData profile)
|
||||||
|
{
|
||||||
|
if (database.insertRow(profile))
|
||||||
|
{
|
||||||
|
return DataResponse.RESPONSE_OK;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return DataResponse.RESPONSE_ERROR;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="uuid">The UUID of the challenger</param>
|
||||||
|
/// <param name="handle">The attempted regionHandle of the challenger</param>
|
||||||
|
/// <param name="authkey">The secret</param>
|
||||||
|
/// <returns>Whether the secret and regionhandle match the database entry for UUID</returns>
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>This requires a security audit.</remarks>
|
||||||
|
/// <param name="uuid"></param>
|
||||||
|
/// <param name="handle"></param>
|
||||||
|
/// <param name="authhash"></param>
|
||||||
|
/// <param name="challenge"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,209 @@
|
||||||
|
/*
|
||||||
|
* 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;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initialises and creates a new SQLite connection and maintains it.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="hostname">The SQLite server being connected to</param>
|
||||||
|
/// <param name="database">The name of the SQLite database being used</param>
|
||||||
|
/// <param name="username">The username logging into the database</param>
|
||||||
|
/// <param name="password">The password for the user logging in</param>
|
||||||
|
/// <param name="cpooling">Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'.</param>
|
||||||
|
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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Shuts down the database connection
|
||||||
|
/// </summary>
|
||||||
|
public void Close()
|
||||||
|
{
|
||||||
|
dbcon.Close();
|
||||||
|
dbcon = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Runs a query with protection against SQL Injection by using parameterised input.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sql">The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y</param>
|
||||||
|
/// <param name="parameters">The parameters - index so that @y is indexed as 'y'</param>
|
||||||
|
/// <returns>A SQLite DB Command</returns>
|
||||||
|
public IDbCommand Query(string sql, Dictionary<string, string> parameters)
|
||||||
|
{
|
||||||
|
SQLiteCommand dbcommand = (SQLiteCommand)dbcon.CreateCommand();
|
||||||
|
dbcommand.CommandText = sql;
|
||||||
|
foreach (KeyValuePair<string, string> param in parameters)
|
||||||
|
{
|
||||||
|
SQLiteParameter paramx = new SQLiteParameter(param.Key,param.Value);
|
||||||
|
dbcommand.Parameters.Add(paramx);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (IDbCommand)dbcommand;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Reads a region row from a database reader
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="reader">An active database reader</param>
|
||||||
|
/// <returns>A region profile</returns>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Inserts a new region into the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="profile">The region to insert</param>
|
||||||
|
/// <returns>Success?</returns>
|
||||||
|
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<string, string> parameters = new Dictionary<string, string>();
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,110 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A standard grid interface
|
||||||
|
/// </summary>
|
||||||
|
public interface IGridData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a sim profile from a regionHandle
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="regionHandle">A 64bit Region Handle</param>
|
||||||
|
/// <returns>A simprofile</returns>
|
||||||
|
SimProfileData GetProfileByHandle(ulong regionHandle);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a sim profile from a UUID
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="UUID">A 128bit UUID</param>
|
||||||
|
/// <returns>A sim profile</returns>
|
||||||
|
SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID UUID);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns all profiles within the specified range
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Xmin">Minimum sim coordinate (X)</param>
|
||||||
|
/// <param name="Ymin">Minimum sim coordinate (Y)</param>
|
||||||
|
/// <param name="Xmax">Maximum sim coordinate (X)</param>
|
||||||
|
/// <param name="Ymin">Maximum sim coordinate (Y)</param>
|
||||||
|
/// <returns>An array containing all the sim profiles in the specified range</returns>
|
||||||
|
SimProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Authenticates a sim by use of it's recv key.
|
||||||
|
/// WARNING: Insecure
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="UUID">The UUID sent by the sim</param>
|
||||||
|
/// <param name="regionHandle">The regionhandle sent by the sim</param>
|
||||||
|
/// <param name="simrecvkey">The recieving key sent by the sim</param>
|
||||||
|
/// <returns>Whether the sim has been authenticated</returns>
|
||||||
|
bool AuthenticateSim(libsecondlife.LLUUID UUID, ulong regionHandle, string simrecvkey);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initialises the interface
|
||||||
|
/// </summary>
|
||||||
|
void Initialise();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Closes the interface
|
||||||
|
/// </summary>
|
||||||
|
void Close();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The plugin being loaded
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A string containing the plugin name</returns>
|
||||||
|
string getName();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The plugins version
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A string containing the plugin version</returns>
|
||||||
|
string getVersion();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new profile to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="profile">The profile to add</param>
|
||||||
|
/// <returns>RESPONSE_OK if successful, error if not.</returns>
|
||||||
|
DataResponse AddProfile(SimProfileData profile);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,94 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The severity of an individual log message
|
||||||
|
/// </summary>
|
||||||
|
public enum LogSeverity : int
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Critical: systems failure
|
||||||
|
/// </summary>
|
||||||
|
CRITICAL = 1,
|
||||||
|
/// <summary>
|
||||||
|
/// Major: warning prior to systems failure
|
||||||
|
/// </summary>
|
||||||
|
MAJOR = 2,
|
||||||
|
/// <summary>
|
||||||
|
/// Medium: an individual non-critical task failed
|
||||||
|
/// </summary>
|
||||||
|
MEDIUM = 3,
|
||||||
|
/// <summary>
|
||||||
|
/// Low: Informational warning
|
||||||
|
/// </summary>
|
||||||
|
LOW = 4,
|
||||||
|
/// <summary>
|
||||||
|
/// Info: Information
|
||||||
|
/// </summary>
|
||||||
|
INFO = 5,
|
||||||
|
/// <summary>
|
||||||
|
/// Verbose: Debug Information
|
||||||
|
/// </summary>
|
||||||
|
VERBOSE = 6
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An interface to a LogData storage system
|
||||||
|
/// </summary>
|
||||||
|
public interface ILogData
|
||||||
|
{
|
||||||
|
void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority,string logMessage);
|
||||||
|
/// <summary>
|
||||||
|
/// Initialises the interface
|
||||||
|
/// </summary>
|
||||||
|
void Initialise();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Closes the interface
|
||||||
|
/// </summary>
|
||||||
|
void Close();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The plugin being loaded
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A string containing the plugin name</returns>
|
||||||
|
string getName();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The plugins version
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A string containing the plugin version</returns>
|
||||||
|
string getVersion();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,100 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Parse settings from ini-like files
|
||||||
|
/// </summary>
|
||||||
|
public class IniFile
|
||||||
|
{
|
||||||
|
static IniFile()
|
||||||
|
{
|
||||||
|
_iniKeyValuePatternRegex = new Regex(
|
||||||
|
@"((\s)*(?<Key>([^\=^\s^\n]+))[\s^\n]*
|
||||||
|
# key part (surrounding whitespace stripped)
|
||||||
|
\=
|
||||||
|
(\s)*(?<Value>([^\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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,187 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Inventory Item - contains all the properties associated with an individual inventory piece.
|
||||||
|
/// </summary>
|
||||||
|
public class InventoryItemBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A UUID containing the ID for the inventory item itself
|
||||||
|
/// </summary>
|
||||||
|
public LLUUID inventoryID;
|
||||||
|
/// <summary>
|
||||||
|
/// The UUID of the associated asset on the asset server
|
||||||
|
/// </summary>
|
||||||
|
public LLUUID assetID;
|
||||||
|
/// <summary>
|
||||||
|
/// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
|
||||||
|
/// </summary>
|
||||||
|
public int type;
|
||||||
|
/// <summary>
|
||||||
|
/// The folder this item is contained in (NULL_KEY = Inventory Root)
|
||||||
|
/// </summary>
|
||||||
|
public LLUUID parentFolderID;
|
||||||
|
/// <summary>
|
||||||
|
/// The owner of this inventory item
|
||||||
|
/// </summary>
|
||||||
|
public LLUUID avatarID;
|
||||||
|
/// <summary>
|
||||||
|
/// The name of the inventory item (must be less than 64 characters)
|
||||||
|
/// </summary>
|
||||||
|
public string inventoryName;
|
||||||
|
/// <summary>
|
||||||
|
/// The description of the inventory item (must be less than 64 characters)
|
||||||
|
/// </summary>
|
||||||
|
public string inventoryDescription;
|
||||||
|
/// <summary>
|
||||||
|
/// A mask containing the permissions for the next owner (cannot be enforced)
|
||||||
|
/// </summary>
|
||||||
|
public uint inventoryNextPermissions;
|
||||||
|
/// <summary>
|
||||||
|
/// A mask containing permissions for the current owner (cannot be enforced)
|
||||||
|
/// </summary>
|
||||||
|
public uint inventoryCurrentPermissions;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A Class for folders which contain users inventory
|
||||||
|
/// </summary>
|
||||||
|
public class InventoryFolderBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The name of the folder (64 characters or less)
|
||||||
|
/// </summary>
|
||||||
|
public string name;
|
||||||
|
/// <summary>
|
||||||
|
/// The agent who's inventory this is contained by
|
||||||
|
/// </summary>
|
||||||
|
public LLUUID agentID;
|
||||||
|
/// <summary>
|
||||||
|
/// The folder this folder is contained in (NULL_KEY for root)
|
||||||
|
/// </summary>
|
||||||
|
public LLUUID parentID;
|
||||||
|
/// <summary>
|
||||||
|
/// The UUID for this folder
|
||||||
|
/// </summary>
|
||||||
|
public LLUUID folderID;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An interface for accessing inventory data from a storage server
|
||||||
|
/// </summary>
|
||||||
|
public interface IInventoryData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initialises the interface
|
||||||
|
/// </summary>
|
||||||
|
void Initialise();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Closes the interface
|
||||||
|
/// </summary>
|
||||||
|
void Close();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The plugin being loaded
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A string containing the plugin name</returns>
|
||||||
|
string getName();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The plugins version
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A string containing the plugin version</returns>
|
||||||
|
string getVersion();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a list of inventory items contained within the specified folder
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="folderID">The UUID of the target folder</param>
|
||||||
|
/// <returns>A List of InventoryItemBase items</returns>
|
||||||
|
List<InventoryItemBase> getInventoryInFolder(LLUUID folderID);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a list of folders in the users inventory root.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="user">The UUID of the user who is having inventory being returned</param>
|
||||||
|
/// <returns>A list of folders</returns>
|
||||||
|
List<InventoryFolderBase> getUserRootFolders(LLUUID user);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a list of inventory folders contained in the folder 'parentID'
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parentID">The folder to get subfolders for</param>
|
||||||
|
/// <returns>A list of inventory folders</returns>
|
||||||
|
List<InventoryFolderBase> getInventoryFolders(LLUUID parentID);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns an inventory item by its UUID
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="item">The UUID of the item to be returned</param>
|
||||||
|
/// <returns>A class containing item information</returns>
|
||||||
|
InventoryItemBase getInventoryItem(LLUUID item);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a specified inventory folder by its UUID
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="folder">The UUID of the folder to be returned</param>
|
||||||
|
/// <returns>A class containing folder information</returns>
|
||||||
|
InventoryFolderBase getInventoryFolder(LLUUID folder);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new inventory item based on item
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="item">The item to be created</param>
|
||||||
|
void addInventoryItem(InventoryItemBase item);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updates an inventory item with item (updates based on ID)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="item">The updated item</param>
|
||||||
|
void updateInventoryItem(InventoryItemBase item);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new folder specified by folder
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="folder">The inventory folder</param>
|
||||||
|
void addInventoryFolder(InventoryFolderBase folder);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Updates a folder based on its ID with folder
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="folder">The inventory folder</param>
|
||||||
|
void updateInventoryFolder(InventoryFolderBase folder);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,229 @@
|
||||||
|
<<<<<<< .mine
|
||||||
|
<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>{62CDF671-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data</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.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="libsecondlife.dll" >
|
||||||
|
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="GridData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ILogData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="IniConfig.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="InventoryData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SimProfileData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UserData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UserProfileData.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>
|
||||||
|
=======
|
||||||
|
<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>{62CDF671-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data</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.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="libsecondlife.dll" >
|
||||||
|
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="GridData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SimProfileData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ILogData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="IniConfig.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="InventoryData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UserData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UserProfileData.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>
|
||||||
|
>>>>>>> .r921
|
|
@ -0,0 +1,113 @@
|
||||||
|
<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>{62CDF671-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data</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.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="libsecondlife.dll" >
|
||||||
|
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="GridData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ILogData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="IniConfig.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="InventoryData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SimProfileData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UserData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UserProfileData.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>
|
|
@ -0,0 +1,110 @@
|
||||||
|
<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>{12DD8EB8-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data</RootNamespace>
|
||||||
|
<StartupObject></StartupObject>
|
||||||
|
<FileUpgradeFlags>
|
||||||
|
</FileUpgradeFlags>
|
||||||
|
</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>
|
||||||
|
<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>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" >
|
||||||
|
<HintPath>System.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="libsecondlife.dll" >
|
||||||
|
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="GridData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ILogData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="IniConfig.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SimProfileData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UserData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UserProfileData.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>
|
|
@ -0,0 +1,113 @@
|
||||||
|
<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>{62CDF671-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Data</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Data</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.Xml" >
|
||||||
|
<HintPath>System.Xml.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="System.Data" >
|
||||||
|
<HintPath>System.Data.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="libsecondlife.dll" >
|
||||||
|
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="GridData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SimProfileData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ILogData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="IniConfig.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="InventoryData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UserData.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="UserProfileData.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>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
|
||||||
|
<LastOpenVersion>8.0.50727</LastOpenVersion>
|
||||||
|
<ProjectView>ProjectFiles</ProjectView>
|
||||||
|
<ProjectTrust>0</ProjectTrust>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
|
||||||
|
<PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
|
||||||
|
</Project>
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?xml version="1.0" ?>
|
||||||
|
<project name="OpenGrid.Framework.Data" default="build">
|
||||||
|
<target name="build">
|
||||||
|
<echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<copy todir="${project::get-base-directory()}/${build.dir}">
|
||||||
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
|
<resources prefix="OpenGrid.Framework.Data" dynamicprefix="true" >
|
||||||
|
</resources>
|
||||||
|
<sources failonempty="true">
|
||||||
|
<include name="GridData.cs" />
|
||||||
|
<include name="SimProfileData.cs" />
|
||||||
|
<include name="ILogData.cs" />
|
||||||
|
<include name="IniConfig.cs" />
|
||||||
|
<include name="InventoryData.cs" />
|
||||||
|
<include name="UserData.cs" />
|
||||||
|
<include name="UserProfileData.cs" />
|
||||||
|
<include name="Properties/AssemblyInfo.cs" />
|
||||||
|
</sources>
|
||||||
|
<references basedir="${project::get-base-directory()}">
|
||||||
|
<lib>
|
||||||
|
<include name="${project::get-base-directory()}" />
|
||||||
|
<include name="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
</lib>
|
||||||
|
<include name="System.dll" />
|
||||||
|
<include name="System.Xml.dll" />
|
||||||
|
<include name="System.Data.dll" />
|
||||||
|
<include name="../../bin/libsecondlife.dll" />
|
||||||
|
</references>
|
||||||
|
</csc>
|
||||||
|
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/../../bin/"/>
|
||||||
|
<copy todir="${project::get-base-directory()}/../../bin/">
|
||||||
|
<fileset basedir="${project::get-base-directory()}/${build.dir}/" >
|
||||||
|
<include name="*.dll"/>
|
||||||
|
<include name="*.exe"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
<target name="clean">
|
||||||
|
<delete dir="${bin.dir}" failonerror="false" />
|
||||||
|
<delete dir="${obj.dir}" failonerror="false" />
|
||||||
|
</target>
|
||||||
|
<target name="doc" description="Creates documentation.">
|
||||||
|
</target>
|
||||||
|
</project>
|
|
@ -0,0 +1,35 @@
|
||||||
|
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")]
|
|
@ -0,0 +1,114 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A class which contains information known to the grid server about a region
|
||||||
|
/// </summary>
|
||||||
|
public class SimProfileData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The name of the region
|
||||||
|
/// </summary>
|
||||||
|
public string regionName = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A 64-bit number combining map position into a (mostly) unique ID
|
||||||
|
/// </summary>
|
||||||
|
public ulong regionHandle;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// OGS/OpenSim Specific ID for a region
|
||||||
|
/// </summary>
|
||||||
|
public libsecondlife.LLUUID UUID;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Coordinates of the region
|
||||||
|
/// </summary>
|
||||||
|
public uint regionLocX;
|
||||||
|
public uint regionLocY;
|
||||||
|
public uint regionLocZ; // Reserved (round-robin, layers, etc)
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Authentication secrets
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>Not very secure, needs improvement.</remarks>
|
||||||
|
public string regionSendKey = "";
|
||||||
|
public string regionRecvKey = "";
|
||||||
|
public string regionSecret = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Whether the region is online
|
||||||
|
/// </summary>
|
||||||
|
public bool regionOnline;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Information about the server that the region is currently hosted on
|
||||||
|
/// </summary>
|
||||||
|
public string serverIP = "";
|
||||||
|
public uint serverPort;
|
||||||
|
public string serverURI = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Set of optional overrides. Can be used to create non-eulicidean spaces.
|
||||||
|
/// </summary>
|
||||||
|
public ulong regionNorthOverrideHandle;
|
||||||
|
public ulong regionSouthOverrideHandle;
|
||||||
|
public ulong regionEastOverrideHandle;
|
||||||
|
public ulong regionWestOverrideHandle;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Optional: URI Location of the region database
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>Used for floating sim pools where the region data is not nessecarily coupled to a specific server</remarks>
|
||||||
|
public string regionDataURI = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Region Asset Details
|
||||||
|
/// </summary>
|
||||||
|
public string regionAssetURI = "";
|
||||||
|
public string regionAssetSendKey = "";
|
||||||
|
public string regionAssetRecvKey = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Region Userserver Details
|
||||||
|
/// </summary>
|
||||||
|
public string regionUserURI = "";
|
||||||
|
public string regionUserSendKey = "";
|
||||||
|
public string regionUserRecvKey = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Region Map Texture Asset
|
||||||
|
/// </summary>
|
||||||
|
public libsecondlife.LLUUID regionMapTextureID = new libsecondlife.LLUUID("00000000-0000-0000-9999-000000000006");
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,131 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An interface for connecting to user storage servers.
|
||||||
|
/// </summary>
|
||||||
|
public interface IUserData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a user profile from a database via their UUID
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="user">The accounts UUID</param>
|
||||||
|
/// <returns>The user data profile</returns>
|
||||||
|
UserProfileData getUserByUUID(LLUUID user);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a users profile by searching their username
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name">The users username</param>
|
||||||
|
/// <returns>The user data profile</returns>
|
||||||
|
UserProfileData getUserByName(string name);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a users profile by searching their username parts
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="fname">Account firstname</param>
|
||||||
|
/// <param name="lname">Account lastname</param>
|
||||||
|
/// <returns>The user data profile</returns>
|
||||||
|
UserProfileData getUserByName(string fname, string lname);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the current agent for a user searching by it's UUID
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="user">The users UUID</param>
|
||||||
|
/// <returns>The current agent session</returns>
|
||||||
|
UserAgentData getAgentByUUID(LLUUID user);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the current session agent for a user searching by username
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name">The users account name</param>
|
||||||
|
/// <returns>The current agent session</returns>
|
||||||
|
UserAgentData getAgentByName(string name);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the current session agent for a user searching by username parts
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="fname">The users first account name</param>
|
||||||
|
/// <param name="lname">The users account surname</param>
|
||||||
|
/// <returns>The current agent session</returns>
|
||||||
|
UserAgentData getAgentByName(string fname, string lname);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new User profile to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="user">UserProfile to add</param>
|
||||||
|
void addNewUserProfile(UserProfileData user);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new agent to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="agent">The agent to add</param>
|
||||||
|
void addNewUserAgent(UserAgentData agent);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="from">The account to transfer from</param>
|
||||||
|
/// <param name="to">The account to transfer to</param>
|
||||||
|
/// <param name="amount">The amount to transfer</param>
|
||||||
|
/// <returns>Successful?</returns>
|
||||||
|
bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="from">User to transfer from</param>
|
||||||
|
/// <param name="to">User to transfer to</param>
|
||||||
|
/// <param name="inventory">Specified inventory item</param>
|
||||||
|
/// <returns>Successful?</returns>
|
||||||
|
bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the plugin version
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns>
|
||||||
|
string getVersion();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns the plugin name
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Plugin name, eg MySQL User Provider</returns>
|
||||||
|
string getName();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initialises the plugin (artificial constructor)
|
||||||
|
/// </summary>
|
||||||
|
void Initialise();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,182 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Information about a particular user known to the userserver
|
||||||
|
/// </summary>
|
||||||
|
public class UserProfileData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The ID value for this user
|
||||||
|
/// </summary>
|
||||||
|
public LLUUID UUID;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The first component of a users account name
|
||||||
|
/// </summary>
|
||||||
|
public string username;
|
||||||
|
/// <summary>
|
||||||
|
/// The second component of a users account name
|
||||||
|
/// </summary>
|
||||||
|
public string surname;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt)
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks>
|
||||||
|
public string passwordHash;
|
||||||
|
/// <summary>
|
||||||
|
/// The salt used for the users hash, should be 32 bytes or longer
|
||||||
|
/// </summary>
|
||||||
|
public string passwordSalt;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 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
|
||||||
|
/// </summary>
|
||||||
|
public ulong homeRegion;
|
||||||
|
/// <summary>
|
||||||
|
/// The coordinates inside the region of the home location
|
||||||
|
/// </summary>
|
||||||
|
public LLVector3 homeLocation;
|
||||||
|
/// <summary>
|
||||||
|
/// Where the user will be looking when they rez.
|
||||||
|
/// </summary>
|
||||||
|
public LLVector3 homeLookAt;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A UNIX Timestamp (seconds since epoch) for the users creation
|
||||||
|
/// </summary>
|
||||||
|
public int created;
|
||||||
|
/// <summary>
|
||||||
|
/// A UNIX Timestamp for the users last login date / time
|
||||||
|
/// </summary>
|
||||||
|
public int lastLogin;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A URI to the users inventory server, used for foreigners and large grids
|
||||||
|
/// </summary>
|
||||||
|
public string userInventoryURI;
|
||||||
|
/// <summary>
|
||||||
|
/// A URI to the users asset server, used for foreigners and large grids.
|
||||||
|
/// </summary>
|
||||||
|
public string userAssetURI;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A uint mask containing the "I can do" fields of the users profile
|
||||||
|
/// </summary>
|
||||||
|
public uint profileCanDoMask;
|
||||||
|
/// <summary>
|
||||||
|
/// A uint mask containing the "I want to do" part of the users profile
|
||||||
|
/// </summary>
|
||||||
|
public uint profileWantDoMask; // Profile window "I want to" mask
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The about text listed in a users profile.
|
||||||
|
/// </summary>
|
||||||
|
public string profileAboutText;
|
||||||
|
/// <summary>
|
||||||
|
/// The first life about text listed in a users profile
|
||||||
|
/// </summary>
|
||||||
|
public string profileFirstText;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The profile image for an avatar stored on the asset server
|
||||||
|
/// </summary>
|
||||||
|
public LLUUID profileImage;
|
||||||
|
/// <summary>
|
||||||
|
/// The profile image for the users first life tab
|
||||||
|
/// </summary>
|
||||||
|
public LLUUID profileFirstImage;
|
||||||
|
/// <summary>
|
||||||
|
/// The users last registered agent (filled in on the user server)
|
||||||
|
/// </summary>
|
||||||
|
public UserAgentData currentAgent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Information about a users session
|
||||||
|
/// </summary>
|
||||||
|
public class UserAgentData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The UUID of the users avatar (not the agent!)
|
||||||
|
/// </summary>
|
||||||
|
public LLUUID UUID;
|
||||||
|
/// <summary>
|
||||||
|
/// The IP address of the user
|
||||||
|
/// </summary>
|
||||||
|
public string agentIP;
|
||||||
|
/// <summary>
|
||||||
|
/// The port of the user
|
||||||
|
/// </summary>
|
||||||
|
public uint agentPort;
|
||||||
|
/// <summary>
|
||||||
|
/// Is the user online?
|
||||||
|
/// </summary>
|
||||||
|
public bool agentOnline;
|
||||||
|
/// <summary>
|
||||||
|
/// The session ID for the user (also the agent ID)
|
||||||
|
/// </summary>
|
||||||
|
public LLUUID sessionID;
|
||||||
|
/// <summary>
|
||||||
|
/// The "secure" session ID for the user
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>Not very secure. Dont rely on it for anything more than Linden Lab does.</remarks>
|
||||||
|
public LLUUID secureSessionID;
|
||||||
|
/// <summary>
|
||||||
|
/// The region the user logged into initially
|
||||||
|
/// </summary>
|
||||||
|
public LLUUID regionID;
|
||||||
|
/// <summary>
|
||||||
|
/// A unix timestamp from when the user logged in
|
||||||
|
/// </summary>
|
||||||
|
public int loginTime;
|
||||||
|
/// <summary>
|
||||||
|
/// When this agent expired and logged out, 0 if still online
|
||||||
|
/// </summary>
|
||||||
|
public int logoutTime;
|
||||||
|
/// <summary>
|
||||||
|
/// Current region the user is logged into
|
||||||
|
/// </summary>
|
||||||
|
public LLUUID currentRegion;
|
||||||
|
/// <summary>
|
||||||
|
/// Region handle of the current region the user is in
|
||||||
|
/// </summary>
|
||||||
|
public ulong currentHandle;
|
||||||
|
/// <summary>
|
||||||
|
/// The position of the user within the region
|
||||||
|
/// </summary>
|
||||||
|
public LLVector3 currentPos;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,140 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Used to pass messages to the gridserver
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="param">Pass this argument</param>
|
||||||
|
public delegate void GridManagerCallback(string param);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Serverside listener for grid commands
|
||||||
|
/// </summary>
|
||||||
|
public class GridManagementAgent
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Passes grid server messages
|
||||||
|
/// </summary>
|
||||||
|
private GridManagerCallback thecallback;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Security keys
|
||||||
|
/// </summary>
|
||||||
|
private string sendkey;
|
||||||
|
private string recvkey;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Our component type
|
||||||
|
/// </summary>
|
||||||
|
private string component_type;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// List of active sessions
|
||||||
|
/// </summary>
|
||||||
|
private static ArrayList Sessions;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initialises a new GridManagementAgent
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="app_httpd">HTTP Daemon for this server</param>
|
||||||
|
/// <param name="component_type">What component type are we?</param>
|
||||||
|
/// <param name="sendkey">Security send key</param>
|
||||||
|
/// <param name="recvkey">Security recieve key</param>
|
||||||
|
/// <param name="thecallback">Message callback</param>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Checks if a session exists
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sessionID">The session ID</param>
|
||||||
|
/// <returns>Exists?</returns>
|
||||||
|
public static bool SessionExists(LLUUID sessionID)
|
||||||
|
{
|
||||||
|
return Sessions.Contains(sessionID);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Logs a new session to the grid manager
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request">the XMLRPC request</param>
|
||||||
|
/// <returns>An XMLRPC reply</returns>
|
||||||
|
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;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,94 @@
|
||||||
|
/*
|
||||||
|
* 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 {
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A remote management system for the grid server
|
||||||
|
/// </summary>
|
||||||
|
public class GridServerManager
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Triggers events from the grid manager
|
||||||
|
/// </summary>
|
||||||
|
public static GridManagerCallback thecallback;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Security keys
|
||||||
|
/// </summary>
|
||||||
|
public static string sendkey;
|
||||||
|
public static string recvkey;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Disconnects the grid server and shuts it down
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request">XmlRpc Request</param>
|
||||||
|
/// <returns>An XmlRpc response containing either a "msg" or an "error"</returns>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Shuts down the grid server
|
||||||
|
/// </summary>
|
||||||
|
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");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,99 @@
|
||||||
|
<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>{7924FD35-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGrid.Framework.Manager</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGrid.Framework.Manager</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="OpenSim.Framework.dll" >
|
||||||
|
<HintPath>..\..\bin\OpenSim.Framework.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="OpenSim.Servers.dll" >
|
||||||
|
<HintPath>..\..\bin\OpenSim.Servers.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="libsecondlife.dll" >
|
||||||
|
<HintPath>..\..\bin\libsecondlife.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="XMLRPC" >
|
||||||
|
<HintPath>XMLRPC.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="GridManagementAgent.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="GridServerManager.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<PreBuildEvent>
|
||||||
|
</PreBuildEvent>
|
||||||
|
<PostBuildEvent>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
|
||||||
|
<LastOpenVersion>8.0.50727</LastOpenVersion>
|
||||||
|
<ProjectView>ProjectFiles</ProjectView>
|
||||||
|
<ProjectTrust>0</ProjectTrust>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
|
||||||
|
<PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
|
||||||
|
</Project>
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?xml version="1.0" ?>
|
||||||
|
<project name="OpenGrid.Framework.Manager" default="build">
|
||||||
|
<target name="build">
|
||||||
|
<echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<copy todir="${project::get-base-directory()}/${build.dir}">
|
||||||
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
<csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll">
|
||||||
|
<resources prefix="OpenGrid.Framework.Manager" dynamicprefix="true" >
|
||||||
|
</resources>
|
||||||
|
<sources failonempty="true">
|
||||||
|
<include name="GridManagementAgent.cs" />
|
||||||
|
<include name="GridServerManager.cs" />
|
||||||
|
</sources>
|
||||||
|
<references basedir="${project::get-base-directory()}">
|
||||||
|
<lib>
|
||||||
|
<include name="${project::get-base-directory()}" />
|
||||||
|
<include name="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
</lib>
|
||||||
|
<include name="System.dll" />
|
||||||
|
<include name="../../bin/OpenSim.Framework.dll" />
|
||||||
|
<include name="../../bin/OpenSim.Servers.dll" />
|
||||||
|
<include name="../../bin/libsecondlife.dll" />
|
||||||
|
<include name="../../bin/XMLRPC.dll" />
|
||||||
|
</references>
|
||||||
|
</csc>
|
||||||
|
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/../../bin/"/>
|
||||||
|
<copy todir="${project::get-base-directory()}/../../bin/">
|
||||||
|
<fileset basedir="${project::get-base-directory()}/${build.dir}/" >
|
||||||
|
<include name="*.dll"/>
|
||||||
|
<include name="*.exe"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
<target name="clean">
|
||||||
|
<delete dir="${bin.dir}" failonerror="false" />
|
||||||
|
<delete dir="${obj.dir}" failonerror="false" />
|
||||||
|
</target>
|
||||||
|
<target name="doc" description="Creates documentation.">
|
||||||
|
</target>
|
||||||
|
</project>
|
|
@ -0,0 +1,130 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An HTTP server for sending assets
|
||||||
|
/// </summary>
|
||||||
|
public class AssetHttpServer :BaseHttpServer
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Creates the new asset server
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="port">Port to initalise on</param>
|
||||||
|
public AssetHttpServer(int port)
|
||||||
|
: base(port)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles an HTTP request
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="stateinfo">HTTP State Info</param>
|
||||||
|
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());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,338 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An asset server
|
||||||
|
/// </summary>
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,247 @@
|
||||||
|
<<<<<<< .mine
|
||||||
|
<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>{0021261B-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGridServices.AssetServer</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGridServices.AssetServer</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>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="AssetHttpServer.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>
|
||||||
|
=======
|
||||||
|
<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>{0021261B-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGridServices.AssetServer</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGridServices.AssetServer</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>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Main.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="AssetHttpServer.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>
|
||||||
|
>>>>>>> .r921
|
|
@ -0,0 +1,122 @@
|
||||||
|
<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>{0021261B-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGridServices.AssetServer</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGridServices.AssetServer</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>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="AssetHttpServer.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>
|
|
@ -0,0 +1,122 @@
|
||||||
|
<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>{7CDDE593-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGridServices.AssetServer</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGridServices.AssetServer</RootNamespace>
|
||||||
|
<StartupObject></StartupObject>
|
||||||
|
<FileUpgradeFlags>
|
||||||
|
</FileUpgradeFlags>
|
||||||
|
</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>
|
||||||
|
<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>
|
||||||
|
<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>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="AssetHttpServer.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>
|
|
@ -0,0 +1,122 @@
|
||||||
|
<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>{0021261B-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGridServices.AssetServer</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGridServices.AssetServer</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>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Main.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="AssetHttpServer.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>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
|
||||||
|
<LastOpenVersion>8.0.50727</LastOpenVersion>
|
||||||
|
<ProjectView>ProjectFiles</ProjectView>
|
||||||
|
<ProjectTrust>0</ProjectTrust>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
|
||||||
|
<PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
|
||||||
|
</Project>
|
|
@ -0,0 +1,50 @@
|
||||||
|
<?xml version="1.0" ?>
|
||||||
|
<project name="OpenGridServices.AssetServer" default="build">
|
||||||
|
<target name="build">
|
||||||
|
<echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<copy todir="${project::get-base-directory()}/${build.dir}">
|
||||||
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
<csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe">
|
||||||
|
<resources prefix="OpenGridServices.AssetServer" dynamicprefix="true" >
|
||||||
|
</resources>
|
||||||
|
<sources failonempty="true">
|
||||||
|
<include name="Main.cs" />
|
||||||
|
<include name="AssetHttpServer.cs" />
|
||||||
|
<include name="Properties/AssemblyInfo.cs" />
|
||||||
|
</sources>
|
||||||
|
<references basedir="${project::get-base-directory()}">
|
||||||
|
<lib>
|
||||||
|
<include name="${project::get-base-directory()}" />
|
||||||
|
<include name="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
</lib>
|
||||||
|
<include name="System.dll" />
|
||||||
|
<include name="System.Data.dll" />
|
||||||
|
<include name="System.Xml.dll" />
|
||||||
|
<include name="../../bin/OpenSim.Framework.dll" />
|
||||||
|
<include name="../../bin/OpenSim.Framework.Console.dll" />
|
||||||
|
<include name="../../bin/OpenSim.GridInterfaces.Local.dll" />
|
||||||
|
<include name="../../bin/OpenSim.Servers.dll" />
|
||||||
|
<include name="../../bin/libsecondlife.dll" />
|
||||||
|
<include name="../../bin/Db4objects.Db4o.dll" />
|
||||||
|
<include name="../../bin/XMLRPC.dll" />
|
||||||
|
</references>
|
||||||
|
</csc>
|
||||||
|
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/../../bin/"/>
|
||||||
|
<copy todir="${project::get-base-directory()}/../../bin/">
|
||||||
|
<fileset basedir="${project::get-base-directory()}/${build.dir}/" >
|
||||||
|
<include name="*.dll"/>
|
||||||
|
<include name="*.exe"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
<target name="clean">
|
||||||
|
<delete dir="${bin.dir}" failonerror="false" />
|
||||||
|
<delete dir="${obj.dir}" failonerror="false" />
|
||||||
|
</target>
|
||||||
|
<target name="doc" description="Creates documentation.">
|
||||||
|
</target>
|
||||||
|
</project>
|
|
@ -0,0 +1,126 @@
|
||||||
|
<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>{21BFC8E2-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGridServices.GridServer</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGridServices.GridServer</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="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>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj">
|
||||||
|
<Name>OpenSim.Framework</Name>
|
||||||
|
<Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
|
||||||
|
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||||
|
<Private>False</Private>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj">
|
||||||
|
<Name>OpenSim.Framework.Console</Name>
|
||||||
|
<Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
|
||||||
|
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||||
|
<Private>False</Private>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\OpenSim.Servers\OpenSim.Servers.csproj">
|
||||||
|
<Name>OpenSim.Servers</Name>
|
||||||
|
<Project>{8BB20F0A-0000-0000-0000-000000000000}</Project>
|
||||||
|
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||||
|
<Private>False</Private>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\XmlRpcCS\XMLRPC.csproj">
|
||||||
|
<Name>XMLRPC</Name>
|
||||||
|
<Project>{8E81D43C-0000-0000-0000-000000000000}</Project>
|
||||||
|
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||||
|
<Private>False</Private>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="Main.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="SimProfiles.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>
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?xml version="1.0" ?>
|
||||||
|
<project name="OpenGridServices.GridServer" default="build">
|
||||||
|
<target name="build">
|
||||||
|
<echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<copy todir="${project::get-base-directory()}/${build.dir}">
|
||||||
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
<csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe">
|
||||||
|
<resources prefix="OpenGridServices.GridServer" dynamicprefix="true" >
|
||||||
|
</resources>
|
||||||
|
<sources failonempty="true">
|
||||||
|
<include name="Main.cs" />
|
||||||
|
<include name="SimProfiles.cs" />
|
||||||
|
<include name="Properties/AssemblyInfo.cs" />
|
||||||
|
</sources>
|
||||||
|
<references basedir="${project::get-base-directory()}">
|
||||||
|
<lib>
|
||||||
|
<include name="${project::get-base-directory()}" />
|
||||||
|
<include name="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
</lib>
|
||||||
|
<include name="System.dll" />
|
||||||
|
<include name="System.Data.dll" />
|
||||||
|
<include name="System.Xml.dll" />
|
||||||
|
<include name="../bin/OpenSim.Framework.dll" />
|
||||||
|
<include name="../bin/OpenSim.Framework.Console.dll" />
|
||||||
|
<include name="../bin/OpenSim.Servers.dll" />
|
||||||
|
<include name="../bin/libsecondlife.dll" />
|
||||||
|
<include name="../bin/Db4objects.Db4o.dll" />
|
||||||
|
<include name="../bin/XMLRPC.dll" />
|
||||||
|
</references>
|
||||||
|
</csc>
|
||||||
|
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/../bin/"/>
|
||||||
|
<copy todir="${project::get-base-directory()}/../bin/">
|
||||||
|
<fileset basedir="${project::get-base-directory()}/${build.dir}/" >
|
||||||
|
<include name="*.dll"/>
|
||||||
|
<include name="*.exe"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
<target name="clean">
|
||||||
|
<delete dir="${bin.dir}" failonerror="false" />
|
||||||
|
<delete dir="${obj.dir}" failonerror="false" />
|
||||||
|
</target>
|
||||||
|
<target name="doc" description="Creates documentation.">
|
||||||
|
</target>
|
||||||
|
</project>
|
|
@ -0,0 +1,33 @@
|
||||||
|
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")]
|
|
@ -0,0 +1,575 @@
|
||||||
|
/*
|
||||||
|
* 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<string, IGridData> _plugins = new Dictionary<string, IGridData>();
|
||||||
|
Dictionary<string, ILogData> _logplugins = new Dictionary<string, ILogData>();
|
||||||
|
|
||||||
|
public OpenSim.Framework.Interfaces.GridConfig config;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds a new grid server plugin - grid servers will be requested in the order they were loaded.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="FileName">The filename to the grid server plugin DLL</param>
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Logs a piece of information to the database
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="target">What you were operating on (in grid server, this will likely be the region UUIDs)</param>
|
||||||
|
/// <param name="method">Which method is being called?</param>
|
||||||
|
/// <param name="args">What arguments are being passed?</param>
|
||||||
|
/// <param name="priority">How high priority is this? 1 = Max, 6 = Verbose</param>
|
||||||
|
/// <param name="message">The message to log</param>
|
||||||
|
private void logToDB(string target, string method, string args, int priority, string message)
|
||||||
|
{
|
||||||
|
foreach (KeyValuePair<string, ILogData> 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a region by argument
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="uuid">A UUID key of the region to return</param>
|
||||||
|
/// <returns>A SimProfileData for the region</returns>
|
||||||
|
public SimProfileData getRegion(libsecondlife.LLUUID uuid)
|
||||||
|
{
|
||||||
|
foreach(KeyValuePair<string,IGridData> 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a region by argument
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="uuid">A regionHandle of the region to return</param>
|
||||||
|
/// <returns>A SimProfileData for the region</returns>
|
||||||
|
public SimProfileData getRegion(ulong handle)
|
||||||
|
{
|
||||||
|
foreach (KeyValuePair<string, IGridData> 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<ulong, SimProfileData> getRegions(uint xmin, uint ymin, uint xmax, uint ymax)
|
||||||
|
{
|
||||||
|
Dictionary<ulong, SimProfileData> regions = new Dictionary<ulong, SimProfileData>();
|
||||||
|
|
||||||
|
SimProfileData[] neighbours;
|
||||||
|
|
||||||
|
foreach (KeyValuePair<string, IGridData> 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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a XML String containing a list of the neighbouring regions
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="reqhandle">The regionhandle for the center sim</param>
|
||||||
|
/// <returns>An XML string containing neighbour entities</returns>
|
||||||
|
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 += "<neighbour>";
|
||||||
|
response += "<sim_ip>" + neighbour.serverIP + "</sim_ip>";
|
||||||
|
response += "<sim_port>" + neighbour.serverPort.ToString() + "</sim_port>";
|
||||||
|
response += "<locx>" + neighbour.regionLocX.ToString() + "</locx>";
|
||||||
|
response += "<locy>" + neighbour.regionLocY.ToString() + "</locy>";
|
||||||
|
response += "<regionhandle>" + neighbour.regionHandle.ToString() + "</regionhandle>";
|
||||||
|
response += "</neighbour>";
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Performed when a region connects to the grid server initially.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request">The XMLRPC Request</param>
|
||||||
|
/// <returns>Startup parameters</returns>
|
||||||
|
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<ulong, SimProfileData> neighbours = getRegions(TheSim.regionLocX - 1, TheSim.regionLocY - 1, TheSim.regionLocX + 1, TheSim.regionLocY + 1);
|
||||||
|
|
||||||
|
foreach (KeyValuePair<ulong, SimProfileData> 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<ulong, SimProfileData> neighbours = getRegions((uint)xmin, (uint)ymin, (uint)xmax, (uint)ymax);
|
||||||
|
|
||||||
|
foreach (KeyValuePair<ulong, SimProfileData> 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();
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Performs a REST Get Operation
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="path"></param>
|
||||||
|
/// <param name="param"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public string RestGetRegionMethod(string request, string path, string param)
|
||||||
|
{
|
||||||
|
return RestGetSimMethod("", "/sims/", param);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Performs a REST Set Operation
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="path"></param>
|
||||||
|
/// <param name="param"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public string RestSetRegionMethod(string request, string path, string param)
|
||||||
|
{
|
||||||
|
return RestSetSimMethod("", "/sims/", param);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns information about a sim via a REST Request
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="path"></param>
|
||||||
|
/// <param name="param"></param>
|
||||||
|
/// <returns>Information about the sim in XML</returns>
|
||||||
|
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 = "<Root>";
|
||||||
|
respstring += "<authkey>" + TheSim.regionSendKey + "</authkey>";
|
||||||
|
respstring += "<sim>";
|
||||||
|
respstring += "<uuid>" + TheSim.UUID.ToString() + "</uuid>";
|
||||||
|
respstring += "<regionname>" + TheSim.regionName + "</regionname>";
|
||||||
|
respstring += "<sim_ip>" + TheSim.serverIP + "</sim_ip>";
|
||||||
|
respstring += "<sim_port>" + TheSim.serverPort.ToString() + "</sim_port>";
|
||||||
|
respstring += "<region_locx>" + TheSim.regionLocX.ToString() + "</region_locx>";
|
||||||
|
respstring += "<region_locy>" + TheSim.regionLocY.ToString() + "</region_locy>";
|
||||||
|
respstring += "<estate_id>1</estate_id>";
|
||||||
|
respstring += "</sim>";
|
||||||
|
respstring += "</Root>";
|
||||||
|
}
|
||||||
|
|
||||||
|
return respstring;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Creates or updates a sim via a REST Method Request
|
||||||
|
/// BROKEN with SQL Update
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="path"></param>
|
||||||
|
/// <param name="param"></param>
|
||||||
|
/// <returns>"OK" or an error</returns>
|
||||||
|
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<string, IGridData> 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() + ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,271 @@
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// </summary>
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,134 @@
|
||||||
|
<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>{21BFC8E2-0000-0000-0000-000000000000}</ProjectGuid>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ApplicationIcon></ApplicationIcon>
|
||||||
|
<AssemblyKeyContainerName>
|
||||||
|
</AssemblyKeyContainerName>
|
||||||
|
<AssemblyName>OpenGridServices.GridServer</AssemblyName>
|
||||||
|
<DefaultClientScript>JScript</DefaultClientScript>
|
||||||
|
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||||
|
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||||
|
<DelaySign>false</DelaySign>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<AppDesignerFolder></AppDesignerFolder>
|
||||||
|
<RootNamespace>OpenGridServices.GridServer</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.Servers" >
|
||||||
|
<HintPath>OpenSim.Servers.dll</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="OpenSim.GenericConfig.Xml" >
|
||||||
|
<HintPath>OpenSim.GenericConfig.Xml.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>
|
||||||
|
<ProjectReference Include="..\OpenGrid.Framework.Manager\OpenGrid.Framework.Manager.csproj">
|
||||||
|
<Name>OpenGrid.Framework.Manager</Name>
|
||||||
|
<Project>{7924FD35-0000-0000-0000-000000000000}</Project>
|
||||||
|
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
|
||||||
|
<Private>False</Private>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="GridManager.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>
|
|
@ -0,0 +1,12 @@
|
||||||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
|
||||||
|
<LastOpenVersion>8.0.50727</LastOpenVersion>
|
||||||
|
<ProjectView>ProjectFiles</ProjectView>
|
||||||
|
<ProjectTrust>0</ProjectTrust>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
|
||||||
|
<PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
|
||||||
|
</Project>
|
|
@ -0,0 +1,52 @@
|
||||||
|
<?xml version="1.0" ?>
|
||||||
|
<project name="OpenGridServices.GridServer" default="build">
|
||||||
|
<target name="build">
|
||||||
|
<echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<copy todir="${project::get-base-directory()}/${build.dir}">
|
||||||
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
<csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe">
|
||||||
|
<resources prefix="OpenGridServices.GridServer" dynamicprefix="true" >
|
||||||
|
</resources>
|
||||||
|
<sources failonempty="true">
|
||||||
|
<include name="GridManager.cs" />
|
||||||
|
<include name="Main.cs" />
|
||||||
|
<include name="Properties/AssemblyInfo.cs" />
|
||||||
|
</sources>
|
||||||
|
<references basedir="${project::get-base-directory()}">
|
||||||
|
<lib>
|
||||||
|
<include name="${project::get-base-directory()}" />
|
||||||
|
<include name="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
</lib>
|
||||||
|
<include name="System.dll" />
|
||||||
|
<include name="System.Data.dll" />
|
||||||
|
<include name="System.Xml.dll" />
|
||||||
|
<include name="../../bin/OpenSim.Framework.dll" />
|
||||||
|
<include name="../../bin/OpenSim.Framework.Console.dll" />
|
||||||
|
<include name="../../bin/OpenSim.Servers.dll" />
|
||||||
|
<include name="../../bin/OpenGrid.Framework.Data.dll" />
|
||||||
|
<include name="../../bin/OpenGrid.Framework.Manager.dll" />
|
||||||
|
<include name="../../bin/OpenSim.GenericConfig.Xml.dll" />
|
||||||
|
<include name="../../bin/libsecondlife.dll" />
|
||||||
|
<include name="../../bin/Db4objects.Db4o.dll" />
|
||||||
|
<include name="../../bin/XMLRPC.dll" />
|
||||||
|
</references>
|
||||||
|
</csc>
|
||||||
|
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/../../bin/"/>
|
||||||
|
<copy todir="${project::get-base-directory()}/../../bin/">
|
||||||
|
<fileset basedir="${project::get-base-directory()}/${build.dir}/" >
|
||||||
|
<include name="*.dll"/>
|
||||||
|
<include name="*.exe"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
<target name="clean">
|
||||||
|
<delete dir="${bin.dir}" failonerror="false" />
|
||||||
|
<delete dir="${obj.dir}" failonerror="false" />
|
||||||
|
</target>
|
||||||
|
<target name="doc" description="Creates documentation.">
|
||||||
|
</target>
|
||||||
|
</project>
|
|
@ -0,0 +1,33 @@
|
||||||
|
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")]
|
|
@ -0,0 +1,125 @@
|
||||||
|
/*
|
||||||
|
* 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<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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,87 @@
|
||||||
|
/*
|
||||||
|
* 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)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,125 @@
|
||||||
|
<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="Main.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="InventoryManager.cs">
|
||||||
|
<SubType>Code</SubType>
|
||||||
|
</Compile>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<PreBuildEvent>
|
||||||
|
</PreBuildEvent>
|
||||||
|
<PostBuildEvent>
|
||||||
|
</PostBuildEvent>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
|
@ -0,0 +1,50 @@
|
||||||
|
<?xml version="1.0" ?>
|
||||||
|
<project name="OpenGridServices.InventoryServer" default="build">
|
||||||
|
<target name="build">
|
||||||
|
<echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
<copy todir="${project::get-base-directory()}/${build.dir}">
|
||||||
|
<fileset basedir="${project::get-base-directory()}">
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
<csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe">
|
||||||
|
<resources prefix="OpenGridServices.InventoryServer" dynamicprefix="true" >
|
||||||
|
</resources>
|
||||||
|
<sources failonempty="true">
|
||||||
|
<include name="Main.cs" />
|
||||||
|
<include name="InventoryManager.cs" />
|
||||||
|
</sources>
|
||||||
|
<references basedir="${project::get-base-directory()}">
|
||||||
|
<lib>
|
||||||
|
<include name="${project::get-base-directory()}" />
|
||||||
|
<include name="${project::get-base-directory()}/${build.dir}" />
|
||||||
|
</lib>
|
||||||
|
<include name="System.dll" />
|
||||||
|
<include name="System.Data.dll" />
|
||||||
|
<include name="System.Xml.dll" />
|
||||||
|
<include name="../../bin/OpenSim.Framework.dll" />
|
||||||
|
<include name="../../bin/OpenSim.Framework.Console.dll" />
|
||||||
|
<include name="../../bin/OpenSim.GridInterfaces.Local.dll" />
|
||||||
|
<include name="../../bin/OpenGrid.Framework.Data.dll" />
|
||||||
|
<include name="../../bin/OpenSim.Servers.dll" />
|
||||||
|
<include name="../../bin/libsecondlife.dll" />
|
||||||
|
<include name="../../bin/Db4objects.Db4o.dll" />
|
||||||
|
<include name="../../bin/XMLRPC.dll" />
|
||||||
|
</references>
|
||||||
|
</csc>
|
||||||
|
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
|
||||||
|
<mkdir dir="${project::get-base-directory()}/../../bin/"/>
|
||||||
|
<copy todir="${project::get-base-directory()}/../../bin/">
|
||||||
|
<fileset basedir="${project::get-base-directory()}/${build.dir}/" >
|
||||||
|
<include name="*.dll"/>
|
||||||
|
<include name="*.exe"/>
|
||||||
|
</fileset>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
<target name="clean">
|
||||||
|
<delete dir="${bin.dir}" failonerror="false" />
|
||||||
|
<delete dir="${obj.dir}" failonerror="false" />
|
||||||
|
</target>
|
||||||
|
<target name="doc" description="Creates documentation.">
|
||||||
|
</target>
|
||||||
|
</project>
|
|
@ -0,0 +1,16 @@
|
||||||
|
<Combine name="OpenGridServices.Manager" fileversion="2.0" outputpath="../../mono-1.2.3.1/lib/monodevelop/bin" MakePkgConfig="False" MakeLibPC="True">
|
||||||
|
<Configurations active="Debug">
|
||||||
|
<Configuration name="Debug" ctype="CombineConfiguration">
|
||||||
|
<Entry build="True" name="OpenGridServices.Manager" configuration="Debug" />
|
||||||
|
</Configuration>
|
||||||
|
<Configuration name="Release" ctype="CombineConfiguration">
|
||||||
|
<Entry build="True" name="OpenGridServices.Manager" configuration="Release" />
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<StartMode startupentry="OpenGridServices.Manager" single="True">
|
||||||
|
<Execute type="None" entry="OpenGridServices.Manager" />
|
||||||
|
</StartMode>
|
||||||
|
<Entries>
|
||||||
|
<Entry filename="./OpenGridServices.Manager/OpenGridServices.Manager.mdp" />
|
||||||
|
</Entries>
|
||||||
|
</Combine>
|
|
@ -0,0 +1,39 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<UserCombinePreferences filename="/home/gareth/OpenGridServices.Manager/OpenGridServices.Manager.mds">
|
||||||
|
<Files>
|
||||||
|
<File filename="Welcome" />
|
||||||
|
<File filename="./OpenGridServices.Manager/MainWindow.cs" />
|
||||||
|
<File filename="./OpenGridServices.Manager/ConnectToGridServerDialog.cs" />
|
||||||
|
<File filename="./OpenGridServices.Manager/Main.cs" />
|
||||||
|
</Files>
|
||||||
|
<Views>
|
||||||
|
<ViewMemento Id="MonoDevelop.Ide.Gui.Pads.ProjectPad">
|
||||||
|
<TreeView>
|
||||||
|
<Node expanded="True">
|
||||||
|
<Node name="OpenGridServices.Manager" expanded="True">
|
||||||
|
<Node name="References" expanded="True" />
|
||||||
|
<Node name="Resources" expanded="True" />
|
||||||
|
<Node name="UserInterface" expanded="True" />
|
||||||
|
<Node name="ConnectToGridServerDialog.cs" expanded="False" selected="True" />
|
||||||
|
</Node>
|
||||||
|
</Node>
|
||||||
|
</TreeView>
|
||||||
|
</ViewMemento>
|
||||||
|
<ViewMemento Id="MonoDevelop.Ide.Gui.Pads.ClassPad">
|
||||||
|
<TreeView>
|
||||||
|
<Node expanded="True" />
|
||||||
|
</TreeView>
|
||||||
|
</ViewMemento>
|
||||||
|
<ViewMemento Id="MonoDevelop.NUnit.TestPad">
|
||||||
|
<TreeView>
|
||||||
|
<Node expanded="False" />
|
||||||
|
</TreeView>
|
||||||
|
</ViewMemento>
|
||||||
|
</Views>
|
||||||
|
<Properties>
|
||||||
|
<Properties>
|
||||||
|
<Property key="ActiveConfiguration" value="Debug" />
|
||||||
|
<Property key="ActiveWindow" value="/home/gareth/OpenGridServices.Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs" />
|
||||||
|
</Properties>
|
||||||
|
</Properties>
|
||||||
|
</UserCombinePreferences>
|
|
@ -0,0 +1,2 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ArrayOfUserTask xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
|
|
@ -0,0 +1,32 @@
|
||||||
|
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("")]
|
|
@ -0,0 +1,33 @@
|
||||||
|
using System;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace OpenGridServices.Manager
|
||||||
|
{
|
||||||
|
public class BlockingQueue<T>
|
||||||
|
{
|
||||||
|
private Queue<T> _queue = new Queue<T>();
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace OpenGridServices.Manager
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public partial class Connect to grid server : Gtk.Dialog
|
||||||
|
{
|
||||||
|
|
||||||
|
public Connect to grid server()
|
||||||
|
{
|
||||||
|
this.Build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
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();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,106 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,96 @@
|
||||||
|
// 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<string> PendingOperations = new BlockingQueue<string>();
|
||||||
|
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,76 @@
|
||||||
|
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");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
<Project name="OpenGridServices.Manager" fileversion="2.0" language="C#" clr-version="Net_2_0" ctype="DotNetProject">
|
||||||
|
<Configurations active="Debug">
|
||||||
|
<Configuration name="Debug" ctype="DotNetProjectConfiguration">
|
||||||
|
<Output directory="./bin/Debug" assembly="OpenGridServices.Manager" />
|
||||||
|
<Build debugmode="True" target="Exe" />
|
||||||
|
<Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" />
|
||||||
|
<CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
|
||||||
|
</Configuration>
|
||||||
|
<Configuration name="Release" ctype="DotNetProjectConfiguration">
|
||||||
|
<Output directory="./bin/Release" assembly="OpenGridServices.Manager" />
|
||||||
|
<Build debugmode="False" target="Exe" />
|
||||||
|
<Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" />
|
||||||
|
<CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
|
||||||
|
</Configuration>
|
||||||
|
</Configurations>
|
||||||
|
<Contents>
|
||||||
|
<File name="./gtk-gui/gui.stetic" subtype="Code" buildaction="EmbedAsResource" />
|
||||||
|
<File name="./gtk-gui/generated.cs" subtype="Code" buildaction="Compile" />
|
||||||
|
<File name="./MainWindow.cs" subtype="Code" buildaction="Compile" />
|
||||||
|
<File name="./Main.cs" subtype="Code" buildaction="Compile" />
|
||||||
|
<File name="./AssemblyInfo.cs" subtype="Code" buildaction="Compile" />
|
||||||
|
<File name="./ConnectToGridServerDialog.cs" subtype="Code" buildaction="Compile" />
|
||||||
|
<File name="./Util.cs" subtype="Code" buildaction="Compile" />
|
||||||
|
<File name="./gtk-gui/OpenGridServices.Manager.MainWindow.cs" subtype="Code" buildaction="Compile" />
|
||||||
|
<File name="./BlockingQueue.cs" subtype="Code" buildaction="Compile" />
|
||||||
|
<File name="./gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs" subtype="Code" buildaction="Compile" />
|
||||||
|
<File name="./GridServerConnectionManager.cs" subtype="Code" buildaction="Compile" />
|
||||||
|
<File name="./RegionBlock.cs" subtype="Code" buildaction="Compile" />
|
||||||
|
</Contents>
|
||||||
|
<References>
|
||||||
|
<ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||||
|
<ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||||
|
<ProjectReference type="Gac" localcopy="True" refto="glib-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||||
|
<ProjectReference type="Gac" localcopy="True" refto="glade-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||||
|
<ProjectReference type="Gac" localcopy="True" refto="pango-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||||
|
<ProjectReference type="Assembly" localcopy="True" refto="../../bin/libsecondlife.dll" />
|
||||||
|
<ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
|
||||||
|
<ProjectReference type="Assembly" localcopy="True" refto="../../bin/XMLRPC.dll" />
|
||||||
|
<ProjectReference type="Gac" localcopy="True" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
</References>
|
||||||
|
<GtkDesignInfo partialTypes="True" />
|
||||||
|
</Project>
|
Binary file not shown.
|
@ -0,0 +1,37 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,133 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Convert a variable length field (byte array) to a string, with a
|
||||||
|
/// field name prepended to each line of the output
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>If the byte array has unprintable characters in it, a
|
||||||
|
/// hex dump will be put in the string instead</remarks>
|
||||||
|
/// <param name="bytes">The byte array to convert to a string</param>
|
||||||
|
/// <param name="fieldName">A field name to prepend to each line of output</param>
|
||||||
|
/// <returns>An ASCII string or a string containing a hex dump, minus
|
||||||
|
/// the null terminator</returns>
|
||||||
|
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()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,226 @@
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// <autogenerated>
|
||||||
|
// 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.
|
||||||
|
// </autogenerated>
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,256 @@
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// <autogenerated>
|
||||||
|
// 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.
|
||||||
|
// </autogenerated>
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
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, "<Alt><Mod2>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("<ui><menubar name='menubar2'><menu action='Grid'><menuitem action='ConnectToGridserver'/><menuitem action='DisconnectFromGridServer'/><separator/><menuitem action='RestartWholeGrid'/><menuitem action='RestartGridserverOnly'/><separator/><menuitem action='ShutdownWholeGrid'/><menuitem action='ShutdownGridserverOnly'/><separator/><menuitem action='ExitGridManager'/></menu><menu action='User'><menu action='ConnectToUserserver'><menuitem action='DefaultLocalGridUserserver'/><menuitem action='CustomUserserver'/><menuitem action='RemoteGridDefaultUserserver'/></menu><separator/><menuitem action='AccountManagment'/><menuitem action='GlobalNotice'/><separator/><menuitem action='DisableAllLogins'/><menuitem action='DisableNonGodUsersOnly'/><separator/><menuitem action='ShutdownUserServer'/></menu><menu action='Asset'><menuitem action='UploadAsset'/><menuitem action='AssetManagement'/><menu action='ConnectToAssetServer'><menuitem action='DefaultForLocalGrid'/><menuitem action='DefaultForRemoteGrid'/><menuitem action='CustomAssetServer'/></menu></menu><menu action='Region'/><menu action='Services'/></menubar></ui>");
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// <autogenerated>
|
||||||
|
// 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.
|
||||||
|
// </autogenerated>
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,502 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<stetic-interface>
|
||||||
|
<widget class="Gtk.Window" id="OpenGridServices.Manager.MainWindow" design-size="800 800">
|
||||||
|
<action-group name="Default">
|
||||||
|
<action id="Grid">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Accelerator"><Alt><Mod2>g</property>
|
||||||
|
<property name="HideIfEmpty">False</property>
|
||||||
|
<property name="Label" translatable="yes">Grid</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Grid</property>
|
||||||
|
</action>
|
||||||
|
<action id="User">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="HideIfEmpty">False</property>
|
||||||
|
<property name="Label" translatable="yes">User</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">User</property>
|
||||||
|
</action>
|
||||||
|
<action id="Asset">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="HideIfEmpty">False</property>
|
||||||
|
<property name="Label" translatable="yes">Asset</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Asset</property>
|
||||||
|
</action>
|
||||||
|
<action id="Region">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Region</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Region</property>
|
||||||
|
</action>
|
||||||
|
<action id="Services">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Services</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Services</property>
|
||||||
|
</action>
|
||||||
|
<action id="ConnectToGridserver">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="HideIfEmpty">False</property>
|
||||||
|
<property name="Label" translatable="yes">Connect to gridserver...</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Connect to gridserver</property>
|
||||||
|
<property name="StockId">gtk-connect</property>
|
||||||
|
<signal name="Activated" handler="ConnectToGridServerMenu" />
|
||||||
|
</action>
|
||||||
|
<action id="RestartWholeGrid">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Restart whole grid</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Restart whole grid</property>
|
||||||
|
<property name="StockId">gtk-refresh</property>
|
||||||
|
</action>
|
||||||
|
<action id="ShutdownWholeGrid">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Shutdown whole grid</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Shutdown whole grid</property>
|
||||||
|
<property name="StockId">gtk-stop</property>
|
||||||
|
</action>
|
||||||
|
<action id="ExitGridManager">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Exit grid manager</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Exit grid manager</property>
|
||||||
|
<property name="StockId">gtk-close</property>
|
||||||
|
<signal name="Activated" handler="QuitMenu" after="yes" />
|
||||||
|
</action>
|
||||||
|
<action id="ConnectToUserserver">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Connect to userserver</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Connect to userserver</property>
|
||||||
|
<property name="StockId">gtk-connect</property>
|
||||||
|
</action>
|
||||||
|
<action id="AccountManagment">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Account managment</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Account managment</property>
|
||||||
|
<property name="StockId">gtk-properties</property>
|
||||||
|
</action>
|
||||||
|
<action id="GlobalNotice">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Global notice</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Global notice</property>
|
||||||
|
<property name="StockId">gtk-network</property>
|
||||||
|
</action>
|
||||||
|
<action id="DisableAllLogins">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Disable all logins</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Disable all logins</property>
|
||||||
|
<property name="StockId">gtk-no</property>
|
||||||
|
</action>
|
||||||
|
<action id="DisableNonGodUsersOnly">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Disable non-god users only</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Disable non-god users only</property>
|
||||||
|
<property name="StockId">gtk-no</property>
|
||||||
|
</action>
|
||||||
|
<action id="ShutdownUserServer">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Shutdown user server</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Shutdown user server</property>
|
||||||
|
<property name="StockId">gtk-stop</property>
|
||||||
|
</action>
|
||||||
|
<action id="ShutdownGridserverOnly">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Shutdown gridserver only</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Shutdown gridserver only</property>
|
||||||
|
<property name="StockId">gtk-stop</property>
|
||||||
|
<signal name="Activated" handler="ShutdownGridserverMenu" after="yes" />
|
||||||
|
</action>
|
||||||
|
<action id="RestartGridserverOnly">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Restart gridserver only</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Restart gridserver only</property>
|
||||||
|
<property name="StockId">gtk-refresh</property>
|
||||||
|
<signal name="Activated" handler="RestartGridserverMenu" after="yes" />
|
||||||
|
</action>
|
||||||
|
<action id="DefaultLocalGridUserserver">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Default local grid userserver</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Default local grid userserver</property>
|
||||||
|
</action>
|
||||||
|
<action id="CustomUserserver">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Custom userserver...</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Custom userserver</property>
|
||||||
|
</action>
|
||||||
|
<action id="RemoteGridDefaultUserserver">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Remote grid default userserver...</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Remote grid default userserver</property>
|
||||||
|
</action>
|
||||||
|
<action id="DisconnectFromGridServer">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Disconnect from grid server</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Disconnect from grid server</property>
|
||||||
|
<property name="StockId">gtk-disconnect</property>
|
||||||
|
<property name="Visible">False</property>
|
||||||
|
<signal name="Activated" handler="DisconnectGridServerMenu" after="yes" />
|
||||||
|
</action>
|
||||||
|
<action id="UploadAsset">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Upload asset</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Upload asset</property>
|
||||||
|
</action>
|
||||||
|
<action id="AssetManagement">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Asset management</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Asset management</property>
|
||||||
|
</action>
|
||||||
|
<action id="ConnectToAssetServer">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Connect to asset server</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Connect to asset server</property>
|
||||||
|
</action>
|
||||||
|
<action id="ConnectToDefaultAssetServerForGrid">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Connect to default asset server for grid</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Connect to default asset server for grid</property>
|
||||||
|
</action>
|
||||||
|
<action id="DefaultForLocalGrid">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Default for local grid</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Default for local grid</property>
|
||||||
|
</action>
|
||||||
|
<action id="DefaultForRemoteGrid">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Default for remote grid...</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Default for remote grid...</property>
|
||||||
|
</action>
|
||||||
|
<action id="CustomAssetServer">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes">Custom asset server...</property>
|
||||||
|
<property name="ShortLabel" translatable="yes">Custom asset server...</property>
|
||||||
|
</action>
|
||||||
|
</action-group>
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="WidthRequest">800</property>
|
||||||
|
<property name="HeightRequest">600</property>
|
||||||
|
<property name="Title" translatable="yes">Open Grid Services Manager</property>
|
||||||
|
<property name="Icon">stock:gtk-network Dialog</property>
|
||||||
|
<signal name="DeleteEvent" handler="OnDeleteEvent" />
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.VBox" id="vbox1">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.MenuBar" id="menubar2">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="HeightRequest">25</property>
|
||||||
|
<node name="menubar2" type="Menubar">
|
||||||
|
<node type="Menu" action="Grid">
|
||||||
|
<node type="Menuitem" action="ConnectToGridserver" />
|
||||||
|
<node type="Menuitem" action="DisconnectFromGridServer" />
|
||||||
|
<node type="Separator" />
|
||||||
|
<node type="Menuitem" action="RestartWholeGrid" />
|
||||||
|
<node type="Menuitem" action="RestartGridserverOnly" />
|
||||||
|
<node type="Separator" />
|
||||||
|
<node type="Menuitem" action="ShutdownWholeGrid" />
|
||||||
|
<node type="Menuitem" action="ShutdownGridserverOnly" />
|
||||||
|
<node type="Separator" />
|
||||||
|
<node type="Menuitem" action="ExitGridManager" />
|
||||||
|
</node>
|
||||||
|
<node type="Menu" action="User">
|
||||||
|
<node type="Menu" action="ConnectToUserserver">
|
||||||
|
<node type="Menuitem" action="DefaultLocalGridUserserver" />
|
||||||
|
<node type="Menuitem" action="CustomUserserver" />
|
||||||
|
<node type="Menuitem" action="RemoteGridDefaultUserserver" />
|
||||||
|
</node>
|
||||||
|
<node type="Separator" />
|
||||||
|
<node type="Menuitem" action="AccountManagment" />
|
||||||
|
<node type="Menuitem" action="GlobalNotice" />
|
||||||
|
<node type="Separator" />
|
||||||
|
<node type="Menuitem" action="DisableAllLogins" />
|
||||||
|
<node type="Menuitem" action="DisableNonGodUsersOnly" />
|
||||||
|
<node type="Separator" />
|
||||||
|
<node type="Menuitem" action="ShutdownUserServer" />
|
||||||
|
</node>
|
||||||
|
<node type="Menu" action="Asset">
|
||||||
|
<node type="Menuitem" action="UploadAsset" />
|
||||||
|
<node type="Menuitem" action="AssetManagement" />
|
||||||
|
<node type="Menu" action="ConnectToAssetServer">
|
||||||
|
<node type="Menuitem" action="DefaultForLocalGrid" />
|
||||||
|
<node type="Menuitem" action="DefaultForRemoteGrid" />
|
||||||
|
<node type="Menuitem" action="CustomAssetServer" />
|
||||||
|
</node>
|
||||||
|
</node>
|
||||||
|
<node type="Menu" action="Region" />
|
||||||
|
<node type="Menu" action="Services" />
|
||||||
|
</node>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">0</property>
|
||||||
|
<property name="AutoSize">False</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.HBox" id="hbox1">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<child>
|
||||||
|
<placeholder />
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.ScrolledWindow" id="scrolledwindow1">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="CanFocus">True</property>
|
||||||
|
<property name="VscrollbarPolicy">Automatic</property>
|
||||||
|
<property name="HscrollbarPolicy">Automatic</property>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Viewport" id="GtkViewport">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="ShadowType">None</property>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.DrawingArea" id="drawingarea1">
|
||||||
|
<property name="MemberName" />
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">1</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.TreeView" id="treeview1">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="CanFocus">True</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">2</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">1</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Statusbar" id="statusbar1">
|
||||||
|
<property name="MemberName">statusBar1</property>
|
||||||
|
<property name="Spacing">5</property>
|
||||||
|
<child>
|
||||||
|
<placeholder />
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder />
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="PackType">End</property>
|
||||||
|
<property name="Position">2</property>
|
||||||
|
<property name="AutoSize">False</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<widget class="Gtk.Dialog" id="OpenGridServices.Manager.ConnectToGridServerDialog" design-size="476 137">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="Events">ButtonPressMask</property>
|
||||||
|
<property name="Title" translatable="yes">Connect to Grid server</property>
|
||||||
|
<property name="WindowPosition">CenterOnParent</property>
|
||||||
|
<property name="Buttons">2</property>
|
||||||
|
<property name="HelpButton">False</property>
|
||||||
|
<property name="HasSeparator">False</property>
|
||||||
|
<signal name="Response" handler="OnResponse" />
|
||||||
|
<child internal-child="VBox">
|
||||||
|
<widget class="Gtk.VBox" id="dialog_VBox">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="Events">ButtonPressMask</property>
|
||||||
|
<property name="BorderWidth">2</property>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.VBox" id="vbox2">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<child>
|
||||||
|
<placeholder />
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder />
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.VBox" id="vbox3">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.HBox" id="hbox1">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Label" id="label1">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="Xalign">1</property>
|
||||||
|
<property name="LabelProp" translatable="yes">Grid server URL: </property>
|
||||||
|
<property name="Justify">Right</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">0</property>
|
||||||
|
<property name="AutoSize">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Entry" id="entry1">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="CanFocus">True</property>
|
||||||
|
<property name="Text" translatable="yes">http://gridserver:8001</property>
|
||||||
|
<property name="IsEditable">True</property>
|
||||||
|
<property name="MaxLength">255</property>
|
||||||
|
<property name="InvisibleChar">•</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">1</property>
|
||||||
|
<property name="AutoSize">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder />
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">0</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.HBox" id="hbox2">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Label" id="label2">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="Xalign">1</property>
|
||||||
|
<property name="LabelProp" translatable="yes">Username:</property>
|
||||||
|
<property name="Justify">Right</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">0</property>
|
||||||
|
<property name="AutoSize">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Entry" id="entry2">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="CanFocus">True</property>
|
||||||
|
<property name="IsEditable">True</property>
|
||||||
|
<property name="InvisibleChar">•</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">1</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder />
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">1</property>
|
||||||
|
<property name="AutoSize">False</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.HBox" id="hbox3">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Label" id="label3">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="Xalign">1</property>
|
||||||
|
<property name="LabelProp" translatable="yes">Password:</property>
|
||||||
|
<property name="Justify">Right</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">0</property>
|
||||||
|
<property name="AutoSize">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Entry" id="entry3">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="CanFocus">True</property>
|
||||||
|
<property name="IsEditable">True</property>
|
||||||
|
<property name="InvisibleChar">•</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">1</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder />
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">2</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">2</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">0</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
<child internal-child="ActionArea">
|
||||||
|
<widget class="Gtk.HButtonBox" id="OpenGridServices.Manager.ConnectToGridServerDialog_ActionArea">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="Events">ButtonPressMask</property>
|
||||||
|
<property name="Spacing">6</property>
|
||||||
|
<property name="BorderWidth">5</property>
|
||||||
|
<property name="Size">2</property>
|
||||||
|
<property name="LayoutStyle">End</property>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Button" id="button2">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="CanDefault">True</property>
|
||||||
|
<property name="CanFocus">True</property>
|
||||||
|
<property name="Type">TextAndIcon</property>
|
||||||
|
<property name="Icon">stock:gtk-apply Menu</property>
|
||||||
|
<property name="Label" translatable="yes">Connect</property>
|
||||||
|
<property name="UseUnderline">True</property>
|
||||||
|
<property name="IsDialogButton">True</property>
|
||||||
|
<property name="ResponseId">-5</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Button" id="button8">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="CanDefault">True</property>
|
||||||
|
<property name="CanFocus">True</property>
|
||||||
|
<property name="Type">TextAndIcon</property>
|
||||||
|
<property name="Icon">stock:gtk-cancel Menu</property>
|
||||||
|
<property name="Label" translatable="yes">Cancel</property>
|
||||||
|
<property name="UseUnderline">True</property>
|
||||||
|
<property name="IsDialogButton">True</property>
|
||||||
|
<property name="ResponseId">-6</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">1</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</stetic-interface>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue