29 using System.Collections.Generic;
30 using System.Reflection;
35 using OpenSim.Region.Framework.Interfaces;
36 using OpenSim.Region.Framework.Scenes;
37 using OpenSim.Server.Base;
38 using OpenSim.Services.Interfaces;
41 namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
43 [Extension(Path =
"/OpenSim/RegionModules", NodeName =
"RegionModule", Id =
"LocalPresenceServicesConnector")]
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 #region ISharedRegionModule
52 get {
return "LocalPresenceServicesConnector"; }
57 IConfig moduleConfig = source.Configs[
"Modules"];
58 if (moduleConfig != null)
60 string name = moduleConfig.GetString(
"PresenceServices",
"");
63 IConfig inventoryConfig = source.Configs[
"PresenceService"];
64 if (inventoryConfig == null)
66 m_log.Error(
"[LOCAL PRESENCE CONNECTOR]: PresenceService missing from OpenSim.ini");
70 string serviceDll = inventoryConfig.GetString(
"LocalServiceModule", String.Empty);
72 if (serviceDll ==
String.Empty)
74 m_log.Error(
"[LOCAL PRESENCE CONNECTOR]: No LocalServiceModule named in section PresenceService");
79 m_log.DebugFormat(
"[LOCAL PRESENCE CONNECTOR]: Service dll = {0}", serviceDll);
81 m_PresenceService = ServerUtils.LoadPlugin<
IPresenceService>(serviceDll, args);
83 if (m_PresenceService == null)
85 m_log.Error(
"[LOCAL PRESENCE CONNECTOR]: Can't load presence service");
87 throw new Exception(
"Unable to proceed. Please make sure your ini files in config-include are updated according to .example's");
95 m_log.Info(
"[LOCAL PRESENCE CONNECTOR]: Local presence connector enabled");
void Initialise(IConfigSource source)
This is called to initialize the region module. For shared modules, this is called exactly once...
OpenSim.Services.Interfaces.PresenceInfo PresenceInfo