aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs239
1 files changed, 239 insertions, 0 deletions
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();