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