aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices/OpenGrid.Framework.Data.SQLite
diff options
context:
space:
mode:
Diffstat (limited to '')
-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
9 files changed, 1035 insertions, 0 deletions
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}