aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-09-06 07:52:41 +0000
committerTeravus Ovares2008-09-06 07:52:41 +0000
commit7d89e122930be39e84a6d174548fa2d12ac0484a (patch)
treee5aa5752f988a9aba2a969f49e5e208985eda80c /OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
parent* minor: speculatively try a change to bamboo.build to see if this generates ... (diff)
downloadopensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.zip
opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.gz
opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.bz2
opensim-SC-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.xz
* This is the fabled LibOMV update with all of the libOMV types from JHurliman
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle. * This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big! * Essentially we're back at square 1 in the testing phase.. so lets identify things that broke.
Diffstat (limited to 'OpenSim/Region/Communications/OGS1/OGS1UserServices.cs')
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1UserServices.cs82
1 files changed, 41 insertions, 41 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
index 2223aeb..317be13 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs
@@ -31,7 +31,7 @@ using System.Collections.Generic;
31using System.Net; 31using System.Net;
32using System.Reflection; 32using System.Reflection;
33using System.Text.RegularExpressions; 33using System.Text.RegularExpressions;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using Nwc.XmlRpc; 36using Nwc.XmlRpc;
37using OpenSim.Framework; 37using OpenSim.Framework;
@@ -64,27 +64,27 @@ namespace OpenSim.Region.Communications.OGS1
64 UserProfileData userData = new UserProfileData(); 64 UserProfileData userData = new UserProfileData();
65 userData.FirstName = (string) data["firstname"]; 65 userData.FirstName = (string) data["firstname"];
66 userData.SurName = (string) data["lastname"]; 66 userData.SurName = (string) data["lastname"];
67 userData.ID = new LLUUID((string) data["uuid"]); 67 userData.ID = new UUID((string) data["uuid"]);
68 userData.UserInventoryURI = (string) data["server_inventory"]; 68 userData.UserInventoryURI = (string) data["server_inventory"];
69 userData.UserAssetURI = (string) data["server_asset"]; 69 userData.UserAssetURI = (string) data["server_asset"];
70 userData.FirstLifeAboutText = (string) data["profile_firstlife_about"]; 70 userData.FirstLifeAboutText = (string) data["profile_firstlife_about"];
71 userData.FirstLifeImage = new LLUUID((string) data["profile_firstlife_image"]); 71 userData.FirstLifeImage = new UUID((string) data["profile_firstlife_image"]);
72 userData.CanDoMask = Convert.ToUInt32((string) data["profile_can_do"]); 72 userData.CanDoMask = Convert.ToUInt32((string) data["profile_can_do"]);
73 userData.WantDoMask = Convert.ToUInt32(data["profile_want_do"]); 73 userData.WantDoMask = Convert.ToUInt32(data["profile_want_do"]);
74 userData.AboutText = (string)data["profile_about"]; 74 userData.AboutText = (string)data["profile_about"];
75 userData.Image = new LLUUID((string) data["profile_image"]); 75 userData.Image = new UUID((string) data["profile_image"]);
76 userData.LastLogin = Convert.ToInt32((string) data["profile_lastlogin"]); 76 userData.LastLogin = Convert.ToInt32((string) data["profile_lastlogin"]);
77 userData.HomeRegion = Convert.ToUInt64((string) data["home_region"]); 77 userData.HomeRegion = Convert.ToUInt64((string) data["home_region"]);
78 if (data.Contains("home_region_id")) 78 if (data.Contains("home_region_id"))
79 userData.HomeRegionID = new LLUUID((string)data["home_region_id"]); 79 userData.HomeRegionID = new UUID((string)data["home_region_id"]);
80 else 80 else
81 userData.HomeRegionID = LLUUID.Zero; 81 userData.HomeRegionID = UUID.Zero;
82 userData.HomeLocation = 82 userData.HomeLocation =
83 new LLVector3((float) Convert.ToDecimal((string) data["home_coordinates_x"]), 83 new Vector3((float) Convert.ToDecimal((string) data["home_coordinates_x"]),
84 (float) Convert.ToDecimal((string) data["home_coordinates_y"]), 84 (float) Convert.ToDecimal((string) data["home_coordinates_y"]),
85 (float) Convert.ToDecimal((string) data["home_coordinates_z"])); 85 (float) Convert.ToDecimal((string) data["home_coordinates_z"]));
86 userData.HomeLookAt = 86 userData.HomeLookAt =
87 new LLVector3((float) Convert.ToDecimal((string) data["home_look_x"]), 87 new Vector3((float) Convert.ToDecimal((string) data["home_look_x"]),
88 (float) Convert.ToDecimal((string) data["home_look_y"]), 88 (float) Convert.ToDecimal((string) data["home_look_y"]),
89 (float) Convert.ToDecimal((string) data["home_look_z"])); 89 (float) Convert.ToDecimal((string) data["home_look_z"]));
90 if (data.Contains("user_flags")) 90 if (data.Contains("user_flags"))
@@ -100,9 +100,9 @@ namespace OpenSim.Region.Communications.OGS1
100 userData.CustomType = ""; 100 userData.CustomType = "";
101 101
102 if (data.Contains("partner")) 102 if (data.Contains("partner"))
103 userData.Partner = new LLUUID((string) data["partner"]); 103 userData.Partner = new UUID((string) data["partner"]);
104 else 104 else
105 userData.Partner = LLUUID.Zero; 105 userData.Partner = UUID.Zero;
106 106
107 return userData; 107 return userData;
108 } 108 }
@@ -112,7 +112,7 @@ namespace OpenSim.Region.Communications.OGS1
112 /// </summary> 112 /// </summary>
113 /// <param name="avatarID"></param> 113 /// <param name="avatarID"></param>
114 /// <returns>null if the request fails</returns> 114 /// <returns>null if the request fails</returns>
115 public UserAgentData GetAgentByUUID(LLUUID userId) 115 public UserAgentData GetAgentByUUID(UUID userId)
116 { 116 {
117 try 117 try
118 { 118 {
@@ -131,11 +131,11 @@ namespace OpenSim.Region.Communications.OGS1
131 "): " + (string)respData["error_desc"]); 131 "): " + (string)respData["error_desc"]);
132 return null; 132 return null;
133 } 133 }
134 LLUUID sessionid = LLUUID.Zero; 134 UUID sessionid = UUID.Zero;
135 135
136 UserAgentData userAgent = new UserAgentData(); 136 UserAgentData userAgent = new UserAgentData();
137 userAgent.Handle = Convert.ToUInt64((string)respData["handle"]); 137 userAgent.Handle = Convert.ToUInt64((string)respData["handle"]);
138 Helpers.TryParse((string)respData["sessionid"], out sessionid); 138 UUID.TryParse((string)respData["sessionid"], out sessionid);
139 userAgent.SessionID = sessionid; 139 userAgent.SessionID = sessionid;
140 140
141 if ((string)respData["agent_online"] == "TRUE") 141 if ((string)respData["agent_online"] == "TRUE")
@@ -183,17 +183,17 @@ namespace OpenSim.Region.Communications.OGS1
183 } 183 }
184 } 184 }
185 185
186 public List<AvatarPickerAvatar> ConvertXMLRPCDataToAvatarPickerList(LLUUID queryID, Hashtable data) 186 public List<AvatarPickerAvatar> ConvertXMLRPCDataToAvatarPickerList(UUID queryID, Hashtable data)
187 { 187 {
188 List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>(); 188 List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>();
189 int pickercount = Convert.ToInt32((string) data["avcount"]); 189 int pickercount = Convert.ToInt32((string) data["avcount"]);
190 LLUUID respqueryID = new LLUUID((string) data["queryid"]); 190 UUID respqueryID = new UUID((string) data["queryid"]);
191 if (queryID == respqueryID) 191 if (queryID == respqueryID)
192 { 192 {
193 for (int i = 0; i < pickercount; i++) 193 for (int i = 0; i < pickercount; i++)
194 { 194 {
195 AvatarPickerAvatar apicker = new AvatarPickerAvatar(); 195 AvatarPickerAvatar apicker = new AvatarPickerAvatar();
196 LLUUID avatarID = new LLUUID((string) data["avatarid" + i.ToString()]); 196 UUID avatarID = new UUID((string) data["avatarid" + i.ToString()]);
197 string firstname = (string) data["firstname" + i.ToString()]; 197 string firstname = (string) data["firstname" + i.ToString()];
198 string lastname = (string) data["lastname" + i.ToString()]; 198 string lastname = (string) data["lastname" + i.ToString()];
199 apicker.AvatarID = avatarID; 199 apicker.AvatarID = avatarID;
@@ -219,8 +219,8 @@ namespace OpenSim.Region.Communications.OGS1
219 { 219 {
220 FriendListItem buddylistitem = new FriendListItem(); 220 FriendListItem buddylistitem = new FriendListItem();
221 221
222 buddylistitem.FriendListOwner = new LLUUID((string)data["ownerID" + i.ToString()]); 222 buddylistitem.FriendListOwner = new UUID((string)data["ownerID" + i.ToString()]);
223 buddylistitem.Friend = new LLUUID((string)data["friendID" + i.ToString()]); 223 buddylistitem.Friend = new UUID((string)data["friendID" + i.ToString()]);
224 buddylistitem.FriendListOwnerPerms = (uint)Convert.ToInt32((string)data["ownerPerms" + i.ToString()]); 224 buddylistitem.FriendListOwnerPerms = (uint)Convert.ToInt32((string)data["ownerPerms" + i.ToString()]);
225 buddylistitem.FriendPerms = (uint)Convert.ToInt32((string)data["friendPerms" + i.ToString()]); 225 buddylistitem.FriendPerms = (uint)Convert.ToInt32((string)data["friendPerms" + i.ToString()]);
226 226
@@ -239,11 +239,11 @@ namespace OpenSim.Region.Communications.OGS1
239 /// <param name="posx">final position x</param> 239 /// <param name="posx">final position x</param>
240 /// <param name="posy">final position y</param> 240 /// <param name="posy">final position y</param>
241 /// <param name="posz">final position z</param> 241 /// <param name="posz">final position z</param>
242 public void LogOffUser(LLUUID userid, LLUUID regionid, ulong regionhandle, float posx, float posy, float posz) 242 public void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, float posx, float posy, float posz)
243 { 243 {
244 Hashtable param = new Hashtable(); 244 Hashtable param = new Hashtable();
245 param["avatar_uuid"] = userid.UUID.ToString(); 245 param["avatar_uuid"] = userid.ToString();
246 param["region_uuid"] = regionid.UUID.ToString(); 246 param["region_uuid"] = regionid.ToString();
247 param["region_handle"] = regionhandle.ToString(); 247 param["region_handle"] = regionhandle.ToString();
248 param["region_pos_x"] = posx.ToString(); 248 param["region_pos_x"] = posx.ToString();
249 param["region_pos_y"] = posy.ToString(); 249 param["region_pos_y"] = posy.ToString();
@@ -268,7 +268,7 @@ namespace OpenSim.Region.Communications.OGS1
268 return GetUserProfile(firstName + " " + lastName); 268 return GetUserProfile(firstName + " " + lastName);
269 } 269 }
270 270
271 public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) 271 public void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle)
272 { 272 {
273 Hashtable param = new Hashtable(); 273 Hashtable param = new Hashtable();
274 param.Add("avatar_id", avatarid.ToString()); 274 param.Add("avatar_id", avatarid.ToString());
@@ -320,7 +320,7 @@ namespace OpenSim.Region.Communications.OGS1
320 } 320 }
321 } 321 }
322 322
323 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(LLUUID queryID, string query) 323 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(UUID queryID, string query)
324 { 324 {
325 List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>(); 325 List<AvatarPickerAvatar> pickerlist = new List<AvatarPickerAvatar>();
326 Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9 ]"); 326 Regex objAlphaNumericPattern = new Regex("[^a-zA-Z0-9 ]");
@@ -379,7 +379,7 @@ namespace OpenSim.Region.Communications.OGS1
379 /// </summary> 379 /// </summary>
380 /// <param name="avatarID"></param> 380 /// <param name="avatarID"></param>
381 /// <returns>null if the request fails</returns> 381 /// <returns>null if the request fails</returns>
382 public UserProfileData GetUserProfile(LLUUID avatarID) 382 public UserProfileData GetUserProfile(UUID avatarID)
383 { 383 {
384 try 384 try
385 { 385 {
@@ -404,7 +404,7 @@ namespace OpenSim.Region.Communications.OGS1
404 } 404 }
405 405
406 406
407 public void ClearUserAgent(LLUUID avatarID) 407 public void ClearUserAgent(UUID avatarID)
408 { 408 {
409 // TODO: implement 409 // TODO: implement
410 } 410 }
@@ -435,7 +435,7 @@ namespace OpenSim.Region.Communications.OGS1
435 /// </summary> 435 /// </summary>
436 /// <param name="uuid"></param> 436 /// <param name="uuid"></param>
437 /// <returns></returns> 437 /// <returns></returns>
438 public UserProfileData SetupMasterUser(LLUUID uuid) 438 public UserProfileData SetupMasterUser(UUID uuid)
439 { 439 {
440 UserProfileData data = GetUserProfile(uuid); 440 UserProfileData data = GetUserProfile(uuid);
441 441
@@ -448,7 +448,7 @@ namespace OpenSim.Region.Communications.OGS1
448 return data; 448 return data;
449 } 449 }
450 450
451 public LLUUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY) 451 public UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY)
452 { 452 {
453 throw new Exception("The method or operation is not implemented."); 453 throw new Exception("The method or operation is not implemented.");
454 } 454 }
@@ -523,13 +523,13 @@ namespace OpenSim.Region.Communications.OGS1
523 /// <param name="friendlistowner">The agent that who's friends list is being added to</param> 523 /// <param name="friendlistowner">The agent that who's friends list is being added to</param>
524 /// <param name="friend">The agent that being added to the friends list of the friends list owner</param> 524 /// <param name="friend">The agent that being added to the friends list of the friends list owner</param>
525 /// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param> 525 /// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param>
526 public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) 526 public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms)
527 { 527 {
528 try 528 try
529 { 529 {
530 Hashtable param = new Hashtable(); 530 Hashtable param = new Hashtable();
531 param["ownerID"] = friendlistowner.UUID.ToString(); 531 param["ownerID"] = friendlistowner.ToString();
532 param["friendID"] = friend.UUID.ToString(); 532 param["friendID"] = friend.ToString();
533 param["friendPerms"] = perms.ToString(); 533 param["friendPerms"] = perms.ToString();
534 IList parameters = new ArrayList(); 534 IList parameters = new ArrayList();
535 parameters.Add(param); 535 parameters.Add(param);
@@ -575,13 +575,13 @@ namespace OpenSim.Region.Communications.OGS1
575 /// </summary> 575 /// </summary>
576 /// <param name="friendlistowner">The agent that who's friends list is being updated</param> 576 /// <param name="friendlistowner">The agent that who's friends list is being updated</param>
577 /// <param name="friend">The Ex-friend agent</param> 577 /// <param name="friend">The Ex-friend agent</param>
578 public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) 578 public void RemoveUserFriend(UUID friendlistowner, UUID friend)
579 { 579 {
580 try 580 try
581 { 581 {
582 Hashtable param = new Hashtable(); 582 Hashtable param = new Hashtable();
583 param["ownerID"] = friendlistowner.UUID.ToString(); 583 param["ownerID"] = friendlistowner.ToString();
584 param["friendID"] = friend.UUID.ToString(); 584 param["friendID"] = friend.ToString();
585 585
586 IList parameters = new ArrayList(); 586 IList parameters = new ArrayList();
587 parameters.Add(param); 587 parameters.Add(param);
@@ -627,13 +627,13 @@ namespace OpenSim.Region.Communications.OGS1
627 /// <param name="friendlistowner">The agent that who's friends list is being updated</param> 627 /// <param name="friendlistowner">The agent that who's friends list is being updated</param>
628 /// <param name="friend">The agent that is getting or loosing permissions</param> 628 /// <param name="friend">The agent that is getting or loosing permissions</param>
629 /// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param> 629 /// <param name="perms">A uint bit vector for set perms that the friend being added has; 0 = none, 1=This friend can see when they sign on, 2 = map, 4 edit objects </param>
630 public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) 630 public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms)
631 { 631 {
632 try 632 try
633 { 633 {
634 Hashtable param = new Hashtable(); 634 Hashtable param = new Hashtable();
635 param["ownerID"] = friendlistowner.UUID.ToString(); 635 param["ownerID"] = friendlistowner.ToString();
636 param["friendID"] = friend.UUID.ToString(); 636 param["friendID"] = friend.ToString();
637 param["friendPerms"] = perms.ToString(); 637 param["friendPerms"] = perms.ToString();
638 IList parameters = new ArrayList(); 638 IList parameters = new ArrayList();
639 parameters.Add(param); 639 parameters.Add(param);
@@ -672,17 +672,17 @@ namespace OpenSim.Region.Communications.OGS1
672 } 672 }
673 } 673 }
674 /// <summary> 674 /// <summary>
675 /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for LLUUID friendslistowner 675 /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for UUID friendslistowner
676 /// </summary> 676 /// </summary>
677 /// <param name="friendlistowner">The agent that we're retreiving the friends Data.</param> 677 /// <param name="friendlistowner">The agent that we're retreiving the friends Data.</param>
678 public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) 678 public List<FriendListItem> GetUserFriendList(UUID friendlistowner)
679 { 679 {
680 List<FriendListItem> buddylist = new List<FriendListItem>(); 680 List<FriendListItem> buddylist = new List<FriendListItem>();
681 681
682 try 682 try
683 { 683 {
684 Hashtable param = new Hashtable(); 684 Hashtable param = new Hashtable();
685 param["ownerID"] = friendlistowner.UUID.ToString(); 685 param["ownerID"] = friendlistowner.ToString();
686 686
687 IList parameters = new ArrayList(); 687 IList parameters = new ArrayList();
688 parameters.Add(param); 688 parameters.Add(param);
@@ -708,7 +708,7 @@ namespace OpenSim.Region.Communications.OGS1
708 #endregion 708 #endregion
709 709
710 /// Appearance 710 /// Appearance
711 public AvatarAppearance GetUserAppearance(LLUUID user) 711 public AvatarAppearance GetUserAppearance(UUID user)
712 { 712 {
713 AvatarAppearance appearance = null; 713 AvatarAppearance appearance = null;
714 714
@@ -733,7 +733,7 @@ namespace OpenSim.Region.Communications.OGS1
733 return appearance; 733 return appearance;
734 } 734 }
735 735
736 public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) 736 public void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
737 { 737 {
738 try 738 try
739 { 739 {