UserAgentData.cs 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. /*
  2. * Copyright (c) Contributors, http://opensimulator.org/
  3. * See CONTRIBUTORS.TXT for a full list of copyright holders.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions are met:
  7. * * Redistributions of source code must retain the above copyright
  8. * notice, this list of conditions and the following disclaimer.
  9. * * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * * Neither the name of the OpenSim Project nor the
  13. * names of its contributors may be used to endorse or promote products
  14. * derived from this software without specific prior written permission.
  15. *
  16. * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
  17. * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  18. * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  19. * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
  20. * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  21. * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  22. * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  23. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  24. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  25. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  26. */
  27. using System;
  28. using libsecondlife;
  29. namespace OpenSim.Framework
  30. {
  31. /// <summary>
  32. /// Information about a users session
  33. /// </summary>
  34. public class UserAgentData
  35. {
  36. /// <summary>
  37. /// The IP address of the user
  38. /// </summary>
  39. private string agentIP = String.Empty;
  40. /// <summary>
  41. /// Is the user online?
  42. /// </summary>
  43. private bool agentOnline;
  44. /// <summary>
  45. /// The port of the user
  46. /// </summary>
  47. private uint agentPort;
  48. /// <summary>
  49. /// Region handle of the current region the user is in
  50. /// </summary>
  51. private ulong currentHandle;
  52. /// <summary>
  53. /// The position of the user within the region
  54. /// </summary>
  55. private LLVector3 currentPos;
  56. /// <summary>
  57. /// Current region the user is logged into
  58. /// </summary>
  59. private LLUUID currentRegion;
  60. /// <summary>
  61. /// A unix timestamp from when the user logged in
  62. /// </summary>
  63. private int loginTime;
  64. /// <summary>
  65. /// When this agent expired and logged out, 0 if still online
  66. /// </summary>
  67. private int logoutTime;
  68. /// <summary>
  69. /// The region the user logged into initially
  70. /// </summary>
  71. private LLUUID regionID;
  72. /// <summary>
  73. /// The "secure" session ID for the user
  74. /// </summary>
  75. /// <remarks>Not very secure. Dont rely on it for anything more than Linden Lab does.</remarks>
  76. private LLUUID secureSessionID;
  77. /// <summary>
  78. /// The session ID for the user (also the agent ID)
  79. /// </summary>
  80. private LLUUID sessionID;
  81. /// <summary>
  82. /// The UUID of the users avatar (not the agent!)
  83. /// </summary>
  84. private LLUUID UUID;
  85. public LLUUID ProfileID
  86. {
  87. get { return UUID; }
  88. set { UUID = value; }
  89. }
  90. public string AgentIP
  91. {
  92. get { return agentIP; }
  93. set { agentIP = value; }
  94. }
  95. public uint AgentPort
  96. {
  97. get { return agentPort; }
  98. set { agentPort = value; }
  99. }
  100. public bool AgentOnline
  101. {
  102. get { return agentOnline; }
  103. set { agentOnline = value; }
  104. }
  105. public LLUUID SessionID
  106. {
  107. get { return sessionID; }
  108. set { sessionID = value; }
  109. }
  110. public LLUUID SecureSessionID
  111. {
  112. get { return secureSessionID; }
  113. set { secureSessionID = value; }
  114. }
  115. public LLUUID InitialRegion
  116. {
  117. get { return regionID; }
  118. set { regionID = value; }
  119. }
  120. public int LoginTime
  121. {
  122. get { return loginTime; }
  123. set { loginTime = value; }
  124. }
  125. public int LogoutTime
  126. {
  127. get { return logoutTime; }
  128. set { logoutTime = value; }
  129. }
  130. public LLUUID Region
  131. {
  132. get { return currentRegion; }
  133. set { currentRegion = value; }
  134. }
  135. public ulong Handle
  136. {
  137. get { return currentHandle; }
  138. set { currentHandle = value; }
  139. }
  140. public LLVector3 Position
  141. {
  142. get { return currentPos; }
  143. set { currentPos = value; }
  144. }
  145. public float PositionX
  146. {
  147. get { return currentPos.X; }
  148. set { currentPos.X = value; }
  149. }
  150. public float PositionY
  151. {
  152. get { return currentPos.Y; }
  153. set { currentPos.Y = value; }
  154. }
  155. public float PositionZ
  156. {
  157. get { return currentPos.Z; }
  158. set { currentPos.Z = value; }
  159. }
  160. }
  161. }