diff options
author | BlueWall | 2012-11-25 17:03:14 -0500 |
---|---|---|
committer | BlueWall | 2012-11-25 17:03:14 -0500 |
commit | c754003944d0166bf50b4f94b0c0eea642503bb0 (patch) | |
tree | dfa1c2020d5500d510519d5b2b3236600692f277 /OpenSim/Region/ClientStack/Linden/Caps | |
parent | Merge branch 'master' into connector_plugin (diff) | |
parent | Combine TestDeleteSceneObjectAsync() with TestDeRezSceneObject() as they are ... (diff) | |
download | opensim-SC-c754003944d0166bf50b4f94b0c0eea642503bb0.zip opensim-SC-c754003944d0166bf50b4f94b0c0eea642503bb0.tar.gz opensim-SC-c754003944d0166bf50b4f94b0c0eea642503bb0.tar.bz2 opensim-SC-c754003944d0166bf50b4f94b0c0eea642503bb0.tar.xz |
Merge branch 'master' into connector_plugin
Conflicts:
OpenSim/Server/Base/ServicesServerBase.cs
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/Caps')
14 files changed, 153 insertions, 120 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs index 66b865f..b735dfa 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCapsModule.cs | |||
@@ -45,7 +45,7 @@ using Caps = OpenSim.Framework.Capabilities.Caps; | |||
45 | namespace OpenSim.Region.ClientStack.Linden | 45 | namespace OpenSim.Region.ClientStack.Linden |
46 | { | 46 | { |
47 | 47 | ||
48 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 48 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "BunchOfCapsModule")] |
49 | public class BunchOfCapsModule : INonSharedRegionModule | 49 | public class BunchOfCapsModule : INonSharedRegionModule |
50 | { | 50 | { |
51 | // private static readonly ILog m_log = | 51 | // private static readonly ILog m_log = |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 47cb049..4d2c0f2 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs | |||
@@ -55,8 +55,8 @@ namespace OpenSim.Region.ClientStack.Linden | |||
55 | public OSDMap body; | 55 | public OSDMap body; |
56 | } | 56 | } |
57 | 57 | ||
58 | //[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 58 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "EventQueueGetModule")] |
59 | public class EventQueueGetModule : IEventQueue, IRegionModule | 59 | public class EventQueueGetModule : IEventQueue, INonSharedRegionModule |
60 | { | 60 | { |
61 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 61 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
62 | 62 | ||
@@ -66,8 +66,6 @@ namespace OpenSim.Region.ClientStack.Linden | |||
66 | public int DebugLevel { get; set; } | 66 | public int DebugLevel { get; set; } |
67 | 67 | ||
68 | protected Scene m_scene; | 68 | protected Scene m_scene; |
69 | private IConfigSource m_gConfig; | ||
70 | bool enabledYN; | ||
71 | 69 | ||
72 | private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>(); | 70 | private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>(); |
73 | 71 | ||
@@ -75,60 +73,46 @@ namespace OpenSim.Region.ClientStack.Linden | |||
75 | private Dictionary<UUID, UUID> m_QueueUUIDAvatarMapping = new Dictionary<UUID, UUID>(); | 73 | private Dictionary<UUID, UUID> m_QueueUUIDAvatarMapping = new Dictionary<UUID, UUID>(); |
76 | private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>(); | 74 | private Dictionary<UUID, UUID> m_AvatarQueueUUIDMapping = new Dictionary<UUID, UUID>(); |
77 | 75 | ||
78 | #region IRegionModule methods | 76 | #region INonSharedRegionModule methods |
79 | public virtual void Initialise(Scene scene, IConfigSource config) | 77 | public virtual void Initialise(IConfigSource config) |
80 | { | 78 | { |
81 | m_gConfig = config; | 79 | } |
82 | |||
83 | IConfig startupConfig = m_gConfig.Configs["Startup"]; | ||
84 | |||
85 | ReadConfigAndPopulate(scene, startupConfig, "Startup"); | ||
86 | |||
87 | if (enabledYN) | ||
88 | { | ||
89 | m_scene = scene; | ||
90 | scene.RegisterModuleInterface<IEventQueue>(this); | ||
91 | |||
92 | // Register fallback handler | ||
93 | // Why does EQG Fail on region crossings! | ||
94 | |||
95 | //scene.CommsManager.HttpServer.AddLLSDHandler("/CAPS/EQG/", EventQueueFallBack); | ||
96 | |||
97 | // scene.EventManager.OnNewClient += OnNewClient; | ||
98 | |||
99 | // TODO: Leaving these open, or closing them when we | ||
100 | // become a child is incorrect. It messes up TP in a big | ||
101 | // way. CAPS/EQ need to be active as long as the UDP | ||
102 | // circuit is there. | ||
103 | 80 | ||
104 | scene.EventManager.OnClientClosed += ClientClosed; | 81 | public void AddRegion(Scene scene) |
105 | 82 | { | |
106 | scene.EventManager.OnMakeChildAgent += MakeChildAgent; | 83 | m_scene = scene; |
107 | scene.EventManager.OnRegisterCaps += OnRegisterCaps; | 84 | scene.RegisterModuleInterface<IEventQueue>(this); |
108 | 85 | ||
109 | MainConsole.Instance.Commands.AddCommand( | 86 | scene.EventManager.OnClientClosed += ClientClosed; |
110 | "Debug", | 87 | scene.EventManager.OnMakeChildAgent += MakeChildAgent; |
111 | false, | 88 | scene.EventManager.OnRegisterCaps += OnRegisterCaps; |
112 | "debug eq", | 89 | |
113 | "debug eq [0|1|2]", | 90 | MainConsole.Instance.Commands.AddCommand( |
114 | "Turn on event queue debugging\n" | 91 | "Debug", |
115 | + " <= 0 - turns off all event queue logging\n" | 92 | false, |
116 | + " >= 1 - turns on outgoing event logging\n" | 93 | "debug eq", |
117 | + " >= 2 - turns on poll notification", | 94 | "debug eq [0|1|2]", |
118 | HandleDebugEq); | 95 | "Turn on event queue debugging\n" |
119 | } | 96 | + " <= 0 - turns off all event queue logging\n" |
120 | else | 97 | + " >= 1 - turns on outgoing event logging\n" |
121 | { | 98 | + " >= 2 - turns on poll notification", |
122 | m_gConfig = null; | 99 | HandleDebugEq); |
123 | } | ||
124 | } | 100 | } |
125 | 101 | ||
126 | private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string p) | 102 | public void RemoveRegion(Scene scene) |
127 | { | 103 | { |
128 | enabledYN = startupConfig.GetBoolean("EventQueue", true); | 104 | if (m_scene != scene) |
105 | return; | ||
106 | |||
107 | scene.EventManager.OnClientClosed -= ClientClosed; | ||
108 | scene.EventManager.OnMakeChildAgent -= MakeChildAgent; | ||
109 | scene.EventManager.OnRegisterCaps -= OnRegisterCaps; | ||
110 | |||
111 | scene.UnregisterModuleInterface<IEventQueue>(this); | ||
112 | m_scene = null; | ||
129 | } | 113 | } |
130 | 114 | ||
131 | public void PostInitialise() | 115 | public void RegionLoaded(Scene scene) |
132 | { | 116 | { |
133 | } | 117 | } |
134 | 118 | ||
@@ -141,10 +125,11 @@ namespace OpenSim.Region.ClientStack.Linden | |||
141 | get { return "EventQueueGetModule"; } | 125 | get { return "EventQueueGetModule"; } |
142 | } | 126 | } |
143 | 127 | ||
144 | public bool IsSharedModule | 128 | public Type ReplaceableInterface |
145 | { | 129 | { |
146 | get { return false; } | 130 | get { return null; } |
147 | } | 131 | } |
132 | |||
148 | #endregion | 133 | #endregion |
149 | 134 | ||
150 | protected void HandleDebugEq(string module, string[] args) | 135 | protected void HandleDebugEq(string module, string[] args) |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs index d604cf6..ed8ec16 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/Tests/EventQueueTests.cs | |||
@@ -44,7 +44,7 @@ using OpenSim.Tests.Common.Mock; | |||
44 | namespace OpenSim.Region.ClientStack.Linden.Tests | 44 | namespace OpenSim.Region.ClientStack.Linden.Tests |
45 | { | 45 | { |
46 | [TestFixture] | 46 | [TestFixture] |
47 | public class EventQueueTests | 47 | public class EventQueueTests : OpenSimTestCase |
48 | { | 48 | { |
49 | private TestScene m_scene; | 49 | private TestScene m_scene; |
50 | 50 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs b/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs index cb5afcc..87d3d1c 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/FetchInventory2Module.cs | |||
@@ -45,7 +45,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
45 | /// <summary> | 45 | /// <summary> |
46 | /// This module implements both WebFetchInventoryDescendents and FetchInventoryDescendents2 capabilities. | 46 | /// This module implements both WebFetchInventoryDescendents and FetchInventoryDescendents2 capabilities. |
47 | /// </summary> | 47 | /// </summary> |
48 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 48 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "FetchInventory2Module")] |
49 | public class FetchInventory2Module : INonSharedRegionModule | 49 | public class FetchInventory2Module : INonSharedRegionModule |
50 | { | 50 | { |
51 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 51 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs index 0d7b1fc..8e1f63a 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs | |||
@@ -47,7 +47,7 @@ using Caps = OpenSim.Framework.Capabilities.Caps; | |||
47 | 47 | ||
48 | namespace OpenSim.Region.ClientStack.Linden | 48 | namespace OpenSim.Region.ClientStack.Linden |
49 | { | 49 | { |
50 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 50 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GetMeshModule")] |
51 | public class GetMeshModule : INonSharedRegionModule | 51 | public class GetMeshModule : INonSharedRegionModule |
52 | { | 52 | { |
53 | // private static readonly ILog m_log = | 53 | // private static readonly ILog m_log = |
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
58 | private bool m_Enabled = true; | 58 | private bool m_Enabled = true; |
59 | private string m_URL; | 59 | private string m_URL; |
60 | 60 | ||
61 | #region IRegionModuleBase Members | 61 | #region Region Module interfaceBase Members |
62 | 62 | ||
63 | public Type ReplaceableInterface | 63 | public Type ReplaceableInterface |
64 | { | 64 | { |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs index 5ae9cc3..13415f8 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/GetTextureModule.cs | |||
@@ -51,7 +51,7 @@ using OpenSim.Capabilities.Handlers; | |||
51 | namespace OpenSim.Region.ClientStack.Linden | 51 | namespace OpenSim.Region.ClientStack.Linden |
52 | { | 52 | { |
53 | 53 | ||
54 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 54 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "GetTextureModule")] |
55 | public class GetTextureModule : INonSharedRegionModule | 55 | public class GetTextureModule : INonSharedRegionModule |
56 | { | 56 | { |
57 | // private static readonly ILog m_log = | 57 | // private static readonly ILog m_log = |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs index 44a6883..33b1f77 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/MeshUploadFlagModule.cs | |||
@@ -45,7 +45,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
45 | /// <summary> | 45 | /// <summary> |
46 | /// MeshUploadFlag capability. This is required for uploading Mesh. | 46 | /// MeshUploadFlag capability. This is required for uploading Mesh. |
47 | /// </summary> | 47 | /// </summary> |
48 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 48 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MeshUploadFlagModule")] |
49 | public class MeshUploadFlagModule : INonSharedRegionModule | 49 | public class MeshUploadFlagModule : INonSharedRegionModule |
50 | { | 50 | { |
51 | // private static readonly ILog m_log = | 51 | // private static readonly ILog m_log = |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs index 52c4f44..5529550 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs | |||
@@ -47,7 +47,7 @@ using OpenSim.Framework.Capabilities; | |||
47 | 47 | ||
48 | namespace OpenSim.Region.ClientStack.Linden | 48 | namespace OpenSim.Region.ClientStack.Linden |
49 | { | 49 | { |
50 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 50 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "NewFileAgentInventoryVariablePriceModule")] |
51 | public class NewFileAgentInventoryVariablePriceModule : INonSharedRegionModule | 51 | public class NewFileAgentInventoryVariablePriceModule : INonSharedRegionModule |
52 | { | 52 | { |
53 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 53 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
58 | private bool m_enabled = true; | 58 | private bool m_enabled = true; |
59 | private int m_levelUpload = 0; | 59 | private int m_levelUpload = 0; |
60 | 60 | ||
61 | #region IRegionModuleBase Members | 61 | #region Region Module interfaceBase Members |
62 | 62 | ||
63 | 63 | ||
64 | public Type ReplaceableInterface | 64 | public Type ReplaceableInterface |
@@ -98,7 +98,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
98 | #endregion | 98 | #endregion |
99 | 99 | ||
100 | 100 | ||
101 | #region IRegionModule Members | 101 | #region Region Module interface |
102 | 102 | ||
103 | 103 | ||
104 | 104 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs index 4ccfc43..92805e2 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs | |||
@@ -32,6 +32,7 @@ using log4net; | |||
32 | using Nini.Config; | 32 | using Nini.Config; |
33 | using OpenMetaverse; | 33 | using OpenMetaverse; |
34 | using OpenMetaverse.StructuredData; | 34 | using OpenMetaverse.StructuredData; |
35 | using Mono.Addins; | ||
35 | using OpenSim.Framework; | 36 | using OpenSim.Framework; |
36 | using OpenSim.Framework.Servers; | 37 | using OpenSim.Framework.Servers; |
37 | using OpenSim.Framework.Servers.HttpServer; | 38 | using OpenSim.Framework.Servers.HttpServer; |
@@ -41,30 +42,60 @@ using Caps=OpenSim.Framework.Capabilities.Caps; | |||
41 | 42 | ||
42 | namespace OpenSim.Region.ClientStack.Linden | 43 | namespace OpenSim.Region.ClientStack.Linden |
43 | { | 44 | { |
44 | public class ObjectAdd : IRegionModule | 45 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "ObjectAdd")] |
46 | public class ObjectAdd : INonSharedRegionModule | ||
45 | { | 47 | { |
46 | // private static readonly ILog m_log = | 48 | // private static readonly ILog m_log = |
47 | // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 49 | // LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
48 | 50 | ||
49 | private Scene m_scene; | 51 | private Scene m_scene; |
50 | #region IRegionModule Members | ||
51 | 52 | ||
52 | public void Initialise(Scene pScene, IConfigSource pSource) | 53 | #region INonSharedRegionModule Members |
54 | |||
55 | public void Initialise(IConfigSource pSource) | ||
56 | { | ||
57 | } | ||
58 | |||
59 | public void AddRegion(Scene scene) | ||
53 | { | 60 | { |
54 | m_scene = pScene; | 61 | m_scene = scene; |
55 | m_scene.EventManager.OnRegisterCaps += RegisterCaps; | 62 | m_scene.EventManager.OnRegisterCaps += RegisterCaps; |
56 | } | 63 | } |
57 | 64 | ||
58 | public void PostInitialise() | 65 | public void RemoveRegion(Scene scene) |
59 | { | 66 | { |
60 | 67 | if (m_scene == scene) | |
68 | { | ||
69 | m_scene.EventManager.OnRegisterCaps -= RegisterCaps; | ||
70 | m_scene = null; | ||
71 | } | ||
61 | } | 72 | } |
62 | 73 | ||
74 | public void RegionLoaded(Scene scene) | ||
75 | { | ||
76 | } | ||
77 | |||
78 | public void Close() | ||
79 | { | ||
80 | } | ||
81 | |||
82 | public string Name | ||
83 | { | ||
84 | get { return "ObjectAddModule"; } | ||
85 | } | ||
86 | |||
87 | public Type ReplaceableInterface | ||
88 | { | ||
89 | get { return null; } | ||
90 | } | ||
91 | |||
92 | #endregion | ||
93 | |||
63 | public void RegisterCaps(UUID agentID, Caps caps) | 94 | public void RegisterCaps(UUID agentID, Caps caps) |
64 | { | 95 | { |
65 | UUID capuuid = UUID.Random(); | 96 | UUID capuuid = UUID.Random(); |
66 | 97 | ||
67 | // m_log.InfoFormat("[OBJECTADD]: {0}", "/CAPS/OA/" + capuuid + "/"); | 98 | // m_log.InfoFormat("[OBJECTADD]: {0}", "/CAPS/OA/" + capuuid + "/"); |
68 | 99 | ||
69 | caps.RegisterHandler( | 100 | caps.RegisterHandler( |
70 | "ObjectAdd", | 101 | "ObjectAdd", |
@@ -73,7 +104,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
73 | "/CAPS/OA/" + capuuid + "/", | 104 | "/CAPS/OA/" + capuuid + "/", |
74 | httpMethod => ProcessAdd(httpMethod, agentID, caps), | 105 | httpMethod => ProcessAdd(httpMethod, agentID, caps), |
75 | "ObjectAdd", | 106 | "ObjectAdd", |
76 | agentID.ToString()));; | 107 | agentID.ToString())); ; |
77 | } | 108 | } |
78 | 109 | ||
79 | public Hashtable ProcessAdd(Hashtable request, UUID AgentId, Caps cap) | 110 | public Hashtable ProcessAdd(Hashtable request, UUID AgentId, Caps cap) |
@@ -84,7 +115,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
84 | responsedata["keepalive"] = false; | 115 | responsedata["keepalive"] = false; |
85 | responsedata["str_response_string"] = "Request wasn't what was expected"; | 116 | responsedata["str_response_string"] = "Request wasn't what was expected"; |
86 | ScenePresence avatar; | 117 | ScenePresence avatar; |
87 | 118 | ||
88 | if (!m_scene.TryGetScenePresence(AgentId, out avatar)) | 119 | if (!m_scene.TryGetScenePresence(AgentId, out avatar)) |
89 | return responsedata; | 120 | return responsedata; |
90 | 121 | ||
@@ -127,7 +158,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
127 | 158 | ||
128 | if (r.Type != OSDType.Map) // not a proper req | 159 | if (r.Type != OSDType.Map) // not a proper req |
129 | return responsedata; | 160 | return responsedata; |
130 | 161 | ||
131 | OSDMap rm = (OSDMap)r; | 162 | OSDMap rm = (OSDMap)r; |
132 | 163 | ||
133 | if (rm.ContainsKey("ObjectData")) //v2 | 164 | if (rm.ContainsKey("ObjectData")) //v2 |
@@ -138,7 +169,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
138 | return responsedata; | 169 | return responsedata; |
139 | } | 170 | } |
140 | 171 | ||
141 | OSDMap ObjMap = (OSDMap) rm["ObjectData"]; | 172 | OSDMap ObjMap = (OSDMap)rm["ObjectData"]; |
142 | 173 | ||
143 | bypass_raycast = ObjMap["BypassRaycast"].AsBoolean(); | 174 | bypass_raycast = ObjMap["BypassRaycast"].AsBoolean(); |
144 | everyone_mask = readuintval(ObjMap["EveryoneMask"]); | 175 | everyone_mask = readuintval(ObjMap["EveryoneMask"]); |
@@ -181,7 +212,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
181 | responsedata["str_response_string"] = "Has Profile key, but data not in expected format"; | 212 | responsedata["str_response_string"] = "Has Profile key, but data not in expected format"; |
182 | return responsedata; | 213 | return responsedata; |
183 | } | 214 | } |
184 | 215 | ||
185 | OSDMap ProfileMap = (OSDMap)ObjMap["Profile"]; | 216 | OSDMap ProfileMap = (OSDMap)ObjMap["Profile"]; |
186 | 217 | ||
187 | profile_begin = ProfileMap["Begin"].AsInteger(); | 218 | profile_begin = ProfileMap["Begin"].AsInteger(); |
@@ -190,14 +221,14 @@ namespace OpenSim.Region.ClientStack.Linden | |||
190 | hollow = ProfileMap["Hollow"].AsInteger(); | 221 | hollow = ProfileMap["Hollow"].AsInteger(); |
191 | } | 222 | } |
192 | ray_end_is_intersection = ObjMap["RayEndIsIntersection"].AsBoolean(); | 223 | ray_end_is_intersection = ObjMap["RayEndIsIntersection"].AsBoolean(); |
193 | 224 | ||
194 | ray_target_id = ObjMap["RayTargetId"].AsUUID(); | 225 | ray_target_id = ObjMap["RayTargetId"].AsUUID(); |
195 | state = ObjMap["State"].AsInteger(); | 226 | state = ObjMap["State"].AsInteger(); |
196 | try | 227 | try |
197 | { | 228 | { |
198 | ray_end = ((OSDArray) ObjMap["RayEnd"]).AsVector3(); | 229 | ray_end = ((OSDArray)ObjMap["RayEnd"]).AsVector3(); |
199 | ray_start = ((OSDArray) ObjMap["RayStart"]).AsVector3(); | 230 | ray_start = ((OSDArray)ObjMap["RayStart"]).AsVector3(); |
200 | scale = ((OSDArray) ObjMap["Scale"]).AsVector3(); | 231 | scale = ((OSDArray)ObjMap["Scale"]).AsVector3(); |
201 | rotation = ((OSDArray)ObjMap["Rotation"]).AsQuaternion(); | 232 | rotation = ((OSDArray)ObjMap["Rotation"]).AsQuaternion(); |
202 | } | 233 | } |
203 | catch (Exception) | 234 | catch (Exception) |
@@ -214,7 +245,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
214 | return responsedata; | 245 | return responsedata; |
215 | } | 246 | } |
216 | 247 | ||
217 | OSDMap AgentDataMap = (OSDMap) rm["AgentData"]; | 248 | OSDMap AgentDataMap = (OSDMap)rm["AgentData"]; |
218 | 249 | ||
219 | //session_id = AgentDataMap["SessionId"].AsUUID(); | 250 | //session_id = AgentDataMap["SessionId"].AsUUID(); |
220 | group_id = AgentDataMap["GroupId"].AsUUID(); | 251 | group_id = AgentDataMap["GroupId"].AsUUID(); |
@@ -251,21 +282,21 @@ namespace OpenSim.Region.ClientStack.Linden | |||
251 | profile_begin = rm["profile_begin"].AsInteger(); | 282 | profile_begin = rm["profile_begin"].AsInteger(); |
252 | profile_curve = rm["profile_curve"].AsInteger(); | 283 | profile_curve = rm["profile_curve"].AsInteger(); |
253 | profile_end = rm["profile_end"].AsInteger(); | 284 | profile_end = rm["profile_end"].AsInteger(); |
254 | 285 | ||
255 | ray_end_is_intersection = rm["ray_end_is_intersection"].AsBoolean(); | 286 | ray_end_is_intersection = rm["ray_end_is_intersection"].AsBoolean(); |
256 | 287 | ||
257 | ray_target_id = rm["ray_target_id"].AsUUID(); | 288 | ray_target_id = rm["ray_target_id"].AsUUID(); |
258 | 289 | ||
259 | 290 | ||
260 | //session_id = rm["session_id"].AsUUID(); | 291 | //session_id = rm["session_id"].AsUUID(); |
261 | state = rm["state"].AsInteger(); | 292 | state = rm["state"].AsInteger(); |
262 | try | 293 | try |
263 | { | 294 | { |
264 | ray_end = ((OSDArray)rm["ray_end"]).AsVector3(); | 295 | ray_end = ((OSDArray)rm["ray_end"]).AsVector3(); |
265 | ray_start = ((OSDArray)rm["ray_start"]).AsVector3(); | 296 | ray_start = ((OSDArray)rm["ray_start"]).AsVector3(); |
266 | rotation = ((OSDArray)rm["rotation"]).AsQuaternion(); | 297 | rotation = ((OSDArray)rm["rotation"]).AsQuaternion(); |
267 | scale = ((OSDArray)rm["scale"]).AsVector3(); | 298 | scale = ((OSDArray)rm["scale"]).AsVector3(); |
268 | } | 299 | } |
269 | catch (Exception) | 300 | catch (Exception) |
270 | { | 301 | { |
271 | responsedata["str_response_string"] = "RayEnd, RayStart, Scale or Rotation wasn't in the expected format"; | 302 | responsedata["str_response_string"] = "RayEnd, RayStart, Scale or Rotation wasn't in the expected format"; |
@@ -273,9 +304,9 @@ namespace OpenSim.Region.ClientStack.Linden | |||
273 | } | 304 | } |
274 | } | 305 | } |
275 | 306 | ||
276 | |||
277 | 307 | ||
278 | Vector3 pos = m_scene.GetNewRezLocation(ray_start, ray_end, ray_target_id, rotation, (bypass_raycast) ? (byte)1 : (byte)0, (ray_end_is_intersection) ? (byte)1 : (byte)0, true, scale, false); | 308 | |
309 | Vector3 pos = m_scene.GetNewRezLocation(ray_start, ray_end, ray_target_id, rotation, (bypass_raycast) ? (byte)1 : (byte)0, (ray_end_is_intersection) ? (byte)1 : (byte)0, true, scale, false); | ||
279 | 310 | ||
280 | PrimitiveBaseShape pbs = PrimitiveBaseShape.CreateBox(); | 311 | PrimitiveBaseShape pbs = PrimitiveBaseShape.CreateBox(); |
281 | 312 | ||
@@ -286,17 +317,17 @@ namespace OpenSim.Region.ClientStack.Linden | |||
286 | pbs.PathRevolutions = (byte)path_revolutions; | 317 | pbs.PathRevolutions = (byte)path_revolutions; |
287 | pbs.PathScaleX = (byte)path_scale_x; | 318 | pbs.PathScaleX = (byte)path_scale_x; |
288 | pbs.PathScaleY = (byte)path_scale_y; | 319 | pbs.PathScaleY = (byte)path_scale_y; |
289 | pbs.PathShearX = (byte) path_shear_x; | 320 | pbs.PathShearX = (byte)path_shear_x; |
290 | pbs.PathShearY = (byte)path_shear_y; | 321 | pbs.PathShearY = (byte)path_shear_y; |
291 | pbs.PathSkew = (sbyte)path_skew; | 322 | pbs.PathSkew = (sbyte)path_skew; |
292 | pbs.PathTaperX = (sbyte)path_taper_x; | 323 | pbs.PathTaperX = (sbyte)path_taper_x; |
293 | pbs.PathTaperY = (sbyte)path_taper_y; | 324 | pbs.PathTaperY = (sbyte)path_taper_y; |
294 | pbs.PathTwist = (sbyte)path_twist; | 325 | pbs.PathTwist = (sbyte)path_twist; |
295 | pbs.PathTwistBegin = (sbyte)path_twist_begin; | 326 | pbs.PathTwistBegin = (sbyte)path_twist_begin; |
296 | pbs.HollowShape = (HollowShape) hollow; | 327 | pbs.HollowShape = (HollowShape)hollow; |
297 | pbs.PCode = (byte)p_code; | 328 | pbs.PCode = (byte)p_code; |
298 | pbs.ProfileBegin = (ushort) profile_begin; | 329 | pbs.ProfileBegin = (ushort)profile_begin; |
299 | pbs.ProfileCurve = (byte) profile_curve; | 330 | pbs.ProfileCurve = (byte)profile_curve; |
300 | pbs.ProfileEnd = (ushort)profile_end; | 331 | pbs.ProfileEnd = (ushort)profile_end; |
301 | pbs.Scale = scale; | 332 | pbs.Scale = scale; |
302 | pbs.State = (byte)state; | 333 | pbs.State = (byte)state; |
@@ -306,7 +337,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
306 | if (m_scene.Permissions.CanRezObject(1, avatar.UUID, pos)) | 337 | if (m_scene.Permissions.CanRezObject(1, avatar.UUID, pos)) |
307 | { | 338 | { |
308 | // rez ON the ground, not IN the ground | 339 | // rez ON the ground, not IN the ground |
309 | // pos.Z += 0.25F; | 340 | // pos.Z += 0.25F; |
310 | 341 | ||
311 | obj = m_scene.AddNewPrim(avatar.UUID, group_id, pos, rotation, pbs); | 342 | obj = m_scene.AddNewPrim(avatar.UUID, group_id, pos, rotation, pbs); |
312 | } | 343 | } |
@@ -323,13 +354,13 @@ namespace OpenSim.Region.ClientStack.Linden | |||
323 | rootpart.GroupMask = group_mask; | 354 | rootpart.GroupMask = group_mask; |
324 | rootpart.NextOwnerMask = next_owner_mask; | 355 | rootpart.NextOwnerMask = next_owner_mask; |
325 | rootpart.Material = (byte)material; | 356 | rootpart.Material = (byte)material; |
326 | 357 | ||
327 | m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor); | 358 | m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor); |
328 | 359 | ||
329 | responsedata["int_response_code"] = 200; //501; //410; //404; | 360 | responsedata["int_response_code"] = 200; //501; //410; //404; |
330 | responsedata["content_type"] = "text/plain"; | 361 | responsedata["content_type"] = "text/plain"; |
331 | responsedata["keepalive"] = false; | 362 | responsedata["keepalive"] = false; |
332 | responsedata["str_response_string"] = String.Format("<llsd><map><key>local_id</key>{0}</map></llsd>",ConvertUintToBytes(obj.LocalId)); | 363 | responsedata["str_response_string"] = String.Format("<llsd><map><key>local_id</key>{0}</map></llsd>", ConvertUintToBytes(obj.LocalId)); |
333 | 364 | ||
334 | return responsedata; | 365 | return responsedata; |
335 | } | 366 | } |
@@ -347,24 +378,8 @@ namespace OpenSim.Region.ClientStack.Linden | |||
347 | byte[] resultbytes = Utils.UIntToBytes(val); | 378 | byte[] resultbytes = Utils.UIntToBytes(val); |
348 | if (BitConverter.IsLittleEndian) | 379 | if (BitConverter.IsLittleEndian) |
349 | Array.Reverse(resultbytes); | 380 | Array.Reverse(resultbytes); |
350 | return String.Format("<binary encoding=\"base64\">{0}</binary>",Convert.ToBase64String(resultbytes)); | 381 | return String.Format("<binary encoding=\"base64\">{0}</binary>", Convert.ToBase64String(resultbytes)); |
351 | } | ||
352 | |||
353 | public void Close() | ||
354 | { | ||
355 | |||
356 | } | ||
357 | |||
358 | public string Name | ||
359 | { | ||
360 | get { return "ObjectAddModule"; } | ||
361 | } | ||
362 | |||
363 | public bool IsSharedModule | ||
364 | { | ||
365 | get { return false; } | ||
366 | } | 382 | } |
367 | 383 | ||
368 | #endregion | ||
369 | } | 384 | } |
370 | } | 385 | } |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs index ba902b2..55a503e 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs | |||
@@ -51,14 +51,14 @@ using ExtraParamType = OpenMetaverse.ExtraParamType; | |||
51 | 51 | ||
52 | namespace OpenSim.Region.ClientStack.Linden | 52 | namespace OpenSim.Region.ClientStack.Linden |
53 | { | 53 | { |
54 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 54 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "UploadObjectAssetModule")] |
55 | public class UploadObjectAssetModule : INonSharedRegionModule | 55 | public class UploadObjectAssetModule : INonSharedRegionModule |
56 | { | 56 | { |
57 | private static readonly ILog m_log = | 57 | private static readonly ILog m_log = |
58 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 58 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
59 | private Scene m_scene; | 59 | private Scene m_scene; |
60 | 60 | ||
61 | #region IRegionModuleBase Members | 61 | #region Region Module interfaceBase Members |
62 | 62 | ||
63 | 63 | ||
64 | public Type ReplaceableInterface | 64 | public Type ReplaceableInterface |
@@ -92,7 +92,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
92 | #endregion | 92 | #endregion |
93 | 93 | ||
94 | 94 | ||
95 | #region IRegionModule Members | 95 | #region Region Module interface |
96 | 96 | ||
97 | 97 | ||
98 | 98 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs b/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..060a61c --- /dev/null +++ b/OpenSim/Region/ClientStack/Linden/Caps/Properties/AssemblyInfo.cs | |||
@@ -0,0 +1,33 @@ | |||
1 | using System.Reflection; | ||
2 | using System.Runtime.CompilerServices; | ||
3 | using System.Runtime.InteropServices; | ||
4 | |||
5 | // General Information about an assembly is controlled through the following | ||
6 | // set of attributes. Change these attribute values to modify the information | ||
7 | // associated with an assembly. | ||
8 | [assembly: AssemblyTitle("OpenSim.Region.ClientStack.LindenCaps")] | ||
9 | [assembly: AssemblyDescription("")] | ||
10 | [assembly: AssemblyConfiguration("")] | ||
11 | [assembly: AssemblyCompany("http://opensimulator.org")] | ||
12 | [assembly: AssemblyProduct("OpenSim")] | ||
13 | [assembly: AssemblyCopyright("OpenSimulator developers")] | ||
14 | [assembly: AssemblyTrademark("")] | ||
15 | [assembly: AssemblyCulture("")] | ||
16 | |||
17 | // Setting ComVisible to false makes the types in this assembly not visible | ||
18 | // to COM components. If you need to access a type in this assembly from | ||
19 | // COM, set the ComVisible attribute to true on that type. | ||
20 | [assembly: ComVisible(false)] | ||
21 | |||
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM | ||
23 | [assembly: Guid("1ae76353-f37f-4fe3-b6df-d11cedf01f2c")] | ||
24 | |||
25 | // Version information for an assembly consists of the following four values: | ||
26 | // | ||
27 | // Major Version | ||
28 | // Minor Version | ||
29 | // Build Number | ||
30 | // Revision | ||
31 | // | ||
32 | [assembly: AssemblyVersion("0.7.5.*")] | ||
33 | [assembly: AssemblyFileVersion("1.0.0.0")] | ||
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs index 8ed0fb3..191bccf 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs | |||
@@ -53,7 +53,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
53 | /// NOTE: Part of this code was adapted from the Aurora project, specifically | 53 | /// NOTE: Part of this code was adapted from the Aurora project, specifically |
54 | /// the normal part of the response in the capability handler. | 54 | /// the normal part of the response in the capability handler. |
55 | /// </remarks> | 55 | /// </remarks> |
56 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 56 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimulatorFeaturesModule")] |
57 | public class SimulatorFeaturesModule : ISharedRegionModule, ISimulatorFeaturesModule | 57 | public class SimulatorFeaturesModule : ISharedRegionModule, ISimulatorFeaturesModule |
58 | { | 58 | { |
59 | // private static readonly ILog m_log = | 59 | // private static readonly ILog m_log = |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs index 6aac591..3b0ccd7 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/UploadBakedTextureModule.cs | |||
@@ -50,7 +50,7 @@ using OpenSim.Capabilities.Handlers; | |||
50 | 50 | ||
51 | namespace OpenSim.Region.ClientStack.Linden | 51 | namespace OpenSim.Region.ClientStack.Linden |
52 | { | 52 | { |
53 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 53 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "UploadBakedTextureModule")] |
54 | public class UploadBakedTextureModule : INonSharedRegionModule | 54 | public class UploadBakedTextureModule : INonSharedRegionModule |
55 | { | 55 | { |
56 | // private static readonly ILog m_log = | 56 | // private static readonly ILog m_log = |
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs index 2359bd6..6890f4a 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/WebFetchInvDescModule.cs | |||
@@ -45,7 +45,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
45 | /// <summary> | 45 | /// <summary> |
46 | /// This module implements both WebFetchInventoryDescendents and FetchInventoryDescendents2 capabilities. | 46 | /// This module implements both WebFetchInventoryDescendents and FetchInventoryDescendents2 capabilities. |
47 | /// </summary> | 47 | /// </summary> |
48 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | 48 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "WebFetchInvDescModule")] |
49 | public class WebFetchInvDescModule : INonSharedRegionModule | 49 | public class WebFetchInvDescModule : INonSharedRegionModule |
50 | { | 50 | { |
51 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 51 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |