aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Data.SQLite
diff options
context:
space:
mode:
authorlbsa712007-10-05 11:27:46 +0000
committerlbsa712007-10-05 11:27:46 +0000
commited6168b96b687a2f44177af8200d13b427089099 (patch)
tree2d87efb9c800f06233cbef0612617eba2c931f68 /OpenSim/Framework/Data.SQLite
parent== The "right name and place" commit == (diff)
downloadopensim-SC_OLD-ed6168b96b687a2f44177af8200d13b427089099.zip
opensim-SC_OLD-ed6168b96b687a2f44177af8200d13b427089099.tar.gz
opensim-SC_OLD-ed6168b96b687a2f44177af8200d13b427089099.tar.bz2
opensim-SC_OLD-ed6168b96b687a2f44177af8200d13b427089099.tar.xz
* UserProfileData meets code conventions
Diffstat (limited to 'OpenSim/Framework/Data.SQLite')
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteUserData.cs102
1 files changed, 51 insertions, 51 deletions
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
index c7b7659..1899733 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
@@ -85,7 +85,7 @@ namespace OpenSim.Framework.Data.SQLite
85 UserProfileData user = buildUserProfile(row); 85 UserProfileData user = buildUserProfile(row);
86 row = ds.Tables["useragents"].Rows.Find(uuid); 86 row = ds.Tables["useragents"].Rows.Find(uuid);
87 if(row != null) { 87 if(row != null) {
88 user.currentAgent = buildUserAgent(row); 88 user.CurrentAgent = buildUserAgent(row);
89 } 89 }
90 return user; 90 return user;
91 } else { 91 } else {
@@ -119,7 +119,7 @@ namespace OpenSim.Framework.Data.SQLite
119 UserProfileData user = buildUserProfile(rows[0]); 119 UserProfileData user = buildUserProfile(rows[0]);
120 DataRow row = ds.Tables["useragents"].Rows.Find(user.UUID); 120 DataRow row = ds.Tables["useragents"].Rows.Find(user.UUID);
121 if(row != null) { 121 if(row != null) {
122 user.currentAgent = buildUserAgent(row); 122 user.CurrentAgent = buildUserAgent(row);
123 } 123 }
124 return user; 124 return user;
125 } else { 125 } else {
@@ -137,7 +137,7 @@ namespace OpenSim.Framework.Data.SQLite
137 { 137 {
138 try 138 try
139 { 139 {
140 return GetUserByUUID(uuid).currentAgent; 140 return GetUserByUUID(uuid).CurrentAgent;
141 } 141 }
142 catch (Exception) 142 catch (Exception)
143 { 143 {
@@ -165,7 +165,7 @@ namespace OpenSim.Framework.Data.SQLite
165 { 165 {
166 try 166 try
167 { 167 {
168 return GetUserByName(fname,lname).currentAgent; 168 return GetUserByName(fname,lname).CurrentAgent;
169 } 169 }
170 catch (Exception) 170 catch (Exception)
171 { 171 {
@@ -193,18 +193,18 @@ namespace OpenSim.Framework.Data.SQLite
193 fillUserRow(row, user); 193 fillUserRow(row, user);
194 } 194 }
195 195
196 if(user.currentAgent != null) { 196 if(user.CurrentAgent != null) {
197 DataTable ua = ds.Tables["useragents"]; 197 DataTable ua = ds.Tables["useragents"];
198 row = ua.Rows.Find(user.UUID); 198 row = ua.Rows.Find(user.UUID);
199 if (row == null) 199 if (row == null)
200 { 200 {
201 row = ua.NewRow(); 201 row = ua.NewRow();
202 fillUserAgentRow(row, user.currentAgent); 202 fillUserAgentRow(row, user.CurrentAgent);
203 ua.Rows.Add(row); 203 ua.Rows.Add(row);
204 } 204 }
205 else 205 else
206 { 206 {
207 fillUserAgentRow(row, user.currentAgent); 207 fillUserAgentRow(row, user.CurrentAgent);
208 } 208 }
209 } 209 }
210 MainLog.Instance.Verbose("Syncing user database: " + ds.Tables["users"].Rows.Count + " users stored"); 210 MainLog.Instance.Verbose("Syncing user database: " + ds.Tables["users"].Rows.Count + " users stored");
@@ -317,8 +317,8 @@ namespace OpenSim.Framework.Data.SQLite
317 createCol(users, "userInventoryURI", typeof(System.String)); 317 createCol(users, "userInventoryURI", typeof(System.String));
318 createCol(users, "userAssetURI", typeof(System.String)); 318 createCol(users, "userAssetURI", typeof(System.String));
319 createCol(users, "profileCanDoMask", typeof(System.Int32)); 319 createCol(users, "profileCanDoMask", typeof(System.Int32));
320 createCol(users, "profileWantDoMask", typeof(System.Int32)); 320 createCol(users, "ProfileWantDoMask", typeof(System.Int32));
321 createCol(users, "profileAboutText", typeof(System.String)); 321 createCol(users, "ProfileAboutText", typeof(System.String));
322 createCol(users, "profileFirstText", typeof(System.String)); 322 createCol(users, "profileFirstText", typeof(System.String));
323 createCol(users, "profileImage", typeof(System.String)); 323 createCol(users, "profileImage", typeof(System.String));
324 createCol(users, "profileFirstImage", typeof(System.String)); 324 createCol(users, "profileFirstImage", typeof(System.String));
@@ -367,66 +367,66 @@ namespace OpenSim.Framework.Data.SQLite
367 // back out. Not enough time to figure it out yet. 367 // back out. Not enough time to figure it out yet.
368 UserProfileData user = new UserProfileData(); 368 UserProfileData user = new UserProfileData();
369 user.UUID = new LLUUID((String)row["UUID"]); 369 user.UUID = new LLUUID((String)row["UUID"]);
370 user.username = (String)row["username"]; 370 user.Firstname = (String)row["username"];
371 user.surname = (String)row["surname"]; 371 user.Lastname = (String)row["surname"];
372 user.passwordHash = (String)row["passwordHash"]; 372 user.PasswordHash = (String)row["passwordHash"];
373 user.passwordSalt = (String)row["passwordSalt"]; 373 user.PasswordSalt = (String)row["passwordSalt"];
374 374
375 user.homeRegionX = Convert.ToUInt32(row["homeRegionX"]); 375 user.HomeRegionX = Convert.ToUInt32(row["homeRegionX"]);
376 user.homeRegionY = Convert.ToUInt32(row["homeRegionY"]); 376 user.HomeRegionY = Convert.ToUInt32(row["homeRegionY"]);
377 user.homeLocation = new LLVector3( 377 user.HomeLocation = new LLVector3(
378 Convert.ToSingle(row["homeLocationX"]), 378 Convert.ToSingle(row["homeLocationX"]),
379 Convert.ToSingle(row["homeLocationY"]), 379 Convert.ToSingle(row["homeLocationY"]),
380 Convert.ToSingle(row["homeLocationZ"]) 380 Convert.ToSingle(row["homeLocationZ"])
381 ); 381 );
382 user.homeLookAt = new LLVector3( 382 user.HomeLookAt = new LLVector3(
383 Convert.ToSingle(row["homeLookAtX"]), 383 Convert.ToSingle(row["homeLookAtX"]),
384 Convert.ToSingle(row["homeLookAtY"]), 384 Convert.ToSingle(row["homeLookAtY"]),
385 Convert.ToSingle(row["homeLookAtZ"]) 385 Convert.ToSingle(row["homeLookAtZ"])
386 ); 386 );
387 user.created = Convert.ToInt32(row["created"]); 387 user.Created = Convert.ToInt32(row["created"]);
388 user.lastLogin = Convert.ToInt32(row["lastLogin"]); 388 user.LastLogin = Convert.ToInt32(row["lastLogin"]);
389 user.rootInventoryFolderID = new LLUUID((String)row["rootInventoryFolderID"]); 389 user.RootInventoryFolderId = new LLUUID((String)row["rootInventoryFolderID"]);
390 user.userInventoryURI = (String)row["userInventoryURI"]; 390 user.UserInventoryUri = (String)row["userInventoryURI"];
391 user.userAssetURI = (String)row["userAssetURI"]; 391 user.UserAssetUri = (String)row["userAssetURI"];
392 user.profileCanDoMask = Convert.ToUInt32(row["profileCanDoMask"]); 392 user.ProfileCanDoMask = Convert.ToUInt32(row["profileCanDoMask"]);
393 user.profileWantDoMask = Convert.ToUInt32(row["profileWantDoMask"]); 393 user.ProfileWantDoMask = Convert.ToUInt32(row["ProfileWantDoMask"]);
394 user.profileAboutText = (String)row["profileAboutText"]; 394 user.ProfileAboutText = (String)row["ProfileAboutText"];
395 user.profileFirstText = (String)row["profileFirstText"]; 395 user.ProfileFirstText = (String)row["profileFirstText"];
396 user.profileImage = new LLUUID((String)row["profileImage"]); 396 user.ProfileImage = new LLUUID((String)row["profileImage"]);
397 user.profileFirstImage = new LLUUID((String)row["profileFirstImage"]); 397 user.ProfileFirstImage = new LLUUID((String)row["profileFirstImage"]);
398 return user; 398 return user;
399 } 399 }
400 400
401 private void fillUserRow(DataRow row, UserProfileData user) 401 private void fillUserRow(DataRow row, UserProfileData user)
402 { 402 {
403 row["UUID"] = user.UUID; 403 row["UUID"] = user.UUID;
404 row["username"] = user.username; 404 row["username"] = user.Firstname;
405 row["surname"] = user.surname; 405 row["surname"] = user.Lastname;
406 row["passwordHash"] = user.passwordHash; 406 row["passwordHash"] = user.PasswordHash;
407 row["passwordSalt"] = user.passwordSalt; 407 row["passwordSalt"] = user.PasswordSalt;
408 408
409 409
410 row["homeRegionX"] = user.homeRegionX; 410 row["homeRegionX"] = user.HomeRegionX;
411 row["homeRegionY"] = user.homeRegionY; 411 row["homeRegionY"] = user.HomeRegionY;
412 row["homeLocationX"] = user.homeLocation.X; 412 row["homeLocationX"] = user.HomeLocation.X;
413 row["homeLocationY"] = user.homeLocation.Y; 413 row["homeLocationY"] = user.HomeLocation.Y;
414 row["homeLocationZ"] = user.homeLocation.Z; 414 row["homeLocationZ"] = user.HomeLocation.Z;
415 row["homeLookAtX"] = user.homeLookAt.X; 415 row["homeLookAtX"] = user.HomeLookAt.X;
416 row["homeLookAtY"] = user.homeLookAt.Y; 416 row["homeLookAtY"] = user.HomeLookAt.Y;
417 row["homeLookAtZ"] = user.homeLookAt.Z; 417 row["homeLookAtZ"] = user.HomeLookAt.Z;
418 418
419 row["created"] = user.created; 419 row["created"] = user.Created;
420 row["lastLogin"] = user.lastLogin; 420 row["lastLogin"] = user.LastLogin;
421 row["rootInventoryFolderID"] = user.rootInventoryFolderID; 421 row["rootInventoryFolderID"] = user.RootInventoryFolderId;
422 row["userInventoryURI"] = user.userInventoryURI; 422 row["userInventoryURI"] = user.UserInventoryUri;
423 row["userAssetURI"] = user.userAssetURI; 423 row["userAssetURI"] = user.UserAssetUri;
424 row["profileCanDoMask"] = user.profileCanDoMask; 424 row["profileCanDoMask"] = user.ProfileCanDoMask;
425 row["profileWantDoMask"] = user.profileWantDoMask; 425 row["ProfileWantDoMask"] = user.ProfileWantDoMask;
426 row["profileAboutText"] = user.profileAboutText; 426 row["ProfileAboutText"] = user.ProfileAboutText;
427 row["profileFirstText"] = user.profileFirstText; 427 row["profileFirstText"] = user.ProfileFirstText;
428 row["profileImage"] = user.profileImage; 428 row["profileImage"] = user.ProfileImage;
429 row["profileFirstImage"] = user.profileFirstImage; 429 row["profileFirstImage"] = user.ProfileFirstImage;
430 430
431 // ADO.NET doesn't handle NULL very well 431 // ADO.NET doesn't handle NULL very well
432 foreach (DataColumn col in ds.Tables["users"].Columns) { 432 foreach (DataColumn col in ds.Tables["users"].Columns) {