From 50f29752f5888ac194a5146c475720c29ae3f172 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Thu, 13 Aug 2009 11:48:39 +0900 Subject: Formatting cleanup. Add copyright headers. --- OpenSim/Framework/Servers/BaseOpenSimServer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 2a97528..7a244ff 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs @@ -443,7 +443,7 @@ namespace OpenSim.Framework.Servers string inputLine; int strcmp; - if (File.Exists( gitCommitFileName)) + if (File.Exists(gitCommitFileName)) { StreamReader CommitFile = File.OpenText(gitCommitFileName); buildVersion = Environment.NewLine + "git# " + CommitFile.ReadLine(); -- cgit v1.1 From 18634e9dd8464ee7514587d0645e38f529f0bb3e Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Wed, 12 Aug 2009 23:18:00 -0400 Subject: minor: comments --- OpenSim/Framework/ACL.cs | 19 ++++++++++ OpenSim/Framework/AgentCircuitData.cs | 68 +++++++++++++++++++++++++++++++++++ OpenSim/Framework/AgentUpdateArgs.cs | 34 ++++++++++++++++++ 3 files changed, 121 insertions(+) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/ACL.cs b/OpenSim/Framework/ACL.cs index 9d7827e..3b1c0f0 100644 --- a/OpenSim/Framework/ACL.cs +++ b/OpenSim/Framework/ACL.cs @@ -46,6 +46,11 @@ namespace OpenSim.Framework private Dictionary Resources = new Dictionary(); private Dictionary Roles = new Dictionary(); + /// + /// Adds a new role + /// + /// + /// public ACL AddRole(Role role) { if (Roles.ContainsKey(role.Name)) @@ -56,6 +61,11 @@ namespace OpenSim.Framework return this; } + /// + /// Adds a new resource + /// + /// + /// public ACL AddResource(Resource resource) { Resources.Add(resource.Name, resource); @@ -63,6 +73,12 @@ namespace OpenSim.Framework return this; } + /// + /// Permision for user/roll on a resource + /// + /// + /// + /// public Permission HasPermission(string role, string resource) { if (!Roles.ContainsKey(role)) @@ -234,6 +250,9 @@ namespace OpenSim.Framework #region Tests + /// + /// ACL Test class + /// internal class ACLTester { public ACLTester() diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs index c38f0c3..6472f31 100644 --- a/OpenSim/Framework/AgentCircuitData.cs +++ b/OpenSim/Framework/AgentCircuitData.cs @@ -32,26 +32,83 @@ using OpenMetaverse.StructuredData; namespace OpenSim.Framework { + /// + /// Circuit data for an agent. Connection information shared between + /// regions that accept UDP connections from a client + /// public class AgentCircuitData { + /// + /// Avatar Unique Agent Identifier + /// public UUID AgentID; + + /// + /// Avatar's Appearance + /// public AvatarAppearance Appearance; + + /// + /// Agent's root inventory folder + /// public UUID BaseFolder; + + /// + /// Base Caps path for user + /// public string CapsPath = String.Empty; + + /// + /// Seed caps for neighbor regions that the user can see into + /// public Dictionary ChildrenCapSeeds; + + /// + /// Root agent, or Child agent + /// public bool child; + + /// + /// Number given to the client when they log-in that they provide + /// as credentials to the UDP server + /// public uint circuitcode; + + /// + /// Agent's account first name + /// public string firstname; public UUID InventoryFolder; + + /// + /// Agent's account last name + /// public string lastname; + + /// + /// Random Unique GUID for this session. Client gets this at login and it's + /// only supposed to be disclosed over secure channels + /// public UUID SecureSessionID; + + /// + /// Non secure Session ID + /// public UUID SessionID; + + /// + /// Position the Agent's Avatar starts in the region + /// public Vector3 startpos; public AgentCircuitData() { } + /// + /// Create AgentCircuitData from a Serializable AgentCircuitData + /// + /// public AgentCircuitData(sAgentCircuitData cAgent) { AgentID = new UUID(cAgent.AgentID); @@ -68,6 +125,10 @@ namespace OpenSim.Framework ChildrenCapSeeds = cAgent.ChildrenCapSeeds; } + /// + /// Pack AgentCircuitData into an OSDMap for transmission over LLSD XML or LLSD json + /// + /// map of the agent circuit data public OSDMap PackAgentCircuitData() { OSDMap args = new OSDMap(); @@ -98,6 +159,10 @@ namespace OpenSim.Framework return args; } + /// + /// Unpack agent circuit data map into an AgentCiruitData object + /// + /// public void UnpackAgentCircuitData(OSDMap args) { if (args["agent_id"] != null) @@ -150,6 +215,9 @@ namespace OpenSim.Framework } } + /// + /// Serializable Agent Circuit Data + /// [Serializable] public class sAgentCircuitData { diff --git a/OpenSim/Framework/AgentUpdateArgs.cs b/OpenSim/Framework/AgentUpdateArgs.cs index a19795d..7b9ec68 100644 --- a/OpenSim/Framework/AgentUpdateArgs.cs +++ b/OpenSim/Framework/AgentUpdateArgs.cs @@ -30,18 +30,52 @@ using OpenMetaverse; namespace OpenSim.Framework { + /// + /// Client provided parameters for avatar movement + /// public class AgentUpdateArgs : EventArgs { + /// + /// Agent's unique ID + /// public UUID AgentID; + + /// + /// Rotation of the avatar's body + /// public Quaternion BodyRotation; + + /// + /// AT portion of the camera matrix + /// public Vector3 CameraAtAxis; + + /// + /// Position of the camera in the Scene + /// public Vector3 CameraCenter; public Vector3 CameraLeftAxis; public Vector3 CameraUpAxis; + + /// + /// Bitflag field for agent movement. Fly, forward, backward, turn left, turn right, go up, go down, Straffe, etc. + /// public uint ControlFlags; + + /// + /// Agent's client Draw distance setting + /// public float Far; public byte Flags; + + /// + /// Rotation of the avatar's head + /// public Quaternion HeadRotation; + + /// + /// Session Id + /// public UUID SessionID; public byte State; } -- cgit v1.1 From 0a85d1d767d5ab3b37a3a1a797be843d0b54780e Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Wed, 12 Aug 2009 23:34:12 -0400 Subject: minor:comments --- OpenSim/Framework/Animation.cs | 30 ++++++++++++++++++++++ OpenSim/Framework/AssetBase.cs | 29 ++++++++++++++++++++- OpenSim/Framework/AvatarAppearance.cs | 7 +++-- OpenSim/Framework/AvatarPickerAvatar.cs | 14 ++++++++++ .../Framework/AvatarPickerReplyAgentDataArgs.cs | 10 ++++++++ OpenSim/Framework/Culture.cs | 3 +++ OpenSim/Framework/LandData.cs | 3 +++ 7 files changed, 91 insertions(+), 5 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Animation.cs b/OpenSim/Framework/Animation.cs index 9f86513..232f5a1 100644 --- a/OpenSim/Framework/Animation.cs +++ b/OpenSim/Framework/Animation.cs @@ -31,10 +31,17 @@ using OpenMetaverse.StructuredData; namespace OpenSim.Framework { + /// + /// Information about an Animation + /// [Serializable] public class Animation { private UUID animID; + + /// + /// ID of Animation + /// public UUID AnimID { get { return animID; } @@ -49,6 +56,10 @@ namespace OpenSim.Framework } private UUID objectID; + + /// + /// Unique ID of object that is being animated + /// public UUID ObjectID { get { return objectID; } @@ -59,6 +70,12 @@ namespace OpenSim.Framework { } + /// + /// Creates an Animation based on the data + /// + /// UUID ID of animation + /// + /// ID of object to be animated public Animation(UUID animID, int sequenceNum, UUID objectID) { this.animID = animID; @@ -66,11 +83,20 @@ namespace OpenSim.Framework this.objectID = objectID; } + /// + /// Animation from OSDMap from LLSD XML or LLSD json + /// + /// public Animation(OSDMap args) { UnpackUpdateMessage(args); } + + /// + /// Pack this object up as an OSDMap for transferring via LLSD XML or LLSD json + /// + /// public OSDMap PackUpdateMessage() { OSDMap anim = new OSDMap(); @@ -80,6 +106,10 @@ namespace OpenSim.Framework return anim; } + /// + /// Fill object with data from OSDMap + /// + /// public void UnpackUpdateMessage(OSDMap args) { if (args["animation"] != null) diff --git a/OpenSim/Framework/AssetBase.cs b/OpenSim/Framework/AssetBase.cs index 614670c..9679ff2 100644 --- a/OpenSim/Framework/AssetBase.cs +++ b/OpenSim/Framework/AssetBase.cs @@ -31,10 +31,20 @@ using OpenMetaverse; namespace OpenSim.Framework { + /// + /// Asset class. All Assets are reference by this class or a class derived from this class + /// [Serializable] public class AssetBase { + /// + /// Data of the Asset + /// private byte[] m_data; + + /// + /// Meta Data of the Asset + /// private AssetMetadata m_metadata; public AssetBase() @@ -71,6 +81,9 @@ namespace OpenSim.Framework } + /// + /// Checks if this asset is a binary or text asset + /// public bool IsBinaryAsset { get @@ -102,12 +115,17 @@ namespace OpenSim.Framework set { m_data = value; } } + /// + /// Asset UUID + /// public UUID FullID { get { return m_metadata.FullID; } set { m_metadata.FullID = value; } } - + /// + /// Asset MetaData ID (transferring from UUID to string ID) + /// public string ID { get { return m_metadata.ID; } @@ -126,18 +144,27 @@ namespace OpenSim.Framework set { m_metadata.Description = value; } } + /// + /// (sbyte) AssetType enum + /// public sbyte Type { get { return m_metadata.Type; } set { m_metadata.Type = value; } } + /// + /// Is this a region only asset, or does this exist on the asset server also + /// public bool Local { get { return m_metadata.Local; } set { m_metadata.Local = value; } } + /// + /// Is this asset going to be saved to the asset database? + /// public bool Temporary { get { return m_metadata.Temporary; } diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 6a07bc9..7270f32 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs @@ -28,14 +28,13 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Runtime.Serialization; -using System.Security.Permissions; using OpenMetaverse; -using log4net; -using System.Reflection; namespace OpenSim.Framework { + /// + /// Contains the Avatar's Appearance and methods to manipulate the appearance. + /// public class AvatarAppearance { //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); diff --git a/OpenSim/Framework/AvatarPickerAvatar.cs b/OpenSim/Framework/AvatarPickerAvatar.cs index 0e8602d..200c054 100644 --- a/OpenSim/Framework/AvatarPickerAvatar.cs +++ b/OpenSim/Framework/AvatarPickerAvatar.cs @@ -29,10 +29,24 @@ using OpenMetaverse; namespace OpenSim.Framework { + /// + /// Avatar returned by the Avatar Picker request + /// public class AvatarPickerAvatar { + /// + /// Avatar's Unique ID + /// public UUID AvatarID; + + /// + /// Avatar's Account first name + /// public string firstName; + + /// + /// Avatar's Account last name + /// public string lastName; } } diff --git a/OpenSim/Framework/AvatarPickerReplyAgentDataArgs.cs b/OpenSim/Framework/AvatarPickerReplyAgentDataArgs.cs index 8fd21d7..54835da 100644 --- a/OpenSim/Framework/AvatarPickerReplyAgentDataArgs.cs +++ b/OpenSim/Framework/AvatarPickerReplyAgentDataArgs.cs @@ -30,9 +30,19 @@ using OpenMetaverse; namespace OpenSim.Framework { + /// + /// Args to return to a client that queries picker data + /// public class AvatarPickerReplyAgentDataArgs : EventArgs { + /// + /// Unique Agent ID + /// public UUID AgentID; + + /// + /// ID of query user submitted + /// public UUID QueryID; } } diff --git a/OpenSim/Framework/Culture.cs b/OpenSim/Framework/Culture.cs index c76841d..2066794 100644 --- a/OpenSim/Framework/Culture.cs +++ b/OpenSim/Framework/Culture.cs @@ -45,6 +45,9 @@ namespace OpenSim.Framework get { return m_cultureInfo; } } + /// + /// Set Culture to en-US to make string processing of numbers simpler. + /// public static void SetCurrentCulture() { Thread.CurrentThread.CurrentCulture = m_cultureInfo; diff --git a/OpenSim/Framework/LandData.cs b/OpenSim/Framework/LandData.cs index d6afb95..94c0d3b 100644 --- a/OpenSim/Framework/LandData.cs +++ b/OpenSim/Framework/LandData.cs @@ -31,6 +31,9 @@ using OpenMetaverse; namespace OpenSim.Framework { + /// + /// Details of a Parcel of land + /// public class LandData { private Vector3 _AABBMax = new Vector3(); -- cgit v1.1