diff options
Diffstat (limited to 'OpenSim/Framework/UserProfileData.cs')
-rw-r--r-- | OpenSim/Framework/UserProfileData.cs | 354 |
1 files changed, 149 insertions, 205 deletions
diff --git a/OpenSim/Framework/UserProfileData.cs b/OpenSim/Framework/UserProfileData.cs index 254e903..b704682 100644 --- a/OpenSim/Framework/UserProfileData.cs +++ b/OpenSim/Framework/UserProfileData.cs | |||
@@ -36,39 +36,21 @@ namespace OpenSim.Framework | |||
36 | public class UserProfileData | 36 | public class UserProfileData |
37 | { | 37 | { |
38 | /// <summary> | 38 | /// <summary> |
39 | /// The ID value for this user | 39 | /// A UNIX Timestamp (seconds since epoch) for the users creation |
40 | /// </summary> | 40 | /// </summary> |
41 | private LLUUID _id; | 41 | private int _created; |
42 | 42 | ||
43 | /// <summary> | 43 | /// <summary> |
44 | /// The last used Web_login_key | 44 | /// The users last registered agent (filled in on the user server) |
45 | /// </summary> | 45 | /// </summary> |
46 | private LLUUID _webLoginKey; | 46 | private UserAgentData _currentAgent; |
47 | |||
47 | /// <summary> | 48 | /// <summary> |
48 | /// The first component of a users account name | 49 | /// The first component of a users account name |
49 | /// </summary> | 50 | /// </summary> |
50 | private string _firstname; | 51 | private string _firstname; |
51 | 52 | ||
52 | /// <summary> | 53 | /// <summary> |
53 | /// The second component of a users account name | ||
54 | /// </summary> | ||
55 | private string _surname; | ||
56 | |||
57 | /// <summary> | ||
58 | /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt) | ||
59 | /// </summary> | ||
60 | /// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks> | ||
61 | private string _passwordHash; | ||
62 | |||
63 | /// <summary> | ||
64 | /// The salt used for the users hash, should be 32 bytes or longer | ||
65 | /// </summary> | ||
66 | private string _passwordSalt; | ||
67 | |||
68 | private uint _homeRegionX; | ||
69 | private uint _homeRegionY; | ||
70 | |||
71 | /// <summary> | ||
72 | /// The coordinates inside the region of the home location | 54 | /// The coordinates inside the region of the home location |
73 | /// </summary> | 55 | /// </summary> |
74 | private LLVector3 _homeLocation; | 56 | private LLVector3 _homeLocation; |
@@ -78,42 +60,44 @@ namespace OpenSim.Framework | |||
78 | /// </summary> | 60 | /// </summary> |
79 | private LLVector3 _homeLookAt; | 61 | private LLVector3 _homeLookAt; |
80 | 62 | ||
63 | private uint _homeRegionX; | ||
64 | private uint _homeRegionY; | ||
65 | |||
81 | /// <summary> | 66 | /// <summary> |
82 | /// A UNIX Timestamp (seconds since epoch) for the users creation | 67 | /// The ID value for this user |
83 | /// </summary> | 68 | /// </summary> |
84 | private int _created; | 69 | private LLUUID _id; |
85 | 70 | ||
86 | /// <summary> | 71 | /// <summary> |
87 | /// A UNIX Timestamp for the users last login date / time | 72 | /// A UNIX Timestamp for the users last login date / time |
88 | /// </summary> | 73 | /// </summary> |
89 | private int _lastLogin; | 74 | private int _lastLogin; |
90 | 75 | ||
91 | private LLUUID _rootInventoryFolderID; | ||
92 | |||
93 | /// <summary> | 76 | /// <summary> |
94 | /// A URI to the users inventory server, used for foreigners and large grids | 77 | /// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt) |
95 | /// </summary> | 78 | /// </summary> |
96 | private string _userInventoryURI = String.Empty; | 79 | /// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks> |
80 | private string _passwordHash; | ||
97 | 81 | ||
98 | /// <summary> | 82 | /// <summary> |
99 | /// A URI to the users asset server, used for foreigners and large grids. | 83 | /// The salt used for the users hash, should be 32 bytes or longer |
100 | /// </summary> | 84 | /// </summary> |
101 | private string _userAssetURI = String.Empty; | 85 | private string _passwordSalt; |
102 | 86 | ||
103 | /// <summary> | 87 | /// <summary> |
104 | /// A uint mask containing the "I can do" fields of the users profile | 88 | /// The about text listed in a users profile. |
105 | /// </summary> | 89 | /// </summary> |
106 | private uint _profileCanDoMask; | 90 | private string _profileAboutText = String.Empty; |
107 | 91 | ||
108 | /// <summary> | 92 | /// <summary> |
109 | /// A uint mask containing the "I want to do" part of the users profile | 93 | /// A uint mask containing the "I can do" fields of the users profile |
110 | /// </summary> | 94 | /// </summary> |
111 | private uint _profileWantDoMask; // Profile window "I want to" mask | 95 | private uint _profileCanDoMask; |
112 | 96 | ||
113 | /// <summary> | 97 | /// <summary> |
114 | /// The about text listed in a users profile. | 98 | /// The profile image for the users first life tab |
115 | /// </summary> | 99 | /// </summary> |
116 | private string _profileAboutText = String.Empty; | 100 | private LLUUID _profileFirstImage; |
117 | 101 | ||
118 | /// <summary> | 102 | /// <summary> |
119 | /// The first life about text listed in a users profile | 103 | /// The first life about text listed in a users profile |
@@ -126,21 +110,38 @@ namespace OpenSim.Framework | |||
126 | private LLUUID _profileImage; | 110 | private LLUUID _profileImage; |
127 | 111 | ||
128 | /// <summary> | 112 | /// <summary> |
129 | /// The profile image for the users first life tab | 113 | /// A uint mask containing the "I want to do" part of the users profile |
130 | /// </summary> | 114 | /// </summary> |
131 | private LLUUID _profileFirstImage; | 115 | private uint _profileWantDoMask; // Profile window "I want to" mask |
116 | |||
117 | private LLUUID _rootInventoryFolderID; | ||
132 | 118 | ||
133 | /// <summary> | 119 | /// <summary> |
134 | /// The users last registered agent (filled in on the user server) | 120 | /// The second component of a users account name |
135 | /// </summary> | 121 | /// </summary> |
136 | private UserAgentData _currentAgent; | 122 | private string _surname; |
123 | |||
124 | /// <summary> | ||
125 | /// A URI to the users asset server, used for foreigners and large grids. | ||
126 | /// </summary> | ||
127 | private string _userAssetURI = String.Empty; | ||
128 | |||
129 | /// <summary> | ||
130 | /// A URI to the users inventory server, used for foreigners and large grids | ||
131 | /// </summary> | ||
132 | private string _userInventoryURI = String.Empty; | ||
133 | |||
134 | /// <summary> | ||
135 | /// The last used Web_login_key | ||
136 | /// </summary> | ||
137 | private LLUUID _webLoginKey; | ||
137 | 138 | ||
138 | /// <summary> | 139 | /// <summary> |
139 | /// 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 | 140 | /// 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 |
140 | /// </summary> | 141 | /// </summary> |
141 | public ulong HomeRegion | 142 | public ulong HomeRegion |
142 | { | 143 | { |
143 | get { return Helpers.UIntsToLong((_homeRegionX * (uint)Constants.RegionSize), (_homeRegionY * (uint)Constants.RegionSize)); } | 144 | get { return Helpers.UIntsToLong((_homeRegionX * (uint) Constants.RegionSize), (_homeRegionY * (uint) Constants.RegionSize)); } |
144 | set | 145 | set |
145 | { | 146 | { |
146 | _homeRegionX = (uint) (value >> 40); | 147 | _homeRegionX = (uint) (value >> 40); |
@@ -149,232 +150,175 @@ namespace OpenSim.Framework | |||
149 | } | 150 | } |
150 | 151 | ||
151 | // Property wrappers | 152 | // Property wrappers |
152 | public LLUUID ID { | 153 | public LLUUID ID |
153 | get { | 154 | { |
154 | return _id; | 155 | get { return _id; } |
155 | } | 156 | set { _id = value; } |
156 | set { | ||
157 | _id = value; | ||
158 | } | ||
159 | } | 157 | } |
160 | 158 | ||
161 | public LLUUID WebLoginKey { | 159 | public LLUUID WebLoginKey |
162 | get { | 160 | { |
163 | return _webLoginKey; | 161 | get { return _webLoginKey; } |
164 | } | 162 | set { _webLoginKey = value; } |
165 | set { | ||
166 | _webLoginKey = value; | ||
167 | } | ||
168 | } | 163 | } |
169 | 164 | ||
170 | public string FirstName { | 165 | public string FirstName |
171 | get { | 166 | { |
172 | return _firstname; | 167 | get { return _firstname; } |
173 | } | 168 | set { _firstname = value; } |
174 | set { | ||
175 | _firstname = value; | ||
176 | } | ||
177 | } | 169 | } |
178 | 170 | ||
179 | public string SurName { | 171 | public string SurName |
180 | get { | 172 | { |
181 | return _surname; | 173 | get { return _surname; } |
182 | } | 174 | set { _surname = value; } |
183 | set { | ||
184 | _surname = value; | ||
185 | } | ||
186 | } | 175 | } |
187 | 176 | ||
188 | public string PasswordHash { | 177 | public string PasswordHash |
189 | get { | 178 | { |
190 | return _passwordHash; | 179 | get { return _passwordHash; } |
191 | } | 180 | set { _passwordHash = value; } |
192 | set { | ||
193 | _passwordHash = value; | ||
194 | } | ||
195 | } | 181 | } |
196 | 182 | ||
197 | public string PasswordSalt { | 183 | public string PasswordSalt |
198 | get { | 184 | { |
199 | return _passwordSalt; | 185 | get { return _passwordSalt; } |
200 | } | 186 | set { _passwordSalt = value; } |
201 | set { | ||
202 | _passwordSalt = value; | ||
203 | } | ||
204 | } | 187 | } |
205 | 188 | ||
206 | public uint HomeRegionX { | 189 | public uint HomeRegionX |
207 | get { | 190 | { |
208 | return _homeRegionX; | 191 | get { return _homeRegionX; } |
209 | } | 192 | set { _homeRegionX = value; } |
210 | set { | ||
211 | _homeRegionX = value; | ||
212 | } | ||
213 | } | 193 | } |
214 | 194 | ||
215 | public uint HomeRegionY { | 195 | public uint HomeRegionY |
216 | get { | 196 | { |
217 | return _homeRegionY; | 197 | get { return _homeRegionY; } |
218 | } | 198 | set { _homeRegionY = value; } |
219 | set { | ||
220 | _homeRegionY = value; | ||
221 | } | ||
222 | } | 199 | } |
223 | 200 | ||
224 | public LLVector3 HomeLocation { | 201 | public LLVector3 HomeLocation |
225 | get { | 202 | { |
226 | return _homeLocation; | 203 | get { return _homeLocation; } |
227 | } | 204 | set { _homeLocation = value; } |
228 | set { | ||
229 | _homeLocation = value; | ||
230 | } | ||
231 | } | 205 | } |
232 | 206 | ||
233 | // for handy serialization | 207 | // for handy serialization |
234 | public float HomeLocationX { | 208 | public float HomeLocationX |
209 | { | ||
235 | get { return _homeLocation.X; } | 210 | get { return _homeLocation.X; } |
236 | set { _homeLocation.X = value; } | 211 | set { _homeLocation.X = value; } |
237 | } | 212 | } |
238 | public float HomeLocationY { | 213 | |
214 | public float HomeLocationY | ||
215 | { | ||
239 | get { return _homeLocation.Y; } | 216 | get { return _homeLocation.Y; } |
240 | set { _homeLocation.Y = value; } | 217 | set { _homeLocation.Y = value; } |
241 | } | 218 | } |
242 | public float HomeLocationZ { | 219 | |
220 | public float HomeLocationZ | ||
221 | { | ||
243 | get { return _homeLocation.Z; } | 222 | get { return _homeLocation.Z; } |
244 | set { _homeLocation.Z = value; } | 223 | set { _homeLocation.Z = value; } |
245 | } | 224 | } |
246 | 225 | ||
247 | 226 | ||
248 | public LLVector3 HomeLookAt { | 227 | public LLVector3 HomeLookAt |
249 | get { | 228 | { |
250 | return _homeLookAt; | 229 | get { return _homeLookAt; } |
251 | } | 230 | set { _homeLookAt = value; } |
252 | set { | ||
253 | _homeLookAt = value; | ||
254 | } | ||
255 | } | 231 | } |
256 | 232 | ||
257 | // for handy serialization | 233 | // for handy serialization |
258 | public float HomeLookAtX { | 234 | public float HomeLookAtX |
235 | { | ||
259 | get { return _homeLookAt.X; } | 236 | get { return _homeLookAt.X; } |
260 | set { _homeLookAt.X = value; } | 237 | set { _homeLookAt.X = value; } |
261 | } | 238 | } |
262 | public float HomeLookAtY { | 239 | |
240 | public float HomeLookAtY | ||
241 | { | ||
263 | get { return _homeLookAt.Y; } | 242 | get { return _homeLookAt.Y; } |
264 | set { _homeLookAt.Y = value; } | 243 | set { _homeLookAt.Y = value; } |
265 | } | 244 | } |
266 | public float HomeLookAtZ { | 245 | |
246 | public float HomeLookAtZ | ||
247 | { | ||
267 | get { return _homeLookAt.Z; } | 248 | get { return _homeLookAt.Z; } |
268 | set { _homeLookAt.Z = value; } | 249 | set { _homeLookAt.Z = value; } |
269 | } | 250 | } |
270 | 251 | ||
271 | public int Created { | 252 | public int Created |
272 | get { | 253 | { |
273 | return _created; | 254 | get { return _created; } |
274 | } | 255 | set { _created = value; } |
275 | set { | ||
276 | _created = value; | ||
277 | } | ||
278 | } | 256 | } |
279 | 257 | ||
280 | public int LastLogin { | 258 | public int LastLogin |
281 | get { | 259 | { |
282 | return _lastLogin; | 260 | get { return _lastLogin; } |
283 | } | 261 | set { _lastLogin = value; } |
284 | set { | ||
285 | _lastLogin = value; | ||
286 | } | ||
287 | } | 262 | } |
288 | 263 | ||
289 | public LLUUID RootInventoryFolderID { | 264 | public LLUUID RootInventoryFolderID |
290 | get { | 265 | { |
291 | return _rootInventoryFolderID; | 266 | get { return _rootInventoryFolderID; } |
292 | } | 267 | set { _rootInventoryFolderID = value; } |
293 | set { | ||
294 | _rootInventoryFolderID = value; | ||
295 | } | ||
296 | } | 268 | } |
297 | 269 | ||
298 | public string UserInventoryURI { | 270 | public string UserInventoryURI |
299 | get { | 271 | { |
300 | return _userInventoryURI; | 272 | get { return _userInventoryURI; } |
301 | } | 273 | set { _userInventoryURI = value; } |
302 | set { | ||
303 | _userInventoryURI = value; | ||
304 | } | ||
305 | } | 274 | } |
306 | 275 | ||
307 | public string UserAssetURI { | 276 | public string UserAssetURI |
308 | get { | 277 | { |
309 | return _userAssetURI; | 278 | get { return _userAssetURI; } |
310 | } | 279 | set { _userAssetURI = value; } |
311 | set { | ||
312 | _userAssetURI = value; | ||
313 | } | ||
314 | } | 280 | } |
315 | 281 | ||
316 | public uint CanDoMask { | 282 | public uint CanDoMask |
317 | get { | 283 | { |
318 | return _profileCanDoMask; | 284 | get { return _profileCanDoMask; } |
319 | } | 285 | set { _profileCanDoMask = value; } |
320 | set { | ||
321 | _profileCanDoMask = value; | ||
322 | } | ||
323 | } | 286 | } |
324 | 287 | ||
325 | public uint WantDoMask { | 288 | public uint WantDoMask |
326 | get { | 289 | { |
327 | return _profileWantDoMask; | 290 | get { return _profileWantDoMask; } |
328 | } | 291 | set { _profileWantDoMask = value; } |
329 | set { | ||
330 | _profileWantDoMask = value; | ||
331 | } | ||
332 | } | 292 | } |
333 | 293 | ||
334 | public string AboutText { | 294 | public string AboutText |
335 | get { | 295 | { |
336 | return _profileAboutText; | 296 | get { return _profileAboutText; } |
337 | } | 297 | set { _profileAboutText = value; } |
338 | set { | ||
339 | _profileAboutText = value; | ||
340 | } | ||
341 | } | 298 | } |
342 | 299 | ||
343 | public string FirstLifeAboutText { | 300 | public string FirstLifeAboutText |
344 | get { | 301 | { |
345 | return _profileFirstText; | 302 | get { return _profileFirstText; } |
346 | } | 303 | set { _profileFirstText = value; } |
347 | set { | ||
348 | _profileFirstText = value; | ||
349 | } | ||
350 | } | 304 | } |
351 | 305 | ||
352 | public LLUUID Image { | 306 | public LLUUID Image |
353 | get { | 307 | { |
354 | return _profileImage; | 308 | get { return _profileImage; } |
355 | } | 309 | set { _profileImage = value; } |
356 | set { | ||
357 | _profileImage = value; | ||
358 | } | ||
359 | } | 310 | } |
360 | 311 | ||
361 | public LLUUID FirstLifeImage { | 312 | public LLUUID FirstLifeImage |
362 | get { | 313 | { |
363 | return _profileFirstImage; | 314 | get { return _profileFirstImage; } |
364 | } | 315 | set { _profileFirstImage = value; } |
365 | set { | ||
366 | _profileFirstImage = value; | ||
367 | } | ||
368 | } | 316 | } |
369 | 317 | ||
370 | public UserAgentData CurrentAgent { | 318 | public UserAgentData CurrentAgent |
371 | get { | 319 | { |
372 | return _currentAgent; | 320 | get { return _currentAgent; } |
373 | } | 321 | set { _currentAgent = value; } |
374 | set { | ||
375 | _currentAgent = value; | ||
376 | } | ||
377 | } | 322 | } |
378 | |||
379 | } | 323 | } |
380 | } | 324 | } \ No newline at end of file |