aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie Thielker2008-10-11 05:59:12 +0000
committerMelanie Thielker2008-10-11 05:59:12 +0000
commit544daf1c76ff553036ebd81a8e0e2af0dff9bfe0 (patch)
treeffb7d4d1baef49cb19d73aa047c97079494f0702
parentThanks cmickyb for a patch that enhances the IRC module. (diff)
downloadopensim-SC_OLD-544daf1c76ff553036ebd81a8e0e2af0dff9bfe0.zip
opensim-SC_OLD-544daf1c76ff553036ebd81a8e0e2af0dff9bfe0.tar.gz
opensim-SC_OLD-544daf1c76ff553036ebd81a8e0e2af0dff9bfe0.tar.bz2
opensim-SC_OLD-544daf1c76ff553036ebd81a8e0e2af0dff9bfe0.tar.xz
Plumb the remaining search packets and replies.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/IClientAPI.cs66
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs239
-rw-r--r--OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs28
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs43
4 files changed, 369 insertions, 7 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index dd905c9..556f724 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -314,6 +314,10 @@ namespace OpenSim.Framework
314 public delegate void ObjectOwner(IClientAPI remoteClient, UUID ownerID, UUID groupID, List<uint> localIDs); 314 public delegate void ObjectOwner(IClientAPI remoteClient, UUID ownerID, UUID groupID, List<uint> localIDs);
315 315
316 public delegate void DirPlacesQuery(IClientAPI remoteClient, UUID queryID, string queryText, int queryFlags, int category, string simName, int queryStart); 316 public delegate void DirPlacesQuery(IClientAPI remoteClient, UUID queryID, string queryText, int queryFlags, int category, string simName, int queryStart);
317 public delegate void DirFindQuery(IClientAPI remoteClient, UUID queryID, string queryText, uint queryFlags, int queryStart);
318 public delegate void DirLandQuery(IClientAPI remoteClient, UUID queryID, uint queryFlags, uint searchType, int price, int area, int queryStart);
319 public delegate void DirPopularQuery(IClientAPI remoteClient, UUID queryID, uint queryFlags);
320 public delegate void DirClassifiedQuery(IClientAPI remoteClient, UUID queryID, string queryText, uint queryFlags, uint category, int queryStart);
317 321
318 public delegate void MapItemRequest(IClientAPI remoteClient, uint flags, uint EstateID, bool godlike, uint itemtype, ulong regionhandle); 322 public delegate void MapItemRequest(IClientAPI remoteClient, uint flags, uint EstateID, bool godlike, uint itemtype, ulong regionhandle);
319 323
@@ -328,6 +332,61 @@ namespace OpenSim.Framework
328 public float dwell; 332 public float dwell;
329 } 333 }
330 334
335 public struct DirPeopleReplyData
336 {
337 public UUID agentID;
338 public string firstName;
339 public string lastName;
340 public string group;
341 public bool online;
342 public int reputation;
343 }
344
345 public struct DirEventsReplyData
346 {
347 public UUID ownerID;
348 public string name;
349 public uint eventID;
350 public string date;
351 public uint unixTime;
352 public uint eventFlags;
353 }
354
355 public struct DirGroupsReplyData
356 {
357 public UUID groupID;
358 public string groupName;
359 public int members;
360 public float searchOrder;
361 }
362
363 public struct DirClassifiedReplyData
364 {
365 public UUID classifiedID;
366 public string name;
367 public byte classifiedFlags;
368 public uint creationDate;
369 public uint expirationDate;
370 public int price;
371 }
372
373 public struct DirLandReplyData
374 {
375 public UUID parcelID;
376 public string name;
377 public bool auction;
378 public bool forSale;
379 public int salePrice;
380 public int actualArea;
381 }
382
383 public struct DirPopularReplyData
384 {
385 public UUID parcelID;
386 public string name;
387 public float dwell;
388 }
389
331 public interface IClientAPI 390 public interface IClientAPI
332 { 391 {
333 Vector3 StartPos { get; set; } 392 Vector3 StartPos { get; set; }
@@ -793,6 +852,13 @@ namespace OpenSim.Framework
793 void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt); 852 void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt);
794 853
795 void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data); 854 void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data);
855 void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data);
856 void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data);
857 void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data);
858 void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data);
859 void SendDirLandReply(UUID queryID, DirLandReplyData[] data);
860 void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data);
861
796 862
797 void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags); 863 void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags);
798 864
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 7eda272..6ec9f7f 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -263,6 +263,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
263 private ObjectOwner handlerObjectOwner = null; 263 private ObjectOwner handlerObjectOwner = null;
264 264
265 private DirPlacesQuery handlerDirPlacesQuery = null; 265 private DirPlacesQuery handlerDirPlacesQuery = null;
266 private DirFindQuery handlerDirFindQuery = null;
267 private DirLandQuery handlerDirLandQuery = null;
268 private DirPopularQuery handlerDirPopularQuery = null;
269 private DirClassifiedQuery handlerDirClassifiedQuery = null;
266 270
267 private MapItemRequest handlerMapItemRequest = null; 271 private MapItemRequest handlerMapItemRequest = null;
268 272
@@ -993,6 +997,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
993 public event ObjectOwner OnObjectOwner; 997 public event ObjectOwner OnObjectOwner;
994 998
995 public event DirPlacesQuery OnDirPlacesQuery; 999 public event DirPlacesQuery OnDirPlacesQuery;
1000 public event DirFindQuery OnDirFindQuery;
1001 public event DirLandQuery OnDirLandQuery;
1002 public event DirPopularQuery OnDirPopularQuery;
1003 public event DirClassifiedQuery OnDirClassifiedQuery;
996 1004
997 public event MapItemRequest OnMapItemRequest; 1005 public event MapItemRequest OnMapItemRequest;
998 1006
@@ -6346,6 +6354,58 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6346 dirPlacesQueryPacket.QueryData.QueryStart); 6354 dirPlacesQueryPacket.QueryData.QueryStart);
6347 } 6355 }
6348 break; 6356 break;
6357 case PacketType.DirFindQuery:
6358 DirFindQueryPacket dirFindQueryPacket = (DirFindQueryPacket)Pack;
6359 handlerDirFindQuery = OnDirFindQuery;
6360 if (handlerDirFindQuery != null)
6361 {
6362 handlerDirFindQuery(this,
6363 dirFindQueryPacket.QueryData.QueryID,
6364 Utils.BytesToString(
6365 dirFindQueryPacket.QueryData.QueryText),
6366 dirFindQueryPacket.QueryData.QueryFlags,
6367 dirFindQueryPacket.QueryData.QueryStart);
6368 }
6369 break;
6370 case PacketType.DirLandQuery:
6371 DirLandQueryPacket dirLandQueryPacket = (DirLandQueryPacket)Pack;
6372 handlerDirLandQuery = OnDirLandQuery;
6373 if (handlerDirLandQuery != null)
6374 {
6375 handlerDirLandQuery(this,
6376 dirLandQueryPacket.QueryData.QueryID,
6377 dirLandQueryPacket.QueryData.QueryFlags,
6378 dirLandQueryPacket.QueryData.SearchType,
6379 dirLandQueryPacket.QueryData.Price,
6380 dirLandQueryPacket.QueryData.Area,
6381 dirLandQueryPacket.QueryData.QueryStart);
6382 }
6383 break;
6384 case PacketType.DirPopularQuery:
6385 DirPopularQueryPacket dirPopularQueryPacket = (DirPopularQueryPacket)Pack;
6386 handlerDirPopularQuery = OnDirPopularQuery;
6387 if (handlerDirPopularQuery != null)
6388 {
6389 handlerDirPopularQuery(this,
6390 dirPopularQueryPacket.QueryData.QueryID,
6391 dirPopularQueryPacket.QueryData.QueryFlags);
6392 }
6393 break;
6394 case PacketType.DirClassifiedQuery:
6395 DirClassifiedQueryPacket dirClassifiedQueryPacket = (DirClassifiedQueryPacket)Pack;
6396 handlerDirClassifiedQuery = OnDirClassifiedQuery;
6397 if (handlerDirClassifiedQuery != null)
6398 {
6399 handlerDirClassifiedQuery(this,
6400 dirClassifiedQueryPacket.QueryData.QueryID,
6401 Utils.BytesToString(
6402 dirClassifiedQueryPacket.QueryData.QueryText),
6403 dirClassifiedQueryPacket.QueryData.QueryFlags,
6404 dirClassifiedQueryPacket.QueryData.Category,
6405 dirClassifiedQueryPacket.QueryData.QueryStart);
6406 }
6407 break;
6408
6349 default: 6409 default:
6350 m_log.Warn("[CLIENT]: unhandled packet " + Pack.ToString()); 6410 m_log.Warn("[CLIENT]: unhandled packet " + Pack.ToString());
6351 break; 6411 break;
@@ -6834,6 +6894,185 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6834 6894
6835 OutPacket(packet, ThrottleOutPacketType.Task); 6895 OutPacket(packet, ThrottleOutPacketType.Task);
6836 } 6896 }
6897
6898 public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data)
6899 {
6900 DirPeopleReplyPacket packet = (DirPeopleReplyPacket)PacketPool.Instance.GetPacket(PacketType.DirPeopleReply);
6901
6902 packet.AgentData = new DirPeopleReplyPacket.AgentDataBlock();
6903 packet.AgentData.AgentID = AgentId;
6904
6905 packet.QueryData = new DirPeopleReplyPacket.QueryDataBlock();
6906 packet.QueryData.QueryID = queryID;
6907
6908 packet.QueryReplies = new DirPeopleReplyPacket.QueryRepliesBlock[
6909 data.Length];
6910
6911 int i = 0;
6912 foreach (DirPeopleReplyData d in data)
6913 {
6914 packet.QueryReplies[i] = new DirPeopleReplyPacket.QueryRepliesBlock();
6915 packet.QueryReplies[i].AgentID = d.agentID;
6916 packet.QueryReplies[i].FirstName =
6917 Utils.StringToBytes(d.firstName);
6918 packet.QueryReplies[i].LastName =
6919 Utils.StringToBytes(d.lastName);
6920 packet.QueryReplies[i].Group =
6921 Utils.StringToBytes(d.group);
6922 packet.QueryReplies[i].Online = d.online;
6923 packet.QueryReplies[i].Reputation = d.reputation;
6924 i++;
6925 }
6926
6927 OutPacket(packet, ThrottleOutPacketType.Task);
6928 }
6929
6930 public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data)
6931 {
6932 DirEventsReplyPacket packet = (DirEventsReplyPacket)PacketPool.Instance.GetPacket(PacketType.DirEventsReply);
6933
6934 packet.AgentData = new DirEventsReplyPacket.AgentDataBlock();
6935 packet.AgentData.AgentID = AgentId;
6936
6937 packet.QueryData = new DirEventsReplyPacket.QueryDataBlock();
6938 packet.QueryData.QueryID = queryID;
6939
6940 packet.QueryReplies = new DirEventsReplyPacket.QueryRepliesBlock[
6941 data.Length];
6942
6943 int i = 0;
6944 foreach (DirEventsReplyData d in data)
6945 {
6946 packet.QueryReplies[i] = new DirEventsReplyPacket.QueryRepliesBlock();
6947 packet.QueryReplies[i].OwnerID = d.ownerID;
6948 packet.QueryReplies[i].Name =
6949 Utils.StringToBytes(d.name);
6950 packet.QueryReplies[i].EventID = d.eventID;
6951 packet.QueryReplies[i].Date =
6952 Utils.StringToBytes(d.date);
6953 packet.QueryReplies[i].UnixTime = d.unixTime;
6954 packet.QueryReplies[i].EventFlags = d.eventFlags;
6955 i++;
6956 }
6957
6958 OutPacket(packet, ThrottleOutPacketType.Task);
6959 }
6960
6961 public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data)
6962 {
6963 DirGroupsReplyPacket packet = (DirGroupsReplyPacket)PacketPool.Instance.GetPacket(PacketType.DirGroupsReply);
6964
6965 packet.AgentData = new DirGroupsReplyPacket.AgentDataBlock();
6966 packet.AgentData.AgentID = AgentId;
6967
6968 packet.QueryData = new DirGroupsReplyPacket.QueryDataBlock();
6969 packet.QueryData.QueryID = queryID;
6970
6971 packet.QueryReplies = new DirGroupsReplyPacket.QueryRepliesBlock[
6972 data.Length];
6973
6974 int i = 0;
6975 foreach (DirGroupsReplyData d in data)
6976 {
6977 packet.QueryReplies[i] = new DirGroupsReplyPacket.QueryRepliesBlock();
6978 packet.QueryReplies[i].GroupID = d.groupID;
6979 packet.QueryReplies[i].GroupName =
6980 Utils.StringToBytes(d.groupName);
6981 packet.QueryReplies[i].Members = d.members;
6982 packet.QueryReplies[i].SearchOrder = d.searchOrder;
6983 i++;
6984 }
6985
6986 OutPacket(packet, ThrottleOutPacketType.Task);
6987 }
6988
6989 public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data)
6990 {
6991 DirClassifiedReplyPacket packet = (DirClassifiedReplyPacket)PacketPool.Instance.GetPacket(PacketType.DirClassifiedReply);
6992
6993 packet.AgentData = new DirClassifiedReplyPacket.AgentDataBlock();
6994 packet.AgentData.AgentID = AgentId;
6995
6996 packet.QueryData = new DirClassifiedReplyPacket.QueryDataBlock();
6997 packet.QueryData.QueryID = queryID;
6998
6999 packet.QueryReplies = new DirClassifiedReplyPacket.QueryRepliesBlock[
7000 data.Length];
7001
7002 int i = 0;
7003 foreach (DirClassifiedReplyData d in data)
7004 {
7005 packet.QueryReplies[i] = new DirClassifiedReplyPacket.QueryRepliesBlock();
7006 packet.QueryReplies[i].ClassifiedID = d.classifiedID;
7007 packet.QueryReplies[i].Name =
7008 Utils.StringToBytes(d.name);
7009 packet.QueryReplies[i].ClassifiedFlags = d.classifiedFlags;
7010 packet.QueryReplies[i].CreationDate = d.creationDate;
7011 packet.QueryReplies[i].ExpirationDate = d.expirationDate;
7012 packet.QueryReplies[i].PriceForListing = d.price;
7013 i++;
7014 }
7015
7016 OutPacket(packet, ThrottleOutPacketType.Task);
7017 }
7018
7019 public void SendDirLandReply(UUID queryID, DirLandReplyData[] data)
7020 {
7021 DirLandReplyPacket packet = (DirLandReplyPacket)PacketPool.Instance.GetPacket(PacketType.DirLandReply);
7022
7023 packet.AgentData = new DirLandReplyPacket.AgentDataBlock();
7024 packet.AgentData.AgentID = AgentId;
7025
7026 packet.QueryData = new DirLandReplyPacket.QueryDataBlock();
7027 packet.QueryData.QueryID = queryID;
7028
7029 packet.QueryReplies = new DirLandReplyPacket.QueryRepliesBlock[
7030 data.Length];
7031
7032 int i = 0;
7033 foreach (DirLandReplyData d in data)
7034 {
7035 packet.QueryReplies[i] = new DirLandReplyPacket.QueryRepliesBlock();
7036 packet.QueryReplies[i].ParcelID = d.parcelID;
7037 packet.QueryReplies[i].Name =
7038 Utils.StringToBytes(d.name);
7039 packet.QueryReplies[i].Auction = d.auction;
7040 packet.QueryReplies[i].ForSale = d.forSale;
7041 packet.QueryReplies[i].SalePrice = d.salePrice;
7042 packet.QueryReplies[i].ActualArea = d.actualArea;
7043 i++;
7044 }
7045
7046 OutPacket(packet, ThrottleOutPacketType.Task);
7047 }
7048
7049 public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data)
7050 {
7051 DirPopularReplyPacket packet = (DirPopularReplyPacket)PacketPool.Instance.GetPacket(PacketType.DirPopularReply);
7052
7053 packet.AgentData = new DirPopularReplyPacket.AgentDataBlock();
7054 packet.AgentData.AgentID = AgentId;
7055
7056 packet.QueryData = new DirPopularReplyPacket.QueryDataBlock();
7057 packet.QueryData.QueryID = queryID;
7058
7059 packet.QueryReplies = new DirPopularReplyPacket.QueryRepliesBlock[
7060 data.Length];
7061
7062 int i = 0;
7063 foreach (DirPopularReplyData d in data)
7064 {
7065 packet.QueryReplies[i] = new DirPopularReplyPacket.QueryRepliesBlock();
7066 packet.QueryReplies[i].ParcelID = d.parcelID;
7067 packet.QueryReplies[i].Name =
7068 Utils.StringToBytes(d.name);
7069 packet.QueryReplies[i].Dwell = d.dwell;
7070 i++;
7071 }
7072
7073 OutPacket(packet, ThrottleOutPacketType.Task);
7074 }
7075
6837 public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags) 7076 public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags)
6838 { 7077 {
6839 MapItemReplyPacket mirplk = new MapItemReplyPacket(); 7078 MapItemReplyPacket mirplk = new MapItemReplyPacket();
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
index d0fbfb9..acad64a 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
@@ -325,6 +325,10 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
325 public event ObjectOwner OnObjectOwner; 325 public event ObjectOwner OnObjectOwner;
326 326
327 public event DirPlacesQuery OnDirPlacesQuery; 327 public event DirPlacesQuery OnDirPlacesQuery;
328 public event DirFindQuery OnDirFindQuery;
329 public event DirLandQuery OnDirLandQuery;
330 public event DirPopularQuery OnDirPopularQuery;
331 public event DirClassifiedQuery OnDirClassifiedQuery;
328 332
329 public event MapItemRequest OnMapItemRequest; 333 public event MapItemRequest OnMapItemRequest;
330 334
@@ -899,6 +903,30 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
899 { 903 {
900 } 904 }
901 905
906 public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data)
907 {
908 }
909
910 public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data)
911 {
912 }
913
914 public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data)
915 {
916 }
917
918 public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data)
919 {
920 }
921
922 public void SendDirLandReply(UUID queryID, DirLandReplyData[] data)
923 {
924 }
925
926 public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data)
927 {
928 }
929
902 public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags) 930 public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags)
903 { 931 {
904 } 932 }
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 6c2831e..ef78cb5 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -210,16 +210,21 @@ namespace OpenSim.Region.Examples.SimpleModule
210 public event SetScriptRunning OnSetScriptRunning; 210 public event SetScriptRunning OnSetScriptRunning;
211 public event UpdateVector OnAutoPilotGo; 211 public event UpdateVector OnAutoPilotGo;
212 212
213 public event TerrainUnacked OnUnackedTerrain; 213 public event TerrainUnacked OnUnackedTerrain;
214 214
215 public event RegionHandleRequest OnRegionHandleRequest; 215 public event RegionHandleRequest OnRegionHandleRequest;
216 public event ParcelInfoRequest OnParcelInfoRequest; 216 public event ParcelInfoRequest OnParcelInfoRequest;
217 217
218 public event ActivateGesture OnActivateGesture; 218 public event ActivateGesture OnActivateGesture;
219 public event DeactivateGesture OnDeactivateGesture; 219 public event DeactivateGesture OnDeactivateGesture;
220 public event ObjectOwner OnObjectOwner; 220 public event ObjectOwner OnObjectOwner;
221
222 public event DirPlacesQuery OnDirPlacesQuery;
223 public event DirFindQuery OnDirFindQuery;
224 public event DirLandQuery OnDirLandQuery;
225 public event DirPopularQuery OnDirPopularQuery;
226 public event DirClassifiedQuery OnDirClassifiedQuery;
221 227
222 public event DirPlacesQuery OnDirPlacesQuery;
223 228
224 public event MapItemRequest OnMapItemRequest; 229 public event MapItemRequest OnMapItemRequest;
225 230
@@ -896,6 +901,30 @@ namespace OpenSim.Region.Examples.SimpleModule
896 { 901 {
897 } 902 }
898 903
904 public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data)
905 {
906 }
907
908 public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data)
909 {
910 }
911
912 public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data)
913 {
914 }
915
916 public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data)
917 {
918 }
919
920 public void SendDirLandReply(UUID queryID, DirLandReplyData[] data)
921 {
922 }
923
924 public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data)
925 {
926 }
927
899 public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags) 928 public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags)
900 { 929 {
901 } 930 }