aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
authorSean Dague2008-05-15 20:25:42 +0000
committerSean Dague2008-05-15 20:25:42 +0000
commit4a9ee9f870b53abbc5ba8814c35d694c3fd186a1 (patch)
treefdda61e205703df149540656660e1efcd1f079f8 /OpenSim/Data
parent* Removing NUnit tests from CI build server temporarily while we work out wha... (diff)
downloadopensim-SC_OLD-4a9ee9f870b53abbc5ba8814c35d694c3fd186a1.zip
opensim-SC_OLD-4a9ee9f870b53abbc5ba8814c35d694c3fd186a1.tar.gz
opensim-SC_OLD-4a9ee9f870b53abbc5ba8814c35d694c3fd186a1.tar.bz2
opensim-SC_OLD-4a9ee9f870b53abbc5ba8814c35d694c3fd186a1.tar.xz
testing avatar appearance as a user service
Diffstat (limited to 'OpenSim/Data')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLUserData.cs18
-rw-r--r--OpenSim/Data/MySQL/MySQLUserData.cs18
-rw-r--r--OpenSim/Data/NHibernate/NHibernateUserData.cs4
-rw-r--r--OpenSim/Data/SQLite/SQLiteUserData.cs18
-rw-r--r--OpenSim/Data/UserDataBase.cs14
5 files changed, 41 insertions, 31 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLUserData.cs b/OpenSim/Data/MSSQL/MSSQLUserData.cs
index 4904bfe..844b7fa 100644
--- a/OpenSim/Data/MSSQL/MSSQLUserData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLUserData.cs
@@ -747,15 +747,15 @@ namespace OpenSim.Data.MSSQL
747 747
748 /// Appearance 748 /// Appearance
749 /// TODO: stubs for now to get us to a compiling state gently 749 /// TODO: stubs for now to get us to a compiling state gently
750 override public AvatarAppearance GetUserAppearance(LLUUID user) 750 // override public AvatarAppearance GetUserAppearance(LLUUID user)
751 { 751 // {
752 return new AvatarAppearance(); 752 // return new AvatarAppearance();
753 } 753 // }
754 754
755 override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) 755 // override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance)
756 { 756 // {
757 return; 757 // return;
758 } 758 // }
759 759
760 override public void AddAttachment(LLUUID user, LLUUID item) 760 override public void AddAttachment(LLUUID user, LLUUID item)
761 { 761 {
diff --git a/OpenSim/Data/MySQL/MySQLUserData.cs b/OpenSim/Data/MySQL/MySQLUserData.cs
index 622a618..a1e1094 100644
--- a/OpenSim/Data/MySQL/MySQLUserData.cs
+++ b/OpenSim/Data/MySQL/MySQLUserData.cs
@@ -630,15 +630,15 @@ namespace OpenSim.Data.MySQL
630 630
631 /// Appearance 631 /// Appearance
632 /// TODO: stubs for now to get us to a compiling state gently 632 /// TODO: stubs for now to get us to a compiling state gently
633 override public AvatarAppearance GetUserAppearance(LLUUID user) 633 // override public AvatarAppearance GetUserAppearance(LLUUID user)
634 { 634 // {
635 return new AvatarAppearance(); 635 // return new AvatarAppearance();
636 } 636 // }
637 637
638 override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) 638 // override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance)
639 { 639 // {
640 return; 640 // return;
641 } 641 // }
642 642
643 override public void AddAttachment(LLUUID user, LLUUID item) 643 override public void AddAttachment(LLUUID user, LLUUID item)
644 { 644 {
diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs
index 81af4d4..6ba2783 100644
--- a/OpenSim/Data/NHibernate/NHibernateUserData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs
@@ -306,7 +306,7 @@ namespace OpenSim.Data.NHibernate
306 306
307 /// Appearance 307 /// Appearance
308 /// TODO: stubs for now to get us to a compiling state gently 308 /// TODO: stubs for now to get us to a compiling state gently
309 override public AvatarAppearance GetUserAppearance(LLUUID user) 309 public AvatarAppearance GetUserAppearance(LLUUID user)
310 { 310 {
311 AvatarAppearance appearance; 311 AvatarAppearance appearance;
312 // TODO: I'm sure I'll have to do something silly here 312 // TODO: I'm sure I'll have to do something silly here
@@ -328,7 +328,7 @@ namespace OpenSim.Data.NHibernate
328 } 328 }
329 329
330 330
331 override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) 331 public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance)
332 { 332 {
333 bool exists = ExistsAppearance(user); 333 bool exists = ExistsAppearance(user);
334 using (ISession session = factory.OpenSession()) 334 using (ISession session = factory.OpenSession())
diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs
index e80a0a9..8f78e0b 100644
--- a/OpenSim/Data/SQLite/SQLiteUserData.cs
+++ b/OpenSim/Data/SQLite/SQLiteUserData.cs
@@ -480,15 +480,15 @@ namespace OpenSim.Data.SQLite
480 480
481 /// Appearance 481 /// Appearance
482 /// TODO: stubs for now to get us to a compiling state gently 482 /// TODO: stubs for now to get us to a compiling state gently
483 override public AvatarAppearance GetUserAppearance(LLUUID user) 483 // override public AvatarAppearance GetUserAppearance(LLUUID user)
484 { 484 // {
485 return new AvatarAppearance(); 485 // return new AvatarAppearance();
486 } 486 // }
487 487
488 override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) 488 // override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance)
489 { 489 // {
490 return; 490 // return;
491 } 491 // }
492 492
493 override public void AddAttachment(LLUUID user, LLUUID item) 493 override public void AddAttachment(LLUUID user, LLUUID item)
494 { 494 {
diff --git a/OpenSim/Data/UserDataBase.cs b/OpenSim/Data/UserDataBase.cs
index fb784dc..a4e2941 100644
--- a/OpenSim/Data/UserDataBase.cs
+++ b/OpenSim/Data/UserDataBase.cs
@@ -33,6 +33,8 @@ namespace OpenSim.Data
33{ 33{
34 public abstract class UserDataBase : IUserData 34 public abstract class UserDataBase : IUserData
35 { 35 {
36 private Dictionary<LLUUID, AvatarAppearance> aplist = new Dictionary<LLUUID, AvatarAppearance>();
37
36 public abstract UserProfileData GetUserByUUID(LLUUID user); 38 public abstract UserProfileData GetUserByUUID(LLUUID user);
37 public abstract UserProfileData GetUserByName(string fname, string lname); 39 public abstract UserProfileData GetUserByName(string fname, string lname);
38 public abstract UserAgentData GetAgentByUUID(LLUUID user); 40 public abstract UserAgentData GetAgentByUUID(LLUUID user);
@@ -53,8 +55,16 @@ namespace OpenSim.Data
53 public abstract string Name {get;} 55 public abstract string Name {get;}
54 public abstract void Initialise(string connect); 56 public abstract void Initialise(string connect);
55 public abstract List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query); 57 public abstract List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query);
56 public abstract AvatarAppearance GetUserAppearance(LLUUID user); 58 public AvatarAppearance GetUserAppearance(LLUUID user) {
57 public abstract void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance); 59 if (aplist[user] != null) {
60 aplist[user] = new AvatarAppearance();
61 aplist[user].Owner = user;
62 }
63 return aplist[user];
64 }
65 public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) {
66 aplist[user] = appearance;
67 }
58 public abstract void AddAttachment(LLUUID user, LLUUID item); 68 public abstract void AddAttachment(LLUUID user, LLUUID item);
59 public abstract void RemoveAttachment(LLUUID user, LLUUID item); 69 public abstract void RemoveAttachment(LLUUID user, LLUUID item);
60 public abstract List<LLUUID> GetAttachments(LLUUID user); 70 public abstract List<LLUUID> GetAttachments(LLUUID user);