Finished adding Db4o support to user profile manager
parent
1ea4ba3a18
commit
906526bb9a
|
@ -26,6 +26,7 @@
|
||||||
<include name="../bin/OpenSim.Framework.dll" />
|
<include name="../bin/OpenSim.Framework.dll" />
|
||||||
<include name="../bin/OpenSim.Framework.Console.dll" />
|
<include name="../bin/OpenSim.Framework.Console.dll" />
|
||||||
<include name="../bin/libsecondlife.dll" />
|
<include name="../bin/libsecondlife.dll" />
|
||||||
|
<include name="../bin/Db4objects.Db4o.dll" />
|
||||||
</references>
|
</references>
|
||||||
</csc>
|
</csc>
|
||||||
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" />
|
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" />
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
<include name="AssemblyInfo.cs" />
|
<include name="AssemblyInfo.cs" />
|
||||||
<include name="DbSimConfig.cs" />
|
<include name="DbSimConfig.cs" />
|
||||||
<include name="MapStorage.cs" />
|
|
||||||
</sources>
|
</sources>
|
||||||
<references basedir="${project::get-base-directory()}">
|
<references basedir="${project::get-base-directory()}">
|
||||||
<lib>
|
<lib>
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
<include name="System.dll" />
|
<include name="System.dll" />
|
||||||
<include name="System.Xml.dll" />
|
<include name="System.Xml.dll" />
|
||||||
<include name="../bin/libsecondlife.dll" />
|
<include name="../bin/libsecondlife.dll" />
|
||||||
|
<include name="../bin/Db4objects.Db4o.dll" />
|
||||||
</references>
|
</references>
|
||||||
</csc>
|
</csc>
|
||||||
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" />
|
<echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../bin/" />
|
||||||
|
|
|
@ -4,6 +4,7 @@ using System.Text;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using OpenSim.Framework.Utilities;
|
using OpenSim.Framework.Utilities;
|
||||||
using OpenSim.Framework.Inventory;
|
using OpenSim.Framework.Inventory;
|
||||||
|
using Db4objects.Db4o;
|
||||||
|
|
||||||
namespace OpenSim.Framework.User
|
namespace OpenSim.Framework.User
|
||||||
{
|
{
|
||||||
|
@ -12,13 +13,19 @@ namespace OpenSim.Framework.User
|
||||||
|
|
||||||
public Dictionary<LLUUID, UserProfile> UserProfiles = new Dictionary<LLUUID, UserProfile>();
|
public Dictionary<LLUUID, UserProfile> UserProfiles = new Dictionary<LLUUID, UserProfile>();
|
||||||
|
|
||||||
public UserProfileManagerBase()
|
public UserProfileManagerBase() {
|
||||||
{
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public virtual void InitUserProfiles()
|
public virtual void InitUserProfiles()
|
||||||
{
|
{
|
||||||
// TODO: need to load from database
|
IObjectContainer db;
|
||||||
|
db = Db4oFactory.OpenFile("userprofiles.yap");
|
||||||
|
IObjectSet result = db.Get(typeof(UserProfile));
|
||||||
|
foreach (UserProfile userprof in result) {
|
||||||
|
UserProfiles.Add(userprof.UUID, userprof);
|
||||||
|
}
|
||||||
|
Console.WriteLine("UserProfiles.Cs:InitUserProfiles() - Successfully loaded " + result.Count.ToString() + " from database");
|
||||||
|
db.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserProfile GetProfileByName(string firstname, string lastname)
|
public UserProfile GetProfileByName(string firstname, string lastname)
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
<sources failonempty="true">
|
<sources failonempty="true">
|
||||||
<include name="AssemblyInfo.cs" />
|
<include name="AssemblyInfo.cs" />
|
||||||
<include name="Db4LocalStorage.cs" />
|
<include name="Db4LocalStorage.cs" />
|
||||||
|
<include name="MapStorage.cs" />
|
||||||
<include name="UUIDQuery.cs" />
|
<include name="UUIDQuery.cs" />
|
||||||
</sources>
|
</sources>
|
||||||
<references basedir="${project::get-base-directory()}">
|
<references basedir="${project::get-base-directory()}">
|
||||||
|
|
|
@ -68,7 +68,6 @@
|
||||||
<target name="build" depends="init" description="">
|
<target name="build" depends="init" description="">
|
||||||
<nant buildfile="OpenSim.Framework/OpenSim.Framework.dll.build" target="build" />
|
<nant buildfile="OpenSim.Framework/OpenSim.Framework.dll.build" target="build" />
|
||||||
<nant buildfile="OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build" target="build" />
|
<nant buildfile="OpenSim.Framework.Console/OpenSim.Framework.Console.dll.build" target="build" />
|
||||||
<nant buildfile="OpenSim.Framework/OpenSim.Framework.dll.build" target="build" />
|
|
||||||
<nant buildfile="Servers/OpenSim.Servers.dll.build" target="build" />
|
<nant buildfile="Servers/OpenSim.Servers.dll.build" target="build" />
|
||||||
<nant buildfile="OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build" target="build" />
|
<nant buildfile="OpenGridServices.GridServer/OpenGridServices.GridServer.exe.build" target="build" />
|
||||||
<nant buildfile="OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build" target="build" />
|
<nant buildfile="OpenGridServices.UserServer/OpenGridServices.UserServer.exe.build" target="build" />
|
||||||
|
|
23
prebuild.xml
23
prebuild.xml
|
@ -50,6 +50,7 @@
|
||||||
<Reference name="System"/>
|
<Reference name="System"/>
|
||||||
<Reference name="System.Xml"/>
|
<Reference name="System.Xml"/>
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
|
<Reference name="Db4objects.Db4o.dll"/>
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
</Files>
|
</Files>
|
||||||
|
@ -74,27 +75,6 @@
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
<Project name="OpenSim.Framework" path="OpenSim.Framework" type="Library">
|
|
||||||
<Configuration name="Debug">
|
|
||||||
<Options>
|
|
||||||
<OutputPath>../bin/</OutputPath>
|
|
||||||
</Options>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration name="Release">
|
|
||||||
<Options>
|
|
||||||
<OutputPath>../bin/</OutputPath>
|
|
||||||
</Options>
|
|
||||||
</Configuration>
|
|
||||||
|
|
||||||
<ReferencePath>../bin/</ReferencePath>
|
|
||||||
<Reference name="System"/>
|
|
||||||
<Reference name="System.Xml"/>
|
|
||||||
<Reference name="libsecondlife.dll"/>
|
|
||||||
<Files>
|
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
|
||||||
</Files>
|
|
||||||
</Project>
|
|
||||||
|
|
||||||
<Project name="OpenSim.Servers" path="Servers" type="Library">
|
<Project name="OpenSim.Servers" path="Servers" type="Library">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
<Options>
|
<Options>
|
||||||
|
@ -167,6 +147,7 @@
|
||||||
<Reference name="OpenSim.Framework"/>
|
<Reference name="OpenSim.Framework"/>
|
||||||
<Reference name="OpenSim.Framework.Console"/>
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
<Reference name="libsecondlife.dll"/>
|
<Reference name="libsecondlife.dll"/>
|
||||||
|
<Reference name="Db4objects.Db4o.dll"/>
|
||||||
|
|
||||||
<Files>
|
<Files>
|
||||||
<Match pattern="*.cs" recurse="true"/>
|
<Match pattern="*.cs" recurse="true"/>
|
||||||
|
|
Loading…
Reference in New Issue