* Split out various classes from IClientAPI into their own files, in accordance with code standards

0.6.0-stable
lbsa71 2008-07-08 11:25:18 +00:00
parent c1d5291ae0
commit d9b802bb26
16 changed files with 437 additions and 365 deletions

View File

@ -0,0 +1,21 @@
using System;
using libsecondlife;
namespace OpenSim.Framework
{
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;
}
}

View File

@ -0,0 +1,11 @@
using System;
using libsecondlife;
namespace OpenSim.Framework
{
public class AvatarPickerReplyAgentDataArgs : EventArgs
{
public LLUUID AgentID;
public LLUUID QueryID;
}
}

View File

@ -0,0 +1,12 @@
using System;
using libsecondlife;
namespace OpenSim.Framework
{
public class AvatarPickerReplyDataArgs : EventArgs
{
public LLUUID AvatarID;
public byte[] FirstName;
public byte[] LastName;
}
}

View File

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using libsecondlife;
namespace OpenSim.Framework
{
public class AvatarWearingArgs : EventArgs
{
private List<Wearable> m_nowWearing = new List<Wearable>();
/// <summary>
///
/// </summary>
public List<Wearable> 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
}
}

View File

@ -0,0 +1,118 @@
using System;
using libsecondlife;
namespace OpenSim.Framework
{
public interface IEventArgs
{
IScene Scene { get; set; }
IClientAPI Sender { get; set; }
}
/// <summary>
/// ChatFromViewer Arguments
/// </summary>
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();
}
/// <summary>
/// The message sent by the user
/// </summary>
public string Message
{
get { return m_message; }
set { m_message = value; }
}
/// <summary>
/// The type of message, eg say, shout, broadcast.
/// </summary>
public ChatTypeEnum Type
{
get { return m_type; }
set { m_type = value; }
}
/// <summary>
/// Which channel was this message sent on? Different channels may have different listeners. Public chat is on channel zero.
/// </summary>
public int Channel
{
get { return m_channel; }
set { m_channel = value; }
}
/// <summary>
/// The position of the sender at the time of the message broadcast.
/// </summary>
public LLVector3 Position
{
get { return m_position; }
set { m_position = value; }
}
/// <summary>
/// The name of the sender (needed for scripts)
/// </summary>
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
/// <summary>
/// The client responsible for sending the message, or null.
/// </summary>
public IClientAPI Sender
{
get { return m_sender; }
set { m_sender = value; }
}
/// <summary>
/// The object responsible for sending the message, or null.
/// </summary>
public object SenderObject
{
get { return m_senderObject; }
set { m_senderObject = value; }
}
public LLUUID SenderUUID
{
get { return m_fromID; }
set { m_fromID = value; }
}
/// <summary>
///
/// </summary>
public IScene Scene
{
get { return m_scene; }
set { m_scene = value; }
}
#endregion
}
}

View File

@ -0,0 +1,16 @@
namespace OpenSim.Framework
{
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
}
}

View File

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Net;
namespace OpenSim.Framework
{
[Serializable]
public class ClientInfo
{
public sAgentCircuitData agentcircuit;
public Dictionary<uint, byte[]> needAck;
public List<byte[]> out_packets;
public Dictionary<uint, uint> pendingAcks;
public EndPoint proxyEP;
public uint sequence;
public byte[] usecircuit;
public EndPoint userEP;
}
}

View File

@ -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<ViewerEffectEventHandlerArg> 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
}
/// <summary>
/// ChatFromViewer Arguments
/// </summary>
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();
}
/// <summary>
/// The message sent by the user
/// </summary>
public string Message
{
get { return m_message; }
set { m_message = value; }
}
/// <summary>
/// The type of message, eg say, shout, broadcast.
/// </summary>
public ChatTypeEnum Type
{
get { return m_type; }
set { m_type = value; }
}
/// <summary>
/// Which channel was this message sent on? Different channels may have different listeners. Public chat is on channel zero.
/// </summary>
public int Channel
{
get { return m_channel; }
set { m_channel = value; }
}
/// <summary>
/// The position of the sender at the time of the message broadcast.
/// </summary>
public LLVector3 Position
{
get { return m_position; }
set { m_position = value; }
}
/// <summary>
/// The name of the sender (needed for scripts)
/// </summary>
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
/// <summary>
/// The client responsible for sending the message, or null.
/// </summary>
public IClientAPI Sender
{
get { return m_sender; }
set { m_sender = value; }
}
/// <summary>
/// The object responsible for sending the message, or null.
/// </summary>
public object SenderObject
{
get { return m_senderObject; }
set { m_senderObject = value; }
}
public LLUUID SenderUUID
{
get { return m_fromID; }
set { m_fromID = value; }
}
/// <summary>
///
/// </summary>
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; }
}
/// <summary>
///
/// </summary>
public uint PacketNumber
{
get { return m_packetNumber; }
set { m_packetNumber = value; }
}
/// <summary>
///
/// </summary>
public sbyte DiscardLevel
{
get { return m_discardLevel; }
set { m_discardLevel = value; }
}
/// <summary>
///
/// </summary>
public LLUUID RequestedAssetID
{
get { return m_requestedAssetID; }
set { m_requestedAssetID = value; }
}
}
public class AvatarWearingArgs : EventArgs
{
private List<Wearable> m_nowWearing = new List<Wearable>();
/// <summary>
///
/// </summary>
public List<Wearable> 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<uint, byte[]> needAck;
public List<byte[]> out_packets;
public Dictionary<uint, uint> pendingAcks;
public EndPoint proxyEP;
public uint sequence;
public byte[] usecircuit;
public EndPoint userEP;
}
}

View File

@ -0,0 +1,26 @@
using System;
using libsecondlife;
namespace OpenSim.Framework
{
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;
}
}

View File

@ -0,0 +1,32 @@
using System;
using libsecondlife;
namespace OpenSim.Framework
{
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;
}
}

View File

@ -0,0 +1,24 @@
using System;
namespace OpenSim.Framework
{
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;
}
}

View File

@ -0,0 +1,13 @@
using System;
using libsecondlife;
namespace OpenSim.Framework
{
public class RequestAssetArgs : EventArgs
{
public int ChannelType;
public float Priority;
public int SourceType;
public LLUUID TransferID;
}
}

View File

@ -0,0 +1,46 @@
using System;
using libsecondlife;
namespace OpenSim.Framework
{
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; }
}
/// <summary>
///
/// </summary>
public uint PacketNumber
{
get { return m_packetNumber; }
set { m_packetNumber = value; }
}
/// <summary>
///
/// </summary>
public sbyte DiscardLevel
{
get { return m_discardLevel; }
set { m_discardLevel = value; }
}
/// <summary>
///
/// </summary>
public LLUUID RequestedAssetID
{
get { return m_requestedAssetID; }
set { m_requestedAssetID = value; }
}
}
}

View File

@ -0,0 +1,15 @@
namespace OpenSim.Framework
{
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
}
}

View File

@ -0,0 +1,27 @@
using System;
namespace OpenSim.Framework
{
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;
}
}

View File

@ -0,0 +1,15 @@
using System;
using libsecondlife;
namespace OpenSim.Framework
{
public class ViewerEffectEventHandlerArg : EventArgs
{
public LLUUID AgentID;
public byte[] Color;
public float Duration;
public LLUUID ID;
public byte Type;
public byte[] TypeData;
}
}