diff options
Diffstat (limited to 'OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs')
-rw-r--r-- | OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs | 118 |
1 files changed, 0 insertions, 118 deletions
diff --git a/OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs b/OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs deleted file mode 100644 index 1818e3a..0000000 --- a/OpenSim/OpenSim.Storage/LocalStorageBerkeleyDB/BDBLocalStorage.cs +++ /dev/null | |||
@@ -1,118 +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 | |||
32 | using System; | ||
33 | using System.Collections.Generic; | ||
34 | using System.Data; | ||
35 | using libsecondlife; | ||
36 | using OpenSim.Framework.Interfaces; | ||
37 | using OpenSim.Framework.Types; | ||
38 | using OpenSim.Framework.Terrain; | ||
39 | using BerkeleyDb; | ||
40 | using Kds.Serialization; | ||
41 | using Kds.Serialization.Buffer; | ||
42 | |||
43 | namespace OpenSim.Storage.LocalStorageBDB | ||
44 | { | ||
45 | public class BDBLocalStorage : ILocalStorage | ||
46 | { | ||
47 | const string simDbName = "localsim.db"; | ||
48 | |||
49 | DbHash sim; | ||
50 | Db DB; | ||
51 | //BEFormatter formatter; | ||
52 | |||
53 | public BDBLocalStorage() | ||
54 | { | ||
55 | DB = new Db(DbCreateFlags.None); | ||
56 | sim = (DbHash)DB.Open(null, simDbName, null, BerkeleyDb.DbType.Hash, Db.OpenFlags.Create, 0); | ||
57 | //vendorDb = (DbBTree)db.Open(null, VendorDbName, null, DbType.BTree, Db.OpenFlags.Create, 0); | ||
58 | } | ||
59 | |||
60 | public void Initialise(string file) | ||
61 | { | ||
62 | // Blank | ||
63 | } | ||
64 | |||
65 | public void StorePrim(PrimData prim) | ||
66 | { | ||
67 | DbEntry key = new DbEntry(); | ||
68 | DbEntry data = new DbEntry(); | ||
69 | lock (sim) | ||
70 | { | ||
71 | sim.PutUnique(null, ref key, ref data, DbFile.WriteFlags.AutoCommit); | ||
72 | } | ||
73 | } | ||
74 | public void RemovePrim(LLUUID primID) | ||
75 | { | ||
76 | |||
77 | } | ||
78 | public void LoadPrimitives(ILocalStorageReceiver receiver) | ||
79 | { | ||
80 | |||
81 | } | ||
82 | public float[] LoadWorld() | ||
83 | { | ||
84 | return new float[65536]; | ||
85 | } | ||
86 | public void SaveMap(float[] heightmap) | ||
87 | { | ||
88 | |||
89 | } | ||
90 | |||
91 | public void SaveParcels(ParcelData[] parcel_data) | ||
92 | { | ||
93 | } | ||
94 | |||
95 | public void SaveParcel(ParcelData parcel) | ||
96 | { | ||
97 | } | ||
98 | |||
99 | public void RemoveParcel(ParcelData parcel) | ||
100 | { | ||
101 | } | ||
102 | |||
103 | public void RemoveAllParcels() | ||
104 | { | ||
105 | } | ||
106 | |||
107 | public void LoadParcels(ILocalStorageParcelReceiver recv) | ||
108 | { | ||
109 | recv.NoParcelDataFromStorage(); | ||
110 | } | ||
111 | |||
112 | public void ShutDown() | ||
113 | { | ||
114 | sim.GetDb().Close(); | ||
115 | DB.Close(); | ||
116 | } | ||
117 | } | ||
118 | } \ No newline at end of file | ||