Adding main config to the plugin init

integration
BlueWall 2012-05-23 14:37:26 -04:00
parent a73a5be0c5
commit e289006611
1 changed files with 8 additions and 8 deletions

View File

@ -45,9 +45,9 @@ namespace OpenSim.Services.IntegrationService
[TypeExtensionPoint (Path="/OpenSim/IntegrationService", Name="IntegrationService")] [TypeExtensionPoint (Path="/OpenSim/IntegrationService", Name="IntegrationService")]
public interface IntegrationPlugin public interface IntegrationPlugin
{ {
void Init(IConfigSource PluginConfig, IHttpServer server, ServiceBase service); void Init(IConfigSource MainConfig, IConfigSource PluginConfig, IHttpServer server, ServiceBase service);
void Unload(); void Unload();
string Name { get; } string PluginName { get; }
string ConfigName { get; } string ConfigName { get; }
string DefaultConfig { get; } string DefaultConfig { get; }
} }
@ -105,7 +105,7 @@ namespace OpenSim.Services.IntegrationService
registry.Update (); registry.Update ();
foreach (IntegrationPlugin cmd in AddinManager.GetExtensionObjects("/OpenSim/IntegrationService")) foreach (IntegrationPlugin cmd in AddinManager.GetExtensionObjects("/OpenSim/IntegrationService"))
{ {
m_log.DebugFormat("[INTEGRATION SERVICE]: Processing _Addin {0}", cmd.Name); m_log.DebugFormat("[INTEGRATION SERVICE]: Processing _Addin {0}", cmd.PluginName);
LoadingPlugin(cmd); LoadingPlugin(cmd);
} }
@ -192,14 +192,14 @@ namespace OpenSim.Services.IntegrationService
// Build up // Build up
case ExtensionChange.Add: case ExtensionChange.Add:
m_log.DebugFormat("[INTEGRATION SERVICE]: Plugin Added {0}", ip.Name); m_log.DebugFormat("[INTEGRATION SERVICE]: Plugin Added {0}", ip.PluginName);
LoadingPlugin(ip); LoadingPlugin(ip);
return; return;
// Tear down // Tear down
case ExtensionChange.Remove: case ExtensionChange.Remove:
m_log.DebugFormat("[INTEGRATION SERVICE]: Plugin Remove {0}", ip.Name); m_log.DebugFormat("[INTEGRATION SERVICE]: Plugin Remove {0}", ip.PluginName);
UnLoadingPlugin(ip); UnLoadingPlugin(ip);
return; return;
} }
@ -222,7 +222,7 @@ namespace OpenSim.Services.IntegrationService
// Fetch the starter ini // Fetch the starter ini
if (PlugConfig == null) if (PlugConfig == null)
{ {
m_log.DebugFormat("[INTEGRATION SERVICE]: Fetching starter config for {0} from {1}", plugin.Name, plugin.DefaultConfig); m_log.DebugFormat("[INTEGRATION SERVICE]: Fetching starter config for {0} from {1}", plugin.PluginName, plugin.DefaultConfig);
// Send the default data service // Send the default data service
IConfig DataService = m_ConfigSource.Configs["DatabaseService"]; IConfig DataService = m_ConfigSource.Configs["DatabaseService"];
@ -239,8 +239,8 @@ namespace OpenSim.Services.IntegrationService
PlugConfig = Ux.GetConfigSource(m_IntegrationConfigLoc, plugin.ConfigName); PlugConfig = Ux.GetConfigSource(m_IntegrationConfigLoc, plugin.ConfigName);
} }
m_log.DebugFormat("[INTEGRATION SERVICE]: ****** In Loading Plugin {0}", plugin.Name); m_log.DebugFormat("[INTEGRATION SERVICE]: ****** In Loading Plugin {0}", plugin.PluginName);
plugin.Init(PlugConfig, m_Server, this); plugin.Init(m_ConfigSource, PlugConfig, m_Server, this);
} }
private void UnLoadingPlugin(IntegrationPlugin plugin) private void UnLoadingPlugin(IntegrationPlugin plugin)