minor: comments

arthursv
Teravus Ovares (Dan Olivares) 2009-08-12 23:18:00 -04:00
parent 6c1adbf9a5
commit 18634e9dd8
4 changed files with 127 additions and 0 deletions

View File

@ -41,12 +41,18 @@ using OpenSim.Region.Framework.Interfaces;
namespace OpenSim.Client.Linden namespace OpenSim.Client.Linden
{ {
/// <summary>
/// Linden UDP Stack Region Module
/// </summary>
public class LLClientStackModule : INonSharedRegionModule public class LLClientStackModule : INonSharedRegionModule
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
#region IRegionModule Members #region IRegionModule Members
/// <summary>
/// Scene that contains the region's data
/// </summary>
protected Scene m_scene; protected Scene m_scene;
protected bool m_createClientStack = false; protected bool m_createClientStack = false;
protected IClientNetworkServer m_clientServer; protected IClientNetworkServer m_clientServer;

View File

@ -46,6 +46,11 @@ namespace OpenSim.Framework
private Dictionary<string, Resource> Resources = new Dictionary<string, Resource>(); private Dictionary<string, Resource> Resources = new Dictionary<string, Resource>();
private Dictionary<string, Role> Roles = new Dictionary<string, Role>(); private Dictionary<string, Role> Roles = new Dictionary<string, Role>();
/// <summary>
/// Adds a new role
/// </summary>
/// <param name="role"></param>
/// <returns></returns>
public ACL AddRole(Role role) public ACL AddRole(Role role)
{ {
if (Roles.ContainsKey(role.Name)) if (Roles.ContainsKey(role.Name))
@ -56,6 +61,11 @@ namespace OpenSim.Framework
return this; return this;
} }
/// <summary>
/// Adds a new resource
/// </summary>
/// <param name="resource"></param>
/// <returns></returns>
public ACL AddResource(Resource resource) public ACL AddResource(Resource resource)
{ {
Resources.Add(resource.Name, resource); Resources.Add(resource.Name, resource);
@ -63,6 +73,12 @@ namespace OpenSim.Framework
return this; return this;
} }
/// <summary>
/// Permision for user/roll on a resource
/// </summary>
/// <param name="role"></param>
/// <param name="resource"></param>
/// <returns></returns>
public Permission HasPermission(string role, string resource) public Permission HasPermission(string role, string resource)
{ {
if (!Roles.ContainsKey(role)) if (!Roles.ContainsKey(role))
@ -234,6 +250,9 @@ namespace OpenSim.Framework
#region Tests #region Tests
/// <summary>
/// ACL Test class
/// </summary>
internal class ACLTester internal class ACLTester
{ {
public ACLTester() public ACLTester()

View File

@ -32,26 +32,83 @@ using OpenMetaverse.StructuredData;
namespace OpenSim.Framework namespace OpenSim.Framework
{ {
/// <summary>
/// Circuit data for an agent. Connection information shared between
/// regions that accept UDP connections from a client
/// </summary>
public class AgentCircuitData public class AgentCircuitData
{ {
/// <summary>
/// Avatar Unique Agent Identifier
/// </summary>
public UUID AgentID; public UUID AgentID;
/// <summary>
/// Avatar's Appearance
/// </summary>
public AvatarAppearance Appearance; public AvatarAppearance Appearance;
/// <summary>
/// Agent's root inventory folder
/// </summary>
public UUID BaseFolder; public UUID BaseFolder;
/// <summary>
/// Base Caps path for user
/// </summary>
public string CapsPath = String.Empty; public string CapsPath = String.Empty;
/// <summary>
/// Seed caps for neighbor regions that the user can see into
/// </summary>
public Dictionary<ulong, string> ChildrenCapSeeds; public Dictionary<ulong, string> ChildrenCapSeeds;
/// <summary>
/// Root agent, or Child agent
/// </summary>
public bool child; public bool child;
/// <summary>
/// Number given to the client when they log-in that they provide
/// as credentials to the UDP server
/// </summary>
public uint circuitcode; public uint circuitcode;
/// <summary>
/// Agent's account first name
/// </summary>
public string firstname; public string firstname;
public UUID InventoryFolder; public UUID InventoryFolder;
/// <summary>
/// Agent's account last name
/// </summary>
public string lastname; public string lastname;
/// <summary>
/// Random Unique GUID for this session. Client gets this at login and it's
/// only supposed to be disclosed over secure channels
/// </summary>
public UUID SecureSessionID; public UUID SecureSessionID;
/// <summary>
/// Non secure Session ID
/// </summary>
public UUID SessionID; public UUID SessionID;
/// <summary>
/// Position the Agent's Avatar starts in the region
/// </summary>
public Vector3 startpos; public Vector3 startpos;
public AgentCircuitData() public AgentCircuitData()
{ {
} }
/// <summary>
/// Create AgentCircuitData from a Serializable AgentCircuitData
/// </summary>
/// <param name="cAgent"></param>
public AgentCircuitData(sAgentCircuitData cAgent) public AgentCircuitData(sAgentCircuitData cAgent)
{ {
AgentID = new UUID(cAgent.AgentID); AgentID = new UUID(cAgent.AgentID);
@ -68,6 +125,10 @@ namespace OpenSim.Framework
ChildrenCapSeeds = cAgent.ChildrenCapSeeds; ChildrenCapSeeds = cAgent.ChildrenCapSeeds;
} }
/// <summary>
/// Pack AgentCircuitData into an OSDMap for transmission over LLSD XML or LLSD json
/// </summary>
/// <returns>map of the agent circuit data</returns>
public OSDMap PackAgentCircuitData() public OSDMap PackAgentCircuitData()
{ {
OSDMap args = new OSDMap(); OSDMap args = new OSDMap();
@ -98,6 +159,10 @@ namespace OpenSim.Framework
return args; return args;
} }
/// <summary>
/// Unpack agent circuit data map into an AgentCiruitData object
/// </summary>
/// <param name="args"></param>
public void UnpackAgentCircuitData(OSDMap args) public void UnpackAgentCircuitData(OSDMap args)
{ {
if (args["agent_id"] != null) if (args["agent_id"] != null)
@ -150,6 +215,9 @@ namespace OpenSim.Framework
} }
} }
/// <summary>
/// Serializable Agent Circuit Data
/// </summary>
[Serializable] [Serializable]
public class sAgentCircuitData public class sAgentCircuitData
{ {

View File

@ -30,18 +30,52 @@ using OpenMetaverse;
namespace OpenSim.Framework namespace OpenSim.Framework
{ {
/// <summary>
/// Client provided parameters for avatar movement
/// </summary>
public class AgentUpdateArgs : EventArgs public class AgentUpdateArgs : EventArgs
{ {
/// <summary>
/// Agent's unique ID
/// </summary>
public UUID AgentID; public UUID AgentID;
/// <summary>
/// Rotation of the avatar's body
/// </summary>
public Quaternion BodyRotation; public Quaternion BodyRotation;
/// <summary>
/// AT portion of the camera matrix
/// </summary>
public Vector3 CameraAtAxis; public Vector3 CameraAtAxis;
/// <summary>
/// Position of the camera in the Scene
/// </summary>
public Vector3 CameraCenter; public Vector3 CameraCenter;
public Vector3 CameraLeftAxis; public Vector3 CameraLeftAxis;
public Vector3 CameraUpAxis; public Vector3 CameraUpAxis;
/// <summary>
/// Bitflag field for agent movement. Fly, forward, backward, turn left, turn right, go up, go down, Straffe, etc.
/// </summary>
public uint ControlFlags; public uint ControlFlags;
/// <summary>
/// Agent's client Draw distance setting
/// </summary>
public float Far; public float Far;
public byte Flags; public byte Flags;
/// <summary>
/// Rotation of the avatar's head
/// </summary>
public Quaternion HeadRotation; public Quaternion HeadRotation;
/// <summary>
/// Session Id
/// </summary>
public UUID SessionID; public UUID SessionID;
public byte State; public byte State;
} }