From 23844a9073e28fb8c74424812603027586bdb4df Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 25 Dec 2008 20:28:13 +0000 Subject: Plumb the profile reply packets for picks, classifieds and notes --- OpenSim/Framework/IClientAPI.cs | 5 ++ .../Region/ClientStack/LindenUDP/LLClientView.cs | 64 ++++++++++++++++++++++ .../Environment/Modules/World/NPC/NPCAvatar.cs | 17 ++++++ .../Region/Examples/SimpleModule/MyNpcCharacter.cs | 17 ++++++ OpenSim/Tests/Common/Mock/TestClient.cs | 17 ++++++ 5 files changed, 120 insertions(+) diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 05e8f75..79311d5 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -1077,6 +1077,11 @@ namespace OpenSim.Framework void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name); void SendClassifiedInfoReply(UUID classifiedID, UUID creatorID, uint creationDate, uint expirationDate, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, string simName, Vector3 globalPos, string parcelName, byte classifiedFlags, int price); + void SendAgentDropGroup(UUID groupID); + void SendAvatarNotesReply(UUID targetID, string text); + void SendAvatarPicksReply(UUID targetID, Dictionary picks); + void SendAvatarClassifiedReply(UUID targetID, Dictionary classifieds); + void KillEndDone(); bool AddGenericPacketHandler(string MethodName, GenericMessage handler); diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index beebfd4..962071b 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -8219,6 +8219,70 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(dg, ThrottleOutPacketType.Task); } + public void SendAvatarNotesReply(UUID targetID, string text) + { + AvatarNotesReplyPacket an = + (AvatarNotesReplyPacket)PacketPool.Instance.GetPacket( + PacketType.AvatarNotesReply); + + an.AgentData = new AvatarNotesReplyPacket.AgentDataBlock(); + an.AgentData.AgentID = AgentId; + + an.Data = new AvatarNotesReplyPacket.DataBlock(); + an.Data.TargetID = targetID; + an.Data.Notes = Utils.StringToBytes(text); + + OutPacket(an, ThrottleOutPacketType.Task); + } + + public void SendAvatarPicksReply(UUID targetID, Dictionary picks) + { + AvatarPicksReplyPacket ap = + (AvatarPicksReplyPacket)PacketPool.Instance.GetPacket( + PacketType.AvatarPicksReply); + + ap.AgentData = new AvatarPicksReplyPacket.AgentDataBlock(); + ap.AgentData.AgentID = AgentId; + ap.AgentData.TargetID = targetID; + + ap.Data = new AvatarPicksReplyPacket.DataBlock[picks.Count]; + + int i = 0; + foreach(KeyValuePair pick in picks) + { + ap.Data[i] = new AvatarPicksReplyPacket.DataBlock(); + ap.Data[i].PickID = pick.Key; + ap.Data[i].PickName = Utils.StringToBytes(pick.Value); + i++; + } + + OutPacket(ap, ThrottleOutPacketType.Task); + } + + public void SendAvatarClassifiedReply(UUID targetID, Dictionary classifieds) + { + AvatarClassifiedReplyPacket ac = + (AvatarClassifiedReplyPacket)PacketPool.Instance.GetPacket( + PacketType.AvatarClassifiedReply); + + ac.AgentData = new AvatarClassifiedReplyPacket.AgentDataBlock(); + ac.AgentData.AgentID = AgentId; + ac.AgentData.TargetID = targetID; + + ac.Data = new AvatarClassifiedReplyPacket.DataBlock[classifieds.Count]; + + int i = 0; + foreach(KeyValuePair classified in classifieds) + { + ac.Data[i] = new AvatarClassifiedReplyPacket.DataBlock(); + ac.Data[i].ClassifiedID = classified.Key; + ac.Data[i].Name = Utils.StringToBytes(classified.Value); + i++; + } + + OutPacket(ac, ThrottleOutPacketType.Task); + } + public void KillEndDone() { KillPacket kp = new KillPacket(); diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index 95744b5..61b8690 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs @@ -1023,6 +1023,23 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { } + public void SendAgentDropGroup(UUID groupID) + { + } + + public void SendAvatarNotesReply(UUID targetID, string text) + { + } + + public void SendAvatarPicksReply(UUID targetID, Dictionary picks) + { + } + + public void SendAvatarClassifiedReply(UUID targetID, Dictionary classifieds) + { + } + + #endregion } } diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index fd5fa7a..79e6653 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -1024,6 +1024,23 @@ namespace OpenSim.Region.Examples.SimpleModule { } + public void SendAgentDropGroup(UUID groupID) + { + } + + public void SendAvatarNotesReply(UUID targetID, string text) + { + } + + public void SendAvatarPicksReply(UUID targetID, Dictionary picks) + { + } + + public void SendAvatarClassifiedReply(UUID targetID, Dictionary classifieds) + { + } + + #endregion } } diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index cb26366..fe93d6b 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs @@ -970,5 +970,22 @@ namespace OpenSim.Tests.Common.Mock { } + public void SendAgentDropGroup(UUID groupID) + { + } + + public void SendAvatarNotesReply(UUID targetID, string text) + { + } + + public void SendAvatarPicksReply(UUID targetID, Dictionary picks) + { + } + + public void SendAvatarClassifiedReply(UUID targetID, Dictionary classifieds) + { + } + + } } -- cgit v1.1