clockwerk-opensim-stable – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 vero 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 OpenSimulator 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  
28 using System;
29 using OpenMetaverse;
30  
31 namespace 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 /// A UNIX Timestamp (seconds since epoch) for the users creation
40 /// </summary>
41 private int m_created;
42  
43 /// <summary>
44 /// The users last registered agent (filled in on the user server)
45 /// </summary>
46 private UserAgentData m_currentAgent;
47  
48 /// <summary>
49 /// The first component of a users account name
50 /// </summary>
51 private string m_firstname;
52  
53 /// <summary>
54 /// The coordinates inside the region of the home location
55 /// </summary>
56 private Vector3 m_homeLocation;
57  
58 /// <summary>
59 /// Where the user will be looking when they rez.
60 /// </summary>
61 private Vector3 m_homeLookAt;
62  
63 private uint m_homeRegionX;
64 private uint m_homeRegionY;
65  
66 /// <summary>
67 /// The ID value for this user
68 /// </summary>
69 private UUID m_id;
70  
71 /// <summary>
72 /// A UNIX Timestamp for the users last login date / time
73 /// </summary>
74 private int m_lastLogin;
75  
76 /// <summary>
77 /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt)
78 /// </summary>
79 /// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks>
80 private string m_passwordHash;
81  
82 /// <summary>
83 /// The salt used for the users hash, should be 32 bytes or longer
84 /// </summary>
85 private string m_passwordSalt;
86  
87 /// <summary>
88 /// The about text listed in a users profile.
89 /// </summary>
90 private string m_profileAboutText = String.Empty;
91  
92 /// <summary>
93 /// A uint mask containing the "I can do" fields of the users profile
94 /// </summary>
95 private uint m_profileCanDoMask;
96  
97 /// <summary>
98 /// The profile image for the users first life tab
99 /// </summary>
100 private UUID m_profileFirstImage;
101  
102 /// <summary>
103 /// The first life about text listed in a users profile
104 /// </summary>
105 private string m_profileFirstText = String.Empty;
106  
107 /// <summary>
108 /// The profile image for an avatar stored on the asset server
109 /// </summary>
110 private UUID m_profileImage;
111  
112 /// <summary>
113 /// A uint mask containing the "I want to do" part of the users profile
114 /// </summary>
115 private uint m_profileWantDoMask; // Profile window "I want to" mask
116  
117 /// <summary>
118 /// The profile url for an avatar
119 /// </summary>
120 private string m_profileUrl;
121  
122 /// <summary>
123 /// The second component of a users account name
124 /// </summary>
125 private string m_surname;
126  
127 /// <summary>
128 /// A valid email address for the account. Useful for password reset requests.
129 /// </summary>
130 private string m_email = String.Empty;
131  
132 /// <summary>
133 /// A URI to the users asset server, used for foreigners and large grids.
134 /// </summary>
135 private string m_userAssetUri = String.Empty;
136  
137 /// <summary>
138 /// A URI to the users inventory server, used for foreigners and large grids
139 /// </summary>
140 private string m_userInventoryUri = String.Empty;
141  
142 /// <summary>
143 /// The last used Web_login_key
144 /// </summary>
145 private UUID m_webLoginKey;
146  
147 // Data for estates and other goodies
148 // to get away from per-machine configs a little
149 //
150 private int m_userFlags;
151 private int m_godLevel;
152 private string m_customType;
153 private UUID m_partner;
154  
155 /// <summary>
156 /// The regionhandle of the users preferred home region. If
157 /// multiple sims occupy the same spot, the grid may decide
158 /// which region the user logs into
159 /// </summary>
160 public virtual ulong HomeRegion
161 {
162 get
163 {
164 return Utils.UIntsToLong(
165 m_homeRegionX * (uint)Constants.RegionSize, m_homeRegionY * (uint)Constants.RegionSize);
166 }
167  
168 set
169 {
170 m_homeRegionX = (uint) (value >> 40);
171 m_homeRegionY = (((uint) (value)) >> 8);
172 }
173 }
174  
175 private UUID m_homeRegionId;
176 /// <summary>
177 /// The regionID of the users home region. This is unique;
178 /// even if the position of the region changes within the
179 /// grid, this will refer to the same region.
180 /// </summary>
181 public UUID HomeRegionID
182 {
183 get { return m_homeRegionId; }
184 set { m_homeRegionId = value; }
185 }
186  
187 // Property wrappers
188 public UUID ID
189 {
190 get { return m_id; }
191 set { m_id = value; }
192 }
193  
194 public UUID WebLoginKey
195 {
196 get { return m_webLoginKey; }
197 set { m_webLoginKey = value; }
198 }
199  
200 public string FirstName
201 {
202 get { return m_firstname; }
203 set { m_firstname = value; }
204 }
205  
206 public string SurName
207 {
208 get { return m_surname; }
209 set { m_surname = value; }
210 }
211  
212 /// <value>
213 /// The concatentation of the various name components.
214 /// </value>
215 public string Name
216 {
217 get { return String.Format("{0} {1}", m_firstname, m_surname); }
218 }
219  
220 public string Email
221 {
222 get { return m_email; }
223 set { m_email = value; }
224 }
225  
226 public string PasswordHash
227 {
228 get { return m_passwordHash; }
229 set { m_passwordHash = value; }
230 }
231  
232 public string PasswordSalt
233 {
234 get { return m_passwordSalt; }
235 set { m_passwordSalt = value; }
236 }
237  
238 public uint HomeRegionX
239 {
240 get { return m_homeRegionX; }
241 set { m_homeRegionX = value; }
242 }
243  
244 public uint HomeRegionY
245 {
246 get { return m_homeRegionY; }
247 set { m_homeRegionY = value; }
248 }
249  
250 public Vector3 HomeLocation
251 {
252 get { return m_homeLocation; }
253 set { m_homeLocation = value; }
254 }
255  
256 // for handy serialization
257 public float HomeLocationX
258 {
259 get { return m_homeLocation.X; }
260 set { m_homeLocation.X = value; }
261 }
262  
263 public float HomeLocationY
264 {
265 get { return m_homeLocation.Y; }
266 set { m_homeLocation.Y = value; }
267 }
268  
269 public float HomeLocationZ
270 {
271 get { return m_homeLocation.Z; }
272 set { m_homeLocation.Z = value; }
273 }
274  
275  
276 public Vector3 HomeLookAt
277 {
278 get { return m_homeLookAt; }
279 set { m_homeLookAt = value; }
280 }
281  
282 // for handy serialization
283 public float HomeLookAtX
284 {
285 get { return m_homeLookAt.X; }
286 set { m_homeLookAt.X = value; }
287 }
288  
289 public float HomeLookAtY
290 {
291 get { return m_homeLookAt.Y; }
292 set { m_homeLookAt.Y = value; }
293 }
294  
295 public float HomeLookAtZ
296 {
297 get { return m_homeLookAt.Z; }
298 set { m_homeLookAt.Z = value; }
299 }
300  
301 public int Created
302 {
303 get { return m_created; }
304 set { m_created = value; }
305 }
306  
307 public int LastLogin
308 {
309 get { return m_lastLogin; }
310 set { m_lastLogin = value; }
311 }
312  
313 public string UserInventoryURI
314 {
315 get { return m_userInventoryUri; }
316 set { m_userInventoryUri = value; }
317 }
318  
319 public string UserAssetURI
320 {
321 get { return m_userAssetUri; }
322 set { m_userAssetUri = value; }
323 }
324  
325 public uint CanDoMask
326 {
327 get { return m_profileCanDoMask; }
328 set { m_profileCanDoMask = value; }
329 }
330  
331 public uint WantDoMask
332 {
333 get { return m_profileWantDoMask; }
334 set { m_profileWantDoMask = value; }
335 }
336  
337 public string AboutText
338 {
339 get { return m_profileAboutText; }
340 set { m_profileAboutText = value; }
341 }
342  
343 public string FirstLifeAboutText
344 {
345 get { return m_profileFirstText; }
346 set { m_profileFirstText = value; }
347 }
348  
349 public string ProfileUrl
350 {
351 get { return m_profileUrl; }
352 set { m_profileUrl = value; }
353 }
354  
355 public UUID Image
356 {
357 get { return m_profileImage; }
358 set { m_profileImage = value; }
359 }
360  
361 public UUID FirstLifeImage
362 {
363 get { return m_profileFirstImage; }
364 set { m_profileFirstImage = value; }
365 }
366  
367 public UserAgentData CurrentAgent
368 {
369 get { return m_currentAgent; }
370 set { m_currentAgent = value; }
371 }
372  
373 public int UserFlags
374 {
375 get { return m_userFlags; }
376 set { m_userFlags = value; }
377 }
378  
379 public int GodLevel
380 {
381 get { return m_godLevel; }
382 set { m_godLevel = value; }
383 }
384  
385 public string CustomType
386 {
387 get { return m_customType; }
388 set { m_customType = value; }
389 }
390  
391 public UUID Partner
392 {
393 get { return m_partner; }
394 set { m_partner = value; }
395 }
396 }
397 }