From d91330ea35a7344af0a3a79e1dac7dee69daee22 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 20 Apr 2009 20:43:48 +0000 Subject: Add PlacesQuery packet --- OpenSim/Client/MXP/ClientStack/MXPClientView.cs | 2 ++ OpenSim/Framework/IClientAPI.cs | 3 +++ .../Region/ClientStack/LindenUDP/LLClientView.cs | 21 +++++++++++++++++++++ .../Region/Examples/SimpleModule/MyNpcCharacter.cs | 2 ++ .../Region/OptionalModules/World/NPC/NPCAvatar.cs | 2 ++ OpenSim/Tests/Common/Mock/TestClient.cs | 2 ++ 6 files changed, 32 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index f42b842..52c8072 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs @@ -754,6 +754,8 @@ namespace OpenSim.Client.MXP.ClientStack public event MuteListRequest OnMuteListRequest; public event AvatarInterestUpdate OnAvatarInterestUpdate; + public event PlacesQuery OnPlacesQuery; + #pragma warning restore 67 #endregion diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index da87183..2f9f594 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -442,6 +442,7 @@ namespace OpenSim.Framework public delegate void AvatarNotesUpdate(IClientAPI client, UUID targetID, string notes); public delegate void MuteListRequest(IClientAPI client, uint muteCRC); public delegate void AvatarInterestUpdate(IClientAPI client, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages); + public delegate void PlacesQuery(UUID QueryID, UUID TransactionID, string QueryText, uint QueryFlags, byte Category, string SimName, IClientAPI client); #endregion @@ -782,6 +783,8 @@ namespace OpenSim.Framework event AvatarNotesUpdate OnAvatarNotesUpdate; event MuteListRequest OnMuteListRequest; + + event PlacesQuery OnPlacesQuery; /// /// Set the debug level at which packet output should be printed to console. diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 6ac0acd..c12cc69 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -313,6 +313,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP //private AvatarInterestUpdate handlerAvatarInterestUpdate; + private PlacesQuery handlerPlacesQuery; + private readonly IGroupsModule m_GroupsModule; //private TerrainUnacked handlerUnackedTerrain = null; @@ -1112,6 +1114,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP //public event AvatarInterestUpdate OnAvatarInterestUpdate; + public event PlacesQuery OnPlacesQuery; + public void ActivateGesture(UUID assetId, UUID gestureId) { } @@ -9140,6 +9144,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP // // break; + case PacketType.PlacesQuery: + PlacesQueryPacket placesQueryPacket = + (PlacesQueryPacket)Pack; + + handlerPlacesQuery = OnPlacesQuery; + + if (handlerPlacesQuery != null) + handlerPlacesQuery(placesQueryPacket.AgentData.QueryID, + placesQueryPacket.TransactionData.TransactionID, + Utils.BytesToString( + placesQueryPacket.QueryData.QueryText), + placesQueryPacket.QueryData.QueryFlags, + (byte)placesQueryPacket.QueryData.Category, + Utils.BytesToString( + placesQueryPacket.QueryData.SimName), + this); + break; default: m_log.Warn("[CLIENT]: unhandled packet " + Pack); break; diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 34d2ca7..579f09f 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -269,6 +269,8 @@ namespace OpenSim.Region.Examples.SimpleModule public event AvatarInterestUpdate OnAvatarInterestUpdate; + public event PlacesQuery OnPlacesQuery; + #pragma warning restore 67 private UUID myID = UUID.Random(); diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index c721790..abe915c 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -375,6 +375,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC public event AvatarInterestUpdate OnAvatarInterestUpdate; + public event PlacesQuery OnPlacesQuery; + #pragma warning restore 67 #endregion diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 1efc3fd..a593fe4 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs @@ -282,6 +282,8 @@ namespace OpenSim.Tests.Common.Mock public event AvatarInterestUpdate OnAvatarInterestUpdate; + public event PlacesQuery OnPlacesQuery; + #pragma warning restore 67 /// -- cgit v1.1