aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenGridServices/OpenGrid.Config/GridConfigDb4o/AssemblyInfo.cs58
-rw-r--r--OpenGridServices/OpenGrid.Config/GridConfigDb4o/DbGridConfig.cs161
-rw-r--r--OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.csproj107
-rw-r--r--OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.csproj.user12
-rw-r--r--OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build46
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs161
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oManager.cs165
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs205
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj225
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.mine111
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r858111
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r921111
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.user12
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build47
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.DB4o/Properties/AssemblyInfo.cs35
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs190
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs214
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.csproj104
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.csproj.user12
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.dll.build45
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MSSQL/Properties/AssemblyInfo.cs35
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs258
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLInventoryData.cs309
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLLogData.cs107
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs581
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLUserData.cs257
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj237
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj.mine117
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj.r858114
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj.r921117
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj.user12
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build49
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.MySQL/Properties/AssemblyInfo.cs35
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj219
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj.mine108
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj.r858108
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj.r921108
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj.user12
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.dll.build46
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.SQLite/Properties/AssemblyInfo.cs35
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteGridData.cs190
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs209
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/GridData.cs110
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/ILogData.cs94
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/IniConfig.cs100
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/InventoryData.cs187
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj229
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.mine113
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r858110
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r921113
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.user12
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build49
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs35
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/SimProfileData.cs114
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/UserData.cs131
-rw-r--r--OpenGridServices/OpenGrid.Framework.Data/UserProfileData.cs182
-rw-r--r--OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs140
-rw-r--r--OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs94
-rw-r--r--OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj99
-rw-r--r--OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj.user12
-rw-r--r--OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build44
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs130
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/Main.cs338
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj247
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.mine122
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.r858122
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.r921122
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.user12
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build50
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.csproj126
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.exe.build49
-rw-r--r--OpenGridServices/OpenGridServices.AssetServer/Properties/AssemblyInfo.cs33
-rw-r--r--OpenGridServices/OpenGridServices.GridServer/GridManager.cs575
-rw-r--r--OpenGridServices/OpenGridServices.GridServer/Main.cs271
-rw-r--r--OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.csproj134
-rw-r--r--OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.csproj.user12
-rw-r--r--OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build52
-rw-r--r--OpenGridServices/OpenGridServices.GridServer/Properties/AssemblyInfo.cs33
-rw-r--r--OpenGridServices/OpenGridServices.InventoryServer/InventoryManager.cs125
-rw-r--r--OpenGridServices/OpenGridServices.InventoryServer/Main.cs87
-rw-r--r--OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj125
-rw-r--r--OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.exe.build50
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.mds16
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.userprefs39
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.usertasks2
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/AssemblyInfo.cs32
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/BlockingQueue.cs33
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Connect to grid server.cs16
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs29
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs106
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Main.cs96
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/MainWindow.cs76
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.mdp43
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.pidbbin0 -> 12308 bytes
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs37
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Util.cs133
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs226
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs256
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/generated.cs35
-rw-r--r--OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/gui.stetic502
-rw-r--r--OpenGridServices/OpenGridServices.UserServer/Main.cs216
-rw-r--r--OpenGridServices/OpenGridServices.UserServer/OGS-UserServer.csproj63
-rw-r--r--OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj128
-rw-r--r--OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj.user12
-rw-r--r--OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build51
-rw-r--r--OpenGridServices/OpenGridServices.UserServer/Properties/AssemblyInfo.cs33
-rw-r--r--OpenGridServices/OpenGridServices.UserServer/UserManager.cs659
-rw-r--r--OpenGridServices/OpenUser.Config/UserConfigDb4o/AssemblyInfo.cs58
-rw-r--r--OpenGridServices/OpenUser.Config/UserConfigDb4o/DbUserConfig.cs96
-rw-r--r--OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj107
-rw-r--r--OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj.user12
-rw-r--r--OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build46
-rw-r--r--OpenGridServices/ServiceManager/ServiceManager.cs259
-rw-r--r--OpenGridServices/ServiceManager/ServiceManager.csproj205
-rw-r--r--OpenGridServices/ServiceManager/ServiceManager.csproj.mine103
-rw-r--r--OpenGridServices/ServiceManager/ServiceManager.csproj.r85896
-rw-r--r--OpenGridServices/ServiceManager/ServiceManager.csproj.r921100
-rw-r--r--OpenGridServices/ServiceManager/ServiceManager.csproj.user12
-rw-r--r--OpenGridServices/ServiceManager/ServiceManager.exe.build44
119 files changed, 14155 insertions, 0 deletions
diff --git a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Config/GridConfigDb4o/AssemblyInfo.cs
new file mode 100644
index 0000000..c9701d6
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Config/GridConfigDb4o/AssemblyInfo.cs
@@ -0,0 +1,58 @@
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*/
28using System.Reflection;
29using System.Runtime.CompilerServices;
30using 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
new file mode 100644
index 0000000..e69515a
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Config/GridConfigDb4o/DbGridConfig.cs
@@ -0,0 +1,161 @@
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*/
28using System;
29using System.Collections.Generic;
30using OpenSim.Framework.Console;
31using OpenSim.Framework.Interfaces;
32using Db4objects.Db4o;
33
34namespace 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.MainConsole.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.MainConsole.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.MainConsole.Instance.CmdPrompt("Grid owner", "OGS development team");
70
71 // Asset Options
72 this.DefaultAssetServer = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default asset server","http://127.0.0.1:8003/");
73 this.AssetSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to asset server","null");
74 this.AssetRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from asset server","null");
75
76 // User Server Options
77 this.DefaultUserServer = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default user server","http://127.0.0.1:8002/");
78 this.UserSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to user server","null");
79 this.UserRecvKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to expect from user server","null");
80
81 // Region Server Options
82 this.SimSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to sims","null");
83 this.SimRecvKey = OpenSim.Framework.Console.MainConsole.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.MainConsole.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.MainConsole.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.MainConsole.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.MainConsole.Instance.Warn("Config.cs:InitConfig() - Exception occured");
131 OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString());
132 }
133
134 // Grid Settings
135 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Grid settings loaded:");
136 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Grid owner: " + this.GridOwner);
137
138 // Asset Settings
139 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Default asset server: " + this.DefaultAssetServer);
140 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Key to send to asset server: " + this.AssetSendKey);
141 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Key to expect from asset server: " + this.AssetRecvKey);
142
143 // User Settings
144 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Default user server: " + this.DefaultUserServer);
145 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Key to send to user server: " + this.UserSendKey);
146 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Key to expect from user server: " + this.UserRecvKey);
147
148 // Region Settings
149 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Key to send to sims: " + this.SimSendKey);
150 OpenSim.Framework.Console.MainConsole.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
new file mode 100644
index 0000000..744e1e8
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.csproj
@@ -0,0 +1,107 @@
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="System" >
62 <HintPath>System.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="System.Data.dll" >
66 <HintPath>..\..\..\bin\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 <Reference Include="OpenSim.Framework" >
82 <HintPath>OpenSim.Framework.dll</HintPath>
83 <Private>False</Private>
84 </Reference>
85 <Reference Include="OpenSim.Framework.Console" >
86 <HintPath>OpenSim.Framework.Console.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.csproj.user b/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.csproj.user
new file mode 100644
index 0000000..1b6b14d
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.csproj.user
@@ -0,0 +1,12 @@
1<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5 <ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
6 <LastOpenVersion>8.0.50727</LastOpenVersion>
7 <ProjectView>ProjectFiles</ProjectView>
8 <ProjectTrust>0</ProjectTrust>
9 </PropertyGroup>
10 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
11 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
12</Project>
diff --git a/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build b/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build
new file mode 100644
index 0000000..cbc8479
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Config/GridConfigDb4o/OpenGrid.Config.GridConfigDb4o.dll.build
@@ -0,0 +1,46 @@
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="System.dll" />
23 <include name="System.Data.dll.dll" />
24 <include name="System.Xml.dll" />
25 <include name="../../../bin/libsecondlife.dll" />
26 <include name="../../../bin/Db4objects.Db4o.dll" />
27 <include name="../../../bin/OpenSim.Framework.dll" />
28 <include name="../../../bin/OpenSim.Framework.Console.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.DB4o/DB4oGridData.cs b/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs
new file mode 100644
index 0000000..2b23131
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oGridData.cs
@@ -0,0 +1,161 @@
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
29using System;
30using System.Collections.Generic;
31using System.Text;
32using OpenGrid.Framework.Data;
33using libsecondlife;
34
35
36namespace OpenGrid.Framework.Data.DB4o
37{
38 /// <summary>
39 /// A grid server storage mechanism employing the DB4o database system
40 /// </summary>
41 class DB4oGridData : IGridData
42 {
43 /// <summary>
44 /// The database manager object
45 /// </summary>
46 DB4oGridManager manager;
47
48 /// <summary>
49 /// Called when the plugin is first loaded (as constructors are not called)
50 /// </summary>
51 public void Initialise() {
52 manager = new DB4oGridManager("gridserver.yap");
53 }
54
55 /// <summary>
56 /// Returns a list of regions within the specified ranges
57 /// </summary>
58 /// <param name="a">minimum X coordinate</param>
59 /// <param name="b">minimum Y coordinate</param>
60 /// <param name="c">maximum X coordinate</param>
61 /// <param name="d">maximum Y coordinate</param>
62 /// <returns>An array of region profiles</returns>
63 public SimProfileData[] GetProfilesInRange(uint a, uint b, uint c, uint d)
64 {
65 return null;
66 }
67
68 /// <summary>
69 /// Returns a region located at the specified regionHandle (warning multiple regions may occupy the one spot, first found is returned)
70 /// </summary>
71 /// <param name="handle">The handle to search for</param>
72 /// <returns>A region profile</returns>
73 public SimProfileData GetProfileByHandle(ulong handle) {
74 lock (manager.simProfiles)
75 {
76 foreach (LLUUID UUID in manager.simProfiles.Keys)
77 {
78 if (manager.simProfiles[UUID].regionHandle == handle)
79 {
80 return manager.simProfiles[UUID];
81 }
82 }
83 }
84 throw new Exception("Unable to find profile with handle (" + handle.ToString() + ")");
85 }
86
87 /// <summary>
88 /// Returns a specific region
89 /// </summary>
90 /// <param name="uuid">The region ID code</param>
91 /// <returns>A region profile</returns>
92 public SimProfileData GetProfileByLLUUID(LLUUID uuid)
93 {
94 lock (manager.simProfiles)
95 {
96 if (manager.simProfiles.ContainsKey(uuid))
97 return manager.simProfiles[uuid];
98 }
99 throw new Exception("Unable to find profile with UUID (" + uuid.ToStringHyphenated() + ")");
100 }
101
102 /// <summary>
103 /// Adds a new specified region to the database
104 /// </summary>
105 /// <param name="profile">The profile to add</param>
106 /// <returns>A dataresponse enum indicating success</returns>
107 public DataResponse AddProfile(SimProfileData profile)
108 {
109 lock (manager.simProfiles)
110 {
111 if (manager.AddRow(profile))
112 {
113 return DataResponse.RESPONSE_OK;
114 }
115 else
116 {
117 return DataResponse.RESPONSE_ERROR;
118 }
119 }
120 }
121
122 /// <summary>
123 /// Authenticates a new region using the shared secrets. NOT SECURE.
124 /// </summary>
125 /// <param name="uuid">The UUID the region is authenticating with</param>
126 /// <param name="handle">The location the region is logging into (unused in Db4o)</param>
127 /// <param name="key">The shared secret</param>
128 /// <returns>Authenticated?</returns>
129 public bool AuthenticateSim(LLUUID uuid, ulong handle, string key) {
130 if (manager.simProfiles[uuid].regionRecvKey == key)
131 return true;
132 return false;
133 }
134
135 /// <summary>
136 /// Shuts down the database
137 /// </summary>
138 public void Close()
139 {
140 manager = null;
141 }
142
143 /// <summary>
144 /// Returns the providers name
145 /// </summary>
146 /// <returns>The name of the storage system</returns>
147 public string getName()
148 {
149 return "DB4o Grid Provider";
150 }
151
152 /// <summary>
153 /// Returns the providers version
154 /// </summary>
155 /// <returns>The version of the storage system</returns>
156 public string getVersion()
157 {
158 return "0.1";
159 }
160 }
161}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oManager.cs b/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oManager.cs
new file mode 100644
index 0000000..356a49c
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oManager.cs
@@ -0,0 +1,165 @@
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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using Db4objects.Db4o;
32using OpenGrid.Framework.Data;
33using libsecondlife;
34
35namespace OpenGrid.Framework.Data.DB4o
36{
37 /// <summary>
38 /// A Database manager for Db4o
39 /// </summary>
40 class DB4oGridManager
41 {
42 /// <summary>
43 /// A list of the current regions connected (in-memory cache)
44 /// </summary>
45 public Dictionary<LLUUID, SimProfileData> simProfiles = new Dictionary<LLUUID, SimProfileData>();
46 /// <summary>
47 /// Database File Name
48 /// </summary>
49 string dbfl;
50
51 /// <summary>
52 /// Creates a new grid storage manager
53 /// </summary>
54 /// <param name="db4odb">Filename to the database file</param>
55 public DB4oGridManager(string db4odb)
56 {
57 dbfl = db4odb;
58 IObjectContainer database;
59 database = Db4oFactory.OpenFile(dbfl);
60 IObjectSet result = database.Get(typeof(SimProfileData));
61 // Loads the file into the in-memory cache
62 foreach(SimProfileData row in result) {
63 simProfiles.Add(row.UUID, row);
64 }
65 database.Close();
66 }
67
68 /// <summary>
69 /// Adds a new profile to the database (Warning: Probably slow.)
70 /// </summary>
71 /// <param name="row">The profile to add</param>
72 /// <returns>Successful?</returns>
73 public bool AddRow(SimProfileData row)
74 {
75 if (simProfiles.ContainsKey(row.UUID))
76 {
77 simProfiles[row.UUID] = row;
78 }
79 else
80 {
81 simProfiles.Add(row.UUID, row);
82 }
83
84 try
85 {
86 IObjectContainer database;
87 database = Db4oFactory.OpenFile(dbfl);
88 database.Set(row);
89 database.Close();
90 return true;
91 }
92 catch (Exception e)
93 {
94 return false;
95 }
96 }
97
98
99 }
100
101 /// <summary>
102 /// A manager for the DB4o database (user profiles)
103 /// </summary>
104 class DB4oUserManager
105 {
106 /// <summary>
107 /// A list of the user profiles (in memory cache)
108 /// </summary>
109 public Dictionary<LLUUID, UserProfileData> userProfiles = new Dictionary<LLUUID, UserProfileData>();
110 /// <summary>
111 /// Database filename
112 /// </summary>
113 string dbfl;
114
115 /// <summary>
116 /// Initialises a new DB manager
117 /// </summary>
118 /// <param name="db4odb">The filename to the database</param>
119 public DB4oUserManager(string db4odb)
120 {
121 dbfl = db4odb;
122 IObjectContainer database;
123 database = Db4oFactory.OpenFile(dbfl);
124 // Load to cache
125 IObjectSet result = database.Get(typeof(UserProfileData));
126 foreach (UserProfileData row in result)
127 {
128 userProfiles.Add(row.UUID, row);
129 }
130 database.Close();
131 }
132
133 /// <summary>
134 /// Adds a new profile to the database (Warning: Probably slow.)
135 /// </summary>
136 /// <param name="row">The profile to add</param>
137 /// <returns>Successful?</returns>
138 public bool AddRow(UserProfileData row)
139 {
140 if (userProfiles.ContainsKey(row.UUID))
141 {
142 userProfiles[row.UUID] = row;
143 }
144 else
145 {
146 userProfiles.Add(row.UUID, row);
147 }
148
149 try
150 {
151 IObjectContainer database;
152 database = Db4oFactory.OpenFile(dbfl);
153 database.Set(row);
154 database.Close();
155 return true;
156 }
157 catch (Exception e)
158 {
159 return false;
160 }
161 }
162
163
164 }
165}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs b/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs
new file mode 100644
index 0000000..315f48d
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.DB4o/DB4oUserData.cs
@@ -0,0 +1,205 @@
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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using OpenGrid.Framework.Data;
32using libsecondlife;
33
34namespace OpenGrid.Framework.Data.DB4o
35{
36 /// <summary>
37 /// A User storage interface for the DB4o database system
38 /// </summary>
39 public class DB4oUserData : IUserData
40 {
41 /// <summary>
42 /// The database manager
43 /// </summary>
44 DB4oUserManager manager;
45
46 /// <summary>
47 /// Artificial constructor called upon plugin load
48 /// </summary>
49 public void Initialise()
50 {
51 manager = new DB4oUserManager("userprofiles.yap");
52 }
53
54 /// <summary>
55 /// Loads a specified user profile from a UUID
56 /// </summary>
57 /// <param name="uuid">The users UUID</param>
58 /// <returns>A user profile</returns>
59 public UserProfileData getUserByUUID(LLUUID uuid)
60 {
61 if(manager.userProfiles.ContainsKey(uuid))
62 return manager.userProfiles[uuid];
63 return null;
64 }
65
66 /// <summary>
67 /// Returns a user by searching for its name
68 /// </summary>
69 /// <param name="name">The users account name</param>
70 /// <returns>A matching users profile</returns>
71 public UserProfileData getUserByName(string name)
72 {
73 return getUserByName(name.Split(' ')[0], name.Split(' ')[1]);
74 }
75
76 /// <summary>
77 /// Returns a user by searching for its name
78 /// </summary>
79 /// <param name="fname">The first part of the users account name</param>
80 /// <param name="lname">The second part of the users account name</param>
81 /// <returns>A matching users profile</returns>
82 public UserProfileData getUserByName(string fname, string lname)
83 {
84 foreach (UserProfileData profile in manager.userProfiles.Values)
85 {
86 if (profile.username == fname && profile.surname == lname)
87 return profile;
88 }
89 return null;
90 }
91
92 /// <summary>
93 /// Returns a user by UUID direct
94 /// </summary>
95 /// <param name="uuid">The users account ID</param>
96 /// <returns>A matching users profile</returns>
97 public UserAgentData getAgentByUUID(LLUUID uuid)
98 {
99 try
100 {
101 return getUserByUUID(uuid).currentAgent;
102 }
103 catch (Exception e)
104 {
105 return null;
106 }
107 }
108
109 /// <summary>
110 /// Returns a session by account name
111 /// </summary>
112 /// <param name="name">The account name</param>
113 /// <returns>The users session agent</returns>
114 public UserAgentData getAgentByName(string name)
115 {
116 return getAgentByName(name.Split(' ')[0], name.Split(' ')[1]);
117 }
118
119 /// <summary>
120 /// Returns a session by account name
121 /// </summary>
122 /// <param name="fname">The first part of the users account name</param>
123 /// <param name="lname">The second part of the users account name</param>
124 /// <returns>A user agent</returns>
125 public UserAgentData getAgentByName(string fname, string lname)
126 {
127 try
128 {
129 return getUserByName(fname,lname).currentAgent;
130 }
131 catch (Exception e)
132 {
133 return null;
134 }
135 }
136
137 /// <summary>
138 /// Creates a new user profile
139 /// </summary>
140 /// <param name="user">The profile to add to the database</param>
141 public void addNewUserProfile(UserProfileData user)
142 {
143 try
144 {
145 manager.AddRow(user);
146 }
147 catch (Exception e)
148 {
149 Console.WriteLine(e.ToString());
150 }
151 }
152
153 /// <summary>
154 /// Creates a new user agent
155 /// </summary>
156 /// <param name="agent">The agent to add to the database</param>
157 public void addNewUserAgent(UserAgentData agent)
158 {
159 // Do nothing. yet.
160 }
161
162 /// <summary>
163 /// Transfers money between two user accounts
164 /// </summary>
165 /// <param name="from">Starting account</param>
166 /// <param name="to">End account</param>
167 /// <param name="amount">The amount to move</param>
168 /// <returns>Success?</returns>
169 public bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount)
170 {
171 return true;
172 }
173
174 /// <summary>
175 /// Transfers inventory between two accounts
176 /// </summary>
177 /// <remarks>Move to inventory server</remarks>
178 /// <param name="from">Senders account</param>
179 /// <param name="to">Recievers account</param>
180 /// <param name="item">Inventory item</param>
181 /// <returns>Success?</returns>
182 public bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item)
183 {
184 return true;
185 }
186
187 /// <summary>
188 /// Returns the name of the storage provider
189 /// </summary>
190 /// <returns>Storage provider name</returns>
191 public string getName()
192 {
193 return "DB4o Userdata";
194 }
195
196 /// <summary>
197 /// Returns the version of the storage provider
198 /// </summary>
199 /// <returns>Storage provider version</returns>
200 public string getVersion()
201 {
202 return "0.1";
203 }
204 }
205}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj
new file mode 100644
index 0000000..6ced216
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj
@@ -0,0 +1,225 @@
1<<<<<<< .mine
2<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <PropertyGroup>
4 <ProjectType>Local</ProjectType>
5 <ProductVersion>8.0.50727</ProductVersion>
6 <SchemaVersion>2.0</SchemaVersion>
7 <ProjectGuid>{39BD9497-0000-0000-0000-000000000000}</ProjectGuid>
8 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
9 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
10 <ApplicationIcon></ApplicationIcon>
11 <AssemblyKeyContainerName>
12 </AssemblyKeyContainerName>
13 <AssemblyName>OpenGrid.Framework.Data.DB4o</AssemblyName>
14 <DefaultClientScript>JScript</DefaultClientScript>
15 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
16 <DefaultTargetSchema>IE50</DefaultTargetSchema>
17 <DelaySign>false</DelaySign>
18 <OutputType>Library</OutputType>
19 <AppDesignerFolder></AppDesignerFolder>
20 <RootNamespace>OpenGrid.Framework.Data.DB4o</RootNamespace>
21 <StartupObject></StartupObject>
22 <FileUpgradeFlags>
23 </FileUpgradeFlags>
24 </PropertyGroup>
25 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
26 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
27 <BaseAddress>285212672</BaseAddress>
28 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
29 <ConfigurationOverrideFile>
30 </ConfigurationOverrideFile>
31 <DefineConstants>TRACE;DEBUG</DefineConstants>
32 <DocumentationFile></DocumentationFile>
33 <DebugSymbols>True</DebugSymbols>
34 <FileAlignment>4096</FileAlignment>
35 <Optimize>False</Optimize>
36 <OutputPath>..\..\bin\</OutputPath>
37 <RegisterForComInterop>False</RegisterForComInterop>
38 <RemoveIntegerChecks>False</RemoveIntegerChecks>
39 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
40 <WarningLevel>4</WarningLevel>
41 <NoWarn></NoWarn>
42 </PropertyGroup>
43 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
44 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
45 <BaseAddress>285212672</BaseAddress>
46 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
47 <ConfigurationOverrideFile>
48 </ConfigurationOverrideFile>
49 <DefineConstants>TRACE</DefineConstants>
50 <DocumentationFile></DocumentationFile>
51 <DebugSymbols>False</DebugSymbols>
52 <FileAlignment>4096</FileAlignment>
53 <Optimize>True</Optimize>
54 <OutputPath>..\..\bin\</OutputPath>
55 <RegisterForComInterop>False</RegisterForComInterop>
56 <RemoveIntegerChecks>False</RemoveIntegerChecks>
57 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
58 <WarningLevel>4</WarningLevel>
59 <NoWarn></NoWarn>
60 </PropertyGroup>
61 <ItemGroup>
62 <Reference Include="System" >
63 <HintPath>System.dll</HintPath>
64 <Private>False</Private>
65 </Reference>
66 <Reference Include="System.Xml" >
67 <HintPath>System.Xml.dll</HintPath>
68 <Private>False</Private>
69 </Reference>
70 <Reference Include="System.Data" >
71 <HintPath>System.Data.dll</HintPath>
72 <Private>False</Private>
73 </Reference>
74 <Reference Include="libsecondlife.dll" >
75 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
76 <Private>False</Private>
77 </Reference>
78 <Reference Include="Db4objects.Db4o.dll" >
79 <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath>
80 <Private>False</Private>
81 </Reference>
82 </ItemGroup>
83 <ItemGroup>
84 <ProjectReference Include="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj">
85 <Name>OpenGrid.Framework.Data</Name>
86 <Project>{62CDF671-0000-0000-0000-000000000000}</Project>
87 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
88 <Private>False</Private>
89 </ProjectReference>
90 </ItemGroup>
91 <ItemGroup>
92 <Compile Include="DB4oGridData.cs">
93 <SubType>Code</SubType>
94 </Compile>
95 <Compile Include="DB4oManager.cs">
96 <SubType>Code</SubType>
97 </Compile>
98 <Compile Include="DB4oUserData.cs">
99 <SubType>Code</SubType>
100 </Compile>
101 <Compile Include="Properties\AssemblyInfo.cs">
102 <SubType>Code</SubType>
103 </Compile>
104 </ItemGroup>
105 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
106 <PropertyGroup>
107 <PreBuildEvent>
108 </PreBuildEvent>
109 <PostBuildEvent>
110 </PostBuildEvent>
111 </PropertyGroup>
112</Project>
113=======
114<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
115 <PropertyGroup>
116 <ProjectType>Local</ProjectType>
117 <ProductVersion>8.0.50727</ProductVersion>
118 <SchemaVersion>2.0</SchemaVersion>
119 <ProjectGuid>{39BD9497-0000-0000-0000-000000000000}</ProjectGuid>
120 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
121 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
122 <ApplicationIcon></ApplicationIcon>
123 <AssemblyKeyContainerName>
124 </AssemblyKeyContainerName>
125 <AssemblyName>OpenGrid.Framework.Data.DB4o</AssemblyName>
126 <DefaultClientScript>JScript</DefaultClientScript>
127 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
128 <DefaultTargetSchema>IE50</DefaultTargetSchema>
129 <DelaySign>false</DelaySign>
130 <OutputType>Library</OutputType>
131 <AppDesignerFolder></AppDesignerFolder>
132 <RootNamespace>OpenGrid.Framework.Data.DB4o</RootNamespace>
133 <StartupObject></StartupObject>
134 <FileUpgradeFlags>
135 </FileUpgradeFlags>
136 </PropertyGroup>
137 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
138 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
139 <BaseAddress>285212672</BaseAddress>
140 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
141 <ConfigurationOverrideFile>
142 </ConfigurationOverrideFile>
143 <DefineConstants>TRACE;DEBUG</DefineConstants>
144 <DocumentationFile></DocumentationFile>
145 <DebugSymbols>True</DebugSymbols>
146 <FileAlignment>4096</FileAlignment>
147 <Optimize>False</Optimize>
148 <OutputPath>..\..\bin\</OutputPath>
149 <RegisterForComInterop>False</RegisterForComInterop>
150 <RemoveIntegerChecks>False</RemoveIntegerChecks>
151 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
152 <WarningLevel>4</WarningLevel>
153 <NoWarn></NoWarn>
154 </PropertyGroup>
155 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
156 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
157 <BaseAddress>285212672</BaseAddress>
158 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
159 <ConfigurationOverrideFile>
160 </ConfigurationOverrideFile>
161 <DefineConstants>TRACE</DefineConstants>
162 <DocumentationFile></DocumentationFile>
163 <DebugSymbols>False</DebugSymbols>
164 <FileAlignment>4096</FileAlignment>
165 <Optimize>True</Optimize>
166 <OutputPath>..\..\bin\</OutputPath>
167 <RegisterForComInterop>False</RegisterForComInterop>
168 <RemoveIntegerChecks>False</RemoveIntegerChecks>
169 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
170 <WarningLevel>4</WarningLevel>
171 <NoWarn></NoWarn>
172 </PropertyGroup>
173 <ItemGroup>
174 <Reference Include="System" >
175 <HintPath>System.dll</HintPath>
176 <Private>False</Private>
177 </Reference>
178 <Reference Include="System.Xml" >
179 <HintPath>System.Xml.dll</HintPath>
180 <Private>False</Private>
181 </Reference>
182 <Reference Include="System.Data" >
183 <HintPath>System.Data.dll</HintPath>
184 <Private>False</Private>
185 </Reference>
186 <Reference Include="libsecondlife.dll" >
187 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
188 <Private>False</Private>
189 </Reference>
190 <Reference Include="Db4objects.Db4o.dll" >
191 <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath>
192 <Private>False</Private>
193 </Reference>
194 </ItemGroup>
195 <ItemGroup>
196 <ProjectReference Include="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj">
197 <Name>OpenGrid.Framework.Data</Name>
198 <Project>{62CDF671-0000-0000-0000-000000000000}</Project>
199 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
200 <Private>False</Private>
201 </ProjectReference>
202 </ItemGroup>
203 <ItemGroup>
204 <Compile Include="DB4oUserData.cs">
205 <SubType>Code</SubType>
206 </Compile>
207 <Compile Include="DB4oManager.cs">
208 <SubType>Code</SubType>
209 </Compile>
210 <Compile Include="DB4oGridData.cs">
211 <SubType>Code</SubType>
212 </Compile>
213 <Compile Include="Properties\AssemblyInfo.cs">
214 <SubType>Code</SubType>
215 </Compile>
216 </ItemGroup>
217 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
218 <PropertyGroup>
219 <PreBuildEvent>
220 </PreBuildEvent>
221 <PostBuildEvent>
222 </PostBuildEvent>
223 </PropertyGroup>
224</Project>
225>>>>>>> .r921
diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.mine b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.mine
new file mode 100644
index 0000000..82d4f5f
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.mine
@@ -0,0 +1,111 @@
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>{39BD9497-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.DB4o</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.DB4o</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="Db4objects.Db4o.dll" >
78 <HintPath>..\..\bin\Db4objects.Db4o.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="DB4oGridData.cs">
92 <SubType>Code</SubType>
93 </Compile>
94 <Compile Include="DB4oManager.cs">
95 <SubType>Code</SubType>
96 </Compile>
97 <Compile Include="DB4oUserData.cs">
98 <SubType>Code</SubType>
99 </Compile>
100 <Compile Include="Properties\AssemblyInfo.cs">
101 <SubType>Code</SubType>
102 </Compile>
103 </ItemGroup>
104 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
105 <PropertyGroup>
106 <PreBuildEvent>
107 </PreBuildEvent>
108 <PostBuildEvent>
109 </PostBuildEvent>
110 </PropertyGroup>
111</Project>
diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r858 b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r858
new file mode 100644
index 0000000..d6dd03d
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r858
@@ -0,0 +1,111 @@
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>{BC0F052F-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.DB4o</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.DB4o</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="Db4objects.Db4o.dll" >
78 <HintPath>..\..\bin\Db4objects.Db4o.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="DB4oGridData.cs">
92 <SubType>Code</SubType>
93 </Compile>
94 <Compile Include="DB4oManager.cs">
95 <SubType>Code</SubType>
96 </Compile>
97 <Compile Include="DB4oUserData.cs">
98 <SubType>Code</SubType>
99 </Compile>
100 <Compile Include="Properties/AssemblyInfo.cs">
101 <SubType>Code</SubType>
102 </Compile>
103 </ItemGroup>
104 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
105 <PropertyGroup>
106 <PreBuildEvent>
107 </PreBuildEvent>
108 <PostBuildEvent>
109 </PostBuildEvent>
110 </PropertyGroup>
111</Project>
diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r921 b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r921
new file mode 100644
index 0000000..3b783ca
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.r921
@@ -0,0 +1,111 @@
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>{39BD9497-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.DB4o</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.DB4o</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="Db4objects.Db4o.dll" >
78 <HintPath>..\..\bin\Db4objects.Db4o.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="DB4oUserData.cs">
92 <SubType>Code</SubType>
93 </Compile>
94 <Compile Include="DB4oManager.cs">
95 <SubType>Code</SubType>
96 </Compile>
97 <Compile Include="DB4oGridData.cs">
98 <SubType>Code</SubType>
99 </Compile>
100 <Compile Include="Properties\AssemblyInfo.cs">
101 <SubType>Code</SubType>
102 </Compile>
103 </ItemGroup>
104 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
105 <PropertyGroup>
106 <PreBuildEvent>
107 </PreBuildEvent>
108 <PostBuildEvent>
109 </PostBuildEvent>
110 </PropertyGroup>
111</Project>
diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.user b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.user
new file mode 100644
index 0000000..1b6b14d
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.csproj.user
@@ -0,0 +1,12 @@
1<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5 <ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
6 <LastOpenVersion>8.0.50727</LastOpenVersion>
7 <ProjectView>ProjectFiles</ProjectView>
8 <ProjectTrust>0</ProjectTrust>
9 </PropertyGroup>
10 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
11 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
12</Project>
diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build
new file mode 100644
index 0000000..db8662d
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.DB4o/OpenGrid.Framework.Data.DB4o.dll.build
@@ -0,0 +1,47 @@
1<?xml version="1.0" ?>
2<project name="OpenGrid.Framework.Data.DB4o" 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.DB4o" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="DB4oUserData.cs" />
15 <include name="DB4oManager.cs" />
16 <include name="DB4oGridData.cs" />
17 <include name="Properties/AssemblyInfo.cs" />
18 </sources>
19 <references basedir="${project::get-base-directory()}">
20 <lib>
21 <include name="${project::get-base-directory()}" />
22 <include name="${project::get-base-directory()}/${build.dir}" />
23 </lib>
24 <include name="System.dll" />
25 <include name="System.Xml.dll" />
26 <include name="System.Data.dll" />
27 <include name="../../bin/OpenGrid.Framework.Data.dll" />
28 <include name="../../bin/libsecondlife.dll" />
29 <include name="../../bin/Db4objects.Db4o.dll" />
30 </references>
31 </csc>
32 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
33 <mkdir dir="${project::get-base-directory()}/../../bin/"/>
34 <copy todir="${project::get-base-directory()}/../../bin/">
35 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
36 <include name="*.dll"/>
37 <include name="*.exe"/>
38 </fileset>
39 </copy>
40 </target>
41 <target name="clean">
42 <delete dir="${bin.dir}" failonerror="false" />
43 <delete dir="${obj.dir}" failonerror="false" />
44 </target>
45 <target name="doc" description="Creates documentation.">
46 </target>
47</project>
diff --git a/OpenGridServices/OpenGrid.Framework.Data.DB4o/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Framework.Data.DB4o/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..dc4a9a1
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.DB4o/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using 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.DB4o")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenGrid.Framework.Data.DB4o")]
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("57991e15-79da-41b7-aa06-2e6b49165a63")]
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.MSSQL/MSSQLGridData.cs b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs
new file mode 100644
index 0000000..92169c4
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLGridData.cs
@@ -0,0 +1,190 @@
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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using OpenGrid.Framework.Data;
32
33namespace 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
185 return false;
186 }
187 }
188
189
190}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs
new file mode 100644
index 0000000..475a3e7
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/MSSQLManager.cs
@@ -0,0 +1,214 @@
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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using System.Data;
32
33using System.Data.SqlClient;
34
35using OpenGrid.Framework.Data;
36
37namespace 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
new file mode 100644
index 0000000..8d53692
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.csproj
@@ -0,0 +1,104 @@
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="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 </ItemGroup>
78 <ItemGroup>
79 <ProjectReference Include="..\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.csproj.user b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.csproj.user
new file mode 100644
index 0000000..1b6b14d
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.csproj.user
@@ -0,0 +1,12 @@
1<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5 <ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
6 <LastOpenVersion>8.0.50727</LastOpenVersion>
7 <ProjectView>ProjectFiles</ProjectView>
8 <ProjectTrust>0</ProjectTrust>
9 </PropertyGroup>
10 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
11 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
12</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
new file mode 100644
index 0000000..5b6b75b
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/OpenGrid.Framework.Data.MSSQL.dll.build
@@ -0,0 +1,45 @@
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="System.dll" />
24 <include name="System.Xml.dll" />
25 <include name="System.Data.dll" />
26 <include name="../../bin/OpenGrid.Framework.Data.dll" />
27 <include name="../../bin/libsecondlife.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
new file mode 100644
index 0000000..bbe3cdf
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.MSSQL/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using 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
new file mode 100644
index 0000000..d9a517d
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs
@@ -0,0 +1,258 @@
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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using OpenGrid.Framework.Data;
32
33namespace 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
257
258}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLInventoryData.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLInventoryData.cs
new file mode 100644
index 0000000..fb429e4
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLInventoryData.cs
@@ -0,0 +1,309 @@
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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace 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
new file mode 100644
index 0000000..c88b39f
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLLogData.cs
@@ -0,0 +1,107 @@
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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace 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
new file mode 100644
index 0000000..76d3faf
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLManager.cs
@@ -0,0 +1,581 @@
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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using System.Data;
32
33// MySQL Native
34using MySql;
35using MySql.Data;
36using MySql.Data.Types;
37using MySql.Data.MySqlClient;
38
39using OpenGrid.Framework.Data;
40
41namespace 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 an agent row from a database reader
245 /// </summary>
246 /// <param name="reader">An active database reader</param>
247 /// <returns>A user session agent</returns>
248 public UserAgentData readAgentRow(IDataReader reader)
249 {
250 UserAgentData retval = new UserAgentData();
251
252 if (reader.Read())
253 {
254 // Agent IDs
255 retval.UUID = new libsecondlife.LLUUID((string)reader["UUID"]);
256 retval.sessionID = new libsecondlife.LLUUID((string)reader["sessionID"]);
257 retval.secureSessionID = new libsecondlife.LLUUID((string)reader["secureSessionID"]);
258
259 // Agent Who?
260 retval.agentIP = (string)reader["agentIP"];
261 retval.agentPort = Convert.ToUInt32(reader["agentPort"].ToString());
262 retval.agentOnline = Convert.ToBoolean(reader["agentOnline"].ToString());
263
264 // Login/Logout times (UNIX Epoch)
265 retval.loginTime = Convert.ToInt32(reader["loginTime"].ToString());
266 retval.logoutTime = Convert.ToInt32(reader["logoutTime"].ToString());
267
268 // Current position
269 retval.currentRegion = (string)reader["currentRegion"];
270 retval.currentHandle = Convert.ToUInt64(reader["currentHandle"].ToString());
271 libsecondlife.LLVector3.TryParse((string)reader["currentPos"], out retval.currentPos);
272 }
273 else
274 {
275 return null;
276 }
277 return retval;
278 }
279
280 /// <summary>
281 /// Reads a user profile from an active data reader
282 /// </summary>
283 /// <param name="reader">An active database reader</param>
284 /// <returns>A user profile</returns>
285 public UserProfileData readUserRow(IDataReader reader)
286 {
287 UserProfileData retval = new UserProfileData();
288
289 if (reader.Read())
290 {
291 retval.UUID = new libsecondlife.LLUUID((string)reader["UUID"]);
292 retval.username = (string)reader["username"];
293 retval.surname = (string)reader["lastname"];
294
295 retval.passwordHash = (string)reader["passwordHash"];
296 retval.passwordSalt = (string)reader["passwordSalt"];
297
298 retval.homeRegion = Convert.ToUInt64(reader["homeRegion"].ToString());
299 retval.homeLocation = new libsecondlife.LLVector3(
300 Convert.ToSingle(reader["homeLocationX"].ToString()),
301 Convert.ToSingle(reader["homeLocationY"].ToString()),
302 Convert.ToSingle(reader["homeLocationZ"].ToString()));
303 retval.homeLookAt = new libsecondlife.LLVector3(
304 Convert.ToSingle(reader["homeLookAtX"].ToString()),
305 Convert.ToSingle(reader["homeLookAtY"].ToString()),
306 Convert.ToSingle(reader["homeLookAtZ"].ToString()));
307
308 retval.created = Convert.ToInt32(reader["created"].ToString());
309 retval.lastLogin = Convert.ToInt32(reader["lastLogin"].ToString());
310
311 retval.userInventoryURI = (string)reader["userInventoryURI"];
312 retval.userAssetURI = (string)reader["userAssetURI"];
313
314 retval.profileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString());
315 retval.profileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString());
316
317 retval.profileAboutText = (string)reader["profileAboutText"];
318 retval.profileFirstText = (string)reader["profileFirstText"];
319
320 retval.profileImage = new libsecondlife.LLUUID((string)reader["profileImage"]);
321 retval.profileFirstImage = new libsecondlife.LLUUID((string)reader["profileFirstImage"]);
322
323 }
324 else
325 {
326 return null;
327 }
328 return retval;
329 }
330
331 /// <summary>
332 /// Reads a list of inventory folders returned by a query.
333 /// </summary>
334 /// <param name="reader">A MySQL Data Reader</param>
335 /// <returns>A List containing inventory folders</returns>
336 public List<InventoryFolderBase> readInventoryFolders(IDataReader reader)
337 {
338 List<InventoryFolderBase> rows = new List<InventoryFolderBase>();
339
340 while(reader.Read())
341 {
342 try
343 {
344 InventoryFolderBase folder = new InventoryFolderBase();
345
346 folder.agentID = new libsecondlife.LLUUID((string)reader["agentID"]);
347 folder.parentID = new libsecondlife.LLUUID((string)reader["parentFolderID"]);
348 folder.folderID = new libsecondlife.LLUUID((string)reader["folderID"]);
349 folder.name = (string)reader["folderName"];
350
351 rows.Add(folder);
352 }
353 catch (Exception e)
354 {
355 Console.WriteLine(e.ToString());
356 }
357 }
358
359 return rows;
360 }
361
362 /// <summary>
363 /// Reads a collection of items from an SQL result
364 /// </summary>
365 /// <param name="reader">The SQL Result</param>
366 /// <returns>A List containing Inventory Items</returns>
367 public List<InventoryItemBase> readInventoryItems(IDataReader reader)
368 {
369 List<InventoryItemBase> rows = new List<InventoryItemBase>();
370
371 while (reader.Read())
372 {
373 try
374 {
375 InventoryItemBase item = new InventoryItemBase();
376
377 item.assetID = new libsecondlife.LLUUID((string)reader["assetID"]);
378 item.avatarID = new libsecondlife.LLUUID((string)reader["avatarID"]);
379 item.inventoryCurrentPermissions = Convert.ToUInt32(reader["inventoryCurrentPermissions"].ToString());
380 item.inventoryDescription = (string)reader["inventoryDescription"];
381 item.inventoryID = new libsecondlife.LLUUID((string)reader["inventoryID"]);
382 item.inventoryName = (string)reader["inventoryName"];
383 item.inventoryNextPermissions = Convert.ToUInt32(reader["inventoryNextPermissions"].ToString());
384 item.parentFolderID = new libsecondlife.LLUUID((string)reader["parentFolderID"]);
385 item.type = Convert.ToInt32(reader["type"].ToString());
386
387 rows.Add(item);
388 }
389 catch (Exception e)
390 {
391 Console.WriteLine(e.ToString());
392 }
393 }
394
395 return rows;
396 }
397
398 /// <summary>
399 /// Inserts a new row into the log database
400 /// </summary>
401 /// <param name="serverDaemon">The daemon which triggered this event</param>
402 /// <param name="target">Who were we operating on when this occured (region UUID, user UUID, etc)</param>
403 /// <param name="methodCall">The method call where the problem occured</param>
404 /// <param name="arguments">The arguments passed to the method</param>
405 /// <param name="priority">How critical is this?</param>
406 /// <param name="logMessage">Extra message info</param>
407 /// <returns>Saved successfully?</returns>
408 public bool insertLogRow(string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage)
409 {
410 string sql = "INSERT INTO logs (`target`, `server`, `method`, `arguments`, `priority`, `message`) VALUES ";
411 sql += "(?target, ?server, ?method, ?arguments, ?priority, ?message)";
412
413 Dictionary<string, string> parameters = new Dictionary<string, string>();
414 parameters["?server"] = serverDaemon;
415 parameters["?target"] = target;
416 parameters["?method"] = methodCall;
417 parameters["?arguments"] = arguments;
418 parameters["?priority"] = priority.ToString();
419 parameters["?message"] = logMessage;
420
421 bool returnval = false;
422
423 try
424 {
425 IDbCommand result = Query(sql, parameters);
426
427 if (result.ExecuteNonQuery() == 1)
428 returnval = true;
429
430 result.Dispose();
431 }
432 catch (Exception e)
433 {
434 Console.WriteLine(e.ToString());
435 return false;
436 }
437
438 return returnval;
439 }
440
441 /// <summary>
442 /// Inserts a new item into the database
443 /// </summary>
444 /// <param name="item">The item</param>
445 /// <returns>Success?</returns>
446 public bool insertItem(InventoryItemBase item)
447 {
448 string sql = "REPLACE INTO inventoryitems (inventoryID, assetID, type, parentFolderID, avatarID, inventoryName, inventoryDescription, inventoryNextPermissions, inventoryCurrentPermissions) VALUES ";
449 sql += "(?inventoryID, ?assetID, ?type, ?parentFolderID, ?avatarID, ?inventoryName, ?inventoryDescription, ?inventoryNextPermissions, ?inventoryCurrentPermissions)";
450
451 Dictionary<string, string> parameters = new Dictionary<string, string>();
452 parameters["?inventoryID"] = item.inventoryID.ToStringHyphenated();
453 parameters["?assetID"] = item.assetID.ToStringHyphenated();
454 parameters["?type"] = item.type.ToString();
455 parameters["?parentFolderID"] = item.parentFolderID.ToStringHyphenated();
456 parameters["?avatarID"] = item.avatarID.ToStringHyphenated();
457 parameters["?inventoryName"] = item.inventoryName;
458 parameters["?inventoryDescription"] = item.inventoryDescription;
459 parameters["?inventoryNextPermissions"] = item.inventoryNextPermissions.ToString();
460 parameters["?inventoryCurrentPermissions"] = item.inventoryCurrentPermissions.ToString();
461
462 bool returnval = false;
463
464 try
465 {
466 IDbCommand result = Query(sql, parameters);
467
468 if (result.ExecuteNonQuery() == 1)
469 returnval = true;
470
471 result.Dispose();
472 }
473 catch (Exception e)
474 {
475 Console.WriteLine(e.ToString());
476 return false;
477 }
478
479 return returnval;
480 }
481
482 /// <summary>
483 /// Inserts a new folder into the database
484 /// </summary>
485 /// <param name="folder">The folder</param>
486 /// <returns>Success?</returns>
487 public bool insertFolder(InventoryFolderBase folder)
488 {
489 string sql = "REPLACE INTO inventoryfolders (folderID, agentID, parentFolderID, folderName) VALUES ";
490 sql += "(?folderID, ?agentID, ?parentFolderID, ?folderName)";
491
492 Dictionary<string, string> parameters = new Dictionary<string, string>();
493 parameters["?folderID"] = folder.folderID.ToStringHyphenated();
494 parameters["?agentID"] = folder.agentID.ToStringHyphenated();
495 parameters["?parentFolderID"] = folder.parentID.ToStringHyphenated();
496 parameters["?folderName"] = folder.name;
497
498 bool returnval = false;
499 try
500 {
501 IDbCommand result = Query(sql, parameters);
502
503 if (result.ExecuteNonQuery() == 1)
504 returnval = true;
505
506 result.Dispose();
507 }
508 catch (Exception e)
509 {
510 Console.WriteLine(e.ToString());
511 return false;
512 }
513 return returnval;
514 }
515
516 /// <summary>
517 /// Inserts a new region into the database
518 /// </summary>
519 /// <param name="profile">The region to insert</param>
520 /// <returns>Success?</returns>
521 public bool insertRegion(SimProfileData regiondata)
522 {
523 string sql = "REPLACE INTO regions (regionHandle, regionName, uuid, regionRecvKey, regionSecret, regionSendKey, regionDataURI, ";
524 sql += "serverIP, serverPort, serverURI, locX, locY, locZ, eastOverrideHandle, westOverrideHandle, southOverrideHandle, northOverrideHandle, regionAssetURI, regionAssetRecvKey, ";
525 sql += "regionAssetSendKey, regionUserURI, regionUserRecvKey, regionUserSendKey, regionMapTexture) VALUES ";
526
527 sql += "(?regionHandle, ?regionName, ?uuid, ?regionRecvKey, ?regionSecret, ?regionSendKey, ?regionDataURI, ";
528 sql += "?serverIP, ?serverPort, ?serverURI, ?locX, ?locY, ?locZ, ?eastOverrideHandle, ?westOverrideHandle, ?southOverrideHandle, ?northOverrideHandle, ?regionAssetURI, ?regionAssetRecvKey, ";
529 sql += "?regionAssetSendKey, ?regionUserURI, ?regionUserRecvKey, ?regionUserSendKey, ?regionMapTexture);";
530
531 Dictionary<string, string> parameters = new Dictionary<string, string>();
532
533 parameters["?regionHandle"] = regiondata.regionHandle.ToString();
534 parameters["?regionName"] = regiondata.regionName.ToString();
535 parameters["?uuid"] = regiondata.UUID.ToStringHyphenated();
536 parameters["?regionRecvKey"] = regiondata.regionRecvKey.ToString();
537 parameters["?regionSecret"] = regiondata.regionSecret.ToString();
538 parameters["?regionSendKey"] = regiondata.regionSendKey.ToString();
539 parameters["?regionDataURI"] = regiondata.regionDataURI.ToString();
540 parameters["?serverIP"] = regiondata.serverIP.ToString();
541 parameters["?serverPort"] = regiondata.serverPort.ToString();
542 parameters["?serverURI"] = regiondata.serverURI.ToString();
543 parameters["?locX"] = regiondata.regionLocX.ToString();
544 parameters["?locY"] = regiondata.regionLocY.ToString();
545 parameters["?locZ"] = regiondata.regionLocZ.ToString();
546 parameters["?eastOverrideHandle"] = regiondata.regionEastOverrideHandle.ToString();
547 parameters["?westOverrideHandle"] = regiondata.regionWestOverrideHandle.ToString();
548 parameters["?northOverrideHandle"] = regiondata.regionNorthOverrideHandle.ToString();
549 parameters["?southOverrideHandle"] = regiondata.regionSouthOverrideHandle.ToString();
550 parameters["?regionAssetURI"] = regiondata.regionAssetURI.ToString();
551 parameters["?regionAssetRecvKey"] = regiondata.regionAssetRecvKey.ToString();
552 parameters["?regionAssetSendKey"] = regiondata.regionAssetSendKey.ToString();
553 parameters["?regionUserURI"] = regiondata.regionUserURI.ToString();
554 parameters["?regionUserRecvKey"] = regiondata.regionUserRecvKey.ToString();
555 parameters["?regionUserSendKey"] = regiondata.regionUserSendKey.ToString();
556 parameters["?regionMapTexture"] = regiondata.regionMapTextureID.ToStringHyphenated();
557
558 bool returnval = false;
559
560 try
561 {
562
563 IDbCommand result = Query(sql, parameters);
564
565 //Console.WriteLine(result.CommandText);
566
567 if (result.ExecuteNonQuery() == 1)
568 returnval = true;
569
570 result.Dispose();
571 }
572 catch (Exception e)
573 {
574 Console.WriteLine(e.ToString());
575 return false;
576 }
577
578 return returnval;
579 }
580 }
581}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLUserData.cs b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLUserData.cs
new file mode 100644
index 0000000..032a0e6
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/MySQLUserData.cs
@@ -0,0 +1,257 @@
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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using OpenGrid.Framework.Data;
32using libsecondlife;
33
34namespace 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
new file mode 100644
index 0000000..351de2a
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj
@@ -0,0 +1,237 @@
1<<<<<<< .mine
2<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <PropertyGroup>
4 <ProjectType>Local</ProjectType>
5 <ProductVersion>8.0.50727</ProductVersion>
6 <SchemaVersion>2.0</SchemaVersion>
7 <ProjectGuid>{0F3C3AC1-0000-0000-0000-000000000000}</ProjectGuid>
8 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
9 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
10 <ApplicationIcon></ApplicationIcon>
11 <AssemblyKeyContainerName>
12 </AssemblyKeyContainerName>
13 <AssemblyName>OpenGrid.Framework.Data.MySQL</AssemblyName>
14 <DefaultClientScript>JScript</DefaultClientScript>
15 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
16 <DefaultTargetSchema>IE50</DefaultTargetSchema>
17 <DelaySign>false</DelaySign>
18 <OutputType>Library</OutputType>
19 <AppDesignerFolder></AppDesignerFolder>
20 <RootNamespace>OpenGrid.Framework.Data.MySQL</RootNamespace>
21 <StartupObject></StartupObject>
22 <FileUpgradeFlags>
23 </FileUpgradeFlags>
24 </PropertyGroup>
25 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
26 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
27 <BaseAddress>285212672</BaseAddress>
28 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
29 <ConfigurationOverrideFile>
30 </ConfigurationOverrideFile>
31 <DefineConstants>TRACE;DEBUG</DefineConstants>
32 <DocumentationFile></DocumentationFile>
33 <DebugSymbols>True</DebugSymbols>
34 <FileAlignment>4096</FileAlignment>
35 <Optimize>False</Optimize>
36 <OutputPath>..\..\bin\</OutputPath>
37 <RegisterForComInterop>False</RegisterForComInterop>
38 <RemoveIntegerChecks>False</RemoveIntegerChecks>
39 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
40 <WarningLevel>4</WarningLevel>
41 <NoWarn></NoWarn>
42 </PropertyGroup>
43 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
44 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
45 <BaseAddress>285212672</BaseAddress>
46 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
47 <ConfigurationOverrideFile>
48 </ConfigurationOverrideFile>
49 <DefineConstants>TRACE</DefineConstants>
50 <DocumentationFile></DocumentationFile>
51 <DebugSymbols>False</DebugSymbols>
52 <FileAlignment>4096</FileAlignment>
53 <Optimize>True</Optimize>
54 <OutputPath>..\..\bin\</OutputPath>
55 <RegisterForComInterop>False</RegisterForComInterop>
56 <RemoveIntegerChecks>False</RemoveIntegerChecks>
57 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
58 <WarningLevel>4</WarningLevel>
59 <NoWarn></NoWarn>
60 </PropertyGroup>
61 <ItemGroup>
62 <Reference Include="System" >
63 <HintPath>System.dll</HintPath>
64 <Private>False</Private>
65 </Reference>
66 <Reference Include="System.Xml" >
67 <HintPath>System.Xml.dll</HintPath>
68 <Private>False</Private>
69 </Reference>
70 <Reference Include="System.Data" >
71 <HintPath>System.Data.dll</HintPath>
72 <Private>False</Private>
73 </Reference>
74 <Reference Include="libsecondlife.dll" >
75 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
76 <Private>False</Private>
77 </Reference>
78 <Reference Include="MySql.Data.dll" >
79 <HintPath>..\..\bin\MySql.Data.dll</HintPath>
80 <Private>False</Private>
81 </Reference>
82 </ItemGroup>
83 <ItemGroup>
84 <ProjectReference Include="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj">
85 <Name>OpenGrid.Framework.Data</Name>
86 <Project>{62CDF671-0000-0000-0000-000000000000}</Project>
87 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
88 <Private>False</Private>
89 </ProjectReference>
90 </ItemGroup>
91 <ItemGroup>
92 <Compile Include="MySQLGridData.cs">
93 <SubType>Code</SubType>
94 </Compile>
95 <Compile Include="MySQLInventoryData.cs">
96 <SubType>Code</SubType>
97 </Compile>
98 <Compile Include="MySQLLogData.cs">
99 <SubType>Code</SubType>
100 </Compile>
101 <Compile Include="MySQLManager.cs">
102 <SubType>Code</SubType>
103 </Compile>
104 <Compile Include="MySQLUserData.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>
119=======
120<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
121 <PropertyGroup>
122 <ProjectType>Local</ProjectType>
123 <ProductVersion>8.0.50727</ProductVersion>
124 <SchemaVersion>2.0</SchemaVersion>
125 <ProjectGuid>{0F3C3AC1-0000-0000-0000-000000000000}</ProjectGuid>
126 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
127 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
128 <ApplicationIcon></ApplicationIcon>
129 <AssemblyKeyContainerName>
130 </AssemblyKeyContainerName>
131 <AssemblyName>OpenGrid.Framework.Data.MySQL</AssemblyName>
132 <DefaultClientScript>JScript</DefaultClientScript>
133 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
134 <DefaultTargetSchema>IE50</DefaultTargetSchema>
135 <DelaySign>false</DelaySign>
136 <OutputType>Library</OutputType>
137 <AppDesignerFolder></AppDesignerFolder>
138 <RootNamespace>OpenGrid.Framework.Data.MySQL</RootNamespace>
139 <StartupObject></StartupObject>
140 <FileUpgradeFlags>
141 </FileUpgradeFlags>
142 </PropertyGroup>
143 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
144 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
145 <BaseAddress>285212672</BaseAddress>
146 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
147 <ConfigurationOverrideFile>
148 </ConfigurationOverrideFile>
149 <DefineConstants>TRACE;DEBUG</DefineConstants>
150 <DocumentationFile></DocumentationFile>
151 <DebugSymbols>True</DebugSymbols>
152 <FileAlignment>4096</FileAlignment>
153 <Optimize>False</Optimize>
154 <OutputPath>..\..\bin\</OutputPath>
155 <RegisterForComInterop>False</RegisterForComInterop>
156 <RemoveIntegerChecks>False</RemoveIntegerChecks>
157 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
158 <WarningLevel>4</WarningLevel>
159 <NoWarn></NoWarn>
160 </PropertyGroup>
161 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
162 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
163 <BaseAddress>285212672</BaseAddress>
164 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
165 <ConfigurationOverrideFile>
166 </ConfigurationOverrideFile>
167 <DefineConstants>TRACE</DefineConstants>
168 <DocumentationFile></DocumentationFile>
169 <DebugSymbols>False</DebugSymbols>
170 <FileAlignment>4096</FileAlignment>
171 <Optimize>True</Optimize>
172 <OutputPath>..\..\bin\</OutputPath>
173 <RegisterForComInterop>False</RegisterForComInterop>
174 <RemoveIntegerChecks>False</RemoveIntegerChecks>
175 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
176 <WarningLevel>4</WarningLevel>
177 <NoWarn></NoWarn>
178 </PropertyGroup>
179 <ItemGroup>
180 <Reference Include="System" >
181 <HintPath>System.dll</HintPath>
182 <Private>False</Private>
183 </Reference>
184 <Reference Include="System.Xml" >
185 <HintPath>System.Xml.dll</HintPath>
186 <Private>False</Private>
187 </Reference>
188 <Reference Include="System.Data" >
189 <HintPath>System.Data.dll</HintPath>
190 <Private>False</Private>
191 </Reference>
192 <Reference Include="libsecondlife.dll" >
193 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
194 <Private>False</Private>
195 </Reference>
196 <Reference Include="MySql.Data.dll" >
197 <HintPath>..\..\bin\MySql.Data.dll</HintPath>
198 <Private>False</Private>
199 </Reference>
200 </ItemGroup>
201 <ItemGroup>
202 <ProjectReference Include="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj">
203 <Name>OpenGrid.Framework.Data</Name>
204 <Project>{62CDF671-0000-0000-0000-000000000000}</Project>
205 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
206 <Private>False</Private>
207 </ProjectReference>
208 </ItemGroup>
209 <ItemGroup>
210 <Compile Include="MySQLInventoryData.cs">
211 <SubType>Code</SubType>
212 </Compile>
213 <Compile Include="MySQLUserData.cs">
214 <SubType>Code</SubType>
215 </Compile>
216 <Compile Include="MySQLManager.cs">
217 <SubType>Code</SubType>
218 </Compile>
219 <Compile Include="MySQLLogData.cs">
220 <SubType>Code</SubType>
221 </Compile>
222 <Compile Include="MySQLGridData.cs">
223 <SubType>Code</SubType>
224 </Compile>
225 <Compile Include="Properties\AssemblyInfo.cs">
226 <SubType>Code</SubType>
227 </Compile>
228 </ItemGroup>
229 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
230 <PropertyGroup>
231 <PreBuildEvent>
232 </PreBuildEvent>
233 <PostBuildEvent>
234 </PostBuildEvent>
235 </PropertyGroup>
236</Project>
237>>>>>>> .r921
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
new file mode 100644
index 0000000..75ef149
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj.mine
@@ -0,0 +1,117 @@
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
new file mode 100644
index 0000000..7a36be2
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj.r858
@@ -0,0 +1,114 @@
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
new file mode 100644
index 0000000..5fe0cf7
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj.r921
@@ -0,0 +1,117 @@
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.csproj.user b/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj.user
new file mode 100644
index 0000000..1b6b14d
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.csproj.user
@@ -0,0 +1,12 @@
1<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5 <ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
6 <LastOpenVersion>8.0.50727</LastOpenVersion>
7 <ProjectView>ProjectFiles</ProjectView>
8 <ProjectTrust>0</ProjectTrust>
9 </PropertyGroup>
10 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
11 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
12</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
new file mode 100644
index 0000000..84d3d56
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/OpenGrid.Framework.Data.MySQL.dll.build
@@ -0,0 +1,49 @@
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="MySQLInventoryData.cs" />
15 <include name="MySQLUserData.cs" />
16 <include name="MySQLManager.cs" />
17 <include name="MySQLLogData.cs" />
18 <include name="MySQLGridData.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="System.dll" />
27 <include name="System.Xml.dll" />
28 <include name="System.Data.dll" />
29 <include name="../../bin/OpenGrid.Framework.Data.dll" />
30 <include name="../../bin/libsecondlife.dll" />
31 <include name="../../bin/MySql.Data.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
new file mode 100644
index 0000000..0bfd1d6
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.MySQL/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using 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
new file mode 100644
index 0000000..4360031
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj
@@ -0,0 +1,219 @@
1<<<<<<< .mine
2<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <PropertyGroup>
4 <ProjectType>Local</ProjectType>
5 <ProductVersion>8.0.50727</ProductVersion>
6 <SchemaVersion>2.0</SchemaVersion>
7 <ProjectGuid>{1E3F341A-0000-0000-0000-000000000000}</ProjectGuid>
8 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
9 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
10 <ApplicationIcon></ApplicationIcon>
11 <AssemblyKeyContainerName>
12 </AssemblyKeyContainerName>
13 <AssemblyName>OpenGrid.Framework.Data.SQLite</AssemblyName>
14 <DefaultClientScript>JScript</DefaultClientScript>
15 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
16 <DefaultTargetSchema>IE50</DefaultTargetSchema>
17 <DelaySign>false</DelaySign>
18 <OutputType>Library</OutputType>
19 <AppDesignerFolder></AppDesignerFolder>
20 <RootNamespace>OpenGrid.Framework.Data.SQLite</RootNamespace>
21 <StartupObject></StartupObject>
22 <FileUpgradeFlags>
23 </FileUpgradeFlags>
24 </PropertyGroup>
25 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
26 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
27 <BaseAddress>285212672</BaseAddress>
28 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
29 <ConfigurationOverrideFile>
30 </ConfigurationOverrideFile>
31 <DefineConstants>TRACE;DEBUG</DefineConstants>
32 <DocumentationFile></DocumentationFile>
33 <DebugSymbols>True</DebugSymbols>
34 <FileAlignment>4096</FileAlignment>
35 <Optimize>False</Optimize>
36 <OutputPath>..\..\bin\</OutputPath>
37 <RegisterForComInterop>False</RegisterForComInterop>
38 <RemoveIntegerChecks>False</RemoveIntegerChecks>
39 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
40 <WarningLevel>4</WarningLevel>
41 <NoWarn></NoWarn>
42 </PropertyGroup>
43 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
44 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
45 <BaseAddress>285212672</BaseAddress>
46 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
47 <ConfigurationOverrideFile>
48 </ConfigurationOverrideFile>
49 <DefineConstants>TRACE</DefineConstants>
50 <DocumentationFile></DocumentationFile>
51 <DebugSymbols>False</DebugSymbols>
52 <FileAlignment>4096</FileAlignment>
53 <Optimize>True</Optimize>
54 <OutputPath>..\..\bin\</OutputPath>
55 <RegisterForComInterop>False</RegisterForComInterop>
56 <RemoveIntegerChecks>False</RemoveIntegerChecks>
57 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
58 <WarningLevel>4</WarningLevel>
59 <NoWarn></NoWarn>
60 </PropertyGroup>
61 <ItemGroup>
62 <Reference Include="System" >
63 <HintPath>System.dll</HintPath>
64 <Private>False</Private>
65 </Reference>
66 <Reference Include="System.Xml" >
67 <HintPath>System.Xml.dll</HintPath>
68 <Private>False</Private>
69 </Reference>
70 <Reference Include="System.Data" >
71 <HintPath>System.Data.dll</HintPath>
72 <Private>False</Private>
73 </Reference>
74 <Reference Include="System.Data.SQLite.dll" >
75 <HintPath>..\..\bin\System.Data.SQLite.dll</HintPath>
76 <Private>False</Private>
77 </Reference>
78 <Reference Include="libsecondlife.dll" >
79 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
80 <Private>False</Private>
81 </Reference>
82 </ItemGroup>
83 <ItemGroup>
84 <ProjectReference Include="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj">
85 <Name>OpenGrid.Framework.Data</Name>
86 <Project>{62CDF671-0000-0000-0000-000000000000}</Project>
87 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
88 <Private>False</Private>
89 </ProjectReference>
90 </ItemGroup>
91 <ItemGroup>
92 <Compile Include="SQLiteGridData.cs">
93 <SubType>Code</SubType>
94 </Compile>
95 <Compile Include="SQLiteManager.cs">
96 <SubType>Code</SubType>
97 </Compile>
98 <Compile Include="Properties\AssemblyInfo.cs">
99 <SubType>Code</SubType>
100 </Compile>
101 </ItemGroup>
102 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
103 <PropertyGroup>
104 <PreBuildEvent>
105 </PreBuildEvent>
106 <PostBuildEvent>
107 </PostBuildEvent>
108 </PropertyGroup>
109</Project>
110=======
111<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
112 <PropertyGroup>
113 <ProjectType>Local</ProjectType>
114 <ProductVersion>8.0.50727</ProductVersion>
115 <SchemaVersion>2.0</SchemaVersion>
116 <ProjectGuid>{1E3F341A-0000-0000-0000-000000000000}</ProjectGuid>
117 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
118 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
119 <ApplicationIcon></ApplicationIcon>
120 <AssemblyKeyContainerName>
121 </AssemblyKeyContainerName>
122 <AssemblyName>OpenGrid.Framework.Data.SQLite</AssemblyName>
123 <DefaultClientScript>JScript</DefaultClientScript>
124 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
125 <DefaultTargetSchema>IE50</DefaultTargetSchema>
126 <DelaySign>false</DelaySign>
127 <OutputType>Library</OutputType>
128 <AppDesignerFolder></AppDesignerFolder>
129 <RootNamespace>OpenGrid.Framework.Data.SQLite</RootNamespace>
130 <StartupObject></StartupObject>
131 <FileUpgradeFlags>
132 </FileUpgradeFlags>
133 </PropertyGroup>
134 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
135 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
136 <BaseAddress>285212672</BaseAddress>
137 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
138 <ConfigurationOverrideFile>
139 </ConfigurationOverrideFile>
140 <DefineConstants>TRACE;DEBUG</DefineConstants>
141 <DocumentationFile></DocumentationFile>
142 <DebugSymbols>True</DebugSymbols>
143 <FileAlignment>4096</FileAlignment>
144 <Optimize>False</Optimize>
145 <OutputPath>..\..\bin\</OutputPath>
146 <RegisterForComInterop>False</RegisterForComInterop>
147 <RemoveIntegerChecks>False</RemoveIntegerChecks>
148 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
149 <WarningLevel>4</WarningLevel>
150 <NoWarn></NoWarn>
151 </PropertyGroup>
152 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
153 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
154 <BaseAddress>285212672</BaseAddress>
155 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
156 <ConfigurationOverrideFile>
157 </ConfigurationOverrideFile>
158 <DefineConstants>TRACE</DefineConstants>
159 <DocumentationFile></DocumentationFile>
160 <DebugSymbols>False</DebugSymbols>
161 <FileAlignment>4096</FileAlignment>
162 <Optimize>True</Optimize>
163 <OutputPath>..\..\bin\</OutputPath>
164 <RegisterForComInterop>False</RegisterForComInterop>
165 <RemoveIntegerChecks>False</RemoveIntegerChecks>
166 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
167 <WarningLevel>4</WarningLevel>
168 <NoWarn></NoWarn>
169 </PropertyGroup>
170 <ItemGroup>
171 <Reference Include="System" >
172 <HintPath>System.dll</HintPath>
173 <Private>False</Private>
174 </Reference>
175 <Reference Include="System.Xml" >
176 <HintPath>System.Xml.dll</HintPath>
177 <Private>False</Private>
178 </Reference>
179 <Reference Include="System.Data" >
180 <HintPath>System.Data.dll</HintPath>
181 <Private>False</Private>
182 </Reference>
183 <Reference Include="System.Data.SQLite.dll" >
184 <HintPath>..\..\bin\System.Data.SQLite.dll</HintPath>
185 <Private>False</Private>
186 </Reference>
187 <Reference Include="libsecondlife.dll" >
188 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
189 <Private>False</Private>
190 </Reference>
191 </ItemGroup>
192 <ItemGroup>
193 <ProjectReference Include="..\OpenGrid.Framework.Data\OpenGrid.Framework.Data.csproj">
194 <Name>OpenGrid.Framework.Data</Name>
195 <Project>{62CDF671-0000-0000-0000-000000000000}</Project>
196 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
197 <Private>False</Private>
198 </ProjectReference>
199 </ItemGroup>
200 <ItemGroup>
201 <Compile Include="SQLiteManager.cs">
202 <SubType>Code</SubType>
203 </Compile>
204 <Compile Include="SQLiteGridData.cs">
205 <SubType>Code</SubType>
206 </Compile>
207 <Compile Include="Properties\AssemblyInfo.cs">
208 <SubType>Code</SubType>
209 </Compile>
210 </ItemGroup>
211 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
212 <PropertyGroup>
213 <PreBuildEvent>
214 </PreBuildEvent>
215 <PostBuildEvent>
216 </PostBuildEvent>
217 </PropertyGroup>
218</Project>
219>>>>>>> .r921
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
new file mode 100644
index 0000000..463cf86
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj.mine
@@ -0,0 +1,108 @@
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
new file mode 100644
index 0000000..a8d0541
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj.r858
@@ -0,0 +1,108 @@
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
new file mode 100644
index 0000000..fa17367
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj.r921
@@ -0,0 +1,108 @@
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.csproj.user b/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj.user
new file mode 100644
index 0000000..1b6b14d
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.csproj.user
@@ -0,0 +1,12 @@
1<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5 <ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
6 <LastOpenVersion>8.0.50727</LastOpenVersion>
7 <ProjectView>ProjectFiles</ProjectView>
8 <ProjectTrust>0</ProjectTrust>
9 </PropertyGroup>
10 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
11 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
12</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
new file mode 100644
index 0000000..8c0f8fe
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.SQLite/OpenGrid.Framework.Data.SQLite.dll.build
@@ -0,0 +1,46 @@
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="SQLiteManager.cs" />
15 <include name="SQLiteGridData.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.Xml.dll" />
25 <include name="System.Data.dll" />
26 <include name="../../bin/System.Data.SQLite.dll" />
27 <include name="../../bin/OpenGrid.Framework.Data.dll" />
28 <include name="../../bin/libsecondlife.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
new file mode 100644
index 0000000..57c4bae
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.SQLite/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using 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
new file mode 100644
index 0000000..94ed46f
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteGridData.cs
@@ -0,0 +1,190 @@
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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using OpenGrid.Framework.Data;
32
33namespace 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
189
190}
diff --git a/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs b/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs
new file mode 100644
index 0000000..9689356
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data.SQLite/SQLiteManager.cs
@@ -0,0 +1,209 @@
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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using System.Data;
32
33using System.Data.SQLite;
34
35using OpenGrid.Framework.Data;
36
37namespace 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.Data/GridData.cs b/OpenGridServices/OpenGrid.Framework.Data/GridData.cs
new file mode 100644
index 0000000..e9fb215
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data/GridData.cs
@@ -0,0 +1,110 @@
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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenGrid.Framework.Data
33{
34 public enum DataResponse
35 {
36 RESPONSE_OK,
37 RESPONSE_AUTHREQUIRED,
38 RESPONSE_INVALIDCREDENTIALS,
39 RESPONSE_ERROR
40 }
41
42 /// <summary>
43 /// A standard grid interface
44 /// </summary>
45 public interface IGridData
46 {
47 /// <summary>
48 /// Returns a sim profile from a regionHandle
49 /// </summary>
50 /// <param name="regionHandle">A 64bit Region Handle</param>
51 /// <returns>A simprofile</returns>
52 SimProfileData GetProfileByHandle(ulong regionHandle);
53
54 /// <summary>
55 /// Returns a sim profile from a UUID
56 /// </summary>
57 /// <param name="UUID">A 128bit UUID</param>
58 /// <returns>A sim profile</returns>
59 SimProfileData GetProfileByLLUUID(libsecondlife.LLUUID UUID);
60
61 /// <summary>
62 /// Returns all profiles within the specified range
63 /// </summary>
64 /// <param name="Xmin">Minimum sim coordinate (X)</param>
65 /// <param name="Ymin">Minimum sim coordinate (Y)</param>
66 /// <param name="Xmax">Maximum sim coordinate (X)</param>
67 /// <param name="Ymin">Maximum sim coordinate (Y)</param>
68 /// <returns>An array containing all the sim profiles in the specified range</returns>
69 SimProfileData[] GetProfilesInRange(uint Xmin, uint Ymin, uint Xmax, uint Ymax);
70
71 /// <summary>
72 /// Authenticates a sim by use of it's recv key.
73 /// WARNING: Insecure
74 /// </summary>
75 /// <param name="UUID">The UUID sent by the sim</param>
76 /// <param name="regionHandle">The regionhandle sent by the sim</param>
77 /// <param name="simrecvkey">The recieving key sent by the sim</param>
78 /// <returns>Whether the sim has been authenticated</returns>
79 bool AuthenticateSim(libsecondlife.LLUUID UUID, ulong regionHandle, string simrecvkey);
80
81 /// <summary>
82 /// Initialises the interface
83 /// </summary>
84 void Initialise();
85
86 /// <summary>
87 /// Closes the interface
88 /// </summary>
89 void Close();
90
91 /// <summary>
92 /// The plugin being loaded
93 /// </summary>
94 /// <returns>A string containing the plugin name</returns>
95 string getName();
96
97 /// <summary>
98 /// The plugins version
99 /// </summary>
100 /// <returns>A string containing the plugin version</returns>
101 string getVersion();
102
103 /// <summary>
104 /// Adds a new profile to the database
105 /// </summary>
106 /// <param name="profile">The profile to add</param>
107 /// <returns>RESPONSE_OK if successful, error if not.</returns>
108 DataResponse AddProfile(SimProfileData profile);
109 }
110}
diff --git a/OpenGridServices/OpenGrid.Framework.Data/ILogData.cs b/OpenGridServices/OpenGrid.Framework.Data/ILogData.cs
new file mode 100644
index 0000000..2ac0bfe
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data/ILogData.cs
@@ -0,0 +1,94 @@
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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenGrid.Framework.Data
33{
34 /// <summary>
35 /// The severity of an individual log message
36 /// </summary>
37 public enum LogSeverity : int
38 {
39 /// <summary>
40 /// Critical: systems failure
41 /// </summary>
42 CRITICAL = 1,
43 /// <summary>
44 /// Major: warning prior to systems failure
45 /// </summary>
46 MAJOR = 2,
47 /// <summary>
48 /// Medium: an individual non-critical task failed
49 /// </summary>
50 MEDIUM = 3,
51 /// <summary>
52 /// Low: Informational warning
53 /// </summary>
54 LOW = 4,
55 /// <summary>
56 /// Info: Information
57 /// </summary>
58 INFO = 5,
59 /// <summary>
60 /// Verbose: Debug Information
61 /// </summary>
62 VERBOSE = 6
63 }
64
65 /// <summary>
66 /// An interface to a LogData storage system
67 /// </summary>
68 public interface ILogData
69 {
70 void saveLog(string serverDaemon, string target, string methodCall, string arguments, int priority,string logMessage);
71 /// <summary>
72 /// Initialises the interface
73 /// </summary>
74 void Initialise();
75
76 /// <summary>
77 /// Closes the interface
78 /// </summary>
79 void Close();
80
81 /// <summary>
82 /// The plugin being loaded
83 /// </summary>
84 /// <returns>A string containing the plugin name</returns>
85 string getName();
86
87 /// <summary>
88 /// The plugins version
89 /// </summary>
90 /// <returns>A string containing the plugin version</returns>
91 string getVersion();
92 }
93
94}
diff --git a/OpenGridServices/OpenGrid.Framework.Data/IniConfig.cs b/OpenGridServices/OpenGrid.Framework.Data/IniConfig.cs
new file mode 100644
index 0000000..d17afac
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data/IniConfig.cs
@@ -0,0 +1,100 @@
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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using System.IO;
32using System.Text.RegularExpressions;
33
34/*
35 Taken from public code listing at by Alex Pinsker
36 http://alexpinsker.blogspot.com/2005/12/reading-ini-file-from-c_113432097333021549.html
37 */
38
39namespace OpenGrid.Framework.Data
40{
41 /// <summary>
42 /// Parse settings from ini-like files
43 /// </summary>
44 public class IniFile
45 {
46 static IniFile()
47 {
48 _iniKeyValuePatternRegex = new Regex(
49 @"((\s)*(?<Key>([^\=^\s^\n]+))[\s^\n]*
50 # key part (surrounding whitespace stripped)
51 \=
52 (\s)*(?<Value>([^\n^\s]+(\n){0,1})))
53 # value part (surrounding whitespace stripped)
54 ",
55 RegexOptions.IgnorePatternWhitespace |
56 RegexOptions.Compiled |
57 RegexOptions.CultureInvariant);
58 }
59 static private Regex _iniKeyValuePatternRegex;
60
61 public IniFile(string iniFileName)
62 {
63 _iniFileName = iniFileName;
64 }
65
66 public string ParseFileReadValue(string key)
67 {
68 using (StreamReader reader =
69 new StreamReader(_iniFileName))
70 {
71 do
72 {
73 string line = reader.ReadLine();
74 Match match =
75 _iniKeyValuePatternRegex.Match(line);
76 if (match.Success)
77 {
78 string currentKey =
79 match.Groups["Key"].Value as string;
80 if (currentKey != null &&
81 currentKey.Trim().CompareTo(key) == 0)
82 {
83 string value =
84 match.Groups["Value"].Value as string;
85 return value;
86 }
87 }
88
89 }
90 while (reader.Peek() != -1);
91 }
92 return null;
93 }
94
95 public string IniFileName
96 {
97 get { return _iniFileName; }
98 } private string _iniFileName;
99 }
100}
diff --git a/OpenGridServices/OpenGrid.Framework.Data/InventoryData.cs b/OpenGridServices/OpenGrid.Framework.Data/InventoryData.cs
new file mode 100644
index 0000000..12f559b
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data/InventoryData.cs
@@ -0,0 +1,187 @@
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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenGrid.Framework.Data
34{
35 /// <summary>
36 /// Inventory Item - contains all the properties associated with an individual inventory piece.
37 /// </summary>
38 public class InventoryItemBase
39 {
40 /// <summary>
41 /// A UUID containing the ID for the inventory item itself
42 /// </summary>
43 public LLUUID inventoryID;
44 /// <summary>
45 /// The UUID of the associated asset on the asset server
46 /// </summary>
47 public LLUUID assetID;
48 /// <summary>
49 /// This is an enumerated value determining the type of asset (eg Notecard, Sound, Object, etc)
50 /// </summary>
51 public int type;
52 /// <summary>
53 /// The folder this item is contained in (NULL_KEY = Inventory Root)
54 /// </summary>
55 public LLUUID parentFolderID;
56 /// <summary>
57 /// The owner of this inventory item
58 /// </summary>
59 public LLUUID avatarID;
60 /// <summary>
61 /// The name of the inventory item (must be less than 64 characters)
62 /// </summary>
63 public string inventoryName;
64 /// <summary>
65 /// The description of the inventory item (must be less than 64 characters)
66 /// </summary>
67 public string inventoryDescription;
68 /// <summary>
69 /// A mask containing the permissions for the next owner (cannot be enforced)
70 /// </summary>
71 public uint inventoryNextPermissions;
72 /// <summary>
73 /// A mask containing permissions for the current owner (cannot be enforced)
74 /// </summary>
75 public uint inventoryCurrentPermissions;
76 }
77
78 /// <summary>
79 /// A Class for folders which contain users inventory
80 /// </summary>
81 public class InventoryFolderBase
82 {
83 /// <summary>
84 /// The name of the folder (64 characters or less)
85 /// </summary>
86 public string name;
87 /// <summary>
88 /// The agent who's inventory this is contained by
89 /// </summary>
90 public LLUUID agentID;
91 /// <summary>
92 /// The folder this folder is contained in (NULL_KEY for root)
93 /// </summary>
94 public LLUUID parentID;
95 /// <summary>
96 /// The UUID for this folder
97 /// </summary>
98 public LLUUID folderID;
99 }
100
101 /// <summary>
102 /// An interface for accessing inventory data from a storage server
103 /// </summary>
104 public interface IInventoryData
105 {
106 /// <summary>
107 /// Initialises the interface
108 /// </summary>
109 void Initialise();
110
111 /// <summary>
112 /// Closes the interface
113 /// </summary>
114 void Close();
115
116 /// <summary>
117 /// The plugin being loaded
118 /// </summary>
119 /// <returns>A string containing the plugin name</returns>
120 string getName();
121
122 /// <summary>
123 /// The plugins version
124 /// </summary>
125 /// <returns>A string containing the plugin version</returns>
126 string getVersion();
127
128 /// <summary>
129 /// Returns a list of inventory items contained within the specified folder
130 /// </summary>
131 /// <param name="folderID">The UUID of the target folder</param>
132 /// <returns>A List of InventoryItemBase items</returns>
133 List<InventoryItemBase> getInventoryInFolder(LLUUID folderID);
134
135 /// <summary>
136 /// Returns a list of folders in the users inventory root.
137 /// </summary>
138 /// <param name="user">The UUID of the user who is having inventory being returned</param>
139 /// <returns>A list of folders</returns>
140 List<InventoryFolderBase> getUserRootFolders(LLUUID user);
141
142 /// <summary>
143 /// Returns a list of inventory folders contained in the folder 'parentID'
144 /// </summary>
145 /// <param name="parentID">The folder to get subfolders for</param>
146 /// <returns>A list of inventory folders</returns>
147 List<InventoryFolderBase> getInventoryFolders(LLUUID parentID);
148
149 /// <summary>
150 /// Returns an inventory item by its UUID
151 /// </summary>
152 /// <param name="item">The UUID of the item to be returned</param>
153 /// <returns>A class containing item information</returns>
154 InventoryItemBase getInventoryItem(LLUUID item);
155
156 /// <summary>
157 /// Returns a specified inventory folder by its UUID
158 /// </summary>
159 /// <param name="folder">The UUID of the folder to be returned</param>
160 /// <returns>A class containing folder information</returns>
161 InventoryFolderBase getInventoryFolder(LLUUID folder);
162
163 /// <summary>
164 /// Creates a new inventory item based on item
165 /// </summary>
166 /// <param name="item">The item to be created</param>
167 void addInventoryItem(InventoryItemBase item);
168
169 /// <summary>
170 /// Updates an inventory item with item (updates based on ID)
171 /// </summary>
172 /// <param name="item">The updated item</param>
173 void updateInventoryItem(InventoryItemBase item);
174
175 /// <summary>
176 /// Adds a new folder specified by folder
177 /// </summary>
178 /// <param name="folder">The inventory folder</param>
179 void addInventoryFolder(InventoryFolderBase folder);
180
181 /// <summary>
182 /// Updates a folder based on its ID with folder
183 /// </summary>
184 /// <param name="folder">The inventory folder</param>
185 void updateInventoryFolder(InventoryFolderBase folder);
186 }
187}
diff --git a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj
new file mode 100644
index 0000000..c0684a2
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj
@@ -0,0 +1,229 @@
1<<<<<<< .mine
2<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <PropertyGroup>
4 <ProjectType>Local</ProjectType>
5 <ProductVersion>8.0.50727</ProductVersion>
6 <SchemaVersion>2.0</SchemaVersion>
7 <ProjectGuid>{62CDF671-0000-0000-0000-000000000000}</ProjectGuid>
8 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
9 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
10 <ApplicationIcon></ApplicationIcon>
11 <AssemblyKeyContainerName>
12 </AssemblyKeyContainerName>
13 <AssemblyName>OpenGrid.Framework.Data</AssemblyName>
14 <DefaultClientScript>JScript</DefaultClientScript>
15 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
16 <DefaultTargetSchema>IE50</DefaultTargetSchema>
17 <DelaySign>false</DelaySign>
18 <OutputType>Library</OutputType>
19 <AppDesignerFolder></AppDesignerFolder>
20 <RootNamespace>OpenGrid.Framework.Data</RootNamespace>
21 <StartupObject></StartupObject>
22 <FileUpgradeFlags>
23 </FileUpgradeFlags>
24 </PropertyGroup>
25 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
26 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
27 <BaseAddress>285212672</BaseAddress>
28 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
29 <ConfigurationOverrideFile>
30 </ConfigurationOverrideFile>
31 <DefineConstants>TRACE;DEBUG</DefineConstants>
32 <DocumentationFile></DocumentationFile>
33 <DebugSymbols>True</DebugSymbols>
34 <FileAlignment>4096</FileAlignment>
35 <Optimize>False</Optimize>
36 <OutputPath>..\..\bin\</OutputPath>
37 <RegisterForComInterop>False</RegisterForComInterop>
38 <RemoveIntegerChecks>False</RemoveIntegerChecks>
39 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
40 <WarningLevel>4</WarningLevel>
41 <NoWarn></NoWarn>
42 </PropertyGroup>
43 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
44 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
45 <BaseAddress>285212672</BaseAddress>
46 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
47 <ConfigurationOverrideFile>
48 </ConfigurationOverrideFile>
49 <DefineConstants>TRACE</DefineConstants>
50 <DocumentationFile></DocumentationFile>
51 <DebugSymbols>False</DebugSymbols>
52 <FileAlignment>4096</FileAlignment>
53 <Optimize>True</Optimize>
54 <OutputPath>..\..\bin\</OutputPath>
55 <RegisterForComInterop>False</RegisterForComInterop>
56 <RemoveIntegerChecks>False</RemoveIntegerChecks>
57 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
58 <WarningLevel>4</WarningLevel>
59 <NoWarn></NoWarn>
60 </PropertyGroup>
61 <ItemGroup>
62 <Reference Include="System" >
63 <HintPath>System.dll</HintPath>
64 <Private>False</Private>
65 </Reference>
66 <Reference Include="System.Xml" >
67 <HintPath>System.Xml.dll</HintPath>
68 <Private>False</Private>
69 </Reference>
70 <Reference Include="System.Data" >
71 <HintPath>System.Data.dll</HintPath>
72 <Private>False</Private>
73 </Reference>
74 <Reference Include="libsecondlife.dll" >
75 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
76 <Private>False</Private>
77 </Reference>
78 </ItemGroup>
79 <ItemGroup>
80 </ItemGroup>
81 <ItemGroup>
82 <Compile Include="GridData.cs">
83 <SubType>Code</SubType>
84 </Compile>
85 <Compile Include="ILogData.cs">
86 <SubType>Code</SubType>
87 </Compile>
88 <Compile Include="IniConfig.cs">
89 <SubType>Code</SubType>
90 </Compile>
91 <Compile Include="InventoryData.cs">
92 <SubType>Code</SubType>
93 </Compile>
94 <Compile Include="SimProfileData.cs">
95 <SubType>Code</SubType>
96 </Compile>
97 <Compile Include="UserData.cs">
98 <SubType>Code</SubType>
99 </Compile>
100 <Compile Include="UserProfileData.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>
115=======
116<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
117 <PropertyGroup>
118 <ProjectType>Local</ProjectType>
119 <ProductVersion>8.0.50727</ProductVersion>
120 <SchemaVersion>2.0</SchemaVersion>
121 <ProjectGuid>{62CDF671-0000-0000-0000-000000000000}</ProjectGuid>
122 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
123 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
124 <ApplicationIcon></ApplicationIcon>
125 <AssemblyKeyContainerName>
126 </AssemblyKeyContainerName>
127 <AssemblyName>OpenGrid.Framework.Data</AssemblyName>
128 <DefaultClientScript>JScript</DefaultClientScript>
129 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
130 <DefaultTargetSchema>IE50</DefaultTargetSchema>
131 <DelaySign>false</DelaySign>
132 <OutputType>Library</OutputType>
133 <AppDesignerFolder></AppDesignerFolder>
134 <RootNamespace>OpenGrid.Framework.Data</RootNamespace>
135 <StartupObject></StartupObject>
136 <FileUpgradeFlags>
137 </FileUpgradeFlags>
138 </PropertyGroup>
139 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
140 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
141 <BaseAddress>285212672</BaseAddress>
142 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
143 <ConfigurationOverrideFile>
144 </ConfigurationOverrideFile>
145 <DefineConstants>TRACE;DEBUG</DefineConstants>
146 <DocumentationFile></DocumentationFile>
147 <DebugSymbols>True</DebugSymbols>
148 <FileAlignment>4096</FileAlignment>
149 <Optimize>False</Optimize>
150 <OutputPath>..\..\bin\</OutputPath>
151 <RegisterForComInterop>False</RegisterForComInterop>
152 <RemoveIntegerChecks>False</RemoveIntegerChecks>
153 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
154 <WarningLevel>4</WarningLevel>
155 <NoWarn></NoWarn>
156 </PropertyGroup>
157 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
158 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
159 <BaseAddress>285212672</BaseAddress>
160 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
161 <ConfigurationOverrideFile>
162 </ConfigurationOverrideFile>
163 <DefineConstants>TRACE</DefineConstants>
164 <DocumentationFile></DocumentationFile>
165 <DebugSymbols>False</DebugSymbols>
166 <FileAlignment>4096</FileAlignment>
167 <Optimize>True</Optimize>
168 <OutputPath>..\..\bin\</OutputPath>
169 <RegisterForComInterop>False</RegisterForComInterop>
170 <RemoveIntegerChecks>False</RemoveIntegerChecks>
171 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
172 <WarningLevel>4</WarningLevel>
173 <NoWarn></NoWarn>
174 </PropertyGroup>
175 <ItemGroup>
176 <Reference Include="System" >
177 <HintPath>System.dll</HintPath>
178 <Private>False</Private>
179 </Reference>
180 <Reference Include="System.Xml" >
181 <HintPath>System.Xml.dll</HintPath>
182 <Private>False</Private>
183 </Reference>
184 <Reference Include="System.Data" >
185 <HintPath>System.Data.dll</HintPath>
186 <Private>False</Private>
187 </Reference>
188 <Reference Include="libsecondlife.dll" >
189 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
190 <Private>False</Private>
191 </Reference>
192 </ItemGroup>
193 <ItemGroup>
194 </ItemGroup>
195 <ItemGroup>
196 <Compile Include="GridData.cs">
197 <SubType>Code</SubType>
198 </Compile>
199 <Compile Include="SimProfileData.cs">
200 <SubType>Code</SubType>
201 </Compile>
202 <Compile Include="ILogData.cs">
203 <SubType>Code</SubType>
204 </Compile>
205 <Compile Include="IniConfig.cs">
206 <SubType>Code</SubType>
207 </Compile>
208 <Compile Include="InventoryData.cs">
209 <SubType>Code</SubType>
210 </Compile>
211 <Compile Include="UserData.cs">
212 <SubType>Code</SubType>
213 </Compile>
214 <Compile Include="UserProfileData.cs">
215 <SubType>Code</SubType>
216 </Compile>
217 <Compile Include="Properties\AssemblyInfo.cs">
218 <SubType>Code</SubType>
219 </Compile>
220 </ItemGroup>
221 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
222 <PropertyGroup>
223 <PreBuildEvent>
224 </PreBuildEvent>
225 <PostBuildEvent>
226 </PostBuildEvent>
227 </PropertyGroup>
228</Project>
229>>>>>>> .r921
diff --git a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.mine b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.mine
new file mode 100644
index 0000000..a572204
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.mine
@@ -0,0 +1,113 @@
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>{62CDF671-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</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</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 </ItemGroup>
78 <ItemGroup>
79 </ItemGroup>
80 <ItemGroup>
81 <Compile Include="GridData.cs">
82 <SubType>Code</SubType>
83 </Compile>
84 <Compile Include="ILogData.cs">
85 <SubType>Code</SubType>
86 </Compile>
87 <Compile Include="IniConfig.cs">
88 <SubType>Code</SubType>
89 </Compile>
90 <Compile Include="InventoryData.cs">
91 <SubType>Code</SubType>
92 </Compile>
93 <Compile Include="SimProfileData.cs">
94 <SubType>Code</SubType>
95 </Compile>
96 <Compile Include="UserData.cs">
97 <SubType>Code</SubType>
98 </Compile>
99 <Compile Include="UserProfileData.cs">
100 <SubType>Code</SubType>
101 </Compile>
102 <Compile Include="Properties\AssemblyInfo.cs">
103 <SubType>Code</SubType>
104 </Compile>
105 </ItemGroup>
106 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
107 <PropertyGroup>
108 <PreBuildEvent>
109 </PreBuildEvent>
110 <PostBuildEvent>
111 </PostBuildEvent>
112 </PropertyGroup>
113</Project>
diff --git a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r858 b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r858
new file mode 100644
index 0000000..3b6d24d
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r858
@@ -0,0 +1,110 @@
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>{12DD8EB8-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</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</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 </ItemGroup>
78 <ItemGroup>
79 </ItemGroup>
80 <ItemGroup>
81 <Compile Include="GridData.cs">
82 <SubType>Code</SubType>
83 </Compile>
84 <Compile Include="ILogData.cs">
85 <SubType>Code</SubType>
86 </Compile>
87 <Compile Include="IniConfig.cs">
88 <SubType>Code</SubType>
89 </Compile>
90 <Compile Include="SimProfileData.cs">
91 <SubType>Code</SubType>
92 </Compile>
93 <Compile Include="UserData.cs">
94 <SubType>Code</SubType>
95 </Compile>
96 <Compile Include="UserProfileData.cs">
97 <SubType>Code</SubType>
98 </Compile>
99 <Compile Include="Properties/AssemblyInfo.cs">
100 <SubType>Code</SubType>
101 </Compile>
102 </ItemGroup>
103 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
104 <PropertyGroup>
105 <PreBuildEvent>
106 </PreBuildEvent>
107 <PostBuildEvent>
108 </PostBuildEvent>
109 </PropertyGroup>
110</Project>
diff --git a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r921 b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r921
new file mode 100644
index 0000000..990cd16
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.r921
@@ -0,0 +1,113 @@
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>{62CDF671-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</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</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 </ItemGroup>
78 <ItemGroup>
79 </ItemGroup>
80 <ItemGroup>
81 <Compile Include="GridData.cs">
82 <SubType>Code</SubType>
83 </Compile>
84 <Compile Include="SimProfileData.cs">
85 <SubType>Code</SubType>
86 </Compile>
87 <Compile Include="ILogData.cs">
88 <SubType>Code</SubType>
89 </Compile>
90 <Compile Include="IniConfig.cs">
91 <SubType>Code</SubType>
92 </Compile>
93 <Compile Include="InventoryData.cs">
94 <SubType>Code</SubType>
95 </Compile>
96 <Compile Include="UserData.cs">
97 <SubType>Code</SubType>
98 </Compile>
99 <Compile Include="UserProfileData.cs">
100 <SubType>Code</SubType>
101 </Compile>
102 <Compile Include="Properties\AssemblyInfo.cs">
103 <SubType>Code</SubType>
104 </Compile>
105 </ItemGroup>
106 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
107 <PropertyGroup>
108 <PreBuildEvent>
109 </PreBuildEvent>
110 <PostBuildEvent>
111 </PostBuildEvent>
112 </PropertyGroup>
113</Project>
diff --git a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.user b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.user
new file mode 100644
index 0000000..1b6b14d
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.csproj.user
@@ -0,0 +1,12 @@
1<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5 <ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
6 <LastOpenVersion>8.0.50727</LastOpenVersion>
7 <ProjectView>ProjectFiles</ProjectView>
8 <ProjectTrust>0</ProjectTrust>
9 </PropertyGroup>
10 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
11 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
12</Project>
diff --git a/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build
new file mode 100644
index 0000000..c993a8d
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data/OpenGrid.Framework.Data.dll.build
@@ -0,0 +1,49 @@
1<?xml version="1.0" ?>
2<project name="OpenGrid.Framework.Data" 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" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="GridData.cs" />
15 <include name="SimProfileData.cs" />
16 <include name="ILogData.cs" />
17 <include name="IniConfig.cs" />
18 <include name="InventoryData.cs" />
19 <include name="UserData.cs" />
20 <include name="UserProfileData.cs" />
21 <include name="Properties/AssemblyInfo.cs" />
22 </sources>
23 <references basedir="${project::get-base-directory()}">
24 <lib>
25 <include name="${project::get-base-directory()}" />
26 <include name="${project::get-base-directory()}/${build.dir}" />
27 </lib>
28 <include name="System.dll" />
29 <include name="System.Xml.dll" />
30 <include name="System.Data.dll" />
31 <include name="../../bin/libsecondlife.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/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..1446673
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using 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")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OpenGrid.Framework.Data")]
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("3a711c34-b0c0-4264-b0fe-f366eabf9d7b")]
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/SimProfileData.cs b/OpenGridServices/OpenGrid.Framework.Data/SimProfileData.cs
new file mode 100644
index 0000000..a3e7cb7
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data/SimProfileData.cs
@@ -0,0 +1,114 @@
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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31
32namespace OpenGrid.Framework.Data
33{
34 /// <summary>
35 /// A class which contains information known to the grid server about a region
36 /// </summary>
37 public class SimProfileData
38 {
39 /// <summary>
40 /// The name of the region
41 /// </summary>
42 public string regionName = "";
43
44 /// <summary>
45 /// A 64-bit number combining map position into a (mostly) unique ID
46 /// </summary>
47 public ulong regionHandle;
48
49 /// <summary>
50 /// OGS/OpenSim Specific ID for a region
51 /// </summary>
52 public libsecondlife.LLUUID UUID;
53
54 /// <summary>
55 /// Coordinates of the region
56 /// </summary>
57 public uint regionLocX;
58 public uint regionLocY;
59 public uint regionLocZ; // Reserved (round-robin, layers, etc)
60
61 /// <summary>
62 /// Authentication secrets
63 /// </summary>
64 /// <remarks>Not very secure, needs improvement.</remarks>
65 public string regionSendKey = "";
66 public string regionRecvKey = "";
67 public string regionSecret = "";
68
69 /// <summary>
70 /// Whether the region is online
71 /// </summary>
72 public bool regionOnline;
73
74 /// <summary>
75 /// Information about the server that the region is currently hosted on
76 /// </summary>
77 public string serverIP = "";
78 public uint serverPort;
79 public string serverURI = "";
80
81 /// <summary>
82 /// Set of optional overrides. Can be used to create non-eulicidean spaces.
83 /// </summary>
84 public ulong regionNorthOverrideHandle;
85 public ulong regionSouthOverrideHandle;
86 public ulong regionEastOverrideHandle;
87 public ulong regionWestOverrideHandle;
88
89 /// <summary>
90 /// Optional: URI Location of the region database
91 /// </summary>
92 /// <remarks>Used for floating sim pools where the region data is not nessecarily coupled to a specific server</remarks>
93 public string regionDataURI = "";
94
95 /// <summary>
96 /// Region Asset Details
97 /// </summary>
98 public string regionAssetURI = "";
99 public string regionAssetSendKey = "";
100 public string regionAssetRecvKey = "";
101
102 /// <summary>
103 /// Region Userserver Details
104 /// </summary>
105 public string regionUserURI = "";
106 public string regionUserSendKey = "";
107 public string regionUserRecvKey = "";
108
109 /// <summary>
110 /// Region Map Texture Asset
111 /// </summary>
112 public libsecondlife.LLUUID regionMapTextureID = new libsecondlife.LLUUID("00000000-0000-0000-9999-000000000006");
113 }
114}
diff --git a/OpenGridServices/OpenGrid.Framework.Data/UserData.cs b/OpenGridServices/OpenGrid.Framework.Data/UserData.cs
new file mode 100644
index 0000000..c2d5a72
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data/UserData.cs
@@ -0,0 +1,131 @@
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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenGrid.Framework.Data
34{
35 /// <summary>
36 /// An interface for connecting to user storage servers.
37 /// </summary>
38 public interface IUserData
39 {
40 /// <summary>
41 /// Returns a user profile from a database via their UUID
42 /// </summary>
43 /// <param name="user">The accounts UUID</param>
44 /// <returns>The user data profile</returns>
45 UserProfileData getUserByUUID(LLUUID user);
46
47 /// <summary>
48 /// Returns a users profile by searching their username
49 /// </summary>
50 /// <param name="name">The users username</param>
51 /// <returns>The user data profile</returns>
52 UserProfileData getUserByName(string name);
53
54 /// <summary>
55 /// Returns a users profile by searching their username parts
56 /// </summary>
57 /// <param name="fname">Account firstname</param>
58 /// <param name="lname">Account lastname</param>
59 /// <returns>The user data profile</returns>
60 UserProfileData getUserByName(string fname, string lname);
61
62 /// <summary>
63 /// Returns the current agent for a user searching by it's UUID
64 /// </summary>
65 /// <param name="user">The users UUID</param>
66 /// <returns>The current agent session</returns>
67 UserAgentData getAgentByUUID(LLUUID user);
68
69 /// <summary>
70 /// Returns the current session agent for a user searching by username
71 /// </summary>
72 /// <param name="name">The users account name</param>
73 /// <returns>The current agent session</returns>
74 UserAgentData getAgentByName(string name);
75
76 /// <summary>
77 /// Returns the current session agent for a user searching by username parts
78 /// </summary>
79 /// <param name="fname">The users first account name</param>
80 /// <param name="lname">The users account surname</param>
81 /// <returns>The current agent session</returns>
82 UserAgentData getAgentByName(string fname, string lname);
83
84 /// <summary>
85 /// Adds a new User profile to the database
86 /// </summary>
87 /// <param name="user">UserProfile to add</param>
88 void addNewUserProfile(UserProfileData user);
89
90 /// <summary>
91 /// Adds a new agent to the database
92 /// </summary>
93 /// <param name="agent">The agent to add</param>
94 void addNewUserAgent(UserAgentData agent);
95
96 /// <summary>
97 /// Attempts to move currency units between accounts (NOT RELIABLE / TRUSTWORTHY. DONT TRY RUN YOUR OWN CURRENCY EXCHANGE WITH REAL VALUES)
98 /// </summary>
99 /// <param name="from">The account to transfer from</param>
100 /// <param name="to">The account to transfer to</param>
101 /// <param name="amount">The amount to transfer</param>
102 /// <returns>Successful?</returns>
103 bool moneyTransferRequest(LLUUID from, LLUUID to, uint amount);
104
105 /// <summary>
106 /// Attempts to move inventory between accounts, if inventory is copyable it will be copied into the target account.
107 /// </summary>
108 /// <param name="from">User to transfer from</param>
109 /// <param name="to">User to transfer to</param>
110 /// <param name="inventory">Specified inventory item</param>
111 /// <returns>Successful?</returns>
112 bool inventoryTransferRequest(LLUUID from, LLUUID to, LLUUID inventory);
113
114 /// <summary>
115 /// Returns the plugin version
116 /// </summary>
117 /// <returns>Plugin version in MAJOR.MINOR.REVISION.BUILD format</returns>
118 string getVersion();
119
120 /// <summary>
121 /// Returns the plugin name
122 /// </summary>
123 /// <returns>Plugin name, eg MySQL User Provider</returns>
124 string getName();
125
126 /// <summary>
127 /// Initialises the plugin (artificial constructor)
128 /// </summary>
129 void Initialise();
130 }
131}
diff --git a/OpenGridServices/OpenGrid.Framework.Data/UserProfileData.cs b/OpenGridServices/OpenGrid.Framework.Data/UserProfileData.cs
new file mode 100644
index 0000000..82633e1
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Data/UserProfileData.cs
@@ -0,0 +1,182 @@
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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using libsecondlife;
32
33namespace OpenGrid.Framework.Data
34{
35 /// <summary>
36 /// Information about a particular user known to the userserver
37 /// </summary>
38 public class UserProfileData
39 {
40 /// <summary>
41 /// The ID value for this user
42 /// </summary>
43 public LLUUID UUID;
44
45 /// <summary>
46 /// The first component of a users account name
47 /// </summary>
48 public string username;
49 /// <summary>
50 /// The second component of a users account name
51 /// </summary>
52 public string surname;
53
54 /// <summary>
55 /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt)
56 /// </summary>
57 /// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks>
58 public string passwordHash;
59 /// <summary>
60 /// The salt used for the users hash, should be 32 bytes or longer
61 /// </summary>
62 public string passwordSalt;
63
64 /// <summary>
65 /// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into
66 /// </summary>
67 public ulong homeRegion;
68 /// <summary>
69 /// The coordinates inside the region of the home location
70 /// </summary>
71 public LLVector3 homeLocation;
72 /// <summary>
73 /// Where the user will be looking when they rez.
74 /// </summary>
75 public LLVector3 homeLookAt;
76
77 /// <summary>
78 /// A UNIX Timestamp (seconds since epoch) for the users creation
79 /// </summary>
80 public int created;
81 /// <summary>
82 /// A UNIX Timestamp for the users last login date / time
83 /// </summary>
84 public int lastLogin;
85
86 /// <summary>
87 /// A URI to the users inventory server, used for foreigners and large grids
88 /// </summary>
89 public string userInventoryURI;
90 /// <summary>
91 /// A URI to the users asset server, used for foreigners and large grids.
92 /// </summary>
93 public string userAssetURI;
94
95 /// <summary>
96 /// A uint mask containing the "I can do" fields of the users profile
97 /// </summary>
98 public uint profileCanDoMask;
99 /// <summary>
100 /// A uint mask containing the "I want to do" part of the users profile
101 /// </summary>
102 public uint profileWantDoMask; // Profile window "I want to" mask
103
104 /// <summary>
105 /// The about text listed in a users profile.
106 /// </summary>
107 public string profileAboutText;
108 /// <summary>
109 /// The first life about text listed in a users profile
110 /// </summary>
111 public string profileFirstText;
112
113 /// <summary>
114 /// The profile image for an avatar stored on the asset server
115 /// </summary>
116 public LLUUID profileImage;
117 /// <summary>
118 /// The profile image for the users first life tab
119 /// </summary>
120 public LLUUID profileFirstImage;
121 /// <summary>
122 /// The users last registered agent (filled in on the user server)
123 /// </summary>
124 public UserAgentData currentAgent;
125 }
126
127 /// <summary>
128 /// Information about a users session
129 /// </summary>
130 public class UserAgentData
131 {
132 /// <summary>
133 /// The UUID of the users avatar (not the agent!)
134 /// </summary>
135 public LLUUID UUID;
136 /// <summary>
137 /// The IP address of the user
138 /// </summary>
139 public string agentIP;
140 /// <summary>
141 /// The port of the user
142 /// </summary>
143 public uint agentPort;
144 /// <summary>
145 /// Is the user online?
146 /// </summary>
147 public bool agentOnline;
148 /// <summary>
149 /// The session ID for the user (also the agent ID)
150 /// </summary>
151 public LLUUID sessionID;
152 /// <summary>
153 /// The "secure" session ID for the user
154 /// </summary>
155 /// <remarks>Not very secure. Dont rely on it for anything more than Linden Lab does.</remarks>
156 public LLUUID secureSessionID;
157 /// <summary>
158 /// The region the user logged into initially
159 /// </summary>
160 public LLUUID regionID;
161 /// <summary>
162 /// A unix timestamp from when the user logged in
163 /// </summary>
164 public int loginTime;
165 /// <summary>
166 /// When this agent expired and logged out, 0 if still online
167 /// </summary>
168 public int logoutTime;
169 /// <summary>
170 /// Current region the user is logged into
171 /// </summary>
172 public LLUUID currentRegion;
173 /// <summary>
174 /// Region handle of the current region the user is in
175 /// </summary>
176 public ulong currentHandle;
177 /// <summary>
178 /// The position of the user within the region
179 /// </summary>
180 public LLVector3 currentPos;
181 }
182}
diff --git a/OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs b/OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs
new file mode 100644
index 0000000..dfc572a
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Manager/GridManagementAgent.cs
@@ -0,0 +1,140 @@
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*/
28using Nwc.XmlRpc;
29using OpenSim.Framework;
30using OpenSim.Servers;
31using System.Collections;
32using System.Collections.Generic;
33using libsecondlife;
34
35namespace 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
new file mode 100644
index 0000000..d665ab4
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Manager/GridServerManager.cs
@@ -0,0 +1,94 @@
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
29using System;
30using System.Collections;
31using System.Collections.Generic;
32using Nwc.XmlRpc;
33using System.Threading;
34using libsecondlife;
35
36namespace 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
new file mode 100644
index 0000000..dad56cb
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj
@@ -0,0 +1,99 @@
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="System" >
62 <HintPath>System.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="OpenSim.Framework.dll" >
66 <HintPath>..\..\bin\OpenSim.Framework.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="OpenSim.Servers.dll" >
70 <HintPath>..\..\bin\OpenSim.Servers.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="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.csproj.user b/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj.user
new file mode 100644
index 0000000..1b6b14d
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.csproj.user
@@ -0,0 +1,12 @@
1<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5 <ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
6 <LastOpenVersion>8.0.50727</LastOpenVersion>
7 <ProjectView>ProjectFiles</ProjectView>
8 <ProjectTrust>0</ProjectTrust>
9 </PropertyGroup>
10 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
11 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
12</Project>
diff --git a/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build b/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build
new file mode 100644
index 0000000..f8cc80e
--- /dev/null
+++ b/OpenGridServices/OpenGrid.Framework.Manager/OpenGrid.Framework.Manager.dll.build
@@ -0,0 +1,44 @@
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="System.dll" />
23 <include name="../../bin/OpenSim.Framework.dll" />
24 <include name="../../bin/OpenSim.Servers.dll" />
25 <include name="../../bin/libsecondlife.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
new file mode 100644
index 0000000..6fc6bf8
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.AssetServer/AssetHttpServer.cs
@@ -0,0 +1,130 @@
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*/
28using System;
29using System.Collections.Generic;
30using System.Net;
31using System.Text;
32using System.Text.RegularExpressions;
33using System.Threading;
34//using OpenSim.CAPS;
35using Nwc.XmlRpc;
36using System.Collections;
37using OpenSim.Framework.Console;
38using OpenSim.Servers;
39
40namespace 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
new file mode 100644
index 0000000..e9b94ea
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.AssetServer/Main.cs
@@ -0,0 +1,338 @@
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
29using System;
30using System.IO;
31using System.Text;
32using System.Timers;
33using System.Net;
34using System.Reflection;
35using System.Threading;
36using libsecondlife;
37using OpenSim.Framework;
38using OpenSim.Framework.Sims;
39using OpenSim.Framework.Console;
40using OpenSim.Framework.Types;
41using OpenSim.Framework.Interfaces;
42using OpenSim.Framework.Utilities;
43using OpenSim.GridInterfaces.Local; // REFACTORING IS NEEDED!!!!!!!!!!!
44using OpenSim.Servers;
45using Db4objects.Db4o;
46using Db4objects.Db4o.Query;
47
48namespace OpenGridServices.AssetServer
49{
50 /// <summary>
51 /// An asset server
52 /// </summary>
53 public class OpenAsset_Main : BaseServer, conscmd_callback
54 {
55 private IObjectContainer db;
56
57 public static OpenAsset_Main assetserver;
58
59 private ConsoleBase m_console;
60
61 [STAThread]
62 public static void Main(string[] args)
63 {
64 Console.WriteLine("Starting...\n");
65
66 assetserver = new OpenAsset_Main();
67 assetserver.Startup();
68
69 assetserver.Work();
70 }
71
72 private void Work()
73 {
74 m_console.Notice("Enter help for a list of commands");
75
76 while (true)
77 {
78 m_console.MainConsolePrompt();
79 }
80 }
81
82 private OpenAsset_Main()
83 {
84 m_console = new ConsoleBase("opengrid-AssetServer-console.log", "OpenAsset", this, false);
85 MainConsole.Instance = m_console;
86 }
87
88 public void Startup()
89 {
90 m_console.Verbose( "Main.cs:Startup() - Setting up asset DB");
91 setupDB();
92
93 m_console.Verbose( "Main.cs:Startup() - Starting HTTP process");
94 AssetHttpServer httpServer = new AssetHttpServer(8003);
95
96
97 httpServer.AddRestHandler("GET", "/assets/", this.assetGetMethod);
98 httpServer.AddRestHandler("POST", "/assets/", this.assetPostMethod);
99
100 httpServer.Start();
101
102 }
103
104 public string assetPostMethod(string requestBody, string path, string param)
105 {
106 AssetBase asset = new AssetBase();
107 asset.Name = "";
108 asset.FullID = new LLUUID(param);
109 Encoding Windows1252Encoding = Encoding.GetEncoding(1252);
110 byte[] buffer = Windows1252Encoding.GetBytes(requestBody);
111 asset.Data = buffer;
112 AssetStorage store = new AssetStorage();
113 store.Data = asset.Data;
114 store.Name = asset.Name;
115 store.UUID = asset.FullID;
116 db.Set(store);
117 db.Commit();
118 return "";
119 }
120
121 public string assetGetMethod(string request, string path, string param)
122 {
123 Console.WriteLine("got a request " + param);
124 byte[] assetdata = getAssetData(new LLUUID(param), false);
125 if (assetdata != null)
126 {
127 Encoding Windows1252Encoding = Encoding.GetEncoding(1252);
128 string ret = Windows1252Encoding.GetString(assetdata);
129 //string ret = System.Text.Encoding.Unicode.GetString(assetdata);
130
131 return ret;
132
133 }
134 else
135 {
136 return "";
137 }
138
139 }
140
141 public byte[] getAssetData(LLUUID assetID, bool isTexture)
142 {
143 bool found = false;
144 AssetStorage foundAsset = null;
145
146 IObjectSet result = db.Get(new AssetStorage(assetID));
147 if (result.Count > 0)
148 {
149 foundAsset = (AssetStorage)result.Next();
150 found = true;
151 }
152
153 if (found)
154 {
155 return foundAsset.Data;
156 }
157 else
158 {
159 return null;
160 }
161 }
162
163 public void setupDB()
164 {
165 bool yapfile = System.IO.File.Exists("assets.yap");
166 try
167 {
168 db = Db4oFactory.OpenFile("assets.yap");
169 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Main.cs:setupDB() - creation");
170 }
171 catch (Exception e)
172 {
173 db.Close();
174 OpenSim.Framework.Console.MainConsole.Instance.Warn("Main.cs:setupDB() - Exception occured");
175 OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString());
176 }
177 if (!yapfile)
178 {
179 this.LoadDB();
180 }
181 }
182
183 public void LoadDB()
184 {
185 try
186 {
187
188 Console.WriteLine("setting up Asset database");
189
190 AssetBase Image = new AssetBase();
191 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000001");
192 Image.Name = "Bricks";
193 this.LoadAsset(Image, true, "bricks.jp2");
194 AssetStorage store = new AssetStorage();
195 store.Data = Image.Data;
196 store.Name = Image.Name;
197 store.UUID = Image.FullID;
198 db.Set(store);
199 db.Commit();
200
201 Image = new AssetBase();
202 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000002");
203 Image.Name = "Plywood";
204 this.LoadAsset(Image, true, "plywood.jp2");
205 store = new AssetStorage();
206 store.Data = Image.Data;
207 store.Name = Image.Name;
208 store.UUID = Image.FullID;
209 db.Set(store);
210 db.Commit();
211
212 Image = new AssetBase();
213 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000003");
214 Image.Name = "Rocks";
215 this.LoadAsset(Image, true, "rocks.jp2");
216 store = new AssetStorage();
217 store.Data = Image.Data;
218 store.Name = Image.Name;
219 store.UUID = Image.FullID;
220 db.Set(store);
221 db.Commit();
222
223 Image = new AssetBase();
224 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000004");
225 Image.Name = "Granite";
226 this.LoadAsset(Image, true, "granite.jp2");
227 store = new AssetStorage();
228 store.Data = Image.Data;
229 store.Name = Image.Name;
230 store.UUID = Image.FullID;
231 db.Set(store);
232 db.Commit();
233
234 Image = new AssetBase();
235 Image.FullID = new LLUUID("00000000-0000-0000-9999-000000000005");
236 Image.Name = "Hardwood";
237 this.LoadAsset(Image, true, "hardwood.jp2");
238 store = new AssetStorage();
239 store.Data = Image.Data;
240 store.Name = Image.Name;
241 store.UUID = Image.FullID;
242 db.Set(store);
243 db.Commit();
244
245 Image = new AssetBase();
246 Image.FullID = new LLUUID("00000000-0000-0000-5005-000000000005");
247 Image.Name = "Prim Base Texture";
248 this.LoadAsset(Image, true, "plywood.jp2");
249 store = new AssetStorage();
250 store.Data = Image.Data;
251 store.Name = Image.Name;
252 store.UUID = Image.FullID;
253 db.Set(store);
254 db.Commit();
255
256 Image = new AssetBase();
257 Image.FullID = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
258 Image.Name = "Shape";
259 this.LoadAsset(Image, false, "base_shape.dat");
260 store = new AssetStorage();
261 store.Data = Image.Data;
262 store.Name = Image.Name;
263 store.UUID = Image.FullID;
264 db.Set(store);
265 db.Commit();
266 }
267 catch (Exception e)
268 {
269 Console.WriteLine(e.Message);
270 }
271 }
272
273 private void LoadAsset(AssetBase info, bool image, string filename)
274 {
275
276
277 string dataPath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "assets"); //+ folder;
278 string fileName = Path.Combine(dataPath, filename);
279 FileInfo fInfo = new FileInfo(fileName);
280 long numBytes = fInfo.Length;
281 FileStream fStream = new FileStream(fileName, FileMode.Open, FileAccess.Read);
282 byte[] idata = new byte[numBytes];
283 BinaryReader br = new BinaryReader(fStream);
284 idata = br.ReadBytes((int)numBytes);
285 br.Close();
286 fStream.Close();
287 info.Data = idata;
288 //info.loaded=true;
289 }
290
291 /*private GridConfig LoadConfigDll(string dllName)
292 {
293 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
294 GridConfig config = null;
295
296 foreach (Type pluginType in pluginAssembly.GetTypes())
297 {
298 if (pluginType.IsPublic)
299 {
300 if (!pluginType.IsAbstract)
301 {
302 Type typeInterface = pluginType.GetInterface("IGridConfig", true);
303
304 if (typeInterface != null)
305 {
306 IGridConfig plug = (IGridConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
307 config = plug.GetConfigObject();
308 break;
309 }
310
311 typeInterface = null;
312 }
313 }
314 }
315 pluginAssembly = null;
316 return config;
317 }*/
318
319 public void RunCmd(string cmd, string[] cmdparams)
320 {
321 switch (cmd)
322 {
323 case "help":
324 m_console.Notice("shutdown - shutdown this asset server (USE CAUTION!)");
325 break;
326
327 case "shutdown":
328 m_console.Close();
329 Environment.Exit(0);
330 break;
331 }
332 }
333
334 public void Show(string ShowWhat)
335 {
336 }
337 }
338}
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj
new file mode 100644
index 0000000..53afe16
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj
@@ -0,0 +1,247 @@
1<<<<<<< .mine
2<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <PropertyGroup>
4 <ProjectType>Local</ProjectType>
5 <ProductVersion>8.0.50727</ProductVersion>
6 <SchemaVersion>2.0</SchemaVersion>
7 <ProjectGuid>{0021261B-0000-0000-0000-000000000000}</ProjectGuid>
8 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
9 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
10 <ApplicationIcon></ApplicationIcon>
11 <AssemblyKeyContainerName>
12 </AssemblyKeyContainerName>
13 <AssemblyName>OpenGridServices.AssetServer</AssemblyName>
14 <DefaultClientScript>JScript</DefaultClientScript>
15 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
16 <DefaultTargetSchema>IE50</DefaultTargetSchema>
17 <DelaySign>false</DelaySign>
18 <OutputType>Exe</OutputType>
19 <AppDesignerFolder></AppDesignerFolder>
20 <RootNamespace>OpenGridServices.AssetServer</RootNamespace>
21 <StartupObject></StartupObject>
22 <FileUpgradeFlags>
23 </FileUpgradeFlags>
24 </PropertyGroup>
25 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
26 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
27 <BaseAddress>285212672</BaseAddress>
28 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
29 <ConfigurationOverrideFile>
30 </ConfigurationOverrideFile>
31 <DefineConstants>TRACE;DEBUG</DefineConstants>
32 <DocumentationFile></DocumentationFile>
33 <DebugSymbols>True</DebugSymbols>
34 <FileAlignment>4096</FileAlignment>
35 <Optimize>False</Optimize>
36 <OutputPath>..\..\bin\</OutputPath>
37 <RegisterForComInterop>False</RegisterForComInterop>
38 <RemoveIntegerChecks>False</RemoveIntegerChecks>
39 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
40 <WarningLevel>4</WarningLevel>
41 <NoWarn></NoWarn>
42 </PropertyGroup>
43 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
44 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
45 <BaseAddress>285212672</BaseAddress>
46 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
47 <ConfigurationOverrideFile>
48 </ConfigurationOverrideFile>
49 <DefineConstants>TRACE</DefineConstants>
50 <DocumentationFile></DocumentationFile>
51 <DebugSymbols>False</DebugSymbols>
52 <FileAlignment>4096</FileAlignment>
53 <Optimize>True</Optimize>
54 <OutputPath>..\..\bin\</OutputPath>
55 <RegisterForComInterop>False</RegisterForComInterop>
56 <RemoveIntegerChecks>False</RemoveIntegerChecks>
57 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
58 <WarningLevel>4</WarningLevel>
59 <NoWarn></NoWarn>
60 </PropertyGroup>
61 <ItemGroup>
62 <Reference Include="System" >
63 <HintPath>System.dll</HintPath>
64 <Private>False</Private>
65 </Reference>
66 <Reference Include="System.Data" >
67 <HintPath>System.Data.dll</HintPath>
68 <Private>False</Private>
69 </Reference>
70 <Reference Include="System.Xml" >
71 <HintPath>System.Xml.dll</HintPath>
72 <Private>False</Private>
73 </Reference>
74 <Reference Include="OpenSim.Framework" >
75 <HintPath>OpenSim.Framework.dll</HintPath>
76 <Private>False</Private>
77 </Reference>
78 <Reference Include="OpenSim.Framework.Console" >
79 <HintPath>OpenSim.Framework.Console.dll</HintPath>
80 <Private>False</Private>
81 </Reference>
82 <Reference Include="OpenSim.GridInterfaces.Local" >
83 <HintPath>OpenSim.GridInterfaces.Local.dll</HintPath>
84 <Private>False</Private>
85 </Reference>
86 <Reference Include="OpenSim.Servers" >
87 <HintPath>OpenSim.Servers.dll</HintPath>
88 <Private>False</Private>
89 </Reference>
90 <Reference Include="libsecondlife.dll" >
91 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
92 <Private>False</Private>
93 </Reference>
94 <Reference Include="Db4objects.Db4o.dll" >
95 <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath>
96 <Private>False</Private>
97 </Reference>
98 <Reference Include="XMLRPC" >
99 <HintPath>XMLRPC.dll</HintPath>
100 <Private>False</Private>
101 </Reference>
102 </ItemGroup>
103 <ItemGroup>
104 </ItemGroup>
105 <ItemGroup>
106 <Compile Include="AssetHttpServer.cs">
107 <SubType>Code</SubType>
108 </Compile>
109 <Compile Include="Main.cs">
110 <SubType>Code</SubType>
111 </Compile>
112 <Compile Include="Properties\AssemblyInfo.cs">
113 <SubType>Code</SubType>
114 </Compile>
115 </ItemGroup>
116 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
117 <PropertyGroup>
118 <PreBuildEvent>
119 </PreBuildEvent>
120 <PostBuildEvent>
121 </PostBuildEvent>
122 </PropertyGroup>
123</Project>
124=======
125<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
126 <PropertyGroup>
127 <ProjectType>Local</ProjectType>
128 <ProductVersion>8.0.50727</ProductVersion>
129 <SchemaVersion>2.0</SchemaVersion>
130 <ProjectGuid>{0021261B-0000-0000-0000-000000000000}</ProjectGuid>
131 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
132 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
133 <ApplicationIcon></ApplicationIcon>
134 <AssemblyKeyContainerName>
135 </AssemblyKeyContainerName>
136 <AssemblyName>OpenGridServices.AssetServer</AssemblyName>
137 <DefaultClientScript>JScript</DefaultClientScript>
138 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
139 <DefaultTargetSchema>IE50</DefaultTargetSchema>
140 <DelaySign>false</DelaySign>
141 <OutputType>Exe</OutputType>
142 <AppDesignerFolder></AppDesignerFolder>
143 <RootNamespace>OpenGridServices.AssetServer</RootNamespace>
144 <StartupObject></StartupObject>
145 <FileUpgradeFlags>
146 </FileUpgradeFlags>
147 </PropertyGroup>
148 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
149 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
150 <BaseAddress>285212672</BaseAddress>
151 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
152 <ConfigurationOverrideFile>
153 </ConfigurationOverrideFile>
154 <DefineConstants>TRACE;DEBUG</DefineConstants>
155 <DocumentationFile></DocumentationFile>
156 <DebugSymbols>True</DebugSymbols>
157 <FileAlignment>4096</FileAlignment>
158 <Optimize>False</Optimize>
159 <OutputPath>..\..\bin\</OutputPath>
160 <RegisterForComInterop>False</RegisterForComInterop>
161 <RemoveIntegerChecks>False</RemoveIntegerChecks>
162 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
163 <WarningLevel>4</WarningLevel>
164 <NoWarn></NoWarn>
165 </PropertyGroup>
166 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
167 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
168 <BaseAddress>285212672</BaseAddress>
169 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
170 <ConfigurationOverrideFile>
171 </ConfigurationOverrideFile>
172 <DefineConstants>TRACE</DefineConstants>
173 <DocumentationFile></DocumentationFile>
174 <DebugSymbols>False</DebugSymbols>
175 <FileAlignment>4096</FileAlignment>
176 <Optimize>True</Optimize>
177 <OutputPath>..\..\bin\</OutputPath>
178 <RegisterForComInterop>False</RegisterForComInterop>
179 <RemoveIntegerChecks>False</RemoveIntegerChecks>
180 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
181 <WarningLevel>4</WarningLevel>
182 <NoWarn></NoWarn>
183 </PropertyGroup>
184 <ItemGroup>
185 <Reference Include="System" >
186 <HintPath>System.dll</HintPath>
187 <Private>False</Private>
188 </Reference>
189 <Reference Include="System.Data" >
190 <HintPath>System.Data.dll</HintPath>
191 <Private>False</Private>
192 </Reference>
193 <Reference Include="System.Xml" >
194 <HintPath>System.Xml.dll</HintPath>
195 <Private>False</Private>
196 </Reference>
197 <Reference Include="OpenSim.Framework" >
198 <HintPath>OpenSim.Framework.dll</HintPath>
199 <Private>False</Private>
200 </Reference>
201 <Reference Include="OpenSim.Framework.Console" >
202 <HintPath>OpenSim.Framework.Console.dll</HintPath>
203 <Private>False</Private>
204 </Reference>
205 <Reference Include="OpenSim.GridInterfaces.Local" >
206 <HintPath>OpenSim.GridInterfaces.Local.dll</HintPath>
207 <Private>False</Private>
208 </Reference>
209 <Reference Include="OpenSim.Servers" >
210 <HintPath>OpenSim.Servers.dll</HintPath>
211 <Private>False</Private>
212 </Reference>
213 <Reference Include="libsecondlife.dll" >
214 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
215 <Private>False</Private>
216 </Reference>
217 <Reference Include="Db4objects.Db4o.dll" >
218 <HintPath>..\..\bin\Db4objects.Db4o.dll</HintPath>
219 <Private>False</Private>
220 </Reference>
221 <Reference Include="XMLRPC" >
222 <HintPath>XMLRPC.dll</HintPath>
223 <Private>False</Private>
224 </Reference>
225 </ItemGroup>
226 <ItemGroup>
227 </ItemGroup>
228 <ItemGroup>
229 <Compile Include="Main.cs">
230 <SubType>Code</SubType>
231 </Compile>
232 <Compile Include="AssetHttpServer.cs">
233 <SubType>Code</SubType>
234 </Compile>
235 <Compile Include="Properties\AssemblyInfo.cs">
236 <SubType>Code</SubType>
237 </Compile>
238 </ItemGroup>
239 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
240 <PropertyGroup>
241 <PreBuildEvent>
242 </PreBuildEvent>
243 <PostBuildEvent>
244 </PostBuildEvent>
245 </PropertyGroup>
246</Project>
247>>>>>>> .r921
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.mine b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.mine
new file mode 100644
index 0000000..257f6e1
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.mine
@@ -0,0 +1,122 @@
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
new file mode 100644
index 0000000..2b382c4
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.r858
@@ -0,0 +1,122 @@
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
new file mode 100644
index 0000000..031e405
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.r921
@@ -0,0 +1,122 @@
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.csproj.user b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.user
new file mode 100644
index 0000000..1b6b14d
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj.user
@@ -0,0 +1,12 @@
1<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5 <ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
6 <LastOpenVersion>8.0.50727</LastOpenVersion>
7 <ProjectView>ProjectFiles</ProjectView>
8 <ProjectTrust>0</ProjectTrust>
9 </PropertyGroup>
10 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
11 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
12</Project>
diff --git a/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build
new file mode 100644
index 0000000..0da1d34
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.AssetServer.exe.build
@@ -0,0 +1,50 @@
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="Main.cs" />
15 <include name="AssetHttpServer.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.GridInterfaces.Local.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.AssetServer/OpenGridServices.GridServer.csproj b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.csproj
new file mode 100644
index 0000000..9b8cc87
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.csproj
@@ -0,0 +1,126 @@
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
new file mode 100644
index 0000000..6bef534
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.AssetServer/OpenGridServices.GridServer.exe.build
@@ -0,0 +1,49 @@
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
new file mode 100644
index 0000000..7014284
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.AssetServer/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using 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-AssetServer")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OGS-AssetServer")]
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("b541b244-3d1d-4625-9003-bc2a3a6a39a4")]
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.GridServer/GridManager.cs b/OpenGridServices/OpenGridServices.GridServer/GridManager.cs
new file mode 100644
index 0000000..10cbf82
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.GridServer/GridManager.cs
@@ -0,0 +1,575 @@
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*/
28using System;
29using System.Collections;
30using System.Collections.Generic;
31using System.Text;
32using System.Reflection;
33using OpenGrid.Framework.Data;
34using OpenSim.Framework.Utilities;
35using OpenSim.Framework.Console;
36using OpenSim.Framework.Sims;
37using libsecondlife;
38using Nwc.XmlRpc;
39using System.Xml;
40
41namespace 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.MainConsole.Instance.Verbose("Storage: Attempting to load " + FileName);
57 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
58
59 OpenSim.Framework.Console.MainConsole.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.MainConsole.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.MainConsole.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.MainConsole.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.MainConsole.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.MainConsole.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.MainConsole.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 simProfileList.Add(simProfileBlock);
364 }
365 OpenSim.Framework.Console.MainConsole.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via FastMode");
366 }
367 else
368 {
369 SimProfileData simProfile;
370 for (int x = xmin; x < xmax; x++)
371 {
372 for (int y = ymin; y < ymax; y++)
373 {
374 simProfile = getRegion(Helpers.UIntsToLong((uint)(x * 256), (uint)(y * 256)));
375 if (simProfile != null)
376 {
377 Hashtable simProfileBlock = new Hashtable();
378 simProfileBlock["x"] = x;
379 simProfileBlock["y"] = y;
380 simProfileBlock["name"] = simProfile.regionName;
381 simProfileBlock["access"] = 0;
382 simProfileBlock["region-flags"] = 0;
383 simProfileBlock["water-height"] = 20;
384 simProfileBlock["agents"] = 1;
385 simProfileBlock["map-image-id"] = simProfile.regionMapTextureID.ToString();
386
387 simProfileList.Add(simProfileBlock);
388 }
389 }
390 }
391 OpenSim.Framework.Console.MainConsole.Instance.Verbose("World map request processed, returned " + simProfileList.Count.ToString() + " region(s) in range via Standard Mode");
392 }
393
394 responseData["sim-profiles"] = simProfileList;
395
396 return response;
397 }
398
399
400
401 /// <summary>
402 /// Performs a REST Get Operation
403 /// </summary>
404 /// <param name="request"></param>
405 /// <param name="path"></param>
406 /// <param name="param"></param>
407 /// <returns></returns>
408 public string RestGetRegionMethod(string request, string path, string param)
409 {
410 return RestGetSimMethod("", "/sims/", param);
411 }
412
413 /// <summary>
414 /// Performs a REST Set Operation
415 /// </summary>
416 /// <param name="request"></param>
417 /// <param name="path"></param>
418 /// <param name="param"></param>
419 /// <returns></returns>
420 public string RestSetRegionMethod(string request, string path, string param)
421 {
422 return RestSetSimMethod("", "/sims/", param);
423 }
424
425 /// <summary>
426 /// Returns information about a sim via a REST Request
427 /// </summary>
428 /// <param name="request"></param>
429 /// <param name="path"></param>
430 /// <param name="param"></param>
431 /// <returns>Information about the sim in XML</returns>
432 public string RestGetSimMethod(string request, string path, string param)
433 {
434 string respstring = String.Empty;
435
436 SimProfileData TheSim;
437 LLUUID UUID = new LLUUID(param);
438 TheSim = getRegion(UUID);
439
440 if (!(TheSim == null))
441 {
442 respstring = "<Root>";
443 respstring += "<authkey>" + TheSim.regionSendKey + "</authkey>";
444 respstring += "<sim>";
445 respstring += "<uuid>" + TheSim.UUID.ToString() + "</uuid>";
446 respstring += "<regionname>" + TheSim.regionName + "</regionname>";
447 respstring += "<sim_ip>" + TheSim.serverIP + "</sim_ip>";
448 respstring += "<sim_port>" + TheSim.serverPort.ToString() + "</sim_port>";
449 respstring += "<region_locx>" + TheSim.regionLocX.ToString() + "</region_locx>";
450 respstring += "<region_locy>" + TheSim.regionLocY.ToString() + "</region_locy>";
451 respstring += "<estate_id>1</estate_id>";
452 respstring += "</sim>";
453 respstring += "</Root>";
454 }
455
456 return respstring;
457 }
458
459 /// <summary>
460 /// Creates or updates a sim via a REST Method Request
461 /// BROKEN with SQL Update
462 /// </summary>
463 /// <param name="request"></param>
464 /// <param name="path"></param>
465 /// <param name="param"></param>
466 /// <returns>"OK" or an error</returns>
467 public string RestSetSimMethod(string request, string path, string param)
468 {
469 Console.WriteLine("Processing region update");
470 SimProfileData TheSim;
471 TheSim = getRegion(new LLUUID(param));
472 if ((TheSim) == null)
473 {
474 TheSim = new SimProfileData();
475 LLUUID UUID = new LLUUID(param);
476 TheSim.UUID = UUID;
477 TheSim.regionRecvKey = config.SimRecvKey;
478 }
479
480 XmlDocument doc = new XmlDocument();
481 doc.LoadXml(request);
482 XmlNode rootnode = doc.FirstChild;
483 XmlNode authkeynode = rootnode.ChildNodes[0];
484 if (authkeynode.Name != "authkey")
485 {
486 return "ERROR! bad XML - expected authkey tag";
487 }
488
489 XmlNode simnode = rootnode.ChildNodes[1];
490 if (simnode.Name != "sim")
491 {
492 return "ERROR! bad XML - expected sim tag";
493 }
494
495 if (authkeynode.InnerText != TheSim.regionRecvKey)
496 {
497 return "ERROR! invalid key";
498 }
499
500 //TheSim.regionSendKey = Cfg;
501 TheSim.regionRecvKey = config.SimRecvKey;
502 TheSim.regionSendKey = config.SimSendKey;
503 TheSim.regionSecret = config.SimRecvKey;
504 TheSim.regionDataURI = "";
505 TheSim.regionAssetURI = config.DefaultAssetServer;
506 TheSim.regionAssetRecvKey = config.AssetRecvKey;
507 TheSim.regionAssetSendKey = config.AssetSendKey;
508 TheSim.regionUserURI = config.DefaultUserServer;
509 TheSim.regionUserSendKey = config.UserSendKey;
510 TheSim.regionUserRecvKey = config.UserRecvKey;
511
512
513 for (int i = 0; i < simnode.ChildNodes.Count; i++)
514 {
515 switch (simnode.ChildNodes[i].Name)
516 {
517 case "regionname":
518 TheSim.regionName = simnode.ChildNodes[i].InnerText;
519 break;
520
521 case "sim_ip":
522 TheSim.serverIP = simnode.ChildNodes[i].InnerText;
523 break;
524
525 case "sim_port":
526 TheSim.serverPort = Convert.ToUInt32(simnode.ChildNodes[i].InnerText);
527 break;
528
529 case "region_locx":
530 TheSim.regionLocX = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText);
531 TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256));
532 break;
533
534 case "region_locy":
535 TheSim.regionLocY = Convert.ToUInt32((string)simnode.ChildNodes[i].InnerText);
536 TheSim.regionHandle = Helpers.UIntsToLong((TheSim.regionLocX * 256), (TheSim.regionLocY * 256));
537 break;
538 }
539 }
540
541 TheSim.serverURI = "http://" + TheSim.serverIP + ":" + TheSim.serverPort + "/";
542
543 bool requirePublic = false;
544
545 if (requirePublic && (TheSim.serverIP.StartsWith("172.16") || TheSim.serverIP.StartsWith("192.168") || TheSim.serverIP.StartsWith("10.") || TheSim.serverIP.StartsWith("0.") || TheSim.serverIP.StartsWith("255.")))
546 {
547 return "ERROR! Servers must register with public addresses.";
548 }
549
550 try
551 {
552 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Updating / adding via " + _plugins.Count + " storage provider(s) registered.");
553 foreach (KeyValuePair<string, IGridData> kvp in _plugins)
554 {
555 try
556 {
557 kvp.Value.AddProfile(TheSim);
558 OpenSim.Framework.Console.MainConsole.Instance.Verbose("New sim added to grid (" + TheSim.regionName + ")");
559 logToDB(TheSim.UUID.ToStringHyphenated(), "RestSetSimMethod", "", 5, "Region successfully updated and connected to grid.");
560 }
561 catch (Exception e)
562 {
563 OpenSim.Framework.Console.MainConsole.Instance.Verbose("getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " + e.ToString());
564 }
565 }
566 return "OK";
567 }
568 catch (Exception e)
569 {
570 return "ERROR! Could not save to database! (" + e.ToString() + ")";
571 }
572 }
573
574 }
575}
diff --git a/OpenGridServices/OpenGridServices.GridServer/Main.cs b/OpenGridServices/OpenGridServices.GridServer/Main.cs
new file mode 100644
index 0000000..9a7eb00
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.GridServer/Main.cs
@@ -0,0 +1,271 @@
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
29using System;
30using System.IO;
31using System.Text;
32using System.Timers;
33using System.Net;
34using System.Threading;
35using System.Reflection;
36using libsecondlife;
37using OpenGrid.Framework.Manager;
38using OpenSim.Framework;
39using OpenSim.Framework.Sims;
40using OpenSim.Framework.Console;
41using OpenSim.Framework.Interfaces;
42using OpenSim.Servers;
43using OpenSim.GenericConfig;
44
45namespace OpenGridServices.GridServer
46{
47 /// <summary>
48 /// </summary>
49 public class OpenGrid_Main : BaseServer, 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 ConsoleBase 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 ConsoleBase("opengrid-gridserver-console.log", "OpenGrid", this, false);
95 MainConsole.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
new file mode 100644
index 0000000..f4a6ca1
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.csproj
@@ -0,0 +1,134 @@
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="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.Servers" >
82 <HintPath>OpenSim.Servers.dll</HintPath>
83 <Private>False</Private>
84 </Reference>
85 <Reference Include="OpenSim.GenericConfig.Xml" >
86 <HintPath>OpenSim.GenericConfig.Xml.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 <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.csproj.user b/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.csproj.user
new file mode 100644
index 0000000..1b6b14d
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.csproj.user
@@ -0,0 +1,12 @@
1<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5 <ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
6 <LastOpenVersion>8.0.50727</LastOpenVersion>
7 <ProjectView>ProjectFiles</ProjectView>
8 <ProjectTrust>0</ProjectTrust>
9 </PropertyGroup>
10 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
11 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
12</Project>
diff --git a/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build b/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build
new file mode 100644
index 0000000..9d21edd
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build
@@ -0,0 +1,52 @@
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="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/OpenGrid.Framework.Data.dll" />
30 <include name="../../bin/OpenGrid.Framework.Manager.dll" />
31 <include name="../../bin/OpenSim.GenericConfig.Xml.dll" />
32 <include name="../../bin/libsecondlife.dll" />
33 <include name="../../bin/Db4objects.Db4o.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
new file mode 100644
index 0000000..8471e6b
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.GridServer/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using 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-GridServer")]
9[assembly: AssemblyDescription("")]
10[assembly: AssemblyConfiguration("")]
11[assembly: AssemblyCompany("")]
12[assembly: AssemblyProduct("OGS-GridServer")]
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("b541b244-3d1d-4625-9003-bc2a3a6a39a4")]
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.InventoryServer/InventoryManager.cs b/OpenGridServices/OpenGridServices.InventoryServer/InventoryManager.cs
new file mode 100644
index 0000000..9ca9b5e
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.InventoryServer/InventoryManager.cs
@@ -0,0 +1,125 @@
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*/
28using System;
29using System.Collections;
30using System.Collections.Generic;
31using System.Text;
32using OpenGrid.Framework.Data;
33using libsecondlife;
34using System.Reflection;
35
36using System.Xml;
37using Nwc.XmlRpc;
38using OpenSim.Framework.Sims;
39using OpenSim.Framework.Inventory;
40using OpenSim.Framework.Utilities;
41
42using System.Security.Cryptography;
43
44namespace 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
new file mode 100644
index 0000000..f479a79
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.InventoryServer/Main.cs
@@ -0,0 +1,87 @@
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*/
28using System;
29using System.Collections;
30using System.Collections.Generic;
31using System.Reflection;
32using System.IO;
33using System.Text;
34using libsecondlife;
35using OpenSim.Framework.User;
36using OpenSim.Framework.Sims;
37using OpenSim.Framework.Inventory;
38using OpenSim.Framework.Interfaces;
39using OpenSim.Framework.Console;
40using OpenSim.Servers;
41using OpenSim.Framework.Utilities;
42
43namespace 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
new file mode 100644
index 0000000..6aec357
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.csproj
@@ -0,0 +1,125 @@
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
new file mode 100644
index 0000000..c23a862
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.InventoryServer/OpenGridServices.InventoryServer.exe.build
@@ -0,0 +1,50 @@
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
new file mode 100644
index 0000000..ed7bc24
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.mds
@@ -0,0 +1,16 @@
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
new file mode 100644
index 0000000..f221509
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.userprefs
@@ -0,0 +1,39 @@
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
new file mode 100644
index 0000000..d887d0e
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager.usertasks
@@ -0,0 +1,2 @@
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
new file mode 100644
index 0000000..af4e275
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/AssemblyInfo.cs
@@ -0,0 +1,32 @@
1using System.Reflection;
2using 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
new file mode 100644
index 0000000..83685fc
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/BlockingQueue.cs
@@ -0,0 +1,33 @@
1using System;
2using System.Threading;
3using System.Collections.Generic;
4using System.Text;
5
6namespace 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
new file mode 100644
index 0000000..0d509ef
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Connect to grid server.cs
@@ -0,0 +1,16 @@
1
2using System;
3
4namespace 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
new file mode 100644
index 0000000..8a80b1d
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/ConnectToGridServerDialog.cs
@@ -0,0 +1,29 @@
1using Gtk;
2using System;
3
4namespace 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
new file mode 100644
index 0000000..6b632d6
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/GridServerConnectionManager.cs
@@ -0,0 +1,106 @@
1using Nwc.XmlRpc;
2using System;
3using System.Net;
4using System.IO;
5using System.Xml;
6using System.Collections;
7using System.Collections.Generic;
8using libsecondlife;
9
10namespace 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
new file mode 100644
index 0000000..42e09e0
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Main.cs
@@ -0,0 +1,96 @@
1// project created on 5/14/2007 at 2:04 PM
2using System;
3using System.Threading;
4using Gtk;
5
6namespace 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
new file mode 100644
index 0000000..1db38f0
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/MainWindow.cs
@@ -0,0 +1,76 @@
1using System;
2using Gtk;
3
4namespace 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
new file mode 100644
index 0000000..cfdc085
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.mdp
@@ -0,0 +1,43 @@
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
new file mode 100644
index 0000000..44e7a61
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/OpenGridServices.Manager.pidb
Binary files differ
diff --git a/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs
new file mode 100644
index 0000000..00f7c65
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/RegionBlock.cs
@@ -0,0 +1,37 @@
1using System;
2using System.Xml;
3using libsecondlife;
4using OpenSim.Framework.Utilities;
5
6namespace 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
new file mode 100644
index 0000000..5bf7ff9
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/Util.cs
@@ -0,0 +1,133 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using libsecondlife;
5using libsecondlife.Packets;
6
7namespace 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
new file mode 100644
index 0000000..da6739e
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.ConnectToGridServerDialog.cs
@@ -0,0 +1,226 @@
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
11namespace 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
new file mode 100644
index 0000000..8798dac
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/OpenGridServices.Manager.MainWindow.cs
@@ -0,0 +1,256 @@
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
11namespace 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
new file mode 100644
index 0000000..dd4abdd
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/generated.cs
@@ -0,0 +1,35 @@
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
11namespace 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
new file mode 100644
index 0000000..c883f08
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.Manager/OpenGridServices.Manager/gtk-gui/gui.stetic
@@ -0,0 +1,502 @@
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">&lt;Alt&gt;&lt;Mod2&gt;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
new file mode 100644
index 0000000..bb20576
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.UserServer/Main.cs
@@ -0,0 +1,216 @@
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
29using System;
30using System.Collections;
31using System.Collections.Generic;
32using System.Reflection;
33using System.IO;
34using System.Text;
35using libsecondlife;
36using OpenSim.Framework.User;
37using OpenSim.Framework.Sims;
38using OpenSim.Framework.Inventory;
39using OpenSim.Framework.Interfaces;
40using OpenSim.Framework.Console;
41using OpenSim.Servers;
42using OpenSim.Framework.Utilities;
43using OpenSim.GenericConfig;
44
45namespace OpenGridServices.UserServer
46{
47 /// <summary>
48 /// </summary>
49 public class OpenUser_Main : BaseServer, 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; // Replaces below.
57
58 //private UserProfileManager m_userProfileManager; // Depreciated
59
60 public Dictionary<LLUUID, UserProfile> UserSessions = new Dictionary<LLUUID, UserProfile>();
61
62 ConsoleBase m_console;
63
64 [STAThread]
65 public static void Main(string[] args)
66 {
67 Console.WriteLine("Starting...\n");
68
69 OpenUser_Main userserver = new OpenUser_Main();
70
71 userserver.Startup();
72 userserver.Work();
73 }
74
75 private OpenUser_Main()
76 {
77 m_console = new ConsoleBase("opengrid-userserver-console.log", "OpenUser", this , false);
78 MainConsole.Instance = m_console;
79 }
80
81 private void Work()
82 {
83 m_console.Notice("Enter help for a list of commands\n");
84
85 while (true)
86 {
87 m_console.MainConsolePrompt();
88 }
89 }
90
91 public void Startup()
92 {
93 this.localXMLConfig = new XmlConfig("UserServerConfig.xml");
94 this.localXMLConfig.LoadData();
95 this.ConfigDB(this.localXMLConfig);
96 this.localXMLConfig.Close();
97
98 MainConsole.Instance.Verbose("Main.cs:Startup() - Loading configuration");
99 Cfg = this.LoadConfigDll(this.ConfigDll);
100 Cfg.InitConfig();
101
102 MainConsole.Instance.Verbose( "Main.cs:Startup() - Establishing data connection");
103 m_userManager = new UserManager();
104 m_userManager._config = Cfg;
105 m_userManager.AddPlugin(StorageDll);
106
107 MainConsole.Instance.Verbose("Main.cs:Startup() - Starting HTTP process");
108 BaseHttpServer httpServer = new BaseHttpServer(8002);
109
110 httpServer.AddXmlRPCHandler("login_to_simulator", m_userManager.XmlRpcLoginMethod);
111 httpServer.AddRestHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod);
112
113 httpServer.Start();
114 }
115
116
117 public void do_create(string what)
118 {
119 switch (what)
120 {
121 case "user":
122 string tempfirstname;
123 string templastname;
124 string tempMD5Passwd;
125 uint regX = 997;
126 uint regY = 996;
127
128 tempfirstname = m_console.CmdPrompt("First name");
129 templastname = m_console.CmdPrompt("Last name");
130 tempMD5Passwd = m_console.PasswdPrompt("Password");
131 regX = Convert.ToUInt32(m_console.CmdPrompt("Start Region X"));
132 regY = Convert.ToUInt32(m_console.CmdPrompt("Start Region Y"));
133
134 tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + "");
135
136 m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
137 break;
138 }
139 }
140
141 public void RunCmd(string cmd, string[] cmdparams)
142 {
143 switch (cmd)
144 {
145 case "help":
146 m_console.Notice("create user - create a new user");
147 m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)");
148 break;
149
150 case "create":
151 do_create(cmdparams[0]);
152 break;
153
154 case "shutdown":
155 m_console.Close();
156 Environment.Exit(0);
157 break;
158 }
159 }
160
161 private void ConfigDB(IGenericConfig configData)
162 {
163 try
164 {
165 string attri = "";
166 attri = configData.GetAttribute("DataBaseProvider");
167 if (attri == "")
168 {
169 StorageDll = "OpenGrid.Framework.Data.DB4o.dll";
170 configData.SetAttribute("DataBaseProvider", "OpenGrid.Framework.Data.DB4o.dll");
171 }
172 else
173 {
174 StorageDll = attri;
175 }
176 configData.Commit();
177 }
178 catch (Exception e)
179 {
180
181 }
182 }
183
184 private UserConfig LoadConfigDll(string dllName)
185 {
186 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
187 UserConfig config = null;
188
189 foreach (Type pluginType in pluginAssembly.GetTypes())
190 {
191 if (pluginType.IsPublic)
192 {
193 if (!pluginType.IsAbstract)
194 {
195 Type typeInterface = pluginType.GetInterface("IUserConfig", true);
196
197 if (typeInterface != null)
198 {
199 IUserConfig plug = (IUserConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
200 config = plug.GetConfigObject();
201 break;
202 }
203
204 typeInterface = null;
205 }
206 }
207 }
208 pluginAssembly = null;
209 return config;
210 }
211
212 public void Show(string ShowWhat)
213 {
214 }
215 }
216}
diff --git a/OpenGridServices/OpenGridServices.UserServer/OGS-UserServer.csproj b/OpenGridServices/OpenGridServices.UserServer/OGS-UserServer.csproj
new file mode 100644
index 0000000..f4fa8b6
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.UserServer/OGS-UserServer.csproj
@@ -0,0 +1,63 @@
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
new file mode 100644
index 0000000..1bd07fb
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj
@@ -0,0 +1,128 @@
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="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.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="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="UserManager.cs">
115 <SubType>Code</SubType>
116 </Compile>
117 <Compile Include="Properties\AssemblyInfo.cs">
118 <SubType>Code</SubType>
119 </Compile>
120 </ItemGroup>
121 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
122 <PropertyGroup>
123 <PreBuildEvent>
124 </PreBuildEvent>
125 <PostBuildEvent>
126 </PostBuildEvent>
127 </PropertyGroup>
128</Project>
diff --git a/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj.user b/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj.user
new file mode 100644
index 0000000..1b6b14d
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.csproj.user
@@ -0,0 +1,12 @@
1<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5 <ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
6 <LastOpenVersion>8.0.50727</LastOpenVersion>
7 <ProjectView>ProjectFiles</ProjectView>
8 <ProjectTrust>0</ProjectTrust>
9 </PropertyGroup>
10 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
11 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
12</Project>
diff --git a/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build b/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build
new file mode 100644
index 0000000..5275ef4
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build
@@ -0,0 +1,51 @@
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="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/OpenGrid.Framework.Data.dll" />
29 <include name="../../bin/OpenSim.GenericConfig.Xml.dll" />
30 <include name="../../bin/OpenSim.Servers.dll" />
31 <include name="../../bin/libsecondlife.dll" />
32 <include name="../../bin/Db4objects.Db4o.dll" />
33 <include name="../../bin/XMLRPC.dll" />
34 </references>
35 </csc>
36 <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/" />
37 <mkdir dir="${project::get-base-directory()}/../../bin/"/>
38 <copy todir="${project::get-base-directory()}/../../bin/">
39 <fileset basedir="${project::get-base-directory()}/${build.dir}/" >
40 <include name="*.dll"/>
41 <include name="*.exe"/>
42 </fileset>
43 </copy>
44 </target>
45 <target name="clean">
46 <delete dir="${bin.dir}" failonerror="false" />
47 <delete dir="${obj.dir}" failonerror="false" />
48 </target>
49 <target name="doc" description="Creates documentation.">
50 </target>
51</project>
diff --git a/OpenGridServices/OpenGridServices.UserServer/Properties/AssemblyInfo.cs b/OpenGridServices/OpenGridServices.UserServer/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..5d5ce8d
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.UserServer/Properties/AssemblyInfo.cs
@@ -0,0 +1,33 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using 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
new file mode 100644
index 0000000..913d0fc
--- /dev/null
+++ b/OpenGridServices/OpenGridServices.UserServer/UserManager.cs
@@ -0,0 +1,659 @@
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*/
28using System;
29using System.Collections;
30using System.Collections.Generic;
31using System.Text;
32using OpenGrid.Framework.Data;
33using libsecondlife;
34using System.Reflection;
35
36using System.Xml;
37using Nwc.XmlRpc;
38using OpenSim.Framework.Sims;
39using OpenSim.Framework.Inventory;
40using OpenSim.Framework.Utilities;
41
42using System.Security.Cryptography;
43
44namespace OpenGridServices.UserServer
45{
46 public class UserManager
47 {
48 public OpenSim.Framework.Interfaces.UserConfig _config;
49 Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>();
50
51 /// <summary>
52 /// Adds a new user server plugin - user servers will be requested in the order they were loaded.
53 /// </summary>
54 /// <param name="FileName">The filename to the user server plugin DLL</param>
55 public void AddPlugin(string FileName)
56 {
57 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Userstorage: Attempting to load " + FileName);
58 Assembly pluginAssembly = Assembly.LoadFrom(FileName);
59
60 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Userstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces.");
61 foreach (Type pluginType in pluginAssembly.GetTypes())
62 {
63 if (!pluginType.IsAbstract)
64 {
65 Type typeInterface = pluginType.GetInterface("IUserData", true);
66
67 if (typeInterface != null)
68 {
69 IUserData plug = (IUserData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
70 plug.Initialise();
71 this._plugins.Add(plug.getName(), plug);
72 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Userstorage: Added IUserData Interface");
73 }
74
75 typeInterface = null;
76 }
77 }
78
79 pluginAssembly = null;
80 }
81
82 /// <summary>
83 ///
84 /// </summary>
85 /// <param name="user"></param>
86 public void AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY)
87 {
88 UserProfileData user = new UserProfileData();
89 user.homeLocation = new LLVector3(128, 128, 100);
90 user.UUID = LLUUID.Random();
91 user.username = firstName;
92 user.surname = lastName;
93 user.passwordHash = pass;
94 user.passwordSalt = "";
95 user.created = Util.UnixTimeSinceEpoch();
96 user.homeLookAt = new LLVector3(100, 100, 100);
97 user.homeRegion = Util.UIntsToLong((regX * 256), (regY * 256));
98
99 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
100 {
101 try
102 {
103 plugin.Value.addNewUserProfile(user);
104
105 }
106 catch (Exception e)
107 {
108 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
109 }
110 }
111 }
112
113 /// <summary>
114 /// Loads a user profile from a database by UUID
115 /// </summary>
116 /// <param name="uuid">The target UUID</param>
117 /// <returns>A user profile</returns>
118 public UserProfileData getUserProfile(LLUUID uuid)
119 {
120 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
121 {
122 try
123 {
124 UserProfileData profile = plugin.Value.getUserByUUID(uuid);
125 profile.currentAgent = getUserAgent(profile.UUID);
126 return profile;
127 }
128 catch (Exception e)
129 {
130 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
131 }
132 }
133
134 return null;
135 }
136
137
138 /// <summary>
139 /// Loads a user profile by name
140 /// </summary>
141 /// <param name="name">The target name</param>
142 /// <returns>A user profile</returns>
143 public UserProfileData getUserProfile(string name)
144 {
145 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
146 {
147 try
148 {
149 UserProfileData profile = plugin.Value.getUserByName(name);
150 profile.currentAgent = getUserAgent(profile.UUID);
151 return profile;
152 }
153 catch (Exception e)
154 {
155 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
156 }
157 }
158
159 return null;
160 }
161
162 /// <summary>
163 /// Loads a user profile by name
164 /// </summary>
165 /// <param name="fname">First name</param>
166 /// <param name="lname">Last name</param>
167 /// <returns>A user profile</returns>
168 public UserProfileData getUserProfile(string fname, string lname)
169 {
170 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
171 {
172 try
173 {
174 UserProfileData profile = plugin.Value.getUserByName(fname,lname);
175 try
176 {
177 profile.currentAgent = getUserAgent(profile.UUID);
178 }
179 catch (Exception e)
180 {
181 // Ignore
182 }
183 return profile;
184 }
185 catch (Exception e)
186 {
187 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
188 }
189 }
190
191 return null;
192 }
193
194 /// <summary>
195 /// Loads a user agent by uuid (not called directly)
196 /// </summary>
197 /// <param name="uuid">The agents UUID</param>
198 /// <returns>Agent profiles</returns>
199 public UserAgentData getUserAgent(LLUUID uuid)
200 {
201 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
202 {
203 try
204 {
205 return plugin.Value.getAgentByUUID(uuid);
206 }
207 catch (Exception e)
208 {
209 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
210 }
211 }
212
213 return null;
214 }
215
216 /// <summary>
217 /// Loads a user agent by name (not called directly)
218 /// </summary>
219 /// <param name="name">The agents name</param>
220 /// <returns>A user agent</returns>
221 public UserAgentData getUserAgent(string name)
222 {
223 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
224 {
225 try
226 {
227 return plugin.Value.getAgentByName(name);
228 }
229 catch (Exception e)
230 {
231 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
232 }
233 }
234
235 return null;
236 }
237
238 /// <summary>
239 /// Loads a user agent by name (not called directly)
240 /// </summary>
241 /// <param name="fname">The agents firstname</param>
242 /// <param name="lname">The agents lastname</param>
243 /// <returns>A user agent</returns>
244 public UserAgentData getUserAgent(string fname, string lname)
245 {
246 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
247 {
248 try
249 {
250 return plugin.Value.getAgentByName(fname,lname);
251 }
252 catch (Exception e)
253 {
254 OpenSim.Framework.Console.MainConsole.Instance.Verbose( "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")");
255 }
256 }
257
258 return null;
259 }
260
261 /// <summary>
262 /// Creates a error response caused by invalid XML
263 /// </summary>
264 /// <returns>An XMLRPC response</returns>
265 private static XmlRpcResponse CreateErrorConnectingToGridResponse()
266 {
267 XmlRpcResponse response = new XmlRpcResponse();
268 Hashtable ErrorRespData = new Hashtable();
269 ErrorRespData["reason"] = "key";
270 ErrorRespData["message"] = "Error connecting to grid. Could not percieve credentials from login XML.";
271 ErrorRespData["login"] = "false";
272 response.Value = ErrorRespData;
273 return response;
274 }
275
276 /// <summary>
277 /// Creates an error response caused by bad login credentials
278 /// </summary>
279 /// <returns>An XMLRPC response</returns>
280 private static XmlRpcResponse CreateLoginErrorResponse()
281 {
282 XmlRpcResponse response = new XmlRpcResponse();
283 Hashtable ErrorRespData = new Hashtable();
284 ErrorRespData["reason"] = "key";
285 ErrorRespData["message"] = "Could not authenticate your avatar. Please check your username and password, and check the grid if problems persist.";
286 ErrorRespData["login"] = "false";
287 response.Value = ErrorRespData;
288 return response;
289 }
290
291 /// <summary>
292 /// Creates an error response caused by being logged in already
293 /// </summary>
294 /// <returns>An XMLRPC Response</returns>
295 private static XmlRpcResponse CreateAlreadyLoggedInResponse()
296 {
297 XmlRpcResponse response = new XmlRpcResponse();
298 Hashtable PresenceErrorRespData = new Hashtable();
299 PresenceErrorRespData["reason"] = "presence";
300 PresenceErrorRespData["message"] = "You appear to be already logged in, if this is not the case please wait for your session to timeout, if this takes longer than a few minutes please contact the grid owner";
301 PresenceErrorRespData["login"] = "false";
302 response.Value = PresenceErrorRespData;
303 return response;
304 }
305
306 /// <summary>
307 /// Creates an error response caused by target region being down
308 /// </summary>
309 /// <returns>An XMLRPC Response</returns>
310 private static XmlRpcResponse CreateDeadRegionResponse()
311 {
312 XmlRpcResponse response = new XmlRpcResponse();
313 Hashtable PresenceErrorRespData = new Hashtable();
314 PresenceErrorRespData["reason"] = "key";
315 PresenceErrorRespData["message"] = "The region you are attempting to log into is not responding. Please select another region and try again.";
316 PresenceErrorRespData["login"] = "false";
317 response.Value = PresenceErrorRespData;
318 return response;
319 }
320
321 /// <summary>
322 /// Customises the login response and fills in missing values.
323 /// </summary>
324 /// <param name="response">The existing response</param>
325 /// <param name="theUser">The user profile</param>
326 public virtual void CustomiseResponse(ref Hashtable response, ref UserProfileData theUser)
327 {
328 // Load information from the gridserver
329 SimProfile SimInfo = new SimProfile();
330 SimInfo = SimInfo.LoadFromGrid(theUser.currentAgent.currentHandle, _config.GridServerURL, _config.GridSendKey, _config.GridRecvKey);
331
332 // Customise the response
333 // Home Location
334 response["home"] = "{'region_handle':[r" + (SimInfo.RegionLocX * 256).ToString() + ",r" + (SimInfo.RegionLocY * 256).ToString() + "], " +
335 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " +
336 "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}";
337
338 // Destination
339 response["sim_ip"] = SimInfo.sim_ip;
340 response["sim_port"] = (Int32)SimInfo.sim_port;
341 response["region_y"] = (Int32)SimInfo.RegionLocY * 256;
342 response["region_x"] = (Int32)SimInfo.RegionLocX * 256;
343
344 // Notify the target of an incoming user
345 Console.WriteLine("Notifying " + SimInfo.regionname + " (" + SimInfo.caps_url + ")");
346
347 // Prepare notification
348 Hashtable SimParams = new Hashtable();
349 SimParams["session_id"] = theUser.currentAgent.sessionID.ToString();
350 SimParams["secure_session_id"] = theUser.currentAgent.secureSessionID.ToString();
351 SimParams["firstname"] = theUser.username;
352 SimParams["lastname"] = theUser.surname;
353 SimParams["agent_id"] = theUser.UUID.ToString();
354 SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response["circuit_code"]);
355 SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString();
356 SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString();
357 SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString();
358 ArrayList SendParams = new ArrayList();
359 SendParams.Add(SimParams);
360
361 // Update agent with target sim
362 theUser.currentAgent.currentRegion = SimInfo.UUID;
363 theUser.currentAgent.currentHandle = SimInfo.regionhandle;
364
365 // Send
366 XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams);
367 XmlRpcResponse GridResp = GridReq.Send(SimInfo.caps_url, 3000);
368 }
369
370 /// <summary>
371 /// Checks a user against it's password hash
372 /// </summary>
373 /// <param name="profile">The users profile</param>
374 /// <param name="password">The supplied password</param>
375 /// <returns>Authenticated?</returns>
376 public bool AuthenticateUser(ref UserProfileData profile, string password)
377 {
378 OpenSim.Framework.Console.MainConsole.Instance.Verbose(
379 "Authenticating " + profile.username + " " + profile.surname);
380
381 password = password.Remove(0, 3); //remove $1$
382
383 string s = Util.Md5Hash(password + ":" + profile.passwordSalt);
384
385 return profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase);
386 }
387
388 /// <summary>
389 /// Creates and initialises a new user agent - make sure to use CommitAgent when done to submit to the DB
390 /// </summary>
391 /// <param name="profile">The users profile</param>
392 /// <param name="request">The users loginrequest</param>
393 public void CreateAgent(ref UserProfileData profile, XmlRpcRequest request)
394 {
395 Hashtable requestData = (Hashtable)request.Params[0];
396
397 UserAgentData agent = new UserAgentData();
398
399 // User connection
400 agent.agentIP = "";
401 agent.agentOnline = true;
402 agent.agentPort = 0;
403
404 // Generate sessions
405 RNGCryptoServiceProvider rand = new RNGCryptoServiceProvider();
406 byte[] randDataS = new byte[16];
407 byte[] randDataSS = new byte[16];
408 rand.GetBytes(randDataS);
409 rand.GetBytes(randDataSS);
410
411 agent.secureSessionID = new LLUUID(randDataSS, 0);
412 agent.sessionID = new LLUUID(randDataS, 0);
413
414 // Profile UUID
415 agent.UUID = profile.UUID;
416
417 // Current position (from Home)
418 agent.currentHandle = profile.homeRegion;
419 agent.currentPos = profile.homeLocation;
420
421 // If user specified additional start, use that
422 if (requestData.ContainsKey("start"))
423 {
424 string startLoc = ((string)requestData["start"]).Trim();
425 if (!(startLoc == "last" || startLoc == "home"))
426 {
427 // Format: uri:Ahern&162&213&34
428 try
429 {
430 string[] parts = startLoc.Remove(0, 4).Split('&');
431 string region = parts[0];
432
433 ////////////////////////////////////////////////////
434 //SimProfile SimInfo = new SimProfile();
435 //SimInfo = SimInfo.LoadFromGrid(theUser.currentAgent.currentHandle, _config.GridServerURL, _config.GridSendKey, _config.GridRecvKey);
436 }
437 catch (Exception e)
438 {
439
440 }
441 }
442 }
443
444 // What time did the user login?
445 agent.loginTime = Util.UnixTimeSinceEpoch();
446 agent.logoutTime = 0;
447
448 // Current location
449 agent.regionID = new LLUUID(); // Fill in later
450 agent.currentRegion = new LLUUID(); // Fill in later
451
452 profile.currentAgent = agent;
453 }
454
455 /// <summary>
456 /// Saves a target agent to the database
457 /// </summary>
458 /// <param name="profile">The users profile</param>
459 /// <returns>Successful?</returns>
460 public bool CommitAgent(ref UserProfileData profile)
461 {
462 // Saves the agent to database
463 return true;
464 }
465
466 /// <summary>
467 /// Main user login function
468 /// </summary>
469 /// <param name="request">The XMLRPC request</param>
470 /// <returns>The response to send</returns>
471 public XmlRpcResponse XmlRpcLoginMethod(XmlRpcRequest request)
472 {
473 XmlRpcResponse response = new XmlRpcResponse();
474 Hashtable requestData = (Hashtable)request.Params[0];
475
476 bool GoodXML = (requestData.Contains("first") && requestData.Contains("last") && requestData.Contains("passwd"));
477 bool GoodLogin = false;
478 string firstname = "";
479 string lastname = "";
480 string passwd = "";
481
482 UserProfileData TheUser;
483
484 if (GoodXML)
485 {
486 firstname = (string)requestData["first"];
487 lastname = (string)requestData["last"];
488 passwd = (string)requestData["passwd"];
489
490 TheUser = getUserProfile(firstname, lastname);
491 if (TheUser == null)
492 return CreateLoginErrorResponse();
493
494 GoodLogin = AuthenticateUser(ref TheUser, passwd);
495 }
496 else
497 {
498 return CreateErrorConnectingToGridResponse();
499 }
500
501 if (!GoodLogin)
502 {
503 return CreateLoginErrorResponse();
504 }
505 else
506 {
507 // If we already have a session...
508 if (TheUser.currentAgent != null && TheUser.currentAgent.agentOnline)
509 {
510 // Reject the login
511 return CreateAlreadyLoggedInResponse();
512 }
513 // Otherwise...
514 // Create a new agent session
515 CreateAgent(ref TheUser, request);
516
517 try
518 {
519 Hashtable responseData = new Hashtable();
520
521 LLUUID AgentID = TheUser.UUID;
522
523 // Global Texture Section
524 Hashtable GlobalT = new Hashtable();
525 GlobalT["sun_texture_id"] = "cce0f112-878f-4586-a2e2-a8f104bba271";
526 GlobalT["cloud_texture_id"] = "fc4b9f0b-d008-45c6-96a4-01dd947ac621";
527 GlobalT["moon_texture_id"] = "fc4b9f0b-d008-45c6-96a4-01dd947ac621";
528 ArrayList GlobalTextures = new ArrayList();
529 GlobalTextures.Add(GlobalT);
530
531 // Login Flags Section
532 Hashtable LoginFlagsHash = new Hashtable();
533 LoginFlagsHash["daylight_savings"] = "N";
534 LoginFlagsHash["stipend_since_login"] = "N";
535 LoginFlagsHash["gendered"] = "Y"; // Needs to be combined with below...
536 LoginFlagsHash["ever_logged_in"] = "Y"; // Should allow male/female av selection
537 ArrayList LoginFlags = new ArrayList();
538 LoginFlags.Add(LoginFlagsHash);
539
540 // UI Customisation Section
541 Hashtable uiconfig = new Hashtable();
542 uiconfig["allow_first_life"] = "Y";
543 ArrayList ui_config = new ArrayList();
544 ui_config.Add(uiconfig);
545
546 // Classified Categories Section
547 Hashtable ClassifiedCategoriesHash = new Hashtable();
548 ClassifiedCategoriesHash["category_name"] = "Generic";
549 ClassifiedCategoriesHash["category_id"] = (Int32)1;
550 ArrayList ClassifiedCategories = new ArrayList();
551 ClassifiedCategories.Add(ClassifiedCategoriesHash);
552
553 // Inventory Library Section
554 ArrayList AgentInventoryArray = new ArrayList();
555 Hashtable TempHash;
556
557 AgentInventory Library = new AgentInventory();
558 Library.CreateRootFolder(AgentID, true);
559
560 foreach (InventoryFolder InvFolder in Library.InventoryFolders.Values)
561 {
562 TempHash = new Hashtable();
563 TempHash["name"] = InvFolder.FolderName;
564 TempHash["parent_id"] = InvFolder.ParentID.ToStringHyphenated();
565 TempHash["version"] = (Int32)InvFolder.Version;
566 TempHash["type_default"] = (Int32)InvFolder.DefaultType;
567 TempHash["folder_id"] = InvFolder.FolderID.ToStringHyphenated();
568 AgentInventoryArray.Add(TempHash);
569 }
570
571 Hashtable InventoryRootHash = new Hashtable();
572 InventoryRootHash["folder_id"] = Library.InventoryRoot.FolderID.ToStringHyphenated();
573 ArrayList InventoryRoot = new ArrayList();
574 InventoryRoot.Add(InventoryRootHash);
575
576 Hashtable InitialOutfitHash = new Hashtable();
577 InitialOutfitHash["folder_name"] = "Nightclub Female";
578 InitialOutfitHash["gender"] = "female";
579 ArrayList InitialOutfit = new ArrayList();
580 InitialOutfit.Add(InitialOutfitHash);
581
582 // Circuit Code
583 uint circode = (uint)(Util.RandomClass.Next());
584
585 // Generics
586 responseData["last_name"] = TheUser.surname;
587 responseData["ui-config"] = ui_config;
588 responseData["sim_ip"] = "127.0.0.1"; //SimInfo.sim_ip.ToString();
589 responseData["login-flags"] = LoginFlags;
590 responseData["global-textures"] = GlobalTextures;
591 responseData["classified_categories"] = ClassifiedCategories;
592 responseData["event_categories"] = new ArrayList();
593 responseData["inventory-skeleton"] = AgentInventoryArray;
594 responseData["inventory-skel-lib"] = new ArrayList();
595 responseData["inventory-root"] = InventoryRoot;
596 responseData["event_notifications"] = new ArrayList();
597 responseData["gestures"] = new ArrayList();
598 responseData["inventory-lib-owner"] = new ArrayList();
599 responseData["initial-outfit"] = InitialOutfit;
600 responseData["seconds_since_epoch"] = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
601 responseData["start_location"] = "last";
602 responseData["home"] = "!!null temporary value {home}!!"; // Overwritten
603 responseData["message"] = _config.DefaultStartupMsg;
604 responseData["first_name"] = TheUser.username;
605 responseData["circuit_code"] = (Int32)circode;
606 responseData["sim_port"] = 0; //(Int32)SimInfo.sim_port;
607 responseData["secure_session_id"] = TheUser.currentAgent.secureSessionID.ToStringHyphenated();
608 responseData["look_at"] = "\n[r" + TheUser.homeLookAt.X.ToString() + ",r" + TheUser.homeLookAt.Y.ToString() + ",r" + TheUser.homeLookAt.Z.ToString() + "]\n";
609 responseData["agent_id"] = AgentID.ToStringHyphenated();
610 responseData["region_y"] = (Int32)0; // Overwritten
611 responseData["region_x"] = (Int32)0; // Overwritten
612 responseData["seed_capability"] = "";
613 responseData["agent_access"] = "M";
614 responseData["session_id"] = TheUser.currentAgent.sessionID.ToStringHyphenated();
615 responseData["login"] = "true";
616
617 try
618 {
619 this.CustomiseResponse(ref responseData, ref TheUser);
620 }
621 catch (Exception e)
622 {
623 Console.WriteLine(e.ToString());
624 return CreateDeadRegionResponse();
625 }
626
627 CommitAgent(ref TheUser);
628
629 response.Value = responseData;
630 // TheUser.SendDataToSim(SimInfo);
631 return response;
632
633 }
634 catch (Exception E)
635 {
636 Console.WriteLine(E.ToString());
637 }
638 //}
639 }
640 return response;
641
642 }
643
644 /// <summary>
645 /// Deletes an active agent session
646 /// </summary>
647 /// <param name="request">The request</param>
648 /// <param name="path">The path (eg /bork/narf/test)</param>
649 /// <param name="param">Parameters sent</param>
650 /// <returns>Success "OK" else error</returns>
651 public string RestDeleteUserSessionMethod(string request, string path, string param)
652 {
653 // TODO! Important!
654
655 return "OK";
656 }
657
658 }
659}
diff --git a/OpenGridServices/OpenUser.Config/UserConfigDb4o/AssemblyInfo.cs b/OpenGridServices/OpenUser.Config/UserConfigDb4o/AssemblyInfo.cs
new file mode 100644
index 0000000..25e0211
--- /dev/null
+++ b/OpenGridServices/OpenUser.Config/UserConfigDb4o/AssemblyInfo.cs
@@ -0,0 +1,58 @@
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*/
28using System.Reflection;
29using System.Runtime.CompilerServices;
30using 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
new file mode 100644
index 0000000..fe0e7aa
--- /dev/null
+++ b/OpenGridServices/OpenUser.Config/UserConfigDb4o/DbUserConfig.cs
@@ -0,0 +1,96 @@
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*/
28using System;
29using System.Collections.Generic;
30using OpenSim.Framework.Console;
31using OpenSim.Framework.Interfaces;
32using Db4objects.Db4o;
33
34namespace OpenUser.Config.UserConfigDb4o
35{
36 public class Db4oConfigPlugin: IUserConfig
37 {
38 public UserConfig GetConfigObject()
39 {
40 OpenSim.Framework.Console.MainConsole.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.MainConsole.Instance.Notice("Config.cs:LoadDefaults() - Please press enter to retain default or enter new settings");
51
52 this.DefaultStartupMsg = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Default startup message", "Welcome to OGS");
53
54 this.GridServerURL = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:8001/");
55 this.GridSendKey = OpenSim.Framework.Console.MainConsole.Instance.CmdPrompt("Key to send to grid server","null");
56 this.GridRecvKey = OpenSim.Framework.Console.MainConsole.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.MainConsole.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.MainConsole.Instance.Verbose("Config.cs:InitConfig() - Could not find object in database, loading precompiled defaults");
73 LoadDefaults();
74 OpenSim.Framework.Console.MainConsole.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.MainConsole.Instance.Warn("Config.cs:InitConfig() - Exception occured");
80 OpenSim.Framework.Console.MainConsole.Instance.Warn(e.ToString());
81 }
82
83 OpenSim.Framework.Console.MainConsole.Instance.Verbose("User settings loaded:");
84 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Default startup message: " + this.DefaultStartupMsg);
85 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Grid server URL: " + this.GridServerURL);
86 OpenSim.Framework.Console.MainConsole.Instance.Verbose("Key to send to grid: " + this.GridSendKey);
87 OpenSim.Framework.Console.MainConsole.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
new file mode 100644
index 0000000..722b8d4
--- /dev/null
+++ b/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj
@@ -0,0 +1,107 @@
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="System" >
62 <HintPath>System.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="System.Data.dll" >
66 <HintPath>..\..\..\bin\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 <Reference Include="OpenSim.Framework" >
82 <HintPath>OpenSim.Framework.dll</HintPath>
83 <Private>False</Private>
84 </Reference>
85 <Reference Include="OpenSim.Framework.Console" >
86 <HintPath>OpenSim.Framework.Console.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.csproj.user b/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj.user
new file mode 100644
index 0000000..1b6b14d
--- /dev/null
+++ b/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.csproj.user
@@ -0,0 +1,12 @@
1<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5 <ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
6 <LastOpenVersion>8.0.50727</LastOpenVersion>
7 <ProjectView>ProjectFiles</ProjectView>
8 <ProjectTrust>0</ProjectTrust>
9 </PropertyGroup>
10 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
11 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
12</Project>
diff --git a/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build b/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build
new file mode 100644
index 0000000..2833bce
--- /dev/null
+++ b/OpenGridServices/OpenUser.Config/UserConfigDb4o/OpenUser.Config.UserConfigDb4o.dll.build
@@ -0,0 +1,46 @@
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="System.dll" />
23 <include name="System.Data.dll.dll" />
24 <include name="System.Xml.dll" />
25 <include name="../../../bin/libsecondlife.dll" />
26 <include name="../../../bin/Db4objects.Db4o.dll" />
27 <include name="../../../bin/OpenSim.Framework.dll" />
28 <include name="../../../bin/OpenSim.Framework.Console.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/ServiceManager/ServiceManager.cs b/OpenGridServices/ServiceManager/ServiceManager.cs
new file mode 100644
index 0000000..8cb9c80
--- /dev/null
+++ b/OpenGridServices/ServiceManager/ServiceManager.cs
@@ -0,0 +1,259 @@
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*/
28using System;
29using System.Diagnostics;
30using System.Threading;
31using System.ServiceProcess;
32using System.Xml;
33using System.IO;
34using libsecondlife;
35using OpenSim.GenericConfig;
36
37public class OpenGridMasterService : System.ServiceProcess.ServiceBase {
38
39 private Thread ServiceWorkerThread;
40 private static string GridURL; // URL of grid server
41 private static string GridSimKey; // key sent from Grid>Sim
42 private static string SimGridKey; // key sent Sim>Grid
43 private static string AssetURL; // URL of asset server
44 private static string UserSendKey; // key sent from user>sim
45 private static string UserRecvKey; // key sent from sim>user
46
47 public OpenGridMasterService()
48 {
49 CanPauseAndContinue = false;
50 ServiceName = "OpenGridServices-master";
51 }
52
53 private void InitializeComponent()
54 {
55 this.CanPauseAndContinue = false;
56 this.CanShutdown = true;
57 this.ServiceName = "OpenGridServices-master";
58 }
59
60 protected override void OnStart(string[] args)
61 {
62 ServiceWorkerThread = new Thread(new ThreadStart(MainServiceThread));
63 ServiceWorkerThread.Start();
64 }
65
66 protected override void OnStop()
67 {
68 ServiceWorkerThread.Abort();
69 }
70
71 private void MainServiceThread()
72 {
73 try {
74 StreamReader reader=new StreamReader("opengrid-master-cfg.xml");
75
76 string configxml = reader.ReadToEnd();
77 XmlDocument doc = new XmlDocument();
78 doc.LoadXml(configxml);
79 XmlNode rootnode = doc.FirstChild;
80 if (rootnode.Name != "regions")
81 {
82 EventLog.WriteEntry("ERROR! bad XML in opengrid-master-cfg.xml - expected regions tag");
83 Console.WriteLine("Sorry, could not startup the service - please check your opengrid-master-cfg.xml file: missing regions tag");
84 (new ServiceController("OpenGridServices-master")).Stop();
85 }
86
87 for(int i=0; i<=rootnode.ChildNodes.Count; i++)
88 {
89 if(rootnode.ChildNodes.Item(i).Name != "region") {
90 EventLog.WriteEntry("nonfatal error - unexpected tag inside regions block of opengrid-master-cfg.xml");
91 (new ServiceController("OpenGridServices-master")).Stop();
92 }
93 }
94 } catch(Exception e) {
95 Console.WriteLine(e.ToString());
96 (new ServiceController("OpenGridServices-master")).Stop();
97 }
98
99 }
100
101 private static string SetupGrid()
102 {
103 Console.WriteLine("Running external program (OpenGridServices.GridServer.exe) to configure the grid server");
104 try {
105 Process p = new Process();
106
107 p.StartInfo.Arguments = "-setuponly";
108 p.StartInfo.FileName = "OpenGridServices.GridServer.exe";
109 p.Start();
110
111 p.StartInfo.Arguments = "-dumpxmlconf";
112 p.Start();
113
114 XmlConfig GridConf = new XmlConfig("opengrid-cfg.xml");
115 GridConf.LoadData();
116 GridURL="http://" + GridConf.GetAttribute("ListenAddr") + ":" + GridConf.GetAttribute("ListenPort") + "/";
117
118 StreamReader reader=new StreamReader("opengrid-cfg.xml");
119 string configxml = reader.ReadToEnd();
120
121 return configxml;
122 } catch(Exception e) {
123 Console.WriteLine("An error occurred while running the grid server, please rectify it and try again");
124 Console.WriteLine(e.ToString());
125 Environment.Exit(1);
126 }
127 return "";
128 }
129
130 private static string SetupUser()
131 {
132 return "<user></user>";
133 }
134
135 private static string SetupAsset()
136 {
137 return "<asset></asset>";
138 }
139
140 private static string SetupRegion()
141 {
142 string regionname;
143 ulong regionlocx;
144 ulong regionlocy;
145 string default_terrain;
146 uint terrain_multiplier;
147 uint baseport;
148
149 string listenaddr;
150 string simconfigxml;
151 LLUUID SimUUID;
152
153 Console.WriteLine("Setting up region servers");
154 Console.Write("Please specify a path to store your region data (e.g /etc/opensim/regions: ");
155 string regionpath=Console.ReadLine();
156
157 Console.Write("How many regions would you like to configure now? ");
158 int numofregions=Convert.ToInt16(Console.ReadLine());
159
160 Console.Write("What port should the region servers start listening at (first region is normally 9000, then 9001 the second etc, both TCP+UDP): ");
161 baseport=Convert.ToUInt16(Console.ReadLine());
162
163
164 listenaddr=Console.ReadLine();
165
166 Console.WriteLine("Now ready to configure regions, please answer the questions about each region in turn");
167 for(int i=0; i<=numofregions; i++) {
168 Console.WriteLine("Configuring region number " + i.ToString());
169
170 Console.Write("Region name: ");
171 regionname=Console.ReadLine();
172
173 Console.Write("Region location X: ");
174 regionlocx=(ulong)Convert.ToUInt32(Console.ReadLine());
175
176 Console.Write("Region location Y: ");
177 regionlocy=(ulong)Convert.ToUInt32(Console.ReadLine());
178
179 Console.Write("Default terrain file: ");
180 default_terrain=Console.ReadLine();
181 terrain_multiplier=Convert.ToUInt16(Console.ReadLine());
182
183 SimUUID=LLUUID.Random();
184
185 simconfigxml="<Root><Config SimUUID=\"" + SimUUID.ToString() + "\" SimName=\"" + regionname + "\" SimLocationX=\"" + regionlocx.ToString() + "\" SimLocationY=\"" + regionlocy.ToString() + "\" Datastore=\"" + Path.Combine(regionpath,(SimUUID.ToString()+"localworld.yap")) + "\" SimListenPort=\"" + (baseport+i).ToString() + "\" SimListenAddress=\"" + listenaddr + "\" TerrainFile=\"" + default_terrain + "\" TerrainMultiplier=\"" + terrain_multiplier.ToString() + "\" GridServerURL=\"\" GridSendKey=\"\" GridRecvKey=\"\" AssetServerURL=\"\" /></Root>";
186
187 }
188
189 return "<regions></regions>";
190 }
191
192 public static void InitSetup()
193 {
194 string choice="";
195
196 string GridInfo;
197 string UserInfo;
198 string AssetInfo;
199 string RegionInfo;
200
201 bool grid=false;
202 bool user=false;
203 bool asset=false;
204 bool region=false;
205 while(choice!="OK")
206 {
207 Console.Clear();
208 Console.WriteLine("Please select the components you would like to run on this server:\n");
209
210 Console.WriteLine("1 - [" + (grid ? "X" : " ") + "] Grid server - this service handles co-ordinates of regions/sims on the grid");
211 Console.WriteLine("2 - [" + (user ? "X" : " ") + "] User server - this service handles user login, profiles, inventory and IM");
212 Console.WriteLine("3 - [" + (asset ? "X" : " ") + "] Asset server - this service handles storage of assets such as textures, objects, sounds, scripts");
213 Console.WriteLine("4 - [" + (region ? "X" : " ") + "] Region server - this is the main opensim server and can run without the above services, it handles physics simulation, terrain, building and other such features");
214
215
216 Console.Write("Type a number to toggle a choice or type OK to accept your current choices: ");
217 choice = Console.ReadLine();
218 switch(choice)
219 {
220 case "1":
221 grid = (!grid);
222 break;
223
224 case "2":
225 user = (!user);
226 break;
227
228 case "3":
229 asset = (!asset);
230 break;
231
232 case "4":
233 region = (!region);
234 break;
235 }
236 }
237
238 if(grid) GridInfo = SetupGrid();
239 if(user) UserInfo = SetupUser();
240 if(asset) AssetInfo = SetupAsset();
241 if(region) RegionInfo = SetupRegion();
242 }
243
244 public static void Main()
245 {
246 if(!File.Exists("opengrid-master-cfg.xml"))
247 {
248 Console.WriteLine("Could not find a config file, running initial setup");
249 InitSetup();
250 }
251 Console.WriteLine("Starting up OGS master service");
252 try {
253 ServiceBase.Run(new OpenGridMasterService());
254 } catch(Exception e) {
255 Console.WriteLine("An error occured while initialising OGS master service.");
256 Console.WriteLine(e.ToString());
257 }
258 }
259}
diff --git a/OpenGridServices/ServiceManager/ServiceManager.csproj b/OpenGridServices/ServiceManager/ServiceManager.csproj
new file mode 100644
index 0000000..0b89633
--- /dev/null
+++ b/OpenGridServices/ServiceManager/ServiceManager.csproj
@@ -0,0 +1,205 @@
1<<<<<<< .mine
2<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <PropertyGroup>
4 <ProjectType>Local</ProjectType>
5 <ProductVersion>8.0.50727</ProductVersion>
6 <SchemaVersion>2.0</SchemaVersion>
7 <ProjectGuid>{E141F4EE-0000-0000-0000-000000000000}</ProjectGuid>
8 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
9 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
10 <ApplicationIcon>
11 </ApplicationIcon>
12 <AssemblyKeyContainerName>
13 </AssemblyKeyContainerName>
14 <AssemblyName>ServiceManager</AssemblyName>
15 <DefaultClientScript>JScript</DefaultClientScript>
16 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
17 <DefaultTargetSchema>IE50</DefaultTargetSchema>
18 <DelaySign>false</DelaySign>
19 <OutputType>Exe</OutputType>
20 <AppDesignerFolder>
21 </AppDesignerFolder>
22 <RootNamespace>ServiceManager</RootNamespace>
23 <StartupObject>
24 </StartupObject>
25 <FileUpgradeFlags>
26 </FileUpgradeFlags>
27 </PropertyGroup>
28 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
29 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
30 <BaseAddress>285212672</BaseAddress>
31 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
32 <ConfigurationOverrideFile>
33 </ConfigurationOverrideFile>
34 <DefineConstants>TRACE;DEBUG</DefineConstants>
35 <DocumentationFile>
36 </DocumentationFile>
37 <DebugSymbols>True</DebugSymbols>
38 <FileAlignment>4096</FileAlignment>
39 <Optimize>False</Optimize>
40 <OutputPath>..\..\bin\</OutputPath>
41 <RegisterForComInterop>False</RegisterForComInterop>
42 <RemoveIntegerChecks>False</RemoveIntegerChecks>
43 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
44 <WarningLevel>4</WarningLevel>
45 <NoWarn>
46 </NoWarn>
47 </PropertyGroup>
48 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
49 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
50 <BaseAddress>285212672</BaseAddress>
51 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
52 <ConfigurationOverrideFile>
53 </ConfigurationOverrideFile>
54 <DefineConstants>TRACE</DefineConstants>
55 <DocumentationFile>
56 </DocumentationFile>
57 <DebugSymbols>False</DebugSymbols>
58 <FileAlignment>4096</FileAlignment>
59 <Optimize>True</Optimize>
60 <OutputPath>..\..\bin\</OutputPath>
61 <RegisterForComInterop>False</RegisterForComInterop>
62 <RemoveIntegerChecks>False</RemoveIntegerChecks>
63 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
64 <WarningLevel>4</WarningLevel>
65 <NoWarn>
66 </NoWarn>
67 </PropertyGroup>
68 <ItemGroup>
69 <Reference Include="System">
70 <HintPath>System.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 <Reference Include="System.ServiceProcess">
74 <HintPath>System.ServiceProcess.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 <Reference Include="libsecondlife.dll">
82 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
83 <Private>False</Private>
84 </Reference>
85 <Reference Include="OpenSim.GenericConfig.Xml">
86 <HintPath>OpenSim.GenericConfig.Xml.dll</HintPath>
87 <Private>False</Private>
88 </Reference>
89 </ItemGroup>
90 <ItemGroup>
91 </ItemGroup>
92 <ItemGroup>
93 <Compile Include="ServiceManager.cs">
94 <SubType>Component</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>=======
105<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
106 <PropertyGroup>
107 <ProjectType>Local</ProjectType>
108 <ProductVersion>8.0.50727</ProductVersion>
109 <SchemaVersion>2.0</SchemaVersion>
110 <ProjectGuid>{E141F4EE-0000-0000-0000-000000000000}</ProjectGuid>
111 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
112 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
113 <ApplicationIcon></ApplicationIcon>
114 <AssemblyKeyContainerName>
115 </AssemblyKeyContainerName>
116 <AssemblyName>ServiceManager</AssemblyName>
117 <DefaultClientScript>JScript</DefaultClientScript>
118 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
119 <DefaultTargetSchema>IE50</DefaultTargetSchema>
120 <DelaySign>false</DelaySign>
121 <OutputType>Exe</OutputType>
122 <AppDesignerFolder></AppDesignerFolder>
123 <RootNamespace>ServiceManager</RootNamespace>
124 <StartupObject></StartupObject>
125 <FileUpgradeFlags>
126 </FileUpgradeFlags>
127 </PropertyGroup>
128 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
129 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
130 <BaseAddress>285212672</BaseAddress>
131 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
132 <ConfigurationOverrideFile>
133 </ConfigurationOverrideFile>
134 <DefineConstants>TRACE;DEBUG</DefineConstants>
135 <DocumentationFile></DocumentationFile>
136 <DebugSymbols>True</DebugSymbols>
137 <FileAlignment>4096</FileAlignment>
138 <Optimize>False</Optimize>
139 <OutputPath>..\..\bin\</OutputPath>
140 <RegisterForComInterop>False</RegisterForComInterop>
141 <RemoveIntegerChecks>False</RemoveIntegerChecks>
142 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
143 <WarningLevel>4</WarningLevel>
144 <NoWarn></NoWarn>
145 </PropertyGroup>
146 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
147 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
148 <BaseAddress>285212672</BaseAddress>
149 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
150 <ConfigurationOverrideFile>
151 </ConfigurationOverrideFile>
152 <DefineConstants>TRACE</DefineConstants>
153 <DocumentationFile></DocumentationFile>
154 <DebugSymbols>False</DebugSymbols>
155 <FileAlignment>4096</FileAlignment>
156 <Optimize>True</Optimize>
157 <OutputPath>..\..\bin\</OutputPath>
158 <RegisterForComInterop>False</RegisterForComInterop>
159 <RemoveIntegerChecks>False</RemoveIntegerChecks>
160 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
161 <WarningLevel>4</WarningLevel>
162 <NoWarn></NoWarn>
163 </PropertyGroup>
164 <ItemGroup>
165 <Reference Include="System" >
166 <HintPath>System.dll</HintPath>
167 <Private>False</Private>
168 </Reference>
169 <Reference Include="System.ServiceProcess" >
170 <HintPath>System.ServiceProcess.dll</HintPath>
171 <Private>False</Private>
172 </Reference>
173 <Reference Include="System.Xml" >
174 <HintPath>System.Xml.dll</HintPath>
175 <Private>False</Private>
176 </Reference>
177 <Reference Include="libsecondlife.dll" >
178 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
179 <Private>False</Private>
180 </Reference>
181 <Reference Include="OpenSim.GenericConfig.Xml" >
182 <HintPath>OpenSim.GenericConfig.Xml.dll</HintPath>
183 <Private>False</Private>
184 </Reference>
185 <Reference Include="OpenSim.Framework.dll" >
186 <HintPath>..\..\bin\OpenSim.Framework.dll</HintPath>
187 <Private>False</Private>
188 </Reference>
189 </ItemGroup>
190 <ItemGroup>
191 </ItemGroup>
192 <ItemGroup>
193 <Compile Include="ServiceManager.cs">
194 <SubType>Code</SubType>
195 </Compile>
196 </ItemGroup>
197 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
198 <PropertyGroup>
199 <PreBuildEvent>
200 </PreBuildEvent>
201 <PostBuildEvent>
202 </PostBuildEvent>
203 </PropertyGroup>
204</Project>
205>>>>>>> .r921
diff --git a/OpenGridServices/ServiceManager/ServiceManager.csproj.mine b/OpenGridServices/ServiceManager/ServiceManager.csproj.mine
new file mode 100644
index 0000000..f8a4925
--- /dev/null
+++ b/OpenGridServices/ServiceManager/ServiceManager.csproj.mine
@@ -0,0 +1,103 @@
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>{E141F4EE-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon>
10 </ApplicationIcon>
11 <AssemblyKeyContainerName>
12 </AssemblyKeyContainerName>
13 <AssemblyName>ServiceManager</AssemblyName>
14 <DefaultClientScript>JScript</DefaultClientScript>
15 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
16 <DefaultTargetSchema>IE50</DefaultTargetSchema>
17 <DelaySign>false</DelaySign>
18 <OutputType>Exe</OutputType>
19 <AppDesignerFolder>
20 </AppDesignerFolder>
21 <RootNamespace>ServiceManager</RootNamespace>
22 <StartupObject>
23 </StartupObject>
24 <FileUpgradeFlags>
25 </FileUpgradeFlags>
26 </PropertyGroup>
27 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
28 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
29 <BaseAddress>285212672</BaseAddress>
30 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
31 <ConfigurationOverrideFile>
32 </ConfigurationOverrideFile>
33 <DefineConstants>TRACE;DEBUG</DefineConstants>
34 <DocumentationFile>
35 </DocumentationFile>
36 <DebugSymbols>True</DebugSymbols>
37 <FileAlignment>4096</FileAlignment>
38 <Optimize>False</Optimize>
39 <OutputPath>..\..\bin\</OutputPath>
40 <RegisterForComInterop>False</RegisterForComInterop>
41 <RemoveIntegerChecks>False</RemoveIntegerChecks>
42 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
43 <WarningLevel>4</WarningLevel>
44 <NoWarn>
45 </NoWarn>
46 </PropertyGroup>
47 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
48 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
49 <BaseAddress>285212672</BaseAddress>
50 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
51 <ConfigurationOverrideFile>
52 </ConfigurationOverrideFile>
53 <DefineConstants>TRACE</DefineConstants>
54 <DocumentationFile>
55 </DocumentationFile>
56 <DebugSymbols>False</DebugSymbols>
57 <FileAlignment>4096</FileAlignment>
58 <Optimize>True</Optimize>
59 <OutputPath>..\..\bin\</OutputPath>
60 <RegisterForComInterop>False</RegisterForComInterop>
61 <RemoveIntegerChecks>False</RemoveIntegerChecks>
62 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
63 <WarningLevel>4</WarningLevel>
64 <NoWarn>
65 </NoWarn>
66 </PropertyGroup>
67 <ItemGroup>
68 <Reference Include="System">
69 <HintPath>System.dll</HintPath>
70 <Private>False</Private>
71 </Reference>
72 <Reference Include="System.ServiceProcess">
73 <HintPath>System.ServiceProcess.dll</HintPath>
74 <Private>False</Private>
75 </Reference>
76 <Reference Include="System.Xml">
77 <HintPath>System.Xml.dll</HintPath>
78 <Private>False</Private>
79 </Reference>
80 <Reference Include="libsecondlife.dll">
81 <HintPath>..\..\bin\libsecondlife.dll</HintPath>
82 <Private>False</Private>
83 </Reference>
84 <Reference Include="OpenSim.GenericConfig.Xml">
85 <HintPath>OpenSim.GenericConfig.Xml.dll</HintPath>
86 <Private>False</Private>
87 </Reference>
88 </ItemGroup>
89 <ItemGroup>
90 </ItemGroup>
91 <ItemGroup>
92 <Compile Include="ServiceManager.cs">
93 <SubType>Component</SubType>
94 </Compile>
95 </ItemGroup>
96 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
97 <PropertyGroup>
98 <PreBuildEvent>
99 </PreBuildEvent>
100 <PostBuildEvent>
101 </PostBuildEvent>
102 </PropertyGroup>
103</Project> \ No newline at end of file
diff --git a/OpenGridServices/ServiceManager/ServiceManager.csproj.r858 b/OpenGridServices/ServiceManager/ServiceManager.csproj.r858
new file mode 100644
index 0000000..8d6a135
--- /dev/null
+++ b/OpenGridServices/ServiceManager/ServiceManager.csproj.r858
@@ -0,0 +1,96 @@
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>{7C8EA758-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>ServiceManager</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>ServiceManager</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.ServiceProcess" >
66 <HintPath>System.ServiceProcess.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="OpenSim.GenericConfig.Xml" >
78 <HintPath>OpenSim.GenericConfig.Xml.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 </ItemGroup>
82 <ItemGroup>
83 </ItemGroup>
84 <ItemGroup>
85 <Compile Include="ServiceManager.cs">
86 <SubType>Code</SubType>
87 </Compile>
88 </ItemGroup>
89 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
90 <PropertyGroup>
91 <PreBuildEvent>
92 </PreBuildEvent>
93 <PostBuildEvent>
94 </PostBuildEvent>
95 </PropertyGroup>
96</Project>
diff --git a/OpenGridServices/ServiceManager/ServiceManager.csproj.r921 b/OpenGridServices/ServiceManager/ServiceManager.csproj.r921
new file mode 100644
index 0000000..0e7ff5a
--- /dev/null
+++ b/OpenGridServices/ServiceManager/ServiceManager.csproj.r921
@@ -0,0 +1,100 @@
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>{E141F4EE-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>ServiceManager</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>ServiceManager</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.ServiceProcess" >
66 <HintPath>System.ServiceProcess.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="OpenSim.GenericConfig.Xml" >
78 <HintPath>OpenSim.GenericConfig.Xml.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 <Reference Include="OpenSim.Framework.dll" >
82 <HintPath>..\..\bin\OpenSim.Framework.dll</HintPath>
83 <Private>False</Private>
84 </Reference>
85 </ItemGroup>
86 <ItemGroup>
87 </ItemGroup>
88 <ItemGroup>
89 <Compile Include="ServiceManager.cs">
90 <SubType>Code</SubType>
91 </Compile>
92 </ItemGroup>
93 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
94 <PropertyGroup>
95 <PreBuildEvent>
96 </PreBuildEvent>
97 <PostBuildEvent>
98 </PostBuildEvent>
99 </PropertyGroup>
100</Project>
diff --git a/OpenGridServices/ServiceManager/ServiceManager.csproj.user b/OpenGridServices/ServiceManager/ServiceManager.csproj.user
new file mode 100644
index 0000000..1b6b14d
--- /dev/null
+++ b/OpenGridServices/ServiceManager/ServiceManager.csproj.user
@@ -0,0 +1,12 @@
1<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
4 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
5 <ReferencePath>C:\New Folder\second-life-viewer\opensim-dailys2\opensim26-05\trunk\bin\</ReferencePath>
6 <LastOpenVersion>8.0.50727</LastOpenVersion>
7 <ProjectView>ProjectFiles</ProjectView>
8 <ProjectTrust>0</ProjectTrust>
9 </PropertyGroup>
10 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
11 <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
12</Project>
diff --git a/OpenGridServices/ServiceManager/ServiceManager.exe.build b/OpenGridServices/ServiceManager/ServiceManager.exe.build
new file mode 100644
index 0000000..5e1dd72
--- /dev/null
+++ b/OpenGridServices/ServiceManager/ServiceManager.exe.build
@@ -0,0 +1,44 @@
1<?xml version="1.0" ?>
2<project name="ServiceManager" 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="ServiceManager" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="ServiceManager.cs" />
15 </sources>
16 <references basedir="${project::get-base-directory()}">
17 <lib>
18 <include name="${project::get-base-directory()}" />
19 <include name="${project::get-base-directory()}/${build.dir}" />
20 </lib>
21 <include name="System.dll" />
22 <include name="System.ServiceProcess.dll" />
23 <include name="System.Xml.dll" />
24 <include name="../../bin/libsecondlife.dll" />
25 <include name="../../bin/OpenSim.GenericConfig.Xml.dll" />
26 <include name="../../bin/OpenSim.Framework.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>