diff options
Diffstat (limited to 'OpenGridServices')
79 files changed, 0 insertions, 9696 deletions
diff --git a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Config/GridConfigDb4o/AssemblyInfo.cs deleted file mode 100644 index c9701d6..0000000 --- a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/AssemblyInfo.cs +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System.Reflection; | ||
29 | using System.Runtime.CompilerServices; | ||
30 | using System.Runtime.InteropServices; | ||
31 | |||
32 | // Information about this assembly is defined by the following | ||
33 | // attributes. | ||
34 | // | ||
35 | // change them to the information which is associated with the assembly | ||
36 | // you compile. | ||
37 | |||
38 | [assembly: AssemblyTitle("GridConfig")] | ||
39 | [assembly: AssemblyDescription("")] | ||
40 | [assembly: AssemblyConfiguration("")] | ||
41 | [assembly: AssemblyCompany("")] | ||
42 | [assembly: AssemblyProduct("GridConfig")] | ||
43 | [assembly: AssemblyCopyright("")] | ||
44 | [assembly: AssemblyTrademark("")] | ||
45 | [assembly: AssemblyCulture("")] | ||
46 | |||
47 | // This sets the default COM visibility of types in the assembly to invisible. | ||
48 | // If you need to expose a type to COM, use [ComVisible(true)] on that type. | ||
49 | [assembly: ComVisible(false)] | ||
50 | |||
51 | // The assembly version has following format : | ||
52 | // | ||
53 | // Major.Minor.Build.Revision | ||
54 | // | ||
55 | // You can specify all values by your own or you can build default build and revision | ||
56 | // numbers with the '*' character (the default): | ||
57 | |||
58 | [assembly: AssemblyVersion("1.0.*")] | ||
diff --git a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/DbGridConfig.cs b/OpenGridServices/OpenGrid.Config/GridConfigDb4o/DbGridConfig.cs deleted file mode 100644 index 2218004..0000000 --- a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/DbGridConfig.cs +++ /dev/null | |||
@@ -1,161 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using OpenSim.Framework.Console; | ||
31 | using OpenSim.Framework.Interfaces; | ||
32 | using Db4objects.Db4o; | ||
33 | |||
34 | namespace OpenGrid.Config.GridConfigDb4o | ||
35 | { | ||
36 | /// <summary> | ||
37 | /// A grid configuration interface for returning the DB4o Config Provider | ||
38 | /// </summary> | ||
39 | public class Db40ConfigPlugin: IGridConfig | ||
40 | { | ||
41 | /// <summary> | ||
42 | /// Loads and returns a configuration objeect | ||
43 | /// </summary> | ||
44 | /// <returns>A grid configuration object</returns> | ||
45 | public GridConfig GetConfigObject() | ||
46 | { | ||
47 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Loading Db40Config dll"); | ||
48 | return ( new DbGridConfig()); | ||
49 | } | ||
50 | } | ||
51 | |||
52 | /// <summary> | ||
53 | /// A DB4o based Gridserver configuration object | ||
54 | /// </summary> | ||
55 | public class DbGridConfig : GridConfig | ||
56 | { | ||
57 | /// <summary> | ||
58 | /// The DB4o Database | ||
59 | /// </summary> | ||
60 | private IObjectContainer db; | ||
61 | |||
62 | /// <summary> | ||
63 | /// User configuration for the Grid Config interfaces | ||
64 | /// </summary> | ||
65 | public void LoadDefaults() { | ||
66 | OpenSim.Framework.Console.MainLog.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); | ||
67 | |||
68 | // About the grid options | ||
69 | this.GridOwner = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Grid owner", "OGS development team"); | ||
70 | |||
71 | // Asset Options | ||
72 | this.DefaultAssetServer = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default asset server","http://127.0.0.1:8003/"); | ||
73 | this.AssetSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to asset server","null"); | ||
74 | this.AssetRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from asset server","null"); | ||
75 | |||
76 | // User Server Options | ||
77 | this.DefaultUserServer = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default user server","http://127.0.0.1:8002/"); | ||
78 | this.UserSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to user server","null"); | ||
79 | this.UserRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from user server","null"); | ||
80 | |||
81 | // Region Server Options | ||
82 | this.SimSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to sims","null"); | ||
83 | this.SimRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from sims","null"); | ||
84 | } | ||
85 | |||
86 | /// <summary> | ||
87 | /// Initialises a new configuration object | ||
88 | /// </summary> | ||
89 | public override void InitConfig() { | ||
90 | try { | ||
91 | // Perform Db4o initialisation | ||
92 | db = Db4oFactory.OpenFile("opengrid.yap"); | ||
93 | |||
94 | // Locate the grid configuration object | ||
95 | IObjectSet result = db.Get(typeof(DbGridConfig)); | ||
96 | // Found? | ||
97 | if(result.Count==1) { | ||
98 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Config.cs:InitConfig() - Found a GridConfig object in the local database, loading"); | ||
99 | foreach (DbGridConfig cfg in result) { | ||
100 | // Import each setting into this class | ||
101 | // Grid Settings | ||
102 | this.GridOwner=cfg.GridOwner; | ||
103 | // Asset Settings | ||
104 | this.DefaultAssetServer=cfg.DefaultAssetServer; | ||
105 | this.AssetSendKey=cfg.AssetSendKey; | ||
106 | this.AssetRecvKey=cfg.AssetRecvKey; | ||
107 | // User Settings | ||
108 | this.DefaultUserServer=cfg.DefaultUserServer; | ||
109 | this.UserSendKey=cfg.UserSendKey; | ||
110 | this.UserRecvKey=cfg.UserRecvKey; | ||
111 | // Region Settings | ||
112 | this.SimSendKey=cfg.SimSendKey; | ||
113 | this.SimRecvKey=cfg.SimRecvKey; | ||
114 | } | ||
115 | // Create a new configuration object from this class | ||
116 | } else { | ||
117 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); | ||
118 | |||
119 | // Load default settings into this class | ||
120 | LoadDefaults(); | ||
121 | |||
122 | // Saves to the database file... | ||
123 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Writing out default settings to local database"); | ||
124 | db.Set(this); | ||
125 | |||
126 | // Closes file locks | ||
127 | db.Close(); | ||
128 | } | ||
129 | } catch(Exception e) { | ||
130 | OpenSim.Framework.Console.MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); | ||
131 | OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); | ||
132 | } | ||
133 | |||
134 | // Grid Settings | ||
135 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Grid settings loaded:"); | ||
136 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Grid owner: " + this.GridOwner); | ||
137 | |||
138 | // Asset Settings | ||
139 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Default asset server: " + this.DefaultAssetServer); | ||
140 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to send to asset server: " + this.AssetSendKey); | ||
141 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to expect from asset server: " + this.AssetRecvKey); | ||
142 | |||
143 | // User Settings | ||
144 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Default user server: " + this.DefaultUserServer); | ||
145 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to send to user server: " + this.UserSendKey); | ||
146 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to expect from user server: " + this.UserRecvKey); | ||
147 | |||
148 | // Region Settings | ||
149 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to send to sims: " + this.SimSendKey); | ||
150 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to expect from sims: " + this.SimRecvKey); | ||
151 | } | ||
152 | |||
153 | /// <summary> | ||
154 | /// Closes down the database and releases filesystem locks | ||
155 | /// </summary> | ||
156 | public void Shutdown() { | ||
157 | db.Close(); | ||
158 | } | ||
159 | } | ||
160 | |||
161 | } | ||
diff --git a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.csproj b/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.csproj deleted file mode 100644 index ddb48af..0000000 --- a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.csproj +++ /dev/null | |||
@@ -1,107 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{B0027747-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenGrid.Config.GridConfigDb4o</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Library</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenGrid.Config.GridConfigDb4o</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>False</Optimize> | ||
35 | <OutputPath>..\..\..\bin\</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>True</Optimize> | ||
53 | <OutputPath>..\..\..\bin\</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="Db4objects.Db4o.dll" > | ||
62 | <HintPath>..\..\..\bin\Db4objects.Db4o.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="libsecondlife.dll" > | ||
66 | <HintPath>..\..\..\bin\libsecondlife.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="OpenSim.Framework" > | ||
70 | <HintPath>OpenSim.Framework.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="OpenSim.Framework.Console" > | ||
74 | <HintPath>OpenSim.Framework.Console.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | <Reference Include="System" > | ||
78 | <HintPath>System.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | <Reference Include="System.Data.dll" > | ||
82 | <HintPath>..\..\..\bin\System.Data.dll</HintPath> | ||
83 | <Private>False</Private> | ||
84 | </Reference> | ||
85 | <Reference Include="System.Xml" > | ||
86 | <HintPath>System.Xml.dll</HintPath> | ||
87 | <Private>False</Private> | ||
88 | </Reference> | ||
89 | </ItemGroup> | ||
90 | <ItemGroup> | ||
91 | </ItemGroup> | ||
92 | <ItemGroup> | ||
93 | <Compile Include="AssemblyInfo.cs"> | ||
94 | <SubType>Code</SubType> | ||
95 | </Compile> | ||
96 | <Compile Include="DbGridConfig.cs"> | ||
97 | <SubType>Code</SubType> | ||
98 | </Compile> | ||
99 | </ItemGroup> | ||
100 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
101 | <PropertyGroup> | ||
102 | <PreBuildEvent> | ||
103 | </PreBuildEvent> | ||
104 | <PostBuildEvent> | ||
105 | </PostBuildEvent> | ||
106 | </PropertyGroup> | ||
107 | </Project> | ||
diff --git a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build b/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build deleted file mode 100644 index 075593b..0000000 --- a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | <?xml version="1.0" ?> | ||
2 | <project name="OpenGrid.Config.GridConfigDb4o" default="build"> | ||
3 | <target name="build"> | ||
4 | <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> | ||
5 | <mkdir dir="${project::get-base-directory()}/${build.dir}" /> | ||
6 | <copy todir="${project::get-base-directory()}/${build.dir}"> | ||
7 | <fileset basedir="${project::get-base-directory()}"> | ||
8 | </fileset> | ||
9 | </copy> | ||
10 | <csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll"> | ||
11 | <resources prefix="OpenGrid.Config.GridConfigDb4o" dynamicprefix="true" > | ||
12 | </resources> | ||
13 | <sources failonempty="true"> | ||
14 | <include name="AssemblyInfo.cs" /> | ||
15 | <include name="DbGridConfig.cs" /> | ||
16 | </sources> | ||
17 | <references basedir="${project::get-base-directory()}"> | ||
18 | <lib> | ||
19 | <include name="${project::get-base-directory()}" /> | ||
20 | <include name="${project::get-base-directory()}/${build.dir}" /> | ||
21 | </lib> | ||
22 | <include name="../../../bin/Db4objects.Db4o.dll" /> | ||
23 | <include name="../../../bin/libsecondlife.dll" /> | ||
24 | <include name="../../../bin/OpenSim.Framework.dll" /> | ||
25 | <include name="../../../bin/OpenSim.Framework.Console.dll" /> | ||
26 | <include name="System.dll" /> | ||
27 | <include name="System.Data.dll.dll" /> | ||
28 | <include name="System.Xml.dll" /> | ||
29 | </references> | ||
30 | </csc> | ||
31 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" /> | ||
32 | <mkdir dir="${project::get-base-directory()}/../../../bin/"/> | ||
33 | <copy todir="${project::get-base-directory()}/../../../bin/"> | ||
34 | <fileset basedir="${project::get-base-directory()}/${build.dir}/" > | ||
35 | <include name="*.dll"/> | ||
36 | <include name="*.exe"/> | ||
37 | </fileset> | ||
38 | </copy> | ||
39 | </target> | ||
40 | <target name="clean"> | ||
41 | <delete dir="${bin.dir}" failonerror="false" /> | ||
42 | <delete dir="${obj.dir}" failonerror="false" /> | ||
43 | </target> | ||
44 | <target name="doc" description="Creates documentation."> | ||
45 | </target> | ||
46 | </project> | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs deleted file mode 100644 index 1dac4bd..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs +++ /dev/null | |||
@@ -1,192 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | using OpenGrid.Framework.Data; | ||
32 | |||
33 | namespace OpenGrid.Framework.Data.MSSQL | ||
34 | { | ||
35 | /// <summary> | ||
36 | /// A grid data interface for Microsoft SQL Server | ||
37 | /// </summary> | ||
38 | public class SqlGridData : IGridData | ||
39 | { | ||
40 | /// <summary> | ||
41 | /// Database manager | ||
42 | /// </summary> | ||
43 | private MSSqlManager database; | ||
44 | |||
45 | /// <summary> | ||
46 | /// Initialises the Grid Interface | ||
47 | /// </summary> | ||
48 | public void Initialise() | ||
49 | { | ||
50 | database = new MSSqlManager("localhost", "db", "user", "password", "false"); | ||
51 | } | ||
52 | |||
53 | /// <summary> | ||
54 | /// Shuts down the grid interface | ||
55 | /// </summary> | ||
56 | public void Close() | ||
57 | { | ||
58 | database.Close(); | ||
59 | } | ||
60 | |||
61 | /// <summary> | ||
62 | /// Returns the storage system name | ||
63 | /// </summary> | ||
64 | /// <returns>A string containing the storage system name</returns> | ||
65 | public string getName() | ||
66 | { | ||
67 | return "Sql OpenGridData"; | ||
68 | } | ||
69 | |||
70 | /// <summary> | ||
71 | /// Returns the storage system version | ||
72 | /// </summary> | ||
73 | /// <returns>A string containing the storage system version</returns> | ||
74 | public string getVersion() | ||
75 | { | ||
76 | return "0.1"; | ||
77 | } | ||
78 | |||
79 | /// <summary> | ||
80 | /// Returns a list of regions within the specified ranges | ||
81 | /// </summary> | ||
82 | /// <param name="a">minimum X coordinate</param> | ||
83 | /// <param name="b">minimum Y coordinate</param> | ||
84 | /// <param name="c">maximum X coordinate</param> | ||
85 | /// <param name="d">maximum Y coordinate</param> | ||
86 | /// <returns>An array of region profiles</returns> | ||
87 | public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d) | ||
88 | { | ||
89 | return null; | ||
90 | } | ||
91 | |||
92 | /// <summary> | ||
93 | /// Returns a sim profile from it's location | ||
94 | /// </summary> | ||
95 | /// <param name="handle">Region location handle</param> | ||
96 | /// <returns>Sim profile</returns> | ||
97 | public SimProfileData GetProfileByHandle(ulong handle) | ||
98 | { | ||
99 | Dictionary<string, string> param = new Dictionary<string, string>(); | ||
100 | param["handle"] = handle.ToString(); | ||
101 | |||
102 | System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param); | ||
103 | System.Data.IDataReader reader = result.ExecuteReader(); | ||
104 | |||
105 | SimProfileData row = database.getRow(reader); | ||
106 | reader.Close(); | ||
107 | result.Dispose(); | ||
108 | |||
109 | return row; | ||
110 | } | ||
111 | |||
112 | /// <summary> | ||
113 | /// Returns a sim profile from it's UUID | ||
114 | /// </summary> | ||
115 | /// <param name="uuid">The region UUID</param> | ||
116 | /// <returns>The sim profile</returns> | ||
117 | public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid) | ||
118 | { | ||
119 | Dictionary<string, string> param = new Dictionary<string, string>(); | ||
120 | param["uuid"] = uuid.ToStringHyphenated(); | ||
121 | |||
122 | System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param); | ||
123 | System.Data.IDataReader reader = result.ExecuteReader(); | ||
124 | |||
125 | SimProfileData row = database.getRow(reader); | ||
126 | reader.Close(); | ||
127 | result.Dispose(); | ||
128 | |||
129 | return row; | ||
130 | } | ||
131 | |||
132 | /// <summary> | ||
133 | /// Adds a new specified region to the database | ||
134 | /// </summary> | ||
135 | /// <param name="profile">The profile to add</param> | ||
136 | /// <returns>A dataresponse enum indicating success</returns> | ||
137 | public DataResponse AddProfile(SimProfileData profile) | ||
138 | { | ||
139 | if (database.insertRow(profile)) | ||
140 | { | ||
141 | return DataResponse.RESPONSE_OK; | ||
142 | } | ||
143 | else | ||
144 | { | ||
145 | return DataResponse.RESPONSE_ERROR; | ||
146 | } | ||
147 | } | ||
148 | |||
149 | /// <summary> | ||
150 | /// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret. | ||
151 | /// </summary> | ||
152 | /// <param name="uuid">The UUID of the challenger</param> | ||
153 | /// <param name="handle">The attempted regionHandle of the challenger</param> | ||
154 | /// <param name="authkey">The secret</param> | ||
155 | /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns> | ||
156 | public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey) | ||
157 | { | ||
158 | bool throwHissyFit = false; // Should be true by 1.0 | ||
159 | |||
160 | if (throwHissyFit) | ||
161 | throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential."); | ||
162 | |||
163 | SimProfileData data = GetProfileByLLUUID(uuid); | ||
164 | |||
165 | return (handle == data.regionHandle && authkey == data.regionSecret); | ||
166 | } | ||
167 | |||
168 | /// <summary> | ||
169 | /// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region | ||
170 | /// </summary> | ||
171 | /// <remarks>This requires a security audit.</remarks> | ||
172 | /// <param name="uuid"></param> | ||
173 | /// <param name="handle"></param> | ||
174 | /// <param name="authhash"></param> | ||
175 | /// <param name="challenge"></param> | ||
176 | /// <returns></returns> | ||
177 | public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authhash, string challenge) | ||
178 | { | ||
179 | System.Security.Cryptography.SHA512Managed HashProvider = new System.Security.Cryptography.SHA512Managed(); | ||
180 | System.Text.ASCIIEncoding TextProvider = new ASCIIEncoding(); | ||
181 | |||
182 | byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge); | ||
183 | byte[] hash = HashProvider.ComputeHash(stream); | ||
184 | return false; | ||
185 | } | ||
186 | public ReservationData GetReservationAtPoint(uint x, uint y) | ||
187 | { | ||
188 | return null; | ||
189 | } | ||
190 | } | ||
191 | |||
192 | } | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs deleted file mode 100644 index 475a3e7..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs +++ /dev/null | |||
@@ -1,214 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | using System.Data; | ||
32 | |||
33 | using System.Data.SqlClient; | ||
34 | |||
35 | using OpenGrid.Framework.Data; | ||
36 | |||
37 | namespace OpenGrid.Framework.Data.MSSQL | ||
38 | { | ||
39 | /// <summary> | ||
40 | /// A management class for the MS SQL Storage Engine | ||
41 | /// </summary> | ||
42 | class MSSqlManager | ||
43 | { | ||
44 | /// <summary> | ||
45 | /// The database connection object | ||
46 | /// </summary> | ||
47 | IDbConnection dbcon; | ||
48 | |||
49 | /// <summary> | ||
50 | /// Initialises and creates a new Sql connection and maintains it. | ||
51 | /// </summary> | ||
52 | /// <param name="hostname">The Sql server being connected to</param> | ||
53 | /// <param name="database">The name of the Sql database being used</param> | ||
54 | /// <param name="username">The username logging into the database</param> | ||
55 | /// <param name="password">The password for the user logging in</param> | ||
56 | /// <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> | ||
57 | public MSSqlManager(string hostname, string database, string username, string password, string cpooling) | ||
58 | { | ||
59 | try | ||
60 | { | ||
61 | string connectionString = "Server=" + hostname + ";Database=" + database + ";User ID=" + username + ";Password=" + password + ";Pooling=" + cpooling + ";"; | ||
62 | dbcon = new SqlConnection(connectionString); | ||
63 | |||
64 | dbcon.Open(); | ||
65 | } | ||
66 | catch (Exception e) | ||
67 | { | ||
68 | throw new Exception("Error initialising Sql Database: " + e.ToString()); | ||
69 | } | ||
70 | } | ||
71 | |||
72 | /// <summary> | ||
73 | /// Shuts down the database connection | ||
74 | /// </summary> | ||
75 | public void Close() | ||
76 | { | ||
77 | dbcon.Close(); | ||
78 | dbcon = null; | ||
79 | } | ||
80 | |||
81 | /// <summary> | ||
82 | /// Runs a query with protection against SQL Injection by using parameterised input. | ||
83 | /// </summary> | ||
84 | /// <param name="sql">The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y</param> | ||
85 | /// <param name="parameters">The parameters - index so that @y is indexed as 'y'</param> | ||
86 | /// <returns>A Sql DB Command</returns> | ||
87 | public IDbCommand Query(string sql, Dictionary<string, string> parameters) | ||
88 | { | ||
89 | SqlCommand dbcommand = (SqlCommand)dbcon.CreateCommand(); | ||
90 | dbcommand.CommandText = sql; | ||
91 | foreach (KeyValuePair<string, string> param in parameters) | ||
92 | { | ||
93 | dbcommand.Parameters.AddWithValue(param.Key, param.Value); | ||
94 | } | ||
95 | |||
96 | return (IDbCommand)dbcommand; | ||
97 | } | ||
98 | |||
99 | /// <summary> | ||
100 | /// Runs a database reader object and returns a region row | ||
101 | /// </summary> | ||
102 | /// <param name="reader">An active database reader</param> | ||
103 | /// <returns>A region row</returns> | ||
104 | public SimProfileData getRow(IDataReader reader) | ||
105 | { | ||
106 | SimProfileData regionprofile = new SimProfileData(); | ||
107 | |||
108 | if (reader.Read()) | ||
109 | { | ||
110 | // Region Main | ||
111 | regionprofile.regionHandle = (ulong)reader["regionHandle"]; | ||
112 | regionprofile.regionName = (string)reader["regionName"]; | ||
113 | regionprofile.UUID = new libsecondlife.LLUUID((string)reader["uuid"]); | ||
114 | |||
115 | // Secrets | ||
116 | regionprofile.regionRecvKey = (string)reader["regionRecvKey"]; | ||
117 | regionprofile.regionSecret = (string)reader["regionSecret"]; | ||
118 | regionprofile.regionSendKey = (string)reader["regionSendKey"]; | ||
119 | |||
120 | // Region Server | ||
121 | regionprofile.regionDataURI = (string)reader["regionDataURI"]; | ||
122 | regionprofile.regionOnline = false; // Needs to be pinged before this can be set. | ||
123 | regionprofile.serverIP = (string)reader["serverIP"]; | ||
124 | regionprofile.serverPort = (uint)reader["serverPort"]; | ||
125 | regionprofile.serverURI = (string)reader["serverURI"]; | ||
126 | |||
127 | // Location | ||
128 | regionprofile.regionLocX = (uint)((int)reader["locX"]); | ||
129 | regionprofile.regionLocY = (uint)((int)reader["locY"]); | ||
130 | regionprofile.regionLocZ = (uint)((int)reader["locZ"]); | ||
131 | |||
132 | // Neighbours - 0 = No Override | ||
133 | regionprofile.regionEastOverrideHandle = (ulong)reader["eastOverrideHandle"]; | ||
134 | regionprofile.regionWestOverrideHandle = (ulong)reader["westOverrideHandle"]; | ||
135 | regionprofile.regionSouthOverrideHandle = (ulong)reader["southOverrideHandle"]; | ||
136 | regionprofile.regionNorthOverrideHandle = (ulong)reader["northOverrideHandle"]; | ||
137 | |||
138 | // Assets | ||
139 | regionprofile.regionAssetURI = (string)reader["regionAssetURI"]; | ||
140 | regionprofile.regionAssetRecvKey = (string)reader["regionAssetRecvKey"]; | ||
141 | regionprofile.regionAssetSendKey = (string)reader["regionAssetSendKey"]; | ||
142 | |||
143 | // Userserver | ||
144 | regionprofile.regionUserURI = (string)reader["regionUserURI"]; | ||
145 | regionprofile.regionUserRecvKey = (string)reader["regionUserRecvKey"]; | ||
146 | regionprofile.regionUserSendKey = (string)reader["regionUserSendKey"]; | ||
147 | } | ||
148 | else | ||
149 | { | ||
150 | throw new Exception("No rows to return"); | ||
151 | } | ||
152 | return regionprofile; | ||
153 | } | ||
154 | |||
155 | /// <summary> | ||
156 | /// Creates a new region in the database | ||
157 | /// </summary> | ||
158 | /// <param name="profile">The region profile to insert</param> | ||
159 | /// <returns>Successful?</returns> | ||
160 | public bool insertRow(SimProfileData profile) | ||
161 | { | ||
162 | string sql = "REPLACE INTO regions VALUES (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, "; | ||
163 | sql += "serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, "; | ||
164 | sql += "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey) VALUES "; | ||
165 | |||
166 | sql += "(@regionHandle, @regionName, @uuid, @regionRecvKey, @regionSecret, @regionSendKey, @regionDataURI, "; | ||
167 | sql += "@serverIP, @serverPort, @serverURI, @locX, @locY, @locZ, @eastOverrideHandle, @westOverrideHandle, @southOverrideHandle, @northOverrideHandle, @regionAssetURI, @regionAssetRecvKey, "; | ||
168 | sql += "@regionAssetSendKey, @regionUserURI, @regionUserRecvKey, @regionUserSendKey);"; | ||
169 | |||
170 | Dictionary<string, string> parameters = new Dictionary<string, string>(); | ||
171 | |||
172 | parameters["regionHandle"] = profile.regionHandle.ToString(); | ||
173 | parameters["regionName"] = profile.regionName; | ||
174 | parameters["uuid"] = profile.UUID.ToString(); | ||
175 | parameters["regionRecvKey"] = profile.regionRecvKey; | ||
176 | parameters["regionSendKey"] = profile.regionSendKey; | ||
177 | parameters["regionDataURI"] = profile.regionDataURI; | ||
178 | parameters["serverIP"] = profile.serverIP; | ||
179 | parameters["serverPort"] = profile.serverPort.ToString(); | ||
180 | parameters["serverURI"] = profile.serverURI; | ||
181 | parameters["locX"] = profile.regionLocX.ToString(); | ||
182 | parameters["locY"] = profile.regionLocY.ToString(); | ||
183 | parameters["locZ"] = profile.regionLocZ.ToString(); | ||
184 | parameters["eastOverrideHandle"] = profile.regionEastOverrideHandle.ToString(); | ||
185 | parameters["westOverrideHandle"] = profile.regionWestOverrideHandle.ToString(); | ||
186 | parameters["northOverrideHandle"] = profile.regionNorthOverrideHandle.ToString(); | ||
187 | parameters["southOverrideHandle"] = profile.regionSouthOverrideHandle.ToString(); | ||
188 | parameters["regionAssetURI"] = profile.regionAssetURI; | ||
189 | parameters["regionAssetRecvKey"] = profile.regionAssetRecvKey; | ||
190 | parameters["regionAssetSendKey"] = profile.regionAssetSendKey; | ||
191 | parameters["regionUserURI"] = profile.regionUserURI; | ||
192 | parameters["regionUserRecvKey"] = profile.regionUserRecvKey; | ||
193 | parameters["regionUserSendKey"] = profile.regionUserSendKey; | ||
194 | |||
195 | bool returnval = false; | ||
196 | |||
197 | try | ||
198 | { | ||
199 | IDbCommand result = Query(sql, parameters); | ||
200 | |||
201 | if (result.ExecuteNonQuery() == 1) | ||
202 | returnval = true; | ||
203 | |||
204 | result.Dispose(); | ||
205 | } | ||
206 | catch (Exception e) | ||
207 | { | ||
208 | return false; | ||
209 | } | ||
210 | |||
211 | return returnval; | ||
212 | } | ||
213 | } | ||
214 | } | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.csproj b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.csproj deleted file mode 100644 index 64bb78e..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.csproj +++ /dev/null | |||
@@ -1,104 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{0A563AC1-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenGrid.Framework.Data.MSSQL</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Library</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenGrid.Framework.Data.MSSQL</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>False</Optimize> | ||
35 | <OutputPath>..\..\bin\</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>True</Optimize> | ||
53 | <OutputPath>..\..\bin\</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="libsecondlife.dll" > | ||
62 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="System" > | ||
66 | <HintPath>System.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="System.Data" > | ||
70 | <HintPath>System.Data.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="System.Xml" > | ||
74 | <HintPath>System.Xml.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | </ItemGroup> | ||
78 | <ItemGroup> | ||
79 | <ProjectReference Include="..\..\Common\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj"> | ||
80 | <Name>OpenGrid.Framework.Data</Name> | ||
81 | <Project>{62CDF671-0000-0000-0000-000000000000}</Project> | ||
82 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
83 | <Private>False</Private> | ||
84 | </ProjectReference> | ||
85 | </ItemGroup> | ||
86 | <ItemGroup> | ||
87 | <Compile Include="MSSQLGridData.cs"> | ||
88 | <SubType>Code</SubType> | ||
89 | </Compile> | ||
90 | <Compile Include="MSSQLManager.cs"> | ||
91 | <SubType>Code</SubType> | ||
92 | </Compile> | ||
93 | <Compile Include="Properties\AssemblyInfo.cs"> | ||
94 | <SubType>Code</SubType> | ||
95 | </Compile> | ||
96 | </ItemGroup> | ||
97 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
98 | <PropertyGroup> | ||
99 | <PreBuildEvent> | ||
100 | </PreBuildEvent> | ||
101 | <PostBuildEvent> | ||
102 | </PostBuildEvent> | ||
103 | </PropertyGroup> | ||
104 | </Project> | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.dll.build b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.dll.build deleted file mode 100644 index 577da4b..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.dll.build +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | <?xml version="1.0" ?> | ||
2 | <project name="OpenGrid.Framework.Data.MSSQL" default="build"> | ||
3 | <target name="build"> | ||
4 | <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> | ||
5 | <mkdir dir="${project::get-base-directory()}/${build.dir}" /> | ||
6 | <copy todir="${project::get-base-directory()}/${build.dir}"> | ||
7 | <fileset basedir="${project::get-base-directory()}"> | ||
8 | </fileset> | ||
9 | </copy> | ||
10 | <csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll"> | ||
11 | <resources prefix="OpenGrid.Framework.Data.MSSQL" dynamicprefix="true" > | ||
12 | </resources> | ||
13 | <sources failonempty="true"> | ||
14 | <include name="MSSQLGridData.cs" /> | ||
15 | <include name="MSSQLManager.cs" /> | ||
16 | <include name="Properties/AssemblyInfo.cs" /> | ||
17 | </sources> | ||
18 | <references basedir="${project::get-base-directory()}"> | ||
19 | <lib> | ||
20 | <include name="${project::get-base-directory()}" /> | ||
21 | <include name="${project::get-base-directory()}/${build.dir}" /> | ||
22 | </lib> | ||
23 | <include name="../../bin/libsecondlife.dll" /> | ||
24 | <include name="../../bin/OpenGrid.Framework.Data.dll" /> | ||
25 | <include name="System.dll" /> | ||
26 | <include name="System.Data.dll" /> | ||
27 | <include name="System.Xml.dll" /> | ||
28 | </references> | ||
29 | </csc> | ||
30 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> | ||
31 | <mkdir dir="${project::get-base-directory()}/../../bin/"/> | ||
32 | <copy todir="${project::get-base-directory()}/../../bin/"> | ||
33 | <fileset basedir="${project::get-base-directory()}/${build.dir}/" > | ||
34 | <include name="*.dll"/> | ||
35 | <include name="*.exe"/> | ||
36 | </fileset> | ||
37 | </copy> | ||
38 | </target> | ||
39 | <target name="clean"> | ||
40 | <delete dir="${bin.dir}" failonerror="false" /> | ||
41 | <delete dir="${obj.dir}" failonerror="false" /> | ||
42 | </target> | ||
43 | <target name="doc" description="Creates documentation."> | ||
44 | </target> | ||
45 | </project> | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/Properties/AssemblyInfo.cs deleted file mode 100644 index bbe3cdf..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/Properties/AssemblyInfo.cs +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | using System.Reflection; | ||
2 | using System.Runtime.CompilerServices; | ||
3 | using System.Runtime.InteropServices; | ||
4 | |||
5 | // General Information about an assembly is controlled through the following | ||
6 | // set of attributes. Change these attribute values to modify the information | ||
7 | // associated with an assembly. | ||
8 | [assembly: AssemblyTitle("OpenGrid.Framework.Data.MSSQL")] | ||
9 | [assembly: AssemblyDescription("")] | ||
10 | [assembly: AssemblyConfiguration("")] | ||
11 | [assembly: AssemblyCompany("")] | ||
12 | [assembly: AssemblyProduct("OpenGrid.Framework.Data.MSSQL")] | ||
13 | [assembly: AssemblyCopyright("Copyright © 2007")] | ||
14 | [assembly: AssemblyTrademark("")] | ||
15 | [assembly: AssemblyCulture("")] | ||
16 | |||
17 | // Setting ComVisible to false makes the types in this assembly not visible | ||
18 | // to COM components. If you need to access a type in this assembly from | ||
19 | // COM, set the ComVisible attribute to true on that type. | ||
20 | [assembly: ComVisible(false)] | ||
21 | |||
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM | ||
23 | [assembly: Guid("0e1c1ca4-2cf2-4315-b0e7-432c02feea8a")] | ||
24 | |||
25 | // Version information for an assembly consists of the following four values: | ||
26 | // | ||
27 | // Major Version | ||
28 | // Minor Version | ||
29 | // Build Number | ||
30 | // Revision | ||
31 | // | ||
32 | // You can specify all the values or you can default the Revision and Build Numbers | ||
33 | // by using the '*' as shown below: | ||
34 | [assembly: AssemblyVersion("1.0.0.0")] | ||
35 | [assembly: AssemblyFileVersion("1.0.0.0")] | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs deleted file mode 100644 index 4d6cf63..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs +++ /dev/null | |||
@@ -1,285 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | using OpenGrid.Framework.Data; | ||
32 | |||
33 | namespace OpenGrid.Framework.Data.MySQL | ||
34 | { | ||
35 | /// <summary> | ||
36 | /// A MySQL Interface for the Grid Server | ||
37 | /// </summary> | ||
38 | public class MySQLGridData : IGridData | ||
39 | { | ||
40 | /// <summary> | ||
41 | /// MySQL Database Manager | ||
42 | /// </summary> | ||
43 | private MySQLManager database; | ||
44 | |||
45 | /// <summary> | ||
46 | /// Initialises the Grid Interface | ||
47 | /// </summary> | ||
48 | public void Initialise() | ||
49 | { | ||
50 | IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); | ||
51 | string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname"); | ||
52 | string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database"); | ||
53 | string settingUsername = GridDataMySqlFile.ParseFileReadValue("username"); | ||
54 | string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); | ||
55 | string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling"); | ||
56 | string settingPort = GridDataMySqlFile.ParseFileReadValue("port"); | ||
57 | |||
58 | database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort); | ||
59 | } | ||
60 | |||
61 | /// <summary> | ||
62 | /// Shuts down the grid interface | ||
63 | /// </summary> | ||
64 | public void Close() | ||
65 | { | ||
66 | database.Close(); | ||
67 | } | ||
68 | |||
69 | /// <summary> | ||
70 | /// Returns the plugin name | ||
71 | /// </summary> | ||
72 | /// <returns>Plugin name</returns> | ||
73 | public string getName() | ||
74 | { | ||
75 | return "MySql OpenGridData"; | ||
76 | } | ||
77 | |||
78 | /// <summary> | ||
79 | /// Returns the plugin version | ||
80 | /// </summary> | ||
81 | /// <returns>Plugin version</returns> | ||
82 | public string getVersion() | ||
83 | { | ||
84 | return "0.1"; | ||
85 | } | ||
86 | |||
87 | /// <summary> | ||
88 | /// Returns all the specified region profiles within coordates -- coordinates are inclusive | ||
89 | /// </summary> | ||
90 | /// <param name="xmin">Minimum X coordinate</param> | ||
91 | /// <param name="ymin">Minimum Y coordinate</param> | ||
92 | /// <param name="xmax">Maximum X coordinate</param> | ||
93 | /// <param name="ymax">Maximum Y coordinate</param> | ||
94 | /// <returns></returns> | ||
95 | public SimProfileData[] GetProfilesInRange(uint xmin, uint ymin, uint xmax, uint ymax) | ||
96 | { | ||
97 | try | ||
98 | { | ||
99 | lock (database) | ||
100 | { | ||
101 | Dictionary<string, string> param = new Dictionary<string, string>(); | ||
102 | param["?xmin"] = xmin.ToString(); | ||
103 | param["?ymin"] = ymin.ToString(); | ||
104 | param["?xmax"] = xmax.ToString(); | ||
105 | param["?ymax"] = ymax.ToString(); | ||
106 | |||
107 | System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE locX >= ?xmin AND locX <= ?xmax AND locY >= ?ymin AND locY <= ?ymax", param); | ||
108 | System.Data.IDataReader reader = result.ExecuteReader(); | ||
109 | |||
110 | SimProfileData row; | ||
111 | |||
112 | List<SimProfileData> rows = new List<SimProfileData>(); | ||
113 | |||
114 | while ((row = database.readSimRow(reader)) != null) | ||
115 | { | ||
116 | rows.Add(row); | ||
117 | } | ||
118 | reader.Close(); | ||
119 | result.Dispose(); | ||
120 | |||
121 | return rows.ToArray(); | ||
122 | |||
123 | } | ||
124 | } | ||
125 | catch (Exception e) | ||
126 | { | ||
127 | database.Reconnect(); | ||
128 | Console.WriteLine(e.ToString()); | ||
129 | return null; | ||
130 | } | ||
131 | } | ||
132 | |||
133 | /// <summary> | ||
134 | /// Returns a sim profile from it's location | ||
135 | /// </summary> | ||
136 | /// <param name="handle">Region location handle</param> | ||
137 | /// <returns>Sim profile</returns> | ||
138 | public SimProfileData GetProfileByHandle(ulong handle) | ||
139 | { | ||
140 | try | ||
141 | { | ||
142 | lock (database) | ||
143 | { | ||
144 | Dictionary<string, string> param = new Dictionary<string, string>(); | ||
145 | param["?handle"] = handle.ToString(); | ||
146 | |||
147 | System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE regionHandle = ?handle", param); | ||
148 | System.Data.IDataReader reader = result.ExecuteReader(); | ||
149 | |||
150 | SimProfileData row = database.readSimRow(reader); | ||
151 | reader.Close(); | ||
152 | result.Dispose(); | ||
153 | |||
154 | return row; | ||
155 | } | ||
156 | } | ||
157 | catch (Exception e) | ||
158 | { | ||
159 | database.Reconnect(); | ||
160 | Console.WriteLine(e.ToString()); | ||
161 | return null; | ||
162 | } | ||
163 | } | ||
164 | |||
165 | /// <summary> | ||
166 | /// Returns a sim profile from it's UUID | ||
167 | /// </summary> | ||
168 | /// <param name="uuid">The region UUID</param> | ||
169 | /// <returns>The sim profile</returns> | ||
170 | public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid) | ||
171 | { | ||
172 | try | ||
173 | { | ||
174 | lock (database) | ||
175 | { | ||
176 | Dictionary<string, string> param = new Dictionary<string, string>(); | ||
177 | param["?uuid"] = uuid.ToStringHyphenated(); | ||
178 | |||
179 | System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = ?uuid", param); | ||
180 | System.Data.IDataReader reader = result.ExecuteReader(); | ||
181 | |||
182 | SimProfileData row = database.readSimRow(reader); | ||
183 | reader.Close(); | ||
184 | result.Dispose(); | ||
185 | |||
186 | return row; | ||
187 | } | ||
188 | } | ||
189 | catch (Exception e) | ||
190 | { | ||
191 | database.Reconnect(); | ||
192 | Console.WriteLine(e.ToString()); | ||
193 | return null; | ||
194 | } | ||
195 | } | ||
196 | |||
197 | /// <summary> | ||
198 | /// Adds a new profile to the database | ||
199 | /// </summary> | ||
200 | /// <param name="profile">The profile to add</param> | ||
201 | /// <returns>Successful?</returns> | ||
202 | public DataResponse AddProfile(SimProfileData profile) | ||
203 | { | ||
204 | lock (database) | ||
205 | { | ||
206 | if (database.insertRegion(profile)) | ||
207 | { | ||
208 | return DataResponse.RESPONSE_OK; | ||
209 | } | ||
210 | else | ||
211 | { | ||
212 | return DataResponse.RESPONSE_ERROR; | ||
213 | } | ||
214 | } | ||
215 | } | ||
216 | |||
217 | /// <summary> | ||
218 | /// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret. | ||
219 | /// </summary> | ||
220 | /// <param name="uuid">The UUID of the challenger</param> | ||
221 | /// <param name="handle">The attempted regionHandle of the challenger</param> | ||
222 | /// <param name="authkey">The secret</param> | ||
223 | /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns> | ||
224 | public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey) | ||
225 | { | ||
226 | bool throwHissyFit = false; // Should be true by 1.0 | ||
227 | |||
228 | if (throwHissyFit) | ||
229 | throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential."); | ||
230 | |||
231 | SimProfileData data = GetProfileByLLUUID(uuid); | ||
232 | |||
233 | return (handle == data.regionHandle && authkey == data.regionSecret); | ||
234 | } | ||
235 | |||
236 | /// <summary> | ||
237 | /// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region | ||
238 | /// </summary> | ||
239 | /// <remarks>This requires a security audit.</remarks> | ||
240 | /// <param name="uuid"></param> | ||
241 | /// <param name="handle"></param> | ||
242 | /// <param name="authhash"></param> | ||
243 | /// <param name="challenge"></param> | ||
244 | /// <returns></returns> | ||
245 | public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authhash, string challenge) | ||
246 | { | ||
247 | System.Security.Cryptography.SHA512Managed HashProvider = new System.Security.Cryptography.SHA512Managed(); | ||
248 | System.Text.ASCIIEncoding TextProvider = new ASCIIEncoding(); | ||
249 | |||
250 | byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge); | ||
251 | byte[] hash = HashProvider.ComputeHash(stream); | ||
252 | |||
253 | return false; | ||
254 | } | ||
255 | |||
256 | public ReservationData GetReservationAtPoint(uint x, uint y) | ||
257 | { | ||
258 | try | ||
259 | { | ||
260 | lock (database) | ||
261 | { | ||
262 | Dictionary<string, string> param = new Dictionary<string, string>(); | ||
263 | param["?x"] = x.ToString(); | ||
264 | param["?y"] = y.ToString(); | ||
265 | System.Data.IDbCommand result = database.Query("SELECT * FROM reservations WHERE resXMin <= ?x AND resXMax >= ?x AND resYMin <= ?y AND resYMax >= ?y", param); | ||
266 | System.Data.IDataReader reader = result.ExecuteReader(); | ||
267 | |||
268 | ReservationData row = database.readReservationRow(reader); | ||
269 | reader.Close(); | ||
270 | result.Dispose(); | ||
271 | |||
272 | return row; | ||
273 | } | ||
274 | } | ||
275 | catch (Exception e) | ||
276 | { | ||
277 | database.Reconnect(); | ||
278 | Console.WriteLine(e.ToString()); | ||
279 | return null; | ||
280 | } | ||
281 | } | ||
282 | } | ||
283 | |||
284 | |||
285 | } | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLInventoryData.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLInventoryData.cs deleted file mode 100644 index fb429e4..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLInventoryData.cs +++ /dev/null | |||
@@ -1,309 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | using libsecondlife; | ||
32 | |||
33 | namespace OpenGrid.Framework.Data.MySQL | ||
34 | { | ||
35 | /// <summary> | ||
36 | /// A MySQL interface for the inventory server | ||
37 | /// </summary> | ||
38 | class MySQLInventoryData : IInventoryData | ||
39 | { | ||
40 | /// <summary> | ||
41 | /// The database manager | ||
42 | /// </summary> | ||
43 | public MySQLManager database; | ||
44 | |||
45 | /// <summary> | ||
46 | /// Loads and initialises this database plugin | ||
47 | /// </summary> | ||
48 | public void Initialise() | ||
49 | { | ||
50 | IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); | ||
51 | string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname"); | ||
52 | string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database"); | ||
53 | string settingUsername = GridDataMySqlFile.ParseFileReadValue("username"); | ||
54 | string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); | ||
55 | string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling"); | ||
56 | string settingPort = GridDataMySqlFile.ParseFileReadValue("port"); | ||
57 | |||
58 | database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort); | ||
59 | } | ||
60 | |||
61 | /// <summary> | ||
62 | /// The name of this DB provider | ||
63 | /// </summary> | ||
64 | /// <returns>Name of DB provider</returns> | ||
65 | public string getName() | ||
66 | { | ||
67 | return "MySQL Inventory Data Interface"; | ||
68 | } | ||
69 | |||
70 | /// <summary> | ||
71 | /// Closes this DB provider | ||
72 | /// </summary> | ||
73 | public void Close() | ||
74 | { | ||
75 | // Do nothing. | ||
76 | } | ||
77 | |||
78 | /// <summary> | ||
79 | /// Returns the version of this DB provider | ||
80 | /// </summary> | ||
81 | /// <returns>A string containing the DB provider</returns> | ||
82 | public string getVersion() | ||
83 | { | ||
84 | return "0.1"; | ||
85 | } | ||
86 | |||
87 | /// <summary> | ||
88 | /// Returns a list of items in a specified folder | ||
89 | /// </summary> | ||
90 | /// <param name="folderID">The folder to search</param> | ||
91 | /// <returns>A list containing inventory items</returns> | ||
92 | public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID) | ||
93 | { | ||
94 | try | ||
95 | { | ||
96 | lock (database) | ||
97 | { | ||
98 | Dictionary<string, string> param = new Dictionary<string, string>(); | ||
99 | param["?uuid"] = folderID.ToStringHyphenated(); | ||
100 | |||
101 | System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE parentFolderID = ?uuid", param); | ||
102 | System.Data.IDataReader reader = result.ExecuteReader(); | ||
103 | |||
104 | List<InventoryItemBase> items = database.readInventoryItems(reader); | ||
105 | |||
106 | reader.Close(); | ||
107 | result.Dispose(); | ||
108 | |||
109 | return items; | ||
110 | } | ||
111 | } | ||
112 | catch (Exception e) | ||
113 | { | ||
114 | database.Reconnect(); | ||
115 | Console.WriteLine(e.ToString()); | ||
116 | return null; | ||
117 | } | ||
118 | } | ||
119 | |||
120 | /// <summary> | ||
121 | /// Returns a list of the root folders within a users inventory | ||
122 | /// </summary> | ||
123 | /// <param name="user">The user whos inventory is to be searched</param> | ||
124 | /// <returns>A list of folder objects</returns> | ||
125 | public List<InventoryFolderBase> getUserRootFolders(LLUUID user) | ||
126 | { | ||
127 | try | ||
128 | { | ||
129 | lock (database) | ||
130 | { | ||
131 | Dictionary<string, string> param = new Dictionary<string, string>(); | ||
132 | param["?uuid"] = user.ToStringHyphenated(); | ||
133 | param["?zero"] = LLUUID.Zero.ToStringHyphenated(); | ||
134 | |||
135 | System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = ?zero AND agentID = ?uuid", param); | ||
136 | System.Data.IDataReader reader = result.ExecuteReader(); | ||
137 | |||
138 | List<InventoryFolderBase> items = database.readInventoryFolders(reader); | ||
139 | |||
140 | reader.Close(); | ||
141 | result.Dispose(); | ||
142 | |||
143 | return items; | ||
144 | } | ||
145 | } | ||
146 | catch (Exception e) | ||
147 | { | ||
148 | database.Reconnect(); | ||
149 | Console.WriteLine(e.ToString()); | ||
150 | return null; | ||
151 | } | ||
152 | } | ||
153 | |||
154 | /// <summary> | ||
155 | /// Returns a list of folders in a users inventory contained within the specified folder | ||
156 | /// </summary> | ||
157 | /// <param name="parentID">The folder to search</param> | ||
158 | /// <returns>A list of inventory folders</returns> | ||
159 | public List<InventoryFolderBase> getInventoryFolders(LLUUID parentID) | ||
160 | { | ||
161 | try | ||
162 | { | ||
163 | lock (database) | ||
164 | { | ||
165 | Dictionary<string, string> param = new Dictionary<string, string>(); | ||
166 | param["?uuid"] = parentID.ToStringHyphenated(); | ||
167 | |||
168 | System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE parentFolderID = ?uuid", param); | ||
169 | System.Data.IDataReader reader = result.ExecuteReader(); | ||
170 | |||
171 | List<InventoryFolderBase> items = database.readInventoryFolders(reader); | ||
172 | |||
173 | reader.Close(); | ||
174 | result.Dispose(); | ||
175 | |||
176 | return items; | ||
177 | } | ||
178 | } | ||
179 | catch (Exception e) | ||
180 | { | ||
181 | database.Reconnect(); | ||
182 | Console.WriteLine(e.ToString()); | ||
183 | return null; | ||
184 | } | ||
185 | } | ||
186 | |||
187 | /// <summary> | ||
188 | /// Returns a specified inventory item | ||
189 | /// </summary> | ||
190 | /// <param name="item">The item to return</param> | ||
191 | /// <returns>An inventory item</returns> | ||
192 | public InventoryItemBase getInventoryItem(LLUUID item) | ||
193 | { | ||
194 | try | ||
195 | { | ||
196 | lock (database) | ||
197 | { | ||
198 | Dictionary<string, string> param = new Dictionary<string, string>(); | ||
199 | param["?uuid"] = item.ToStringHyphenated(); | ||
200 | |||
201 | System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryitems WHERE inventoryID = ?uuid", param); | ||
202 | System.Data.IDataReader reader = result.ExecuteReader(); | ||
203 | |||
204 | List<InventoryItemBase> items = database.readInventoryItems(reader); | ||
205 | |||
206 | reader.Close(); | ||
207 | result.Dispose(); | ||
208 | |||
209 | if (items.Count > 0) | ||
210 | { | ||
211 | return items[0]; | ||
212 | } | ||
213 | else | ||
214 | { | ||
215 | return null; | ||
216 | } | ||
217 | } | ||
218 | } | ||
219 | catch (Exception e) | ||
220 | { | ||
221 | database.Reconnect(); | ||
222 | Console.WriteLine(e.ToString()); | ||
223 | return null; | ||
224 | } | ||
225 | } | ||
226 | |||
227 | /// <summary> | ||
228 | /// Returns a specified inventory folder | ||
229 | /// </summary> | ||
230 | /// <param name="folder">The folder to return</param> | ||
231 | /// <returns>A folder class</returns> | ||
232 | public InventoryFolderBase getInventoryFolder(LLUUID folder) | ||
233 | { | ||
234 | try | ||
235 | { | ||
236 | lock (database) | ||
237 | { | ||
238 | Dictionary<string, string> param = new Dictionary<string, string>(); | ||
239 | param["?uuid"] = folder.ToStringHyphenated(); | ||
240 | |||
241 | System.Data.IDbCommand result = database.Query("SELECT * FROM inventoryfolders WHERE folderID = ?uuid", param); | ||
242 | System.Data.IDataReader reader = result.ExecuteReader(); | ||
243 | |||
244 | List<InventoryFolderBase> items = database.readInventoryFolders(reader); | ||
245 | |||
246 | reader.Close(); | ||
247 | result.Dispose(); | ||
248 | |||
249 | if (items.Count > 0) | ||
250 | { | ||
251 | return items[0]; | ||
252 | } | ||
253 | else | ||
254 | { | ||
255 | return null; | ||
256 | } | ||
257 | } | ||
258 | } | ||
259 | catch (Exception e) | ||
260 | { | ||
261 | database.Reconnect(); | ||
262 | Console.WriteLine(e.ToString()); | ||
263 | return null; | ||
264 | } | ||
265 | } | ||
266 | |||
267 | /// <summary> | ||
268 | /// Adds a specified item to the database | ||
269 | /// </summary> | ||
270 | /// <param name="item">The inventory item</param> | ||
271 | public void addInventoryItem(InventoryItemBase item) | ||
272 | { | ||
273 | lock (database) | ||
274 | { | ||
275 | database.insertItem(item); | ||
276 | } | ||
277 | } | ||
278 | |||
279 | /// <summary> | ||
280 | /// Updates the specified inventory item | ||
281 | /// </summary> | ||
282 | /// <param name="item">Inventory item to update</param> | ||
283 | public void updateInventoryItem(InventoryItemBase item) | ||
284 | { | ||
285 | addInventoryItem(item); | ||
286 | } | ||
287 | |||
288 | /// <summary> | ||
289 | /// Creates a new inventory folder | ||
290 | /// </summary> | ||
291 | /// <param name="folder">Folder to create</param> | ||
292 | public void addInventoryFolder(InventoryFolderBase folder) | ||
293 | { | ||
294 | lock (database) | ||
295 | { | ||
296 | database.insertFolder(folder); | ||
297 | } | ||
298 | } | ||
299 | |||
300 | /// <summary> | ||
301 | /// Updates an inventory folder | ||
302 | /// </summary> | ||
303 | /// <param name="folder">Folder to update</param> | ||
304 | public void updateInventoryFolder(InventoryFolderBase folder) | ||
305 | { | ||
306 | addInventoryFolder(folder); | ||
307 | } | ||
308 | } | ||
309 | } | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLLogData.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLLogData.cs deleted file mode 100644 index c88b39f..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLLogData.cs +++ /dev/null | |||
@@ -1,107 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | |||
32 | namespace OpenGrid.Framework.Data.MySQL | ||
33 | { | ||
34 | /// <summary> | ||
35 | /// An interface to the log database for MySQL | ||
36 | /// </summary> | ||
37 | class MySQLLogData : ILogData | ||
38 | { | ||
39 | /// <summary> | ||
40 | /// The database manager | ||
41 | /// </summary> | ||
42 | public MySQLManager database; | ||
43 | |||
44 | /// <summary> | ||
45 | /// Artificial constructor called when the plugin is loaded | ||
46 | /// </summary> | ||
47 | public void Initialise() | ||
48 | { | ||
49 | IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); | ||
50 | string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname"); | ||
51 | string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database"); | ||
52 | string settingUsername = GridDataMySqlFile.ParseFileReadValue("username"); | ||
53 | string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); | ||
54 | string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling"); | ||
55 | string settingPort = GridDataMySqlFile.ParseFileReadValue("port"); | ||
56 | |||
57 | database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort); | ||
58 | } | ||
59 | |||
60 | /// <summary> | ||
61 | /// Saves a log item to the database | ||
62 | /// </summary> | ||
63 | /// <param name="serverDaemon">The daemon triggering the event</param> | ||
64 | /// <param name="target">The target of the action (region / agent UUID, etc)</param> | ||
65 | /// <param name="methodCall">The method call where the problem occured</param> | ||
66 | /// <param name="arguments">The arguments passed to the method</param> | ||
67 | /// <param name="priority">How critical is this?</param> | ||
68 | /// <param name="logMessage">The message to log</param> | ||
69 | public void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage) | ||
70 | { | ||
71 | try | ||
72 | { | ||
73 | database.insertLogRow(serverDaemon, target, methodCall, arguments, priority, logMessage); | ||
74 | } | ||
75 | catch (Exception e) | ||
76 | { | ||
77 | database.Reconnect(); | ||
78 | } | ||
79 | } | ||
80 | |||
81 | /// <summary> | ||
82 | /// Returns the name of this DB provider | ||
83 | /// </summary> | ||
84 | /// <returns>A string containing the DB provider name</returns> | ||
85 | public string getName() | ||
86 | { | ||
87 | return "MySQL Logdata Interface"; | ||
88 | } | ||
89 | |||
90 | /// <summary> | ||
91 | /// Closes the database provider | ||
92 | /// </summary> | ||
93 | public void Close() | ||
94 | { | ||
95 | // Do nothing. | ||
96 | } | ||
97 | |||
98 | /// <summary> | ||
99 | /// Returns the version of this DB provider | ||
100 | /// </summary> | ||
101 | /// <returns>A string containing the provider version</returns> | ||
102 | public string getVersion() | ||
103 | { | ||
104 | return "0.1"; | ||
105 | } | ||
106 | } | ||
107 | } | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs deleted file mode 100644 index 53b3bdd..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs +++ /dev/null | |||
@@ -1,609 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | using System.Data; | ||
32 | |||
33 | // MySQL Native | ||
34 | using MySql; | ||
35 | using MySql.Data; | ||
36 | using MySql.Data.Types; | ||
37 | using MySql.Data.MySqlClient; | ||
38 | |||
39 | using OpenGrid.Framework.Data; | ||
40 | |||
41 | namespace OpenGrid.Framework.Data.MySQL | ||
42 | { | ||
43 | /// <summary> | ||
44 | /// A MySQL Database manager | ||
45 | /// </summary> | ||
46 | class MySQLManager | ||
47 | { | ||
48 | /// <summary> | ||
49 | /// The database connection object | ||
50 | /// </summary> | ||
51 | IDbConnection dbcon; | ||
52 | /// <summary> | ||
53 | /// Connection string for ADO.net | ||
54 | /// </summary> | ||
55 | string connectionString; | ||
56 | |||
57 | /// <summary> | ||
58 | /// Initialises and creates a new MySQL connection and maintains it. | ||
59 | /// </summary> | ||
60 | /// <param name="hostname">The MySQL server being connected to</param> | ||
61 | /// <param name="database">The name of the MySQL database being used</param> | ||
62 | /// <param name="username">The username logging into the database</param> | ||
63 | /// <param name="password">The password for the user logging in</param> | ||
64 | /// <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> | ||
65 | public MySQLManager(string hostname, string database, string username, string password, string cpooling, string port) | ||
66 | { | ||
67 | try | ||
68 | { | ||
69 | connectionString = "Server=" + hostname + ";Port=" + port + ";Database=" + database + ";User ID=" + username + ";Password=" + password + ";Pooling=" + cpooling + ";"; | ||
70 | dbcon = new MySqlConnection(connectionString); | ||
71 | |||
72 | dbcon.Open(); | ||
73 | |||
74 | System.Console.WriteLine("MySQL connection established"); | ||
75 | } | ||
76 | catch (Exception e) | ||
77 | { | ||
78 | throw new Exception("Error initialising MySql Database: " + e.ToString()); | ||
79 | } | ||
80 | } | ||
81 | |||
82 | /// <summary> | ||
83 | /// Shuts down the database connection | ||
84 | /// </summary> | ||
85 | public void Close() | ||
86 | { | ||
87 | dbcon.Close(); | ||
88 | dbcon = null; | ||
89 | } | ||
90 | |||
91 | /// <summary> | ||
92 | /// Reconnects to the database | ||
93 | /// </summary> | ||
94 | public void Reconnect() | ||
95 | { | ||
96 | lock (dbcon) | ||
97 | { | ||
98 | try | ||
99 | { | ||
100 | // Close the DB connection | ||
101 | dbcon.Close(); | ||
102 | // Try reopen it | ||
103 | dbcon = new MySqlConnection(connectionString); | ||
104 | dbcon.Open(); | ||
105 | } | ||
106 | catch (Exception e) | ||
107 | { | ||
108 | Console.WriteLine("Unable to reconnect to database " + e.ToString()); | ||
109 | } | ||
110 | } | ||
111 | } | ||
112 | |||
113 | /// <summary> | ||
114 | /// Runs a query with protection against SQL Injection by using parameterised input. | ||
115 | /// </summary> | ||
116 | /// <param name="sql">The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y</param> | ||
117 | /// <param name="parameters">The parameters - index so that @y is indexed as 'y'</param> | ||
118 | /// <returns>A MySQL DB Command</returns> | ||
119 | public IDbCommand Query(string sql, Dictionary<string, string> parameters) | ||
120 | { | ||
121 | try | ||
122 | { | ||
123 | MySqlCommand dbcommand = (MySqlCommand)dbcon.CreateCommand(); | ||
124 | dbcommand.CommandText = sql; | ||
125 | foreach (KeyValuePair<string, string> param in parameters) | ||
126 | { | ||
127 | dbcommand.Parameters.Add(param.Key, param.Value); | ||
128 | } | ||
129 | |||
130 | return (IDbCommand)dbcommand; | ||
131 | } | ||
132 | catch | ||
133 | { | ||
134 | lock (dbcon) | ||
135 | { | ||
136 | // Close the DB connection | ||
137 | try | ||
138 | { | ||
139 | dbcon.Close(); | ||
140 | } | ||
141 | catch { } | ||
142 | |||
143 | // Try reopen it | ||
144 | try | ||
145 | { | ||
146 | dbcon = new MySqlConnection(connectionString); | ||
147 | dbcon.Open(); | ||
148 | } | ||
149 | catch (Exception e) | ||
150 | { | ||
151 | Console.WriteLine("Unable to reconnect to database " + e.ToString()); | ||
152 | } | ||
153 | |||
154 | // Run the query again | ||
155 | try | ||
156 | { | ||
157 | MySqlCommand dbcommand = (MySqlCommand)dbcon.CreateCommand(); | ||
158 | dbcommand.CommandText = sql; | ||
159 | foreach (KeyValuePair<string, string> param in parameters) | ||
160 | { | ||
161 | dbcommand.Parameters.Add(param.Key, param.Value); | ||
162 | } | ||
163 | |||
164 | return (IDbCommand)dbcommand; | ||
165 | } | ||
166 | catch (Exception e) | ||
167 | { | ||
168 | // Return null if it fails. | ||
169 | Console.WriteLine("Failed during Query generation: " + e.ToString()); | ||
170 | return null; | ||
171 | } | ||
172 | } | ||
173 | } | ||
174 | } | ||
175 | |||
176 | /// <summary> | ||
177 | /// Reads a region row from a database reader | ||
178 | /// </summary> | ||
179 | /// <param name="reader">An active database reader</param> | ||
180 | /// <returns>A region profile</returns> | ||
181 | public SimProfileData readSimRow(IDataReader reader) | ||
182 | { | ||
183 | SimProfileData retval = new SimProfileData(); | ||
184 | |||
185 | if (reader.Read()) | ||
186 | { | ||
187 | // Region Main | ||
188 | retval.regionHandle = Convert.ToUInt64(reader["regionHandle"].ToString()); | ||
189 | retval.regionName = (string)reader["regionName"]; | ||
190 | retval.UUID = new libsecondlife.LLUUID((string)reader["uuid"]); | ||
191 | |||
192 | // Secrets | ||
193 | retval.regionRecvKey = (string)reader["regionRecvKey"]; | ||
194 | retval.regionSecret = (string)reader["regionSecret"]; | ||
195 | retval.regionSendKey = (string)reader["regionSendKey"]; | ||
196 | |||
197 | // Region Server | ||
198 | retval.regionDataURI = (string)reader["regionDataURI"]; | ||
199 | retval.regionOnline = false; // Needs to be pinged before this can be set. | ||
200 | retval.serverIP = (string)reader["serverIP"]; | ||
201 | retval.serverPort = (uint)reader["serverPort"]; | ||
202 | retval.serverURI = (string)reader["serverURI"]; | ||
203 | |||
204 | // Location | ||
205 | retval.regionLocX = Convert.ToUInt32(reader["locX"].ToString()); | ||
206 | retval.regionLocY = Convert.ToUInt32(reader["locY"].ToString()); | ||
207 | retval.regionLocZ = Convert.ToUInt32(reader["locZ"].ToString()); | ||
208 | |||
209 | // Neighbours - 0 = No Override | ||
210 | retval.regionEastOverrideHandle = Convert.ToUInt64(reader["eastOverrideHandle"].ToString()); | ||
211 | retval.regionWestOverrideHandle = Convert.ToUInt64(reader["westOverrideHandle"].ToString()); | ||
212 | retval.regionSouthOverrideHandle = Convert.ToUInt64(reader["southOverrideHandle"].ToString()); | ||
213 | retval.regionNorthOverrideHandle = Convert.ToUInt64(reader["northOverrideHandle"].ToString()); | ||
214 | |||
215 | // Assets | ||
216 | retval.regionAssetURI = (string)reader["regionAssetURI"]; | ||
217 | retval.regionAssetRecvKey = (string)reader["regionAssetRecvKey"]; | ||
218 | retval.regionAssetSendKey = (string)reader["regionAssetSendKey"]; | ||
219 | |||
220 | // Userserver | ||
221 | retval.regionUserURI = (string)reader["regionUserURI"]; | ||
222 | retval.regionUserRecvKey = (string)reader["regionUserRecvKey"]; | ||
223 | retval.regionUserSendKey = (string)reader["regionUserSendKey"]; | ||
224 | |||
225 | // World Map Addition | ||
226 | string tempRegionMap = reader["regionMapTexture"].ToString(); | ||
227 | if (tempRegionMap != "") | ||
228 | { | ||
229 | retval.regionMapTextureID = new libsecondlife.LLUUID(tempRegionMap); | ||
230 | } | ||
231 | else | ||
232 | { | ||
233 | retval.regionMapTextureID = new libsecondlife.LLUUID(); | ||
234 | } | ||
235 | } | ||
236 | else | ||
237 | { | ||
238 | return null; | ||
239 | } | ||
240 | return retval; | ||
241 | } | ||
242 | |||
243 | /// <summary> | ||
244 | /// Reads a reservation row from a database reader | ||
245 | /// </summary> | ||
246 | /// <param name="reader">An active database reader</param> | ||
247 | /// <returns>A reservation data object</returns> | ||
248 | public ReservationData readReservationRow(IDataReader reader) | ||
249 | { | ||
250 | ReservationData retval = new ReservationData(); | ||
251 | if (reader.Read()) | ||
252 | { | ||
253 | retval.gridRecvKey = (string)reader["gridRecvKey"]; | ||
254 | retval.gridSendKey = (string)reader["gridSendKey"]; | ||
255 | retval.reservationCompany = (string)reader["resCompany"]; | ||
256 | retval.reservationMaxX = (int)reader["resXMax"]; | ||
257 | retval.reservationMaxY = (int)reader["resYMax"]; | ||
258 | retval.reservationMinX = (int)reader["resXMin"]; | ||
259 | retval.reservationMinY = (int)reader["resYMin"]; | ||
260 | retval.reservationName = (string)reader["resName"]; | ||
261 | retval.status = (bool)reader["status"]; | ||
262 | retval.userUUID = new libsecondlife.LLUUID((string)reader["userUUID"]); | ||
263 | |||
264 | } | ||
265 | else | ||
266 | { | ||
267 | return null; | ||
268 | } | ||
269 | return retval; | ||
270 | } | ||
271 | /// <summary> | ||
272 | /// Reads an agent row from a database reader | ||
273 | /// </summary> | ||
274 | /// <param name="reader">An active database reader</param> | ||
275 | /// <returns>A user session agent</returns> | ||
276 | public UserAgentData readAgentRow(IDataReader reader) | ||
277 | { | ||
278 | UserAgentData retval = new UserAgentData(); | ||
279 | |||
280 | if (reader.Read()) | ||
281 | { | ||
282 | // Agent IDs | ||
283 | retval.UUID = new libsecondlife.LLUUID((string)reader["UUID"]); | ||
284 | retval.sessionID = new libsecondlife.LLUUID((string)reader["sessionID"]); | ||
285 | retval.secureSessionID = new libsecondlife.LLUUID((string)reader["secureSessionID"]); | ||
286 | |||
287 | // Agent Who? | ||
288 | retval.agentIP = (string)reader["agentIP"]; | ||
289 | retval.agentPort = Convert.ToUInt32(reader["agentPort"].ToString()); | ||
290 | retval.agentOnline = Convert.ToBoolean(reader["agentOnline"].ToString()); | ||
291 | |||
292 | // Login/Logout times (UNIX Epoch) | ||
293 | retval.loginTime = Convert.ToInt32(reader["loginTime"].ToString()); | ||
294 | retval.logoutTime = Convert.ToInt32(reader["logoutTime"].ToString()); | ||
295 | |||
296 | // Current position | ||
297 | retval.currentRegion = (string)reader["currentRegion"]; | ||
298 | retval.currentHandle = Convert.ToUInt64(reader["currentHandle"].ToString()); | ||
299 | libsecondlife.LLVector3.TryParse((string)reader["currentPos"], out retval.currentPos); | ||
300 | } | ||
301 | else | ||
302 | { | ||
303 | return null; | ||
304 | } | ||
305 | return retval; | ||
306 | } | ||
307 | |||
308 | /// <summary> | ||
309 | /// Reads a user profile from an active data reader | ||
310 | /// </summary> | ||
311 | /// <param name="reader">An active database reader</param> | ||
312 | /// <returns>A user profile</returns> | ||
313 | public UserProfileData readUserRow(IDataReader reader) | ||
314 | { | ||
315 | UserProfileData retval = new UserProfileData(); | ||
316 | |||
317 | if (reader.Read()) | ||
318 | { | ||
319 | retval.UUID = new libsecondlife.LLUUID((string)reader["UUID"]); | ||
320 | retval.username = (string)reader["username"]; | ||
321 | retval.surname = (string)reader["lastname"]; | ||
322 | |||
323 | retval.passwordHash = (string)reader["passwordHash"]; | ||
324 | retval.passwordSalt = (string)reader["passwordSalt"]; | ||
325 | |||
326 | retval.homeRegion = Convert.ToUInt64(reader["homeRegion"].ToString()); | ||
327 | retval.homeLocation = new libsecondlife.LLVector3( | ||
328 | Convert.ToSingle(reader["homeLocationX"].ToString()), | ||
329 | Convert.ToSingle(reader["homeLocationY"].ToString()), | ||
330 | Convert.ToSingle(reader["homeLocationZ"].ToString())); | ||
331 | retval.homeLookAt = new libsecondlife.LLVector3( | ||
332 | Convert.ToSingle(reader["homeLookAtX"].ToString()), | ||
333 | Convert.ToSingle(reader["homeLookAtY"].ToString()), | ||
334 | Convert.ToSingle(reader["homeLookAtZ"].ToString())); | ||
335 | |||
336 | retval.created = Convert.ToInt32(reader["created"].ToString()); | ||
337 | retval.lastLogin = Convert.ToInt32(reader["lastLogin"].ToString()); | ||
338 | |||
339 | retval.userInventoryURI = (string)reader["userInventoryURI"]; | ||
340 | retval.userAssetURI = (string)reader["userAssetURI"]; | ||
341 | |||
342 | retval.profileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString()); | ||
343 | retval.profileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString()); | ||
344 | |||
345 | retval.profileAboutText = (string)reader["profileAboutText"]; | ||
346 | retval.profileFirstText = (string)reader["profileFirstText"]; | ||
347 | |||
348 | retval.profileImage = new libsecondlife.LLUUID((string)reader["profileImage"]); | ||
349 | retval.profileFirstImage = new libsecondlife.LLUUID((string)reader["profileFirstImage"]); | ||
350 | |||
351 | } | ||
352 | else | ||
353 | { | ||
354 | return null; | ||
355 | } | ||
356 | return retval; | ||
357 | } | ||
358 | |||
359 | /// <summary> | ||
360 | /// Reads a list of inventory folders returned by a query. | ||
361 | /// </summary> | ||
362 | /// <param name="reader">A MySQL Data Reader</param> | ||
363 | /// <returns>A List containing inventory folders</returns> | ||
364 | public List<InventoryFolderBase> readInventoryFolders(IDataReader reader) | ||
365 | { | ||
366 | List<InventoryFolderBase> rows = new List<InventoryFolderBase>(); | ||
367 | |||
368 | while(reader.Read()) | ||
369 | { | ||
370 | try | ||
371 | { | ||
372 | InventoryFolderBase folder = new InventoryFolderBase(); | ||
373 | |||
374 | folder.agentID = new libsecondlife.LLUUID((string)reader["agentID"]); | ||
375 | folder.parentID = new libsecondlife.LLUUID((string)reader["parentFolderID"]); | ||
376 | folder.folderID = new libsecondlife.LLUUID((string)reader["folderID"]); | ||
377 | folder.name = (string)reader["folderName"]; | ||
378 | |||
379 | rows.Add(folder); | ||
380 | } | ||
381 | catch (Exception e) | ||
382 | { | ||
383 | Console.WriteLine(e.ToString()); | ||
384 | } | ||
385 | } | ||
386 | |||
387 | return rows; | ||
388 | } | ||
389 | |||
390 | /// <summary> | ||
391 | /// Reads a collection of items from an SQL result | ||
392 | /// </summary> | ||
393 | /// <param name="reader">The SQL Result</param> | ||
394 | /// <returns>A List containing Inventory Items</returns> | ||
395 | public List<InventoryItemBase> readInventoryItems(IDataReader reader) | ||
396 | { | ||
397 | List<InventoryItemBase> rows = new List<InventoryItemBase>(); | ||
398 | |||
399 | while (reader.Read()) | ||
400 | { | ||
401 | try | ||
402 | { | ||
403 | InventoryItemBase item = new InventoryItemBase(); | ||
404 | |||
405 | item.assetID = new libsecondlife.LLUUID((string)reader["assetID"]); | ||
406 | item.avatarID = new libsecondlife.LLUUID((string)reader["avatarID"]); | ||
407 | item.inventoryCurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"].ToString()); | ||
408 | item.inventoryDescription = (string)reader["inventoryDescription"]; | ||
409 | item.inventoryID = new libsecondlife.LLUUID((string)reader["inventoryID"]); | ||
410 | item.inventoryName = (string)reader["inventoryName"]; | ||
411 | item.inventoryNextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"].ToString()); | ||
412 | item.parentFolderID = new libsecondlife.LLUUID((string)reader["parentFolderID"]); | ||
413 | item.type = Convert.ToInt32(reader["type"].ToString()); | ||
414 | |||
415 | rows.Add(item); | ||
416 | } | ||
417 | catch (Exception e) | ||
418 | { | ||
419 | Console.WriteLine(e.ToString()); | ||
420 | } | ||
421 | } | ||
422 | |||
423 | return rows; | ||
424 | } | ||
425 | |||
426 | /// <summary> | ||
427 | /// Inserts a new row into the log database | ||
428 | /// </summary> | ||
429 | /// <param name="serverDaemon">The daemon which triggered this event</param> | ||
430 | /// <param name="target">Who were we operating on when this occured (region UUID, user UUID, etc)</param> | ||
431 | /// <param name="methodCall">The method call where the problem occured</param> | ||
432 | /// <param name="arguments">The arguments passed to the method</param> | ||
433 | /// <param name="priority">How critical is this?</param> | ||
434 | /// <param name="logMessage">Extra message info</param> | ||
435 | /// <returns>Saved successfully?</returns> | ||
436 | public bool insertLogRow(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage) | ||
437 | { | ||
438 | string sql = "INSERT INTO logs (`target`, `server`, `method`, `arguments`, `priority`, `message`) VALUES "; | ||
439 | sql += "(?target, ?server, ?method, ?arguments, ?priority, ?message)"; | ||
440 | |||
441 | Dictionary<string, string> parameters = new Dictionary<string, string>(); | ||
442 | parameters["?server"] = serverDaemon; | ||
443 | parameters["?target"] = target; | ||
444 | parameters["?method"] = methodCall; | ||
445 | parameters["?arguments"] = arguments; | ||
446 | parameters["?priority"] = priority.ToString(); | ||
447 | parameters["?message"] = logMessage; | ||
448 | |||
449 | bool returnval = false; | ||
450 | |||
451 | try | ||
452 | { | ||
453 | IDbCommand result = Query(sql, parameters); | ||
454 | |||
455 | if (result.ExecuteNonQuery() == 1) | ||
456 | returnval = true; | ||
457 | |||
458 | result.Dispose(); | ||
459 | } | ||
460 | catch (Exception e) | ||
461 | { | ||
462 | Console.WriteLine(e.ToString()); | ||
463 | return false; | ||
464 | } | ||
465 | |||
466 | return returnval; | ||
467 | } | ||
468 | |||
469 | /// <summary> | ||
470 | /// Inserts a new item into the database | ||
471 | /// </summary> | ||
472 | /// <param name="item">The item</param> | ||
473 | /// <returns>Success?</returns> | ||
474 | public bool insertItem(InventoryItemBase item) | ||
475 | { | ||
476 | string sql = "REPLACE INTO inventoryitems (inventoryID, assetID, type, parentFolderID, avatarID, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions) VALUES "; | ||
477 | sql += "(?inventoryID, ?assetID, ?type, ?parentFolderID, ?avatarID, ?inventoryName, ?inventoryDescription, ?inventoryNextPermissions, ?inventoryCurrentPermissions)"; | ||
478 | |||
479 | Dictionary<string, string> parameters = new Dictionary<string, string>(); | ||
480 | parameters["?inventoryID"] = item.inventoryID.ToStringHyphenated(); | ||
481 | parameters["?assetID"] = item.assetID.ToStringHyphenated(); | ||
482 | parameters["?type"] = item.type.ToString(); | ||
483 | parameters["?parentFolderID"] = item.parentFolderID.ToStringHyphenated(); | ||
484 | parameters["?avatarID"] = item.avatarID.ToStringHyphenated(); | ||
485 | parameters["?inventoryName"] = item.inventoryName; | ||
486 | parameters["?inventoryDescription"] = item.inventoryDescription; | ||
487 | parameters["?inventoryNextPermissions"] = item.inventoryNextPermissions.ToString(); | ||
488 | parameters["?inventoryCurrentPermissions"] = item.inventoryCurrentPermissions.ToString(); | ||
489 | |||
490 | bool returnval = false; | ||
491 | |||
492 | try | ||
493 | { | ||
494 | IDbCommand result = Query(sql, parameters); | ||
495 | |||
496 | if (result.ExecuteNonQuery() == 1) | ||
497 | returnval = true; | ||
498 | |||
499 | result.Dispose(); | ||
500 | } | ||
501 | catch (Exception e) | ||
502 | { | ||
503 | Console.WriteLine(e.ToString()); | ||
504 | return false; | ||
505 | } | ||
506 | |||
507 | return returnval; | ||
508 | } | ||
509 | |||
510 | /// <summary> | ||
511 | /// Inserts a new folder into the database | ||
512 | /// </summary> | ||
513 | /// <param name="folder">The folder</param> | ||
514 | /// <returns>Success?</returns> | ||
515 | public bool insertFolder(InventoryFolderBase folder) | ||
516 | { | ||
517 | string sql = "REPLACE INTO inventoryfolders (folderID, agentID, parentFolderID, folderName) VALUES "; | ||
518 | sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName)"; | ||
519 | |||
520 | Dictionary<string, string> parameters = new Dictionary<string, string>(); | ||
521 | parameters["?folderID"] = folder.folderID.ToStringHyphenated(); | ||
522 | parameters["?agentID"] = folder.agentID.ToStringHyphenated(); | ||
523 | parameters["?parentFolderID"] = folder.parentID.ToStringHyphenated(); | ||
524 | parameters["?folderName"] = folder.name; | ||
525 | |||
526 | bool returnval = false; | ||
527 | try | ||
528 | { | ||
529 | IDbCommand result = Query(sql, parameters); | ||
530 | |||
531 | if (result.ExecuteNonQuery() == 1) | ||
532 | returnval = true; | ||
533 | |||
534 | result.Dispose(); | ||
535 | } | ||
536 | catch (Exception e) | ||
537 | { | ||
538 | Console.WriteLine(e.ToString()); | ||
539 | return false; | ||
540 | } | ||
541 | return returnval; | ||
542 | } | ||
543 | |||
544 | /// <summary> | ||
545 | /// Inserts a new region into the database | ||
546 | /// </summary> | ||
547 | /// <param name="profile">The region to insert</param> | ||
548 | /// <returns>Success?</returns> | ||
549 | public bool insertRegion(SimProfileData regiondata) | ||
550 | { | ||
551 | string sql = "REPLACE INTO regions (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, "; | ||
552 | sql += "serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, "; | ||
553 | sql += "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture) VALUES "; | ||
554 | |||
555 | sql += "(?regionHandle, ?regionName, ?uuid, ?regionRecvKey, ?regionSecret, ?regionSendKey, ?regionDataURI, "; | ||
556 | sql += "?serverIP, ?serverPort, ?serverURI, ?locX, ?locY, ?locZ, ?eastOverrideHandle, ?westOverrideHandle, ?southOverrideHandle, ?northOverrideHandle, ?regionAssetURI, ?regionAssetRecvKey, "; | ||
557 | sql += "?regionAssetSendKey, ?regionUserURI, ?regionUserRecvKey, ?regionUserSendKey, ?regionMapTexture);"; | ||
558 | |||
559 | Dictionary<string, string> parameters = new Dictionary<string, string>(); | ||
560 | |||
561 | parameters["?regionHandle"] = regiondata.regionHandle.ToString(); | ||
562 | parameters["?regionName"] = regiondata.regionName.ToString(); | ||
563 | parameters["?uuid"] = regiondata.UUID.ToStringHyphenated(); | ||
564 | parameters["?regionRecvKey"] = regiondata.regionRecvKey.ToString(); | ||
565 | parameters["?regionSecret"] = regiondata.regionSecret.ToString(); | ||
566 | parameters["?regionSendKey"] = regiondata.regionSendKey.ToString(); | ||
567 | parameters["?regionDataURI"] = regiondata.regionDataURI.ToString(); | ||
568 | parameters["?serverIP"] = regiondata.serverIP.ToString(); | ||
569 | parameters["?serverPort"] = regiondata.serverPort.ToString(); | ||
570 | parameters["?serverURI"] = regiondata.serverURI.ToString(); | ||
571 | parameters["?locX"] = regiondata.regionLocX.ToString(); | ||
572 | parameters["?locY"] = regiondata.regionLocY.ToString(); | ||
573 | parameters["?locZ"] = regiondata.regionLocZ.ToString(); | ||
574 | parameters["?eastOverrideHandle"] = regiondata.regionEastOverrideHandle.ToString(); | ||
575 | parameters["?westOverrideHandle"] = regiondata.regionWestOverrideHandle.ToString(); | ||
576 | parameters["?northOverrideHandle"] = regiondata.regionNorthOverrideHandle.ToString(); | ||
577 | parameters["?southOverrideHandle"] = regiondata.regionSouthOverrideHandle.ToString(); | ||
578 | parameters["?regionAssetURI"] = regiondata.regionAssetURI.ToString(); | ||
579 | parameters["?regionAssetRecvKey"] = regiondata.regionAssetRecvKey.ToString(); | ||
580 | parameters["?regionAssetSendKey"] = regiondata.regionAssetSendKey.ToString(); | ||
581 | parameters["?regionUserURI"] = regiondata.regionUserURI.ToString(); | ||
582 | parameters["?regionUserRecvKey"] = regiondata.regionUserRecvKey.ToString(); | ||
583 | parameters["?regionUserSendKey"] = regiondata.regionUserSendKey.ToString(); | ||
584 | parameters["?regionMapTexture"] = regiondata.regionMapTextureID.ToStringHyphenated(); | ||
585 | |||
586 | bool returnval = false; | ||
587 | |||
588 | try | ||
589 | { | ||
590 | |||
591 | IDbCommand result = Query(sql, parameters); | ||
592 | |||
593 | //Console.WriteLine(result.CommandText); | ||
594 | |||
595 | if (result.ExecuteNonQuery() == 1) | ||
596 | returnval = true; | ||
597 | |||
598 | result.Dispose(); | ||
599 | } | ||
600 | catch (Exception e) | ||
601 | { | ||
602 | Console.WriteLine(e.ToString()); | ||
603 | return false; | ||
604 | } | ||
605 | |||
606 | return returnval; | ||
607 | } | ||
608 | } | ||
609 | } | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLUserData.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLUserData.cs deleted file mode 100644 index 032a0e6..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLUserData.cs +++ /dev/null | |||
@@ -1,257 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | using OpenGrid.Framework.Data; | ||
32 | using libsecondlife; | ||
33 | |||
34 | namespace OpenGrid.Framework.Data.MySQL | ||
35 | { | ||
36 | /// <summary> | ||
37 | /// A database interface class to a user profile storage system | ||
38 | /// </summary> | ||
39 | class MySQLUserData : IUserData | ||
40 | { | ||
41 | /// <summary> | ||
42 | /// Database manager for MySQL | ||
43 | /// </summary> | ||
44 | public MySQLManager database; | ||
45 | |||
46 | /// <summary> | ||
47 | /// Loads and initialises the MySQL storage plugin | ||
48 | /// </summary> | ||
49 | public void Initialise() | ||
50 | { | ||
51 | // Load from an INI file connection details | ||
52 | // TODO: move this to XML? | ||
53 | IniFile GridDataMySqlFile = new IniFile("mysql_connection.ini"); | ||
54 | string settingHostname = GridDataMySqlFile.ParseFileReadValue("hostname"); | ||
55 | string settingDatabase = GridDataMySqlFile.ParseFileReadValue("database"); | ||
56 | string settingUsername = GridDataMySqlFile.ParseFileReadValue("username"); | ||
57 | string settingPassword = GridDataMySqlFile.ParseFileReadValue("password"); | ||
58 | string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling"); | ||
59 | string settingPort = GridDataMySqlFile.ParseFileReadValue("port"); | ||
60 | |||
61 | database = new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, settingPort); | ||
62 | } | ||
63 | |||
64 | /// <summary> | ||
65 | /// Searches the database for a specified user profile | ||
66 | /// </summary> | ||
67 | /// <param name="name">The account name of the user</param> | ||
68 | /// <returns>A user profile</returns> | ||
69 | public UserProfileData getUserByName(string name) | ||
70 | { | ||
71 | return getUserByName(name.Split(' ')[0], name.Split(' ')[1]); | ||
72 | } | ||
73 | |||
74 | /// <summary> | ||
75 | /// Searches the database for a specified user profile by name components | ||
76 | /// </summary> | ||
77 | /// <param name="user">The first part of the account name</param> | ||
78 | /// <param name="last">The second part of the account name</param> | ||
79 | /// <returns>A user profile</returns> | ||
80 | public UserProfileData getUserByName(string user, string last) | ||
81 | { | ||
82 | try | ||
83 | { | ||
84 | lock (database) | ||
85 | { | ||
86 | Dictionary<string, string> param = new Dictionary<string, string>(); | ||
87 | param["?first"] = user; | ||
88 | param["?second"] = last; | ||
89 | |||
90 | System.Data.IDbCommand result = database.Query("SELECT * FROM users WHERE username = ?first AND lastname = ?second", param); | ||
91 | System.Data.IDataReader reader = result.ExecuteReader(); | ||
92 | |||
93 | UserProfileData row = database.readUserRow(reader); | ||
94 | |||
95 | reader.Close(); | ||
96 | result.Dispose(); | ||
97 | |||
98 | return row; | ||
99 | } | ||
100 | } | ||
101 | catch (Exception e) | ||
102 | { | ||
103 | database.Reconnect(); | ||
104 | Console.WriteLine(e.ToString()); | ||
105 | return null; | ||
106 | } | ||
107 | } | ||
108 | |||
109 | /// <summary> | ||
110 | /// Searches the database for a specified user profile by UUID | ||
111 | /// </summary> | ||
112 | /// <param name="uuid">The account ID</param> | ||
113 | /// <returns>The users profile</returns> | ||
114 | public UserProfileData getUserByUUID(LLUUID uuid) | ||
115 | { | ||
116 | try | ||
117 | { | ||
118 | lock (database) | ||
119 | { | ||
120 | Dictionary<string, string> param = new Dictionary<string, string>(); | ||
121 | param["?uuid"] = uuid.ToStringHyphenated(); | ||
122 | |||
123 | System.Data.IDbCommand result = database.Query("SELECT * FROM users WHERE UUID = ?uuid", param); | ||
124 | System.Data.IDataReader reader = result.ExecuteReader(); | ||
125 | |||
126 | UserProfileData row = database.readUserRow(reader); | ||
127 | |||
128 | reader.Close(); | ||
129 | result.Dispose(); | ||
130 | |||
131 | return row; | ||
132 | } | ||
133 | } | ||
134 | catch (Exception e) | ||
135 | { | ||
136 | database.Reconnect(); | ||
137 | Console.WriteLine(e.ToString()); | ||
138 | return null; | ||
139 | } | ||
140 | } | ||
141 | |||
142 | /// <summary> | ||
143 | /// Returns a user session searching by name | ||
144 | /// </summary> | ||
145 | /// <param name="name">The account name</param> | ||
146 | /// <returns>The users session</returns> | ||
147 | public UserAgentData getAgentByName(string name) | ||
148 | { | ||
149 | return getAgentByName(name.Split(' ')[0], name.Split(' ')[1]); | ||
150 | } | ||
151 | |||
152 | /// <summary> | ||
153 | /// Returns a user session by account name | ||
154 | /// </summary> | ||
155 | /// <param name="user">First part of the users account name</param> | ||
156 | /// <param name="last">Second part of the users account name</param> | ||
157 | /// <returns>The users session</returns> | ||
158 | public UserAgentData getAgentByName(string user, string last) | ||
159 | { | ||
160 | UserProfileData profile = getUserByName(user, last); | ||
161 | return getAgentByUUID(profile.UUID); | ||
162 | } | ||
163 | |||
164 | /// <summary> | ||
165 | /// Returns an agent session by account UUID | ||
166 | /// </summary> | ||
167 | /// <param name="uuid">The accounts UUID</param> | ||
168 | /// <returns>The users session</returns> | ||
169 | public UserAgentData getAgentByUUID(LLUUID uuid) | ||
170 | { | ||
171 | try | ||
172 | { | ||
173 | lock (database) | ||
174 | { | ||
175 | Dictionary<string, string> param = new Dictionary<string, string>(); | ||
176 | param["?uuid"] = uuid.ToStringHyphenated(); | ||
177 | |||
178 | System.Data.IDbCommand result = database.Query("SELECT * FROM agents WHERE UUID = ?uuid", param); | ||
179 | System.Data.IDataReader reader = result.ExecuteReader(); | ||
180 | |||
181 | UserAgentData row = database.readAgentRow(reader); | ||
182 | |||
183 | reader.Close(); | ||
184 | result.Dispose(); | ||
185 | |||
186 | return row; | ||
187 | } | ||
188 | } | ||
189 | catch (Exception e) | ||
190 | { | ||
191 | database.Reconnect(); | ||
192 | Console.WriteLine(e.ToString()); | ||
193 | return null; | ||
194 | } | ||
195 | } | ||
196 | |||
197 | /// <summary> | ||
198 | /// Creates a new users profile | ||
199 | /// </summary> | ||
200 | /// <param name="user">The user profile to create</param> | ||
201 | public void addNewUserProfile(UserProfileData user) | ||
202 | { | ||
203 | } | ||
204 | |||
205 | /// <summary> | ||
206 | /// Creates a new agent | ||
207 | /// </summary> | ||
208 | /// <param name="agent">The agent to create</param> | ||
209 | public void addNewUserAgent(UserAgentData agent) | ||
210 | { | ||
211 | // Do nothing. | ||
212 | } | ||
213 | |||
214 | /// <summary> | ||
215 | /// Performs a money transfer request between two accounts | ||
216 | /// </summary> | ||
217 | /// <param name="from">The senders account ID</param> | ||
218 | /// <param name="to">The recievers account ID</param> | ||
219 | /// <param name="amount">The amount to transfer</param> | ||
220 | /// <returns>Success?</returns> | ||
221 | public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount) | ||
222 | { | ||
223 | return false; | ||
224 | } | ||
225 | |||
226 | /// <summary> | ||
227 | /// Performs an inventory transfer request between two accounts | ||
228 | /// </summary> | ||
229 | /// <remarks>TODO: Move to inventory server</remarks> | ||
230 | /// <param name="from">The senders account ID</param> | ||
231 | /// <param name="to">The recievers account ID</param> | ||
232 | /// <param name="item">The item to transfer</param> | ||
233 | /// <returns>Success?</returns> | ||
234 | public bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) | ||
235 | { | ||
236 | return false; | ||
237 | } | ||
238 | |||
239 | /// <summary> | ||
240 | /// Database provider name | ||
241 | /// </summary> | ||
242 | /// <returns>Provider name</returns> | ||
243 | public string getName() | ||
244 | { | ||
245 | return "MySQL Userdata Interface"; | ||
246 | } | ||
247 | |||
248 | /// <summary> | ||
249 | /// Database provider version | ||
250 | /// </summary> | ||
251 | /// <returns>provider version</returns> | ||
252 | public string getVersion() | ||
253 | { | ||
254 | return "0.1"; | ||
255 | } | ||
256 | } | ||
257 | } | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj b/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj deleted file mode 100644 index c1fc2da..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj +++ /dev/null | |||
@@ -1,117 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{0F3C3AC1-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenGrid.Framework.Data.MySQL</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Library</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenGrid.Framework.Data.MySQL</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>False</Optimize> | ||
35 | <OutputPath>..\..\bin\</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>True</Optimize> | ||
53 | <OutputPath>..\..\bin\</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="libsecondlife.dll" > | ||
62 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="MySql.Data.dll" > | ||
66 | <HintPath>..\..\bin\MySql.Data.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="System" > | ||
70 | <HintPath>System.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="System.Data" > | ||
74 | <HintPath>System.Data.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | <Reference Include="System.Xml" > | ||
78 | <HintPath>System.Xml.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | </ItemGroup> | ||
82 | <ItemGroup> | ||
83 | <ProjectReference Include="..\..\Common\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj"> | ||
84 | <Name>OpenGrid.Framework.Data</Name> | ||
85 | <Project>{62CDF671-0000-0000-0000-000000000000}</Project> | ||
86 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
87 | <Private>False</Private> | ||
88 | </ProjectReference> | ||
89 | </ItemGroup> | ||
90 | <ItemGroup> | ||
91 | <Compile Include="MySQLGridData.cs"> | ||
92 | <SubType>Code</SubType> | ||
93 | </Compile> | ||
94 | <Compile Include="MySQLInventoryData.cs"> | ||
95 | <SubType>Code</SubType> | ||
96 | </Compile> | ||
97 | <Compile Include="MySQLLogData.cs"> | ||
98 | <SubType>Code</SubType> | ||
99 | </Compile> | ||
100 | <Compile Include="MySQLManager.cs"> | ||
101 | <SubType>Code</SubType> | ||
102 | </Compile> | ||
103 | <Compile Include="MySQLUserData.cs"> | ||
104 | <SubType>Code</SubType> | ||
105 | </Compile> | ||
106 | <Compile Include="Properties\AssemblyInfo.cs"> | ||
107 | <SubType>Code</SubType> | ||
108 | </Compile> | ||
109 | </ItemGroup> | ||
110 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
111 | <PropertyGroup> | ||
112 | <PreBuildEvent> | ||
113 | </PreBuildEvent> | ||
114 | <PostBuildEvent> | ||
115 | </PostBuildEvent> | ||
116 | </PropertyGroup> | ||
117 | </Project> | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj.mine b/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj.mine deleted file mode 100644 index 75ef149..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj.mine +++ /dev/null | |||
@@ -1,117 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{0F3C3AC1-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenGrid.Framework.Data.MySQL</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Library</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenGrid.Framework.Data.MySQL</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>False</Optimize> | ||
35 | <OutputPath>..\..\bin\</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>True</Optimize> | ||
53 | <OutputPath>..\..\bin\</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="System" > | ||
62 | <HintPath>System.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="System.Xml" > | ||
66 | <HintPath>System.Xml.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="System.Data" > | ||
70 | <HintPath>System.Data.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="libsecondlife.dll" > | ||
74 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | <Reference Include="MySql.Data.dll" > | ||
78 | <HintPath>..\..\bin\MySql.Data.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | </ItemGroup> | ||
82 | <ItemGroup> | ||
83 | <ProjectReference Include="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj"> | ||
84 | <Name>OpenGrid.Framework.Data</Name> | ||
85 | <Project>{62CDF671-0000-0000-0000-000000000000}</Project> | ||
86 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
87 | <Private>False</Private> | ||
88 | </ProjectReference> | ||
89 | </ItemGroup> | ||
90 | <ItemGroup> | ||
91 | <Compile Include="MySQLGridData.cs"> | ||
92 | <SubType>Code</SubType> | ||
93 | </Compile> | ||
94 | <Compile Include="MySQLInventoryData.cs"> | ||
95 | <SubType>Code</SubType> | ||
96 | </Compile> | ||
97 | <Compile Include="MySQLLogData.cs"> | ||
98 | <SubType>Code</SubType> | ||
99 | </Compile> | ||
100 | <Compile Include="MySQLManager.cs"> | ||
101 | <SubType>Code</SubType> | ||
102 | </Compile> | ||
103 | <Compile Include="MySQLUserData.cs"> | ||
104 | <SubType>Code</SubType> | ||
105 | </Compile> | ||
106 | <Compile Include="Properties\AssemblyInfo.cs"> | ||
107 | <SubType>Code</SubType> | ||
108 | </Compile> | ||
109 | </ItemGroup> | ||
110 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
111 | <PropertyGroup> | ||
112 | <PreBuildEvent> | ||
113 | </PreBuildEvent> | ||
114 | <PostBuildEvent> | ||
115 | </PostBuildEvent> | ||
116 | </PropertyGroup> | ||
117 | </Project> | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj.r858 b/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj.r858 deleted file mode 100644 index 7a36be2..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj.r858 +++ /dev/null | |||
@@ -1,114 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{C669E5AC-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenGrid.Framework.Data.MySQL</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Library</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenGrid.Framework.Data.MySQL</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>False</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>True</Optimize> | ||
35 | <OutputPath>../../bin/</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>True</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>False</Optimize> | ||
53 | <OutputPath>../../bin/</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="System" > | ||
62 | <HintPath>System.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="System.Xml" > | ||
66 | <HintPath>System.Xml.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="System.Data" > | ||
70 | <HintPath>System.Data.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="libsecondlife.dll" > | ||
74 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | <Reference Include="MySql.Data.dll" > | ||
78 | <HintPath>..\..\bin\MySql.Data.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | </ItemGroup> | ||
82 | <ItemGroup> | ||
83 | <ProjectReference Include="../OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj"> | ||
84 | <Name>OpenGrid.Framework.Data</Name> | ||
85 | <Project>{12DD8EB8-0000-0000-0000-000000000000}</Project> | ||
86 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
87 | <Private>False</Private> | ||
88 | </ProjectReference> | ||
89 | </ItemGroup> | ||
90 | <ItemGroup> | ||
91 | <Compile Include="MySQLGridData.cs"> | ||
92 | <SubType>Code</SubType> | ||
93 | </Compile> | ||
94 | <Compile Include="MySQLLogData.cs"> | ||
95 | <SubType>Code</SubType> | ||
96 | </Compile> | ||
97 | <Compile Include="MySQLManager.cs"> | ||
98 | <SubType>Code</SubType> | ||
99 | </Compile> | ||
100 | <Compile Include="MySQLUserData.cs"> | ||
101 | <SubType>Code</SubType> | ||
102 | </Compile> | ||
103 | <Compile Include="Properties/AssemblyInfo.cs"> | ||
104 | <SubType>Code</SubType> | ||
105 | </Compile> | ||
106 | </ItemGroup> | ||
107 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
108 | <PropertyGroup> | ||
109 | <PreBuildEvent> | ||
110 | </PreBuildEvent> | ||
111 | <PostBuildEvent> | ||
112 | </PostBuildEvent> | ||
113 | </PropertyGroup> | ||
114 | </Project> | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj.r921 b/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj.r921 deleted file mode 100644 index 5fe0cf7..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj.r921 +++ /dev/null | |||
@@ -1,117 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{0F3C3AC1-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenGrid.Framework.Data.MySQL</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Library</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenGrid.Framework.Data.MySQL</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>False</Optimize> | ||
35 | <OutputPath>..\..\bin\</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>True</Optimize> | ||
53 | <OutputPath>..\..\bin\</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="System" > | ||
62 | <HintPath>System.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="System.Xml" > | ||
66 | <HintPath>System.Xml.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="System.Data" > | ||
70 | <HintPath>System.Data.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="libsecondlife.dll" > | ||
74 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | <Reference Include="MySql.Data.dll" > | ||
78 | <HintPath>..\..\bin\MySql.Data.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | </ItemGroup> | ||
82 | <ItemGroup> | ||
83 | <ProjectReference Include="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj"> | ||
84 | <Name>OpenGrid.Framework.Data</Name> | ||
85 | <Project>{62CDF671-0000-0000-0000-000000000000}</Project> | ||
86 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
87 | <Private>False</Private> | ||
88 | </ProjectReference> | ||
89 | </ItemGroup> | ||
90 | <ItemGroup> | ||
91 | <Compile Include="MySQLInventoryData.cs"> | ||
92 | <SubType>Code</SubType> | ||
93 | </Compile> | ||
94 | <Compile Include="MySQLUserData.cs"> | ||
95 | <SubType>Code</SubType> | ||
96 | </Compile> | ||
97 | <Compile Include="MySQLManager.cs"> | ||
98 | <SubType>Code</SubType> | ||
99 | </Compile> | ||
100 | <Compile Include="MySQLLogData.cs"> | ||
101 | <SubType>Code</SubType> | ||
102 | </Compile> | ||
103 | <Compile Include="MySQLGridData.cs"> | ||
104 | <SubType>Code</SubType> | ||
105 | </Compile> | ||
106 | <Compile Include="Properties\AssemblyInfo.cs"> | ||
107 | <SubType>Code</SubType> | ||
108 | </Compile> | ||
109 | </ItemGroup> | ||
110 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
111 | <PropertyGroup> | ||
112 | <PreBuildEvent> | ||
113 | </PreBuildEvent> | ||
114 | <PostBuildEvent> | ||
115 | </PostBuildEvent> | ||
116 | </PropertyGroup> | ||
117 | </Project> | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build b/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build deleted file mode 100644 index a5f4028..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | <?xml version="1.0" ?> | ||
2 | <project name="OpenGrid.Framework.Data.MySQL" default="build"> | ||
3 | <target name="build"> | ||
4 | <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> | ||
5 | <mkdir dir="${project::get-base-directory()}/${build.dir}" /> | ||
6 | <copy todir="${project::get-base-directory()}/${build.dir}"> | ||
7 | <fileset basedir="${project::get-base-directory()}"> | ||
8 | </fileset> | ||
9 | </copy> | ||
10 | <csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll"> | ||
11 | <resources prefix="OpenGrid.Framework.Data.MySQL" dynamicprefix="true" > | ||
12 | </resources> | ||
13 | <sources failonempty="true"> | ||
14 | <include name="MySQLGridData.cs" /> | ||
15 | <include name="MySQLInventoryData.cs" /> | ||
16 | <include name="MySQLLogData.cs" /> | ||
17 | <include name="MySQLManager.cs" /> | ||
18 | <include name="MySQLUserData.cs" /> | ||
19 | <include name="Properties/AssemblyInfo.cs" /> | ||
20 | </sources> | ||
21 | <references basedir="${project::get-base-directory()}"> | ||
22 | <lib> | ||
23 | <include name="${project::get-base-directory()}" /> | ||
24 | <include name="${project::get-base-directory()}/${build.dir}" /> | ||
25 | </lib> | ||
26 | <include name="../../bin/libsecondlife.dll" /> | ||
27 | <include name="../../bin/MySql.Data.dll" /> | ||
28 | <include name="../../bin/OpenGrid.Framework.Data.dll" /> | ||
29 | <include name="System.dll" /> | ||
30 | <include name="System.Data.dll" /> | ||
31 | <include name="System.Xml.dll" /> | ||
32 | </references> | ||
33 | </csc> | ||
34 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> | ||
35 | <mkdir dir="${project::get-base-directory()}/../../bin/"/> | ||
36 | <copy todir="${project::get-base-directory()}/../../bin/"> | ||
37 | <fileset basedir="${project::get-base-directory()}/${build.dir}/" > | ||
38 | <include name="*.dll"/> | ||
39 | <include name="*.exe"/> | ||
40 | </fileset> | ||
41 | </copy> | ||
42 | </target> | ||
43 | <target name="clean"> | ||
44 | <delete dir="${bin.dir}" failonerror="false" /> | ||
45 | <delete dir="${obj.dir}" failonerror="false" /> | ||
46 | </target> | ||
47 | <target name="doc" description="Creates documentation."> | ||
48 | </target> | ||
49 | </project> | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/Properties/AssemblyInfo.cs deleted file mode 100644 index 0bfd1d6..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.MySQL/Properties/AssemblyInfo.cs +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | using System.Reflection; | ||
2 | using System.Runtime.CompilerServices; | ||
3 | using System.Runtime.InteropServices; | ||
4 | |||
5 | // General Information about an assembly is controlled through the following | ||
6 | // set of attributes. Change these attribute values to modify the information | ||
7 | // associated with an assembly. | ||
8 | [assembly: AssemblyTitle("OpenGrid.Framework.Data.MySQL")] | ||
9 | [assembly: AssemblyDescription("")] | ||
10 | [assembly: AssemblyConfiguration("")] | ||
11 | [assembly: AssemblyCompany("")] | ||
12 | [assembly: AssemblyProduct("OpenGrid.Framework.Data.MySQL")] | ||
13 | [assembly: AssemblyCopyright("Copyright © 2007")] | ||
14 | [assembly: AssemblyTrademark("")] | ||
15 | [assembly: AssemblyCulture("")] | ||
16 | |||
17 | // Setting ComVisible to false makes the types in this assembly not visible | ||
18 | // to COM components. If you need to access a type in this assembly from | ||
19 | // COM, set the ComVisible attribute to true on that type. | ||
20 | [assembly: ComVisible(false)] | ||
21 | |||
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM | ||
23 | [assembly: Guid("e49826b2-dcef-41be-a5bd-596733fa3304")] | ||
24 | |||
25 | // Version information for an assembly consists of the following four values: | ||
26 | // | ||
27 | // Major Version | ||
28 | // Minor Version | ||
29 | // Build Number | ||
30 | // Revision | ||
31 | // | ||
32 | // You can specify all the values or you can default the Revision and Build Numbers | ||
33 | // by using the '*' as shown below: | ||
34 | [assembly: AssemblyVersion("1.0.0.0")] | ||
35 | [assembly: AssemblyFileVersion("1.0.0.0")] | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj b/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj deleted file mode 100644 index da42e05..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj +++ /dev/null | |||
@@ -1,108 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{1E3F341A-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenGrid.Framework.Data.SQLite</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Library</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenGrid.Framework.Data.SQLite</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>False</Optimize> | ||
35 | <OutputPath>..\..\bin\</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>True</Optimize> | ||
53 | <OutputPath>..\..\bin\</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="libsecondlife.dll" > | ||
62 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="System" > | ||
66 | <HintPath>System.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="System.Data" > | ||
70 | <HintPath>System.Data.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="System.Data.SQLite.dll" > | ||
74 | <HintPath>..\..\bin\System.Data.SQLite.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | <Reference Include="System.Xml" > | ||
78 | <HintPath>System.Xml.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | </ItemGroup> | ||
82 | <ItemGroup> | ||
83 | <ProjectReference Include="..\..\Common\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj"> | ||
84 | <Name>OpenGrid.Framework.Data</Name> | ||
85 | <Project>{62CDF671-0000-0000-0000-000000000000}</Project> | ||
86 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
87 | <Private>False</Private> | ||
88 | </ProjectReference> | ||
89 | </ItemGroup> | ||
90 | <ItemGroup> | ||
91 | <Compile Include="SQLiteGridData.cs"> | ||
92 | <SubType>Code</SubType> | ||
93 | </Compile> | ||
94 | <Compile Include="SQLiteManager.cs"> | ||
95 | <SubType>Code</SubType> | ||
96 | </Compile> | ||
97 | <Compile Include="Properties\AssemblyInfo.cs"> | ||
98 | <SubType>Code</SubType> | ||
99 | </Compile> | ||
100 | </ItemGroup> | ||
101 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
102 | <PropertyGroup> | ||
103 | <PreBuildEvent> | ||
104 | </PreBuildEvent> | ||
105 | <PostBuildEvent> | ||
106 | </PostBuildEvent> | ||
107 | </PropertyGroup> | ||
108 | </Project> | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj.mine b/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj.mine deleted file mode 100644 index 463cf86..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj.mine +++ /dev/null | |||
@@ -1,108 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{1E3F341A-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenGrid.Framework.Data.SQLite</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Library</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenGrid.Framework.Data.SQLite</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>False</Optimize> | ||
35 | <OutputPath>..\..\bin\</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>True</Optimize> | ||
53 | <OutputPath>..\..\bin\</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="System" > | ||
62 | <HintPath>System.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="System.Xml" > | ||
66 | <HintPath>System.Xml.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="System.Data" > | ||
70 | <HintPath>System.Data.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="System.Data.SQLite.dll" > | ||
74 | <HintPath>..\..\bin\System.Data.SQLite.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | <Reference Include="libsecondlife.dll" > | ||
78 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | </ItemGroup> | ||
82 | <ItemGroup> | ||
83 | <ProjectReference Include="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj"> | ||
84 | <Name>OpenGrid.Framework.Data</Name> | ||
85 | <Project>{62CDF671-0000-0000-0000-000000000000}</Project> | ||
86 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
87 | <Private>False</Private> | ||
88 | </ProjectReference> | ||
89 | </ItemGroup> | ||
90 | <ItemGroup> | ||
91 | <Compile Include="SQLiteGridData.cs"> | ||
92 | <SubType>Code</SubType> | ||
93 | </Compile> | ||
94 | <Compile Include="SQLiteManager.cs"> | ||
95 | <SubType>Code</SubType> | ||
96 | </Compile> | ||
97 | <Compile Include="Properties\AssemblyInfo.cs"> | ||
98 | <SubType>Code</SubType> | ||
99 | </Compile> | ||
100 | </ItemGroup> | ||
101 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
102 | <PropertyGroup> | ||
103 | <PreBuildEvent> | ||
104 | </PreBuildEvent> | ||
105 | <PostBuildEvent> | ||
106 | </PostBuildEvent> | ||
107 | </PropertyGroup> | ||
108 | </Project> | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj.r858 b/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj.r858 deleted file mode 100644 index a8d0541..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj.r858 +++ /dev/null | |||
@@ -1,108 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{0ED96822-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenGrid.Framework.Data.SQLite</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Library</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenGrid.Framework.Data.SQLite</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>False</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>True</Optimize> | ||
35 | <OutputPath>../../bin/</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>True</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>False</Optimize> | ||
53 | <OutputPath>../../bin/</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="System" > | ||
62 | <HintPath>System.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="System.Xml" > | ||
66 | <HintPath>System.Xml.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="System.Data" > | ||
70 | <HintPath>System.Data.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="System.Data.SQLite.dll" > | ||
74 | <HintPath>..\..\bin\System.Data.SQLite.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | <Reference Include="libsecondlife.dll" > | ||
78 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | </ItemGroup> | ||
82 | <ItemGroup> | ||
83 | <ProjectReference Include="../OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj"> | ||
84 | <Name>OpenGrid.Framework.Data</Name> | ||
85 | <Project>{12DD8EB8-0000-0000-0000-000000000000}</Project> | ||
86 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
87 | <Private>False</Private> | ||
88 | </ProjectReference> | ||
89 | </ItemGroup> | ||
90 | <ItemGroup> | ||
91 | <Compile Include="SQLiteGridData.cs"> | ||
92 | <SubType>Code</SubType> | ||
93 | </Compile> | ||
94 | <Compile Include="SQLiteManager.cs"> | ||
95 | <SubType>Code</SubType> | ||
96 | </Compile> | ||
97 | <Compile Include="Properties/AssemblyInfo.cs"> | ||
98 | <SubType>Code</SubType> | ||
99 | </Compile> | ||
100 | </ItemGroup> | ||
101 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
102 | <PropertyGroup> | ||
103 | <PreBuildEvent> | ||
104 | </PreBuildEvent> | ||
105 | <PostBuildEvent> | ||
106 | </PostBuildEvent> | ||
107 | </PropertyGroup> | ||
108 | </Project> | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj.r921 b/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj.r921 deleted file mode 100644 index fa17367..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj.r921 +++ /dev/null | |||
@@ -1,108 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{1E3F341A-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenGrid.Framework.Data.SQLite</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Library</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenGrid.Framework.Data.SQLite</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>False</Optimize> | ||
35 | <OutputPath>..\..\bin\</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>True</Optimize> | ||
53 | <OutputPath>..\..\bin\</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="System" > | ||
62 | <HintPath>System.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="System.Xml" > | ||
66 | <HintPath>System.Xml.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="System.Data" > | ||
70 | <HintPath>System.Data.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="System.Data.SQLite.dll" > | ||
74 | <HintPath>..\..\bin\System.Data.SQLite.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | <Reference Include="libsecondlife.dll" > | ||
78 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | </ItemGroup> | ||
82 | <ItemGroup> | ||
83 | <ProjectReference Include="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj"> | ||
84 | <Name>OpenGrid.Framework.Data</Name> | ||
85 | <Project>{62CDF671-0000-0000-0000-000000000000}</Project> | ||
86 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
87 | <Private>False</Private> | ||
88 | </ProjectReference> | ||
89 | </ItemGroup> | ||
90 | <ItemGroup> | ||
91 | <Compile Include="SQLiteManager.cs"> | ||
92 | <SubType>Code</SubType> | ||
93 | </Compile> | ||
94 | <Compile Include="SQLiteGridData.cs"> | ||
95 | <SubType>Code</SubType> | ||
96 | </Compile> | ||
97 | <Compile Include="Properties\AssemblyInfo.cs"> | ||
98 | <SubType>Code</SubType> | ||
99 | </Compile> | ||
100 | </ItemGroup> | ||
101 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
102 | <PropertyGroup> | ||
103 | <PreBuildEvent> | ||
104 | </PreBuildEvent> | ||
105 | <PostBuildEvent> | ||
106 | </PostBuildEvent> | ||
107 | </PropertyGroup> | ||
108 | </Project> | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.dll.build b/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.dll.build deleted file mode 100644 index 79b0edf..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.dll.build +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | <?xml version="1.0" ?> | ||
2 | <project name="OpenGrid.Framework.Data.SQLite" default="build"> | ||
3 | <target name="build"> | ||
4 | <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> | ||
5 | <mkdir dir="${project::get-base-directory()}/${build.dir}" /> | ||
6 | <copy todir="${project::get-base-directory()}/${build.dir}"> | ||
7 | <fileset basedir="${project::get-base-directory()}"> | ||
8 | </fileset> | ||
9 | </copy> | ||
10 | <csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll"> | ||
11 | <resources prefix="OpenGrid.Framework.Data.SQLite" dynamicprefix="true" > | ||
12 | </resources> | ||
13 | <sources failonempty="true"> | ||
14 | <include name="SQLiteGridData.cs" /> | ||
15 | <include name="SQLiteManager.cs" /> | ||
16 | <include name="Properties/AssemblyInfo.cs" /> | ||
17 | </sources> | ||
18 | <references basedir="${project::get-base-directory()}"> | ||
19 | <lib> | ||
20 | <include name="${project::get-base-directory()}" /> | ||
21 | <include name="${project::get-base-directory()}/${build.dir}" /> | ||
22 | </lib> | ||
23 | <include name="../../bin/libsecondlife.dll" /> | ||
24 | <include name="../../bin/OpenGrid.Framework.Data.dll" /> | ||
25 | <include name="System.dll" /> | ||
26 | <include name="System.Data.dll" /> | ||
27 | <include name="../../bin/System.Data.SQLite.dll" /> | ||
28 | <include name="System.Xml.dll" /> | ||
29 | </references> | ||
30 | </csc> | ||
31 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> | ||
32 | <mkdir dir="${project::get-base-directory()}/../../bin/"/> | ||
33 | <copy todir="${project::get-base-directory()}/../../bin/"> | ||
34 | <fileset basedir="${project::get-base-directory()}/${build.dir}/" > | ||
35 | <include name="*.dll"/> | ||
36 | <include name="*.exe"/> | ||
37 | </fileset> | ||
38 | </copy> | ||
39 | </target> | ||
40 | <target name="clean"> | ||
41 | <delete dir="${bin.dir}" failonerror="false" /> | ||
42 | <delete dir="${obj.dir}" failonerror="false" /> | ||
43 | </target> | ||
44 | <target name="doc" description="Creates documentation."> | ||
45 | </target> | ||
46 | </project> | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.SQLite/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Framework.Data.SQLite/Properties/AssemblyInfo.cs deleted file mode 100644 index 57c4bae..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/Properties/AssemblyInfo.cs +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | using System.Reflection; | ||
2 | using System.Runtime.CompilerServices; | ||
3 | using System.Runtime.InteropServices; | ||
4 | |||
5 | // General Information about an assembly is controlled through the following | ||
6 | // set of attributes. Change these attribute values to modify the information | ||
7 | // associated with an assembly. | ||
8 | [assembly: AssemblyTitle("OpenGrid.Framework.Data.SQLite")] | ||
9 | [assembly: AssemblyDescription("")] | ||
10 | [assembly: AssemblyConfiguration("")] | ||
11 | [assembly: AssemblyCompany("")] | ||
12 | [assembly: AssemblyProduct("OpenGrid.Framework.Data.SQLite")] | ||
13 | [assembly: AssemblyCopyright("Copyright © 2007")] | ||
14 | [assembly: AssemblyTrademark("")] | ||
15 | [assembly: AssemblyCulture("")] | ||
16 | |||
17 | // Setting ComVisible to false makes the types in this assembly not visible | ||
18 | // to COM components. If you need to access a type in this assembly from | ||
19 | // COM, set the ComVisible attribute to true on that type. | ||
20 | [assembly: ComVisible(false)] | ||
21 | |||
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM | ||
23 | [assembly: Guid("6113d5ce-4547-49f4-9236-0dcc503457b1")] | ||
24 | |||
25 | // Version information for an assembly consists of the following four values: | ||
26 | // | ||
27 | // Major Version | ||
28 | // Minor Version | ||
29 | // Build Number | ||
30 | // Revision | ||
31 | // | ||
32 | // You can specify all the values or you can default the Revision and Build Numbers | ||
33 | // by using the '*' as shown below: | ||
34 | [assembly: AssemblyVersion("1.0.0.0")] | ||
35 | [assembly: AssemblyFileVersion("1.0.0.0")] | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteGridData.cs b/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteGridData.cs deleted file mode 100644 index d7a5a69..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteGridData.cs +++ /dev/null | |||
@@ -1,195 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | using OpenGrid.Framework.Data; | ||
32 | |||
33 | namespace OpenGrid.Framework.Data.SQLite | ||
34 | { | ||
35 | /// <summary> | ||
36 | /// A Grid Interface to the SQLite database | ||
37 | /// </summary> | ||
38 | public class SQLiteGridData : IGridData | ||
39 | { | ||
40 | /// <summary> | ||
41 | /// A database manager | ||
42 | /// </summary> | ||
43 | private SQLiteManager database; | ||
44 | |||
45 | /// <summary> | ||
46 | /// Initialises the Grid Interface | ||
47 | /// </summary> | ||
48 | public void Initialise() | ||
49 | { | ||
50 | database = new SQLiteManager("localhost", "db", "user", "password", "false"); | ||
51 | } | ||
52 | |||
53 | /// <summary> | ||
54 | /// Shuts down the grid interface | ||
55 | /// </summary> | ||
56 | public void Close() | ||
57 | { | ||
58 | database.Close(); | ||
59 | } | ||
60 | |||
61 | /// <summary> | ||
62 | /// Returns the name of this grid interface | ||
63 | /// </summary> | ||
64 | /// <returns>A string containing the grid interface</returns> | ||
65 | public string getName() | ||
66 | { | ||
67 | return "SQLite OpenGridData"; | ||
68 | } | ||
69 | |||
70 | /// <summary> | ||
71 | /// Returns the version of this grid interface | ||
72 | /// </summary> | ||
73 | /// <returns>A string containing the version</returns> | ||
74 | public string getVersion() | ||
75 | { | ||
76 | return "0.1"; | ||
77 | } | ||
78 | |||
79 | /// <summary> | ||
80 | /// Returns a list of regions within the specified ranges | ||
81 | /// </summary> | ||
82 | /// <param name="a">minimum X coordinate</param> | ||
83 | /// <param name="b">minimum Y coordinate</param> | ||
84 | /// <param name="c">maximum X coordinate</param> | ||
85 | /// <param name="d">maximum Y coordinate</param> | ||
86 | /// <returns>An array of region profiles</returns> | ||
87 | public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d) | ||
88 | { | ||
89 | return null; | ||
90 | } | ||
91 | |||
92 | /// <summary> | ||
93 | /// Returns a sim profile from it's location | ||
94 | /// </summary> | ||
95 | /// <param name="handle">Region location handle</param> | ||
96 | /// <returns>Sim profile</returns> | ||
97 | public SimProfileData GetProfileByHandle(ulong handle) | ||
98 | { | ||
99 | Dictionary<string, string> param = new Dictionary<string, string>(); | ||
100 | param["handle"] = handle.ToString(); | ||
101 | |||
102 | System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE handle = @handle", param); | ||
103 | System.Data.IDataReader reader = result.ExecuteReader(); | ||
104 | |||
105 | SimProfileData row = database.getRow(reader); | ||
106 | reader.Close(); | ||
107 | result.Dispose(); | ||
108 | |||
109 | return row; | ||
110 | } | ||
111 | |||
112 | /// <summary> | ||
113 | /// Returns a sim profile from it's UUID | ||
114 | /// </summary> | ||
115 | /// <param name="uuid">The region UUID</param> | ||
116 | /// <returns>The sim profile</returns> | ||
117 | public SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID uuid) | ||
118 | { | ||
119 | Dictionary<string, string> param = new Dictionary<string, string>(); | ||
120 | param["uuid"] = uuid.ToStringHyphenated(); | ||
121 | |||
122 | System.Data.IDbCommand result = database.Query("SELECT * FROM regions WHERE uuid = @uuid", param); | ||
123 | System.Data.IDataReader reader = result.ExecuteReader(); | ||
124 | |||
125 | SimProfileData row = database.getRow(reader); | ||
126 | reader.Close(); | ||
127 | result.Dispose(); | ||
128 | |||
129 | return row; | ||
130 | } | ||
131 | |||
132 | /// <summary> | ||
133 | /// Adds a new specified region to the database | ||
134 | /// </summary> | ||
135 | /// <param name="profile">The profile to add</param> | ||
136 | /// <returns>A dataresponse enum indicating success</returns> | ||
137 | public DataResponse AddProfile(SimProfileData profile) | ||
138 | { | ||
139 | if (database.insertRow(profile)) | ||
140 | { | ||
141 | return DataResponse.RESPONSE_OK; | ||
142 | } | ||
143 | else | ||
144 | { | ||
145 | return DataResponse.RESPONSE_ERROR; | ||
146 | } | ||
147 | } | ||
148 | |||
149 | /// <summary> | ||
150 | /// DEPRECIATED. Attempts to authenticate a region by comparing a shared secret. | ||
151 | /// </summary> | ||
152 | /// <param name="uuid">The UUID of the challenger</param> | ||
153 | /// <param name="handle">The attempted regionHandle of the challenger</param> | ||
154 | /// <param name="authkey">The secret</param> | ||
155 | /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns> | ||
156 | public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authkey) | ||
157 | { | ||
158 | bool throwHissyFit = false; // Should be true by 1.0 | ||
159 | |||
160 | if (throwHissyFit) | ||
161 | throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential."); | ||
162 | |||
163 | SimProfileData data = GetProfileByLLUUID(uuid); | ||
164 | |||
165 | return (handle == data.regionHandle && authkey == data.regionSecret); | ||
166 | } | ||
167 | |||
168 | /// <summary> | ||
169 | /// NOT YET FUNCTIONAL. Provides a cryptographic authentication of a region | ||
170 | /// </summary> | ||
171 | /// <remarks>This requires a security audit.</remarks> | ||
172 | /// <param name="uuid"></param> | ||
173 | /// <param name="handle"></param> | ||
174 | /// <param name="authhash"></param> | ||
175 | /// <param name="challenge"></param> | ||
176 | /// <returns></returns> | ||
177 | public bool AuthenticateSim(libsecondlife.LLUUID uuid, ulong handle, string authhash, string challenge) | ||
178 | { | ||
179 | System.Security.Cryptography.SHA512Managed HashProvider = new System.Security.Cryptography.SHA512Managed(); | ||
180 | System.Text.ASCIIEncoding TextProvider = new ASCIIEncoding(); | ||
181 | |||
182 | byte[] stream = TextProvider.GetBytes(uuid.ToStringHyphenated() + ":" + handle.ToString() + ":" + challenge); | ||
183 | byte[] hash = HashProvider.ComputeHash(stream); | ||
184 | |||
185 | return false; | ||
186 | } | ||
187 | |||
188 | public ReservationData GetReservationAtPoint(uint x, uint y) | ||
189 | { | ||
190 | return null; | ||
191 | } | ||
192 | } | ||
193 | |||
194 | |||
195 | } | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs b/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs deleted file mode 100644 index 9689356..0000000 --- a/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs +++ /dev/null | |||
@@ -1,209 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | using System.Data; | ||
32 | |||
33 | using System.Data.SQLite; | ||
34 | |||
35 | using OpenGrid.Framework.Data; | ||
36 | |||
37 | namespace OpenGrid.Framework.Data.SQLite | ||
38 | { | ||
39 | class SQLiteManager | ||
40 | { | ||
41 | IDbConnection dbcon; | ||
42 | |||
43 | /// <summary> | ||
44 | /// Initialises and creates a new SQLite connection and maintains it. | ||
45 | /// </summary> | ||
46 | /// <param name="hostname">The SQLite server being connected to</param> | ||
47 | /// <param name="database">The name of the SQLite database being used</param> | ||
48 | /// <param name="username">The username logging into the database</param> | ||
49 | /// <param name="password">The password for the user logging in</param> | ||
50 | /// <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> | ||
51 | public SQLiteManager(string hostname, string database, string username, string password, string cpooling) | ||
52 | { | ||
53 | try | ||
54 | { | ||
55 | string connectionString = "URI=file:GridServerSqlite.db;"; | ||
56 | dbcon = new SQLiteConnection(connectionString); | ||
57 | |||
58 | dbcon.Open(); | ||
59 | } | ||
60 | catch (Exception e) | ||
61 | { | ||
62 | throw new Exception("Error initialising SQLite Database: " + e.ToString()); | ||
63 | } | ||
64 | } | ||
65 | |||
66 | /// <summary> | ||
67 | /// Shuts down the database connection | ||
68 | /// </summary> | ||
69 | public void Close() | ||
70 | { | ||
71 | dbcon.Close(); | ||
72 | dbcon = null; | ||
73 | } | ||
74 | |||
75 | /// <summary> | ||
76 | /// Runs a query with protection against SQL Injection by using parameterised input. | ||
77 | /// </summary> | ||
78 | /// <param name="sql">The SQL string - replace any variables such as WHERE x = "y" with WHERE x = @y</param> | ||
79 | /// <param name="parameters">The parameters - index so that @y is indexed as 'y'</param> | ||
80 | /// <returns>A SQLite DB Command</returns> | ||
81 | public IDbCommand Query(string sql, Dictionary<string, string> parameters) | ||
82 | { | ||
83 | SQLiteCommand dbcommand = (SQLiteCommand)dbcon.CreateCommand(); | ||
84 | dbcommand.CommandText = sql; | ||
85 | foreach (KeyValuePair<string, string> param in parameters) | ||
86 | { | ||
87 | SQLiteParameter paramx = new SQLiteParameter(param.Key,param.Value); | ||
88 | dbcommand.Parameters.Add(paramx); | ||
89 | } | ||
90 | |||
91 | return (IDbCommand)dbcommand; | ||
92 | } | ||
93 | |||
94 | /// <summary> | ||
95 | /// Reads a region row from a database reader | ||
96 | /// </summary> | ||
97 | /// <param name="reader">An active database reader</param> | ||
98 | /// <returns>A region profile</returns> | ||
99 | public SimProfileData getRow(IDataReader reader) | ||
100 | { | ||
101 | SimProfileData retval = new SimProfileData(); | ||
102 | |||
103 | if (reader.Read()) | ||
104 | { | ||
105 | // Region Main | ||
106 | retval.regionHandle = (ulong)reader["regionHandle"]; | ||
107 | retval.regionName = (string)reader["regionName"]; | ||
108 | retval.UUID = new libsecondlife.LLUUID((string)reader["uuid"]); | ||
109 | |||
110 | // Secrets | ||
111 | retval.regionRecvKey = (string)reader["regionRecvKey"]; | ||
112 | retval.regionSecret = (string)reader["regionSecret"]; | ||
113 | retval.regionSendKey = (string)reader["regionSendKey"]; | ||
114 | |||
115 | // Region Server | ||
116 | retval.regionDataURI = (string)reader["regionDataURI"]; | ||
117 | retval.regionOnline = false; // Needs to be pinged before this can be set. | ||
118 | retval.serverIP = (string)reader["serverIP"]; | ||
119 | retval.serverPort = (uint)reader["serverPort"]; | ||
120 | retval.serverURI = (string)reader["serverURI"]; | ||
121 | |||
122 | // Location | ||
123 | retval.regionLocX = (uint)((int)reader["locX"]); | ||
124 | retval.regionLocY = (uint)((int)reader["locY"]); | ||
125 | retval.regionLocZ = (uint)((int)reader["locZ"]); | ||
126 | |||
127 | // Neighbours - 0 = No Override | ||
128 | retval.regionEastOverrideHandle = (ulong)reader["eastOverrideHandle"]; | ||
129 | retval.regionWestOverrideHandle = (ulong)reader["westOverrideHandle"]; | ||
130 | retval.regionSouthOverrideHandle = (ulong)reader["southOverrideHandle"]; | ||
131 | retval.regionNorthOverrideHandle = (ulong)reader["northOverrideHandle"]; | ||
132 | |||
133 | // Assets | ||
134 | retval.regionAssetURI = (string)reader["regionAssetURI"]; | ||
135 | retval.regionAssetRecvKey = (string)reader["regionAssetRecvKey"]; | ||
136 | retval.regionAssetSendKey = (string)reader["regionAssetSendKey"]; | ||
137 | |||
138 | // Userserver | ||
139 | retval.regionUserURI = (string)reader["regionUserURI"]; | ||
140 | retval.regionUserRecvKey = (string)reader["regionUserRecvKey"]; | ||
141 | retval.regionUserSendKey = (string)reader["regionUserSendKey"]; | ||
142 | } | ||
143 | else | ||
144 | { | ||
145 | throw new Exception("No rows to return"); | ||
146 | } | ||
147 | return retval; | ||
148 | } | ||
149 | |||
150 | /// <summary> | ||
151 | /// Inserts a new region into the database | ||
152 | /// </summary> | ||
153 | /// <param name="profile">The region to insert</param> | ||
154 | /// <returns>Success?</returns> | ||
155 | public bool insertRow(SimProfileData profile) | ||
156 | { | ||
157 | string sql = "REPLACE INTO regions VALUES (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, "; | ||
158 | sql += "serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, "; | ||
159 | sql += "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey) VALUES "; | ||
160 | |||
161 | sql += "(@regionHandle, @regionName, @uuid, @regionRecvKey, @regionSecret, @regionSendKey, @regionDataURI, "; | ||
162 | sql += "@serverIP, @serverPort, @serverURI, @locX, @locY, @locZ, @eastOverrideHandle, @westOverrideHandle, @southOverrideHandle, @northOverrideHandle, @regionAssetURI, @regionAssetRecvKey, "; | ||
163 | sql += "@regionAssetSendKey, @regionUserURI, @regionUserRecvKey, @regionUserSendKey);"; | ||
164 | |||
165 | Dictionary<string, string> parameters = new Dictionary<string, string>(); | ||
166 | |||
167 | parameters["regionHandle"] = profile.regionHandle.ToString(); | ||
168 | parameters["regionName"] = profile.regionName; | ||
169 | parameters["uuid"] = profile.UUID.ToString(); | ||
170 | parameters["regionRecvKey"] = profile.regionRecvKey; | ||
171 | parameters["regionSendKey"] = profile.regionSendKey; | ||
172 | parameters["regionDataURI"] = profile.regionDataURI; | ||
173 | parameters["serverIP"] = profile.serverIP; | ||
174 | parameters["serverPort"] = profile.serverPort.ToString(); | ||
175 | parameters["serverURI"] = profile.serverURI; | ||
176 | parameters["locX"] = profile.regionLocX.ToString(); | ||
177 | parameters["locY"] = profile.regionLocY.ToString(); | ||
178 | parameters["locZ"] = profile.regionLocZ.ToString(); | ||
179 | parameters["eastOverrideHandle"] = profile.regionEastOverrideHandle.ToString(); | ||
180 | parameters["westOverrideHandle"] = profile.regionWestOverrideHandle.ToString(); | ||
181 | parameters["northOverrideHandle"] = profile.regionNorthOverrideHandle.ToString(); | ||
182 | parameters["southOverrideHandle"] = profile.regionSouthOverrideHandle.ToString(); | ||
183 | parameters["regionAssetURI"] = profile.regionAssetURI; | ||
184 | parameters["regionAssetRecvKey"] = profile.regionAssetRecvKey; | ||
185 | parameters["regionAssetSendKey"] = profile.regionAssetSendKey; | ||
186 | parameters["regionUserURI"] = profile.regionUserURI; | ||
187 | parameters["regionUserRecvKey"] = profile.regionUserRecvKey; | ||
188 | parameters["regionUserSendKey"] = profile.regionUserSendKey; | ||
189 | |||
190 | bool returnval = false; | ||
191 | |||
192 | try | ||
193 | { | ||
194 | IDbCommand result = Query(sql, parameters); | ||
195 | |||
196 | if (result.ExecuteNonQuery() == 1) | ||
197 | returnval = true; | ||
198 | |||
199 | result.Dispose(); | ||
200 | } | ||
201 | catch (Exception e) | ||
202 | { | ||
203 | return false; | ||
204 | } | ||
205 | |||
206 | return returnval; | ||
207 | } | ||
208 | } | ||
209 | } | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs b/OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs deleted file mode 100644 index dfc572a..0000000 --- a/OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs +++ /dev/null | |||
@@ -1,140 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using Nwc.XmlRpc; | ||
29 | using OpenSim.Framework; | ||
30 | using OpenSim.Servers; | ||
31 | using System.Collections; | ||
32 | using System.Collections.Generic; | ||
33 | using libsecondlife; | ||
34 | |||
35 | namespace OpenGrid.Framework.Manager | ||
36 | { | ||
37 | /// <summary> | ||
38 | /// Used to pass messages to the gridserver | ||
39 | /// </summary> | ||
40 | /// <param name="param">Pass this argument</param> | ||
41 | public delegate void GridManagerCallback(string param); | ||
42 | |||
43 | /// <summary> | ||
44 | /// Serverside listener for grid commands | ||
45 | /// </summary> | ||
46 | public class GridManagementAgent | ||
47 | { | ||
48 | /// <summary> | ||
49 | /// Passes grid server messages | ||
50 | /// </summary> | ||
51 | private GridManagerCallback thecallback; | ||
52 | |||
53 | /// <summary> | ||
54 | /// Security keys | ||
55 | /// </summary> | ||
56 | private string sendkey; | ||
57 | private string recvkey; | ||
58 | |||
59 | /// <summary> | ||
60 | /// Our component type | ||
61 | /// </summary> | ||
62 | private string component_type; | ||
63 | |||
64 | /// <summary> | ||
65 | /// List of active sessions | ||
66 | /// </summary> | ||
67 | private static ArrayList Sessions; | ||
68 | |||
69 | /// <summary> | ||
70 | /// Initialises a new GridManagementAgent | ||
71 | /// </summary> | ||
72 | /// <param name="app_httpd">HTTP Daemon for this server</param> | ||
73 | /// <param name="component_type">What component type are we?</param> | ||
74 | /// <param name="sendkey">Security send key</param> | ||
75 | /// <param name="recvkey">Security recieve key</param> | ||
76 | /// <param name="thecallback">Message callback</param> | ||
77 | public GridManagementAgent(BaseHttpServer app_httpd, string component_type, string sendkey, string recvkey, GridManagerCallback thecallback) | ||
78 | { | ||
79 | this.sendkey = sendkey; | ||
80 | this.recvkey = recvkey; | ||
81 | this.component_type = component_type; | ||
82 | this.thecallback = thecallback; | ||
83 | Sessions = new ArrayList(); | ||
84 | |||
85 | app_httpd.AddXmlRPCHandler("manager_login", XmlRpcLoginMethod); | ||
86 | |||
87 | switch (component_type) | ||
88 | { | ||
89 | case "gridserver": | ||
90 | GridServerManager.sendkey = this.sendkey; | ||
91 | GridServerManager.recvkey = this.recvkey; | ||
92 | GridServerManager.thecallback = thecallback; | ||
93 | app_httpd.AddXmlRPCHandler("shutdown", GridServerManager.XmlRpcShutdownMethod); | ||
94 | break; | ||
95 | } | ||
96 | } | ||
97 | |||
98 | /// <summary> | ||
99 | /// Checks if a session exists | ||
100 | /// </summary> | ||
101 | /// <param name="sessionID">The session ID</param> | ||
102 | /// <returns>Exists?</returns> | ||
103 | public static bool SessionExists(LLUUID sessionID) | ||
104 | { | ||
105 | return Sessions.Contains(sessionID); | ||
106 | } | ||
107 | |||
108 | /// <summary> | ||
109 | /// Logs a new session to the grid manager | ||
110 | /// </summary> | ||
111 | /// <param name="request">the XMLRPC request</param> | ||
112 | /// <returns>An XMLRPC reply</returns> | ||
113 | public static XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request) | ||
114 | { | ||
115 | XmlRpcResponse response = new XmlRpcResponse(); | ||
116 | Hashtable requestData = (Hashtable)request.Params[0]; | ||
117 | Hashtable responseData = new Hashtable(); | ||
118 | |||
119 | // TODO: Switch this over to using OpenGrid.Framework.Data | ||
120 | if (requestData["username"].Equals("admin") && requestData["password"].Equals("supersecret")) | ||
121 | { | ||
122 | response.IsFault = false; | ||
123 | LLUUID new_session = LLUUID.Random(); | ||
124 | Sessions.Add(new_session); | ||
125 | responseData["session_id"] = new_session.ToString(); | ||
126 | responseData["msg"] = "Login OK"; | ||
127 | } | ||
128 | else | ||
129 | { | ||
130 | response.IsFault = true; | ||
131 | responseData["error"] = "Invalid username or password"; | ||
132 | } | ||
133 | |||
134 | response.Value = responseData; | ||
135 | return response; | ||
136 | |||
137 | } | ||
138 | |||
139 | } | ||
140 | } | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs b/OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs deleted file mode 100644 index e276556..0000000 --- a/OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | |||
29 | using System; | ||
30 | using System.Collections; | ||
31 | using System.Collections.Generic; | ||
32 | using Nwc.XmlRpc; | ||
33 | using System.Threading; | ||
34 | using libsecondlife; | ||
35 | |||
36 | namespace OpenGrid.Framework.Manager { | ||
37 | |||
38 | /// <summary> | ||
39 | /// A remote management system for the grid server | ||
40 | /// </summary> | ||
41 | public class GridServerManager | ||
42 | { | ||
43 | /// <summary> | ||
44 | /// Triggers events from the grid manager | ||
45 | /// </summary> | ||
46 | public static GridManagerCallback thecallback; | ||
47 | |||
48 | /// <summary> | ||
49 | /// Security keys | ||
50 | /// </summary> | ||
51 | public static string sendkey; | ||
52 | public static string recvkey; | ||
53 | |||
54 | /// <summary> | ||
55 | /// Disconnects the grid server and shuts it down | ||
56 | /// </summary> | ||
57 | /// <param name="request">XmlRpc Request</param> | ||
58 | /// <returns>An XmlRpc response containing either a "msg" or an "error"</returns> | ||
59 | public static XmlRpcResponse XmlRpcShutdownMethod(XmlRpcRequest request) | ||
60 | { | ||
61 | XmlRpcResponse response = new XmlRpcResponse(); | ||
62 | Hashtable requestData = (Hashtable)request.Params[0]; | ||
63 | Hashtable responseData = new Hashtable(); | ||
64 | |||
65 | if(requestData.ContainsKey("session_id")) { | ||
66 | if(GridManagementAgent.SessionExists(new LLUUID((string)requestData["session_id"]))) { | ||
67 | responseData["msg"]="Shutdown command accepted"; | ||
68 | (new Thread(new ThreadStart(ShutdownServer))).Start(); | ||
69 | } else { | ||
70 | response.IsFault=true; | ||
71 | responseData["error"]="bad session ID"; | ||
72 | } | ||
73 | } else { | ||
74 | response.IsFault=true; | ||
75 | responseData["error"]="no session ID"; | ||
76 | } | ||
77 | |||
78 | response.Value = responseData; | ||
79 | return response; | ||
80 | } | ||
81 | |||
82 | /// <summary> | ||
83 | /// Shuts down the grid server | ||
84 | /// </summary> | ||
85 | public static void ShutdownServer() | ||
86 | { | ||
87 | Console.WriteLine("Shutting down the grid server - recieved a grid manager request"); | ||
88 | Console.WriteLine("Terminating in three seconds..."); | ||
89 | Thread.Sleep(3000); | ||
90 | thecallback("shutdown"); | ||
91 | } | ||
92 | } | ||
93 | } | ||
94 | |||
diff --git a/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj b/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj deleted file mode 100644 index e1c9f42..0000000 --- a/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{7924FD35-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenGrid.Framework.Manager</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Library</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenGrid.Framework.Manager</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>False</Optimize> | ||
35 | <OutputPath>..\..\bin\</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>True</Optimize> | ||
53 | <OutputPath>..\..\bin\</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="libsecondlife.dll" > | ||
62 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="OpenSim.Framework" > | ||
66 | <HintPath>OpenSim.Framework.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="OpenSim.Servers" > | ||
70 | <HintPath>OpenSim.Servers.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="System" > | ||
74 | <HintPath>System.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | <Reference Include="XMLRPC" > | ||
78 | <HintPath>XMLRPC.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | </ItemGroup> | ||
82 | <ItemGroup> | ||
83 | </ItemGroup> | ||
84 | <ItemGroup> | ||
85 | <Compile Include="GridManagementAgent.cs"> | ||
86 | <SubType>Code</SubType> | ||
87 | </Compile> | ||
88 | <Compile Include="GridServerManager.cs"> | ||
89 | <SubType>Code</SubType> | ||
90 | </Compile> | ||
91 | </ItemGroup> | ||
92 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
93 | <PropertyGroup> | ||
94 | <PreBuildEvent> | ||
95 | </PreBuildEvent> | ||
96 | <PostBuildEvent> | ||
97 | </PostBuildEvent> | ||
98 | </PropertyGroup> | ||
99 | </Project> | ||
diff --git a/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build b/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build deleted file mode 100644 index 9430ab9..0000000 --- a/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | <?xml version="1.0" ?> | ||
2 | <project name="OpenGrid.Framework.Manager" default="build"> | ||
3 | <target name="build"> | ||
4 | <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> | ||
5 | <mkdir dir="${project::get-base-directory()}/${build.dir}" /> | ||
6 | <copy todir="${project::get-base-directory()}/${build.dir}"> | ||
7 | <fileset basedir="${project::get-base-directory()}"> | ||
8 | </fileset> | ||
9 | </copy> | ||
10 | <csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll"> | ||
11 | <resources prefix="OpenGrid.Framework.Manager" dynamicprefix="true" > | ||
12 | </resources> | ||
13 | <sources failonempty="true"> | ||
14 | <include name="GridManagementAgent.cs" /> | ||
15 | <include name="GridServerManager.cs" /> | ||
16 | </sources> | ||
17 | <references basedir="${project::get-base-directory()}"> | ||
18 | <lib> | ||
19 | <include name="${project::get-base-directory()}" /> | ||
20 | <include name="${project::get-base-directory()}/${build.dir}" /> | ||
21 | </lib> | ||
22 | <include name="../../bin/libsecondlife.dll" /> | ||
23 | <include name="../../bin/OpenSim.Framework.dll" /> | ||
24 | <include name="../../bin/OpenSim.Servers.dll" /> | ||
25 | <include name="System.dll" /> | ||
26 | <include name="../../bin/XMLRPC.dll" /> | ||
27 | </references> | ||
28 | </csc> | ||
29 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> | ||
30 | <mkdir dir="${project::get-base-directory()}/../../bin/"/> | ||
31 | <copy todir="${project::get-base-directory()}/../../bin/"> | ||
32 | <fileset basedir="${project::get-base-directory()}/${build.dir}/" > | ||
33 | <include name="*.dll"/> | ||
34 | <include name="*.exe"/> | ||
35 | </fileset> | ||
36 | </copy> | ||
37 | </target> | ||
38 | <target name="clean"> | ||
39 | <delete dir="${bin.dir}" failonerror="false" /> | ||
40 | <delete dir="${obj.dir}" failonerror="false" /> | ||
41 | </target> | ||
42 | <target name="doc" description="Creates documentation."> | ||
43 | </target> | ||
44 | </project> | ||
diff --git a/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs b/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs deleted file mode 100644 index 6fc6bf8..0000000 --- a/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs +++ /dev/null | |||
@@ -1,130 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Net; | ||
31 | using System.Text; | ||
32 | using System.Text.RegularExpressions; | ||
33 | using System.Threading; | ||
34 | //using OpenSim.CAPS; | ||
35 | using Nwc.XmlRpc; | ||
36 | using System.Collections; | ||
37 | using OpenSim.Framework.Console; | ||
38 | using OpenSim.Servers; | ||
39 | |||
40 | namespace OpenGridServices.AssetServer | ||
41 | { | ||
42 | /// <summary> | ||
43 | /// An HTTP server for sending assets | ||
44 | /// </summary> | ||
45 | public class AssetHttpServer :BaseHttpServer | ||
46 | { | ||
47 | /// <summary> | ||
48 | /// Creates the new asset server | ||
49 | /// </summary> | ||
50 | /// <param name="port">Port to initalise on</param> | ||
51 | public AssetHttpServer(int port) | ||
52 | : base(port) | ||
53 | { | ||
54 | } | ||
55 | |||
56 | /// <summary> | ||
57 | /// Handles an HTTP request | ||
58 | /// </summary> | ||
59 | /// <param name="stateinfo">HTTP State Info</param> | ||
60 | public override void HandleRequest(Object stateinfo) | ||
61 | { | ||
62 | try | ||
63 | { | ||
64 | HttpListenerContext context = (HttpListenerContext)stateinfo; | ||
65 | |||
66 | HttpListenerRequest request = context.Request; | ||
67 | HttpListenerResponse response = context.Response; | ||
68 | |||
69 | response.KeepAlive = false; | ||
70 | response.SendChunked = false; | ||
71 | |||
72 | System.IO.Stream body = request.InputStream; | ||
73 | System.Text.Encoding encoding = System.Text.Encoding.UTF8; | ||
74 | System.IO.StreamReader reader = new System.IO.StreamReader(body, encoding); | ||
75 | |||
76 | string requestBody = reader.ReadToEnd(); | ||
77 | body.Close(); | ||
78 | reader.Close(); | ||
79 | |||
80 | //Console.WriteLine(request.HttpMethod + " " + request.RawUrl + " Http/" + request.ProtocolVersion.ToString() + " content type: " + request.ContentType); | ||
81 | //Console.WriteLine(requestBody); | ||
82 | |||
83 | string responseString = ""; | ||
84 | switch (request.ContentType) | ||
85 | { | ||
86 | case "text/xml": | ||
87 | // must be XML-RPC, so pass to the XML-RPC parser | ||
88 | |||
89 | responseString = ParseXMLRPC(requestBody); | ||
90 | responseString = Regex.Replace(responseString, "utf-16", "utf-8"); | ||
91 | |||
92 | response.AddHeader("Content-type", "text/xml"); | ||
93 | break; | ||
94 | |||
95 | case "application/xml": | ||
96 | // probably LLSD we hope, otherwise it should be ignored by the parser | ||
97 | responseString = ParseLLSDXML(requestBody); | ||
98 | response.AddHeader("Content-type", "application/xml"); | ||
99 | break; | ||
100 | |||
101 | case "application/x-www-form-urlencoded": | ||
102 | // a form data POST so send to the REST parser | ||
103 | responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod); | ||
104 | response.AddHeader("Content-type", "text/plain"); | ||
105 | break; | ||
106 | |||
107 | case null: | ||
108 | // must be REST or invalid crap, so pass to the REST parser | ||
109 | responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod); | ||
110 | response.AddHeader("Content-type", "text/plain"); | ||
111 | break; | ||
112 | |||
113 | } | ||
114 | |||
115 | Encoding Windows1252Encoding = Encoding.GetEncoding(1252); | ||
116 | byte[] buffer = Windows1252Encoding.GetBytes(responseString); | ||
117 | System.IO.Stream output = response.OutputStream; | ||
118 | response.SendChunked = false; | ||
119 | response.ContentLength64 = buffer.Length; | ||
120 | output.Write(buffer, 0, buffer.Length); | ||
121 | output.Close(); | ||
122 | } | ||
123 | catch (Exception e) | ||
124 | { | ||
125 | Console.WriteLine(e.ToString()); | ||
126 | } | ||
127 | } | ||
128 | |||
129 | } | ||
130 | } | ||
diff --git a/OpenGridServices/OpenGridServices.AssetServer/Main.cs b/OpenGridServices/OpenGridServices.AssetServer/Main.cs deleted file mode 100644 index 96c9dba..0000000 --- a/OpenGridServices/OpenGridServices.AssetServer/Main.cs +++ /dev/null | |||
@@ -1,337 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | |||
29 | using System; | ||
30 | using System.IO; | ||
31 | using System.Text; | ||
32 | using System.Timers; | ||
33 | using System.Net; | ||
34 | using System.Reflection; | ||
35 | using System.Threading; | ||
36 | using libsecondlife; | ||
37 | using OpenSim.Framework; | ||
38 | using OpenSim.Framework.Sims; | ||
39 | using OpenSim.Framework.Console; | ||
40 | using OpenSim.Framework.Types; | ||
41 | using OpenSim.Framework.Interfaces; | ||
42 | using OpenSim.Framework.Utilities; | ||
43 | using OpenSim.Servers; | ||
44 | using Db4objects.Db4o; | ||
45 | using Db4objects.Db4o.Query; | ||
46 | |||
47 | namespace OpenGridServices.AssetServer | ||
48 | { | ||
49 | /// <summary> | ||
50 | /// An asset server | ||
51 | /// </summary> | ||
52 | public class OpenAsset_Main : conscmd_callback | ||
53 | { | ||
54 | private IObjectContainer db; | ||
55 | |||
56 | public static OpenAsset_Main assetserver; | ||
57 | |||
58 | private LogBase m_console; | ||
59 | |||
60 | [STAThread] | ||
61 | public static void Main(string[] args) | ||
62 | { | ||
63 | Console.WriteLine("Starting...\n"); | ||
64 | |||
65 | assetserver = new OpenAsset_Main(); | ||
66 | assetserver.Startup(); | ||
67 | |||
68 | assetserver.Work(); | ||
69 | } | ||
70 | |||
71 | private void Work() | ||
72 | { | ||
73 | m_console.Notice("Enter help for a list of commands"); | ||
74 | |||
75 | while (true) | ||
76 | { | ||
77 | m_console.MainLogPrompt(); | ||
78 | } | ||
79 | } | ||
80 | |||
81 | private OpenAsset_Main() | ||
82 | { | ||
83 | m_console = new LogBase("opengrid-AssetServer-console.log", "OpenAsset", this, false); | ||
84 | OpenSim.Framework.Console.MainLog.Instance = m_console; | ||
85 | } | ||
86 | |||
87 | public void Startup() | ||
88 | { | ||
89 | m_console.Verbose( "Main.cs:Startup() - Setting up asset DB"); | ||
90 | setupDB(); | ||
91 | |||
92 | m_console.Verbose( "Main.cs:Startup() - Starting HTTP process"); | ||
93 | AssetHttpServer httpServer = new AssetHttpServer(8003); | ||
94 | |||
95 | |||
96 | httpServer.AddRestHandler("GET", "/assets/", this.assetGetMethod); | ||
97 | httpServer.AddRestHandler("POST", "/assets/", this.assetPostMethod); | ||
98 | |||
99 | httpServer.Start(); | ||
100 | |||
101 | } | ||
102 | |||
103 | public string assetPostMethod(string requestBody, string path, string param) | ||
104 | { | ||
105 | AssetBase asset = new AssetBase(); | ||
106 | asset.Name = ""; | ||
107 | asset.FullID = new LLUUID(param); | ||
108 | Encoding Windows1252Encoding = Encoding.GetEncoding(1252); | ||
109 | byte[] buffer = Windows1252Encoding.GetBytes(requestBody); | ||
110 | asset.Data = buffer; | ||
111 | AssetStorage store = new AssetStorage(); | ||
112 | store.Data = asset.Data; | ||
113 | store.Name = asset.Name; | ||
114 | store.UUID = asset.FullID; | ||
115 | db.Set(store); | ||
116 | db.Commit(); | ||
117 | return ""; | ||
118 | } | ||
119 | |||
120 | public string assetGetMethod(string request, string path, string param) | ||
121 | { | ||
122 | Console.WriteLine("got a request " + param); | ||
123 | byte[] assetdata = getAssetData(new LLUUID(param), false); | ||
124 | if (assetdata != null) | ||
125 | { | ||
126 | Encoding Windows1252Encoding = Encoding.GetEncoding(1252); | ||
127 | string ret = Windows1252Encoding.GetString(assetdata); | ||
128 | //string ret = System.Text.Encoding.Unicode.GetString(assetdata); | ||
129 | |||
130 | return ret; | ||
131 | |||
132 | } | ||
133 | else | ||
134 | { | ||
135 | return ""; | ||
136 | } | ||
137 | |||
138 | } | ||
139 | |||
140 | public byte[] getAssetData(LLUUID assetID, bool isTexture) | ||
141 | { | ||
142 | bool found = false; | ||
143 | AssetStorage foundAsset = null; | ||
144 | |||
145 | IObjectSet result = db.Get(new AssetStorage(assetID)); | ||
146 | if (result.Count > 0) | ||
147 | { | ||
148 | foundAsset = (AssetStorage)result.Next(); | ||
149 | found = true; | ||
150 | } | ||
151 | |||
152 | if (found) | ||
153 | { | ||
154 | return foundAsset.Data; | ||
155 | } | ||
156 | else | ||
157 | { | ||
158 | return null; | ||
159 | } | ||
160 | } | ||
161 | |||
162 | public void setupDB() | ||
163 | { | ||
164 | bool yapfile = System.IO.File.Exists("assets.yap"); | ||
165 | try | ||
166 | { | ||
167 | db = Db4oFactory.OpenFile("assets.yap"); | ||
168 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Main.cs:setupDB() - creation"); | ||
169 | } | ||
170 | catch (Exception e) | ||
171 | { | ||
172 | db.Close(); | ||
173 | OpenSim.Framework.Console.MainLog.Instance.Warn("Main.cs:setupDB() - Exception occured"); | ||
174 | OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); | ||
175 | } | ||
176 | if (!yapfile) | ||
177 | { | ||
178 | this.LoadDB(); | ||
179 | } | ||
180 | } | ||
181 | |||
182 | public void LoadDB() | ||
183 | { | ||
184 | try | ||
185 | { | ||
186 | |||
187 | Console.WriteLine("setting up Asset database"); | ||
188 | |||
189 | AssetBase Image = new AssetBase(); | ||
190 | Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000001"); | ||
191 | Image.Name = "Bricks"; | ||
192 | this.LoadAsset(Image, true, "bricks.jp2"); | ||
193 | AssetStorage store = new AssetStorage(); | ||
194 | store.Data = Image.Data; | ||
195 | store.Name = Image.Name; | ||
196 | store.UUID = Image.FullID; | ||
197 | db.Set(store); | ||
198 | db.Commit(); | ||
199 | |||
200 | Image = new AssetBase(); | ||
201 | Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000002"); | ||
202 | Image.Name = "Plywood"; | ||
203 | this.LoadAsset(Image, true, "plywood.jp2"); | ||
204 | store = new AssetStorage(); | ||
205 | store.Data = Image.Data; | ||
206 | store.Name = Image.Name; | ||
207 | store.UUID = Image.FullID; | ||
208 | db.Set(store); | ||
209 | db.Commit(); | ||
210 | |||
211 | Image = new AssetBase(); | ||
212 | Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000003"); | ||
213 | Image.Name = "Rocks"; | ||
214 | this.LoadAsset(Image, true, "rocks.jp2"); | ||
215 | store = new AssetStorage(); | ||
216 | store.Data = Image.Data; | ||
217 | store.Name = Image.Name; | ||
218 | store.UUID = Image.FullID; | ||
219 | db.Set(store); | ||
220 | db.Commit(); | ||
221 | |||
222 | Image = new AssetBase(); | ||
223 | Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000004"); | ||
224 | Image.Name = "Granite"; | ||
225 | this.LoadAsset(Image, true, "granite.jp2"); | ||
226 | store = new AssetStorage(); | ||
227 | store.Data = Image.Data; | ||
228 | store.Name = Image.Name; | ||
229 | store.UUID = Image.FullID; | ||
230 | db.Set(store); | ||
231 | db.Commit(); | ||
232 | |||
233 | Image = new AssetBase(); | ||
234 | Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000005"); | ||
235 | Image.Name = "Hardwood"; | ||
236 | this.LoadAsset(Image, true, "hardwood.jp2"); | ||
237 | store = new AssetStorage(); | ||
238 | store.Data = Image.Data; | ||
239 | store.Name = Image.Name; | ||
240 | store.UUID = Image.FullID; | ||
241 | db.Set(store); | ||
242 | db.Commit(); | ||
243 | |||
244 | Image = new AssetBase(); | ||
245 | Image.FullID = new LLUUID("00000000-0000-0000-5005-000000000005"); | ||
246 | Image.Name = "Prim Base Texture"; | ||
247 | this.LoadAsset(Image, true, "plywood.jp2"); | ||
248 | store = new AssetStorage(); | ||
249 | store.Data = Image.Data; | ||
250 | store.Name = Image.Name; | ||
251 | store.UUID = Image.FullID; | ||
252 | db.Set(store); | ||
253 | db.Commit(); | ||
254 | |||
255 | Image = new AssetBase(); | ||
256 | Image.FullID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73"); | ||
257 | Image.Name = "Shape"; | ||
258 | this.LoadAsset(Image, false, "base_shape.dat"); | ||
259 | store = new AssetStorage(); | ||
260 | store.Data = Image.Data; | ||
261 | store.Name = Image.Name; | ||
262 | store.UUID = Image.FullID; | ||
263 | db.Set(store); | ||
264 | db.Commit(); | ||
265 | } | ||
266 | catch (Exception e) | ||
267 | { | ||
268 | Console.WriteLine(e.Message); | ||
269 | } | ||
270 | } | ||
271 | |||
272 | private void LoadAsset(AssetBase info, bool image, string filename) | ||
273 | { | ||
274 | |||
275 | |||
276 | string dataPath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder; | ||
277 | string fileName = Path.Combine(dataPath, filename); | ||
278 | FileInfo fInfo = new FileInfo(fileName); | ||
279 | long numBytes = fInfo.Length; | ||
280 | FileStream fStream = new FileStream(fileName, FileMode.Open, FileAccess.Read); | ||
281 | byte[] idata = new byte[numBytes]; | ||
282 | BinaryReader br = new BinaryReader(fStream); | ||
283 | idata = br.ReadBytes((int)numBytes); | ||
284 | br.Close(); | ||
285 | fStream.Close(); | ||
286 | info.Data = idata; | ||
287 | //info.loaded=true; | ||
288 | } | ||
289 | |||
290 | /*private GridConfig LoadConfigDll(string dllName) | ||
291 | { | ||
292 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); | ||
293 | GridConfig config = null; | ||
294 | |||
295 | foreach (Type pluginType in pluginAssembly.GetTypes()) | ||
296 | { | ||
297 | if (pluginType.IsPublic) | ||
298 | { | ||
299 | if (!pluginType.IsAbstract) | ||
300 | { | ||
301 | Type typeInterface = pluginType.GetInterface("IGridConfig", true); | ||
302 | |||
303 | if (typeInterface != null) | ||
304 | { | ||
305 | IGridConfig plug = (IGridConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | ||
306 | config = plug.GetConfigObject(); | ||
307 | break; | ||
308 | } | ||
309 | |||
310 | typeInterface = null; | ||
311 | } | ||
312 | } | ||
313 | } | ||
314 | pluginAssembly = null; | ||
315 | return config; | ||
316 | }*/ | ||
317 | |||
318 | public void RunCmd(string cmd, string[] cmdparams) | ||
319 | { | ||
320 | switch (cmd) | ||
321 | { | ||
322 | case "help": | ||
323 | m_console.Notice("shutdown - shutdown this asset server (USE CAUTION!)"); | ||
324 | break; | ||
325 | |||
326 | case "shutdown": | ||
327 | m_console.Close(); | ||
328 | Environment.Exit(0); | ||
329 | break; | ||
330 | } | ||
331 | } | ||
332 | |||
333 | public void Show(string ShowWhat) | ||
334 | { | ||
335 | } | ||
336 | } | ||
337 | } | ||
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj deleted file mode 100644 index 7470499..0000000 --- a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj +++ /dev/null | |||
@@ -1,118 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{0021261B-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenGridServices.AssetServer</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Exe</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenGridServices.AssetServer</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>False</Optimize> | ||
35 | <OutputPath>..\..\bin\</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>True</Optimize> | ||
53 | <OutputPath>..\..\bin\</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="Db4objects.Db4o.dll" > | ||
62 | <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="libsecondlife.dll" > | ||
66 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="OpenSim.Framework" > | ||
70 | <HintPath>OpenSim.Framework.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="OpenSim.Framework.Console" > | ||
74 | <HintPath>OpenSim.Framework.Console.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | <Reference Include="OpenSim.Servers" > | ||
78 | <HintPath>OpenSim.Servers.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | <Reference Include="System" > | ||
82 | <HintPath>System.dll</HintPath> | ||
83 | <Private>False</Private> | ||
84 | </Reference> | ||
85 | <Reference Include="System.Data" > | ||
86 | <HintPath>System.Data.dll</HintPath> | ||
87 | <Private>False</Private> | ||
88 | </Reference> | ||
89 | <Reference Include="System.Xml" > | ||
90 | <HintPath>System.Xml.dll</HintPath> | ||
91 | <Private>False</Private> | ||
92 | </Reference> | ||
93 | <Reference Include="XMLRPC" > | ||
94 | <HintPath>XMLRPC.dll</HintPath> | ||
95 | <Private>False</Private> | ||
96 | </Reference> | ||
97 | </ItemGroup> | ||
98 | <ItemGroup> | ||
99 | </ItemGroup> | ||
100 | <ItemGroup> | ||
101 | <Compile Include="AssetHttpServer.cs"> | ||
102 | <SubType>Code</SubType> | ||
103 | </Compile> | ||
104 | <Compile Include="Main.cs"> | ||
105 | <SubType>Code</SubType> | ||
106 | </Compile> | ||
107 | <Compile Include="Properties\AssemblyInfo.cs"> | ||
108 | <SubType>Code</SubType> | ||
109 | </Compile> | ||
110 | </ItemGroup> | ||
111 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
112 | <PropertyGroup> | ||
113 | <PreBuildEvent> | ||
114 | </PreBuildEvent> | ||
115 | <PostBuildEvent> | ||
116 | </PostBuildEvent> | ||
117 | </PropertyGroup> | ||
118 | </Project> | ||
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.mine b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.mine deleted file mode 100644 index 257f6e1..0000000 --- a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.mine +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{0021261B-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenGridServices.AssetServer</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Exe</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenGridServices.AssetServer</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>False</Optimize> | ||
35 | <OutputPath>..\..\bin\</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>True</Optimize> | ||
53 | <OutputPath>..\..\bin\</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="System" > | ||
62 | <HintPath>System.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="System.Data" > | ||
66 | <HintPath>System.Data.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="System.Xml" > | ||
70 | <HintPath>System.Xml.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="OpenSim.Framework" > | ||
74 | <HintPath>OpenSim.Framework.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | <Reference Include="OpenSim.Framework.Console" > | ||
78 | <HintPath>OpenSim.Framework.Console.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | <Reference Include="OpenSim.GridInterfaces.Local" > | ||
82 | <HintPath>OpenSim.GridInterfaces.Local.dll</HintPath> | ||
83 | <Private>False</Private> | ||
84 | </Reference> | ||
85 | <Reference Include="OpenSim.Servers" > | ||
86 | <HintPath>OpenSim.Servers.dll</HintPath> | ||
87 | <Private>False</Private> | ||
88 | </Reference> | ||
89 | <Reference Include="libsecondlife.dll" > | ||
90 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> | ||
91 | <Private>False</Private> | ||
92 | </Reference> | ||
93 | <Reference Include="Db4objects.Db4o.dll" > | ||
94 | <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath> | ||
95 | <Private>False</Private> | ||
96 | </Reference> | ||
97 | <Reference Include="XMLRPC" > | ||
98 | <HintPath>XMLRPC.dll</HintPath> | ||
99 | <Private>False</Private> | ||
100 | </Reference> | ||
101 | </ItemGroup> | ||
102 | <ItemGroup> | ||
103 | </ItemGroup> | ||
104 | <ItemGroup> | ||
105 | <Compile Include="AssetHttpServer.cs"> | ||
106 | <SubType>Code</SubType> | ||
107 | </Compile> | ||
108 | <Compile Include="Main.cs"> | ||
109 | <SubType>Code</SubType> | ||
110 | </Compile> | ||
111 | <Compile Include="Properties\AssemblyInfo.cs"> | ||
112 | <SubType>Code</SubType> | ||
113 | </Compile> | ||
114 | </ItemGroup> | ||
115 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
116 | <PropertyGroup> | ||
117 | <PreBuildEvent> | ||
118 | </PreBuildEvent> | ||
119 | <PostBuildEvent> | ||
120 | </PostBuildEvent> | ||
121 | </PropertyGroup> | ||
122 | </Project> | ||
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.r858 b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.r858 deleted file mode 100644 index 2b382c4..0000000 --- a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.r858 +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{7CDDE593-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenGridServices.AssetServer</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Exe</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenGridServices.AssetServer</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>False</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>True</Optimize> | ||
35 | <OutputPath>../../bin/</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>True</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>False</Optimize> | ||
53 | <OutputPath>../../bin/</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="System" > | ||
62 | <HintPath>System.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="System.Data" > | ||
66 | <HintPath>System.Data.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="System.Xml" > | ||
70 | <HintPath>System.Xml.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="OpenSim.Framework" > | ||
74 | <HintPath>OpenSim.Framework.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | <Reference Include="OpenSim.Framework.Console" > | ||
78 | <HintPath>OpenSim.Framework.Console.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | <Reference Include="OpenSim.GridInterfaces.Local" > | ||
82 | <HintPath>OpenSim.GridInterfaces.Local.dll</HintPath> | ||
83 | <Private>False</Private> | ||
84 | </Reference> | ||
85 | <Reference Include="OpenSim.Servers" > | ||
86 | <HintPath>OpenSim.Servers.dll</HintPath> | ||
87 | <Private>False</Private> | ||
88 | </Reference> | ||
89 | <Reference Include="libsecondlife.dll" > | ||
90 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> | ||
91 | <Private>False</Private> | ||
92 | </Reference> | ||
93 | <Reference Include="Db4objects.Db4o.dll" > | ||
94 | <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath> | ||
95 | <Private>False</Private> | ||
96 | </Reference> | ||
97 | <Reference Include="XMLRPC" > | ||
98 | <HintPath>XMLRPC.dll</HintPath> | ||
99 | <Private>False</Private> | ||
100 | </Reference> | ||
101 | </ItemGroup> | ||
102 | <ItemGroup> | ||
103 | </ItemGroup> | ||
104 | <ItemGroup> | ||
105 | <Compile Include="AssetHttpServer.cs"> | ||
106 | <SubType>Code</SubType> | ||
107 | </Compile> | ||
108 | <Compile Include="Main.cs"> | ||
109 | <SubType>Code</SubType> | ||
110 | </Compile> | ||
111 | <Compile Include="Properties/AssemblyInfo.cs"> | ||
112 | <SubType>Code</SubType> | ||
113 | </Compile> | ||
114 | </ItemGroup> | ||
115 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
116 | <PropertyGroup> | ||
117 | <PreBuildEvent> | ||
118 | </PreBuildEvent> | ||
119 | <PostBuildEvent> | ||
120 | </PostBuildEvent> | ||
121 | </PropertyGroup> | ||
122 | </Project> | ||
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.r921 b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.r921 deleted file mode 100644 index 031e405..0000000 --- a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.r921 +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{0021261B-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenGridServices.AssetServer</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Exe</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenGridServices.AssetServer</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>False</Optimize> | ||
35 | <OutputPath>..\..\bin\</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>True</Optimize> | ||
53 | <OutputPath>..\..\bin\</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="System" > | ||
62 | <HintPath>System.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="System.Data" > | ||
66 | <HintPath>System.Data.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="System.Xml" > | ||
70 | <HintPath>System.Xml.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="OpenSim.Framework" > | ||
74 | <HintPath>OpenSim.Framework.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | <Reference Include="OpenSim.Framework.Console" > | ||
78 | <HintPath>OpenSim.Framework.Console.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | <Reference Include="OpenSim.GridInterfaces.Local" > | ||
82 | <HintPath>OpenSim.GridInterfaces.Local.dll</HintPath> | ||
83 | <Private>False</Private> | ||
84 | </Reference> | ||
85 | <Reference Include="OpenSim.Servers" > | ||
86 | <HintPath>OpenSim.Servers.dll</HintPath> | ||
87 | <Private>False</Private> | ||
88 | </Reference> | ||
89 | <Reference Include="libsecondlife.dll" > | ||
90 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> | ||
91 | <Private>False</Private> | ||
92 | </Reference> | ||
93 | <Reference Include="Db4objects.Db4o.dll" > | ||
94 | <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath> | ||
95 | <Private>False</Private> | ||
96 | </Reference> | ||
97 | <Reference Include="XMLRPC" > | ||
98 | <HintPath>XMLRPC.dll</HintPath> | ||
99 | <Private>False</Private> | ||
100 | </Reference> | ||
101 | </ItemGroup> | ||
102 | <ItemGroup> | ||
103 | </ItemGroup> | ||
104 | <ItemGroup> | ||
105 | <Compile Include="Main.cs"> | ||
106 | <SubType>Code</SubType> | ||
107 | </Compile> | ||
108 | <Compile Include="AssetHttpServer.cs"> | ||
109 | <SubType>Code</SubType> | ||
110 | </Compile> | ||
111 | <Compile Include="Properties\AssemblyInfo.cs"> | ||
112 | <SubType>Code</SubType> | ||
113 | </Compile> | ||
114 | </ItemGroup> | ||
115 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
116 | <PropertyGroup> | ||
117 | <PreBuildEvent> | ||
118 | </PreBuildEvent> | ||
119 | <PostBuildEvent> | ||
120 | </PostBuildEvent> | ||
121 | </PropertyGroup> | ||
122 | </Project> | ||
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build deleted file mode 100644 index 385d85d..0000000 --- a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | <?xml version="1.0" ?> | ||
2 | <project name="OpenGridServices.AssetServer" default="build"> | ||
3 | <target name="build"> | ||
4 | <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> | ||
5 | <mkdir dir="${project::get-base-directory()}/${build.dir}" /> | ||
6 | <copy todir="${project::get-base-directory()}/${build.dir}"> | ||
7 | <fileset basedir="${project::get-base-directory()}"> | ||
8 | </fileset> | ||
9 | </copy> | ||
10 | <csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe"> | ||
11 | <resources prefix="OpenGridServices.AssetServer" dynamicprefix="true" > | ||
12 | </resources> | ||
13 | <sources failonempty="true"> | ||
14 | <include name="AssetHttpServer.cs" /> | ||
15 | <include name="Main.cs" /> | ||
16 | <include name="Properties/AssemblyInfo.cs" /> | ||
17 | </sources> | ||
18 | <references basedir="${project::get-base-directory()}"> | ||
19 | <lib> | ||
20 | <include name="${project::get-base-directory()}" /> | ||
21 | <include name="${project::get-base-directory()}/${build.dir}" /> | ||
22 | </lib> | ||
23 | <include name="../../bin/Db4objects.Db4o.dll" /> | ||
24 | <include name="../../bin/libsecondlife.dll" /> | ||
25 | <include name="../../bin/OpenSim.Framework.dll" /> | ||
26 | <include name="../../bin/OpenSim.Framework.Console.dll" /> | ||
27 | <include name="../../bin/OpenSim.Servers.dll" /> | ||
28 | <include name="System.dll" /> | ||
29 | <include name="System.Data.dll" /> | ||
30 | <include name="System.Xml.dll" /> | ||
31 | <include name="../../bin/XMLRPC.dll" /> | ||
32 | </references> | ||
33 | </csc> | ||
34 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> | ||
35 | <mkdir dir="${project::get-base-directory()}/../../bin/"/> | ||
36 | <copy todir="${project::get-base-directory()}/../../bin/"> | ||
37 | <fileset basedir="${project::get-base-directory()}/${build.dir}/" > | ||
38 | <include name="*.dll"/> | ||
39 | <include name="*.exe"/> | ||
40 | </fileset> | ||
41 | </copy> | ||
42 | </target> | ||
43 | <target name="clean"> | ||
44 | <delete dir="${bin.dir}" failonerror="false" /> | ||
45 | <delete dir="${obj.dir}" failonerror="false" /> | ||
46 | </target> | ||
47 | <target name="doc" description="Creates documentation."> | ||
48 | </target> | ||
49 | </project> | ||
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.csproj b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.csproj deleted file mode 100644 index 9b8cc87..0000000 --- a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.csproj +++ /dev/null | |||
@@ -1,126 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{21BFC8E2-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenGridServices.GridServer</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Exe</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenGridServices.GridServer</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>False</Optimize> | ||
35 | <OutputPath>..\bin\</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>True</Optimize> | ||
53 | <OutputPath>..\bin\</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="System" > | ||
62 | <HintPath>System.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="System.Data" > | ||
66 | <HintPath>System.Data.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="System.Xml" > | ||
70 | <HintPath>System.Xml.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="libsecondlife.dll" > | ||
74 | <HintPath>..\bin\libsecondlife.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | <Reference Include="Db4objects.Db4o.dll" > | ||
78 | <HintPath>..\bin\Db4objects.Db4o.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | </ItemGroup> | ||
82 | <ItemGroup> | ||
83 | <ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj"> | ||
84 | <Name>OpenSim.Framework</Name> | ||
85 | <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> | ||
86 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
87 | <Private>False</Private> | ||
88 | </ProjectReference> | ||
89 | <ProjectReference Include="..\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj"> | ||
90 | <Name>OpenSim.Framework.Console</Name> | ||
91 | <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> | ||
92 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
93 | <Private>False</Private> | ||
94 | </ProjectReference> | ||
95 | <ProjectReference Include="..\OpenSim.Servers\OpenSim.Servers.csproj"> | ||
96 | <Name>OpenSim.Servers</Name> | ||
97 | <Project>{8BB20F0A-0000-0000-0000-000000000000}</Project> | ||
98 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
99 | <Private>False</Private> | ||
100 | </ProjectReference> | ||
101 | <ProjectReference Include="..\XmlRpcCS\XMLRPC.csproj"> | ||
102 | <Name>XMLRPC</Name> | ||
103 | <Project>{8E81D43C-0000-0000-0000-000000000000}</Project> | ||
104 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
105 | <Private>False</Private> | ||
106 | </ProjectReference> | ||
107 | </ItemGroup> | ||
108 | <ItemGroup> | ||
109 | <Compile Include="Main.cs"> | ||
110 | <SubType>Code</SubType> | ||
111 | </Compile> | ||
112 | <Compile Include="SimProfiles.cs"> | ||
113 | <SubType>Code</SubType> | ||
114 | </Compile> | ||
115 | <Compile Include="Properties\AssemblyInfo.cs"> | ||
116 | <SubType>Code</SubType> | ||
117 | </Compile> | ||
118 | </ItemGroup> | ||
119 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
120 | <PropertyGroup> | ||
121 | <PreBuildEvent> | ||
122 | </PreBuildEvent> | ||
123 | <PostBuildEvent> | ||
124 | </PostBuildEvent> | ||
125 | </PropertyGroup> | ||
126 | </Project> | ||
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.exe.build b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.exe.build deleted file mode 100644 index 6bef534..0000000 --- a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.exe.build +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | <?xml version="1.0" ?> | ||
2 | <project name="OpenGridServices.GridServer" default="build"> | ||
3 | <target name="build"> | ||
4 | <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> | ||
5 | <mkdir dir="${project::get-base-directory()}/${build.dir}" /> | ||
6 | <copy todir="${project::get-base-directory()}/${build.dir}"> | ||
7 | <fileset basedir="${project::get-base-directory()}"> | ||
8 | </fileset> | ||
9 | </copy> | ||
10 | <csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe"> | ||
11 | <resources prefix="OpenGridServices.GridServer" dynamicprefix="true" > | ||
12 | </resources> | ||
13 | <sources failonempty="true"> | ||
14 | <include name="Main.cs" /> | ||
15 | <include name="SimProfiles.cs" /> | ||
16 | <include name="Properties/AssemblyInfo.cs" /> | ||
17 | </sources> | ||
18 | <references basedir="${project::get-base-directory()}"> | ||
19 | <lib> | ||
20 | <include name="${project::get-base-directory()}" /> | ||
21 | <include name="${project::get-base-directory()}/${build.dir}" /> | ||
22 | </lib> | ||
23 | <include name="System.dll" /> | ||
24 | <include name="System.Data.dll" /> | ||
25 | <include name="System.Xml.dll" /> | ||
26 | <include name="../bin/OpenSim.Framework.dll" /> | ||
27 | <include name="../bin/OpenSim.Framework.Console.dll" /> | ||
28 | <include name="../bin/OpenSim.Servers.dll" /> | ||
29 | <include name="../bin/libsecondlife.dll" /> | ||
30 | <include name="../bin/Db4objects.Db4o.dll" /> | ||
31 | <include name="../bin/XMLRPC.dll" /> | ||
32 | </references> | ||
33 | </csc> | ||
34 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" /> | ||
35 | <mkdir dir="${project::get-base-directory()}/../bin/"/> | ||
36 | <copy todir="${project::get-base-directory()}/../bin/"> | ||
37 | <fileset basedir="${project::get-base-directory()}/${build.dir}/" > | ||
38 | <include name="*.dll"/> | ||
39 | <include name="*.exe"/> | ||
40 | </fileset> | ||
41 | </copy> | ||
42 | </target> | ||
43 | <target name="clean"> | ||
44 | <delete dir="${bin.dir}" failonerror="false" /> | ||
45 | <delete dir="${obj.dir}" failonerror="false" /> | ||
46 | </target> | ||
47 | <target name="doc" description="Creates documentation."> | ||
48 | </target> | ||
49 | </project> | ||
diff --git a/OpenGridServices/OpenGridServices.AssetServer/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGridServices.AssetServer/Properties/AssemblyInfo.cs deleted file mode 100644 index f9a18a8..0000000 --- a/OpenGridServices/OpenGridServices.AssetServer/Properties/AssemblyInfo.cs +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System.Reflection; | ||
29 | using System.Runtime.CompilerServices; | ||
30 | using System.Runtime.InteropServices; | ||
31 | |||
32 | // General Information about an assembly is controlled through the following | ||
33 | // set of attributes. Change these attribute values to modify the information | ||
34 | // associated with an assembly. | ||
35 | [assembly: AssemblyTitle("OGS-AssetServer")] | ||
36 | [assembly: AssemblyDescription("")] | ||
37 | [assembly: AssemblyConfiguration("")] | ||
38 | [assembly: AssemblyCompany("")] | ||
39 | [assembly: AssemblyProduct("OGS-AssetServer")] | ||
40 | [assembly: AssemblyCopyright("Copyright © 2007")] | ||
41 | [assembly: AssemblyTrademark("")] | ||
42 | [assembly: AssemblyCulture("")] | ||
43 | |||
44 | // Setting ComVisible to false makes the types in this assembly not visible | ||
45 | // to COM components. If you need to access a type in this assembly from | ||
46 | // COM, set the ComVisible attribute to true on that type. | ||
47 | [assembly: ComVisible(false)] | ||
48 | |||
49 | // The following GUID is for the ID of the typelib if this project is exposed to COM | ||
50 | [assembly: Guid("b541b244-3d1d-4625-9003-bc2a3a6a39a4")] | ||
51 | |||
52 | // Version information for an assembly consists of the following four values: | ||
53 | // | ||
54 | // Major Version | ||
55 | // Minor Version | ||
56 | // Build Number | ||
57 | // Revision | ||
58 | // | ||
59 | [assembly: AssemblyVersion("1.0.0.0")] | ||
60 | [assembly: AssemblyFileVersion("1.0.0.0")] | ||
diff --git a/OpenGridServices/OpenGridServices.GridServer/GridManager.cs b/OpenGridServices/OpenGridServices.GridServer/GridManager.cs deleted file mode 100644 index bf80652..0000000 --- a/OpenGridServices/OpenGridServices.GridServer/GridManager.cs +++ /dev/null | |||
@@ -1,599 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System; | ||
29 | using System.Collections; | ||
30 | using System.Collections.Generic; | ||
31 | using System.Text; | ||
32 | using System.Reflection; | ||
33 | using OpenGrid.Framework.Data; | ||
34 | using OpenSim.Framework.Utilities; | ||
35 | using OpenSim.Framework.Console; | ||
36 | using OpenSim.Framework.Sims; | ||
37 | using libsecondlife; | ||
38 | using Nwc.XmlRpc; | ||
39 | using System.Xml; | ||
40 | |||
41 | namespace OpenGridServices.GridServer | ||
42 | { | ||
43 | class GridManager | ||
44 | { | ||
45 | Dictionary<string, IGridData> _plugins = new Dictionary<string, IGridData>(); | ||
46 | Dictionary<string, ILogData> _logplugins = new Dictionary<string, ILogData>(); | ||
47 | |||
48 | public OpenSim.Framework.Interfaces.GridConfig config; | ||
49 | |||
50 | /// <summary> | ||
51 | /// Adds a new grid server plugin - grid servers will be requested in the order they were loaded. | ||
52 | /// </summary> | ||
53 | /// <param name="FileName">The filename to the grid server plugin DLL</param> | ||
54 | public void AddPlugin(string FileName) | ||
55 | { | ||
56 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Storage: Attempting to load " + FileName); | ||
57 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); | ||
58 | |||
59 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Storage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); | ||
60 | foreach (Type pluginType in pluginAssembly.GetTypes()) | ||
61 | { | ||
62 | if (!pluginType.IsAbstract) | ||
63 | { | ||
64 | // Regions go here | ||
65 | Type typeInterface = pluginType.GetInterface("IGridData", true); | ||
66 | |||
67 | if (typeInterface != null) | ||
68 | { | ||
69 | IGridData plug = (IGridData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | ||
70 | plug.Initialise(); | ||
71 | this._plugins.Add(plug.getName(), plug); | ||
72 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Storage: Added IGridData Interface"); | ||
73 | } | ||
74 | |||
75 | typeInterface = null; | ||
76 | |||
77 | // Logs go here | ||
78 | typeInterface = pluginType.GetInterface("ILogData", true); | ||
79 | |||
80 | if (typeInterface != null) | ||
81 | { | ||
82 | ILogData plug = (ILogData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | ||
83 | plug.Initialise(); | ||
84 | this._logplugins.Add(plug.getName(), plug); | ||
85 | OpenSim.Framework.Console.MainLog.Instance.Verbose( "Storage: Added ILogData Interface"); | ||
86 | } | ||
87 | |||
88 | typeInterface = null; | ||
89 | } | ||
90 | } | ||
91 | |||
92 | pluginAssembly = null; | ||
93 | } | ||
94 | |||
95 | /// <summary> | ||
96 | /// Logs a piece of information to the database | ||
97 | /// </summary> | ||
98 | /// <param name="target">What you were operating on (in grid server, this will likely be the region UUIDs)</param> | ||
99 | /// <param name="method">Which method is being called?</param> | ||
100 | /// <param name="args">What arguments are being passed?</param> | ||
101 | /// <param name="priority">How high priority is this? 1 = Max, 6 = Verbose</param> | ||
102 | /// <param name="message">The message to log</param> | ||
103 | private void logToDB(string target, string method, string args, int priority, string message) | ||
104 | { | ||
105 | foreach (KeyValuePair<string, ILogData> kvp in _logplugins) | ||
106 | { | ||
107 | try | ||
108 | { | ||
109 | kvp.Value.saveLog("Gridserver", target, method, args, priority, message); | ||
110 | } | ||
111 | catch (Exception e) | ||
112 | { | ||
113 | OpenSim.Framework.Console.MainLog.Instance.Warn("Storage: unable to write log via " + kvp.Key); | ||
114 | } | ||
115 | } | ||
116 | } | ||
117 | |||
118 | /// <summary> | ||
119 | /// Returns a region by argument | ||
120 | /// </summary> | ||
121 | /// <param name="uuid">A UUID key of the region to return</param> | ||
122 | /// <returns>A SimProfileData for the region</returns> | ||
123 | public SimProfileData getRegion(libsecondlife.LLUUID uuid) | ||
124 | { | ||
125 | foreach(KeyValuePair<string,IGridData> kvp in _plugins) { | ||
126 | try | ||
127 | { | ||
128 | return kvp.Value.GetProfileByLLUUID(uuid); | ||
129 | } | ||
130 | catch (Exception e) | ||
131 | { | ||
132 | OpenSim.Framework.Console.MainLog.Instance.Warn("Storage: Unable to find region " + uuid.ToStringHyphenated() + " via " + kvp.Key); | ||
133 | } | ||
134 | } | ||
135 | return null; | ||
136 | } | ||
137 | |||
138 | /// <summary> | ||
139 | /// Returns a region by argument | ||
140 | /// </summary> | ||
141 | /// <param name="uuid">A regionHandle of the region to return</param> | ||
142 | /// <returns>A SimProfileData for the region</returns> | ||
143 | public SimProfileData getRegion(ulong handle) | ||
144 | { | ||
145 | foreach (KeyValuePair<string, IGridData> kvp in _plugins) | ||
146 | { | ||
147 | try | ||
148 | { | ||
149 | return kvp.Value.GetProfileByHandle(handle); | ||
150 | } | ||
151 | catch (Exception e) | ||
152 | { | ||
153 | OpenSim.Framework.Console.MainLog.Instance.Warn("Storage: Unable to find region " + handle.ToString() + " via " + kvp.Key); | ||
154 | } | ||
155 | } | ||
156 | return null; | ||
157 | } | ||
158 | |||
159 | public Dictionary<ulong, SimProfileData> getRegions(uint xmin, uint ymin, uint xmax, uint ymax) | ||
160 | { | ||
161 | Dictionary<ulong, SimProfileData> regions = new Dictionary<ulong, SimProfileData>(); | ||
162 | |||
163 | SimProfileData[] neighbours; | ||
164 | |||
165 | foreach (KeyValuePair<string, IGridData> kvp in _plugins) | ||
166 | { | ||
167 | try | ||
168 | { | ||
169 | neighbours = kvp.Value.GetProfilesInRange(xmin, ymin, xmax, ymax); | ||
170 | foreach (SimProfileData neighbour in neighbours) | ||
171 | { | ||
172 | regions[neighbour.regionHandle] = neighbour; | ||
173 | } | ||
174 | } | ||
175 | catch (Exception e) | ||
176 | { | ||
177 | OpenSim.Framework.Console.MainLog.Instance.Warn("Storage: Unable to query regionblock via " + kvp.Key); | ||
178 | } | ||
179 | } | ||
180 | |||
181 | return regions; | ||
182 | } | ||
183 | |||
184 | /// <summary> | ||
185 | /// Returns a XML String containing a list of the neighbouring regions | ||
186 | /// </summary> | ||
187 | /// <param name="reqhandle">The regionhandle for the center sim</param> | ||
188 | /// <returns>An XML string containing neighbour entities</returns> | ||
189 | public string GetXMLNeighbours(ulong reqhandle) | ||
190 | { | ||
191 | string response = ""; | ||
192 | SimProfileData central_region = getRegion(reqhandle); | ||
193 | SimProfileData neighbour; | ||
194 | for (int x = -1; x < 2; x++) for (int y = -1; y < 2; y++) | ||
195 | { | ||
196 | if (getRegion(Util.UIntsToLong((uint)((central_region.regionLocX + x) * 256), (uint)(central_region.regionLocY + y) * 256)) != null) | ||
197 | { | ||
198 | neighbour = getRegion(Util.UIntsToLong((uint)((central_region.regionLocX + x) * 256), (uint)(central_region.regionLocY + y) * 256)); | ||
199 | response += "<neighbour>"; | ||
200 | response += "<sim_ip>" + neighbour.serverIP + "</sim_ip>"; | ||
201 | response += "<sim_port>" + neighbour.serverPort.ToString() + "</sim_port>"; | ||
202 | response += "<locx>" + neighbour.regionLocX.ToString() + "</locx>"; | ||
203 | response += "<locy>" + neighbour.regionLocY.ToString() + "</locy>"; | ||
204 | response += "<regionhandle>" + neighbour.regionHandle.ToString() + "</regionhandle>"; | ||
205 | response += "</neighbour>"; | ||
206 | |||
207 | } | ||
208 | } | ||
209 | return response; | ||
210 | } | ||
211 | |||
212 | /// <summary> | ||
213 | /// Performed when a region connects to the grid server initially. | ||
214 | /// </summary> | ||
215 | /// <param name="request">The XMLRPC Request</param> | ||
216 | /// <returns>Startup parameters</returns> | ||
217 | public XmlRpcResponse XmlRpcLoginToSimulatorMethod(XmlRpcRequest request) | ||
218 | { | ||
219 | XmlRpcResponse response = new XmlRpcResponse(); | ||
220 | Hashtable responseData = new Hashtable(); | ||
221 | response.Value = responseData; | ||
222 | |||
223 | SimProfileData TheSim = null; | ||
224 | Hashtable requestData = (Hashtable)request.Params[0]; | ||
225 | |||
226 | if (requestData.ContainsKey("UUID")) | ||
227 | { | ||
228 | TheSim = getRegion(new LLUUID((string)requestData["UUID"])); | ||
229 | logToDB((new LLUUID((string)requestData["UUID"])).ToStringHyphenated(),"XmlRpcLoginToSimulatorMethod","", 5,"Region attempting login with UUID."); | ||
230 | } | ||
231 | else if (requestData.ContainsKey("region_handle")) | ||
232 | { | ||
233 | TheSim = getRegion((ulong)Convert.ToUInt64(requestData["region_handle"])); | ||
234 | logToDB((string)requestData["region_handle"], "XmlRpcLoginToSimulatorMethod", "", 5, "Region attempting login with regionHandle."); | ||
235 | } | ||
236 | else | ||
237 | { | ||
238 | responseData["error"] = "No UUID or region_handle passed to grid server - unable to connect you"; | ||
239 | return response; | ||
240 | } | ||
241 | |||
242 | if (TheSim == null) | ||
243 | { | ||
244 | responseData["error"] = "sim not found"; | ||
245 | return response; | ||
246 | } | ||
247 | else | ||
248 | { | ||
249 | |||
250 | ArrayList SimNeighboursData = new ArrayList(); | ||
251 | |||
252 | SimProfileData neighbour; | ||
253 | Hashtable NeighbourBlock; | ||
254 | |||
255 | bool fastMode = false; // Only compatible with MySQL right now | ||
256 | |||
257 | if (fastMode) | ||
258 | { | ||
259 | Dictionary<ulong, SimProfileData> neighbours = getRegions(TheSim.regionLocX - 1, TheSim.regionLocY - 1, TheSim.regionLocX + 1, TheSim.regionLocY + 1); | ||
260 | |||
261 | foreach (KeyValuePair<ulong, SimProfileData> aSim in neighbours) | ||
262 | { | ||
263 | NeighbourBlock = new Hashtable(); | ||
264 | NeighbourBlock["sim_ip"] = aSim.Value.serverIP.ToString(); | ||
265 | NeighbourBlock["sim_port"] = aSim.Value.serverPort.ToString(); | ||
266 | NeighbourBlock["region_locx"] = aSim.Value.regionLocX.ToString(); | ||
267 | NeighbourBlock["region_locy"] = aSim.Value.regionLocY.ToString(); | ||
268 | NeighbourBlock["UUID"] = aSim.Value.UUID.ToString(); | ||
269 | |||
270 | if (aSim.Value.UUID != TheSim.UUID) | ||
271 | SimNeighboursData.Add(NeighbourBlock); | ||
272 | } | ||
273 | } | ||
274 | else | ||
275 | { | ||
276 | for (int x = -1; x < 2; x++) for (int y = -1; y < 2; y++) | ||
277 | { | ||
278 | if (getRegion(Helpers.UIntsToLong((uint)((TheSim.regionLocX + x) * 256), (uint)(TheSim.regionLocY + y) * 256)) != null) | ||
279 | { | ||
280 | neighbour = getRegion(Helpers.UIntsToLong((uint)((TheSim.regionLocX + x) * 256), (uint)(TheSim.regionLocY + y) * 256)); | ||
281 | |||
282 | NeighbourBlock = new Hashtable(); | ||
283 | NeighbourBlock["sim_ip"] = neighbour.serverIP; | ||
284 | NeighbourBlock["sim_port"] = neighbour.serverPort.ToString(); | ||
285 | NeighbourBlock["region_locx"] = neighbour.regionLocX.ToString(); | ||
286 | NeighbourBlock["region_locy"] = neighbour.regionLocY.ToString(); | ||
287 | NeighbourBlock["UUID"] = neighbour.UUID.ToString(); | ||
288 | |||
289 | if (neighbour.UUID != TheSim.UUID) SimNeighboursData.Add(NeighbourBlock); | ||
290 | } | ||
291 | } | ||
292 | } | ||
293 | |||
294 | responseData["UUID"] = TheSim.UUID.ToString(); | ||
295 | responseData["region_locx"] = TheSim.regionLocX.ToString(); | ||
296 | responseData["region_locy"] = TheSim.regionLocY.ToString(); | ||
297 | responseData["regionname"] = TheSim.regionName; | ||
298 | responseData["estate_id"] = "1"; | ||
299 | responseData["neighbours"] = SimNeighboursData; | ||
300 | |||
301 | responseData["sim_ip"] = TheSim.serverIP; | ||
302 | responseData["sim_port"] = TheSim.serverPort.ToString(); | ||
303 | responseData["asset_url"] = TheSim.regionAssetURI; | ||
304 | responseData["asset_sendkey"] = TheSim.regionAssetSendKey; | ||
305 | responseData["asset_recvkey"] = TheSim.regionAssetRecvKey; | ||
306 | responseData["user_url"] = TheSim.regionUserURI; | ||
307 | responseData["user_sendkey"] = TheSim.regionUserSendKey; | ||
308 | responseData["user_recvkey"] = TheSim.regionUserRecvKey; | ||
309 | responseData["authkey"] = TheSim.regionSecret; | ||
310 | |||
311 | // New! If set, use as URL to local sim storage (ie http://remotehost/region.yap) | ||
312 | responseData["data_uri"] = TheSim.regionDataURI; | ||
313 | } | ||
314 | |||
315 | return response; | ||
316 | } | ||
317 | |||
318 | public XmlRpcResponse XmlRpcMapBlockMethod(XmlRpcRequest request) | ||
319 | { | ||
320 | int xmin=980, ymin=980, xmax=1020, ymax=1020; | ||
321 | |||
322 | Hashtable requestData = (Hashtable)request.Params[0]; | ||
323 | if (requestData.ContainsKey("xmin")) | ||
324 | { | ||
325 | xmin = (Int32)requestData["xmin"]; | ||
326 | } | ||
327 | if (requestData.ContainsKey("ymin")) | ||
328 | { | ||
329 | ymin = (Int32)requestData["ymin"]; | ||
330 | } | ||
331 | if (requestData.ContainsKey("xmax")) | ||
332 | { | ||
333 | xmax = (Int32)requestData["xmax"]; | ||
334 | } | ||
335 | if (requestData.ContainsKey("ymax")) | ||
336 | { | ||
337 | ymax = (Int32)requestData["ymax"]; | ||
338 | } | ||
339 | |||
340 | XmlRpcResponse response = new XmlRpcResponse(); | ||
341 | Hashtable responseData = new Hashtable(); | ||
342 | response.Value = responseData; | ||
343 | IList simProfileList = new ArrayList(); | ||
344 | |||
345 | bool fastMode = true; // MySQL Only | ||
346 | |||
347 | if (fastMode) | ||
348 | { | ||
349 | Dictionary<ulong, SimProfileData> neighbours = getRegions((uint)xmin, (uint)ymin, (uint)xmax, (uint)ymax); | ||
350 | |||
351 | foreach (KeyValuePair<ulong, SimProfileData> aSim in neighbours) | ||
352 | { | ||
353 | Hashtable simProfileBlock = new Hashtable(); | ||
354 | simProfileBlock["x"] = aSim.Value.regionLocX.ToString(); | ||
355 | simProfileBlock["y"] = aSim.Value.regionLocY.ToString(); | ||
356 | simProfileBlock["name"] = aSim.Value.regionName; | ||
357 | simProfileBlock["access"] = 21; | ||
358 | simProfileBlock["region-flags"] = 512; | ||
359 | simProfileBlock["water-height"] = 0; | ||
360 | simProfileBlock["agents"] = 1; | ||
361 | simProfileBlock["map-image-id"] = aSim.Value.regionMapTextureID.ToString(); | ||
362 | |||
363 | // For Sugilite compatibility | ||
364 | simProfileBlock["regionhandle"] = aSim.Value.regionHandle.ToString(); | ||
365 | simProfileBlock["sim_ip"] = aSim.Value.serverIP.ToString(); | ||
366 | simProfileBlock["sim_port"] = aSim.Value.serverPort.ToString(); | ||
367 | simProfileBlock["sim_uri"] = aSim.Value.serverURI.ToString(); | ||
368 | simProfileBlock["uuid"] = aSim.Value.UUID.ToStringHyphenated(); | ||
369 | |||
370 | simProfileList.Add(simProfileBlock); | ||
371 | } | ||
372 | OpenSim.Framework.Console.MainLog.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via FastMode"); | ||
373 | } | ||
374 | else | ||
375 | { | ||
376 | SimProfileData simProfile; | ||
377 | for (int x = xmin; x < xmax; x++) | ||
378 | { | ||
379 | for (int y = ymin; y < ymax; y++) | ||
380 | { | ||
381 | simProfile = getRegion(Helpers.UIntsToLong((uint)(x * 256), (uint)(y * 256))); | ||
382 | if (simProfile != null) | ||
383 | { | ||
384 | Hashtable simProfileBlock = new Hashtable(); | ||
385 | simProfileBlock["x"] = x; | ||
386 | simProfileBlock["y"] = y; | ||
387 | simProfileBlock["name"] = simProfile.regionName; | ||
388 | simProfileBlock["access"] = 0; | ||
389 | simProfileBlock["region-flags"] = 0; | ||
390 | simProfileBlock["water-height"] = 20; | ||
391 | simProfileBlock["agents"] = 1; | ||
392 | simProfileBlock["map-image-id"] = simProfile.regionMapTextureID.ToString(); | ||
393 | |||
394 | // For Sugilite compatibility | ||
395 | simProfileBlock["regionhandle"] = simProfile.regionHandle.ToString(); | ||
396 | simProfileBlock["sim_ip"] = simProfile.serverIP.ToString(); | ||
397 | simProfileBlock["sim_port"] = simProfile.serverPort.ToString(); | ||
398 | simProfileBlock["sim_uri"] = simProfile.serverURI.ToString(); | ||
399 | simProfileBlock["uuid"] = simProfile.UUID.ToStringHyphenated(); | ||
400 | |||
401 | simProfileList.Add(simProfileBlock); | ||
402 | } | ||
403 | } | ||
404 | } | ||
405 | OpenSim.Framework.Console.MainLog.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via Standard Mode"); | ||
406 | } | ||
407 | |||
408 | responseData["sim-profiles"] = simProfileList; | ||
409 | |||
410 | return response; | ||
411 | } | ||
412 | |||
413 | |||
414 | |||
415 | /// <summary> | ||
416 | /// Performs a REST Get Operation | ||
417 | /// </summary> | ||
418 | /// <param name="request"></param> | ||
419 | /// <param name="path"></param> | ||
420 | /// <param name="param"></param> | ||
421 | /// <returns></returns> | ||
422 | public string RestGetRegionMethod(string request, string path, string param) | ||
423 | { | ||
424 | return RestGetSimMethod("", "/sims/", param); | ||
425 | } | ||
426 | |||
427 | /// <summary> | ||
428 | /// Performs a REST Set Operation | ||
429 | /// </summary> | ||
430 | /// <param name="request"></param> | ||
431 | /// <param name="path"></param> | ||
432 | /// <param name="param"></param> | ||
433 | /// <returns></returns> | ||
434 | public string RestSetRegionMethod(string request, string path, string param) | ||
435 | { | ||
436 | return RestSetSimMethod("", "/sims/", param); | ||
437 | } | ||
438 | |||
439 | /// <summary> | ||
440 | /// Returns information about a sim via a REST Request | ||
441 | /// </summary> | ||
442 | /// <param name="request"></param> | ||
443 | /// <param name="path"></param> | ||
444 | /// <param name="param"></param> | ||
445 | /// <returns>Information about the sim in XML</returns> | ||
446 | public string RestGetSimMethod(string request, string path, string param) | ||
447 | { | ||
448 | string respstring = String.Empty; | ||
449 | |||
450 | SimProfileData TheSim; | ||
451 | LLUUID UUID = new LLUUID(param); | ||
452 | TheSim = getRegion(UUID); | ||
453 | |||
454 | if (!(TheSim == null)) | ||
455 | { | ||
456 | respstring = "<Root>"; | ||
457 | respstring += "<authkey>" + TheSim.regionSendKey + "</authkey>"; | ||
458 | respstring += "<sim>"; | ||
459 | respstring += "<uuid>" + TheSim.UUID.ToString() + "</uuid>"; | ||
460 | respstring += "<regionname>" + TheSim.regionName + "</regionname>"; | ||
461 | respstring += "<sim_ip>" + TheSim.serverIP + "</sim_ip>"; | ||
462 | respstring += "<sim_port>" + TheSim.serverPort.ToString() + "</sim_port>"; | ||
463 | respstring += "<region_locx>" + TheSim.regionLocX.ToString() + "</region_locx>"; | ||
464 | respstring += "<region_locy>" + TheSim.regionLocY.ToString() + "</region_locy>"; | ||
465 | respstring += "<estate_id>1</estate_id>"; | ||
466 | respstring += "</sim>"; | ||
467 | respstring += "</Root>"; | ||
468 | } | ||
469 | |||
470 | return respstring; | ||
471 | } | ||
472 | |||
473 | /// <summary> | ||
474 | /// Creates or updates a sim via a REST Method Request | ||
475 | /// BROKEN with SQL Update | ||
476 | /// </summary> | ||
477 | /// <param name="request"></param> | ||
478 | /// <param name="path"></param> | ||
479 | /// <param name="param"></param> | ||
480 | /// <returns>"OK" or an error</returns> | ||
481 | public string RestSetSimMethod(string request, string path, string param) | ||
482 | { | ||
483 | Console.WriteLine("Processing region update"); | ||
484 | SimProfileData TheSim; | ||
485 | TheSim = getRegion(new LLUUID(param)); | ||
486 | if ((TheSim) == null) | ||
487 | { | ||
488 | TheSim = new SimProfileData(); | ||
489 | LLUUID UUID = new LLUUID(param); | ||
490 | TheSim.UUID = UUID; | ||
491 | TheSim.regionRecvKey = config.SimRecvKey; | ||
492 | } | ||
493 | |||
494 | XmlDocument doc = new XmlDocument(); | ||
495 | doc.LoadXml(request); | ||
496 | XmlNode rootnode = doc.FirstChild; | ||
497 | XmlNode authkeynode = rootnode.ChildNodes[0]; | ||
498 | if (authkeynode.Name != "authkey") | ||
499 | { | ||
500 | return "ERROR! bad XML - expected authkey tag"; | ||
501 | } | ||
502 | |||
503 | XmlNode simnode = rootnode.ChildNodes[1]; | ||
504 | if (simnode.Name != "sim") | ||
505 | { | ||
506 | return "ERROR! bad XML - expected sim tag"; | ||
507 | } | ||
508 | |||
509 | if (authkeynode.InnerText != TheSim.regionRecvKey) | ||
510 | { | ||
511 | return "ERROR! invalid key"; | ||
512 | } | ||
513 | |||
514 | //TheSim.regionSendKey = Cfg; | ||
515 | TheSim.regionRecvKey = config.SimRecvKey; | ||
516 | TheSim.regionSendKey = config.SimSendKey; | ||
517 | TheSim.regionSecret = config.SimRecvKey; | ||
518 | TheSim.regionDataURI = ""; | ||
519 | TheSim.regionAssetURI = config.DefaultAssetServer; | ||
520 | TheSim.regionAssetRecvKey = config.AssetRecvKey; | ||
521 | TheSim.regionAssetSendKey = config.AssetSendKey; | ||
522 | TheSim.regionUserURI = config.DefaultUserServer; | ||
523 | TheSim.regionUserSendKey = config.UserSendKey; | ||
524 | TheSim.regionUserRecvKey = config.UserRecvKey; | ||
525 | |||
526 | |||
527 | for (int i = 0; i < simnode.ChildNodes.Count; i++) | ||
528 | { | ||
529 | switch (simnode.ChildNodes[i].Name) | ||
530 | { | ||
531 | case "regionname": | ||
532 | TheSim.regionName = simnode.ChildNodes[i].InnerText; | ||
533 | break; | ||
534 | |||
535 | case "sim_ip": | ||
536 | TheSim.serverIP = simnode.ChildNodes[i].InnerText; | ||
537 | break; | ||
538 | |||
539 | case "sim_port": | ||
540 | TheSim.serverPort = Convert.ToUInt32(simnode.ChildNodes[i].InnerText); | ||
541 | break; | ||
542 | |||
543 | case "region_locx": | ||
544 | TheSim.regionLocX = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText); | ||
545 | TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256)); | ||
546 | break; | ||
547 | |||
548 | case "region_locy": | ||
549 | TheSim.regionLocY = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText); | ||
550 | TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256)); | ||
551 | break; | ||
552 | } | ||
553 | } | ||
554 | |||
555 | TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/"; | ||
556 | |||
557 | bool requirePublic = false; | ||
558 | |||
559 | if (requirePublic && (TheSim.serverIP.StartsWith("172.16") || TheSim.serverIP.StartsWith("192.168") || TheSim.serverIP.StartsWith("10.") || TheSim.serverIP.StartsWith("0.") || TheSim.serverIP.StartsWith("255."))) | ||
560 | { | ||
561 | return "ERROR! Servers must register with public addresses."; | ||
562 | } | ||
563 | |||
564 | |||
565 | try | ||
566 | { | ||
567 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Updating / adding via " + _plugins.Count + " storage provider(s) registered."); | ||
568 | foreach (KeyValuePair<string, IGridData> kvp in _plugins) | ||
569 | { | ||
570 | try | ||
571 | { | ||
572 | //Check reservations | ||
573 | ReservationData reserveData = kvp.Value.GetReservationAtPoint(TheSim.regionLocX, TheSim.regionLocY); | ||
574 | if ((reserveData != null && reserveData.gridRecvKey == TheSim.regionRecvKey) || (reserveData == null)) | ||
575 | { | ||
576 | kvp.Value.AddProfile(TheSim); | ||
577 | OpenSim.Framework.Console.MainLog.Instance.Verbose("New sim added to grid (" + TheSim.regionName + ")"); | ||
578 | logToDB(TheSim.UUID.ToStringHyphenated(), "RestSetSimMethod", "", 5, "Region successfully updated and connected to grid."); | ||
579 | } | ||
580 | else | ||
581 | { | ||
582 | return "Unable to update region (RestSetSimMethod): Incorrect auth key."; | ||
583 | } | ||
584 | } | ||
585 | catch (Exception e) | ||
586 | { | ||
587 | OpenSim.Framework.Console.MainLog.Instance.Verbose("getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " + e.ToString()); | ||
588 | } | ||
589 | } | ||
590 | return "OK"; | ||
591 | } | ||
592 | catch (Exception e) | ||
593 | { | ||
594 | return "ERROR! Could not save to database! (" + e.ToString() + ")"; | ||
595 | } | ||
596 | } | ||
597 | |||
598 | } | ||
599 | } | ||
diff --git a/OpenGridServices/OpenGridServices.GridServer/Main.cs b/OpenGridServices/OpenGridServices.GridServer/Main.cs deleted file mode 100644 index b948fd6..0000000 --- a/OpenGridServices/OpenGridServices.GridServer/Main.cs +++ /dev/null | |||
@@ -1,271 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | |||
29 | using System; | ||
30 | using System.IO; | ||
31 | using System.Text; | ||
32 | using System.Timers; | ||
33 | using System.Net; | ||
34 | using System.Threading; | ||
35 | using System.Reflection; | ||
36 | using libsecondlife; | ||
37 | using OpenGrid.Framework.Manager; | ||
38 | using OpenSim.Framework; | ||
39 | using OpenSim.Framework.Sims; | ||
40 | using OpenSim.Framework.Console; | ||
41 | using OpenSim.Framework.Interfaces; | ||
42 | using OpenSim.Servers; | ||
43 | using OpenSim.GenericConfig; | ||
44 | |||
45 | namespace OpenGridServices.GridServer | ||
46 | { | ||
47 | /// <summary> | ||
48 | /// </summary> | ||
49 | public class OpenGrid_Main : conscmd_callback | ||
50 | { | ||
51 | private string ConfigDll = "OpenGrid.Config.GridConfigDb4o.dll"; | ||
52 | private string GridDll = "OpenGrid.Framework.Data.MySQL.dll"; | ||
53 | public GridConfig Cfg; | ||
54 | |||
55 | public static OpenGrid_Main thegrid; | ||
56 | protected IGenericConfig localXMLConfig; | ||
57 | |||
58 | public static bool setuponly; | ||
59 | |||
60 | //public LLUUID highestUUID; | ||
61 | |||
62 | // private SimProfileManager m_simProfileManager; | ||
63 | |||
64 | private GridManager m_gridManager; | ||
65 | |||
66 | private LogBase m_console; | ||
67 | |||
68 | [STAThread] | ||
69 | public static void Main(string[] args) | ||
70 | { | ||
71 | if (args.Length > 0) | ||
72 | { | ||
73 | if (args[0] == "-setuponly") setuponly = true; | ||
74 | } | ||
75 | Console.WriteLine("Starting...\n"); | ||
76 | |||
77 | thegrid = new OpenGrid_Main(); | ||
78 | thegrid.Startup(); | ||
79 | |||
80 | thegrid.Work(); | ||
81 | } | ||
82 | |||
83 | private void Work() | ||
84 | { | ||
85 | while (true) | ||
86 | { | ||
87 | Thread.Sleep(5000); | ||
88 | // should flush the DB etc here | ||
89 | } | ||
90 | } | ||
91 | |||
92 | private OpenGrid_Main() | ||
93 | { | ||
94 | m_console = new LogBase("opengrid-gridserver-console.log", "OpenGrid", this, false); | ||
95 | MainLog.Instance = m_console; | ||
96 | |||
97 | |||
98 | } | ||
99 | |||
100 | public void managercallback(string cmd) | ||
101 | { | ||
102 | switch (cmd) | ||
103 | { | ||
104 | case "shutdown": | ||
105 | RunCmd("shutdown", new string[0]); | ||
106 | break; | ||
107 | } | ||
108 | } | ||
109 | |||
110 | |||
111 | public void Startup() | ||
112 | { | ||
113 | this.localXMLConfig = new XmlConfig("GridServerConfig.xml"); | ||
114 | this.localXMLConfig.LoadData(); | ||
115 | this.ConfigDB(this.localXMLConfig); | ||
116 | this.localXMLConfig.Close(); | ||
117 | |||
118 | m_console.Verbose( "Main.cs:Startup() - Loading configuration"); | ||
119 | Cfg = this.LoadConfigDll(this.ConfigDll); | ||
120 | Cfg.InitConfig(); | ||
121 | if (setuponly) Environment.Exit(0); | ||
122 | |||
123 | m_console.Verbose( "Main.cs:Startup() - Connecting to Storage Server"); | ||
124 | m_gridManager = new GridManager(); | ||
125 | m_gridManager.AddPlugin(GridDll); // Made of win | ||
126 | m_gridManager.config = Cfg; | ||
127 | |||
128 | m_console.Verbose( "Main.cs:Startup() - Starting HTTP process"); | ||
129 | BaseHttpServer httpServer = new BaseHttpServer(8001); | ||
130 | //GridManagementAgent GridManagerAgent = new GridManagementAgent(httpServer, "gridserver", Cfg.SimSendKey, Cfg.SimRecvKey, managercallback); | ||
131 | |||
132 | httpServer.AddXmlRPCHandler("simulator_login", m_gridManager.XmlRpcLoginToSimulatorMethod); | ||
133 | httpServer.AddXmlRPCHandler("map_block", m_gridManager.XmlRpcMapBlockMethod); | ||
134 | |||
135 | httpServer.AddRestHandler("GET", "/sims/", m_gridManager.RestGetSimMethod); | ||
136 | httpServer.AddRestHandler("POST", "/sims/", m_gridManager.RestSetSimMethod); | ||
137 | httpServer.AddRestHandler("GET", "/regions/", m_gridManager.RestGetRegionMethod); | ||
138 | httpServer.AddRestHandler("POST", "/regions/", m_gridManager.RestSetRegionMethod); | ||
139 | |||
140 | |||
141 | // lbsa71 : This code snippet taken from old http server. | ||
142 | // I have no idea what this was supposed to do - looks like an infinite recursion to me. | ||
143 | // case "regions": | ||
144 | //// DIRTY HACK ALERT | ||
145 | //Console.Notice("/regions/ accessed"); | ||
146 | //TheSim = OpenGrid_Main.thegrid._regionmanager.GetProfileByHandle((ulong)Convert.ToUInt64(rest_params[1])); | ||
147 | //respstring = ParseREST("/regions/" + rest_params[1], requestBody, HTTPmethod); | ||
148 | //break; | ||
149 | |||
150 | // lbsa71 : I guess these were never used? | ||
151 | //Listener.Prefixes.Add("http://+:8001/gods/"); | ||
152 | //Listener.Prefixes.Add("http://+:8001/highestuuid/"); | ||
153 | //Listener.Prefixes.Add("http://+:8001/uuidblocks/"); | ||
154 | |||
155 | httpServer.Start(); | ||
156 | |||
157 | m_console.Verbose( "Main.cs:Startup() - Starting sim status checker"); | ||
158 | |||
159 | System.Timers.Timer simCheckTimer = new System.Timers.Timer(3600000 * 3); // 3 Hours between updates. | ||
160 | simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims); | ||
161 | simCheckTimer.Enabled = true; | ||
162 | } | ||
163 | |||
164 | private GridConfig LoadConfigDll(string dllName) | ||
165 | { | ||
166 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); | ||
167 | GridConfig config = null; | ||
168 | |||
169 | foreach (Type pluginType in pluginAssembly.GetTypes()) | ||
170 | { | ||
171 | if (pluginType.IsPublic) | ||
172 | { | ||
173 | if (!pluginType.IsAbstract) | ||
174 | { | ||
175 | Type typeInterface = pluginType.GetInterface("IGridConfig", true); | ||
176 | |||
177 | if (typeInterface != null) | ||
178 | { | ||
179 | IGridConfig plug = (IGridConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | ||
180 | config = plug.GetConfigObject(); | ||
181 | break; | ||
182 | } | ||
183 | |||
184 | typeInterface = null; | ||
185 | } | ||
186 | } | ||
187 | } | ||
188 | pluginAssembly = null; | ||
189 | return config; | ||
190 | } | ||
191 | |||
192 | public void CheckSims(object sender, ElapsedEventArgs e) | ||
193 | { | ||
194 | /* | ||
195 | foreach (SimProfileBase sim in m_simProfileManager.SimProfiles.Values) | ||
196 | { | ||
197 | string SimResponse = ""; | ||
198 | try | ||
199 | { | ||
200 | WebRequest CheckSim = WebRequest.Create("http://" + sim.sim_ip + ":" + sim.sim_port.ToString() + "/checkstatus/"); | ||
201 | CheckSim.Method = "GET"; | ||
202 | CheckSim.ContentType = "text/plaintext"; | ||
203 | CheckSim.ContentLength = 0; | ||
204 | |||
205 | StreamWriter stOut = new StreamWriter(CheckSim.GetRequestStream(), System.Text.Encoding.ASCII); | ||
206 | stOut.Write(""); | ||
207 | stOut.Close(); | ||
208 | |||
209 | StreamReader stIn = new StreamReader(CheckSim.GetResponse().GetResponseStream()); | ||
210 | SimResponse = stIn.ReadToEnd(); | ||
211 | stIn.Close(); | ||
212 | } | ||
213 | catch | ||
214 | { | ||
215 | } | ||
216 | |||
217 | if (SimResponse == "OK") | ||
218 | { | ||
219 | m_simProfileManager.SimProfiles[sim.UUID].online = true; | ||
220 | } | ||
221 | else | ||
222 | { | ||
223 | m_simProfileManager.SimProfiles[sim.UUID].online = false; | ||
224 | } | ||
225 | } | ||
226 | */ | ||
227 | } | ||
228 | |||
229 | public void RunCmd(string cmd, string[] cmdparams) | ||
230 | { | ||
231 | switch (cmd) | ||
232 | { | ||
233 | case "help": | ||
234 | m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)"); | ||
235 | break; | ||
236 | |||
237 | case "shutdown": | ||
238 | m_console.Close(); | ||
239 | Environment.Exit(0); | ||
240 | break; | ||
241 | } | ||
242 | } | ||
243 | |||
244 | public void Show(string ShowWhat) | ||
245 | { | ||
246 | } | ||
247 | |||
248 | private void ConfigDB(IGenericConfig configData) | ||
249 | { | ||
250 | try | ||
251 | { | ||
252 | string attri = ""; | ||
253 | attri = configData.GetAttribute("DataBaseProvider"); | ||
254 | if (attri == "") | ||
255 | { | ||
256 | GridDll = "OpenGrid.Framework.Data.DB4o.dll"; | ||
257 | configData.SetAttribute("DataBaseProvider", "OpenGrid.Framework.Data.DB4o.dll"); | ||
258 | } | ||
259 | else | ||
260 | { | ||
261 | GridDll = attri; | ||
262 | } | ||
263 | configData.Commit(); | ||
264 | } | ||
265 | catch (Exception e) | ||
266 | { | ||
267 | |||
268 | } | ||
269 | } | ||
270 | } | ||
271 | } | ||
diff --git a/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.csproj b/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.csproj deleted file mode 100644 index 291f997..0000000 --- a/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.csproj +++ /dev/null | |||
@@ -1,134 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{21BFC8E2-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenGridServices.GridServer</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Exe</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenGridServices.GridServer</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>False</Optimize> | ||
35 | <OutputPath>..\..\bin\</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>True</Optimize> | ||
53 | <OutputPath>..\..\bin\</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="Db4objects.Db4o.dll" > | ||
62 | <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="libsecondlife.dll" > | ||
66 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="OpenSim.Framework" > | ||
70 | <HintPath>OpenSim.Framework.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="OpenSim.Framework.Console" > | ||
74 | <HintPath>OpenSim.Framework.Console.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | <Reference Include="OpenSim.GenericConfig.Xml" > | ||
78 | <HintPath>OpenSim.GenericConfig.Xml.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | <Reference Include="OpenSim.Servers" > | ||
82 | <HintPath>OpenSim.Servers.dll</HintPath> | ||
83 | <Private>False</Private> | ||
84 | </Reference> | ||
85 | <Reference Include="System" > | ||
86 | <HintPath>System.dll</HintPath> | ||
87 | <Private>False</Private> | ||
88 | </Reference> | ||
89 | <Reference Include="System.Data" > | ||
90 | <HintPath>System.Data.dll</HintPath> | ||
91 | <Private>False</Private> | ||
92 | </Reference> | ||
93 | <Reference Include="System.Xml" > | ||
94 | <HintPath>System.Xml.dll</HintPath> | ||
95 | <Private>False</Private> | ||
96 | </Reference> | ||
97 | <Reference Include="XMLRPC" > | ||
98 | <HintPath>XMLRPC.dll</HintPath> | ||
99 | <Private>False</Private> | ||
100 | </Reference> | ||
101 | </ItemGroup> | ||
102 | <ItemGroup> | ||
103 | <ProjectReference Include="..\..\Common\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj"> | ||
104 | <Name>OpenGrid.Framework.Data</Name> | ||
105 | <Project>{62CDF671-0000-0000-0000-000000000000}</Project> | ||
106 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
107 | <Private>False</Private> | ||
108 | </ProjectReference> | ||
109 | <ProjectReference Include="..\OpenGrid.Framework.Manager\OpenGrid.Framework.Manager.csproj"> | ||
110 | <Name>OpenGrid.Framework.Manager</Name> | ||
111 | <Project>{7924FD35-0000-0000-0000-000000000000}</Project> | ||
112 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
113 | <Private>False</Private> | ||
114 | </ProjectReference> | ||
115 | </ItemGroup> | ||
116 | <ItemGroup> | ||
117 | <Compile Include="GridManager.cs"> | ||
118 | <SubType>Code</SubType> | ||
119 | </Compile> | ||
120 | <Compile Include="Main.cs"> | ||
121 | <SubType>Code</SubType> | ||
122 | </Compile> | ||
123 | <Compile Include="Properties\AssemblyInfo.cs"> | ||
124 | <SubType>Code</SubType> | ||
125 | </Compile> | ||
126 | </ItemGroup> | ||
127 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
128 | <PropertyGroup> | ||
129 | <PreBuildEvent> | ||
130 | </PreBuildEvent> | ||
131 | <PostBuildEvent> | ||
132 | </PostBuildEvent> | ||
133 | </PropertyGroup> | ||
134 | </Project> | ||
diff --git a/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build b/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build deleted file mode 100644 index 60c0f85..0000000 --- a/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | <?xml version="1.0" ?> | ||
2 | <project name="OpenGridServices.GridServer" default="build"> | ||
3 | <target name="build"> | ||
4 | <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> | ||
5 | <mkdir dir="${project::get-base-directory()}/${build.dir}" /> | ||
6 | <copy todir="${project::get-base-directory()}/${build.dir}"> | ||
7 | <fileset basedir="${project::get-base-directory()}"> | ||
8 | </fileset> | ||
9 | </copy> | ||
10 | <csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe"> | ||
11 | <resources prefix="OpenGridServices.GridServer" dynamicprefix="true" > | ||
12 | </resources> | ||
13 | <sources failonempty="true"> | ||
14 | <include name="GridManager.cs" /> | ||
15 | <include name="Main.cs" /> | ||
16 | <include name="Properties/AssemblyInfo.cs" /> | ||
17 | </sources> | ||
18 | <references basedir="${project::get-base-directory()}"> | ||
19 | <lib> | ||
20 | <include name="${project::get-base-directory()}" /> | ||
21 | <include name="${project::get-base-directory()}/${build.dir}" /> | ||
22 | </lib> | ||
23 | <include name="../../bin/Db4objects.Db4o.dll" /> | ||
24 | <include name="../../bin/libsecondlife.dll" /> | ||
25 | <include name="../../bin/OpenGrid.Framework.Data.dll" /> | ||
26 | <include name="../../bin/OpenGrid.Framework.Manager.dll" /> | ||
27 | <include name="../../bin/OpenSim.Framework.dll" /> | ||
28 | <include name="../../bin/OpenSim.Framework.Console.dll" /> | ||
29 | <include name="../../bin/OpenSim.GenericConfig.Xml.dll" /> | ||
30 | <include name="../../bin/OpenSim.Servers.dll" /> | ||
31 | <include name="System.dll" /> | ||
32 | <include name="System.Data.dll" /> | ||
33 | <include name="System.Xml.dll" /> | ||
34 | <include name="../../bin/XMLRPC.dll" /> | ||
35 | </references> | ||
36 | </csc> | ||
37 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> | ||
38 | <mkdir dir="${project::get-base-directory()}/../../bin/"/> | ||
39 | <copy todir="${project::get-base-directory()}/../../bin/"> | ||
40 | <fileset basedir="${project::get-base-directory()}/${build.dir}/" > | ||
41 | <include name="*.dll"/> | ||
42 | <include name="*.exe"/> | ||
43 | </fileset> | ||
44 | </copy> | ||
45 | </target> | ||
46 | <target name="clean"> | ||
47 | <delete dir="${bin.dir}" failonerror="false" /> | ||
48 | <delete dir="${obj.dir}" failonerror="false" /> | ||
49 | </target> | ||
50 | <target name="doc" description="Creates documentation."> | ||
51 | </target> | ||
52 | </project> | ||
diff --git a/OpenGridServices/OpenGridServices.GridServer/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGridServices.GridServer/Properties/AssemblyInfo.cs deleted file mode 100644 index 303dddf..0000000 --- a/OpenGridServices/OpenGridServices.GridServer/Properties/AssemblyInfo.cs +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System.Reflection; | ||
29 | using System.Runtime.CompilerServices; | ||
30 | using System.Runtime.InteropServices; | ||
31 | |||
32 | // General Information about an assembly is controlled through the following | ||
33 | // set of attributes. Change these attribute values to modify the information | ||
34 | // associated with an assembly. | ||
35 | [assembly: AssemblyTitle("OGS-GridServer")] | ||
36 | [assembly: AssemblyDescription("")] | ||
37 | [assembly: AssemblyConfiguration("")] | ||
38 | [assembly: AssemblyCompany("")] | ||
39 | [assembly: AssemblyProduct("OGS-GridServer")] | ||
40 | [assembly: AssemblyCopyright("Copyright © 2007")] | ||
41 | [assembly: AssemblyTrademark("")] | ||
42 | [assembly: AssemblyCulture("")] | ||
43 | |||
44 | // Setting ComVisible to false makes the types in this assembly not visible | ||
45 | // to COM components. If you need to access a type in this assembly from | ||
46 | // COM, set the ComVisible attribute to true on that type. | ||
47 | [assembly: ComVisible(false)] | ||
48 | |||
49 | // The following GUID is for the ID of the typelib if this project is exposed to COM | ||
50 | [assembly: Guid("b541b244-3d1d-4625-9003-bc2a3a6a39a4")] | ||
51 | |||
52 | // Version information for an assembly consists of the following four values: | ||
53 | // | ||
54 | // Major Version | ||
55 | // Minor Version | ||
56 | // Build Number | ||
57 | // Revision | ||
58 | // | ||
59 | [assembly: AssemblyVersion("1.0.0.0")] | ||
60 | [assembly: AssemblyFileVersion("1.0.0.0")] | ||
diff --git a/OpenGridServices/OpenGridServices.InventoryServer/InventoryManager.cs b/OpenGridServices/OpenGridServices.InventoryServer/InventoryManager.cs deleted file mode 100644 index 9ca9b5e..0000000 --- a/OpenGridServices/OpenGridServices.InventoryServer/InventoryManager.cs +++ /dev/null | |||
@@ -1,125 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System; | ||
29 | using System.Collections; | ||
30 | using System.Collections.Generic; | ||
31 | using System.Text; | ||
32 | using OpenGrid.Framework.Data; | ||
33 | using libsecondlife; | ||
34 | using System.Reflection; | ||
35 | |||
36 | using System.Xml; | ||
37 | using Nwc.XmlRpc; | ||
38 | using OpenSim.Framework.Sims; | ||
39 | using OpenSim.Framework.Inventory; | ||
40 | using OpenSim.Framework.Utilities; | ||
41 | |||
42 | using System.Security.Cryptography; | ||
43 | |||
44 | namespace OpenGridServices.InventoryServer | ||
45 | { | ||
46 | class InventoryManager | ||
47 | { | ||
48 | Dictionary<string, IInventoryData> _plugins = new Dictionary<string, IInventoryData>(); | ||
49 | |||
50 | /// <summary> | ||
51 | /// Adds a new inventory server plugin - user servers will be requested in the order they were loaded. | ||
52 | /// </summary> | ||
53 | /// <param name="FileName">The filename to the inventory server plugin DLL</param> | ||
54 | public void AddPlugin(string FileName) | ||
55 | { | ||
56 | OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Invenstorage: Attempting to load " + FileName); | ||
57 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); | ||
58 | |||
59 | OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Invenstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); | ||
60 | foreach (Type pluginType in pluginAssembly.GetTypes()) | ||
61 | { | ||
62 | if (!pluginType.IsAbstract) | ||
63 | { | ||
64 | Type typeInterface = pluginType.GetInterface("IInventoryData", true); | ||
65 | |||
66 | if (typeInterface != null) | ||
67 | { | ||
68 | IInventoryData plug = (IInventoryData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | ||
69 | plug.Initialise(); | ||
70 | this._plugins.Add(plug.getName(), plug); | ||
71 | OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Invenstorage: Added IUserData Interface"); | ||
72 | } | ||
73 | |||
74 | typeInterface = null; | ||
75 | } | ||
76 | } | ||
77 | |||
78 | pluginAssembly = null; | ||
79 | } | ||
80 | |||
81 | public List<InventoryFolderBase> getRootFolders(LLUUID user) | ||
82 | { | ||
83 | foreach (KeyValuePair<string, IInventoryData> kvp in _plugins) | ||
84 | { | ||
85 | try | ||
86 | { | ||
87 | return kvp.Value.getUserRootFolders(user); | ||
88 | } | ||
89 | catch (Exception e) | ||
90 | { | ||
91 | OpenSim.Framework.Console.MainConsole.Instance.Notice("Unable to get root folders via " + kvp.Key + " (" + e.ToString() + ")"); | ||
92 | } | ||
93 | } | ||
94 | return null; | ||
95 | } | ||
96 | |||
97 | public XmlRpcResponse XmlRpcInventoryRequest(XmlRpcRequest request) | ||
98 | { | ||
99 | XmlRpcResponse response = new XmlRpcResponse(); | ||
100 | Hashtable requestData = (Hashtable)request.Params[0]; | ||
101 | |||
102 | Hashtable responseData = new Hashtable(); | ||
103 | |||
104 | // Stuff happens here | ||
105 | |||
106 | if (requestData.ContainsKey("Access-type")) | ||
107 | { | ||
108 | if (requestData["access-type"] == "rootfolders") | ||
109 | { | ||
110 | // responseData["rootfolders"] = | ||
111 | } | ||
112 | } | ||
113 | else | ||
114 | { | ||
115 | responseData["error"] = "No access-type specified."; | ||
116 | } | ||
117 | |||
118 | |||
119 | // Stuff stops happening here | ||
120 | |||
121 | response.Value = responseData; | ||
122 | return response; | ||
123 | } | ||
124 | } | ||
125 | } | ||
diff --git a/OpenGridServices/OpenGridServices.InventoryServer/Main.cs b/OpenGridServices/OpenGridServices.InventoryServer/Main.cs deleted file mode 100644 index f479a79..0000000 --- a/OpenGridServices/OpenGridServices.InventoryServer/Main.cs +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System; | ||
29 | using System.Collections; | ||
30 | using System.Collections.Generic; | ||
31 | using System.Reflection; | ||
32 | using System.IO; | ||
33 | using System.Text; | ||
34 | using libsecondlife; | ||
35 | using OpenSim.Framework.User; | ||
36 | using OpenSim.Framework.Sims; | ||
37 | using OpenSim.Framework.Inventory; | ||
38 | using OpenSim.Framework.Interfaces; | ||
39 | using OpenSim.Framework.Console; | ||
40 | using OpenSim.Servers; | ||
41 | using OpenSim.Framework.Utilities; | ||
42 | |||
43 | namespace OpenGridServices.InventoryServer | ||
44 | { | ||
45 | public class OpenInventory_Main : BaseServer, conscmd_callback | ||
46 | { | ||
47 | ConsoleBase m_console; | ||
48 | InventoryManager m_inventoryManager; | ||
49 | |||
50 | public static void Main(string[] args) | ||
51 | { | ||
52 | } | ||
53 | |||
54 | public OpenInventory_Main() | ||
55 | { | ||
56 | m_console = new ConsoleBase("opengrid-inventory-console.log", "OpenInventory", this, false); | ||
57 | MainConsole.Instance = m_console; | ||
58 | } | ||
59 | |||
60 | public void Startup() | ||
61 | { | ||
62 | MainConsole.Instance.Notice("Initialising inventory manager..."); | ||
63 | m_inventoryManager = new InventoryManager(); | ||
64 | |||
65 | MainConsole.Instance.Notice("Starting HTTP server"); | ||
66 | BaseHttpServer httpServer = new BaseHttpServer(8004); | ||
67 | |||
68 | httpServer.AddXmlRPCHandler("rootfolders", m_inventoryManager.XmlRpcInventoryRequest); | ||
69 | //httpServer.AddRestHandler("GET","/rootfolders/",Rest | ||
70 | } | ||
71 | |||
72 | public void RunCmd(string cmd, string[] cmdparams) | ||
73 | { | ||
74 | switch (cmd) | ||
75 | { | ||
76 | case "shutdown": | ||
77 | m_console.Close(); | ||
78 | Environment.Exit(0); | ||
79 | break; | ||
80 | } | ||
81 | } | ||
82 | |||
83 | public void Show(string ShowWhat) | ||
84 | { | ||
85 | } | ||
86 | } | ||
87 | } | ||
diff --git a/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj b/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj deleted file mode 100644 index 6aec357..0000000 --- a/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj +++ /dev/null | |||
@@ -1,125 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{338FA00B-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenGridServices.InventoryServer</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Exe</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenGridServices.InventoryServer</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>False</Optimize> | ||
35 | <OutputPath>..\..\bin\</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>True</Optimize> | ||
53 | <OutputPath>..\..\bin\</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="System" > | ||
62 | <HintPath>System.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="System.Data" > | ||
66 | <HintPath>System.Data.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="System.Xml" > | ||
70 | <HintPath>System.Xml.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="OpenSim.Framework" > | ||
74 | <HintPath>OpenSim.Framework.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | <Reference Include="OpenSim.Framework.Console" > | ||
78 | <HintPath>OpenSim.Framework.Console.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | <Reference Include="OpenSim.GridInterfaces.Local" > | ||
82 | <HintPath>OpenSim.GridInterfaces.Local.dll</HintPath> | ||
83 | <Private>False</Private> | ||
84 | </Reference> | ||
85 | <Reference Include="OpenSim.Servers" > | ||
86 | <HintPath>OpenSim.Servers.dll</HintPath> | ||
87 | <Private>False</Private> | ||
88 | </Reference> | ||
89 | <Reference Include="libsecondlife.dll" > | ||
90 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> | ||
91 | <Private>False</Private> | ||
92 | </Reference> | ||
93 | <Reference Include="Db4objects.Db4o.dll" > | ||
94 | <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath> | ||
95 | <Private>False</Private> | ||
96 | </Reference> | ||
97 | <Reference Include="XMLRPC" > | ||
98 | <HintPath>XMLRPC.dll</HintPath> | ||
99 | <Private>False</Private> | ||
100 | </Reference> | ||
101 | </ItemGroup> | ||
102 | <ItemGroup> | ||
103 | <ProjectReference Include="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj"> | ||
104 | <Name>OpenGrid.Framework.Data</Name> | ||
105 | <Project>{62CDF671-0000-0000-0000-000000000000}</Project> | ||
106 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
107 | <Private>False</Private> | ||
108 | </ProjectReference> | ||
109 | </ItemGroup> | ||
110 | <ItemGroup> | ||
111 | <Compile Include="Main.cs"> | ||
112 | <SubType>Code</SubType> | ||
113 | </Compile> | ||
114 | <Compile Include="InventoryManager.cs"> | ||
115 | <SubType>Code</SubType> | ||
116 | </Compile> | ||
117 | </ItemGroup> | ||
118 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
119 | <PropertyGroup> | ||
120 | <PreBuildEvent> | ||
121 | </PreBuildEvent> | ||
122 | <PostBuildEvent> | ||
123 | </PostBuildEvent> | ||
124 | </PropertyGroup> | ||
125 | </Project> | ||
diff --git a/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.exe.build b/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.exe.build deleted file mode 100644 index c23a862..0000000 --- a/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.exe.build +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | <?xml version="1.0" ?> | ||
2 | <project name="OpenGridServices.InventoryServer" default="build"> | ||
3 | <target name="build"> | ||
4 | <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> | ||
5 | <mkdir dir="${project::get-base-directory()}/${build.dir}" /> | ||
6 | <copy todir="${project::get-base-directory()}/${build.dir}"> | ||
7 | <fileset basedir="${project::get-base-directory()}"> | ||
8 | </fileset> | ||
9 | </copy> | ||
10 | <csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe"> | ||
11 | <resources prefix="OpenGridServices.InventoryServer" dynamicprefix="true" > | ||
12 | </resources> | ||
13 | <sources failonempty="true"> | ||
14 | <include name="Main.cs" /> | ||
15 | <include name="InventoryManager.cs" /> | ||
16 | </sources> | ||
17 | <references basedir="${project::get-base-directory()}"> | ||
18 | <lib> | ||
19 | <include name="${project::get-base-directory()}" /> | ||
20 | <include name="${project::get-base-directory()}/${build.dir}" /> | ||
21 | </lib> | ||
22 | <include name="System.dll" /> | ||
23 | <include name="System.Data.dll" /> | ||
24 | <include name="System.Xml.dll" /> | ||
25 | <include name="../../bin/OpenSim.Framework.dll" /> | ||
26 | <include name="../../bin/OpenSim.Framework.Console.dll" /> | ||
27 | <include name="../../bin/OpenSim.GridInterfaces.Local.dll" /> | ||
28 | <include name="../../bin/OpenGrid.Framework.Data.dll" /> | ||
29 | <include name="../../bin/OpenSim.Servers.dll" /> | ||
30 | <include name="../../bin/libsecondlife.dll" /> | ||
31 | <include name="../../bin/Db4objects.Db4o.dll" /> | ||
32 | <include name="../../bin/XMLRPC.dll" /> | ||
33 | </references> | ||
34 | </csc> | ||
35 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> | ||
36 | <mkdir dir="${project::get-base-directory()}/../../bin/"/> | ||
37 | <copy todir="${project::get-base-directory()}/../../bin/"> | ||
38 | <fileset basedir="${project::get-base-directory()}/${build.dir}/" > | ||
39 | <include name="*.dll"/> | ||
40 | <include name="*.exe"/> | ||
41 | </fileset> | ||
42 | </copy> | ||
43 | </target> | ||
44 | <target name="clean"> | ||
45 | <delete dir="${bin.dir}" failonerror="false" /> | ||
46 | <delete dir="${obj.dir}" failonerror="false" /> | ||
47 | </target> | ||
48 | <target name="doc" description="Creates documentation."> | ||
49 | </target> | ||
50 | </project> | ||
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.mds b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.mds deleted file mode 100644 index ed7bc24..0000000 --- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.mds +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | <Combine name="OpenGridServices.Manager" fileversion="2.0" outputpath="../../mono-1.2.3.1/lib/monodevelop/bin" MakePkgConfig="False" MakeLibPC="True"> | ||
2 | <Configurations active="Debug"> | ||
3 | <Configuration name="Debug" ctype="CombineConfiguration"> | ||
4 | <Entry build="True" name="OpenGridServices.Manager" configuration="Debug" /> | ||
5 | </Configuration> | ||
6 | <Configuration name="Release" ctype="CombineConfiguration"> | ||
7 | <Entry build="True" name="OpenGridServices.Manager" configuration="Release" /> | ||
8 | </Configuration> | ||
9 | </Configurations> | ||
10 | <StartMode startupentry="OpenGridServices.Manager" single="True"> | ||
11 | <Execute type="None" entry="OpenGridServices.Manager" /> | ||
12 | </StartMode> | ||
13 | <Entries> | ||
14 | <Entry filename="./OpenGridServices.Manager/OpenGridServices.Manager.mdp" /> | ||
15 | </Entries> | ||
16 | </Combine> \ No newline at end of file | ||
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.userprefs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.userprefs deleted file mode 100644 index f221509..0000000 --- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.userprefs +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | <?xml version="1.0"?> | ||
2 | <UserCombinePreferences filename="/home/gareth/OpenGridServices.Manager/OpenGridServices.Manager.mds"> | ||
3 | <Files> | ||
4 | <File filename="Welcome" /> | ||
5 | <File filename="./OpenGridServices.Manager/MainWindow.cs" /> | ||
6 | <File filename="./OpenGridServices.Manager/ConnectToGridServerDialog.cs" /> | ||
7 | <File filename="./OpenGridServices.Manager/Main.cs" /> | ||
8 | </Files> | ||
9 | <Views> | ||
10 | <ViewMemento Id="MonoDevelop.Ide.Gui.Pads.ProjectPad"> | ||
11 | <TreeView> | ||
12 | <Node expanded="True"> | ||
13 | <Node name="OpenGridServices.Manager" expanded="True"> | ||
14 | <Node name="References" expanded="True" /> | ||
15 | <Node name="Resources" expanded="True" /> | ||
16 | <Node name="UserInterface" expanded="True" /> | ||
17 | <Node name="ConnectToGridServerDialog.cs" expanded="False" selected="True" /> | ||
18 | </Node> | ||
19 | </Node> | ||
20 | </TreeView> | ||
21 | </ViewMemento> | ||
22 | <ViewMemento Id="MonoDevelop.Ide.Gui.Pads.ClassPad"> | ||
23 | <TreeView> | ||
24 | <Node expanded="True" /> | ||
25 | </TreeView> | ||
26 | </ViewMemento> | ||
27 | <ViewMemento Id="MonoDevelop.NUnit.TestPad"> | ||
28 | <TreeView> | ||
29 | <Node expanded="False" /> | ||
30 | </TreeView> | ||
31 | </ViewMemento> | ||
32 | </Views> | ||
33 | <Properties> | ||
34 | <Properties> | ||
35 | <Property key="ActiveConfiguration" value="Debug" /> | ||
36 | <Property key="ActiveWindow" value="/home/gareth/OpenGridServices.Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs" /> | ||
37 | </Properties> | ||
38 | </Properties> | ||
39 | </UserCombinePreferences> \ No newline at end of file | ||
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.usertasks b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.usertasks deleted file mode 100644 index d887d0e..0000000 --- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.usertasks +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <ArrayOfUserTask xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" /> \ No newline at end of file | ||
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/AssemblyInfo.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/AssemblyInfo.cs deleted file mode 100644 index af4e275..0000000 --- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/AssemblyInfo.cs +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | using System.Reflection; | ||
2 | using System.Runtime.CompilerServices; | ||
3 | |||
4 | // Information about this assembly is defined by the following | ||
5 | // attributes. | ||
6 | // | ||
7 | // change them to the information which is associated with the assembly | ||
8 | // you compile. | ||
9 | |||
10 | [assembly: AssemblyTitle("")] | ||
11 | [assembly: AssemblyDescription("")] | ||
12 | [assembly: AssemblyConfiguration("")] | ||
13 | [assembly: AssemblyCompany("")] | ||
14 | [assembly: AssemblyProduct("")] | ||
15 | [assembly: AssemblyCopyright("")] | ||
16 | [assembly: AssemblyTrademark("")] | ||
17 | [assembly: AssemblyCulture("")] | ||
18 | |||
19 | // The assembly version has following format : | ||
20 | // | ||
21 | // Major.Minor.Build.Revision | ||
22 | // | ||
23 | // You can specify all values by your own or you can build default build and revision | ||
24 | // numbers with the '*' character (the default): | ||
25 | |||
26 | [assembly: AssemblyVersion("1.0.*")] | ||
27 | |||
28 | // The following attributes specify the key for the sign of your assembly. See the | ||
29 | // .NET Framework documentation for more information about signing. | ||
30 | // This is not required, if you don't want signing let these attributes like they're. | ||
31 | [assembly: AssemblyDelaySign(false)] | ||
32 | [assembly: AssemblyKeyFile("")] | ||
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/BlockingQueue.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/BlockingQueue.cs deleted file mode 100644 index 83685fc..0000000 --- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/BlockingQueue.cs +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | using System; | ||
2 | using System.Threading; | ||
3 | using System.Collections.Generic; | ||
4 | using System.Text; | ||
5 | |||
6 | namespace OpenGridServices.Manager | ||
7 | { | ||
8 | public class BlockingQueue<T> | ||
9 | { | ||
10 | private Queue<T> _queue = new Queue<T>(); | ||
11 | private object _queueSync = new object(); | ||
12 | |||
13 | public void Enqueue(T value) | ||
14 | { | ||
15 | lock (_queueSync) | ||
16 | { | ||
17 | _queue.Enqueue(value); | ||
18 | Monitor.Pulse(_queueSync); | ||
19 | } | ||
20 | } | ||
21 | |||
22 | public T Dequeue() | ||
23 | { | ||
24 | lock (_queueSync) | ||
25 | { | ||
26 | if (_queue.Count < 1) | ||
27 | Monitor.Wait(_queueSync); | ||
28 | |||
29 | return _queue.Dequeue(); | ||
30 | } | ||
31 | } | ||
32 | } | ||
33 | } | ||
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Connect to grid server.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Connect to grid server.cs deleted file mode 100644 index 0d509ef..0000000 --- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Connect to grid server.cs +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | |||
2 | using System; | ||
3 | |||
4 | namespace OpenGridServices.Manager | ||
5 | { | ||
6 | |||
7 | |||
8 | public partial class Connect to grid server : Gtk.Dialog | ||
9 | { | ||
10 | |||
11 | public Connect to grid server() | ||
12 | { | ||
13 | this.Build(); | ||
14 | } | ||
15 | } | ||
16 | } | ||
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs deleted file mode 100644 index 8a80b1d..0000000 --- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | using Gtk; | ||
2 | using System; | ||
3 | |||
4 | namespace OpenGridServices.Manager { | ||
5 | public partial class ConnectToGridServerDialog : Gtk.Dialog | ||
6 | { | ||
7 | |||
8 | public ConnectToGridServerDialog() | ||
9 | { | ||
10 | this.Build(); | ||
11 | } | ||
12 | |||
13 | protected virtual void OnResponse(object o, Gtk.ResponseArgs args) | ||
14 | { | ||
15 | switch(args.ResponseId) { | ||
16 | case Gtk.ResponseType.Ok: | ||
17 | MainClass.PendingOperations.Enqueue("connect_to_gridserver " + this.entry1.Text + " " + this.entry2.Text + " " + this.entry3.Text); | ||
18 | break; | ||
19 | |||
20 | case Gtk.ResponseType.Cancel: | ||
21 | break; | ||
22 | } | ||
23 | this.Hide(); | ||
24 | |||
25 | } | ||
26 | |||
27 | } | ||
28 | |||
29 | } \ No newline at end of file | ||
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs deleted file mode 100644 index 6b632d6..0000000 --- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs +++ /dev/null | |||
@@ -1,106 +0,0 @@ | |||
1 | using Nwc.XmlRpc; | ||
2 | using System; | ||
3 | using System.Net; | ||
4 | using System.IO; | ||
5 | using System.Xml; | ||
6 | using System.Collections; | ||
7 | using System.Collections.Generic; | ||
8 | using libsecondlife; | ||
9 | |||
10 | namespace OpenGridServices.Manager | ||
11 | { | ||
12 | public class GridServerConnectionManager | ||
13 | { | ||
14 | private string ServerURL; | ||
15 | public LLUUID SessionID; | ||
16 | public bool connected=false; | ||
17 | |||
18 | public RegionBlock[][] WorldMap; | ||
19 | |||
20 | public bool Connect(string GridServerURL, string username, string password) | ||
21 | { | ||
22 | try { | ||
23 | this.ServerURL=GridServerURL; | ||
24 | Hashtable LoginParamsHT = new Hashtable(); | ||
25 | LoginParamsHT["username"]=username; | ||
26 | LoginParamsHT["password"]=password; | ||
27 | ArrayList LoginParams = new ArrayList(); | ||
28 | LoginParams.Add(LoginParamsHT); | ||
29 | XmlRpcRequest GridLoginReq = new XmlRpcRequest("manager_login",LoginParams); | ||
30 | XmlRpcResponse GridResp = GridLoginReq.Send(ServerURL,3000); | ||
31 | if(GridResp.IsFault) { | ||
32 | connected=false; | ||
33 | return false; | ||
34 | } else { | ||
35 | Hashtable gridrespData = (Hashtable)GridResp.Value; | ||
36 | this.SessionID = new LLUUID((string)gridrespData["session_id"]); | ||
37 | connected=true; | ||
38 | return true; | ||
39 | } | ||
40 | } catch(Exception e) { | ||
41 | Console.WriteLine(e.ToString()); | ||
42 | connected=false; | ||
43 | return false; | ||
44 | } | ||
45 | } | ||
46 | |||
47 | public void DownloadMap() | ||
48 | { | ||
49 | System.Net.WebClient mapdownloader = new WebClient(); | ||
50 | Stream regionliststream = mapdownloader.OpenRead(ServerURL + "/regionlist"); | ||
51 | |||
52 | RegionBlock TempRegionData; | ||
53 | |||
54 | XmlDocument doc = new XmlDocument(); | ||
55 | doc.Load(regionliststream); | ||
56 | regionliststream.Close(); | ||
57 | XmlNode rootnode = doc.FirstChild; | ||
58 | if (rootnode.Name != "regions") | ||
59 | { | ||
60 | // TODO - ERROR! | ||
61 | } | ||
62 | |||
63 | for(int i=0; i<=rootnode.ChildNodes.Count; i++) | ||
64 | { | ||
65 | if(rootnode.ChildNodes.Item(i).Name != "region") { | ||
66 | // TODO - ERROR! | ||
67 | } else { | ||
68 | TempRegionData = new RegionBlock(); | ||
69 | |||
70 | |||
71 | } | ||
72 | } | ||
73 | } | ||
74 | |||
75 | public bool RestartServer() | ||
76 | { | ||
77 | return true; | ||
78 | } | ||
79 | |||
80 | public bool ShutdownServer() | ||
81 | { | ||
82 | try { | ||
83 | Hashtable ShutdownParamsHT = new Hashtable(); | ||
84 | ArrayList ShutdownParams = new ArrayList(); | ||
85 | ShutdownParamsHT["session_id"]=this.SessionID.ToString(); | ||
86 | ShutdownParams.Add(ShutdownParamsHT); | ||
87 | XmlRpcRequest GridShutdownReq = new XmlRpcRequest("shutdown",ShutdownParams); | ||
88 | XmlRpcResponse GridResp = GridShutdownReq.Send(this.ServerURL,3000); | ||
89 | if(GridResp.IsFault) { | ||
90 | return false; | ||
91 | } else { | ||
92 | connected=false; | ||
93 | return true; | ||
94 | } | ||
95 | } catch(Exception e) { | ||
96 | Console.WriteLine(e.ToString()); | ||
97 | return false; | ||
98 | } | ||
99 | } | ||
100 | |||
101 | public void DisconnectServer() | ||
102 | { | ||
103 | this.connected=false; | ||
104 | } | ||
105 | } | ||
106 | } | ||
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Main.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Main.cs deleted file mode 100644 index 42e09e0..0000000 --- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Main.cs +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | // project created on 5/14/2007 at 2:04 PM | ||
2 | using System; | ||
3 | using System.Threading; | ||
4 | using Gtk; | ||
5 | |||
6 | namespace OpenGridServices.Manager | ||
7 | { | ||
8 | class MainClass | ||
9 | { | ||
10 | |||
11 | public static bool QuitReq=false; | ||
12 | public static BlockingQueue<string> PendingOperations = new BlockingQueue<string>(); | ||
13 | |||
14 | private static Thread OperationsRunner; | ||
15 | |||
16 | private static GridServerConnectionManager gridserverConn; | ||
17 | |||
18 | private static MainWindow win; | ||
19 | |||
20 | public static void DoMainLoop() | ||
21 | { | ||
22 | while(!QuitReq) | ||
23 | { | ||
24 | Application.RunIteration(); | ||
25 | } | ||
26 | } | ||
27 | |||
28 | public static void RunOperations() | ||
29 | { | ||
30 | string operation; | ||
31 | string cmd; | ||
32 | char[] sep = new char[1]; | ||
33 | sep[0]=' '; | ||
34 | while(!QuitReq) | ||
35 | { | ||
36 | operation=PendingOperations.Dequeue(); | ||
37 | Console.WriteLine(operation); | ||
38 | cmd = operation.Split(sep)[0]; | ||
39 | switch(cmd) { | ||
40 | case "connect_to_gridserver": | ||
41 | win.SetStatus("Connecting to grid server..."); | ||
42 | if(gridserverConn.Connect(operation.Split(sep)[1],operation.Split(sep)[2],operation.Split(sep)[3])) { | ||
43 | win.SetStatus("Connected OK with session ID:" + gridserverConn.SessionID); | ||
44 | win.SetGridServerConnected(true); | ||
45 | Thread.Sleep(3000); | ||
46 | win.SetStatus("Downloading region maps..."); | ||
47 | gridserverConn.DownloadMap(); | ||
48 | } else { | ||
49 | win.SetStatus("Could not connect"); | ||
50 | } | ||
51 | break; | ||
52 | |||
53 | case "restart_gridserver": | ||
54 | win.SetStatus("Restarting grid server..."); | ||
55 | if(gridserverConn.RestartServer()) { | ||
56 | win.SetStatus("Restarted server OK"); | ||
57 | Thread.Sleep(3000); | ||
58 | win.SetStatus(""); | ||
59 | } else { | ||
60 | win.SetStatus("Error restarting grid server!!!"); | ||
61 | } | ||
62 | break; | ||
63 | |||
64 | case "shutdown_gridserver": | ||
65 | win.SetStatus("Shutting down grid server..."); | ||
66 | if(gridserverConn.ShutdownServer()) { | ||
67 | win.SetStatus("Grid server shutdown"); | ||
68 | win.SetGridServerConnected(false); | ||
69 | Thread.Sleep(3000); | ||
70 | win.SetStatus(""); | ||
71 | } else { | ||
72 | win.SetStatus("Could not shutdown grid server!!!"); | ||
73 | } | ||
74 | break; | ||
75 | |||
76 | case "disconnect_gridserver": | ||
77 | gridserverConn.DisconnectServer(); | ||
78 | win.SetGridServerConnected(false); | ||
79 | break; | ||
80 | } | ||
81 | } | ||
82 | } | ||
83 | |||
84 | public static void Main (string[] args) | ||
85 | { | ||
86 | gridserverConn = new GridServerConnectionManager(); | ||
87 | Application.Init (); | ||
88 | win = new MainWindow (); | ||
89 | win.Show (); | ||
90 | OperationsRunner = new Thread(new ThreadStart(RunOperations)); | ||
91 | OperationsRunner.IsBackground=true; | ||
92 | OperationsRunner.Start(); | ||
93 | DoMainLoop(); | ||
94 | } | ||
95 | } | ||
96 | } \ No newline at end of file | ||
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/MainWindow.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/MainWindow.cs deleted file mode 100644 index 1db38f0..0000000 --- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/MainWindow.cs +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | using System; | ||
2 | using Gtk; | ||
3 | |||
4 | namespace OpenGridServices.Manager { | ||
5 | public partial class MainWindow: Gtk.Window | ||
6 | { | ||
7 | public MainWindow (): base (Gtk.WindowType.Toplevel) | ||
8 | { | ||
9 | Build (); | ||
10 | } | ||
11 | |||
12 | public void SetStatus(string statustext) | ||
13 | { | ||
14 | this.statusbar1.Pop(0); | ||
15 | this.statusbar1.Push(0,statustext); | ||
16 | } | ||
17 | |||
18 | public void DrawGrid(RegionBlock[][] regions) | ||
19 | { | ||
20 | for(int x=0; x<=regions.GetUpperBound(0); x++) { | ||
21 | for(int y=0; y<=regions.GetUpperBound(1); y++) { | ||
22 | Gdk.Image themap = new Gdk.Image(Gdk.ImageType.Fastest,Gdk.Visual.System,256,256); | ||
23 | this.drawingarea1.GdkWindow.DrawImage(new Gdk.GC(this.drawingarea1.GdkWindow),themap,0,0,x*256,y*256,256,256); | ||
24 | } | ||
25 | } | ||
26 | } | ||
27 | |||
28 | public void SetGridServerConnected(bool connected) | ||
29 | { | ||
30 | if(connected) { | ||
31 | this.ConnectToGridserver.Visible=false; | ||
32 | this.DisconnectFromGridServer.Visible=true; | ||
33 | } else { | ||
34 | this.ConnectToGridserver.Visible=true; | ||
35 | this.DisconnectFromGridServer.Visible=false; | ||
36 | } | ||
37 | } | ||
38 | |||
39 | protected void OnDeleteEvent (object sender, DeleteEventArgs a) | ||
40 | { | ||
41 | Application.Quit (); | ||
42 | MainClass.QuitReq=true; | ||
43 | a.RetVal = true; | ||
44 | } | ||
45 | |||
46 | protected virtual void QuitMenu(object sender, System.EventArgs e) | ||
47 | { | ||
48 | MainClass.QuitReq=true; | ||
49 | Application.Quit(); | ||
50 | } | ||
51 | |||
52 | protected virtual void ConnectToGridServerMenu(object sender, System.EventArgs e) | ||
53 | { | ||
54 | ConnectToGridServerDialog griddialog = new ConnectToGridServerDialog (); | ||
55 | griddialog.Show(); | ||
56 | } | ||
57 | |||
58 | protected virtual void RestartGridserverMenu(object sender, System.EventArgs e) | ||
59 | { | ||
60 | MainClass.PendingOperations.Enqueue("restart_gridserver"); | ||
61 | } | ||
62 | |||
63 | protected virtual void ShutdownGridserverMenu(object sender, System.EventArgs e) | ||
64 | { | ||
65 | MainClass.PendingOperations.Enqueue("shutdown_gridserver"); | ||
66 | } | ||
67 | |||
68 | protected virtual void DisconnectGridServerMenu(object sender, System.EventArgs e) | ||
69 | { | ||
70 | MainClass.PendingOperations.Enqueue("disconnect_gridserver"); | ||
71 | } | ||
72 | |||
73 | } | ||
74 | } | ||
75 | |||
76 | \ No newline at end of file | ||
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.mdp b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.mdp deleted file mode 100644 index cfdc085..0000000 --- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.mdp +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | <Project name="OpenGridServices.Manager" fileversion="2.0" language="C#" clr-version="Net_2_0" ctype="DotNetProject"> | ||
2 | <Configurations active="Debug"> | ||
3 | <Configuration name="Debug" ctype="DotNetProjectConfiguration"> | ||
4 | <Output directory="./bin/Debug" assembly="OpenGridServices.Manager" /> | ||
5 | <Build debugmode="True" target="Exe" /> | ||
6 | <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" /> | ||
7 | <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" /> | ||
8 | </Configuration> | ||
9 | <Configuration name="Release" ctype="DotNetProjectConfiguration"> | ||
10 | <Output directory="./bin/Release" assembly="OpenGridServices.Manager" /> | ||
11 | <Build debugmode="False" target="Exe" /> | ||
12 | <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" /> | ||
13 | <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" /> | ||
14 | </Configuration> | ||
15 | </Configurations> | ||
16 | <Contents> | ||
17 | <File name="./gtk-gui/gui.stetic" subtype="Code" buildaction="EmbedAsResource" /> | ||
18 | <File name="./gtk-gui/generated.cs" subtype="Code" buildaction="Compile" /> | ||
19 | <File name="./MainWindow.cs" subtype="Code" buildaction="Compile" /> | ||
20 | <File name="./Main.cs" subtype="Code" buildaction="Compile" /> | ||
21 | <File name="./AssemblyInfo.cs" subtype="Code" buildaction="Compile" /> | ||
22 | <File name="./ConnectToGridServerDialog.cs" subtype="Code" buildaction="Compile" /> | ||
23 | <File name="./Util.cs" subtype="Code" buildaction="Compile" /> | ||
24 | <File name="./gtk-gui/OpenGridServices.Manager.MainWindow.cs" subtype="Code" buildaction="Compile" /> | ||
25 | <File name="./BlockingQueue.cs" subtype="Code" buildaction="Compile" /> | ||
26 | <File name="./gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs" subtype="Code" buildaction="Compile" /> | ||
27 | <File name="./GridServerConnectionManager.cs" subtype="Code" buildaction="Compile" /> | ||
28 | <File name="./RegionBlock.cs" subtype="Code" buildaction="Compile" /> | ||
29 | </Contents> | ||
30 | <References> | ||
31 | <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> | ||
32 | <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> | ||
33 | <ProjectReference type="Gac" localcopy="True" refto="glib-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> | ||
34 | <ProjectReference type="Gac" localcopy="True" refto="glade-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> | ||
35 | <ProjectReference type="Gac" localcopy="True" refto="pango-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> | ||
36 | <ProjectReference type="Assembly" localcopy="True" refto="../../bin/libsecondlife.dll" /> | ||
37 | <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> | ||
38 | <ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" /> | ||
39 | <ProjectReference type="Assembly" localcopy="True" refto="../../bin/XMLRPC.dll" /> | ||
40 | <ProjectReference type="Gac" localcopy="True" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> | ||
41 | </References> | ||
42 | <GtkDesignInfo partialTypes="True" /> | ||
43 | </Project> \ No newline at end of file | ||
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.pidb b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.pidb deleted file mode 100644 index 44e7a61..0000000 --- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.pidb +++ /dev/null | |||
Binary files differ | |||
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs deleted file mode 100644 index 00f7c65..0000000 --- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | using System; | ||
2 | using System.Xml; | ||
3 | using libsecondlife; | ||
4 | using OpenSim.Framework.Utilities; | ||
5 | |||
6 | namespace OpenGridServices.Manager | ||
7 | { | ||
8 | |||
9 | |||
10 | public class RegionBlock | ||
11 | { | ||
12 | public uint regloc_x; | ||
13 | public uint regloc_y; | ||
14 | |||
15 | public string httpd_url; | ||
16 | |||
17 | public string region_name; | ||
18 | |||
19 | public ulong regionhandle { | ||
20 | get { return Util.UIntsToLong(regloc_x*256,regloc_y*256); } | ||
21 | } | ||
22 | |||
23 | public Gdk.Pixbuf MiniMap; | ||
24 | |||
25 | public RegionBlock() | ||
26 | { | ||
27 | } | ||
28 | |||
29 | public void LoadFromXmlNode(XmlNode sourcenode) | ||
30 | { | ||
31 | this.regloc_x=Convert.ToUInt32(sourcenode.Attributes.GetNamedItem("loc_x").Value); | ||
32 | this.regloc_y=Convert.ToUInt32(sourcenode.Attributes.GetNamedItem("loc_y").Value); | ||
33 | this.region_name=sourcenode.Attributes.GetNamedItem("region_name").Value; | ||
34 | this.httpd_url=sourcenode.Attributes.GetNamedItem("httpd_url").Value; | ||
35 | } | ||
36 | } | ||
37 | } | ||
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Util.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Util.cs deleted file mode 100644 index 5bf7ff9..0000000 --- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Util.cs +++ /dev/null | |||
@@ -1,133 +0,0 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using libsecondlife; | ||
5 | using libsecondlife.Packets; | ||
6 | |||
7 | namespace OpenSim.Framework.Utilities | ||
8 | { | ||
9 | public class Util | ||
10 | { | ||
11 | private static Random randomClass = new Random(); | ||
12 | private static uint nextXferID = 5000; | ||
13 | private static object XferLock = new object(); | ||
14 | |||
15 | public static ulong UIntsToLong(uint X, uint Y) | ||
16 | { | ||
17 | return Helpers.UIntsToLong(X, Y); | ||
18 | } | ||
19 | |||
20 | public static Random RandomClass | ||
21 | { | ||
22 | get | ||
23 | { | ||
24 | return randomClass; | ||
25 | } | ||
26 | } | ||
27 | |||
28 | public static uint GetNextXferID() | ||
29 | { | ||
30 | uint id = 0; | ||
31 | lock(XferLock) | ||
32 | { | ||
33 | id = nextXferID; | ||
34 | nextXferID++; | ||
35 | } | ||
36 | return id; | ||
37 | } | ||
38 | |||
39 | //public static int fast_distance2d(int x, int y) | ||
40 | //{ | ||
41 | // x = System.Math.Abs(x); | ||
42 | // y = System.Math.Abs(y); | ||
43 | |||
44 | // int min = System.Math.Min(x, y); | ||
45 | |||
46 | // return (x + y - (min >> 1) - (min >> 2) + (min >> 4)); | ||
47 | //} | ||
48 | |||
49 | public static string FieldToString(byte[] bytes) | ||
50 | { | ||
51 | return FieldToString(bytes, String.Empty); | ||
52 | } | ||
53 | |||
54 | /// <summary> | ||
55 | /// Convert a variable length field (byte array) to a string, with a | ||
56 | /// field name prepended to each line of the output | ||
57 | /// </summary> | ||
58 | /// <remarks>If the byte array has unprintable characters in it, a | ||
59 | /// hex dump will be put in the string instead</remarks> | ||
60 | /// <param name="bytes">The byte array to convert to a string</param> | ||
61 | /// <param name="fieldName">A field name to prepend to each line of output</param> | ||
62 | /// <returns>An ASCII string or a string containing a hex dump, minus | ||
63 | /// the null terminator</returns> | ||
64 | public static string FieldToString(byte[] bytes, string fieldName) | ||
65 | { | ||
66 | // Check for a common case | ||
67 | if (bytes.Length == 0) return String.Empty; | ||
68 | |||
69 | StringBuilder output = new StringBuilder(); | ||
70 | bool printable = true; | ||
71 | |||
72 | for (int i = 0; i < bytes.Length; ++i) | ||
73 | { | ||
74 | // Check if there are any unprintable characters in the array | ||
75 | if ((bytes[i] < 0x20 || bytes[i] > 0x7E) && bytes[i] != 0x09 | ||
76 | && bytes[i] != 0x0D && bytes[i] != 0x0A && bytes[i] != 0x00) | ||
77 | { | ||
78 | printable = false; | ||
79 | break; | ||
80 | } | ||
81 | } | ||
82 | |||
83 | if (printable) | ||
84 | { | ||
85 | if (fieldName.Length > 0) | ||
86 | { | ||
87 | output.Append(fieldName); | ||
88 | output.Append(": "); | ||
89 | } | ||
90 | |||
91 | if (bytes[bytes.Length - 1] == 0x00) | ||
92 | output.Append(UTF8Encoding.UTF8.GetString(bytes, 0, bytes.Length - 1)); | ||
93 | else | ||
94 | output.Append(UTF8Encoding.UTF8.GetString(bytes)); | ||
95 | } | ||
96 | else | ||
97 | { | ||
98 | for (int i = 0; i < bytes.Length; i += 16) | ||
99 | { | ||
100 | if (i != 0) | ||
101 | output.Append(Environment.NewLine); | ||
102 | if (fieldName.Length > 0) | ||
103 | { | ||
104 | output.Append(fieldName); | ||
105 | output.Append(": "); | ||
106 | } | ||
107 | |||
108 | for (int j = 0; j < 16; j++) | ||
109 | { | ||
110 | if ((i + j) < bytes.Length) | ||
111 | output.Append(String.Format("{0:X2} ", bytes[i + j])); | ||
112 | else | ||
113 | output.Append(" "); | ||
114 | } | ||
115 | |||
116 | for (int j = 0; j < 16 && (i + j) < bytes.Length; j++) | ||
117 | { | ||
118 | if (bytes[i + j] >= 0x20 && bytes[i + j] < 0x7E) | ||
119 | output.Append((char)bytes[i + j]); | ||
120 | else | ||
121 | output.Append("."); | ||
122 | } | ||
123 | } | ||
124 | } | ||
125 | |||
126 | return output.ToString(); | ||
127 | } | ||
128 | public Util() | ||
129 | { | ||
130 | |||
131 | } | ||
132 | } | ||
133 | } | ||
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs deleted file mode 100644 index da6739e..0000000 --- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs +++ /dev/null | |||
@@ -1,226 +0,0 @@ | |||
1 | // ------------------------------------------------------------------------------ | ||
2 | // <autogenerated> | ||
3 | // This code was generated by a tool. | ||
4 | // Mono Runtime Version: 2.0.50727.42 | ||
5 | // | ||
6 | // Changes to this file may cause incorrect behavior and will be lost if | ||
7 | // the code is regenerated. | ||
8 | // </autogenerated> | ||
9 | // ------------------------------------------------------------------------------ | ||
10 | |||
11 | namespace OpenGridServices.Manager { | ||
12 | |||
13 | |||
14 | public partial class ConnectToGridServerDialog { | ||
15 | |||
16 | private Gtk.VBox vbox2; | ||
17 | |||
18 | private Gtk.VBox vbox3; | ||
19 | |||
20 | private Gtk.HBox hbox1; | ||
21 | |||
22 | private Gtk.Label label1; | ||
23 | |||
24 | private Gtk.Entry entry1; | ||
25 | |||
26 | private Gtk.HBox hbox2; | ||
27 | |||
28 | private Gtk.Label label2; | ||
29 | |||
30 | private Gtk.Entry entry2; | ||
31 | |||
32 | private Gtk.HBox hbox3; | ||
33 | |||
34 | private Gtk.Label label3; | ||
35 | |||
36 | private Gtk.Entry entry3; | ||
37 | |||
38 | private Gtk.Button button2; | ||
39 | |||
40 | private Gtk.Button button8; | ||
41 | |||
42 | protected virtual void Build() { | ||
43 | Stetic.Gui.Initialize(); | ||
44 | // Widget OpenGridServices.Manager.ConnectToGridServerDialog | ||
45 | this.Events = ((Gdk.EventMask)(256)); | ||
46 | this.Name = "OpenGridServices.Manager.ConnectToGridServerDialog"; | ||
47 | this.Title = Mono.Unix.Catalog.GetString("Connect to Grid server"); | ||
48 | this.WindowPosition = ((Gtk.WindowPosition)(4)); | ||
49 | this.HasSeparator = false; | ||
50 | // Internal child OpenGridServices.Manager.ConnectToGridServerDialog.VBox | ||
51 | Gtk.VBox w1 = this.VBox; | ||
52 | w1.Events = ((Gdk.EventMask)(256)); | ||
53 | w1.Name = "dialog_VBox"; | ||
54 | w1.BorderWidth = ((uint)(2)); | ||
55 | // Container child dialog_VBox.Gtk.Box+BoxChild | ||
56 | this.vbox2 = new Gtk.VBox(); | ||
57 | this.vbox2.Name = "vbox2"; | ||
58 | // Container child vbox2.Gtk.Box+BoxChild | ||
59 | this.vbox3 = new Gtk.VBox(); | ||
60 | this.vbox3.Name = "vbox3"; | ||
61 | // Container child vbox3.Gtk.Box+BoxChild | ||
62 | this.hbox1 = new Gtk.HBox(); | ||
63 | this.hbox1.Name = "hbox1"; | ||
64 | // Container child hbox1.Gtk.Box+BoxChild | ||
65 | this.label1 = new Gtk.Label(); | ||
66 | this.label1.Name = "label1"; | ||
67 | this.label1.Xalign = 1F; | ||
68 | this.label1.LabelProp = Mono.Unix.Catalog.GetString("Grid server URL: "); | ||
69 | this.label1.Justify = ((Gtk.Justification)(1)); | ||
70 | this.hbox1.Add(this.label1); | ||
71 | Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.label1])); | ||
72 | w2.Position = 0; | ||
73 | // Container child hbox1.Gtk.Box+BoxChild | ||
74 | this.entry1 = new Gtk.Entry(); | ||
75 | this.entry1.CanFocus = true; | ||
76 | this.entry1.Name = "entry1"; | ||
77 | this.entry1.Text = Mono.Unix.Catalog.GetString("http://gridserver:8001"); | ||
78 | this.entry1.IsEditable = true; | ||
79 | this.entry1.MaxLength = 255; | ||
80 | this.entry1.InvisibleChar = '•'; | ||
81 | this.hbox1.Add(this.entry1); | ||
82 | Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.hbox1[this.entry1])); | ||
83 | w3.Position = 1; | ||
84 | this.vbox3.Add(this.hbox1); | ||
85 | Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox3[this.hbox1])); | ||
86 | w4.Position = 0; | ||
87 | w4.Expand = false; | ||
88 | w4.Fill = false; | ||
89 | // Container child vbox3.Gtk.Box+BoxChild | ||
90 | this.hbox2 = new Gtk.HBox(); | ||
91 | this.hbox2.Name = "hbox2"; | ||
92 | // Container child hbox2.Gtk.Box+BoxChild | ||
93 | this.label2 = new Gtk.Label(); | ||
94 | this.label2.Name = "label2"; | ||
95 | this.label2.Xalign = 1F; | ||
96 | this.label2.LabelProp = Mono.Unix.Catalog.GetString("Username:"); | ||
97 | this.label2.Justify = ((Gtk.Justification)(1)); | ||
98 | this.hbox2.Add(this.label2); | ||
99 | Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.hbox2[this.label2])); | ||
100 | w5.Position = 0; | ||
101 | // Container child hbox2.Gtk.Box+BoxChild | ||
102 | this.entry2 = new Gtk.Entry(); | ||
103 | this.entry2.CanFocus = true; | ||
104 | this.entry2.Name = "entry2"; | ||
105 | this.entry2.IsEditable = true; | ||
106 | this.entry2.InvisibleChar = '•'; | ||
107 | this.hbox2.Add(this.entry2); | ||
108 | Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox2[this.entry2])); | ||
109 | w6.Position = 1; | ||
110 | this.vbox3.Add(this.hbox2); | ||
111 | Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox3[this.hbox2])); | ||
112 | w7.Position = 1; | ||
113 | w7.Expand = false; | ||
114 | w7.Fill = false; | ||
115 | // Container child vbox3.Gtk.Box+BoxChild | ||
116 | this.hbox3 = new Gtk.HBox(); | ||
117 | this.hbox3.Name = "hbox3"; | ||
118 | // Container child hbox3.Gtk.Box+BoxChild | ||
119 | this.label3 = new Gtk.Label(); | ||
120 | this.label3.Name = "label3"; | ||
121 | this.label3.Xalign = 1F; | ||
122 | this.label3.LabelProp = Mono.Unix.Catalog.GetString("Password:"); | ||
123 | this.label3.Justify = ((Gtk.Justification)(1)); | ||
124 | this.hbox3.Add(this.label3); | ||
125 | Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox3[this.label3])); | ||
126 | w8.Position = 0; | ||
127 | // Container child hbox3.Gtk.Box+BoxChild | ||
128 | this.entry3 = new Gtk.Entry(); | ||
129 | this.entry3.CanFocus = true; | ||
130 | this.entry3.Name = "entry3"; | ||
131 | this.entry3.IsEditable = true; | ||
132 | this.entry3.InvisibleChar = '•'; | ||
133 | this.hbox3.Add(this.entry3); | ||
134 | Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.hbox3[this.entry3])); | ||
135 | w9.Position = 1; | ||
136 | this.vbox3.Add(this.hbox3); | ||
137 | Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.vbox3[this.hbox3])); | ||
138 | w10.Position = 2; | ||
139 | w10.Expand = false; | ||
140 | w10.Fill = false; | ||
141 | this.vbox2.Add(this.vbox3); | ||
142 | Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.vbox2[this.vbox3])); | ||
143 | w11.Position = 2; | ||
144 | w11.Expand = false; | ||
145 | w11.Fill = false; | ||
146 | w1.Add(this.vbox2); | ||
147 | Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(w1[this.vbox2])); | ||
148 | w12.Position = 0; | ||
149 | // Internal child OpenGridServices.Manager.ConnectToGridServerDialog.ActionArea | ||
150 | Gtk.HButtonBox w13 = this.ActionArea; | ||
151 | w13.Events = ((Gdk.EventMask)(256)); | ||
152 | w13.Name = "OpenGridServices.Manager.ConnectToGridServerDialog_ActionArea"; | ||
153 | w13.Spacing = 6; | ||
154 | w13.BorderWidth = ((uint)(5)); | ||
155 | w13.LayoutStyle = ((Gtk.ButtonBoxStyle)(4)); | ||
156 | // Container child OpenGridServices.Manager.ConnectToGridServerDialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild | ||
157 | this.button2 = new Gtk.Button(); | ||
158 | this.button2.CanDefault = true; | ||
159 | this.button2.CanFocus = true; | ||
160 | this.button2.Name = "button2"; | ||
161 | this.button2.UseUnderline = true; | ||
162 | // Container child button2.Gtk.Container+ContainerChild | ||
163 | Gtk.Alignment w14 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F); | ||
164 | w14.Name = "GtkAlignment"; | ||
165 | // Container child GtkAlignment.Gtk.Container+ContainerChild | ||
166 | Gtk.HBox w15 = new Gtk.HBox(); | ||
167 | w15.Name = "GtkHBox"; | ||
168 | w15.Spacing = 2; | ||
169 | // Container child GtkHBox.Gtk.Container+ContainerChild | ||
170 | Gtk.Image w16 = new Gtk.Image(); | ||
171 | w16.Name = "image1"; | ||
172 | w16.Pixbuf = Gtk.IconTheme.Default.LoadIcon("gtk-apply", 16, 0); | ||
173 | w15.Add(w16); | ||
174 | // Container child GtkHBox.Gtk.Container+ContainerChild | ||
175 | Gtk.Label w18 = new Gtk.Label(); | ||
176 | w18.Name = "GtkLabel"; | ||
177 | w18.LabelProp = Mono.Unix.Catalog.GetString("Connect"); | ||
178 | w18.UseUnderline = true; | ||
179 | w15.Add(w18); | ||
180 | w14.Add(w15); | ||
181 | this.button2.Add(w14); | ||
182 | this.AddActionWidget(this.button2, -5); | ||
183 | Gtk.ButtonBox.ButtonBoxChild w22 = ((Gtk.ButtonBox.ButtonBoxChild)(w13[this.button2])); | ||
184 | w22.Expand = false; | ||
185 | w22.Fill = false; | ||
186 | // Container child OpenGridServices.Manager.ConnectToGridServerDialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild | ||
187 | this.button8 = new Gtk.Button(); | ||
188 | this.button8.CanDefault = true; | ||
189 | this.button8.CanFocus = true; | ||
190 | this.button8.Name = "button8"; | ||
191 | this.button8.UseUnderline = true; | ||
192 | // Container child button8.Gtk.Container+ContainerChild | ||
193 | Gtk.Alignment w23 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F); | ||
194 | w23.Name = "GtkAlignment1"; | ||
195 | // Container child GtkAlignment1.Gtk.Container+ContainerChild | ||
196 | Gtk.HBox w24 = new Gtk.HBox(); | ||
197 | w24.Name = "GtkHBox1"; | ||
198 | w24.Spacing = 2; | ||
199 | // Container child GtkHBox1.Gtk.Container+ContainerChild | ||
200 | Gtk.Image w25 = new Gtk.Image(); | ||
201 | w25.Name = "image2"; | ||
202 | w25.Pixbuf = Gtk.IconTheme.Default.LoadIcon("gtk-cancel", 16, 0); | ||
203 | w24.Add(w25); | ||
204 | // Container child GtkHBox1.Gtk.Container+ContainerChild | ||
205 | Gtk.Label w27 = new Gtk.Label(); | ||
206 | w27.Name = "GtkLabel1"; | ||
207 | w27.LabelProp = Mono.Unix.Catalog.GetString("Cancel"); | ||
208 | w27.UseUnderline = true; | ||
209 | w24.Add(w27); | ||
210 | w23.Add(w24); | ||
211 | this.button8.Add(w23); | ||
212 | this.AddActionWidget(this.button8, -6); | ||
213 | Gtk.ButtonBox.ButtonBoxChild w31 = ((Gtk.ButtonBox.ButtonBoxChild)(w13[this.button8])); | ||
214 | w31.Position = 1; | ||
215 | w31.Expand = false; | ||
216 | w31.Fill = false; | ||
217 | if ((this.Child != null)) { | ||
218 | this.Child.ShowAll(); | ||
219 | } | ||
220 | this.DefaultWidth = 476; | ||
221 | this.DefaultHeight = 137; | ||
222 | this.Show(); | ||
223 | this.Response += new Gtk.ResponseHandler(this.OnResponse); | ||
224 | } | ||
225 | } | ||
226 | } | ||
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs deleted file mode 100644 index 8798dac..0000000 --- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs +++ /dev/null | |||
@@ -1,256 +0,0 @@ | |||
1 | // ------------------------------------------------------------------------------ | ||
2 | // <autogenerated> | ||
3 | // This code was generated by a tool. | ||
4 | // Mono Runtime Version: 2.0.50727.42 | ||
5 | // | ||
6 | // Changes to this file may cause incorrect behavior and will be lost if | ||
7 | // the code is regenerated. | ||
8 | // </autogenerated> | ||
9 | // ------------------------------------------------------------------------------ | ||
10 | |||
11 | namespace OpenGridServices.Manager { | ||
12 | |||
13 | |||
14 | public partial class MainWindow { | ||
15 | |||
16 | private Gtk.Action Grid; | ||
17 | |||
18 | private Gtk.Action User; | ||
19 | |||
20 | private Gtk.Action Asset; | ||
21 | |||
22 | private Gtk.Action Region; | ||
23 | |||
24 | private Gtk.Action Services; | ||
25 | |||
26 | private Gtk.Action ConnectToGridserver; | ||
27 | |||
28 | private Gtk.Action RestartWholeGrid; | ||
29 | |||
30 | private Gtk.Action ShutdownWholeGrid; | ||
31 | |||
32 | private Gtk.Action ExitGridManager; | ||
33 | |||
34 | private Gtk.Action ConnectToUserserver; | ||
35 | |||
36 | private Gtk.Action AccountManagment; | ||
37 | |||
38 | private Gtk.Action GlobalNotice; | ||
39 | |||
40 | private Gtk.Action DisableAllLogins; | ||
41 | |||
42 | private Gtk.Action DisableNonGodUsersOnly; | ||
43 | |||
44 | private Gtk.Action ShutdownUserServer; | ||
45 | |||
46 | private Gtk.Action ShutdownGridserverOnly; | ||
47 | |||
48 | private Gtk.Action RestartGridserverOnly; | ||
49 | |||
50 | private Gtk.Action DefaultLocalGridUserserver; | ||
51 | |||
52 | private Gtk.Action CustomUserserver; | ||
53 | |||
54 | private Gtk.Action RemoteGridDefaultUserserver; | ||
55 | |||
56 | private Gtk.Action DisconnectFromGridServer; | ||
57 | |||
58 | private Gtk.Action UploadAsset; | ||
59 | |||
60 | private Gtk.Action AssetManagement; | ||
61 | |||
62 | private Gtk.Action ConnectToAssetServer; | ||
63 | |||
64 | private Gtk.Action ConnectToDefaultAssetServerForGrid; | ||
65 | |||
66 | private Gtk.Action DefaultForLocalGrid; | ||
67 | |||
68 | private Gtk.Action DefaultForRemoteGrid; | ||
69 | |||
70 | private Gtk.Action CustomAssetServer; | ||
71 | |||
72 | private Gtk.VBox vbox1; | ||
73 | |||
74 | private Gtk.MenuBar menubar2; | ||
75 | |||
76 | private Gtk.HBox hbox1; | ||
77 | |||
78 | private Gtk.ScrolledWindow scrolledwindow1; | ||
79 | |||
80 | private Gtk.DrawingArea drawingarea1; | ||
81 | |||
82 | private Gtk.TreeView treeview1; | ||
83 | |||
84 | private Gtk.Statusbar statusbar1; | ||
85 | |||
86 | protected virtual void Build() { | ||
87 | Stetic.Gui.Initialize(); | ||
88 | // Widget OpenGridServices.Manager.MainWindow | ||
89 | Gtk.UIManager w1 = new Gtk.UIManager(); | ||
90 | Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default"); | ||
91 | this.Grid = new Gtk.Action("Grid", Mono.Unix.Catalog.GetString("Grid"), null, null); | ||
92 | this.Grid.HideIfEmpty = false; | ||
93 | this.Grid.ShortLabel = Mono.Unix.Catalog.GetString("Grid"); | ||
94 | w2.Add(this.Grid, "<Alt><Mod2>g"); | ||
95 | this.User = new Gtk.Action("User", Mono.Unix.Catalog.GetString("User"), null, null); | ||
96 | this.User.HideIfEmpty = false; | ||
97 | this.User.ShortLabel = Mono.Unix.Catalog.GetString("User"); | ||
98 | w2.Add(this.User, null); | ||
99 | this.Asset = new Gtk.Action("Asset", Mono.Unix.Catalog.GetString("Asset"), null, null); | ||
100 | this.Asset.HideIfEmpty = false; | ||
101 | this.Asset.ShortLabel = Mono.Unix.Catalog.GetString("Asset"); | ||
102 | w2.Add(this.Asset, null); | ||
103 | this.Region = new Gtk.Action("Region", Mono.Unix.Catalog.GetString("Region"), null, null); | ||
104 | this.Region.ShortLabel = Mono.Unix.Catalog.GetString("Region"); | ||
105 | w2.Add(this.Region, null); | ||
106 | this.Services = new Gtk.Action("Services", Mono.Unix.Catalog.GetString("Services"), null, null); | ||
107 | this.Services.ShortLabel = Mono.Unix.Catalog.GetString("Services"); | ||
108 | w2.Add(this.Services, null); | ||
109 | this.ConnectToGridserver = new Gtk.Action("ConnectToGridserver", Mono.Unix.Catalog.GetString("Connect to gridserver..."), null, "gtk-connect"); | ||
110 | this.ConnectToGridserver.HideIfEmpty = false; | ||
111 | this.ConnectToGridserver.ShortLabel = Mono.Unix.Catalog.GetString("Connect to gridserver"); | ||
112 | w2.Add(this.ConnectToGridserver, null); | ||
113 | this.RestartWholeGrid = new Gtk.Action("RestartWholeGrid", Mono.Unix.Catalog.GetString("Restart whole grid"), null, "gtk-refresh"); | ||
114 | this.RestartWholeGrid.ShortLabel = Mono.Unix.Catalog.GetString("Restart whole grid"); | ||
115 | w2.Add(this.RestartWholeGrid, null); | ||
116 | this.ShutdownWholeGrid = new Gtk.Action("ShutdownWholeGrid", Mono.Unix.Catalog.GetString("Shutdown whole grid"), null, "gtk-stop"); | ||
117 | this.ShutdownWholeGrid.ShortLabel = Mono.Unix.Catalog.GetString("Shutdown whole grid"); | ||
118 | w2.Add(this.ShutdownWholeGrid, null); | ||
119 | this.ExitGridManager = new Gtk.Action("ExitGridManager", Mono.Unix.Catalog.GetString("Exit grid manager"), null, "gtk-close"); | ||
120 | this.ExitGridManager.ShortLabel = Mono.Unix.Catalog.GetString("Exit grid manager"); | ||
121 | w2.Add(this.ExitGridManager, null); | ||
122 | this.ConnectToUserserver = new Gtk.Action("ConnectToUserserver", Mono.Unix.Catalog.GetString("Connect to userserver"), null, "gtk-connect"); | ||
123 | this.ConnectToUserserver.ShortLabel = Mono.Unix.Catalog.GetString("Connect to userserver"); | ||
124 | w2.Add(this.ConnectToUserserver, null); | ||
125 | this.AccountManagment = new Gtk.Action("AccountManagment", Mono.Unix.Catalog.GetString("Account managment"), null, "gtk-properties"); | ||
126 | this.AccountManagment.ShortLabel = Mono.Unix.Catalog.GetString("Account managment"); | ||
127 | w2.Add(this.AccountManagment, null); | ||
128 | this.GlobalNotice = new Gtk.Action("GlobalNotice", Mono.Unix.Catalog.GetString("Global notice"), null, "gtk-network"); | ||
129 | this.GlobalNotice.ShortLabel = Mono.Unix.Catalog.GetString("Global notice"); | ||
130 | w2.Add(this.GlobalNotice, null); | ||
131 | this.DisableAllLogins = new Gtk.Action("DisableAllLogins", Mono.Unix.Catalog.GetString("Disable all logins"), null, "gtk-no"); | ||
132 | this.DisableAllLogins.ShortLabel = Mono.Unix.Catalog.GetString("Disable all logins"); | ||
133 | w2.Add(this.DisableAllLogins, null); | ||
134 | this.DisableNonGodUsersOnly = new Gtk.Action("DisableNonGodUsersOnly", Mono.Unix.Catalog.GetString("Disable non-god users only"), null, "gtk-no"); | ||
135 | this.DisableNonGodUsersOnly.ShortLabel = Mono.Unix.Catalog.GetString("Disable non-god users only"); | ||
136 | w2.Add(this.DisableNonGodUsersOnly, null); | ||
137 | this.ShutdownUserServer = new Gtk.Action("ShutdownUserServer", Mono.Unix.Catalog.GetString("Shutdown user server"), null, "gtk-stop"); | ||
138 | this.ShutdownUserServer.ShortLabel = Mono.Unix.Catalog.GetString("Shutdown user server"); | ||
139 | w2.Add(this.ShutdownUserServer, null); | ||
140 | this.ShutdownGridserverOnly = new Gtk.Action("ShutdownGridserverOnly", Mono.Unix.Catalog.GetString("Shutdown gridserver only"), null, "gtk-stop"); | ||
141 | this.ShutdownGridserverOnly.ShortLabel = Mono.Unix.Catalog.GetString("Shutdown gridserver only"); | ||
142 | w2.Add(this.ShutdownGridserverOnly, null); | ||
143 | this.RestartGridserverOnly = new Gtk.Action("RestartGridserverOnly", Mono.Unix.Catalog.GetString("Restart gridserver only"), null, "gtk-refresh"); | ||
144 | this.RestartGridserverOnly.ShortLabel = Mono.Unix.Catalog.GetString("Restart gridserver only"); | ||
145 | w2.Add(this.RestartGridserverOnly, null); | ||
146 | this.DefaultLocalGridUserserver = new Gtk.Action("DefaultLocalGridUserserver", Mono.Unix.Catalog.GetString("Default local grid userserver"), null, null); | ||
147 | this.DefaultLocalGridUserserver.ShortLabel = Mono.Unix.Catalog.GetString("Default local grid userserver"); | ||
148 | w2.Add(this.DefaultLocalGridUserserver, null); | ||
149 | this.CustomUserserver = new Gtk.Action("CustomUserserver", Mono.Unix.Catalog.GetString("Custom userserver..."), null, null); | ||
150 | this.CustomUserserver.ShortLabel = Mono.Unix.Catalog.GetString("Custom userserver"); | ||
151 | w2.Add(this.CustomUserserver, null); | ||
152 | this.RemoteGridDefaultUserserver = new Gtk.Action("RemoteGridDefaultUserserver", Mono.Unix.Catalog.GetString("Remote grid default userserver..."), null, null); | ||
153 | this.RemoteGridDefaultUserserver.ShortLabel = Mono.Unix.Catalog.GetString("Remote grid default userserver"); | ||
154 | w2.Add(this.RemoteGridDefaultUserserver, null); | ||
155 | this.DisconnectFromGridServer = new Gtk.Action("DisconnectFromGridServer", Mono.Unix.Catalog.GetString("Disconnect from grid server"), null, "gtk-disconnect"); | ||
156 | this.DisconnectFromGridServer.ShortLabel = Mono.Unix.Catalog.GetString("Disconnect from grid server"); | ||
157 | this.DisconnectFromGridServer.Visible = false; | ||
158 | w2.Add(this.DisconnectFromGridServer, null); | ||
159 | this.UploadAsset = new Gtk.Action("UploadAsset", Mono.Unix.Catalog.GetString("Upload asset"), null, null); | ||
160 | this.UploadAsset.ShortLabel = Mono.Unix.Catalog.GetString("Upload asset"); | ||
161 | w2.Add(this.UploadAsset, null); | ||
162 | this.AssetManagement = new Gtk.Action("AssetManagement", Mono.Unix.Catalog.GetString("Asset management"), null, null); | ||
163 | this.AssetManagement.ShortLabel = Mono.Unix.Catalog.GetString("Asset management"); | ||
164 | w2.Add(this.AssetManagement, null); | ||
165 | this.ConnectToAssetServer = new Gtk.Action("ConnectToAssetServer", Mono.Unix.Catalog.GetString("Connect to asset server"), null, null); | ||
166 | this.ConnectToAssetServer.ShortLabel = Mono.Unix.Catalog.GetString("Connect to asset server"); | ||
167 | w2.Add(this.ConnectToAssetServer, null); | ||
168 | this.ConnectToDefaultAssetServerForGrid = new Gtk.Action("ConnectToDefaultAssetServerForGrid", Mono.Unix.Catalog.GetString("Connect to default asset server for grid"), null, null); | ||
169 | this.ConnectToDefaultAssetServerForGrid.ShortLabel = Mono.Unix.Catalog.GetString("Connect to default asset server for grid"); | ||
170 | w2.Add(this.ConnectToDefaultAssetServerForGrid, null); | ||
171 | this.DefaultForLocalGrid = new Gtk.Action("DefaultForLocalGrid", Mono.Unix.Catalog.GetString("Default for local grid"), null, null); | ||
172 | this.DefaultForLocalGrid.ShortLabel = Mono.Unix.Catalog.GetString("Default for local grid"); | ||
173 | w2.Add(this.DefaultForLocalGrid, null); | ||
174 | this.DefaultForRemoteGrid = new Gtk.Action("DefaultForRemoteGrid", Mono.Unix.Catalog.GetString("Default for remote grid..."), null, null); | ||
175 | this.DefaultForRemoteGrid.ShortLabel = Mono.Unix.Catalog.GetString("Default for remote grid..."); | ||
176 | w2.Add(this.DefaultForRemoteGrid, null); | ||
177 | this.CustomAssetServer = new Gtk.Action("CustomAssetServer", Mono.Unix.Catalog.GetString("Custom asset server..."), null, null); | ||
178 | this.CustomAssetServer.ShortLabel = Mono.Unix.Catalog.GetString("Custom asset server..."); | ||
179 | w2.Add(this.CustomAssetServer, null); | ||
180 | w1.InsertActionGroup(w2, 0); | ||
181 | this.AddAccelGroup(w1.AccelGroup); | ||
182 | this.WidthRequest = 800; | ||
183 | this.HeightRequest = 600; | ||
184 | this.Name = "OpenGridServices.Manager.MainWindow"; | ||
185 | this.Title = Mono.Unix.Catalog.GetString("Open Grid Services Manager"); | ||
186 | this.Icon = Gtk.IconTheme.Default.LoadIcon("gtk-network", 48, 0); | ||
187 | // Container child OpenGridServices.Manager.MainWindow.Gtk.Container+ContainerChild | ||
188 | this.vbox1 = new Gtk.VBox(); | ||
189 | this.vbox1.Name = "vbox1"; | ||
190 | // Container child vbox1.Gtk.Box+BoxChild | ||
191 | 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>"); | ||
192 | this.menubar2 = ((Gtk.MenuBar)(w1.GetWidget("/menubar2"))); | ||
193 | this.menubar2.HeightRequest = 25; | ||
194 | this.menubar2.Name = "menubar2"; | ||
195 | this.vbox1.Add(this.menubar2); | ||
196 | Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar2])); | ||
197 | w3.Position = 0; | ||
198 | w3.Expand = false; | ||
199 | w3.Fill = false; | ||
200 | // Container child vbox1.Gtk.Box+BoxChild | ||
201 | this.hbox1 = new Gtk.HBox(); | ||
202 | this.hbox1.Name = "hbox1"; | ||
203 | // Container child hbox1.Gtk.Box+BoxChild | ||
204 | this.scrolledwindow1 = new Gtk.ScrolledWindow(); | ||
205 | this.scrolledwindow1.CanFocus = true; | ||
206 | this.scrolledwindow1.Name = "scrolledwindow1"; | ||
207 | this.scrolledwindow1.VscrollbarPolicy = ((Gtk.PolicyType)(1)); | ||
208 | this.scrolledwindow1.HscrollbarPolicy = ((Gtk.PolicyType)(1)); | ||
209 | // Container child scrolledwindow1.Gtk.Container+ContainerChild | ||
210 | Gtk.Viewport w4 = new Gtk.Viewport(); | ||
211 | w4.Name = "GtkViewport"; | ||
212 | w4.ShadowType = ((Gtk.ShadowType)(0)); | ||
213 | // Container child GtkViewport.Gtk.Container+ContainerChild | ||
214 | this.drawingarea1 = new Gtk.DrawingArea(); | ||
215 | this.drawingarea1.Name = "drawingarea1"; | ||
216 | w4.Add(this.drawingarea1); | ||
217 | this.scrolledwindow1.Add(w4); | ||
218 | this.hbox1.Add(this.scrolledwindow1); | ||
219 | Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.hbox1[this.scrolledwindow1])); | ||
220 | w7.Position = 1; | ||
221 | // Container child hbox1.Gtk.Box+BoxChild | ||
222 | this.treeview1 = new Gtk.TreeView(); | ||
223 | this.treeview1.CanFocus = true; | ||
224 | this.treeview1.Name = "treeview1"; | ||
225 | this.hbox1.Add(this.treeview1); | ||
226 | Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox1[this.treeview1])); | ||
227 | w8.Position = 2; | ||
228 | this.vbox1.Add(this.hbox1); | ||
229 | Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox1])); | ||
230 | w9.Position = 1; | ||
231 | // Container child vbox1.Gtk.Box+BoxChild | ||
232 | this.statusbar1 = new Gtk.Statusbar(); | ||
233 | this.statusbar1.Name = "statusbar1"; | ||
234 | this.statusbar1.Spacing = 5; | ||
235 | this.vbox1.Add(this.statusbar1); | ||
236 | Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.vbox1[this.statusbar1])); | ||
237 | w10.PackType = ((Gtk.PackType)(1)); | ||
238 | w10.Position = 2; | ||
239 | w10.Expand = false; | ||
240 | w10.Fill = false; | ||
241 | this.Add(this.vbox1); | ||
242 | if ((this.Child != null)) { | ||
243 | this.Child.ShowAll(); | ||
244 | } | ||
245 | this.DefaultWidth = 800; | ||
246 | this.DefaultHeight = 800; | ||
247 | this.Show(); | ||
248 | this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent); | ||
249 | this.ConnectToGridserver.Activated += new System.EventHandler(this.ConnectToGridServerMenu); | ||
250 | this.ExitGridManager.Activated += new System.EventHandler(this.QuitMenu); | ||
251 | this.ShutdownGridserverOnly.Activated += new System.EventHandler(this.ShutdownGridserverMenu); | ||
252 | this.RestartGridserverOnly.Activated += new System.EventHandler(this.RestartGridserverMenu); | ||
253 | this.DisconnectFromGridServer.Activated += new System.EventHandler(this.DisconnectGridServerMenu); | ||
254 | } | ||
255 | } | ||
256 | } | ||
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/generated.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/generated.cs deleted file mode 100644 index dd4abdd..0000000 --- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/generated.cs +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | // ------------------------------------------------------------------------------ | ||
2 | // <autogenerated> | ||
3 | // This code was generated by a tool. | ||
4 | // Mono Runtime Version: 2.0.50727.42 | ||
5 | // | ||
6 | // Changes to this file may cause incorrect behavior and will be lost if | ||
7 | // the code is regenerated. | ||
8 | // </autogenerated> | ||
9 | // ------------------------------------------------------------------------------ | ||
10 | |||
11 | namespace Stetic { | ||
12 | |||
13 | |||
14 | internal class Gui { | ||
15 | |||
16 | private static bool initialized; | ||
17 | |||
18 | internal static void Initialize() { | ||
19 | if ((Stetic.Gui.initialized == false)) { | ||
20 | Stetic.Gui.initialized = true; | ||
21 | } | ||
22 | } | ||
23 | } | ||
24 | |||
25 | internal class ActionGroups { | ||
26 | |||
27 | public static Gtk.ActionGroup GetActionGroup(System.Type type) { | ||
28 | return Stetic.ActionGroups.GetActionGroup(type.FullName); | ||
29 | } | ||
30 | |||
31 | public static Gtk.ActionGroup GetActionGroup(string name) { | ||
32 | return null; | ||
33 | } | ||
34 | } | ||
35 | } | ||
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/gui.stetic b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/gui.stetic deleted file mode 100644 index c883f08..0000000 --- a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/gui.stetic +++ /dev/null | |||
@@ -1,502 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <stetic-interface> | ||
3 | <widget class="Gtk.Window" id="OpenGridServices.Manager.MainWindow" design-size="800 800"> | ||
4 | <action-group name="Default"> | ||
5 | <action id="Grid"> | ||
6 | <property name="Type">Action</property> | ||
7 | <property name="Accelerator"><Alt><Mod2>g</property> | ||
8 | <property name="HideIfEmpty">False</property> | ||
9 | <property name="Label" translatable="yes">Grid</property> | ||
10 | <property name="ShortLabel" translatable="yes">Grid</property> | ||
11 | </action> | ||
12 | <action id="User"> | ||
13 | <property name="Type">Action</property> | ||
14 | <property name="HideIfEmpty">False</property> | ||
15 | <property name="Label" translatable="yes">User</property> | ||
16 | <property name="ShortLabel" translatable="yes">User</property> | ||
17 | </action> | ||
18 | <action id="Asset"> | ||
19 | <property name="Type">Action</property> | ||
20 | <property name="HideIfEmpty">False</property> | ||
21 | <property name="Label" translatable="yes">Asset</property> | ||
22 | <property name="ShortLabel" translatable="yes">Asset</property> | ||
23 | </action> | ||
24 | <action id="Region"> | ||
25 | <property name="Type">Action</property> | ||
26 | <property name="Label" translatable="yes">Region</property> | ||
27 | <property name="ShortLabel" translatable="yes">Region</property> | ||
28 | </action> | ||
29 | <action id="Services"> | ||
30 | <property name="Type">Action</property> | ||
31 | <property name="Label" translatable="yes">Services</property> | ||
32 | <property name="ShortLabel" translatable="yes">Services</property> | ||
33 | </action> | ||
34 | <action id="ConnectToGridserver"> | ||
35 | <property name="Type">Action</property> | ||
36 | <property name="HideIfEmpty">False</property> | ||
37 | <property name="Label" translatable="yes">Connect to gridserver...</property> | ||
38 | <property name="ShortLabel" translatable="yes">Connect to gridserver</property> | ||
39 | <property name="StockId">gtk-connect</property> | ||
40 | <signal name="Activated" handler="ConnectToGridServerMenu" /> | ||
41 | </action> | ||
42 | <action id="RestartWholeGrid"> | ||
43 | <property name="Type">Action</property> | ||
44 | <property name="Label" translatable="yes">Restart whole grid</property> | ||
45 | <property name="ShortLabel" translatable="yes">Restart whole grid</property> | ||
46 | <property name="StockId">gtk-refresh</property> | ||
47 | </action> | ||
48 | <action id="ShutdownWholeGrid"> | ||
49 | <property name="Type">Action</property> | ||
50 | <property name="Label" translatable="yes">Shutdown whole grid</property> | ||
51 | <property name="ShortLabel" translatable="yes">Shutdown whole grid</property> | ||
52 | <property name="StockId">gtk-stop</property> | ||
53 | </action> | ||
54 | <action id="ExitGridManager"> | ||
55 | <property name="Type">Action</property> | ||
56 | <property name="Label" translatable="yes">Exit grid manager</property> | ||
57 | <property name="ShortLabel" translatable="yes">Exit grid manager</property> | ||
58 | <property name="StockId">gtk-close</property> | ||
59 | <signal name="Activated" handler="QuitMenu" after="yes" /> | ||
60 | </action> | ||
61 | <action id="ConnectToUserserver"> | ||
62 | <property name="Type">Action</property> | ||
63 | <property name="Label" translatable="yes">Connect to userserver</property> | ||
64 | <property name="ShortLabel" translatable="yes">Connect to userserver</property> | ||
65 | <property name="StockId">gtk-connect</property> | ||
66 | </action> | ||
67 | <action id="AccountManagment"> | ||
68 | <property name="Type">Action</property> | ||
69 | <property name="Label" translatable="yes">Account managment</property> | ||
70 | <property name="ShortLabel" translatable="yes">Account managment</property> | ||
71 | <property name="StockId">gtk-properties</property> | ||
72 | </action> | ||
73 | <action id="GlobalNotice"> | ||
74 | <property name="Type">Action</property> | ||
75 | <property name="Label" translatable="yes">Global notice</property> | ||
76 | <property name="ShortLabel" translatable="yes">Global notice</property> | ||
77 | <property name="StockId">gtk-network</property> | ||
78 | </action> | ||
79 | <action id="DisableAllLogins"> | ||
80 | <property name="Type">Action</property> | ||
81 | <property name="Label" translatable="yes">Disable all logins</property> | ||
82 | <property name="ShortLabel" translatable="yes">Disable all logins</property> | ||
83 | <property name="StockId">gtk-no</property> | ||
84 | </action> | ||
85 | <action id="DisableNonGodUsersOnly"> | ||
86 | <property name="Type">Action</property> | ||
87 | <property name="Label" translatable="yes">Disable non-god users only</property> | ||
88 | <property name="ShortLabel" translatable="yes">Disable non-god users only</property> | ||
89 | <property name="StockId">gtk-no</property> | ||
90 | </action> | ||
91 | <action id="ShutdownUserServer"> | ||
92 | <property name="Type">Action</property> | ||
93 | <property name="Label" translatable="yes">Shutdown user server</property> | ||
94 | <property name="ShortLabel" translatable="yes">Shutdown user server</property> | ||
95 | <property name="StockId">gtk-stop</property> | ||
96 | </action> | ||
97 | <action id="ShutdownGridserverOnly"> | ||
98 | <property name="Type">Action</property> | ||
99 | <property name="Label" translatable="yes">Shutdown gridserver only</property> | ||
100 | <property name="ShortLabel" translatable="yes">Shutdown gridserver only</property> | ||
101 | <property name="StockId">gtk-stop</property> | ||
102 | <signal name="Activated" handler="ShutdownGridserverMenu" after="yes" /> | ||
103 | </action> | ||
104 | <action id="RestartGridserverOnly"> | ||
105 | <property name="Type">Action</property> | ||
106 | <property name="Label" translatable="yes">Restart gridserver only</property> | ||
107 | <property name="ShortLabel" translatable="yes">Restart gridserver only</property> | ||
108 | <property name="StockId">gtk-refresh</property> | ||
109 | <signal name="Activated" handler="RestartGridserverMenu" after="yes" /> | ||
110 | </action> | ||
111 | <action id="DefaultLocalGridUserserver"> | ||
112 | <property name="Type">Action</property> | ||
113 | <property name="Label" translatable="yes">Default local grid userserver</property> | ||
114 | <property name="ShortLabel" translatable="yes">Default local grid userserver</property> | ||
115 | </action> | ||
116 | <action id="CustomUserserver"> | ||
117 | <property name="Type">Action</property> | ||
118 | <property name="Label" translatable="yes">Custom userserver...</property> | ||
119 | <property name="ShortLabel" translatable="yes">Custom userserver</property> | ||
120 | </action> | ||
121 | <action id="RemoteGridDefaultUserserver"> | ||
122 | <property name="Type">Action</property> | ||
123 | <property name="Label" translatable="yes">Remote grid default userserver...</property> | ||
124 | <property name="ShortLabel" translatable="yes">Remote grid default userserver</property> | ||
125 | </action> | ||
126 | <action id="DisconnectFromGridServer"> | ||
127 | <property name="Type">Action</property> | ||
128 | <property name="Label" translatable="yes">Disconnect from grid server</property> | ||
129 | <property name="ShortLabel" translatable="yes">Disconnect from grid server</property> | ||
130 | <property name="StockId">gtk-disconnect</property> | ||
131 | <property name="Visible">False</property> | ||
132 | <signal name="Activated" handler="DisconnectGridServerMenu" after="yes" /> | ||
133 | </action> | ||
134 | <action id="UploadAsset"> | ||
135 | <property name="Type">Action</property> | ||
136 | <property name="Label" translatable="yes">Upload asset</property> | ||
137 | <property name="ShortLabel" translatable="yes">Upload asset</property> | ||
138 | </action> | ||
139 | <action id="AssetManagement"> | ||
140 | <property name="Type">Action</property> | ||
141 | <property name="Label" translatable="yes">Asset management</property> | ||
142 | <property name="ShortLabel" translatable="yes">Asset management</property> | ||
143 | </action> | ||
144 | <action id="ConnectToAssetServer"> | ||
145 | <property name="Type">Action</property> | ||
146 | <property name="Label" translatable="yes">Connect to asset server</property> | ||
147 | <property name="ShortLabel" translatable="yes">Connect to asset server</property> | ||
148 | </action> | ||
149 | <action id="ConnectToDefaultAssetServerForGrid"> | ||
150 | <property name="Type">Action</property> | ||
151 | <property name="Label" translatable="yes">Connect to default asset server for grid</property> | ||
152 | <property name="ShortLabel" translatable="yes">Connect to default asset server for grid</property> | ||
153 | </action> | ||
154 | <action id="DefaultForLocalGrid"> | ||
155 | <property name="Type">Action</property> | ||
156 | <property name="Label" translatable="yes">Default for local grid</property> | ||
157 | <property name="ShortLabel" translatable="yes">Default for local grid</property> | ||
158 | </action> | ||
159 | <action id="DefaultForRemoteGrid"> | ||
160 | <property name="Type">Action</property> | ||
161 | <property name="Label" translatable="yes">Default for remote grid...</property> | ||
162 | <property name="ShortLabel" translatable="yes">Default for remote grid...</property> | ||
163 | </action> | ||
164 | <action id="CustomAssetServer"> | ||
165 | <property name="Type">Action</property> | ||
166 | <property name="Label" translatable="yes">Custom asset server...</property> | ||
167 | <property name="ShortLabel" translatable="yes">Custom asset server...</property> | ||
168 | </action> | ||
169 | </action-group> | ||
170 | <property name="MemberName" /> | ||
171 | <property name="WidthRequest">800</property> | ||
172 | <property name="HeightRequest">600</property> | ||
173 | <property name="Title" translatable="yes">Open Grid Services Manager</property> | ||
174 | <property name="Icon">stock:gtk-network Dialog</property> | ||
175 | <signal name="DeleteEvent" handler="OnDeleteEvent" /> | ||
176 | <child> | ||
177 | <widget class="Gtk.VBox" id="vbox1"> | ||
178 | <property name="MemberName" /> | ||
179 | <child> | ||
180 | <widget class="Gtk.MenuBar" id="menubar2"> | ||
181 | <property name="MemberName" /> | ||
182 | <property name="HeightRequest">25</property> | ||
183 | <node name="menubar2" type="Menubar"> | ||
184 | <node type="Menu" action="Grid"> | ||
185 | <node type="Menuitem" action="ConnectToGridserver" /> | ||
186 | <node type="Menuitem" action="DisconnectFromGridServer" /> | ||
187 | <node type="Separator" /> | ||
188 | <node type="Menuitem" action="RestartWholeGrid" /> | ||
189 | <node type="Menuitem" action="RestartGridserverOnly" /> | ||
190 | <node type="Separator" /> | ||
191 | <node type="Menuitem" action="ShutdownWholeGrid" /> | ||
192 | <node type="Menuitem" action="ShutdownGridserverOnly" /> | ||
193 | <node type="Separator" /> | ||
194 | <node type="Menuitem" action="ExitGridManager" /> | ||
195 | </node> | ||
196 | <node type="Menu" action="User"> | ||
197 | <node type="Menu" action="ConnectToUserserver"> | ||
198 | <node type="Menuitem" action="DefaultLocalGridUserserver" /> | ||
199 | <node type="Menuitem" action="CustomUserserver" /> | ||
200 | <node type="Menuitem" action="RemoteGridDefaultUserserver" /> | ||
201 | </node> | ||
202 | <node type="Separator" /> | ||
203 | <node type="Menuitem" action="AccountManagment" /> | ||
204 | <node type="Menuitem" action="GlobalNotice" /> | ||
205 | <node type="Separator" /> | ||
206 | <node type="Menuitem" action="DisableAllLogins" /> | ||
207 | <node type="Menuitem" action="DisableNonGodUsersOnly" /> | ||
208 | <node type="Separator" /> | ||
209 | <node type="Menuitem" action="ShutdownUserServer" /> | ||
210 | </node> | ||
211 | <node type="Menu" action="Asset"> | ||
212 | <node type="Menuitem" action="UploadAsset" /> | ||
213 | <node type="Menuitem" action="AssetManagement" /> | ||
214 | <node type="Menu" action="ConnectToAssetServer"> | ||
215 | <node type="Menuitem" action="DefaultForLocalGrid" /> | ||
216 | <node type="Menuitem" action="DefaultForRemoteGrid" /> | ||
217 | <node type="Menuitem" action="CustomAssetServer" /> | ||
218 | </node> | ||
219 | </node> | ||
220 | <node type="Menu" action="Region" /> | ||
221 | <node type="Menu" action="Services" /> | ||
222 | </node> | ||
223 | </widget> | ||
224 | <packing> | ||
225 | <property name="Position">0</property> | ||
226 | <property name="AutoSize">False</property> | ||
227 | <property name="Expand">False</property> | ||
228 | <property name="Fill">False</property> | ||
229 | </packing> | ||
230 | </child> | ||
231 | <child> | ||
232 | <widget class="Gtk.HBox" id="hbox1"> | ||
233 | <property name="MemberName" /> | ||
234 | <child> | ||
235 | <placeholder /> | ||
236 | </child> | ||
237 | <child> | ||
238 | <widget class="Gtk.ScrolledWindow" id="scrolledwindow1"> | ||
239 | <property name="MemberName" /> | ||
240 | <property name="CanFocus">True</property> | ||
241 | <property name="VscrollbarPolicy">Automatic</property> | ||
242 | <property name="HscrollbarPolicy">Automatic</property> | ||
243 | <child> | ||
244 | <widget class="Gtk.Viewport" id="GtkViewport"> | ||
245 | <property name="MemberName" /> | ||
246 | <property name="ShadowType">None</property> | ||
247 | <child> | ||
248 | <widget class="Gtk.DrawingArea" id="drawingarea1"> | ||
249 | <property name="MemberName" /> | ||
250 | </widget> | ||
251 | </child> | ||
252 | </widget> | ||
253 | </child> | ||
254 | </widget> | ||
255 | <packing> | ||
256 | <property name="Position">1</property> | ||
257 | <property name="AutoSize">True</property> | ||
258 | </packing> | ||
259 | </child> | ||
260 | <child> | ||
261 | <widget class="Gtk.TreeView" id="treeview1"> | ||
262 | <property name="MemberName" /> | ||
263 | <property name="CanFocus">True</property> | ||
264 | </widget> | ||
265 | <packing> | ||
266 | <property name="Position">2</property> | ||
267 | <property name="AutoSize">True</property> | ||
268 | </packing> | ||
269 | </child> | ||
270 | </widget> | ||
271 | <packing> | ||
272 | <property name="Position">1</property> | ||
273 | <property name="AutoSize">True</property> | ||
274 | </packing> | ||
275 | </child> | ||
276 | <child> | ||
277 | <widget class="Gtk.Statusbar" id="statusbar1"> | ||
278 | <property name="MemberName">statusBar1</property> | ||
279 | <property name="Spacing">5</property> | ||
280 | <child> | ||
281 | <placeholder /> | ||
282 | </child> | ||
283 | <child> | ||
284 | <placeholder /> | ||
285 | </child> | ||
286 | </widget> | ||
287 | <packing> | ||
288 | <property name="PackType">End</property> | ||
289 | <property name="Position">2</property> | ||
290 | <property name="AutoSize">False</property> | ||
291 | <property name="Expand">False</property> | ||
292 | <property name="Fill">False</property> | ||
293 | </packing> | ||
294 | </child> | ||
295 | </widget> | ||
296 | </child> | ||
297 | </widget> | ||
298 | <widget class="Gtk.Dialog" id="OpenGridServices.Manager.ConnectToGridServerDialog" design-size="476 137"> | ||
299 | <property name="MemberName" /> | ||
300 | <property name="Events">ButtonPressMask</property> | ||
301 | <property name="Title" translatable="yes">Connect to Grid server</property> | ||
302 | <property name="WindowPosition">CenterOnParent</property> | ||
303 | <property name="Buttons">2</property> | ||
304 | <property name="HelpButton">False</property> | ||
305 | <property name="HasSeparator">False</property> | ||
306 | <signal name="Response" handler="OnResponse" /> | ||
307 | <child internal-child="VBox"> | ||
308 | <widget class="Gtk.VBox" id="dialog_VBox"> | ||
309 | <property name="MemberName" /> | ||
310 | <property name="Events">ButtonPressMask</property> | ||
311 | <property name="BorderWidth">2</property> | ||
312 | <child> | ||
313 | <widget class="Gtk.VBox" id="vbox2"> | ||
314 | <property name="MemberName" /> | ||
315 | <child> | ||
316 | <placeholder /> | ||
317 | </child> | ||
318 | <child> | ||
319 | <placeholder /> | ||
320 | </child> | ||
321 | <child> | ||
322 | <widget class="Gtk.VBox" id="vbox3"> | ||
323 | <property name="MemberName" /> | ||
324 | <child> | ||
325 | <widget class="Gtk.HBox" id="hbox1"> | ||
326 | <property name="MemberName" /> | ||
327 | <child> | ||
328 | <widget class="Gtk.Label" id="label1"> | ||
329 | <property name="MemberName" /> | ||
330 | <property name="Xalign">1</property> | ||
331 | <property name="LabelProp" translatable="yes">Grid server URL: </property> | ||
332 | <property name="Justify">Right</property> | ||
333 | </widget> | ||
334 | <packing> | ||
335 | <property name="Position">0</property> | ||
336 | <property name="AutoSize">False</property> | ||
337 | </packing> | ||
338 | </child> | ||
339 | <child> | ||
340 | <widget class="Gtk.Entry" id="entry1"> | ||
341 | <property name="MemberName" /> | ||
342 | <property name="CanFocus">True</property> | ||
343 | <property name="Text" translatable="yes">http://gridserver:8001</property> | ||
344 | <property name="IsEditable">True</property> | ||
345 | <property name="MaxLength">255</property> | ||
346 | <property name="InvisibleChar">•</property> | ||
347 | </widget> | ||
348 | <packing> | ||
349 | <property name="Position">1</property> | ||
350 | <property name="AutoSize">False</property> | ||
351 | </packing> | ||
352 | </child> | ||
353 | <child> | ||
354 | <placeholder /> | ||
355 | </child> | ||
356 | </widget> | ||
357 | <packing> | ||
358 | <property name="Position">0</property> | ||
359 | <property name="AutoSize">True</property> | ||
360 | <property name="Expand">False</property> | ||
361 | <property name="Fill">False</property> | ||
362 | </packing> | ||
363 | </child> | ||
364 | <child> | ||
365 | <widget class="Gtk.HBox" id="hbox2"> | ||
366 | <property name="MemberName" /> | ||
367 | <child> | ||
368 | <widget class="Gtk.Label" id="label2"> | ||
369 | <property name="MemberName" /> | ||
370 | <property name="Xalign">1</property> | ||
371 | <property name="LabelProp" translatable="yes">Username:</property> | ||
372 | <property name="Justify">Right</property> | ||
373 | </widget> | ||
374 | <packing> | ||
375 | <property name="Position">0</property> | ||
376 | <property name="AutoSize">False</property> | ||
377 | </packing> | ||
378 | </child> | ||
379 | <child> | ||
380 | <widget class="Gtk.Entry" id="entry2"> | ||
381 | <property name="MemberName" /> | ||
382 | <property name="CanFocus">True</property> | ||
383 | <property name="IsEditable">True</property> | ||
384 | <property name="InvisibleChar">•</property> | ||
385 | </widget> | ||
386 | <packing> | ||
387 | <property name="Position">1</property> | ||
388 | <property name="AutoSize">True</property> | ||
389 | </packing> | ||
390 | </child> | ||
391 | <child> | ||
392 | <placeholder /> | ||
393 | </child> | ||
394 | </widget> | ||
395 | <packing> | ||
396 | <property name="Position">1</property> | ||
397 | <property name="AutoSize">False</property> | ||
398 | <property name="Expand">False</property> | ||
399 | <property name="Fill">False</property> | ||
400 | </packing> | ||
401 | </child> | ||
402 | <child> | ||
403 | <widget class="Gtk.HBox" id="hbox3"> | ||
404 | <property name="MemberName" /> | ||
405 | <child> | ||
406 | <widget class="Gtk.Label" id="label3"> | ||
407 | <property name="MemberName" /> | ||
408 | <property name="Xalign">1</property> | ||
409 | <property name="LabelProp" translatable="yes">Password:</property> | ||
410 | <property name="Justify">Right</property> | ||
411 | </widget> | ||
412 | <packing> | ||
413 | <property name="Position">0</property> | ||
414 | <property name="AutoSize">False</property> | ||
415 | </packing> | ||
416 | </child> | ||
417 | <child> | ||
418 | <widget class="Gtk.Entry" id="entry3"> | ||
419 | <property name="MemberName" /> | ||
420 | <property name="CanFocus">True</property> | ||
421 | <property name="IsEditable">True</property> | ||
422 | <property name="InvisibleChar">•</property> | ||
423 | </widget> | ||
424 | <packing> | ||
425 | <property name="Position">1</property> | ||
426 | <property name="AutoSize">True</property> | ||
427 | </packing> | ||
428 | </child> | ||
429 | <child> | ||
430 | <placeholder /> | ||
431 | </child> | ||
432 | </widget> | ||
433 | <packing> | ||
434 | <property name="Position">2</property> | ||
435 | <property name="AutoSize">True</property> | ||
436 | <property name="Expand">False</property> | ||
437 | <property name="Fill">False</property> | ||
438 | </packing> | ||
439 | </child> | ||
440 | </widget> | ||
441 | <packing> | ||
442 | <property name="Position">2</property> | ||
443 | <property name="AutoSize">True</property> | ||
444 | <property name="Expand">False</property> | ||
445 | <property name="Fill">False</property> | ||
446 | </packing> | ||
447 | </child> | ||
448 | </widget> | ||
449 | <packing> | ||
450 | <property name="Position">0</property> | ||
451 | <property name="AutoSize">True</property> | ||
452 | </packing> | ||
453 | </child> | ||
454 | </widget> | ||
455 | </child> | ||
456 | <child internal-child="ActionArea"> | ||
457 | <widget class="Gtk.HButtonBox" id="OpenGridServices.Manager.ConnectToGridServerDialog_ActionArea"> | ||
458 | <property name="MemberName" /> | ||
459 | <property name="Events">ButtonPressMask</property> | ||
460 | <property name="Spacing">6</property> | ||
461 | <property name="BorderWidth">5</property> | ||
462 | <property name="Size">2</property> | ||
463 | <property name="LayoutStyle">End</property> | ||
464 | <child> | ||
465 | <widget class="Gtk.Button" id="button2"> | ||
466 | <property name="MemberName" /> | ||
467 | <property name="CanDefault">True</property> | ||
468 | <property name="CanFocus">True</property> | ||
469 | <property name="Type">TextAndIcon</property> | ||
470 | <property name="Icon">stock:gtk-apply Menu</property> | ||
471 | <property name="Label" translatable="yes">Connect</property> | ||
472 | <property name="UseUnderline">True</property> | ||
473 | <property name="IsDialogButton">True</property> | ||
474 | <property name="ResponseId">-5</property> | ||
475 | </widget> | ||
476 | <packing> | ||
477 | <property name="Expand">False</property> | ||
478 | <property name="Fill">False</property> | ||
479 | </packing> | ||
480 | </child> | ||
481 | <child> | ||
482 | <widget class="Gtk.Button" id="button8"> | ||
483 | <property name="MemberName" /> | ||
484 | <property name="CanDefault">True</property> | ||
485 | <property name="CanFocus">True</property> | ||
486 | <property name="Type">TextAndIcon</property> | ||
487 | <property name="Icon">stock:gtk-cancel Menu</property> | ||
488 | <property name="Label" translatable="yes">Cancel</property> | ||
489 | <property name="UseUnderline">True</property> | ||
490 | <property name="IsDialogButton">True</property> | ||
491 | <property name="ResponseId">-6</property> | ||
492 | </widget> | ||
493 | <packing> | ||
494 | <property name="Position">1</property> | ||
495 | <property name="Expand">False</property> | ||
496 | <property name="Fill">False</property> | ||
497 | </packing> | ||
498 | </child> | ||
499 | </widget> | ||
500 | </child> | ||
501 | </widget> | ||
502 | </stetic-interface> \ No newline at end of file | ||
diff --git a/OpenGridServices/OpenGridServices.UserServer/Main.cs b/OpenGridServices/OpenGridServices.UserServer/Main.cs deleted file mode 100644 index 5c27d57..0000000 --- a/OpenGridServices/OpenGridServices.UserServer/Main.cs +++ /dev/null | |||
@@ -1,219 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | |||
29 | using System; | ||
30 | using System.Collections; | ||
31 | using System.Collections.Generic; | ||
32 | using System.Reflection; | ||
33 | using System.IO; | ||
34 | using System.Text; | ||
35 | using libsecondlife; | ||
36 | using OpenSim.Framework.User; | ||
37 | using OpenSim.Framework.Sims; | ||
38 | using OpenSim.Framework.Inventory; | ||
39 | using OpenSim.Framework.Interfaces; | ||
40 | using OpenSim.Framework.Console; | ||
41 | using OpenSim.Servers; | ||
42 | using OpenSim.Framework.Utilities; | ||
43 | using OpenSim.GenericConfig; | ||
44 | |||
45 | namespace OpenGridServices.UserServer | ||
46 | { | ||
47 | /// <summary> | ||
48 | /// </summary> | ||
49 | public class OpenUser_Main : conscmd_callback | ||
50 | { | ||
51 | private string ConfigDll = "OpenUser.Config.UserConfigDb4o.dll"; | ||
52 | private string StorageDll = "OpenGrid.Framework.Data.MySQL.dll"; | ||
53 | private UserConfig Cfg; | ||
54 | protected IGenericConfig localXMLConfig; | ||
55 | |||
56 | public UserManager m_userManager; | ||
57 | |||
58 | public Dictionary<LLUUID, UserProfile> UserSessions = new Dictionary<LLUUID, UserProfile>(); | ||
59 | |||
60 | LogBase m_console; | ||
61 | |||
62 | [STAThread] | ||
63 | public static void Main(string[] args) | ||
64 | { | ||
65 | Console.WriteLine("Launching UserServer..."); | ||
66 | |||
67 | OpenUser_Main userserver = new OpenUser_Main(); | ||
68 | |||
69 | userserver.Startup(); | ||
70 | userserver.Work(); | ||
71 | } | ||
72 | |||
73 | private OpenUser_Main() | ||
74 | { | ||
75 | m_console = new LogBase("opengrid-userserver-console.log", "OpenUser", this , false); | ||
76 | OpenSim.Framework.Console.MainLog.Instance = m_console; | ||
77 | } | ||
78 | |||
79 | private void Work() | ||
80 | { | ||
81 | m_console.Notice("Enter help for a list of commands\n"); | ||
82 | |||
83 | while (true) | ||
84 | { | ||
85 | m_console.MainLogPrompt(); | ||
86 | } | ||
87 | } | ||
88 | |||
89 | public void Startup() | ||
90 | { | ||
91 | this.localXMLConfig = new XmlConfig("UserServerConfig.xml"); | ||
92 | this.localXMLConfig.LoadData(); | ||
93 | this.ConfigDB(this.localXMLConfig); | ||
94 | this.localXMLConfig.Close(); | ||
95 | |||
96 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Main.cs:Startup() - Loading configuration"); | ||
97 | Cfg = this.LoadConfigDll(this.ConfigDll); | ||
98 | Cfg.InitConfig(); | ||
99 | |||
100 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Main.cs:Startup() - Establishing data connection"); | ||
101 | m_userManager = new UserManager(); | ||
102 | m_userManager._config = Cfg; | ||
103 | m_userManager.AddPlugin(StorageDll); | ||
104 | |||
105 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Main.cs:Startup() - Starting HTTP process"); | ||
106 | BaseHttpServer httpServer = new BaseHttpServer(8002); | ||
107 | |||
108 | httpServer.AddXmlRPCHandler("login_to_simulator", m_userManager.XmlRpcLoginMethod); | ||
109 | |||
110 | httpServer.AddRestHandler("GET", "/user/name/", m_userManager.RestGetUserMethodName); | ||
111 | httpServer.AddRestHandler("GET", "/user/uuid/", m_userManager.RestGetUserMethodUUID); | ||
112 | |||
113 | httpServer.AddRestHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod); | ||
114 | |||
115 | httpServer.Start(); | ||
116 | m_console.Status("Userserver 0.3 - Startup complete"); | ||
117 | } | ||
118 | |||
119 | |||
120 | public void do_create(string what) | ||
121 | { | ||
122 | switch (what) | ||
123 | { | ||
124 | case "user": | ||
125 | string tempfirstname; | ||
126 | string templastname; | ||
127 | string tempMD5Passwd; | ||
128 | uint regX = 997; | ||
129 | uint regY = 996; | ||
130 | |||
131 | tempfirstname = m_console.CmdPrompt("First name"); | ||
132 | templastname = m_console.CmdPrompt("Last name"); | ||
133 | tempMD5Passwd = m_console.PasswdPrompt("Password"); | ||
134 | regX = Convert.ToUInt32(m_console.CmdPrompt("Start Region X")); | ||
135 | regY = Convert.ToUInt32(m_console.CmdPrompt("Start Region Y")); | ||
136 | |||
137 | tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + ""); | ||
138 | |||
139 | m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); | ||
140 | break; | ||
141 | } | ||
142 | } | ||
143 | |||
144 | public void RunCmd(string cmd, string[] cmdparams) | ||
145 | { | ||
146 | switch (cmd) | ||
147 | { | ||
148 | case "help": | ||
149 | m_console.Notice("create user - create a new user"); | ||
150 | m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)"); | ||
151 | break; | ||
152 | |||
153 | case "create": | ||
154 | do_create(cmdparams[0]); | ||
155 | break; | ||
156 | |||
157 | case "shutdown": | ||
158 | m_console.Close(); | ||
159 | Environment.Exit(0); | ||
160 | break; | ||
161 | } | ||
162 | } | ||
163 | |||
164 | private void ConfigDB(IGenericConfig configData) | ||
165 | { | ||
166 | try | ||
167 | { | ||
168 | string attri = ""; | ||
169 | attri = configData.GetAttribute("DataBaseProvider"); | ||
170 | if (attri == "") | ||
171 | { | ||
172 | StorageDll = "OpenGrid.Framework.Data.DB4o.dll"; | ||
173 | configData.SetAttribute("DataBaseProvider", "OpenGrid.Framework.Data.DB4o.dll"); | ||
174 | } | ||
175 | else | ||
176 | { | ||
177 | StorageDll = attri; | ||
178 | } | ||
179 | configData.Commit(); | ||
180 | } | ||
181 | catch (Exception e) | ||
182 | { | ||
183 | |||
184 | } | ||
185 | } | ||
186 | |||
187 | private UserConfig LoadConfigDll(string dllName) | ||
188 | { | ||
189 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); | ||
190 | UserConfig config = null; | ||
191 | |||
192 | foreach (Type pluginType in pluginAssembly.GetTypes()) | ||
193 | { | ||
194 | if (pluginType.IsPublic) | ||
195 | { | ||
196 | if (!pluginType.IsAbstract) | ||
197 | { | ||
198 | Type typeInterface = pluginType.GetInterface("IUserConfig", true); | ||
199 | |||
200 | if (typeInterface != null) | ||
201 | { | ||
202 | IUserConfig plug = (IUserConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | ||
203 | config = plug.GetConfigObject(); | ||
204 | break; | ||
205 | } | ||
206 | |||
207 | typeInterface = null; | ||
208 | } | ||
209 | } | ||
210 | } | ||
211 | pluginAssembly = null; | ||
212 | return config; | ||
213 | } | ||
214 | |||
215 | public void Show(string ShowWhat) | ||
216 | { | ||
217 | } | ||
218 | } | ||
219 | } | ||
diff --git a/OpenGridServices/OpenGridServices.UserServer/OGS-UserServer.csproj b/OpenGridServices/OpenGridServices.UserServer/OGS-UserServer.csproj deleted file mode 100644 index f4fa8b6..0000000 --- a/OpenGridServices/OpenGridServices.UserServer/OGS-UserServer.csproj +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
4 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
5 | <ProductVersion>8.0.50727</ProductVersion> | ||
6 | <SchemaVersion>2.0</SchemaVersion> | ||
7 | <ProjectGuid>{D45B6E48-5668-478D-B9CB-6D46E665FACF}</ProjectGuid> | ||
8 | <OutputType>Exe</OutputType> | ||
9 | <AppDesignerFolder>Properties</AppDesignerFolder> | ||
10 | <RootNamespace>OGS_UserServer</RootNamespace> | ||
11 | <AssemblyName>OGS-UserServer</AssemblyName> | ||
12 | <StartupObject>OpenGridServices.OpenUser_Main</StartupObject> | ||
13 | </PropertyGroup> | ||
14 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
15 | <DebugSymbols>true</DebugSymbols> | ||
16 | <DebugType>full</DebugType> | ||
17 | <Optimize>false</Optimize> | ||
18 | <OutputPath>bin\Debug\</OutputPath> | ||
19 | <DefineConstants>DEBUG;TRACE</DefineConstants> | ||
20 | <ErrorReport>prompt</ErrorReport> | ||
21 | <WarningLevel>4</WarningLevel> | ||
22 | </PropertyGroup> | ||
23 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
24 | <DebugType>pdbonly</DebugType> | ||
25 | <Optimize>true</Optimize> | ||
26 | <OutputPath>bin\Release\</OutputPath> | ||
27 | <DefineConstants>TRACE</DefineConstants> | ||
28 | <ErrorReport>prompt</ErrorReport> | ||
29 | <WarningLevel>4</WarningLevel> | ||
30 | </PropertyGroup> | ||
31 | <ItemGroup> | ||
32 | <Reference Include="libsecondlife, Version=0.9.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
33 | <SpecificVersion>False</SpecificVersion> | ||
34 | <HintPath>..\..\common\bin\libsecondlife.dll</HintPath> | ||
35 | </Reference> | ||
36 | <Reference Include="System" /> | ||
37 | <Reference Include="System.Data" /> | ||
38 | <Reference Include="System.Xml" /> | ||
39 | </ItemGroup> | ||
40 | <ItemGroup> | ||
41 | <Compile Include="..\..\common\src\OGS-Console.cs"> | ||
42 | <Link>OGS-Console.cs</Link> | ||
43 | </Compile> | ||
44 | <Compile Include="..\..\common\VersionInfo\VersionInfo.cs"> | ||
45 | <Link>VersionInfo.cs</Link> | ||
46 | </Compile> | ||
47 | <Compile Include="ConsoleCmds.cs" /> | ||
48 | <Compile Include="Main.cs" /> | ||
49 | <Compile Include="Properties\AssemblyInfo.cs" /> | ||
50 | <Compile Include="UserHttp.cs" /> | ||
51 | </ItemGroup> | ||
52 | <ItemGroup> | ||
53 | <ProjectReference Include="..\..\..\OpenSim.FrameWork\OpenSim.Framework.csproj"> | ||
54 | <Project>{2E46A825-3168-492F-93BC-637126B5B72B}</Project> | ||
55 | <Name>OpenSim.Framework</Name> | ||
56 | </ProjectReference> | ||
57 | <ProjectReference Include="..\..\ServerConsole\ServerConsole.csproj"> | ||
58 | <Project>{7667E6E2-F227-41A2-B1B2-315613E1BAFC}</Project> | ||
59 | <Name>ServerConsole</Name> | ||
60 | </ProjectReference> | ||
61 | </ItemGroup> | ||
62 | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | ||
63 | </Project> \ No newline at end of file | ||
diff --git a/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj b/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj deleted file mode 100644 index ad0080a..0000000 --- a/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj +++ /dev/null | |||
@@ -1,132 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{66591469-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenGridServices.UserServer</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Exe</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenGridServices.UserServer</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>False</Optimize> | ||
35 | <OutputPath>..\..\bin\</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>True</Optimize> | ||
53 | <OutputPath>..\..\bin\</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="Db4objects.Db4o.dll" > | ||
62 | <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="libsecondlife.dll" > | ||
66 | <HintPath>..\..\bin\libsecondlife.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="OpenGrid.Framework.UserManager" > | ||
70 | <HintPath>OpenGrid.Framework.UserManager.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="OpenSim.Framework" > | ||
74 | <HintPath>OpenSim.Framework.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | <Reference Include="OpenSim.Framework.Console" > | ||
78 | <HintPath>OpenSim.Framework.Console.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | <Reference Include="OpenSim.GenericConfig.Xml" > | ||
82 | <HintPath>OpenSim.GenericConfig.Xml.dll</HintPath> | ||
83 | <Private>False</Private> | ||
84 | </Reference> | ||
85 | <Reference Include="OpenSim.Servers" > | ||
86 | <HintPath>OpenSim.Servers.dll</HintPath> | ||
87 | <Private>False</Private> | ||
88 | </Reference> | ||
89 | <Reference Include="System" > | ||
90 | <HintPath>System.dll</HintPath> | ||
91 | <Private>False</Private> | ||
92 | </Reference> | ||
93 | <Reference Include="System.Data" > | ||
94 | <HintPath>System.Data.dll</HintPath> | ||
95 | <Private>False</Private> | ||
96 | </Reference> | ||
97 | <Reference Include="System.Xml" > | ||
98 | <HintPath>System.Xml.dll</HintPath> | ||
99 | <Private>False</Private> | ||
100 | </Reference> | ||
101 | <Reference Include="XMLRPC" > | ||
102 | <HintPath>XMLRPC.dll</HintPath> | ||
103 | <Private>False</Private> | ||
104 | </Reference> | ||
105 | </ItemGroup> | ||
106 | <ItemGroup> | ||
107 | <ProjectReference Include="..\..\Common\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj"> | ||
108 | <Name>OpenGrid.Framework.Data</Name> | ||
109 | <Project>{62CDF671-0000-0000-0000-000000000000}</Project> | ||
110 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
111 | <Private>False</Private> | ||
112 | </ProjectReference> | ||
113 | </ItemGroup> | ||
114 | <ItemGroup> | ||
115 | <Compile Include="Main.cs"> | ||
116 | <SubType>Code</SubType> | ||
117 | </Compile> | ||
118 | <Compile Include="UserManager.cs"> | ||
119 | <SubType>Code</SubType> | ||
120 | </Compile> | ||
121 | <Compile Include="Properties\AssemblyInfo.cs"> | ||
122 | <SubType>Code</SubType> | ||
123 | </Compile> | ||
124 | </ItemGroup> | ||
125 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
126 | <PropertyGroup> | ||
127 | <PreBuildEvent> | ||
128 | </PreBuildEvent> | ||
129 | <PostBuildEvent> | ||
130 | </PostBuildEvent> | ||
131 | </PropertyGroup> | ||
132 | </Project> | ||
diff --git a/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build b/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build deleted file mode 100644 index d262947..0000000 --- a/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | <?xml version="1.0" ?> | ||
2 | <project name="OpenGridServices.UserServer" default="build"> | ||
3 | <target name="build"> | ||
4 | <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> | ||
5 | <mkdir dir="${project::get-base-directory()}/${build.dir}" /> | ||
6 | <copy todir="${project::get-base-directory()}/${build.dir}"> | ||
7 | <fileset basedir="${project::get-base-directory()}"> | ||
8 | </fileset> | ||
9 | </copy> | ||
10 | <csc target="exe" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.exe"> | ||
11 | <resources prefix="OpenGridServices.UserServer" dynamicprefix="true" > | ||
12 | </resources> | ||
13 | <sources failonempty="true"> | ||
14 | <include name="Main.cs" /> | ||
15 | <include name="UserManager.cs" /> | ||
16 | <include name="Properties/AssemblyInfo.cs" /> | ||
17 | </sources> | ||
18 | <references basedir="${project::get-base-directory()}"> | ||
19 | <lib> | ||
20 | <include name="${project::get-base-directory()}" /> | ||
21 | <include name="${project::get-base-directory()}/${build.dir}" /> | ||
22 | </lib> | ||
23 | <include name="../../bin/Db4objects.Db4o.dll" /> | ||
24 | <include name="../../bin/libsecondlife.dll" /> | ||
25 | <include name="../../bin/OpenGrid.Framework.Data.dll" /> | ||
26 | <include name="OpenGrid.Framework.UserManager.dll" /> | ||
27 | <include name="../../bin/OpenSim.Framework.dll" /> | ||
28 | <include name="../../bin/OpenSim.Framework.Console.dll" /> | ||
29 | <include name="../../bin/OpenSim.GenericConfig.Xml.dll" /> | ||
30 | <include name="../../bin/OpenSim.Servers.dll" /> | ||
31 | <include name="System.dll" /> | ||
32 | <include name="System.Data.dll" /> | ||
33 | <include name="System.Xml.dll" /> | ||
34 | <include name="../../bin/XMLRPC.dll" /> | ||
35 | </references> | ||
36 | </csc> | ||
37 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" /> | ||
38 | <mkdir dir="${project::get-base-directory()}/../../bin/"/> | ||
39 | <copy todir="${project::get-base-directory()}/../../bin/"> | ||
40 | <fileset basedir="${project::get-base-directory()}/${build.dir}/" > | ||
41 | <include name="*.dll"/> | ||
42 | <include name="*.exe"/> | ||
43 | </fileset> | ||
44 | </copy> | ||
45 | </target> | ||
46 | <target name="clean"> | ||
47 | <delete dir="${bin.dir}" failonerror="false" /> | ||
48 | <delete dir="${obj.dir}" failonerror="false" /> | ||
49 | </target> | ||
50 | <target name="doc" description="Creates documentation."> | ||
51 | </target> | ||
52 | </project> | ||
diff --git a/OpenGridServices/OpenGridServices.UserServer/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGridServices.UserServer/Properties/AssemblyInfo.cs deleted file mode 100644 index 5d5ce8d..0000000 --- a/OpenGridServices/OpenGridServices.UserServer/Properties/AssemblyInfo.cs +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | using System.Reflection; | ||
2 | using System.Runtime.CompilerServices; | ||
3 | using System.Runtime.InteropServices; | ||
4 | |||
5 | // General Information about an assembly is controlled through the following | ||
6 | // set of attributes. Change these attribute values to modify the information | ||
7 | // associated with an assembly. | ||
8 | [assembly: AssemblyTitle("OGS-UserServer")] | ||
9 | [assembly: AssemblyDescription("")] | ||
10 | [assembly: AssemblyConfiguration("")] | ||
11 | [assembly: AssemblyCompany("")] | ||
12 | [assembly: AssemblyProduct("OGS-UserServer")] | ||
13 | [assembly: AssemblyCopyright("Copyright © 2007")] | ||
14 | [assembly: AssemblyTrademark("")] | ||
15 | [assembly: AssemblyCulture("")] | ||
16 | |||
17 | // Setting ComVisible to false makes the types in this assembly not visible | ||
18 | // to COM components. If you need to access a type in this assembly from | ||
19 | // COM, set the ComVisible attribute to true on that type. | ||
20 | [assembly: ComVisible(false)] | ||
21 | |||
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM | ||
23 | [assembly: Guid("e266513a-090b-4d38-80f6-8599eef68c8c")] | ||
24 | |||
25 | // Version information for an assembly consists of the following four values: | ||
26 | // | ||
27 | // Major Version | ||
28 | // Minor Version | ||
29 | // Build Number | ||
30 | // Revision | ||
31 | // | ||
32 | [assembly: AssemblyVersion("1.0.0.0")] | ||
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | ||
diff --git a/OpenGridServices/OpenGridServices.UserServer/UserManager.cs b/OpenGridServices/OpenGridServices.UserServer/UserManager.cs deleted file mode 100644 index 0704de1..0000000 --- a/OpenGridServices/OpenGridServices.UserServer/UserManager.cs +++ /dev/null | |||
@@ -1,103 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System; | ||
29 | using System.Collections; | ||
30 | using System.Collections.Generic; | ||
31 | using System.Text; | ||
32 | using OpenGrid.Framework.Data; | ||
33 | using libsecondlife; | ||
34 | using System.Reflection; | ||
35 | |||
36 | using System.Xml; | ||
37 | using Nwc.XmlRpc; | ||
38 | using OpenSim.Framework.Sims; | ||
39 | using OpenSim.Framework.Inventory; | ||
40 | using OpenSim.Framework.Utilities; | ||
41 | using OpenGrid.Framework.UserManagement; | ||
42 | |||
43 | using System.Security.Cryptography; | ||
44 | |||
45 | namespace OpenGridServices.UserServer | ||
46 | { | ||
47 | public class UserManager : UserManagerBase | ||
48 | { | ||
49 | public UserManager() | ||
50 | { | ||
51 | } | ||
52 | |||
53 | /// <summary> | ||
54 | /// Customises the login response and fills in missing values. | ||
55 | /// </summary> | ||
56 | /// <param name="response">The existing response</param> | ||
57 | /// <param name="theUser">The user profile</param> | ||
58 | public override void CustomiseResponse(ref LoginResponse response, ref UserProfileData theUser) | ||
59 | { | ||
60 | // Load information from the gridserver | ||
61 | SimProfile SimInfo = new SimProfile(); | ||
62 | SimInfo = SimInfo.LoadFromGrid(theUser.currentAgent.currentHandle, _config.GridServerURL, _config.GridSendKey, _config.GridRecvKey); | ||
63 | |||
64 | // Customise the response | ||
65 | // Home Location | ||
66 | response.Home = "{'region_handle':[r" + (SimInfo.RegionLocX * 256).ToString() + ",r" + (SimInfo.RegionLocY * 256).ToString() + "], " + | ||
67 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + | ||
68 | "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; | ||
69 | |||
70 | // Destination | ||
71 | response.SimAddress = SimInfo.sim_ip; | ||
72 | response.SimPort = (Int32)SimInfo.sim_port; | ||
73 | response.RegionX = SimInfo.RegionLocY ; | ||
74 | response.RegionY = SimInfo.RegionLocX ; | ||
75 | |||
76 | // Notify the target of an incoming user | ||
77 | Console.WriteLine("Notifying " + SimInfo.regionname + " (" + SimInfo.caps_url + ")"); | ||
78 | |||
79 | // Prepare notification | ||
80 | Hashtable SimParams = new Hashtable(); | ||
81 | SimParams["session_id"] = theUser.currentAgent.sessionID.ToString(); | ||
82 | SimParams["secure_session_id"] = theUser.currentAgent.secureSessionID.ToString(); | ||
83 | SimParams["firstname"] = theUser.username; | ||
84 | SimParams["lastname"] = theUser.surname; | ||
85 | SimParams["agent_id"] = theUser.UUID.ToString(); | ||
86 | SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response.CircuitCode); | ||
87 | SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString(); | ||
88 | SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString(); | ||
89 | SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString(); | ||
90 | SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString(); | ||
91 | ArrayList SendParams = new ArrayList(); | ||
92 | SendParams.Add(SimParams); | ||
93 | |||
94 | // Update agent with target sim | ||
95 | theUser.currentAgent.currentRegion = SimInfo.UUID; | ||
96 | theUser.currentAgent.currentHandle = SimInfo.regionhandle; | ||
97 | |||
98 | // Send | ||
99 | XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); | ||
100 | XmlRpcResponse GridResp = GridReq.Send(SimInfo.caps_url, 3000); | ||
101 | } | ||
102 | } | ||
103 | } | ||
diff --git a/OpenGridServices/OpenUser.Config/UserConfigDb4o/AssemblyInfo.cs b/OpenGridServices/OpenUser.Config/UserConfigDb4o/AssemblyInfo.cs deleted file mode 100644 index 25e0211..0000000 --- a/OpenGridServices/OpenUser.Config/UserConfigDb4o/AssemblyInfo.cs +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System.Reflection; | ||
29 | using System.Runtime.CompilerServices; | ||
30 | using System.Runtime.InteropServices; | ||
31 | |||
32 | // Information about this assembly is defined by the following | ||
33 | // attributes. | ||
34 | // | ||
35 | // change them to the information which is associated with the assembly | ||
36 | // you compile. | ||
37 | |||
38 | [assembly: AssemblyTitle("UserConfig")] | ||
39 | [assembly: AssemblyDescription("")] | ||
40 | [assembly: AssemblyConfiguration("")] | ||
41 | [assembly: AssemblyCompany("")] | ||
42 | [assembly: AssemblyProduct("UserConfig")] | ||
43 | [assembly: AssemblyCopyright("")] | ||
44 | [assembly: AssemblyTrademark("")] | ||
45 | [assembly: AssemblyCulture("")] | ||
46 | |||
47 | // This sets the default COM visibility of types in the assembly to invisible. | ||
48 | // If you need to expose a type to COM, use [ComVisible(true)] on that type. | ||
49 | [assembly: ComVisible(false)] | ||
50 | |||
51 | // The assembly version has following format : | ||
52 | // | ||
53 | // Major.Minor.Build.Revision | ||
54 | // | ||
55 | // You can specify all values by your own or you can build default build and revision | ||
56 | // numbers with the '*' character (the default): | ||
57 | |||
58 | [assembly: AssemblyVersion("1.0.*")] | ||
diff --git a/OpenGridServices/OpenUser.Config/UserConfigDb4o/DbUserConfig.cs b/OpenGridServices/OpenUser.Config/UserConfigDb4o/DbUserConfig.cs deleted file mode 100644 index 770a6b9..0000000 --- a/OpenGridServices/OpenUser.Config/UserConfigDb4o/DbUserConfig.cs +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using OpenSim.Framework.Console; | ||
31 | using OpenSim.Framework.Interfaces; | ||
32 | using Db4objects.Db4o; | ||
33 | |||
34 | namespace OpenUser.Config.UserConfigDb4o | ||
35 | { | ||
36 | public class Db4oConfigPlugin: IUserConfig | ||
37 | { | ||
38 | public UserConfig GetConfigObject() | ||
39 | { | ||
40 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Loading Db40Config dll"); | ||
41 | return ( new DbUserConfig()); | ||
42 | } | ||
43 | } | ||
44 | |||
45 | public class DbUserConfig : UserConfig | ||
46 | { | ||
47 | private IObjectContainer db; | ||
48 | |||
49 | public void LoadDefaults() { | ||
50 | OpenSim.Framework.Console.MainLog.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); | ||
51 | |||
52 | this.DefaultStartupMsg = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Default startup message", "Welcome to OGS"); | ||
53 | |||
54 | this.GridServerURL = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:8001/"); | ||
55 | this.GridSendKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to send to grid server","null"); | ||
56 | this.GridRecvKey = OpenSim.Framework.Console.MainLog.Instance.CmdPrompt("Key to expect from grid server","null"); | ||
57 | } | ||
58 | |||
59 | public override void InitConfig() { | ||
60 | try { | ||
61 | db = Db4oFactory.OpenFile("openuser.yap"); | ||
62 | IObjectSet result = db.Get(typeof(DbUserConfig)); | ||
63 | if(result.Count==1) { | ||
64 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Config.cs:InitConfig() - Found a UserConfig object in the local database, loading"); | ||
65 | foreach (DbUserConfig cfg in result) { | ||
66 | this.GridServerURL=cfg.GridServerURL; | ||
67 | this.GridSendKey=cfg.GridSendKey; | ||
68 | this.GridRecvKey=cfg.GridRecvKey; | ||
69 | this.DefaultStartupMsg=cfg.DefaultStartupMsg; | ||
70 | } | ||
71 | } else { | ||
72 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); | ||
73 | LoadDefaults(); | ||
74 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Writing out default settings to local database"); | ||
75 | db.Set(this); | ||
76 | db.Close(); | ||
77 | } | ||
78 | } catch(Exception e) { | ||
79 | OpenSim.Framework.Console.MainLog.Instance.Warn("Config.cs:InitConfig() - Exception occured"); | ||
80 | OpenSim.Framework.Console.MainLog.Instance.Warn(e.ToString()); | ||
81 | } | ||
82 | |||
83 | OpenSim.Framework.Console.MainLog.Instance.Verbose("User settings loaded:"); | ||
84 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Default startup message: " + this.DefaultStartupMsg); | ||
85 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Grid server URL: " + this.GridServerURL); | ||
86 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to send to grid: " + this.GridSendKey); | ||
87 | OpenSim.Framework.Console.MainLog.Instance.Verbose("Key to expect from grid: " + this.GridRecvKey); | ||
88 | } | ||
89 | |||
90 | |||
91 | public void Shutdown() { | ||
92 | db.Close(); | ||
93 | } | ||
94 | } | ||
95 | |||
96 | } | ||
diff --git a/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj b/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj deleted file mode 100644 index a89a38d..0000000 --- a/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj +++ /dev/null | |||
@@ -1,107 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{7E494328-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenUser.Config.UserConfigDb4o</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Library</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenUser.Config.UserConfigDb4o</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>False</Optimize> | ||
35 | <OutputPath>..\..\..\bin\</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>True</Optimize> | ||
53 | <OutputPath>..\..\..\bin\</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="Db4objects.Db4o.dll" > | ||
62 | <HintPath>..\..\..\bin\Db4objects.Db4o.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="libsecondlife.dll" > | ||
66 | <HintPath>..\..\..\bin\libsecondlife.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="OpenSim.Framework" > | ||
70 | <HintPath>OpenSim.Framework.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | <Reference Include="OpenSim.Framework.Console" > | ||
74 | <HintPath>OpenSim.Framework.Console.dll</HintPath> | ||
75 | <Private>False</Private> | ||
76 | </Reference> | ||
77 | <Reference Include="System" > | ||
78 | <HintPath>System.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | <Reference Include="System.Data.dll" > | ||
82 | <HintPath>..\..\..\bin\System.Data.dll</HintPath> | ||
83 | <Private>False</Private> | ||
84 | </Reference> | ||
85 | <Reference Include="System.Xml" > | ||
86 | <HintPath>System.Xml.dll</HintPath> | ||
87 | <Private>False</Private> | ||
88 | </Reference> | ||
89 | </ItemGroup> | ||
90 | <ItemGroup> | ||
91 | </ItemGroup> | ||
92 | <ItemGroup> | ||
93 | <Compile Include="AssemblyInfo.cs"> | ||
94 | <SubType>Code</SubType> | ||
95 | </Compile> | ||
96 | <Compile Include="DbUserConfig.cs"> | ||
97 | <SubType>Code</SubType> | ||
98 | </Compile> | ||
99 | </ItemGroup> | ||
100 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
101 | <PropertyGroup> | ||
102 | <PreBuildEvent> | ||
103 | </PreBuildEvent> | ||
104 | <PostBuildEvent> | ||
105 | </PostBuildEvent> | ||
106 | </PropertyGroup> | ||
107 | </Project> | ||
diff --git a/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build b/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build deleted file mode 100644 index bd5d49f..0000000 --- a/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | <?xml version="1.0" ?> | ||
2 | <project name="OpenUser.Config.UserConfigDb4o" default="build"> | ||
3 | <target name="build"> | ||
4 | <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> | ||
5 | <mkdir dir="${project::get-base-directory()}/${build.dir}" /> | ||
6 | <copy todir="${project::get-base-directory()}/${build.dir}"> | ||
7 | <fileset basedir="${project::get-base-directory()}"> | ||
8 | </fileset> | ||
9 | </copy> | ||
10 | <csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll"> | ||
11 | <resources prefix="OpenUser.Config.UserConfigDb4o" dynamicprefix="true" > | ||
12 | </resources> | ||
13 | <sources failonempty="true"> | ||
14 | <include name="AssemblyInfo.cs" /> | ||
15 | <include name="DbUserConfig.cs" /> | ||
16 | </sources> | ||
17 | <references basedir="${project::get-base-directory()}"> | ||
18 | <lib> | ||
19 | <include name="${project::get-base-directory()}" /> | ||
20 | <include name="${project::get-base-directory()}/${build.dir}" /> | ||
21 | </lib> | ||
22 | <include name="../../../bin/Db4objects.Db4o.dll" /> | ||
23 | <include name="../../../bin/libsecondlife.dll" /> | ||
24 | <include name="../../../bin/OpenSim.Framework.dll" /> | ||
25 | <include name="../../../bin/OpenSim.Framework.Console.dll" /> | ||
26 | <include name="System.dll" /> | ||
27 | <include name="System.Data.dll.dll" /> | ||
28 | <include name="System.Xml.dll" /> | ||
29 | </references> | ||
30 | </csc> | ||
31 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" /> | ||
32 | <mkdir dir="${project::get-base-directory()}/../../../bin/"/> | ||
33 | <copy todir="${project::get-base-directory()}/../../../bin/"> | ||
34 | <fileset basedir="${project::get-base-directory()}/${build.dir}/" > | ||
35 | <include name="*.dll"/> | ||
36 | <include name="*.exe"/> | ||
37 | </fileset> | ||
38 | </copy> | ||
39 | </target> | ||
40 | <target name="clean"> | ||
41 | <delete dir="${bin.dir}" failonerror="false" /> | ||
42 | <delete dir="${obj.dir}" failonerror="false" /> | ||
43 | </target> | ||
44 | <target name="doc" description="Creates documentation."> | ||
45 | </target> | ||
46 | </project> | ||