diff options
author | Adam Frisby | 2007-04-11 07:39:39 +0000 |
---|---|---|
committer | Adam Frisby | 2007-04-11 07:39:39 +0000 |
commit | 6e60d1e17f6a3d8d0f45e26da1f91e98ab8251e8 (patch) | |
tree | b7fd957cee1a23309e3a6100ad2076e2ba38b1b8 | |
parent | * built binaries, pdb's and user files should not be under version control. (diff) | |
download | opensim-SC_OLD-6e60d1e17f6a3d8d0f45e26da1f91e98ab8251e8.zip opensim-SC_OLD-6e60d1e17f6a3d8d0f45e26da1f91e98ab8251e8.tar.gz opensim-SC_OLD-6e60d1e17f6a3d8d0f45e26da1f91e98ab8251e8.tar.bz2 opensim-SC_OLD-6e60d1e17f6a3d8d0f45e26da1f91e98ab8251e8.tar.xz |
* One change in SQLiteLocalStorage
* Committing half-started Berkeley BDB bindings, however not adding to solution or prebuild (will/should not compile yet)
Diffstat (limited to '')
-rw-r--r-- | OpenSim.Storage.LocalStorageBerkeleyDB/BDBLocalStorage.cs | 90 | ||||
-rw-r--r-- | OpenSim.Storage.LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.csproj | 69 | ||||
-rw-r--r-- | OpenSim.Storage.LocalStorageBerkeleyDB/Properties/AssemblyInfo.cs | 35 | ||||
-rw-r--r-- | OpenSim.Storage.LocalStorageBerkeleyDB/bin/Kds.Serialization.dll | bin | 0 -> 40960 bytes | |||
-rw-r--r-- | OpenSim.Storage.LocalStorageBerkeleyDB/bin/libdb_dotNET43.dll | bin | 0 -> 221184 bytes | |||
-rw-r--r-- | OpenSim.Storage.LocalStorageBerkeleyDB/obj/OpenSim.Storage.LocalStorageBerkeleyDB.csproj.FileList.txt | 13 | ||||
-rw-r--r-- | OpenSim.Storage.LocalStorageSQLite/SQLiteLocalStorage.cs | 2 |
7 files changed, 208 insertions, 1 deletions
diff --git a/OpenSim.Storage.LocalStorageBerkeleyDB/BDBLocalStorage.cs b/OpenSim.Storage.LocalStorageBerkeleyDB/BDBLocalStorage.cs new file mode 100644 index 0000000..9a63dc7 --- /dev/null +++ b/OpenSim.Storage.LocalStorageBerkeleyDB/BDBLocalStorage.cs | |||
@@ -0,0 +1,90 @@ | |||
1 | /* | ||
2 | * Copyright (c) OpenSim project, http://sim.opensecondlife.org/ | ||
3 | * | ||
4 | * Redistribution and use in source and binary forms, with or without | ||
5 | * modification, are permitted provided that the following conditions are met: | ||
6 | * * Redistributions of source code must retain the above copyright | ||
7 | * notice, this list of conditions and the following disclaimer. | ||
8 | * * Redistributions in binary form must reproduce the above copyright | ||
9 | * notice, this list of conditions and the following disclaimer in the | ||
10 | * documentation and/or other materials provided with the distribution. | ||
11 | * * Neither the name of the <organization> nor the | ||
12 | * names of its contributors may be used to endorse or promote products | ||
13 | * derived from this software without specific prior written permission. | ||
14 | * | ||
15 | * THIS SOFTWARE IS PROVIDED BY <copyright holder> ``AS IS'' AND ANY | ||
16 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
18 | * DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY | ||
19 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
20 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
21 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
22 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
23 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
25 | * | ||
26 | */ | ||
27 | |||
28 | // BDB Support | ||
29 | // Apparently broken on Mono | ||
30 | |||
31 | using System; | ||
32 | using System.Collections.Generic; | ||
33 | using System.Data; | ||
34 | using libsecondlife; | ||
35 | using OpenSim.Framework.Interfaces; | ||
36 | using OpenSim.Framework.Assets; | ||
37 | using OpenSim.Framework.Terrain; | ||
38 | using BerkeleyDb; | ||
39 | using Kds.Serialization; | ||
40 | using Kds.Serialization.Buffer; | ||
41 | |||
42 | namespace OpenSim.Storage.LocalStorageBDB | ||
43 | { | ||
44 | public class BDBLocalStorage : ILocalStorage | ||
45 | { | ||
46 | const string simDbName = "localsim.db"; | ||
47 | |||
48 | DbHash sim; | ||
49 | Db DB; | ||
50 | BEFormatter formatter; | ||
51 | |||
52 | public BDBLocalStorage() | ||
53 | { | ||
54 | DB = new Db(DbCreateFlags.None); | ||
55 | sim = (DbHash)DB.Open(null, simDbName, null, BerkeleyDb.DbType.Hash, Db.OpenFlags.Create, 0); | ||
56 | //vendorDb = (DbBTree)db.Open(null, VendorDbName, null, DbType.BTree, Db.OpenFlags.Create, 0); | ||
57 | } | ||
58 | |||
59 | public void StorePrim(PrimData prim) | ||
60 | { | ||
61 | DbEntry key = new DbEntry(); | ||
62 | DbEntry data = new DbEntry(); | ||
63 | lock (sim) | ||
64 | { | ||
65 | sim.PutUnique(null, key, data, DbFile.WriteFlags.AutoCommit); | ||
66 | } | ||
67 | } | ||
68 | public void RemovePrim(LLUUID primID) | ||
69 | { | ||
70 | |||
71 | } | ||
72 | public void LoadPrimitives(ILocalStorageReceiver receiver) | ||
73 | { | ||
74 | |||
75 | } | ||
76 | public float[] LoadWorld() | ||
77 | { | ||
78 | return new float[65536]; | ||
79 | } | ||
80 | public void SaveMap(float[] heightmap) | ||
81 | { | ||
82 | |||
83 | } | ||
84 | public void ShutDown() | ||
85 | { | ||
86 | sim.GetDb().Close(); | ||
87 | DB.Close(); | ||
88 | } | ||
89 | } | ||
90 | } \ No newline at end of file | ||
diff --git a/OpenSim.Storage.LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.csproj b/OpenSim.Storage.LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.csproj new file mode 100644 index 0000000..4d2856a --- /dev/null +++ b/OpenSim.Storage.LocalStorageBerkeleyDB/OpenSim.Storage.LocalStorageBerkeleyDB.csproj | |||
@@ -0,0 +1,69 @@ | |||
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>{5D7AB19E-5673-4DDB-8B6B-E3105B826CB4}</ProjectGuid> | ||
8 | <OutputType>Library</OutputType> | ||
9 | <AppDesignerFolder>Properties</AppDesignerFolder> | ||
10 | <RootNamespace>OpenSim.Storage.LocalStorageBerkeleyDB</RootNamespace> | ||
11 | <AssemblyName>OpenSim.Storage.LocalStorageBerkeleyDB</AssemblyName> | ||
12 | </PropertyGroup> | ||
13 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
14 | <DebugSymbols>true</DebugSymbols> | ||
15 | <DebugType>full</DebugType> | ||
16 | <Optimize>false</Optimize> | ||
17 | <OutputPath>bin\Debug\</OutputPath> | ||
18 | <DefineConstants>DEBUG;TRACE</DefineConstants> | ||
19 | <ErrorReport>prompt</ErrorReport> | ||
20 | <WarningLevel>4</WarningLevel> | ||
21 | </PropertyGroup> | ||
22 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
23 | <DebugType>pdbonly</DebugType> | ||
24 | <Optimize>true</Optimize> | ||
25 | <OutputPath>bin\Release\</OutputPath> | ||
26 | <DefineConstants>TRACE</DefineConstants> | ||
27 | <ErrorReport>prompt</ErrorReport> | ||
28 | <WarningLevel>4</WarningLevel> | ||
29 | </PropertyGroup> | ||
30 | <ItemGroup> | ||
31 | <Reference Include="Kds.Serialization, Version=0.8.1.26141, Culture=neutral, PublicKeyToken=07e6449d79bffb34, processorArchitecture=MSIL"> | ||
32 | <SpecificVersion>False</SpecificVersion> | ||
33 | <HintPath>bin\Kds.Serialization.dll</HintPath> | ||
34 | </Reference> | ||
35 | <Reference Include="libdb_dotNET43, Version=0.9.1.26139, Culture=neutral, PublicKeyToken=0f0d57806cebdc08, processorArchitecture=MSIL"> | ||
36 | <SpecificVersion>False</SpecificVersion> | ||
37 | <HintPath>bin\libdb_dotNET43.dll</HintPath> | ||
38 | </Reference> | ||
39 | <Reference Include="libsecondlife, Version=0.9.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
40 | <SpecificVersion>False</SpecificVersion> | ||
41 | <HintPath>..\bin\libsecondlife.dll</HintPath> | ||
42 | </Reference> | ||
43 | <Reference Include="System" /> | ||
44 | <Reference Include="System.Data" /> | ||
45 | <Reference Include="System.Xml" /> | ||
46 | </ItemGroup> | ||
47 | <ItemGroup> | ||
48 | <Compile Include="BDBLocalStorage.cs" /> | ||
49 | <Compile Include="Properties\AssemblyInfo.cs" /> | ||
50 | </ItemGroup> | ||
51 | <ItemGroup> | ||
52 | <ProjectReference Include="..\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj"> | ||
53 | <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> | ||
54 | <Name>OpenSim.Framework.Console</Name> | ||
55 | </ProjectReference> | ||
56 | <ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj"> | ||
57 | <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> | ||
58 | <Name>OpenSim.Framework</Name> | ||
59 | </ProjectReference> | ||
60 | </ItemGroup> | ||
61 | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | ||
62 | <!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
63 | Other similar extension points exist, see Microsoft.Common.targets. | ||
64 | <Target Name="BeforeBuild"> | ||
65 | </Target> | ||
66 | <Target Name="AfterBuild"> | ||
67 | </Target> | ||
68 | --> | ||
69 | </Project> \ No newline at end of file | ||
diff --git a/OpenSim.Storage.LocalStorageBerkeleyDB/Properties/AssemblyInfo.cs b/OpenSim.Storage.LocalStorageBerkeleyDB/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..94f553a --- /dev/null +++ b/OpenSim.Storage.LocalStorageBerkeleyDB/Properties/AssemblyInfo.cs | |||
@@ -0,0 +1,35 @@ | |||
1 | using System.Reflection; | ||
2 | using System.Runtime.CompilerServices; | ||
3 | using System.Runtime.InteropServices; | ||
4 | |||
5 | // General Information about an assembly is controlled through the following | ||
6 | // set of attributes. Change these attribute values to modify the information | ||
7 | // associated with an assembly. | ||
8 | [assembly: AssemblyTitle("OpenSim.Storage.LocalStorageBerkeleyDB")] | ||
9 | [assembly: AssemblyDescription("")] | ||
10 | [assembly: AssemblyConfiguration("")] | ||
11 | [assembly: AssemblyCompany("")] | ||
12 | [assembly: AssemblyProduct("OpenSim.Storage.LocalStorageBerkeleyDB")] | ||
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("e8d6c27e-1feb-4cff-b029-51c701b9330b")] | ||
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/OpenSim.Storage.LocalStorageBerkeleyDB/bin/Kds.Serialization.dll b/OpenSim.Storage.LocalStorageBerkeleyDB/bin/Kds.Serialization.dll new file mode 100644 index 0000000..7f03277 --- /dev/null +++ b/OpenSim.Storage.LocalStorageBerkeleyDB/bin/Kds.Serialization.dll | |||
Binary files differ | |||
diff --git a/OpenSim.Storage.LocalStorageBerkeleyDB/bin/libdb_dotNET43.dll b/OpenSim.Storage.LocalStorageBerkeleyDB/bin/libdb_dotNET43.dll new file mode 100644 index 0000000..16a1cfc --- /dev/null +++ b/OpenSim.Storage.LocalStorageBerkeleyDB/bin/libdb_dotNET43.dll | |||
Binary files differ | |||
diff --git a/OpenSim.Storage.LocalStorageBerkeleyDB/obj/OpenSim.Storage.LocalStorageBerkeleyDB.csproj.FileList.txt b/OpenSim.Storage.LocalStorageBerkeleyDB/obj/OpenSim.Storage.LocalStorageBerkeleyDB.csproj.FileList.txt new file mode 100644 index 0000000..533fee8 --- /dev/null +++ b/OpenSim.Storage.LocalStorageBerkeleyDB/obj/OpenSim.Storage.LocalStorageBerkeleyDB.csproj.FileList.txt | |||
@@ -0,0 +1,13 @@ | |||
1 | bin\Debug\OpenSim.Storage.LocalStorageBerkeleyDB.dll | ||
2 | bin\Debug\OpenSim.Storage.LocalStorageBerkeleyDB.pdb | ||
3 | bin\Debug\Kds.Serialization.dll | ||
4 | bin\Debug\libdb_dotNET43.dll | ||
5 | bin\Debug\OpenSim.Framework.Console.dll | ||
6 | bin\Debug\OpenSim.Framework.dll | ||
7 | bin\Debug\Db4objects.Db4o.dll | ||
8 | bin\Debug\libsecondlife.dll | ||
9 | bin\Debug\OpenSim.Framework.pdb | ||
10 | bin\Debug\OpenSim.Framework.Console.pdb | ||
11 | obj\Debug\ResolveAssemblyReference.cache | ||
12 | obj\Debug\OpenSim.Storage.LocalStorageBerkeleyDB.dll | ||
13 | obj\Debug\OpenSim.Storage.LocalStorageBerkeleyDB.pdb | ||
diff --git a/OpenSim.Storage.LocalStorageSQLite/SQLiteLocalStorage.cs b/OpenSim.Storage.LocalStorageSQLite/SQLiteLocalStorage.cs index 4ccc8a2..8c9a5e1 100644 --- a/OpenSim.Storage.LocalStorageSQLite/SQLiteLocalStorage.cs +++ b/OpenSim.Storage.LocalStorageSQLite/SQLiteLocalStorage.cs | |||
@@ -47,7 +47,7 @@ namespace OpenSim.Storage.LocalStorageSQLite | |||
47 | { | 47 | { |
48 | try | 48 | try |
49 | { | 49 | { |
50 | string connectionstring = "URI=file:localsim.db"; | 50 | string connectionstring = "URI=file:localsim.sdb"; |
51 | db = (IDbConnection)new SQLiteConnection(connectionstring); | 51 | db = (IDbConnection)new SQLiteConnection(connectionstring); |
52 | db.Open(); | 52 | db.Open(); |
53 | } | 53 | } |