From d8ee0cbe1cf93ca521f52ce39aa2a15cb5784e48 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 30 Apr 2011 09:24:15 -0700 Subject: [PATCH] First stab at cleaning up Caps. Compiles. Untested. --- .../Caps}/EventQueue/EventQueueGetModule.cs | 12 ++++- .../Caps}/EventQueue/EventQueueHelper.cs | 18 +++---- .../UDP}/IncomingPacket.cs | 0 .../UDP}/IncomingPacketHistoryCollection.cs | 0 .../{LindenUDP => Linden/UDP}/J2KImage.cs | 0 .../{LindenUDP => Linden/UDP}/LLClientView.cs | 0 .../UDP}/LLImageManager.cs | 0 .../{LindenUDP => Linden/UDP}/LLUDPClient.cs | 0 .../{LindenUDP => Linden/UDP}/LLUDPServer.cs | 0 .../UDP}/OpenSimUDPBase.cs | 0 .../UDP}/OutgoingPacket.cs | 0 .../UDP}/Tests/BasicCircuitTests.cs | 0 .../UDP}/Tests/MockScene.cs | 0 .../UDP}/Tests/PacketHandlerTests.cs | 0 .../UDP}/Tests/TestLLPacketServer.cs | 0 .../UDP}/Tests/TestLLUDPServer.cs | 0 .../UDP}/ThrottleRates.cs | 0 .../{LindenUDP => Linden/UDP}/TokenBucket.cs | 0 .../UDP}/UnackedPacketCollection.cs | 0 .../Framework/Interfaces/IEventQueue.cs | 2 + .../XmlRpcGroups/GroupsMessagingModule.cs | 3 +- .../Avatar/XmlRpcGroups/GroupsModule.cs | 3 +- .../Region/ScriptEngine/XEngine/XEngine.cs | 3 +- prebuild.xml | 49 +++++++++++++++++-- 24 files changed, 70 insertions(+), 20 deletions(-) rename OpenSim/Region/{CoreModules/Framework => ClientStack/Linden/Caps}/EventQueue/EventQueueGetModule.cs (98%) rename OpenSim/Region/{CoreModules/Framework => ClientStack/Linden/Caps}/EventQueue/EventQueueHelper.cs (97%) rename OpenSim/Region/ClientStack/{LindenUDP => Linden/UDP}/IncomingPacket.cs (100%) rename OpenSim/Region/ClientStack/{LindenUDP => Linden/UDP}/IncomingPacketHistoryCollection.cs (100%) rename OpenSim/Region/ClientStack/{LindenUDP => Linden/UDP}/J2KImage.cs (100%) rename OpenSim/Region/ClientStack/{LindenUDP => Linden/UDP}/LLClientView.cs (100%) rename OpenSim/Region/ClientStack/{LindenUDP => Linden/UDP}/LLImageManager.cs (100%) rename OpenSim/Region/ClientStack/{LindenUDP => Linden/UDP}/LLUDPClient.cs (100%) rename OpenSim/Region/ClientStack/{LindenUDP => Linden/UDP}/LLUDPServer.cs (100%) rename OpenSim/Region/ClientStack/{LindenUDP => Linden/UDP}/OpenSimUDPBase.cs (100%) rename OpenSim/Region/ClientStack/{LindenUDP => Linden/UDP}/OutgoingPacket.cs (100%) rename OpenSim/Region/ClientStack/{LindenUDP => Linden/UDP}/Tests/BasicCircuitTests.cs (100%) rename OpenSim/Region/ClientStack/{LindenUDP => Linden/UDP}/Tests/MockScene.cs (100%) rename OpenSim/Region/ClientStack/{LindenUDP => Linden/UDP}/Tests/PacketHandlerTests.cs (100%) rename OpenSim/Region/ClientStack/{LindenUDP => Linden/UDP}/Tests/TestLLPacketServer.cs (100%) rename OpenSim/Region/ClientStack/{LindenUDP => Linden/UDP}/Tests/TestLLUDPServer.cs (100%) rename OpenSim/Region/ClientStack/{LindenUDP => Linden/UDP}/ThrottleRates.cs (100%) rename OpenSim/Region/ClientStack/{LindenUDP => Linden/UDP}/TokenBucket.cs (100%) rename OpenSim/Region/ClientStack/{LindenUDP => Linden/UDP}/UnackedPacketCollection.cs (100%) diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs similarity index 98% rename from OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs rename to OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 05fe3eee04..fe97bf22cd 100644 --- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -45,7 +45,7 @@ using OpenSim.Region.Framework.Scenes; using BlockingLLSDQueue = OpenSim.Framework.BlockingQueue; using Caps=OpenSim.Framework.Capabilities.Caps; -namespace OpenSim.Region.CoreModules.Framework.EventQueue +namespace OpenSim.Region.ClientStack.Linden { public struct QueueItem { @@ -715,5 +715,15 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue OSD item = EventQueueHelper.PlacesQuery(groupUpdate); Enqueue(item, avatarID); } + + public OSD ScriptRunningEvent(UUID objectID, UUID itemID, bool running, bool mono) + { + return EventQueueHelper.ScriptRunningReplyEvent(objectID, itemID, running, mono); + } + + public OSD BuildEvent(string eventName, OSD eventBody) + { + return EventQueueHelper.BuildEvent(eventName, eventBody); + } } } diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs similarity index 97% rename from OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs rename to OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs index 0d7d16a2ba..3f49abaf56 100644 --- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs @@ -32,7 +32,7 @@ using OpenMetaverse.Packets; using OpenMetaverse.StructuredData; using OpenMetaverse.Messages.Linden; -namespace OpenSim.Region.CoreModules.Framework.EventQueue +namespace OpenSim.Region.ClientStack.Linden { public class EventQueueHelper { @@ -61,7 +61,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue // return result; // } - public static OSD buildEvent(string eventName, OSD eventBody) + public static OSD BuildEvent(string eventName, OSD eventBody) { OSDMap llsdEvent = new OSDMap(2); llsdEvent.Add("message", new OSDString(eventName)); @@ -84,7 +84,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue OSDMap llsdBody = new OSDMap(1); llsdBody.Add("SimulatorInfo", arr); - return buildEvent("EnableSimulator", llsdBody); + return BuildEvent("EnableSimulator", llsdBody); } public static OSD DisableSimulator(ulong handle) @@ -99,7 +99,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue OSDMap llsdBody = new OSDMap(0); //llsdBody.Add("SimulatorInfo", arr); - return buildEvent("DisableSimulator", llsdBody); + return BuildEvent("DisableSimulator", llsdBody); } public static OSD CrossRegion(ulong handle, Vector3 pos, Vector3 lookAt, @@ -144,7 +144,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue llsdBody.Add("AgentData", agentDataArr); llsdBody.Add("RegionData", regionDataArr); - return buildEvent("CrossedRegion", llsdBody); + return BuildEvent("CrossedRegion", llsdBody); } public static OSD TeleportFinishEvent( @@ -167,7 +167,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue OSDMap body = new OSDMap(); body.Add("Info", infoArr); - return buildEvent("TeleportFinish", body); + return BuildEvent("TeleportFinish", body); } public static OSD ScriptRunningReplyEvent(UUID objectID, UUID itemID, bool running, bool mono) @@ -184,7 +184,7 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue OSDMap body = new OSDMap(); body.Add("Script", scriptArr); - return buildEvent("ScriptRunningReply", body); + return BuildEvent("ScriptRunningReply", body); } public static OSD EstablishAgentCommunication(UUID agentID, string simIpAndPort, string seedcap) @@ -194,12 +194,12 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue body.Add("sim-ip-and-port", new OSDString(simIpAndPort)); body.Add("seed-capability", new OSDString(seedcap)); - return buildEvent("EstablishAgentCommunication", body); + return BuildEvent("EstablishAgentCommunication", body); } public static OSD KeepAliveEvent() { - return buildEvent("FAKEEVENT", new OSDMap()); + return BuildEvent("FAKEEVENT", new OSDMap()); } public static OSD AgentParams(UUID agentID, bool checkEstate, int godLevel, bool limitedToEstate) diff --git a/OpenSim/Region/ClientStack/LindenUDP/IncomingPacket.cs b/OpenSim/Region/ClientStack/Linden/UDP/IncomingPacket.cs similarity index 100% rename from OpenSim/Region/ClientStack/LindenUDP/IncomingPacket.cs rename to OpenSim/Region/ClientStack/Linden/UDP/IncomingPacket.cs diff --git a/OpenSim/Region/ClientStack/LindenUDP/IncomingPacketHistoryCollection.cs b/OpenSim/Region/ClientStack/Linden/UDP/IncomingPacketHistoryCollection.cs similarity index 100% rename from OpenSim/Region/ClientStack/LindenUDP/IncomingPacketHistoryCollection.cs rename to OpenSim/Region/ClientStack/Linden/UDP/IncomingPacketHistoryCollection.cs diff --git a/OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs similarity index 100% rename from OpenSim/Region/ClientStack/LindenUDP/J2KImage.cs rename to OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs similarity index 100% rename from OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs rename to OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs similarity index 100% rename from OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs rename to OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs similarity index 100% rename from OpenSim/Region/ClientStack/LindenUDP/LLUDPClient.cs rename to OpenSim/Region/ClientStack/Linden/UDP/LLUDPClient.cs diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs similarity index 100% rename from OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs rename to OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs diff --git a/OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs similarity index 100% rename from OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs rename to OpenSim/Region/ClientStack/Linden/UDP/OpenSimUDPBase.cs diff --git a/OpenSim/Region/ClientStack/LindenUDP/OutgoingPacket.cs b/OpenSim/Region/ClientStack/Linden/UDP/OutgoingPacket.cs similarity index 100% rename from OpenSim/Region/ClientStack/LindenUDP/OutgoingPacket.cs rename to OpenSim/Region/ClientStack/Linden/UDP/OutgoingPacket.cs diff --git a/OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs similarity index 100% rename from OpenSim/Region/ClientStack/LindenUDP/Tests/BasicCircuitTests.cs rename to OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs diff --git a/OpenSim/Region/ClientStack/LindenUDP/Tests/MockScene.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/MockScene.cs similarity index 100% rename from OpenSim/Region/ClientStack/LindenUDP/Tests/MockScene.cs rename to OpenSim/Region/ClientStack/Linden/UDP/Tests/MockScene.cs diff --git a/OpenSim/Region/ClientStack/LindenUDP/Tests/PacketHandlerTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs similarity index 100% rename from OpenSim/Region/ClientStack/LindenUDP/Tests/PacketHandlerTests.cs rename to OpenSim/Region/ClientStack/Linden/UDP/Tests/PacketHandlerTests.cs diff --git a/OpenSim/Region/ClientStack/LindenUDP/Tests/TestLLPacketServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/TestLLPacketServer.cs similarity index 100% rename from OpenSim/Region/ClientStack/LindenUDP/Tests/TestLLPacketServer.cs rename to OpenSim/Region/ClientStack/Linden/UDP/Tests/TestLLPacketServer.cs diff --git a/OpenSim/Region/ClientStack/LindenUDP/Tests/TestLLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/TestLLUDPServer.cs similarity index 100% rename from OpenSim/Region/ClientStack/LindenUDP/Tests/TestLLUDPServer.cs rename to OpenSim/Region/ClientStack/Linden/UDP/Tests/TestLLUDPServer.cs diff --git a/OpenSim/Region/ClientStack/LindenUDP/ThrottleRates.cs b/OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs similarity index 100% rename from OpenSim/Region/ClientStack/LindenUDP/ThrottleRates.cs rename to OpenSim/Region/ClientStack/Linden/UDP/ThrottleRates.cs diff --git a/OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs b/OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs similarity index 100% rename from OpenSim/Region/ClientStack/LindenUDP/TokenBucket.cs rename to OpenSim/Region/ClientStack/Linden/UDP/TokenBucket.cs diff --git a/OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs b/OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs similarity index 100% rename from OpenSim/Region/ClientStack/LindenUDP/UnackedPacketCollection.cs rename to OpenSim/Region/ClientStack/Linden/UDP/UnackedPacketCollection.cs diff --git a/OpenSim/Region/Framework/Interfaces/IEventQueue.cs b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs index 81e4952afe..bfa5d1717d 100644 --- a/OpenSim/Region/Framework/Interfaces/IEventQueue.cs +++ b/OpenSim/Region/Framework/Interfaces/IEventQueue.cs @@ -57,5 +57,7 @@ namespace OpenSim.Region.Framework.Interfaces bool isModerator, bool textMute); void ParcelProperties(ParcelPropertiesMessage parcelPropertiesMessage, UUID avatarID); void GroupMembership(AgentGroupDataUpdatePacket groupUpdate, UUID avatarID); + OSD ScriptRunningEvent(UUID objectID, UUID itemID, bool running, bool mono); + OSD BuildEvent(string eventName, OSD eventBody); } } diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs index 8c01d75b8f..dcbcd85bd4 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs @@ -34,7 +34,6 @@ using Nini.Config; using OpenMetaverse; using OpenMetaverse.StructuredData; using OpenSim.Framework; -using OpenSim.Region.CoreModules.Framework.EventQueue; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -472,7 +471,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups if (queue != null) { - queue.Enqueue(EventQueueHelper.buildEvent("ChatterBoxSessionStartReply", bodyMap), remoteClient.AgentId); + queue.Enqueue(queue.BuildEvent("ChatterBoxSessionStartReply", bodyMap), remoteClient.AgentId); } } diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index a8dec63def..d9168b06f0 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs @@ -39,7 +39,6 @@ using OpenMetaverse.StructuredData; using OpenSim.Framework; using OpenSim.Framework.Communications; -using OpenSim.Region.CoreModules.Framework.EventQueue; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -1154,7 +1153,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups if (queue != null) { - queue.Enqueue(EventQueueHelper.buildEvent("AgentGroupDataUpdate", llDataStruct), GetRequestingAgentID(remoteClient)); + queue.Enqueue(queue.BuildEvent("AgentGroupDataUpdate", llDataStruct), GetRequestingAgentID(remoteClient)); } } diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 86296740ef..97ab411dd2 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -41,7 +41,6 @@ using log4net; using Nini.Config; using Amib.Threading; using OpenSim.Framework; -using OpenSim.Region.CoreModules.Framework.EventQueue; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.ScriptEngine.Shared; @@ -1283,7 +1282,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine } else { - eq.Enqueue(EventQueueHelper.ScriptRunningReplyEvent(objectID, itemID, GetScriptState(itemID), true), + eq.Enqueue(eq.ScriptRunningEvent(objectID, itemID, GetScriptState(itemID), true), controllingClient.AgentId); } } diff --git a/prebuild.xml b/prebuild.xml index 1102c11c09..7b38556678 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -660,6 +660,7 @@ + @@ -694,6 +694,7 @@ +--> @@ -1310,6 +1311,42 @@ + + + + ../../../bin/ + + + + + ../../../bin/ + + + + ../../../bin/ + + + + + + + + + + + + + + + + + + + + + + + @@ -1513,7 +1550,7 @@ - + ../../../../bin/ @@ -1536,8 +1573,10 @@ + + @@ -1549,7 +1588,9 @@ - + + + @@ -1582,8 +1623,8 @@ - +