From d9b802bb26ee659a68270ac05ea0406389afc883 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 8 Jul 2008 11:25:18 +0000 Subject: * Split out various classes from IClientAPI into their own files, in accordance with code standards --- OpenSim/Framework/IClientAPI.cs | 368 +--------------------------------------- 1 file changed, 3 insertions(+), 365 deletions(-) (limited to 'OpenSim/Framework/IClientAPI.cs') diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 9307aef..f2eb6a0 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -33,360 +33,12 @@ using libsecondlife.Packets; namespace OpenSim.Framework { - // Base Args Interface - public interface IEventArgs - { - IScene Scene { get; set; } - IClientAPI Sender { get; set; } - } + #region Client API Delegate definitions public delegate void ViewerEffectEventHandler(IClientAPI sender, List args); public delegate void ChatFromViewer(Object sender, ChatFromViewerArgs e); - public enum ChatTypeEnum - { - Whisper = 0, - Say = 1, - Shout = 2, - // 3 is an obsolete version of Say - StartTyping = 4, - StopTyping = 5, - DebugChannel = 6, - Region = 7, - Owner = 8, - Broadcast = 0xFF - } - - public enum ThrottleOutPacketType : int - { - Resend = 0, - Land = 1, - Wind = 2, - Cloud = 3, - Task = 4, - Texture = 5, - Asset = 6, - Unknown = 7, // Also doubles as 'do not throttle' - Back = 8 - } - - /// - /// ChatFromViewer Arguments - /// - public class ChatFromViewerArgs : EventArgs, IEventArgs - { - protected int m_channel; - protected string m_from; - protected string m_message; - protected LLVector3 m_position; - - protected IScene m_scene; - protected IClientAPI m_sender; - protected object m_senderObject; - protected ChatTypeEnum m_type; - protected LLUUID m_fromID; - - public ChatFromViewerArgs() - { - m_position = new LLVector3(); - } - - /// - /// The message sent by the user - /// - public string Message - { - get { return m_message; } - set { m_message = value; } - } - - /// - /// The type of message, eg say, shout, broadcast. - /// - public ChatTypeEnum Type - { - get { return m_type; } - set { m_type = value; } - } - - /// - /// Which channel was this message sent on? Different channels may have different listeners. Public chat is on channel zero. - /// - public int Channel - { - get { return m_channel; } - set { m_channel = value; } - } - - /// - /// The position of the sender at the time of the message broadcast. - /// - public LLVector3 Position - { - get { return m_position; } - set { m_position = value; } - } - - /// - /// The name of the sender (needed for scripts) - /// - public string From - { - get { return m_from; } - set { m_from = value; } - } - - #region IEventArgs Members - - /// TODO: Sender and SenderObject should just be Sender and of - /// type IChatSender - - /// - /// The client responsible for sending the message, or null. - /// - public IClientAPI Sender - { - get { return m_sender; } - set { m_sender = value; } - } - - /// - /// The object responsible for sending the message, or null. - /// - public object SenderObject - { - get { return m_senderObject; } - set { m_senderObject = value; } - } - - public LLUUID SenderUUID - { - get { return m_fromID; } - set { m_fromID = value; } - } - - /// - /// - /// - public IScene Scene - { - get { return m_scene; } - set { m_scene = value; } - } - - #endregion - } - - public class TextureRequestArgs : EventArgs - { - private sbyte m_discardLevel; - private uint m_packetNumber; - private float m_priority; - protected LLUUID m_requestedAssetID; - - public float Priority - { - get { return m_priority; } - set { m_priority = value; } - } - - /// - /// - /// - public uint PacketNumber - { - get { return m_packetNumber; } - set { m_packetNumber = value; } - } - - /// - /// - /// - public sbyte DiscardLevel - { - get { return m_discardLevel; } - set { m_discardLevel = value; } - } - - /// - /// - /// - public LLUUID RequestedAssetID - { - get { return m_requestedAssetID; } - set { m_requestedAssetID = value; } - } - } - - public class AvatarWearingArgs : EventArgs - { - private List m_nowWearing = new List(); - - /// - /// - /// - public List NowWearing - { - get { return m_nowWearing; } - set { m_nowWearing = value; } - } - - #region Nested type: Wearable - - public class Wearable - { - public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000"); - public byte Type = 0; - - public Wearable(LLUUID itemId, byte type) - { - ItemID = itemId; - Type = type; - } - } - - #endregion - } - - public class ViewerEffectEventHandlerArg : EventArgs - { - public LLUUID AgentID; - public byte[] Color; - public float Duration; - public LLUUID ID; - public byte Type; - public byte[] TypeData; - } - - public class LandUpdateArgs : EventArgs - { - public LLUUID AuthBuyerID; - public Parcel.ParcelCategory Category; - public string Desc; - public LLUUID GroupID; - public byte LandingType; - public byte MediaAutoScale; - public LLUUID MediaID; - public string MediaURL; - public string MusicURL; - public string Name; - public uint ParcelFlags; - public float PassHours; - public int PassPrice; - public int SalePrice; - public LLUUID SnapshotID; - public LLVector3 UserLocation; - public LLVector3 UserLookAt; - } - - public class RegionHandshakeArgs : EventArgs - { - public bool isEstateManager; - public float billableFactor; - public float terrainHeightRange0; - public float terrainHeightRange1; - public float terrainHeightRange2; - public float terrainHeightRange3; - public float terrainStartHeight0; - public float terrainStartHeight1; - public float terrainStartHeight2; - public float terrainStartHeight3; - public byte simAccess; - public float waterHeight; - public uint regionFlags; - public string regionName; - public LLUUID SimOwner; - public LLUUID terrainBase0; - public LLUUID terrainBase1; - public LLUUID terrainBase2; - public LLUUID terrainBase3; - public LLUUID terrainDetail0; - public LLUUID terrainDetail1; - public LLUUID terrainDetail2; - public LLUUID terrainDetail3; - } - - public class RegionInfoForEstateMenuArgs : EventArgs - { - public float billableFactor; - public uint estateID; - public byte maxAgents; - public float objectBonusFactor; - public uint parentEstateID; - public int pricePerMeter; - public int redirectGridX; - public int redirectGridY; - public uint regionFlags; - public byte simAccess; - public float sunHour; - public float terrainLowerLimit; - public float terrainRaiseLimit; - public bool useEstateSun; - public float waterHeight; - public string simName; - } - - public class UpdateShapeArgs : EventArgs - { - public uint ObjectLocalID; - public ushort PathBegin; - public byte PathCurve; - public ushort PathEnd; - public sbyte PathRadiusOffset; - public byte PathRevolutions; - public byte PathScaleX; - public byte PathScaleY; - public byte PathShearX; - public byte PathShearY; - public sbyte PathSkew; - public sbyte PathTaperX; - public sbyte PathTaperY; - public sbyte PathTwist; - public sbyte PathTwistBegin; - public ushort ProfileBegin; - public byte ProfileCurve; - public ushort ProfileEnd; - public ushort ProfileHollow; - } - - public class RequestAssetArgs : EventArgs - { - public int ChannelType; - public float Priority; - public int SourceType; - public LLUUID TransferID; - } - - public class AgentUpdateArgs : EventArgs - { - public LLUUID AgentID; - public LLQuaternion BodyRotation; - public LLVector3 CameraAtAxis; - public LLVector3 CameraCenter; - public LLVector3 CameraLeftAxis; - public LLVector3 CameraUpAxis; - public uint ControlFlags; - public float Far; - public byte Flags; - public LLQuaternion HeadRotation; - public LLUUID SessionID; - public byte State; - } - - public class AvatarPickerReplyAgentDataArgs : EventArgs - { - public LLUUID AgentID; - public LLUUID QueryID; - } - - public class AvatarPickerReplyDataArgs : EventArgs - { - public LLUUID AvatarID; - public byte[] FirstName; - public byte[] LastName; - } - public delegate void TextureRequest(Object sender, TextureRequestArgs e); public delegate void AvatarNowWearing(Object sender, AvatarWearingArgs e); @@ -646,6 +298,8 @@ namespace OpenSim.Framework public delegate void GetScriptRunning(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID); public delegate void SetScriptRunning(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID, bool running); + #endregion + public interface IClientAPI { LLVector3 StartPos { get; set; } @@ -1044,20 +698,4 @@ namespace OpenSim.Framework void SetClientInfo(ClientInfo info); void Terminate(); } - - [Serializable] - public class ClientInfo - { - public sAgentCircuitData agentcircuit; - - public Dictionary needAck; - - public List out_packets; - public Dictionary pendingAcks; - public EndPoint proxyEP; - - public uint sequence; - public byte[] usecircuit; - public EndPoint userEP; - } } -- cgit v1.1