29 using System.Collections;
30 using System.Collections.Specialized;
32 using System.Drawing.Imaging;
33 using System.Reflection;
40 using OpenMetaverse.StructuredData;
41 using OpenMetaverse.Imaging;
42 using OpenSim.Framework;
43 using OpenSim.Framework.Servers;
44 using OpenSim.Framework.Servers.HttpServer;
45 using OpenSim.Region.Framework.Interfaces;
46 using OpenSim.Region.Framework.Scenes;
47 using OpenSim.Services.Interfaces;
49 using OpenSim.Capabilities.Handlers;
51 namespace OpenSim.
Region.ClientStack.Linden
54 [Extension(Path =
"/OpenSim/RegionModules", NodeName =
"RegionModule", Id =
"GetDisplayNamesModule")]
57 private static readonly ILog m_log =
58 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
60 private Scene m_scene;
63 private bool m_Enabled =
false;
67 #region ISharedRegionModule Members
71 IConfig config = source.Configs[
"ClientStack.LindenCaps"];
75 m_URL = config.GetString(
"Cap_GetDisplayNames", string.Empty);
76 if (m_URL !=
string.Empty)
93 m_scene.EventManager.OnRegisterCaps -= RegisterCaps;
103 m_scene.EventManager.OnRegisterCaps += RegisterCaps;
112 public string Name {
get {
return "GetDisplayNamesModule"; } }
114 public Type ReplaceableInterface
123 UUID capID = UUID.Random();
125 if (m_URL ==
"localhost")
127 m_log.DebugFormat(
"[GET_DISPLAY_NAMES]: /CAPS/agents/{0} in region {1}", capID, m_scene.RegionInfo.RegionName);
128 caps.RegisterHandler(
130 new GetDisplayNamesHandler(
"/CAPS/agents" + capID +
"/", m_UserManager,
"GetDisplayNames", agentID.ToString()));
137 handler.RegisterExternalUserCapsHandler(agentID,caps,
"GetDisplayNames", m_URL);
139 caps.RegisterHandler(
"GetDisplayNames", m_URL);
void Close()
This is the inverse to Initialise. After a Close(), this instance won't be usable anymore...
void RemoveRegion(Scene s)
This is called whenever a Scene is removed. For shared modules, this can happen several times...
OpenSim.Framework.Capabilities.Caps Caps
void Initialise(IConfigSource source)
This is called to initialize the region module. For shared modules, this is called exactly once...
void RegionLoaded(Scene s)
This will be called once for every scene loaded. In a shared module this will be multiple times in on...
void RegisterCaps(UUID agentID, Caps caps)
void AddRegion(Scene s)
This is called whenever a Scene is added. For shared modules, this can happen several times...
OpenSim.Framework.Capabilities.Caps Caps
This maintains the relationship between a UUID and a user name.