aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs')
-rw-r--r--OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs112
1 files changed, 0 insertions, 112 deletions
diff --git a/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs b/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs
deleted file mode 100644
index 1c0a4a3..0000000
--- a/OpenSim/Region/Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs
+++ /dev/null
@@ -1,112 +0,0 @@
1/*
2* Copyright (c) Contributors, http://www.openmetaverse.org/
3* See CONTRIBUTORS.TXT for a full list of copyright holders.
4*
5* Redistribution and use in source and binary forms, with or without
6* modification, are permitted provided that the following conditions are met:
7* * Redistributions of source code must retain the above copyright
8* notice, this list of conditions and the following disclaimer.
9* * Redistributions in binary form must reproduce the above copyright
10* notice, this list of conditions and the following disclaimer in the
11* documentation and/or other materials provided with the distribution.
12* * Neither the name of the OpenSim Project nor the
13* names of its contributors may be used to endorse or promote products
14* derived from this software without specific prior written permission.
15*
16* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
17* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26*
27*/
28
29// BDB Support
30// Apparently broken on Mono
31
32using BerkeleyDb;
33using libsecondlife;
34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework.Types;
36
37namespace OpenSim.Region.Storage.LocalStorageBDB
38{
39 public class BDBLocalStorage : ILocalStorage
40 {
41 const string simDbName = "localsim.db";
42
43 DbHash sim;
44 Db DB;
45 //BEFormatter formatter;
46
47 public BDBLocalStorage()
48 {
49 DB = new Db(DbCreateFlags.None);
50 sim = (DbHash)DB.Open(null, simDbName, null, DbType.Hash, Db.OpenFlags.Create, 0);
51 //vendorDb = (DbBTree)db.Open(null, VendorDbName, null, DbType.BTree, Db.OpenFlags.Create, 0);
52 }
53
54 public void Initialise(string file)
55 {
56 // Blank
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, ref key, ref 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
85 public void SaveLandObjects(LandData[] land_data)
86 {
87 }
88
89 public void SaveLandObject(LandData land)
90 {
91 }
92
93 public void RemoveLandObject(LandData land)
94 {
95 }
96
97 public void RemoveAllLandObjects()
98 {
99 }
100
101 public void LoadLandObjects(ILocalStorageLandObjectReceiver recv)
102 {
103 recv.NoLandDataFromStorage();
104 }
105
106 public void ShutDown()
107 {
108 sim.GetDb().Close();
109 DB.Close();
110 }
111 }
112} \ No newline at end of file