From 756c5170694fa3dc4146c2b4034f52bd5c97ec86 Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 26 Feb 2009 22:51:52 +0000 Subject: Added IRegionCreator interface that all ApplicationPlugins that are creators of Scenes should implement and register with the ApplicationRegistry.StackModuleInterface<>(); So that other plugins can attach to their OnNewRegionCreated event. Made some changes to IRegistryCore and RegistryCore so they support "Stacked" interfaces. --- OpenSim/Framework/IRegionCreator.cs | 12 ++++++++++++ OpenSim/Framework/IRegistryCore.cs | 5 ++++- OpenSim/Framework/RegistryCore.cs | 10 ++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 OpenSim/Framework/IRegionCreator.cs (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/IRegionCreator.cs b/OpenSim/Framework/IRegionCreator.cs new file mode 100644 index 0000000..7920ee4 --- /dev/null +++ b/OpenSim/Framework/IRegionCreator.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenSim.Framework +{ + public delegate void NewRegionCreated(IScene scene); + public interface IRegionCreator + { + event NewRegionCreated OnNewRegionCreated; + } +} diff --git a/OpenSim/Framework/IRegistryCore.cs b/OpenSim/Framework/IRegistryCore.cs index 486dee6..9f251c5 100644 --- a/OpenSim/Framework/IRegistryCore.cs +++ b/OpenSim/Framework/IRegistryCore.cs @@ -4,10 +4,13 @@ using System.Text; namespace OpenSim.Framework { - public interface IRegistryCore + public interface IRegistryCore { T Get(); void RegisterInterface(T iface); bool TryGet(out T iface); + + void StackModuleInterface(M mod); + T[] RequestModuleInterfaces(); } } diff --git a/OpenSim/Framework/RegistryCore.cs b/OpenSim/Framework/RegistryCore.cs index c703f9f..ee15845 100644 --- a/OpenSim/Framework/RegistryCore.cs +++ b/OpenSim/Framework/RegistryCore.cs @@ -40,5 +40,15 @@ namespace OpenSim.Framework return (T)m_moduleInterfaces[typeof(T)]; } + public void StackModuleInterface(M mod) + { + + } + + public T[] RequestModuleInterfaces() + { + return new T[] { default(T) }; + } + } } -- cgit v1.1