Plumb packet DirPlacesQuery for search module

0.6.0-stable
Melanie Thielker 2008-10-04 22:29:37 +00:00
parent 31362a67df
commit f52d779550
4 changed files with 29 additions and 0 deletions

View File

@ -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.")]

View File

@ -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;

View File

@ -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

View File

@ -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