aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Tests/Common
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Tests/Common/Mock/TestClient.cs60
1 files changed, 41 insertions, 19 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs
index a9ee837..428f599 100644
--- a/OpenSim/Tests/Common/Mock/TestClient.cs
+++ b/OpenSim/Tests/Common/Mock/TestClient.cs
@@ -39,6 +39,10 @@ namespace OpenSim.Tests.Common.Mock
39 { 39 {
40 private Scene m_scene; 40 private Scene m_scene;
41 41
42 // Mock testing variables
43 public List<ImageDataPacket> sentdatapkt = new List<ImageDataPacket>();
44 public List<ImagePacketPacket> sentpktpkt = new List<ImagePacketPacket>();
45
42// disable warning: public events, part of the public API 46// disable warning: public events, part of the public API
43#pragma warning disable 67 47#pragma warning disable 67
44 48
@@ -215,7 +219,7 @@ namespace OpenSim.Tests.Common.Mock
215 public event ActivateGesture OnActivateGesture; 219 public event ActivateGesture OnActivateGesture;
216 public event DeactivateGesture OnDeactivateGesture; 220 public event DeactivateGesture OnDeactivateGesture;
217 public event ObjectOwner OnObjectOwner; 221 public event ObjectOwner OnObjectOwner;
218 222
219 public event DirPlacesQuery OnDirPlacesQuery; 223 public event DirPlacesQuery OnDirPlacesQuery;
220 public event DirFindQuery OnDirFindQuery; 224 public event DirFindQuery OnDirFindQuery;
221 public event DirLandQuery OnDirLandQuery; 225 public event DirLandQuery OnDirLandQuery;
@@ -229,7 +233,7 @@ namespace OpenSim.Tests.Common.Mock
229 public event OfferCallingCard OnOfferCallingCard; 233 public event OfferCallingCard OnOfferCallingCard;
230 public event AcceptCallingCard OnAcceptCallingCard; 234 public event AcceptCallingCard OnAcceptCallingCard;
231 public event DeclineCallingCard OnDeclineCallingCard; 235 public event DeclineCallingCard OnDeclineCallingCard;
232 236
233 public event SoundTrigger OnSoundTrigger; 237 public event SoundTrigger OnSoundTrigger;
234 238
235 public event StartLure OnStartLure; 239 public event StartLure OnStartLure;
@@ -284,7 +288,7 @@ namespace OpenSim.Tests.Common.Mock
284 { 288 {
285 get { return m_firstName; } 289 get { return m_firstName; }
286 } 290 }
287 private string m_firstName; 291 private string m_firstName;
288 292
289 public virtual string LastName 293 public virtual string LastName
290 { 294 {
@@ -359,7 +363,7 @@ namespace OpenSim.Tests.Common.Mock
359 { 363 {
360 myID = agentData.AgentID; 364 myID = agentData.AgentID;
361 m_firstName = agentData.firstname; 365 m_firstName = agentData.firstname;
362 m_lastName = agentData.lastname; 366 m_lastName = agentData.lastname;
363 } 367 }
364 368
365 public virtual void ActivateGesture(UUID assetId, UUID gestureId) 369 public virtual void ActivateGesture(UUID assetId, UUID gestureId)
@@ -420,12 +424,12 @@ namespace OpenSim.Tests.Common.Mock
420 424
421 public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp) 425 public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp)
422 { 426 {
423 427
424 } 428 }
425 429
426 public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp, UUID transactionID, bool fromGroup, byte[] binaryBucket) 430 public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp, UUID transactionID, bool fromGroup, byte[] binaryBucket)
427 { 431 {
428 432
429 } 433 }
430 434
431 public void SendGenericMessage(string method, List<string> message) 435 public void SendGenericMessage(string method, List<string> message)
@@ -563,7 +567,7 @@ namespace OpenSim.Tests.Common.Mock
563 public virtual void SendBulkUpdateInventory(InventoryItemBase item) 567 public virtual void SendBulkUpdateInventory(InventoryItemBase item)
564 { 568 {
565 } 569 }
566 570
567 public void SendBulkUpdateInventory(InventoryFolderBase folderBase) 571 public void SendBulkUpdateInventory(InventoryFolderBase folderBase)
568 {} 572 {}
569 573
@@ -590,7 +594,7 @@ namespace OpenSim.Tests.Common.Mock
590 int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent) 594 int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent)
591 { 595 {
592 } 596 }
593 597
594 public virtual void SendNameReply(UUID profileId, string firstname, string lastname) 598 public virtual void SendNameReply(UUID profileId, string firstname, string lastname)
595 { 599 {
596 } 600 }
@@ -660,16 +664,34 @@ namespace OpenSim.Tests.Common.Mock
660 664
661 public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) 665 public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
662 { 666 {
667 ImageDataPacket im = new ImageDataPacket();
668 im.Header.Reliable = false;
669 im.ImageID.Packets = numParts;
670 im.ImageID.ID = ImageUUID;
671
672 if (ImageSize > 0)
673 im.ImageID.Size = ImageSize;
674
675 im.ImageData.Data = ImageData;
676 im.ImageID.Codec = imageCodec;
677 im.Header.Zerocoded = true;
678 sentdatapkt.Add(im);
663 } 679 }
664 680
665 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData) 681 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
666 { 682 {
683 ImagePacketPacket im = new ImagePacketPacket();
684 im.Header.Reliable = false;
685 im.ImageID.Packet = partNumber;
686 im.ImageID.ID = imageUuid;
687 im.ImageData.Data = imageData;
688 sentpktpkt.Add(im);
667 } 689 }
668 690
669 public void SendImageNotFound(UUID imageid) 691 public void SendImageNotFound(UUID imageid)
670 { 692 {
671 } 693 }
672 694
673 public void SendShutdownConnectionNotice() 695 public void SendShutdownConnectionNotice()
674 { 696 {
675 } 697 }
@@ -726,10 +748,10 @@ namespace OpenSim.Tests.Common.Mock
726 public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong time, uint dlen, uint ylen, float phase) 748 public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong time, uint dlen, uint ylen, float phase)
727 { 749 {
728 } 750 }
729 751
730 public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks) 752 public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks)
731 { 753 {
732 } 754 }
733 755
734 public void SendViewerTime(int phase) 756 public void SendViewerTime(int phase)
735 { 757 {
@@ -804,11 +826,11 @@ namespace OpenSim.Tests.Common.Mock
804 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) 826 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args)
805 { 827 {
806 } 828 }
807 829
808 public void SendEstateCovenantInformation(UUID covenant) 830 public void SendEstateCovenantInformation(UUID covenant)
809 { 831 {
810 } 832 }
811 833
812 public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner) 834 public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner)
813 { 835 {
814 } 836 }
@@ -816,19 +838,19 @@ namespace OpenSim.Tests.Common.Mock
816 public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) 838 public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
817 { 839 {
818 } 840 }
819 841
820 public void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID) 842 public void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID)
821 { 843 {
822 } 844 }
823 845
824 public void SendForceClientSelectObjects(List<uint> objectIDs) 846 public void SendForceClientSelectObjects(List<uint> objectIDs)
825 { 847 {
826 } 848 }
827 849
828 public void SendLandObjectOwners(Dictionary<UUID, int> ownersAndCount) 850 public void SendLandObjectOwners(Dictionary<UUID, int> ownersAndCount)
829 { 851 {
830 } 852 }
831 853
832 public void SendLandParcelOverlay(byte[] data, int sequence_id) 854 public void SendLandParcelOverlay(byte[] data, int sequence_id)
833 { 855 {
834 } 856 }