aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/IClientAPI.cs
diff options
context:
space:
mode:
authorMelanie2010-05-21 03:51:58 +0100
committerMelanie2010-05-21 03:51:58 +0100
commita92780fe5f31a38b2f00459ef00ca28127a60dcf (patch)
treef89850a27564abd01f1b3aaf72aa24001e165a26 /OpenSim/Framework/IClientAPI.cs
parentRefactor scene presence list for lockless iteration. Lock contention will now... (diff)
parentCleaned up MySql migrations a bit more, got rid of all old-form migration fil... (diff)
downloadopensim-SC_OLD-a92780fe5f31a38b2f00459ef00ca28127a60dcf.zip
opensim-SC_OLD-a92780fe5f31a38b2f00459ef00ca28127a60dcf.tar.gz
opensim-SC_OLD-a92780fe5f31a38b2f00459ef00ca28127a60dcf.tar.bz2
opensim-SC_OLD-a92780fe5f31a38b2f00459ef00ca28127a60dcf.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Framework/IClientAPI.cs')
-rw-r--r--OpenSim/Framework/IClientAPI.cs258
1 files changed, 41 insertions, 217 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index ae2a80c..562d69e 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -571,207 +571,6 @@ namespace OpenSim.Framework
571 public float dwell; 571 public float dwell;
572 } 572 }
573 573
574 public struct SendAvatarData
575 {
576 public readonly ulong RegionHandle;
577 public readonly string FirstName;
578 public readonly string LastName;
579 public readonly string GroupTitle;
580 public readonly UUID AvatarID;
581 public readonly uint AvatarLocalID;
582 public readonly Vector3 Position;
583 public readonly byte[] TextureEntry;
584 public readonly uint ParentID;
585 public readonly Quaternion Rotation;
586
587 public SendAvatarData(ulong regionHandle, string firstName, string lastName, string groupTitle, UUID avatarID,
588 uint avatarLocalID, Vector3 position, byte[] textureEntry, uint parentID, Quaternion rotation)
589 {
590 RegionHandle = regionHandle;
591 FirstName = firstName;
592 LastName = lastName;
593 GroupTitle = groupTitle;
594 AvatarID = avatarID;
595 AvatarLocalID = avatarLocalID;
596 Position = position;
597 TextureEntry = textureEntry;
598 ParentID = parentID;
599 Rotation = rotation;
600 }
601 }
602
603 public struct SendAvatarTerseData
604 {
605 public readonly ulong RegionHandle;
606 public readonly ushort TimeDilation;
607 public readonly uint LocalID;
608 public readonly Vector3 Position;
609 public readonly Vector3 Velocity;
610 public readonly Vector3 Acceleration;
611 public readonly Quaternion Rotation;
612 public readonly Vector4 CollisionPlane;
613 public readonly UUID AgentID;
614 public readonly byte[] TextureEntry;
615 public readonly double Priority;
616
617 public SendAvatarTerseData(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Vector3 velocity,
618 Vector3 acceleration, Quaternion rotation, Vector4 collisionPlane, UUID agentid, byte[] textureEntry, double priority)
619 {
620 RegionHandle = regionHandle;
621 TimeDilation = timeDilation;
622 LocalID = localID;
623 Position = position;
624 Velocity = velocity;
625 Acceleration = acceleration;
626 Rotation = rotation;
627 CollisionPlane = collisionPlane;
628 AgentID = agentid;
629 TextureEntry = textureEntry;
630 Priority = priority;
631 }
632 }
633
634 public struct SendPrimitiveTerseData
635 {
636 public readonly ulong RegionHandle;
637 public readonly ushort TimeDilation;
638 public readonly uint LocalID;
639 public readonly Vector3 Position;
640 public readonly Quaternion Rotation;
641 public readonly Vector3 Velocity;
642 public readonly Vector3 Acceleration;
643 public readonly Vector3 AngularVelocity;
644 public readonly UUID AssetID;
645 public readonly UUID OwnerID;
646 public readonly int AttachPoint;
647 public readonly byte[] TextureEntry;
648 public readonly double Priority;
649
650 public SendPrimitiveTerseData(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position,
651 Quaternion rotation, Vector3 velocity, Vector3 acceleration, Vector3 rotationalvelocity,
652 UUID assetID, UUID ownerID, int attachPoint, byte[] textureEntry, double priority)
653 {
654 RegionHandle = regionHandle;
655 TimeDilation = timeDilation;
656 LocalID = localID;
657 Position = position;
658 Rotation = rotation;
659 Velocity = velocity;
660 Acceleration = acceleration;
661 AngularVelocity = rotationalvelocity;
662 AssetID = assetID;
663 OwnerID = ownerID;
664 AttachPoint = attachPoint;
665 TextureEntry = textureEntry;
666 Priority = priority;
667 }
668 }
669
670 public struct SendPrimitiveData
671 {
672 private ulong m_regionHandle;
673 private ushort m_timeDilation;
674 private uint m_localID;
675 private PrimitiveBaseShape m_primShape;
676 private Vector3 m_pos;
677 private Vector3 m_vel;
678 private Vector3 m_acc;
679 private Quaternion m_rotation;
680 private Vector3 m_rvel;
681 private PrimFlags m_flags;
682 private UUID m_objectID;
683 private UUID m_ownerID;
684 private string m_text;
685 private byte[] m_color;
686 private uint m_parentID;
687 private byte[] m_particleSystem;
688 private byte m_clickAction;
689 private byte m_material;
690 private byte[] m_textureanim;
691 private bool m_attachment;
692 private uint m_AttachPoint;
693 private UUID m_AssetId;
694 private UUID m_SoundId;
695 private double m_SoundVolume;
696 private byte m_SoundFlags;
697 private double m_SoundRadius;
698 private double m_priority;
699
700 public SendPrimitiveData(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
701 Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel,
702 uint flags, UUID objectID, UUID ownerID, string text, byte[] color,
703 uint parentID, byte[] particleSystem, byte clickAction, byte material, double priority) :
704 this(regionHandle, timeDilation, localID, primShape, pos, vel, acc, rotation, rvel, flags, objectID,
705 ownerID, text, color, parentID, particleSystem, clickAction, material, new byte[0], false, 0, UUID.Zero,
706 UUID.Zero, 0, 0, 0, priority) { }
707
708 public SendPrimitiveData(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape,
709 Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel,
710 uint flags,
711 UUID objectID, UUID ownerID, string text, byte[] color, uint parentID,
712 byte[] particleSystem,
713 byte clickAction, byte material, byte[] textureanim, bool attachment,
714 uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags,
715 double SoundRadius, double priority)
716 {
717 this.m_regionHandle = regionHandle;
718 this.m_timeDilation = timeDilation;
719 this.m_localID = localID;
720 this.m_primShape = primShape;
721 this.m_pos = pos;
722 this.m_vel = vel;
723 this.m_acc = acc;
724 this.m_rotation = rotation;
725 this.m_rvel = rvel;
726 this.m_flags = (PrimFlags)flags;
727 this.m_objectID = objectID;
728 this.m_ownerID = ownerID;
729 this.m_text = text;
730 this.m_color = color;
731 this.m_parentID = parentID;
732 this.m_particleSystem = particleSystem;
733 this.m_clickAction = clickAction;
734 this.m_material = material;
735 this.m_textureanim = textureanim;
736 this.m_attachment = attachment;
737 this.m_AttachPoint = AttachPoint;
738 this.m_AssetId = AssetId;
739 this.m_SoundId = SoundId;
740 this.m_SoundVolume = SoundVolume;
741 this.m_SoundFlags = SoundFlags;
742 this.m_SoundRadius = SoundRadius;
743 this.m_priority = priority;
744 }
745
746 public ulong regionHandle { get { return this.m_regionHandle; } }
747 public ushort timeDilation { get { return this.m_timeDilation; } }
748 public uint localID { get { return this.m_localID; } }
749 public PrimitiveBaseShape primShape { get { return this.m_primShape; } }
750 public Vector3 pos { get { return this.m_pos; } }
751 public Vector3 vel { get { return this.m_vel; } }
752 public Vector3 acc { get { return this.m_acc; } }
753 public Quaternion rotation { get { return this.m_rotation; } }
754 public Vector3 rvel { get { return this.m_rvel; } }
755 public PrimFlags flags { get { return this.m_flags; } }
756 public UUID objectID { get { return this.m_objectID; } }
757 public UUID ownerID { get { return this.m_ownerID; } }
758 public string text { get { return this.m_text; } }
759 public byte[] color { get { return this.m_color; } }
760 public uint parentID { get { return this.m_parentID; } }
761 public byte[] particleSystem { get { return this.m_particleSystem; } }
762 public byte clickAction { get { return this.m_clickAction; } }
763 public byte material { get { return this.m_material; } }
764 public byte[] textureanim { get { return this.m_textureanim; } }
765 public bool attachment { get { return this.m_attachment; } }
766 public uint AttachPoint { get { return this.m_AttachPoint; } }
767 public UUID AssetId { get { return this.m_AssetId; } }
768 public UUID SoundId { get { return this.m_SoundId; } }
769 public double SoundVolume { get { return this.m_SoundVolume; } }
770 public byte SoundFlags { get { return this.m_SoundFlags; } }
771 public double SoundRadius { get { return this.m_SoundRadius; } }
772 public double priority { get { return this.m_priority; } }
773 }
774
775 public struct UpdatePriorityData { 574 public struct UpdatePriorityData {
776 private double m_priority; 575 private double m_priority;
777 private uint m_localID; 576 private uint m_localID;
@@ -785,14 +584,46 @@ namespace OpenSim.Framework
785 public uint localID { get { return this.m_localID; } } 584 public uint localID { get { return this.m_localID; } }
786 } 585 }
787 586
587 /// <summary>
588 /// Specifies the fields that have been changed when sending a prim or
589 /// avatar update
590 /// </summary>
788 [Flags] 591 [Flags]
789 public enum StateUpdateTypes 592 public enum PrimUpdateFlags : uint
790 { 593 {
791 None = 0, 594 None = 0,
792 AvatarTerse = 1, 595 AttachmentPoint = 1 << 0,
793 PrimitiveTerse = AvatarTerse << 1, 596 Material = 1 << 1,
794 PrimitiveFull = PrimitiveTerse << 1, 597 ClickAction = 1 << 2,
795 All = AvatarTerse | PrimitiveTerse | PrimitiveFull, 598 Scale = 1 << 3,
599 ParentID = 1 << 4,
600 PrimFlags = 1 << 5,
601 PrimData = 1 << 6,
602 MediaURL = 1 << 7,
603 ScratchPad = 1 << 8,
604 Textures = 1 << 9,
605 TextureAnim = 1 << 10,
606 NameValue = 1 << 11,
607 Position = 1 << 12,
608 Rotation = 1 << 13,
609 Velocity = 1 << 14,
610 Acceleration = 1 << 15,
611 AngularVelocity = 1 << 16,
612 CollisionPlane = 1 << 17,
613 Text = 1 << 18,
614 Particles = 1 << 19,
615 ExtraData = 1 << 20,
616 Sound = 1 << 21,
617 Joint = 1 << 22,
618 FullUpdate = UInt32.MaxValue
619 }
620
621 public static class PrimUpdateFlagsExtensions
622 {
623 public static bool HasFlag(this PrimUpdateFlags updateFlags, PrimUpdateFlags flag)
624 {
625 return (updateFlags & flag) == flag;
626 }
796 } 627 }
797 628
798 public interface IClientAPI 629 public interface IClientAPI
@@ -1188,27 +1019,20 @@ namespace OpenSim.Framework
1188 void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance); 1019 void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance);
1189 void SendPayPrice(UUID objectID, int[] payPrice); 1020 void SendPayPrice(UUID objectID, int[] payPrice);
1190 1021
1191 void SendAvatarData(SendAvatarData data);
1192
1193 void SendAvatarTerseUpdate(SendAvatarTerseData data);
1194
1195 void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations); 1022 void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations);
1196 1023
1197 void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID); 1024 void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID);
1198 void SetChildAgentThrottle(byte[] throttle); 1025 void SetChildAgentThrottle(byte[] throttle);
1199 1026
1200 void SendPrimitiveToClient(SendPrimitiveData data); 1027 void SendAvatarDataImmediate(ISceneEntity avatar);
1201 1028 void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags);
1202 void SendPrimTerseUpdate(SendPrimitiveTerseData data); 1029 void ReprioritizeUpdates(UpdatePriorityHandler handler);
1203 1030 void FlushPrimUpdates();
1204 void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler);
1205 1031
1206 void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, 1032 void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items,
1207 List<InventoryFolderBase> folders, int version, bool fetchFolders, 1033 List<InventoryFolderBase> folders, int version, bool fetchFolders,
1208 bool fetchItems); 1034 bool fetchItems);
1209 1035
1210 void FlushPrimUpdates();
1211
1212 void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item); 1036 void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item);
1213 1037
1214 /// <summary> 1038 /// <summary>