29 using System.Collections;
30 using System.Reflection;
35 using OpenMetaverse.StructuredData;
36 using OpenSim.Framework;
37 using OpenSim.Framework.Servers.HttpServer;
38 using OpenSim.Region.Framework.Interfaces;
39 using OpenSim.Region.Framework.Scenes;
40 using OpenSim.Services.Interfaces;
43 namespace OpenSim.
Region.ClientStack.Linden
48 [Extension(Path =
"/OpenSim/RegionModules", NodeName =
"RegionModule", Id =
"MeshUploadFlagModule")]
57 public bool Enabled {
get;
private set; }
59 private Scene m_scene;
61 #region ISharedRegionModule Members
70 IConfig config = source.Configs[
"Mesh"];
77 Enabled = config.GetBoolean(
"AllowMeshUpload", Enabled);
87 m_scene.EventManager.OnRegisterCaps += RegisterCaps;
95 m_scene.EventManager.OnRegisterCaps -= RegisterCaps;
108 public string Name {
get {
return "MeshUploadFlagModule"; } }
110 public Type ReplaceableInterface
121 "GET",
"/CAPS/" +
UUID.Random(), ht => MeshUploadFlag(ht, agentID),
"MeshUploadFlag", agentID.ToString());
123 caps.RegisterHandler(
"MeshUploadFlag", reqHandler);
127 private Hashtable MeshUploadFlag(Hashtable mDhttpMethod, UUID agentID)
136 data[
"mesh_upload_status"] =
"valid";
143 Hashtable responsedata =
new Hashtable();
144 responsedata[
"int_response_code"] = 200;
145 responsedata[
"content_type"] =
"text/plain";
146 responsedata[
"keepalive"] =
false;
147 responsedata[
"str_response_string"] = OSDParser.SerializeLLSDXmlString(data);
void RemoveRegion(Scene s)
This is called whenever a Scene is removed. For shared modules, this can happen several times...
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
void RegionLoaded(Scene s)
This will be called once for every scene loaded. In a shared module this will be multiple times in on...
OpenMetaverse.StructuredData.OSDMap OSDMap
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...
MeshUploadFlag capability. This is required for uploading Mesh.
void Close()
This is the inverse to Initialise. After a Close(), this instance won't be usable anymore...
void RegisterCaps(UUID agentID, Caps caps)