From f52d779550494cdc61b6f3b28c620c5b7d9f0d16 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 4 Oct 2008 22:29:37 +0000 Subject: Plumb packet DirPlacesQuery for search module --- OpenSim/Framework/IClientAPI.cs | 3 +++ .../Region/ClientStack/LindenUDP/LLClientView.cs | 22 ++++++++++++++++++++++ .../Environment/Modules/World/NPC/NPCAvatar.cs | 2 ++ .../Region/Examples/SimpleModule/MyNpcCharacter.cs | 2 ++ 4 files changed, 29 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 5baa595..2ae66e4 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -309,6 +309,7 @@ namespace OpenSim.Framework public delegate void TerrainUnacked(IClientAPI remoteClient, int patchX, int patchY); + public delegate void DirPlacesQuery(IClientAPI remoteClient, UUID queryID, string queryText, int queryFlags, int category, string simName, int queryStart); #endregion public interface IClientAPI @@ -534,6 +535,8 @@ namespace OpenSim.Framework event ActivateGesture OnActivateGesture; event DeactivateGesture OnDeactivateGesture; + event DirPlacesQuery OnDirPlacesQuery; + // void ActivateGesture(UUID assetId, UUID gestureId); // [Obsolete("IClientAPI.OutPacket SHOULD NOT EXIST outside of LLClientView please refactor appropriately.")] diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index ef2b2ba..5d7a1ca 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -260,6 +260,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP private ActivateGesture handlerActivateGesture = null; private DeactivateGesture handlerDeactivateGesture = null; + private DirPlacesQuery handlerDirPlacesQuery = null; + //private TerrainUnacked handlerUnackedTerrain = null; //** @@ -984,6 +986,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP public event ActivateGesture OnActivateGesture; public event DeactivateGesture OnDeactivateGesture; + public event DirPlacesQuery OnDirPlacesQuery; + // voire si c'est necessaire public void ActivateGesture(UUID assetId, UUID gestureId) @@ -6246,6 +6250,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP // TODO: handle this packet //m_log.Warn("[CLIENT]: unhandled InventoryDescent packet"); break; + case PacketType.DirPlacesQuery: + DirPlacesQueryPacket dirPlacesQueryPacket = (DirPlacesQueryPacket)Pack; + Console.WriteLine(dirPlacesQueryPacket.ToString()); + + handlerDirPlacesQuery = OnDirPlacesQuery; + if (handlerDirPlacesQuery != null) + { + handlerDirPlacesQuery(this, + dirPlacesQueryPacket.QueryData.QueryID, + Utils.BytesToString( + dirPlacesQueryPacket.QueryData.QueryText), + (int)dirPlacesQueryPacket.QueryData.QueryFlags, + (int)dirPlacesQueryPacket.QueryData.Category, + Utils.BytesToString( + dirPlacesQueryPacket.QueryData.SimName), + dirPlacesQueryPacket.QueryData.QueryStart); + } + break; default: m_log.Warn("[CLIENT]: unhandled packet " + Pack.ToString()); break; diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index 3d3d41c..c190434 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs @@ -322,6 +322,8 @@ namespace OpenSim.Region.Environment.Modules.World.NPC public event ActivateGesture OnActivateGesture; public event DeactivateGesture OnDeactivateGesture; + public event DirPlacesQuery OnDirPlacesQuery; + #pragma warning restore 67 #endregion diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index c8d542c..1566b2e 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -217,6 +217,8 @@ namespace OpenSim.Region.Examples.SimpleModule public event ActivateGesture OnActivateGesture; public event DeactivateGesture OnDeactivateGesture; + public event DirPlacesQuery OnDirPlacesQuery; + #pragma warning restore 67 -- cgit v1.1