mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
Mantis#1591. Thank you graciously, Sempuki for a patch that:
Currently module loading is done ad-hoc. I propose creating a simple loader class that leverages Mono.Addins (and perhaps the new .NET addins when they become available in mono). Attached is a basic patch for review that compiles into HEAD, but doesn't yet replace any existing ad-hoc loaders.
This commit is contained in:
@@ -46,6 +46,19 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||
|
||||
#region IApplicationPlugin Members
|
||||
|
||||
// TODO: required by IPlugin, but likely not at all right
|
||||
string m_name = "LoadRegionsPlugin";
|
||||
string m_version = "0.0";
|
||||
|
||||
public string Version { get { return m_version; } }
|
||||
public string Name { get { return m_name; } }
|
||||
|
||||
public void Initialise()
|
||||
{
|
||||
m_log.Info("[LOADREGIONS]: " + Name + " cannot be default-initialized!");
|
||||
throw new PluginNotInitialisedException (Name);
|
||||
}
|
||||
|
||||
public void Initialise(OpenSimBase openSim)
|
||||
{
|
||||
m_log.Info("[LOADREGIONS]: Load Regions addin being initialised");
|
||||
@@ -78,7 +91,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||
openSim.ModuleLoader.ClearCache();
|
||||
}
|
||||
|
||||
public void Close()
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -113,4 +126,4 @@ namespace OpenSim.ApplicationPlugins.LoadRegions
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,6 +54,19 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
private BaseHttpServer m_httpd;
|
||||
private string requiredPassword = String.Empty;
|
||||
|
||||
// TODO: required by IPlugin, but likely not at all right
|
||||
string m_name = "RemoteAdminPlugin";
|
||||
string m_version = "0.0";
|
||||
|
||||
public string Version { get { return m_version; } }
|
||||
public string Name { get { return m_name; } }
|
||||
|
||||
public void Initialise()
|
||||
{
|
||||
m_log.Info("[RADMIN]: " + Name + " cannot be default-initialized!");
|
||||
throw new PluginNotInitialisedException (Name);
|
||||
}
|
||||
|
||||
public void Initialise(OpenSimBase openSim)
|
||||
{
|
||||
try
|
||||
@@ -607,8 +620,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
return response;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,6 +188,17 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||
|
||||
|
||||
#region methods
|
||||
// TODO: required by IPlugin, but likely not at all right
|
||||
string m_version = "0.0";
|
||||
|
||||
public string Version { get { return m_version; } }
|
||||
|
||||
public void Initialise()
|
||||
{
|
||||
m_log.Info("[RESTPLUGIN]: " + Name + " cannot be default-initialized!");
|
||||
throw new PluginNotInitialisedException (Name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is called by OpenSimMain immediately after loading the
|
||||
/// plugin and after basic server setup, but before running any server commands.
|
||||
@@ -357,6 +368,11 @@ namespace OpenSim.ApplicationPlugins.Rest
|
||||
_agents = null;
|
||||
}
|
||||
|
||||
public virtual void Dispose()
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return a failure message.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user