31 using OpenSim.Capabilities.Handlers;
32 using OpenSim.Framework.Servers.HttpServer;
33 using OpenSim.Region.Framework.Interfaces;
34 using OpenSim.Region.Framework.Scenes;
35 using OpenSim.Services.Interfaces;
39 namespace OpenSim.Region.ClientStack.Linden
44 [Extension(Path =
"/OpenSim/RegionModules", NodeName =
"RegionModule", Id =
"FetchInventory2Module")]
49 public bool Enabled {
get;
private set; }
51 private Scene m_scene;
55 private string m_fetchInventory2Url;
57 #region ISharedRegionModule Members
61 IConfig config = source.Configs[
"ClientStack.LindenCaps"];
65 m_fetchInventory2Url = config.GetString(
"Cap_FetchInventory2", string.Empty);
67 if (m_fetchInventory2Url !=
string.Empty)
84 m_scene.EventManager.OnRegisterCaps -= RegisterCaps;
93 m_inventoryService = m_scene.InventoryService;
95 m_scene.EventManager.OnRegisterCaps += RegisterCaps;
102 public string Name {
get {
return "FetchInventory2Module"; } }
104 public Type ReplaceableInterface
111 private void RegisterCaps(UUID agentID,
Caps caps)
113 RegisterFetchCap(agentID, caps,
"FetchInventory2", m_fetchInventory2Url);
116 private void RegisterFetchCap(UUID agentID,
Caps caps,
string capName,
string url)
120 if (url ==
"localhost")
122 capUrl =
"/CAPS/" + UUID.Random();
128 "POST", capUrl, fetchHandler.FetchInventoryRequest, capName, agentID.ToString());
130 caps.RegisterHandler(capName, reqHandler);
136 caps.RegisterHandler(capName, capUrl);
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 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 module implements both WebFetchInventoryDescendents and FetchInventoryDescendents2 capabilities...
OpenSim.Framework.Capabilities.Caps Caps
void RemoveRegion(Scene s)
This is called whenever a Scene is removed. For shared modules, this can happen several times...
void Initialise(IConfigSource source)
This is called to initialize the region module. For shared modules, this is called exactly once...
void Close()
This is the inverse to Initialise. After a Close(), this instance won't be usable anymore...