aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim.Storage
diff options
context:
space:
mode:
authorgareth2007-03-22 10:11:15 +0000
committergareth2007-03-22 10:11:15 +0000
commit7daa3955bc3a1918e40962851f9e8d38597a245e (patch)
treebee3e1372a7eed0c1b220a8a49f7bee7d29a6b91 /OpenSim.Storage
parentLoad XML for neighbourinfo from grid (diff)
downloadopensim-SC-7daa3955bc3a1918e40962851f9e8d38597a245e.zip
opensim-SC-7daa3955bc3a1918e40962851f9e8d38597a245e.tar.gz
opensim-SC-7daa3955bc3a1918e40962851f9e8d38597a245e.tar.bz2
opensim-SC-7daa3955bc3a1918e40962851f9e8d38597a245e.tar.xz
brought zircon branch into trunk
Diffstat (limited to '')
-rw-r--r--OpenSim.Storage/LocalStorageDb4o/AssemblyInfo.cs31
-rw-r--r--OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs (renamed from src/LocalStorage/Db4LocalStorage/Db4LocalStorage.cs)29
-rw-r--r--OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.csproj104
-rw-r--r--OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build46
-rw-r--r--OpenSim.Storage/LocalStorageDb4o/UUIDQuery.cs25
5 files changed, 214 insertions, 21 deletions
diff --git a/OpenSim.Storage/LocalStorageDb4o/AssemblyInfo.cs b/OpenSim.Storage/LocalStorageDb4o/AssemblyInfo.cs
new file mode 100644
index 0000000..6610606
--- /dev/null
+++ b/OpenSim.Storage/LocalStorageDb4o/AssemblyInfo.cs
@@ -0,0 +1,31 @@
1using System.Reflection;
2using System.Runtime.CompilerServices;
3using System.Runtime.InteropServices;
4
5// Information about this assembly is defined by the following
6// attributes.
7//
8// change them to the information which is associated with the assembly
9// you compile.
10
11[assembly: AssemblyTitle("Db4LocalStorage")]
12[assembly: AssemblyDescription("")]
13[assembly: AssemblyConfiguration("")]
14[assembly: AssemblyCompany("")]
15[assembly: AssemblyProduct("Db4LocalStorage")]
16[assembly: AssemblyCopyright("")]
17[assembly: AssemblyTrademark("")]
18[assembly: AssemblyCulture("")]
19
20// This sets the default COM visibility of types in the assembly to invisible.
21// If you need to expose a type to COM, use [ComVisible(true)] on that type.
22[assembly: ComVisible(false)]
23
24// The assembly version has following format :
25//
26// Major.Minor.Build.Revision
27//
28// You can specify all values by your own or you can build default build and revision
29// numbers with the '*' character (the default):
30
31[assembly: AssemblyVersion("1.0.*")]
diff --git a/src/LocalStorage/Db4LocalStorage/Db4LocalStorage.cs b/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
index bb9825c..93ed9cc 100644
--- a/src/LocalStorage/Db4LocalStorage/Db4LocalStorage.cs
+++ b/OpenSim.Storage/LocalStorageDb4o/Db4LocalStorage.cs
@@ -29,9 +29,10 @@ using System.Collections.Generic;
29using Db4objects.Db4o; 29using Db4objects.Db4o;
30using Db4objects.Db4o.Query; 30using Db4objects.Db4o.Query;
31using libsecondlife; 31using libsecondlife;
32using GridInterfaces; 32using OpenSim.Framework.Interfaces;
33using OpenSim.Framework.Assets;
33 34
34namespace Db4LocalStorage 35namespace OpenSim.Storage.LocalStorageDb4o
35{ 36{
36 /// <summary> 37 /// <summary>
37 /// 38 ///
@@ -45,13 +46,13 @@ namespace Db4LocalStorage
45 try 46 try
46 { 47 {
47 db = Db4oFactory.OpenFile("localworld.yap"); 48 db = Db4oFactory.OpenFile("localworld.yap");
48 ServerConsole.MainConsole.Instance.WriteLine("Db4LocalStorage creation"); 49 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Db4LocalStorage creation");
49 } 50 }
50 catch(Exception e) 51 catch(Exception e)
51 { 52 {
52 db.Close(); 53 db.Close();
53 ServerConsole.MainConsole.Instance.WriteLine("Db4LocalStorage :Constructor - Exception occured"); 54 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Db4LocalStorage :Constructor - Exception occured");
54 ServerConsole.MainConsole.Instance.WriteLine(e.ToString()); 55 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(e.ToString());
55 } 56 }
56 } 57 }
57 58
@@ -84,6 +85,7 @@ namespace Db4LocalStorage
84 found.ProfileHollow = prim.ProfileHollow; 85 found.ProfileHollow = prim.ProfileHollow;
85 found.Position = prim.Position; 86 found.Position = prim.Position;
86 found.Rotation = prim.Rotation; 87 found.Rotation = prim.Rotation;
88 found.Texture = prim.Texture;
87 db.Set(found); 89 db.Set(found);
88 db.Commit(); 90 db.Commit();
89 } 91 }
@@ -109,7 +111,7 @@ namespace Db4LocalStorage
109 public void LoadPrimitives(ILocalStorageReceiver receiver) 111 public void LoadPrimitives(ILocalStorageReceiver receiver)
110 { 112 {
111 IObjectSet result = db.Get(typeof(PrimData)); 113 IObjectSet result = db.Get(typeof(PrimData));
112 ServerConsole.MainConsole.Instance.WriteLine("Db4LocalStorage.cs: LoadPrimitives() - number of prims in storages is "+result.Count); 114 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Db4LocalStorage.cs: LoadPrimitives() - number of prims in storages is "+result.Count);
113 foreach (PrimData prim in result) { 115 foreach (PrimData prim in result) {
114 receiver.PrimFromStorage(prim); 116 receiver.PrimFromStorage(prim);
115 } 117 }
@@ -121,19 +123,4 @@ namespace Db4LocalStorage
121 db.Close(); 123 db.Close();
122 } 124 }
123 } 125 }
124
125 public class UUIDQuery : Predicate
126 {
127 private LLUUID _findID;
128
129 public UUIDQuery(LLUUID find)
130 {
131 _findID = find;
132 }
133 public bool Match(PrimData prim)
134 {
135 return (prim.FullID == _findID);
136 }
137 }
138
139} 126}
diff --git a/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.csproj b/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.csproj
new file mode 100644
index 0000000..5c2ffa5
--- /dev/null
+++ b/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.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>{2B5E9FF0-DE71-41DA-AC6A-B8E2D2D0AE09}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenSim.Storage.LocalStorageDb4o</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>OpenSim.Storage.LocalStorageDb4o</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 </Reference>
64 <Reference Include="System.Xml.dll" >
65 <HintPath>\System.Xml.dll.dll</HintPath>
66 </Reference>
67 <Reference Include="Db4objects.Db4o.dll" >
68 <HintPath>\Db4objects.Db4o.dll.dll</HintPath>
69 </Reference>
70 <Reference Include="libsecondlife.dll" >
71 <HintPath>\libsecondlife.dll.dll</HintPath>
72 </Reference>
73 </ItemGroup>
74 <ItemGroup>
75 <ProjectReference Include="..\..\OpenSim.Framework\OpenSim.Framework.csproj">
76 <Name>OpenSim.Framework</Name>
77 <Project>{1D2865A9-CF8E-45F7-B96D-91ED128A32CF}</Project>
78 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
79 </ProjectReference>
80 <ProjectReference Include="..\..\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj">
81 <Name>OpenSim.Framework.Console</Name>
82 <Project>{C8405E1A-EC19-48B6-9C8C-CA03624B9916}</Project>
83 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
84 </ProjectReference>
85 </ItemGroup>
86 <ItemGroup>
87 <Compile Include="AssemblyInfo.cs">
88 <SubType>Code</SubType>
89 </Compile>
90 <Compile Include="Db4LocalStorage.cs">
91 <SubType>Code</SubType>
92 </Compile>
93 <Compile Include="UUIDQuery.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/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build b/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build
new file mode 100644
index 0000000..752d0ab
--- /dev/null
+++ b/OpenSim.Storage/LocalStorageDb4o/OpenSim.Storage.LocalStorageDb4o.dll.build
@@ -0,0 +1,46 @@
1<?xml version="1.0" ?>
2<project name="OpenSim.Storage.LocalStorageDb4o" 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="OpenSim.Storage.LocalStorageDb4o" dynamicprefix="true" >
12 </resources>
13 <sources failonempty="true">
14 <include name="AssemblyInfo.cs" />
15 <include name="Db4LocalStorage.cs" />
16 <include name="UUIDQuery.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.dll" />
25 <include name="../../bin/Db4objects.Db4o.dll" />
26 <include name="../../bin/libsecondlife.dll" />
27 <include name="../../OpenSim.Framework/${build.dir}/OpenSim.Framework.dll" />
28 <include name="../../OpenSim.Framework.Console/${build.dir}/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/OpenSim.Storage/LocalStorageDb4o/UUIDQuery.cs b/OpenSim.Storage/LocalStorageDb4o/UUIDQuery.cs
new file mode 100644
index 0000000..16b6685
--- /dev/null
+++ b/OpenSim.Storage/LocalStorageDb4o/UUIDQuery.cs
@@ -0,0 +1,25 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using Db4objects.Db4o;
5using Db4objects.Db4o.Query;
6using libsecondlife;
7using OpenSim.Framework.Interfaces;
8using OpenSim.Framework.Assets;
9
10namespace OpenSim.Storage.LocalStorageDb4o
11{
12 public class UUIDQuery : Predicate
13 {
14 private LLUUID _findID;
15
16 public UUIDQuery(LLUUID find)
17 {
18 _findID = find;
19 }
20 public bool Match(PrimData prim)
21 {
22 return (prim.FullID == _findID);
23 }
24 }
25}