OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
UserProfileData.cs
Go to the documentation of this file.
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 {
36  public class UserProfileData
37  {
41  private int m_created;
42 
46  private UserAgentData m_currentAgent;
47 
51  private string m_firstname;
52 
56  private Vector3 m_homeLocation;
57 
61  private Vector3 m_homeLookAt;
62 
63  private uint m_homeRegionX;
64  private uint m_homeRegionY;
65 
69  private UUID m_id;
70 
74  private int m_lastLogin;
75 
80  private string m_passwordHash;
81 
85  private string m_passwordSalt;
86 
90  private string m_profileAboutText = String.Empty;
91 
95  private uint m_profileCanDoMask;
96 
100  private UUID m_profileFirstImage;
101 
105  private string m_profileFirstText = String.Empty;
106 
110  private UUID m_profileImage;
111 
115  private uint m_profileWantDoMask; // Profile window "I want to" mask
116 
120  private string m_profileUrl;
121 
125  private string m_surname;
126 
130  private string m_email = String.Empty;
131 
135  private string m_userAssetUri = String.Empty;
136 
140  private string m_userInventoryUri = String.Empty;
141 
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 
160  public virtual ulong HomeRegion
161  {
162  get
163  {
164  return Util.RegionWorldLocToHandle(Util.RegionToWorldLoc(m_homeRegionX), Util.RegionToWorldLoc(m_homeRegionY));
165  // return Utils.UIntsToLong( m_homeRegionX * (uint)Constants.RegionSize, m_homeRegionY * (uint)Constants.RegionSize);
166  }
167 
168  set
169  {
170  uint regionWorldLocX, regionWorldLocY;
171  Util.RegionHandleToWorldLoc(value, out regionWorldLocX, out regionWorldLocY);
172  m_homeRegionX = Util.WorldToRegionLoc(regionWorldLocX);
173  m_homeRegionY = Util.WorldToRegionLoc(regionWorldLocY);
174  // m_homeRegionX = (uint) (value >> 40);
175  // m_homeRegionY = (((uint) (value)) >> 8);
176  }
177  }
178 
179  private UUID m_homeRegionId;
185  public UUID HomeRegionID
186  {
187  get { return m_homeRegionId; }
188  set { m_homeRegionId = value; }
189  }
190 
191  // Property wrappers
192  public UUID ID
193  {
194  get { return m_id; }
195  set { m_id = value; }
196  }
197 
198  public UUID WebLoginKey
199  {
200  get { return m_webLoginKey; }
201  set { m_webLoginKey = value; }
202  }
203 
204  public string FirstName
205  {
206  get { return m_firstname; }
207  set { m_firstname = value; }
208  }
209 
210  public string SurName
211  {
212  get { return m_surname; }
213  set { m_surname = value; }
214  }
215 
219  public string Name
220  {
221  get { return String.Format("{0} {1}", m_firstname, m_surname); }
222  }
223 
224  public string Email
225  {
226  get { return m_email; }
227  set { m_email = value; }
228  }
229 
230  public string PasswordHash
231  {
232  get { return m_passwordHash; }
233  set { m_passwordHash = value; }
234  }
235 
236  public string PasswordSalt
237  {
238  get { return m_passwordSalt; }
239  set { m_passwordSalt = value; }
240  }
241 
242  public uint HomeRegionX
243  {
244  get { return m_homeRegionX; }
245  set { m_homeRegionX = value; }
246  }
247 
248  public uint HomeRegionY
249  {
250  get { return m_homeRegionY; }
251  set { m_homeRegionY = value; }
252  }
253 
254  public Vector3 HomeLocation
255  {
256  get { return m_homeLocation; }
257  set { m_homeLocation = value; }
258  }
259 
260  // for handy serialization
261  public float HomeLocationX
262  {
263  get { return m_homeLocation.X; }
264  set { m_homeLocation.X = value; }
265  }
266 
267  public float HomeLocationY
268  {
269  get { return m_homeLocation.Y; }
270  set { m_homeLocation.Y = value; }
271  }
272 
273  public float HomeLocationZ
274  {
275  get { return m_homeLocation.Z; }
276  set { m_homeLocation.Z = value; }
277  }
278 
279 
280  public Vector3 HomeLookAt
281  {
282  get { return m_homeLookAt; }
283  set { m_homeLookAt = value; }
284  }
285 
286  // for handy serialization
287  public float HomeLookAtX
288  {
289  get { return m_homeLookAt.X; }
290  set { m_homeLookAt.X = value; }
291  }
292 
293  public float HomeLookAtY
294  {
295  get { return m_homeLookAt.Y; }
296  set { m_homeLookAt.Y = value; }
297  }
298 
299  public float HomeLookAtZ
300  {
301  get { return m_homeLookAt.Z; }
302  set { m_homeLookAt.Z = value; }
303  }
304 
305  public int Created
306  {
307  get { return m_created; }
308  set { m_created = value; }
309  }
310 
311  public int LastLogin
312  {
313  get { return m_lastLogin; }
314  set { m_lastLogin = value; }
315  }
316 
317  public string UserInventoryURI
318  {
319  get { return m_userInventoryUri; }
320  set { m_userInventoryUri = value; }
321  }
322 
323  public string UserAssetURI
324  {
325  get { return m_userAssetUri; }
326  set { m_userAssetUri = value; }
327  }
328 
329  public uint CanDoMask
330  {
331  get { return m_profileCanDoMask; }
332  set { m_profileCanDoMask = value; }
333  }
334 
335  public uint WantDoMask
336  {
337  get { return m_profileWantDoMask; }
338  set { m_profileWantDoMask = value; }
339  }
340 
341  public string AboutText
342  {
343  get { return m_profileAboutText; }
344  set { m_profileAboutText = value; }
345  }
346 
347  public string FirstLifeAboutText
348  {
349  get { return m_profileFirstText; }
350  set { m_profileFirstText = value; }
351  }
352 
353  public string ProfileUrl
354  {
355  get { return m_profileUrl; }
356  set { m_profileUrl = value; }
357  }
358 
359  public UUID Image
360  {
361  get { return m_profileImage; }
362  set { m_profileImage = value; }
363  }
364 
365  public UUID FirstLifeImage
366  {
367  get { return m_profileFirstImage; }
368  set { m_profileFirstImage = value; }
369  }
370 
371  public UserAgentData CurrentAgent
372  {
373  get { return m_currentAgent; }
374  set { m_currentAgent = value; }
375  }
376 
377  public int UserFlags
378  {
379  get { return m_userFlags; }
380  set { m_userFlags = value; }
381  }
382 
383  public int GodLevel
384  {
385  get { return m_godLevel; }
386  set { m_godLevel = value; }
387  }
388 
389  public string CustomType
390  {
391  get { return m_customType; }
392  set { m_customType = value; }
393  }
394 
395  public UUID Partner
396  {
397  get { return m_partner; }
398  set { m_partner = value; }
399  }
400  }
401 }
Information about a particular user known to the userserver
Information about a users session