mirror of
https://github.com/opensim/opensim.git
synced 2026-06-27 17:25:48 +08:00
Two more modules converted: XmlRpcGridRouterModule and XmlRpcRouterModule.
This commit is contained in:
@@ -31,6 +31,7 @@ using System.Reflection;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using OpenMetaverse;
|
||||
using Mono.Addins;
|
||||
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
@@ -39,25 +40,44 @@ using OpenSim.Region.Framework.Scenes;
|
||||
|
||||
namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule
|
||||
{
|
||||
public class XmlRpcRouter : IRegionModule, IXmlRpcRouter
|
||||
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "XmlRpcRouter")]
|
||||
public class XmlRpcRouter : INonSharedRegionModule, IXmlRpcRouter
|
||||
{
|
||||
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource config)
|
||||
|
||||
private bool m_Enabled;
|
||||
|
||||
#region INonSharedRegionModule
|
||||
|
||||
public void Initialise(IConfigSource config)
|
||||
{
|
||||
IConfig startupConfig = config.Configs["Startup"];
|
||||
IConfig startupConfig = config.Configs["XMLRPC"];
|
||||
if (startupConfig == null)
|
||||
return;
|
||||
|
||||
if (startupConfig.GetString("XmlRpcRouterModule",
|
||||
"XmlRpcRouterModule") == "XmlRpcRouterModule")
|
||||
{
|
||||
scene.RegisterModuleInterface<IXmlRpcRouter>(this);
|
||||
}
|
||||
m_Enabled = true;
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
if (!m_Enabled)
|
||||
return;
|
||||
|
||||
scene.RegisterModuleInterface<IXmlRpcRouter>(this);
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
if (!m_Enabled)
|
||||
return;
|
||||
|
||||
scene.UnregisterModuleInterface<IXmlRpcRouter>(this);
|
||||
}
|
||||
|
||||
public void Close()
|
||||
@@ -69,11 +89,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcRouterModule
|
||||
get { return "XmlRpcRouterModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
public Type ReplaceableInterface
|
||||
{
|
||||
get { return false; }
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public void RegisterNewReceiver(IScriptModule scriptEngine, UUID channel, UUID objectID, UUID itemID, string uri)
|
||||
{
|
||||
scriptEngine.PostScriptEvent(itemID, "xmlrpc_uri", new Object[] {uri});
|
||||
|
||||
Reference in New Issue
Block a user