aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/UserProfileData.cs
diff options
context:
space:
mode:
authorlbsa712007-10-31 07:28:23 +0000
committerlbsa712007-10-31 07:28:23 +0000
commit064404ab409ddd0a3b25027a98582696295c46fd (patch)
treebd84ec2e23930f76e7cc81c8529ef71936c86dd9 /OpenSim/Framework/UserProfileData.cs
parentmade illogical bitwise operations logical (diff)
downloadopensim-SC_OLD-064404ab409ddd0a3b25027a98582696295c46fd.zip
opensim-SC_OLD-064404ab409ddd0a3b25027a98582696295c46fd.tar.gz
opensim-SC_OLD-064404ab409ddd0a3b25027a98582696295c46fd.tar.bz2
opensim-SC_OLD-064404ab409ddd0a3b25027a98582696295c46fd.tar.xz
* Moved OpenSim/Framework/General to OpenSim/Framework for great justice.
Diffstat (limited to 'OpenSim/Framework/UserProfileData.cs')
-rw-r--r--OpenSim/Framework/UserProfileData.cs214
1 files changed, 214 insertions, 0 deletions
diff --git a/OpenSim/Framework/UserProfileData.cs b/OpenSim/Framework/UserProfileData.cs
new file mode 100644
index 0000000..d10aa36
--- /dev/null
+++ b/OpenSim/Framework/UserProfileData.cs
@@ -0,0 +1,214 @@
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*/
28using System;
29using libsecondlife;
30
31namespace OpenSim.Framework
32{
33 /// <summary>
34 /// Information about a particular user known to the userserver
35 /// </summary>
36 public class UserProfileData
37 {
38 /// <summary>
39 /// The ID value for this user
40 /// </summary>
41 public LLUUID UUID;
42
43 /// <summary>
44 /// The first component of a users account name
45 /// </summary>
46 public string username;
47
48 /// <summary>
49 /// The second component of a users account name
50 /// </summary>
51 public string surname;
52
53 /// <summary>
54 /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt)
55 /// </summary>
56 /// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks>
57 public string passwordHash;
58
59 /// <summary>
60 /// The salt used for the users hash, should be 32 bytes or longer
61 /// </summary>
62 public string passwordSalt;
63
64 /// <summary>
65 /// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into
66 /// </summary>
67 public ulong homeRegion
68 {
69 get { return Helpers.UIntsToLong((homeRegionX*256), (homeRegionY*256)); }
70 set
71 {
72 homeRegionX = (uint) (value >> 40);
73 homeRegionY = (((uint) (value)) >> 8);
74 }
75 }
76
77 public uint homeRegionX;
78 public uint homeRegionY;
79
80 /// <summary>
81 /// The coordinates inside the region of the home location
82 /// </summary>
83 public LLVector3 homeLocation;
84
85 /// <summary>
86 /// Where the user will be looking when they rez.
87 /// </summary>
88 public LLVector3 homeLookAt;
89
90 /// <summary>
91 /// A UNIX Timestamp (seconds since epoch) for the users creation
92 /// </summary>
93 public int created;
94
95 /// <summary>
96 /// A UNIX Timestamp for the users last login date / time
97 /// </summary>
98 public int lastLogin;
99
100 public LLUUID rootInventoryFolderID;
101
102 /// <summary>
103 /// A URI to the users inventory server, used for foreigners and large grids
104 /// </summary>
105 public string userInventoryURI = String.Empty;
106
107 /// <summary>
108 /// A URI to the users asset server, used for foreigners and large grids.
109 /// </summary>
110 public string userAssetURI = String.Empty;
111
112 /// <summary>
113 /// A uint mask containing the "I can do" fields of the users profile
114 /// </summary>
115 public uint profileCanDoMask;
116
117 /// <summary>
118 /// A uint mask containing the "I want to do" part of the users profile
119 /// </summary>
120 public uint profileWantDoMask; // Profile window "I want to" mask
121
122 /// <summary>
123 /// The about text listed in a users profile.
124 /// </summary>
125 public string profileAboutText = String.Empty;
126
127 /// <summary>
128 /// The first life about text listed in a users profile
129 /// </summary>
130 public string profileFirstText = String.Empty;
131
132 /// <summary>
133 /// The profile image for an avatar stored on the asset server
134 /// </summary>
135 public LLUUID profileImage;
136
137 /// <summary>
138 /// The profile image for the users first life tab
139 /// </summary>
140 public LLUUID profileFirstImage;
141
142 /// <summary>
143 /// The users last registered agent (filled in on the user server)
144 /// </summary>
145 public UserAgentData currentAgent;
146 }
147
148 /// <summary>
149 /// Information about a users session
150 /// </summary>
151 public class UserAgentData
152 {
153 /// <summary>
154 /// The UUID of the users avatar (not the agent!)
155 /// </summary>
156 public LLUUID UUID;
157
158 /// <summary>
159 /// The IP address of the user
160 /// </summary>
161 public string agentIP = String.Empty;
162
163 /// <summary>
164 /// The port of the user
165 /// </summary>
166 public uint agentPort;
167
168 /// <summary>
169 /// Is the user online?
170 /// </summary>
171 public bool agentOnline;
172
173 /// <summary>
174 /// The session ID for the user (also the agent ID)
175 /// </summary>
176 public LLUUID sessionID;
177
178 /// <summary>
179 /// The "secure" session ID for the user
180 /// </summary>
181 /// <remarks>Not very secure. Dont rely on it for anything more than Linden Lab does.</remarks>
182 public LLUUID secureSessionID;
183
184 /// <summary>
185 /// The region the user logged into initially
186 /// </summary>
187 public LLUUID regionID;
188
189 /// <summary>
190 /// A unix timestamp from when the user logged in
191 /// </summary>
192 public int loginTime;
193
194 /// <summary>
195 /// When this agent expired and logged out, 0 if still online
196 /// </summary>
197 public int logoutTime;
198
199 /// <summary>
200 /// Current region the user is logged into
201 /// </summary>
202 public LLUUID currentRegion;
203
204 /// <summary>
205 /// Region handle of the current region the user is in
206 /// </summary>
207 public ulong currentHandle;
208
209 /// <summary>
210 /// The position of the user within the region
211 /// </summary>
212 public LLVector3 currentPos;
213 }
214} \ No newline at end of file