29 using System.Reflection;
30 using System.Collections.Generic;
34 using OpenSim.Framework;
35 using OpenSim.Framework.Servers;
36 using OpenSim.Region.Framework.Scenes;
37 using OpenSim.Region.Framework.Interfaces;
38 using OpenSim.Server.Base;
39 using OpenSim.Server.Handlers.Base;
40 using OpenSim.Services.Interfaces;
46 [Extension(Path =
"/OpenSim/RegionModules", NodeName =
"RegionModule", Id =
"LandServiceInConnectorModule")]
49 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
50 private static bool m_Enabled =
false;
51 private static bool m_Registered =
false;
53 private IConfigSource m_Config;
54 private List<Scene> m_Scenes =
new List<Scene>();
56 #region Region Module interface
62 IConfig moduleConfig = config.Configs[
"Modules"];
63 if (moduleConfig != null)
65 m_Enabled = moduleConfig.GetBoolean(
"LandServiceInConnector",
false);
68 m_log.Info(
"[LAND IN CONNECTOR]: LandServiceInConnector enabled");
87 public Type ReplaceableInterface
94 get {
return "LandServiceInConnectorModule"; }
105 Object[] args =
new Object[] { m_Config, MainServer.Instance,
this, scene };
106 ServerUtils.LoadPlugin<
IServiceConnector>(
"OpenSim.Server.Handlers.dll:LandServiceInConnector", args);
115 if (m_Enabled && m_Scenes.Contains(scene))
116 m_Scenes.Remove(scene);
129 m_log.DebugFormat(
"[LAND IN CONNECTOR]: GetLandData for {0}. Count = {1}",
130 regionHandle, m_Scenes.Count);
131 foreach (
Scene s
in m_Scenes)
135 m_log.Debug(
"[LAND IN CONNECTOR]: Found region to GetLandData from");
136 regionAccess = s.RegionInfo.AccessLevel;
137 return s.GetLandData(x, y);
140 m_log.DebugFormat(
"[LAND IN CONNECTOR]: region handle {0} not found", regionHandle);
145 #endregion ILandService
void PostInitialise()
This is called exactly once after all the shared region-modules have been instanciated and IRegionMod...
void RegionLoaded(Scene scene)
This will be called once for every scene loaded. In a shared module this will be multiple times in on...
LandData GetLandData(UUID scopeID, ulong regionHandle, uint x, uint y, out byte regionAccess)
void AddRegion(Scene scene)
This is called whenever a Scene is added. For shared modules, this can happen several times...
void Close()
This is the inverse to Initialise. After a Close(), this instance won't be usable anymore...
Details of a Parcel of land
void RemoveRegion(Scene scene)
This is called whenever a Scene is removed. For shared modules, this can happen several times...
Interactive OpenSim region server
virtual RegionInfo RegionInfo
void Initialise(IConfigSource config)
This is called to initialize the region module. For shared modules, this is called exactly once...