aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorHomer Horwitz2008-10-19 16:49:10 +0000
committerHomer Horwitz2008-10-19 16:49:10 +0000
commit1ee10d919aae59e8b97b7f24dff14a16cb50e8df (patch)
treeed53a4418624c0f1c7aff4b2474184e989ae3f8d /OpenSim/Region/ClientStack
parentUpdate svn properties. (diff)
downloadopensim-SC_OLD-1ee10d919aae59e8b97b7f24dff14a16cb50e8df.zip
opensim-SC_OLD-1ee10d919aae59e8b97b7f24dff14a16cb50e8df.tar.gz
opensim-SC_OLD-1ee10d919aae59e8b97b7f24dff14a16cb50e8df.tar.bz2
opensim-SC_OLD-1ee10d919aae59e8b97b7f24dff14a16cb50e8df.tar.xz
Added calling cards. Fixes Mantis#2409 and part of #1515.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs68
1 files changed, 68 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 412f969..19983dc 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -1009,6 +1009,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1009 1009
1010 public event MapItemRequest OnMapItemRequest; 1010 public event MapItemRequest OnMapItemRequest;
1011 1011
1012 public event OfferCallingCard OnOfferCallingCard;
1013 public event AcceptCallingCard OnAcceptCallingCard;
1014 public event DeclineCallingCard OnDeclineCallingCard;
1015
1012 // voire si c'est necessaire 1016 // voire si c'est necessaire
1013 public void ActivateGesture(UUID assetId, UUID gestureId) 1017 public void ActivateGesture(UUID assetId, UUID gestureId)
1014 { 1018 {
@@ -6447,6 +6451,38 @@ namespace OpenSim.Region.ClientStack.LindenUDP
6447 parcelSetOtherCleanTimePacket.ParcelData.OtherCleanTime); 6451 parcelSetOtherCleanTimePacket.ParcelData.OtherCleanTime);
6448 } 6452 }
6449 break; 6453 break;
6454
6455 case PacketType.OfferCallingCard:
6456 OfferCallingCardPacket offerCallingCardPacket = (OfferCallingCardPacket)Pack;
6457 if (OnOfferCallingCard != null)
6458 {
6459 OnOfferCallingCard(this,
6460 offerCallingCardPacket.AgentBlock.DestID,
6461 offerCallingCardPacket.AgentBlock.TransactionID);
6462 }
6463 break;
6464
6465 case PacketType.AcceptCallingCard:
6466 AcceptCallingCardPacket acceptCallingCardPacket = (AcceptCallingCardPacket)Pack;
6467 // according to http://wiki.secondlife.com/wiki/AcceptCallingCard FolderData should
6468 // contain exactly one entry
6469 if (OnAcceptCallingCard != null && acceptCallingCardPacket.FolderData.Length > 0)
6470 {
6471 OnAcceptCallingCard(this,
6472 acceptCallingCardPacket.TransactionBlock.TransactionID,
6473 acceptCallingCardPacket.FolderData[0].FolderID);
6474 }
6475 break;
6476
6477 case PacketType.DeclineCallingCard:
6478 DeclineCallingCardPacket declineCallingCardPacket = (DeclineCallingCardPacket)Pack;
6479 if (OnDeclineCallingCard != null)
6480 {
6481 OnDeclineCallingCard(this,
6482 declineCallingCardPacket.TransactionBlock.TransactionID);
6483 }
6484 break;
6485
6450 default: 6486 default:
6451 m_log.Warn("[CLIENT]: unhandled packet " + Pack.ToString()); 6487 m_log.Warn("[CLIENT]: unhandled packet " + Pack.ToString());
6452 break; 6488 break;
@@ -7161,6 +7197,38 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7161 7197
7162 } 7198 }
7163 7199
7200 public void SendOfferCallingCard(UUID srcID, UUID transactionID)
7201 {
7202 // a bit special, as this uses AgentID to store the source instead
7203 // of the destination. The destination (the receiver) goes into destID
7204 OfferCallingCardPacket p = (OfferCallingCardPacket)PacketPool.Instance.GetPacket(PacketType.OfferCallingCard);
7205 p.AgentData.AgentID = srcID;
7206 p.AgentData.SessionID = UUID.Zero;
7207 p.AgentBlock.DestID = AgentId;
7208 p.AgentBlock.TransactionID = transactionID;
7209 OutPacket(p, ThrottleOutPacketType.Task);
7210 }
7211
7212 public void SendAcceptCallingCard(UUID transactionID)
7213 {
7214 AcceptCallingCardPacket p = (AcceptCallingCardPacket)PacketPool.Instance.GetPacket(PacketType.AcceptCallingCard);
7215 p.AgentData.AgentID = AgentId;
7216 p.AgentData.SessionID = UUID.Zero;
7217 p.FolderData = new AcceptCallingCardPacket.FolderDataBlock[1];
7218 p.FolderData[0] = new AcceptCallingCardPacket.FolderDataBlock();
7219 p.FolderData[0].FolderID = UUID.Zero;
7220 OutPacket(p, ThrottleOutPacketType.Task);
7221 }
7222
7223 public void SendDeclineCallingCard(UUID transactionID)
7224 {
7225 DeclineCallingCardPacket p = (DeclineCallingCardPacket)PacketPool.Instance.GetPacket(PacketType.DeclineCallingCard);
7226 p.AgentData.AgentID = AgentId;
7227 p.AgentData.SessionID = UUID.Zero;
7228 p.TransactionBlock.TransactionID = transactionID;
7229 OutPacket(p, ThrottleOutPacketType.Task);
7230 }
7231
7164 public void KillEndDone() 7232 public void KillEndDone()
7165 { 7233 {
7166 KillPacket kp = new KillPacket(); 7234 KillPacket kp = new KillPacket();