aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/IClientAPI.cs
diff options
context:
space:
mode:
authorAdam Frisby2008-04-29 14:04:55 +0000
committerAdam Frisby2008-04-29 14:04:55 +0000
commit375163a6fece8b3a57c7555246abe8338223a599 (patch)
tree163001ca96a4b4d08589e9772f78510677d5d0dc /OpenSim/Framework/IClientAPI.cs
parentPatch from Melanie: 0001087: Crash to bash de-linking objects. Thanks Melanie! (diff)
downloadopensim-SC_OLD-375163a6fece8b3a57c7555246abe8338223a599.zip
opensim-SC_OLD-375163a6fece8b3a57c7555246abe8338223a599.tar.gz
opensim-SC_OLD-375163a6fece8b3a57c7555246abe8338223a599.tar.bz2
opensim-SC_OLD-375163a6fece8b3a57c7555246abe8338223a599.tar.xz
* Spring cleaning.
* Added new generic "Location" class to handle 2D integer locations. Going to use it to replace all RegionHandle and X,Y coordinate references throughout the entire project. You have been warned.
Diffstat (limited to 'OpenSim/Framework/IClientAPI.cs')
-rw-r--r--OpenSim/Framework/IClientAPI.cs156
1 files changed, 83 insertions, 73 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 985e085..20d4e62 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -74,14 +74,19 @@ namespace OpenSim.Framework
74 /// </summary> 74 /// </summary>
75 public class ChatFromViewerArgs : EventArgs, IEventArgs 75 public class ChatFromViewerArgs : EventArgs, IEventArgs
76 { 76 {
77 protected string m_message;
78 protected ChatTypeEnum m_type;
79 protected int m_channel; 77 protected int m_channel;
80 protected LLVector3 m_position;
81 protected string m_from; 78 protected string m_from;
79 protected string m_message;
80 protected LLVector3 m_position;
82 81
83 protected IClientAPI m_sender;
84 protected IScene m_scene; 82 protected IScene m_scene;
83 protected IClientAPI m_sender;
84 protected ChatTypeEnum m_type;
85
86 public ChatFromViewerArgs()
87 {
88 m_position = new LLVector3();
89 }
85 90
86 /// <summary> 91 /// <summary>
87 /// The message sent by the user 92 /// The message sent by the user
@@ -128,6 +133,8 @@ namespace OpenSim.Framework
128 set { m_from = value; } 133 set { m_from = value; }
129 } 134 }
130 135
136 #region IEventArgs Members
137
131 /// <summary> 138 /// <summary>
132 /// The client responsible for sending the message, or null. 139 /// The client responsible for sending the message, or null.
133 /// </summary> 140 /// </summary>
@@ -146,18 +153,15 @@ namespace OpenSim.Framework
146 set { m_scene = value; } 153 set { m_scene = value; }
147 } 154 }
148 155
149 public ChatFromViewerArgs() 156 #endregion
150 {
151 m_position = new LLVector3();
152 }
153 } 157 }
154 158
155 public class TextureRequestArgs : EventArgs 159 public class TextureRequestArgs : EventArgs
156 { 160 {
157 protected LLUUID m_requestedAssetID;
158 private sbyte m_discardLevel; 161 private sbyte m_discardLevel;
159 private uint m_packetNumber; 162 private uint m_packetNumber;
160 private float m_priority; 163 private float m_priority;
164 protected LLUUID m_requestedAssetID;
161 165
162 public float Priority 166 public float Priority
163 { 167 {
@@ -206,6 +210,8 @@ namespace OpenSim.Framework
206 set { m_nowWearing = value; } 210 set { m_nowWearing = value; }
207 } 211 }
208 212
213 #region Nested type: Wearable
214
209 public class Wearable 215 public class Wearable
210 { 216 {
211 public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000"); 217 public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000");
@@ -217,6 +223,8 @@ namespace OpenSim.Framework
217 Type = type; 223 Type = type;
218 } 224 }
219 } 225 }
226
227 #endregion
220 } 228 }
221 229
222 public delegate void TextureRequest(Object sender, TextureRequestArgs e); 230 public delegate void TextureRequest(Object sender, TextureRequestArgs e);
@@ -224,18 +232,18 @@ namespace OpenSim.Framework
224 public delegate void AvatarNowWearing(Object sender, AvatarWearingArgs e); 232 public delegate void AvatarNowWearing(Object sender, AvatarWearingArgs e);
225 233
226 public delegate void ImprovedInstantMessage(IClientAPI remoteclient, 234 public delegate void ImprovedInstantMessage(IClientAPI remoteclient,
227 LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp, 235 LLUUID fromAgentID, LLUUID fromAgentSession, LLUUID toAgentID, LLUUID imSessionID, uint timestamp,
228 string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, uint ParentEstateID, 236 string fromAgentName, string message, byte dialog, bool fromGroup, byte offline, uint ParentEstateID,
229 LLVector3 Position, LLUUID RegionID, byte[] binaryBucket); // This shouldn't be cut down... 237 LLVector3 Position, LLUUID RegionID, byte[] binaryBucket); // This shouldn't be cut down...
230 // especially if we're ever going to implement groups, presence, estate message dialogs... 238 // especially if we're ever going to implement groups, presence, estate message dialogs...
231 239
232 public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 RayEnd, LLVector3 RayStart, 240 public delegate void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 RayEnd, LLVector3 RayStart,
233 LLUUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, 241 LLUUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection,
234 uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags, 242 uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags,
235 bool RezSelected, bool RemoveItem, LLUUID fromTaskID ); 243 bool RezSelected, bool RemoveItem, LLUUID fromTaskID);
236 244
237 public delegate void RezSingleAttachmentFromInv(IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt, 245 public delegate void RezSingleAttachmentFromInv(IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,
238 uint ItemFlags, uint NextOwnerMask); 246 uint ItemFlags, uint NextOwnerMask);
239 247
240 public delegate void ObjectAttach(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot); 248 public delegate void ObjectAttach(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot);
241 249
@@ -305,12 +313,10 @@ namespace OpenSim.Framework
305 313
306 public delegate void ObjectDuplicate(uint localID, LLVector3 offset, uint dupeFlags, LLUUID AgentID, LLUUID GroupID); 314 public delegate void ObjectDuplicate(uint localID, LLVector3 offset, uint dupeFlags, LLUUID AgentID, LLUUID GroupID);
307 315
308 public delegate void ObjectDuplicateOnRay(uint localID, uint dupeFlags, LLUUID AgentID, LLUUID GroupID, 316 public delegate void ObjectDuplicateOnRay(uint localID, uint dupeFlags, LLUUID AgentID, LLUUID GroupID,
309 LLUUID RayTargetObj, LLVector3 RayEnd, LLVector3 RayStart, 317 LLUUID RayTargetObj, LLVector3 RayEnd, LLVector3 RayStart,
310 bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates); 318 bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates);
311 319
312
313
314 320
315 public delegate void StatusChange(bool status); 321 public delegate void StatusChange(bool status);
316 322
@@ -355,7 +361,9 @@ namespace OpenSim.Framework
355 361
356 public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client); 362 public delegate void UUIDNameRequest(LLUUID id, IClientAPI remote_client);
357 363
358 public delegate void AddNewPrim(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, byte RayEndIsIntersection); 364 public delegate void AddNewPrim(
365 LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID,
366 byte RayEndIsIntersection);
359 367
360 public delegate void RequestGodlikePowers(LLUUID AgentID, LLUUID SessionID, LLUUID token, bool GodLike, IClientAPI remote_client); 368 public delegate void RequestGodlikePowers(LLUUID AgentID, LLUUID SessionID, LLUUID token, bool GodLike, IClientAPI remote_client);
361 369
@@ -409,7 +417,7 @@ namespace OpenSim.Framework
409 public delegate void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID, uint localID); 417 public delegate void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID, uint localID);
410 418
411 public delegate void MoveTaskInventory(IClientAPI remoteClient, LLUUID folderID, uint localID, LLUUID itemID); 419 public delegate void MoveTaskInventory(IClientAPI remoteClient, LLUUID folderID, uint localID, LLUUID itemID);
412 420
413 public delegate void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID); 421 public delegate void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID);
414 422
415 public delegate void UDPAssetUploadRequest( 423 public delegate void UDPAssetUploadRequest(
@@ -422,17 +430,17 @@ namespace OpenSim.Framework
422 430
423 public delegate void ConfirmXfer(IClientAPI remoteClient, ulong xferID, uint packetID); 431 public delegate void ConfirmXfer(IClientAPI remoteClient, ulong xferID, uint packetID);
424 432
425 public delegate void FriendActionDelegate(IClientAPI remoteClient,LLUUID agentID,LLUUID transactionID,List<LLUUID> callingCardFolders); 433 public delegate void FriendActionDelegate(IClientAPI remoteClient, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders);
426 434
427 public delegate void FriendshipTermination(IClientAPI remoteClient,LLUUID agentID, LLUUID ExID); 435 public delegate void FriendshipTermination(IClientAPI remoteClient, LLUUID agentID, LLUUID ExID);
428 436
429 public delegate void PacketStats(int inPackets, int outPackets, int unAckedBytes); 437 public delegate void PacketStats(int inPackets, int outPackets, int unAckedBytes);
430 438
431 public delegate void MoneyTransferRequest(LLUUID sourceID, LLUUID destID, int amount, int transactionType, string description); 439 public delegate void MoneyTransferRequest(LLUUID sourceID, LLUUID destID, int amount, int transactionType, string description);
432 440
433 public delegate void ParcelBuy(LLUUID agentId, LLUUID groupId, bool final, bool groupOwned, 441 public delegate void ParcelBuy(LLUUID agentId, LLUUID groupId, bool final, bool groupOwned,
434 bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated); 442 bool removeContribution, int parcelLocalID, int parcelArea, int parcelPrice, bool authenticated);
435 443
436 // We keep all this information for fraud purposes in the future. 444 // We keep all this information for fraud purposes in the future.
437 public delegate void MoneyBalanceRequest(IClientAPI remoteClient, LLUUID agentID, LLUUID sessionID, LLUUID TransactionID); 445 public delegate void MoneyBalanceRequest(IClientAPI remoteClient, LLUUID agentID, LLUUID sessionID, LLUUID TransactionID);
438 446
@@ -443,10 +451,33 @@ namespace OpenSim.Framework
443 public delegate void ObjectIncludeInSearch(IClientAPI remoteClient, bool IncludeInSearch, uint localID); 451 public delegate void ObjectIncludeInSearch(IClientAPI remoteClient, bool IncludeInSearch, uint localID);
444 452
445 public delegate void ScriptAnswer(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID, int answer); 453 public delegate void ScriptAnswer(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID, int answer);
454
446 public delegate void RequestPayPrice(IClientAPI remoteClient, LLUUID objectID); 455 public delegate void RequestPayPrice(IClientAPI remoteClient, LLUUID objectID);
447 456
448 public interface IClientAPI 457 public interface IClientAPI
449 { 458 {
459 LLVector3 StartPos { get; set; }
460
461 LLUUID AgentId { get; }
462
463 LLUUID SessionId { get; }
464
465 LLUUID SecureSessionId { get; }
466
467 string FirstName { get; }
468
469 string LastName { get; }
470
471 int NextAnimationSequenceNumber { get; }
472
473 /// <summary>
474 /// Returns the full name of the agent/avatar represented by this client
475 /// </summary>
476 /// <param name="newPack"></param>
477 /// <param name="packType"></param>
478 string Name { get; }
479
480 uint CircuitCode { get; }
450 event ImprovedInstantMessage OnInstantMessage; 481 event ImprovedInstantMessage OnInstantMessage;
451 event ChatFromViewer OnChatFromViewer; 482 event ChatFromViewer OnChatFromViewer;
452 event TextureRequest OnRequestTexture; 483 event TextureRequest OnRequestTexture;
@@ -563,38 +594,15 @@ namespace OpenSim.Framework
563 event MoneyBalanceRequest OnMoneyBalanceRequest; 594 event MoneyBalanceRequest OnMoneyBalanceRequest;
564 event UpdateAvatarProperties OnUpdateAvatarProperties; 595 event UpdateAvatarProperties OnUpdateAvatarProperties;
565 event ParcelBuy OnParcelBuy; 596 event ParcelBuy OnParcelBuy;
566 event RequestPayPrice OnRequestPayPrice ; 597 event RequestPayPrice OnRequestPayPrice;
567 598
568 event ObjectIncludeInSearch OnObjectIncludeInSearch; 599 event ObjectIncludeInSearch OnObjectIncludeInSearch;
569 600
570 event UUIDNameRequest OnTeleportHomeRequest; 601 event UUIDNameRequest OnTeleportHomeRequest;
571 602
572 event ScriptAnswer OnScriptAnswer; 603 event ScriptAnswer OnScriptAnswer;
573 604
574 event AgentSit OnUndo; 605 event AgentSit OnUndo;
575
576 LLVector3 StartPos { get; set; }
577
578 LLUUID AgentId { get; }
579
580 LLUUID SessionId { get; }
581
582 LLUUID SecureSessionId { get; }
583
584 string FirstName { get; }
585
586 string LastName { get; }
587
588 int NextAnimationSequenceNumber { get; }
589
590 /// <summary>
591 /// Returns the full name of the agent/avatar represented by this client
592 /// </summary>
593 /// <param name="newPack"></param>
594 /// <param name="packType"></param>
595 string Name { get; }
596
597 uint CircuitCode { get; }
598 606
599 void OutPacket(Packet newPack, ThrottleOutPacketType packType); 607 void OutPacket(Packet newPack, ThrottleOutPacketType packType);
600 void SendWearables(AvatarWearable[] wearables, int serial); 608 void SendWearables(AvatarWearable[] wearables, int serial);
@@ -608,9 +616,10 @@ namespace OpenSim.Framework
608 616
609 void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, 617 void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent,
610 LLUUID imSessionID, string fromName, byte dialog, uint timeStamp); 618 LLUUID imSessionID, string fromName, byte dialog, uint timeStamp);
619
611 void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, 620 void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent,
612 LLUUID imSessionID, string fromName, byte dialog, uint timeStamp, 621 LLUUID imSessionID, string fromName, byte dialog, uint timeStamp,
613 byte[] binaryBucket); 622 byte[] binaryBucket);
614 623
615 void SendLayerData(float[] map); 624 void SendLayerData(float[] map);
616 void SendLayerData(int px, int py, float[] map); 625 void SendLayerData(int px, int py, float[] map);
@@ -645,9 +654,9 @@ namespace OpenSim.Framework
645 654
646 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, 655 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
647 LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, 656 LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color,
648 uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction, byte[] textureanimation, 657 uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction, byte[] textureanimation,
649 bool attachment, uint AttachmentPoint, LLUUID AssetId); 658 bool attachment, uint AttachmentPoint, LLUUID AssetId);
650 659
651 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, 660 void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
652 LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color, 661 LLVector3 pos, uint flags, LLUUID objectID, LLUUID ownerID, string text, byte[] color,
653 uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction); 662 uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction);
@@ -657,7 +666,7 @@ namespace OpenSim.Framework
657 666
658 void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, 667 void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
659 LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity); 668 LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity);
660 669
661 void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items, 670 void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, List<InventoryItemBase> items,
662 List<InventoryFolderBase> folders, bool fetchFolders, 671 List<InventoryFolderBase> folders, bool fetchFolders,
663 bool fetchItems); 672 bool fetchItems);
@@ -672,20 +681,20 @@ namespace OpenSim.Framework
672 681
673 void SendRemoveInventoryItem(LLUUID itemID); 682 void SendRemoveInventoryItem(LLUUID itemID);
674 void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName); 683 void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName);
675 684
676 /// <summary> 685 /// <summary>
677 /// Used by the server to inform the client of a new inventory item. Used when transferring items 686 /// Used by the server to inform the client of a new inventory item. Used when transferring items
678 /// between avatars, possibly among other things. 687 /// between avatars, possibly among other things.
679 /// </summary> 688 /// </summary>
680 /// <param name="item"></param> 689 /// <param name="item"></param>
681 void SendBulkUpdateInventory(InventoryItemBase item); 690 void SendBulkUpdateInventory(InventoryItemBase item);
682 691
683 void SendXferPacket(ulong xferID, uint packet, byte[] data); 692 void SendXferPacket(ulong xferID, uint packet, byte[] data);
684 693
685 void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, 694 void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit,
686 int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, 695 int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor,
687 int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, 696 int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay,
688 int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent); 697 int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent);
689 698
690 void SendAvatarPickerReply(AvatarPickerReplyPacket Pack); 699 void SendAvatarPickerReply(AvatarPickerReplyPacket Pack);
691 700
@@ -709,10 +718,11 @@ namespace OpenSim.Framework
709 718
710 void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout, 719 void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, string charterMember, string flAbout,
711 uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID); 720 uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, LLUUID partnerID);
721
712 void SendScriptQuestion(LLUUID taskID, string taskName, string ownerName, LLUUID itemID, int question); 722 void SendScriptQuestion(LLUUID taskID, string taskName, string ownerName, LLUUID itemID, int question);
713 723
714 byte[] GetThrottlesPacked(float multiplier); 724 byte[] GetThrottlesPacked(float multiplier);
715 725
716 726
717 void SetDebug(int newDebug); 727 void SetDebug(int newDebug);
718 void InPacket(Packet NewPack); 728 void InPacket(Packet NewPack);
@@ -734,16 +744,16 @@ namespace OpenSim.Framework
734 [Serializable] 744 [Serializable]
735 public class ClientInfo 745 public class ClientInfo
736 { 746 {
737 public byte[] usecircuit;
738 public EndPoint userEP;
739 public EndPoint proxyEP;
740 public sAgentCircuitData agentcircuit; 747 public sAgentCircuitData agentcircuit;
741 748
742 public Dictionary<uint, uint> pendingAcks;
743 public Dictionary<uint, byte[]> needAck; 749 public Dictionary<uint, byte[]> needAck;
744 750
745 public List<byte[]> out_packets; 751 public List<byte[]> out_packets;
752 public Dictionary<uint, uint> pendingAcks;
753 public EndPoint proxyEP;
746 754
747 public uint sequence; 755 public uint sequence;
756 public byte[] usecircuit;
757 public EndPoint userEP;
748 } 758 }
749} 759} \ No newline at end of file