From 318de200bd398d41b246126f541cd10ac7785b77 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 23 Dec 2008 23:41:46 +0000 Subject: Plumb in EventNotification* and EventGodDelete --- OpenSim/Framework/IClientAPI.cs | 8 ++++ .../Region/ClientStack/LindenUDP/LLClientView.cs | 44 ++++++++++++++++++++++ .../Environment/Modules/World/NPC/NPCAvatar.cs | 4 ++ .../Region/Examples/SimpleModule/MyNpcCharacter.cs | 4 ++ OpenSim/Tests/Common/Mock/TestClient.cs | 4 ++ 5 files changed, 64 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index d683802..05e8f75 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -417,6 +417,10 @@ namespace OpenSim.Framework public delegate void ClassifiedInfoUpdate(UUID classifiedID, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, Vector3 globalPos, byte classifiedFlags, int price, IClientAPI client); public delegate void ClassifiedDelete(UUID classifiedID, IClientAPI client); + public delegate void EventNotificationAddRequest(uint EventID, IClientAPI client); + public delegate void EventNotificationRemoveRequest(uint EventID, IClientAPI client); + + public delegate void EventGodDelete(uint eventID, UUID queryID, string queryText, uint queryFlags, int queryStart, IClientAPI client); #endregion @@ -733,6 +737,10 @@ namespace OpenSim.Framework event ClassifiedDelete OnClassifiedDelete; event ClassifiedDelete OnClassifiedGodDelete; + event EventNotificationAddRequest OnEventNotificationAddRequest; + event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; + event EventGodDelete OnEventGodDelete; + // void ActivateGesture(UUID assetId, UUID gestureId); /// diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index aac4e32..2475b17 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -279,6 +279,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP private ClassifiedDelete handlerClassifiedDelete; private ClassifiedDelete handlerClassifiedGodDelete; + private EventNotificationAddRequest handlerEventNotificationAddRequest; + private EventNotificationRemoveRequest handlerEventNotificationRemoveRequest; + private EventGodDelete handlerEventGodDelete; + private readonly IGroupsModule m_GroupsModule; //private TerrainUnacked handlerUnackedTerrain = null; @@ -1042,6 +1046,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP public event ClassifiedDelete OnClassifiedDelete; public event ClassifiedDelete OnClassifiedGodDelete; + public event EventNotificationAddRequest OnEventNotificationAddRequest; + public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; + public event EventGodDelete OnEventGodDelete; + public void ActivateGesture(UUID assetId, UUID gestureId) { } @@ -7280,6 +7288,42 @@ namespace OpenSim.Region.ClientStack.LindenUDP this); break; + case PacketType.EventGodDelete: + EventGodDeletePacket eventGodDelete = + (EventGodDeletePacket)Pack; + + handlerEventGodDelete = OnEventGodDelete; + if (handlerEventGodDelete != null) + handlerEventGodDelete( + eventGodDelete.EventData.EventID, + eventGodDelete.QueryData.QueryID, + Utils.BytesToString( + eventGodDelete.QueryData.QueryText), + eventGodDelete.QueryData.QueryFlags, + eventGodDelete.QueryData.QueryStart, + this); + break; + + case PacketType.EventNotificationAddRequest: + EventNotificationAddRequestPacket eventNotificationAdd = + (EventNotificationAddRequestPacket)Pack; + + handlerEventNotificationAddRequest = OnEventNotificationAddRequest; + if (handlerEventNotificationAddRequest != null) + handlerEventNotificationAddRequest( + eventNotificationAdd.EventData.EventID, this); + break; + + case PacketType.EventNotificationRemoveRequest: + EventNotificationRemoveRequestPacket eventNotificationRemove = + (EventNotificationRemoveRequestPacket)Pack; + + handlerEventNotificationRemoveRequest = OnEventNotificationRemoveRequest; + if (handlerEventNotificationRemoveRequest != null) + handlerEventNotificationRemoveRequest( + eventNotificationRemove.EventData.EventID, this); + break; + default: m_log.Warn("[CLIENT]: unhandled packet " + Pack); break; diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index a1e7ade..95744b5 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs @@ -351,6 +351,10 @@ namespace OpenSim.Region.Environment.Modules.World.NPC public event ClassifiedDelete OnClassifiedDelete; public event ClassifiedDelete OnClassifiedGodDelete; + public event EventNotificationAddRequest OnEventNotificationAddRequest; + public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; + public event EventGodDelete OnEventGodDelete; + #pragma warning restore 67 #endregion diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index e06c4c0..fd5fa7a 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -246,6 +246,10 @@ namespace OpenSim.Region.Examples.SimpleModule public event ClassifiedDelete OnClassifiedDelete; public event ClassifiedDelete OnClassifiedGodDelete; + public event EventNotificationAddRequest OnEventNotificationAddRequest; + public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; + public event EventGodDelete OnEventGodDelete; + #pragma warning restore 67 private UUID myID = UUID.Random(); diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index e7cdee9..cb26366 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs @@ -242,6 +242,10 @@ namespace OpenSim.Tests.Common.Mock public event ClassifiedDelete OnClassifiedDelete; public event ClassifiedDelete OnClassifiedGodDelete; + public event EventNotificationAddRequest OnEventNotificationAddRequest; + public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; + public event EventGodDelete OnEventGodDelete; + #pragma warning restore 67 /// -- cgit v1.1