Some complex re-ordering to make prebuild do what needed to be done.

It is now possible to use module interfaces without referencing Scene.
Place those interfaces in OpenSim/Region/Interfaces. They may not
use any refs from OpenSim.Region.Environment as parameters.
This resolves a circular library ref introduced in r5949
0.6.0-stable
Melanie Thielker 2008-08-23 02:30:07 +00:00
parent 1b2939ac98
commit ccd74f888b
13 changed files with 49 additions and 9 deletions

View File

@ -35,8 +35,7 @@ using log4net;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers; using OpenSim.Framework.Servers;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Interfaces;
using OpenSim.Region.Environment.Scenes;
namespace OpenSim.Framework.Communications.Capabilities namespace OpenSim.Framework.Communications.Capabilities
{ {
@ -614,7 +613,7 @@ namespace OpenSim.Framework.Communications.Capabilities
llsdRequest.asset_type == "sound") llsdRequest.asset_type == "sound")
{ {
IClientAPI client = GetClient(m_agentID); IClientAPI client = GetClient(m_agentID);
Scene scene = (Scene)client.Scene; IScene scene = client.Scene;
IMoneyModule mm = scene.RequestModuleInterface<IMoneyModule>(); IMoneyModule mm = scene.RequestModuleInterface<IMoneyModule>();

View File

@ -63,5 +63,7 @@ namespace OpenSim.Framework
bool PresenceChildStatus(LLUUID avatarID); bool PresenceChildStatus(LLUUID avatarID);
string GetCapsPath(LLUUID agentId); string GetCapsPath(LLUUID agentId);
T RequestModuleInterface<T>();
} }
} }

View File

@ -32,6 +32,7 @@ using libsecondlife;
using log4net; using log4net;
using Nini.Config; using Nini.Config;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.Interfaces;
using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Scenes;

View File

@ -38,6 +38,7 @@ using Nini.Config;
using Nwc.XmlRpc; using Nwc.XmlRpc;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Interfaces;
using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Scenes;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
@ -54,7 +55,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
/// Centralized grid structure example using OpenSimWi Redux revision 9+ /// Centralized grid structure example using OpenSimWi Redux revision 9+
/// svn co https://opensimwiredux.svn.sourceforge.net/svnroot/opensimwiredux /// svn co https://opensimwiredux.svn.sourceforge.net/svnroot/opensimwiredux
/// </summary> /// </summary>
public class SampleMoneyModule : IMoneyModule public class SampleMoneyModule : IMoneyModule, IRegionModule
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

View File

@ -35,6 +35,7 @@ using libsecondlife.Packets;
using log4net; using log4net;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Region.Interfaces;
using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Interfaces;
namespace OpenSim.Region.Environment.Scenes namespace OpenSim.Region.Environment.Scenes

View File

@ -2963,7 +2963,7 @@ namespace OpenSim.Region.Environment.Scenes
/// For the given interface, retrieve the region module which implements it. /// For the given interface, retrieve the region module which implements it.
/// </summary> /// </summary>
/// <returns>null if there is no module implementing that interface</returns> /// <returns>null if there is no module implementing that interface</returns>
public T RequestModuleInterface<T>() public override T RequestModuleInterface<T>()
{ {
if (ModuleInterfaces.ContainsKey(typeof(T))) if (ModuleInterfaces.ContainsKey(typeof(T)))
{ {

View File

@ -220,5 +220,10 @@ namespace OpenSim.Region.Environment.Scenes
return null; return null;
} }
public virtual T RequestModuleInterface<T>()
{
return default(T);
}
} }
} }

View File

@ -29,10 +29,10 @@ using System;
using OpenSim.Framework; using OpenSim.Framework;
using libsecondlife; using libsecondlife;
namespace OpenSim.Region.Environment.Interfaces namespace OpenSim.Region.Interfaces
{ {
public delegate void ObjectPaid(LLUUID objectID, LLUUID agentID, int amount); public delegate void ObjectPaid(LLUUID objectID, LLUUID agentID, int amount);
public interface IMoneyModule : IRegionModule public interface IMoneyModule
{ {
bool ObjectGiveMoney(LLUUID objectID, LLUUID fromID, LLUUID toID, bool ObjectGiveMoney(LLUUID objectID, LLUUID fromID, LLUUID toID,
int amount); int amount);

View File

@ -38,6 +38,7 @@ using libsecondlife.Packets;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Region.Environment; using OpenSim.Region.Environment;
using OpenSim.Region.Interfaces;
using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney; using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney;
using OpenSim.Region.Environment.Modules.World.Land; using OpenSim.Region.Environment.Modules.World.Land;

View File

@ -31,6 +31,7 @@ using libsecondlife;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney; using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney;
using OpenSim.Region.Environment; using OpenSim.Region.Environment;
using OpenSim.Region.Interfaces;
using OpenSim.Region; using OpenSim.Region;
using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Scenes;
using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Interfaces;

View File

@ -39,6 +39,7 @@ using OpenSim;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache; using OpenSim.Framework.Communications.Cache;
using OpenSim.Region.Environment; using OpenSim.Region.Environment;
using OpenSim.Region.Interfaces;
using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney; using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney;
using OpenSim.Region.Environment.Modules.World.Land; using OpenSim.Region.Environment.Modules.World.Land;

View File

@ -31,6 +31,7 @@ using System.Collections.Generic;
using libsecondlife; using libsecondlife;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney; using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney;
using OpenSim.Region.Interfaces;
using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Scenes;
using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.ScriptEngine.Shared; using OpenSim.Region.ScriptEngine.Shared;

View File

@ -650,6 +650,29 @@
</Files> </Files>
</Project> </Project>
<Project name="OpenSim.Region.Interfaces" path="OpenSim/Region/Interfaces" 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" localCopy="false"/>
<Reference name="System.Runtime.Remoting"/>
<Reference name="OpenSim.Framework"/>
<Reference name="libsecondlife.dll"/>
<Files>
<Match pattern="*.cs" recurse="true"/>
</Files>
</Project>
<!-- OpenSim.Framework.Communications --> <!-- OpenSim.Framework.Communications -->
<Project name="OpenSim.Framework.Communications" path="OpenSim/Framework/Communications" type="Library"> <Project name="OpenSim.Framework.Communications" path="OpenSim/Framework/Communications" type="Library">
<Configuration name="Debug"> <Configuration name="Debug">
@ -668,12 +691,12 @@
<Reference name="System.Xml"/> <Reference name="System.Xml"/>
<Reference name="System.Web"/> <Reference name="System.Web"/>
<Reference name="OpenSim.Framework"/> <Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Region.Environment"/>
<Reference name="OpenSim.Framework.AssetLoader.Filesystem"/> <Reference name="OpenSim.Framework.AssetLoader.Filesystem"/>
<Reference name="OpenSim.Data" /> <Reference name="OpenSim.Data" />
<Reference name="OpenSim.Framework.Servers"/> <Reference name="OpenSim.Framework.Servers"/>
<Reference name="OpenSim.Framework.Console"/> <Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Framework.Statistics"/> <Reference name="OpenSim.Framework.Statistics"/>
<Reference name="OpenSim.Region.Interfaces"/>
<Reference name="libsecondlife.dll"/> <Reference name="libsecondlife.dll"/>
<Reference name="Nini.dll" /> <Reference name="Nini.dll" />
<Reference name="XMLRPC.dll"/> <Reference name="XMLRPC.dll"/>
@ -768,6 +791,7 @@
<Reference name="Axiom.MathLib.dll"/> <Reference name="Axiom.MathLib.dll"/>
<Reference name="OpenSim.Framework"/> <Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Data" /> <Reference name="OpenSim.Data" />
<Reference name="OpenSim.Region.Interfaces" />
<Reference name="OpenSim.Framework.Console"/> <Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Framework.Servers"/> <Reference name="OpenSim.Framework.Servers"/>
<Reference name="OpenSim.Framework.Statistics"/> <Reference name="OpenSim.Framework.Statistics"/>
@ -1575,6 +1599,7 @@
<Reference name="OpenSim" /> <Reference name="OpenSim" />
<Reference name="OpenSim.Framework"/> <Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Framework.Communications"/> <Reference name="OpenSim.Framework.Communications"/>
<Reference name="OpenSim.Region.Interfaces" />
<Reference name="OpenSim.Region.Environment" /> <Reference name="OpenSim.Region.Environment" />
<Reference name="OpenSim.Region.Physics.Manager" /> <Reference name="OpenSim.Region.Physics.Manager" />
<Reference name="OpenSim.Framework.Console"/> <Reference name="OpenSim.Framework.Console"/>
@ -1665,6 +1690,7 @@
<Reference name="OpenSim" /> <Reference name="OpenSim" />
<Reference name="OpenSim.Framework"/> <Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Framework.Communications"/> <Reference name="OpenSim.Framework.Communications"/>
<Reference name="OpenSim.Region.Interfaces" />
<Reference name="OpenSim.Region.Environment" /> <Reference name="OpenSim.Region.Environment" />
<Reference name="OpenSim.Framework.Console"/> <Reference name="OpenSim.Framework.Console"/>
<Reference name="OpenSim.Region.ScriptEngine.Shared"/> <Reference name="OpenSim.Region.ScriptEngine.Shared"/>
@ -1888,6 +1914,7 @@
<Reference name="OpenSim.Framework"/> <Reference name="OpenSim.Framework"/>
<Reference name="OpenSim.Framework.Communications"/> <Reference name="OpenSim.Framework.Communications"/>
<Reference name="OpenSim.Region.Environment" /> <Reference name="OpenSim.Region.Environment" />
<Reference name="OpenSim.Region.Interfaces" />
<Reference name="OpenSim.Region.Physics.Manager" /> <Reference name="OpenSim.Region.Physics.Manager" />
<Reference name="OpenSim.Framework.Console"/> <Reference name="OpenSim.Framework.Console"/>
<Reference name="Axiom.MathLib.dll" localCopy="false"/> <Reference name="Axiom.MathLib.dll" localCopy="false"/>