aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs
diff options
context:
space:
mode:
authorJeff Ames2008-11-25 16:00:55 +0000
committerJeff Ames2008-11-25 16:00:55 +0000
commit518a8b9f2ac09a5060e2e59c913dfbe7faf397ef (patch)
tree8b3e39fbd54452e031873d31ff099e7db064cdee /OpenSim/Region/Communications/Hypergrid/HGUserServices.cs
parent* minor: eliminate mono compiler warnings (diff)
downloadopensim-SC_OLD-518a8b9f2ac09a5060e2e59c913dfbe7faf397ef.zip
opensim-SC_OLD-518a8b9f2ac09a5060e2e59c913dfbe7faf397ef.tar.gz
opensim-SC_OLD-518a8b9f2ac09a5060e2e59c913dfbe7faf397ef.tar.bz2
opensim-SC_OLD-518a8b9f2ac09a5060e2e59c913dfbe7faf397ef.tar.xz
Update svn properties.
Diffstat (limited to 'OpenSim/Region/Communications/Hypergrid/HGUserServices.cs')
-rw-r--r--OpenSim/Region/Communications/Hypergrid/HGUserServices.cs534
1 files changed, 267 insertions, 267 deletions
diff --git a/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs b/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs
index 0ac39e9..06534be 100644
--- a/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs
+++ b/OpenSim/Region/Communications/Hypergrid/HGUserServices.cs
@@ -1,267 +1,267 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the 12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products 13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission. 14 * derived from this software without specific prior written permission.
15 * 15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY 16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 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 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 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 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. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Net; 31using System.Net;
32using System.Reflection; 32using System.Reflection;
33using System.Text.RegularExpressions; 33using System.Text.RegularExpressions;
34using OpenMetaverse; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using Nwc.XmlRpc; 36using Nwc.XmlRpc;
37using OpenSim.Framework; 37using OpenSim.Framework;
38using OpenSim.Framework.Communications; 38using OpenSim.Framework.Communications;
39using OpenSim.Region.Communications.OGS1; 39using OpenSim.Region.Communications.OGS1;
40 40
41namespace OpenSim.Region.Communications.Hypergrid 41namespace OpenSim.Region.Communications.Hypergrid
42{ 42{
43 /// <summary> 43 /// <summary>
44 /// For the time being, this class is just an identity wrapper around OGS1UserServices, 44 /// For the time being, this class is just an identity wrapper around OGS1UserServices,
45 /// so it always fails for foreign users. 45 /// so it always fails for foreign users.
46 /// Later it needs to talk with the foreign users' user servers. 46 /// Later it needs to talk with the foreign users' user servers.
47 /// </summary> 47 /// </summary>
48 public class HGUserServices : IUserService, IAvatarService, IMessagingService 48 public class HGUserServices : IUserService, IAvatarService, IMessagingService
49 { 49 {
50 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 50 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 51
52 //private HGCommunicationsGridMode m_parent; 52 //private HGCommunicationsGridMode m_parent;
53 private OGS1UserServices m_remoteUserServices; 53 private OGS1UserServices m_remoteUserServices;
54 54
55 public HGUserServices(HGCommunicationsGridMode parent) 55 public HGUserServices(HGCommunicationsGridMode parent)
56 { 56 {
57 //m_parent = parent; 57 //m_parent = parent;
58 m_remoteUserServices = new OGS1UserServices(parent); 58 m_remoteUserServices = new OGS1UserServices(parent);
59 } 59 }
60 60
61 public UserProfileData ConvertXMLRPCDataToUserProfile(Hashtable data) 61 public UserProfileData ConvertXMLRPCDataToUserProfile(Hashtable data)
62 { 62 {
63 return m_remoteUserServices.ConvertXMLRPCDataToUserProfile(data); 63 return m_remoteUserServices.ConvertXMLRPCDataToUserProfile(data);
64 } 64 }
65 65
66 /// <summary> 66 /// <summary>
67 /// Get a user agent from the user server 67 /// Get a user agent from the user server
68 /// </summary> 68 /// </summary>
69 /// <param name="avatarID"></param> 69 /// <param name="avatarID"></param>
70 /// <returns>null if the request fails</returns> 70 /// <returns>null if the request fails</returns>
71 public UserAgentData GetAgentByUUID(UUID userId) 71 public UserAgentData GetAgentByUUID(UUID userId)
72 { 72 {
73 return m_remoteUserServices.GetAgentByUUID(userId); 73 return m_remoteUserServices.GetAgentByUUID(userId);
74 } 74 }
75 75
76 public AvatarAppearance ConvertXMLRPCDataToAvatarAppearance(Hashtable data) 76 public AvatarAppearance ConvertXMLRPCDataToAvatarAppearance(Hashtable data)
77 { 77 {
78 return m_remoteUserServices.ConvertXMLRPCDataToAvatarAppearance(data); 78 return m_remoteUserServices.ConvertXMLRPCDataToAvatarAppearance(data);
79 } 79 }
80 80
81 public List<AvatarPickerAvatar> ConvertXMLRPCDataToAvatarPickerList(UUID queryID, Hashtable data) 81 public List<AvatarPickerAvatar> ConvertXMLRPCDataToAvatarPickerList(UUID queryID, Hashtable data)
82 { 82 {
83 return m_remoteUserServices.ConvertXMLRPCDataToAvatarPickerList(queryID, data); 83 return m_remoteUserServices.ConvertXMLRPCDataToAvatarPickerList(queryID, data);
84 } 84 }
85 85
86 public List<FriendListItem> ConvertXMLRPCDataToFriendListItemList(Hashtable data) 86 public List<FriendListItem> ConvertXMLRPCDataToFriendListItemList(Hashtable data)
87 { 87 {
88 return m_remoteUserServices.ConvertXMLRPCDataToFriendListItemList(data); 88 return m_remoteUserServices.ConvertXMLRPCDataToFriendListItemList(data);
89 } 89 }
90 90
91 /// <summary> 91 /// <summary>
92 /// Logs off a user on the user server 92 /// Logs off a user on the user server
93 /// </summary> 93 /// </summary>
94 /// <param name="UserID">UUID of the user</param> 94 /// <param name="UserID">UUID of the user</param>
95 /// <param name="regionID">UUID of the Region</param> 95 /// <param name="regionID">UUID of the Region</param>
96 /// <param name="regionhandle">regionhandle</param> 96 /// <param name="regionhandle">regionhandle</param>
97 /// <param name="position">final position</param> 97 /// <param name="position">final position</param>
98 /// <param name="lookat">final lookat</param> 98 /// <param name="lookat">final lookat</param>
99 public void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, Vector3 position, Vector3 lookat) 99 public void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, Vector3 position, Vector3 lookat)
100 { 100 {
101 m_remoteUserServices.LogOffUser(userid, regionid, regionhandle, position, lookat); 101 m_remoteUserServices.LogOffUser(userid, regionid, regionhandle, position, lookat);
102 } 102 }
103 103
104 /// <summary> 104 /// <summary>
105 /// Logs off a user on the user server (deprecated as of 2008-08-27) 105 /// Logs off a user on the user server (deprecated as of 2008-08-27)
106 /// </summary> 106 /// </summary>
107 /// <param name="UserID">UUID of the user</param> 107 /// <param name="UserID">UUID of the user</param>
108 /// <param name="regionID">UUID of the Region</param> 108 /// <param name="regionID">UUID of the Region</param>
109 /// <param name="regionhandle">regionhandle</param> 109 /// <param name="regionhandle">regionhandle</param>
110 /// <param name="posx">final position x</param> 110 /// <param name="posx">final position x</param>
111 /// <param name="posy">final position y</param> 111 /// <param name="posy">final position y</param>
112 /// <param name="posz">final position z</param> 112 /// <param name="posz">final position z</param>
113 public void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, float posx, float posy, float posz) 113 public void LogOffUser(UUID userid, UUID regionid, ulong regionhandle, float posx, float posy, float posz)
114 { 114 {
115 m_remoteUserServices.LogOffUser(userid, regionid, regionhandle, posx, posy, posz); 115 m_remoteUserServices.LogOffUser(userid, regionid, regionhandle, posx, posy, posz);
116 } 116 }
117 117
118 public UserProfileData GetUserProfile(string firstName, string lastName) 118 public UserProfileData GetUserProfile(string firstName, string lastName)
119 { 119 {
120 return GetUserProfile(firstName + " " + lastName); 120 return GetUserProfile(firstName + " " + lastName);
121 } 121 }
122 122
123 public void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle) 123 public void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle)
124 { 124 {
125 m_remoteUserServices.UpdateUserCurrentRegion(avatarid, regionuuid, regionhandle); 125 m_remoteUserServices.UpdateUserCurrentRegion(avatarid, regionuuid, regionhandle);
126 } 126 }
127 127
128 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(UUID queryID, string query) 128 public List<AvatarPickerAvatar> GenerateAgentPickerRequestResponse(UUID queryID, string query)
129 { 129 {
130 return m_remoteUserServices.GenerateAgentPickerRequestResponse(queryID, query); 130 return m_remoteUserServices.GenerateAgentPickerRequestResponse(queryID, query);
131 } 131 }
132 132
133 /// <summary> 133 /// <summary>
134 /// Get a user profile from the user server 134 /// Get a user profile from the user server
135 /// </summary> 135 /// </summary>
136 /// <param name="avatarID"></param> 136 /// <param name="avatarID"></param>
137 /// <returns>null if the request fails</returns> 137 /// <returns>null if the request fails</returns>
138 public UserProfileData GetUserProfile(string name) 138 public UserProfileData GetUserProfile(string name)
139 { 139 {
140 return m_remoteUserServices.GetUserProfile(name); 140 return m_remoteUserServices.GetUserProfile(name);
141 } 141 }
142 142
143 /// <summary> 143 /// <summary>
144 /// Get a user profile from the user server 144 /// Get a user profile from the user server
145 /// </summary> 145 /// </summary>
146 /// <param name="avatarID"></param> 146 /// <param name="avatarID"></param>
147 /// <returns>null if the request fails</returns> 147 /// <returns>null if the request fails</returns>
148 public UserProfileData GetUserProfile(UUID avatarID) 148 public UserProfileData GetUserProfile(UUID avatarID)
149 { 149 {
150 return m_remoteUserServices.GetUserProfile(avatarID); 150 return m_remoteUserServices.GetUserProfile(avatarID);
151 } 151 }
152 152
153 153
154 public void ClearUserAgent(UUID avatarID) 154 public void ClearUserAgent(UUID avatarID)
155 { 155 {
156 m_remoteUserServices.ClearUserAgent(avatarID); 156 m_remoteUserServices.ClearUserAgent(avatarID);
157 } 157 }
158 158
159 /// <summary> 159 /// <summary>
160 /// Retrieve the user information for the given master uuid. 160 /// Retrieve the user information for the given master uuid.
161 /// </summary> 161 /// </summary>
162 /// <param name="uuid"></param> 162 /// <param name="uuid"></param>
163 /// <returns></returns> 163 /// <returns></returns>
164 public UserProfileData SetupMasterUser(string firstName, string lastName) 164 public UserProfileData SetupMasterUser(string firstName, string lastName)
165 { 165 {
166 return m_remoteUserServices.SetupMasterUser(firstName, lastName); 166 return m_remoteUserServices.SetupMasterUser(firstName, lastName);
167 } 167 }
168 168
169 /// <summary> 169 /// <summary>
170 /// Retrieve the user information for the given master uuid. 170 /// Retrieve the user information for the given master uuid.
171 /// </summary> 171 /// </summary>
172 /// <param name="uuid"></param> 172 /// <param name="uuid"></param>
173 /// <returns></returns> 173 /// <returns></returns>
174 public UserProfileData SetupMasterUser(string firstName, string lastName, string password) 174 public UserProfileData SetupMasterUser(string firstName, string lastName, string password)
175 { 175 {
176 return m_remoteUserServices.SetupMasterUser(firstName, lastName, password); 176 return m_remoteUserServices.SetupMasterUser(firstName, lastName, password);
177 } 177 }
178 178
179 /// <summary> 179 /// <summary>
180 /// Retrieve the user information for the given master uuid. 180 /// Retrieve the user information for the given master uuid.
181 /// </summary> 181 /// </summary>
182 /// <param name="uuid"></param> 182 /// <param name="uuid"></param>
183 /// <returns></returns> 183 /// <returns></returns>
184 public UserProfileData SetupMasterUser(UUID uuid) 184 public UserProfileData SetupMasterUser(UUID uuid)
185 { 185 {
186 return m_remoteUserServices.SetupMasterUser(uuid); 186 return m_remoteUserServices.SetupMasterUser(uuid);
187 } 187 }
188 188
189 public UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY) 189 public UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY)
190 { 190 {
191 return m_remoteUserServices.AddUserProfile(firstName, lastName, pass, regX, regY); 191 return m_remoteUserServices.AddUserProfile(firstName, lastName, pass, regX, regY);
192 } 192 }
193 193
194 public bool ResetUserPassword(string firstName, string lastName, string newPassword) 194 public bool ResetUserPassword(string firstName, string lastName, string newPassword)
195 { 195 {
196 return m_remoteUserServices.ResetUserPassword(firstName, lastName, newPassword); 196 return m_remoteUserServices.ResetUserPassword(firstName, lastName, newPassword);
197 } 197 }
198 198
199 public bool UpdateUserProfile(UserProfileData userProfile) 199 public bool UpdateUserProfile(UserProfileData userProfile)
200 { 200 {
201 return m_remoteUserServices.UpdateUserProfile(userProfile); 201 return m_remoteUserServices.UpdateUserProfile(userProfile);
202 } 202 }
203 203
204 #region IUserServices Friend Methods 204 #region IUserServices Friend Methods
205 /// <summary> 205 /// <summary>
206 /// Adds a new friend to the database for XUser 206 /// Adds a new friend to the database for XUser
207 /// </summary> 207 /// </summary>
208 /// <param name="friendlistowner">The agent that who's friends list is being added to</param> 208 /// <param name="friendlistowner">The agent that who's friends list is being added to</param>
209 /// <param name="friend">The agent that being added to the friends list of the friends list owner</param> 209 /// <param name="friend">The agent that being added to the friends list of the friends list owner</param>
210 /// <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> 210 /// <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>
211 public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms) 211 public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms)
212 { 212 {
213 m_remoteUserServices.AddNewUserFriend(friendlistowner, friend, perms); 213 m_remoteUserServices.AddNewUserFriend(friendlistowner, friend, perms);
214 } 214 }
215 215
216 /// <summary> 216 /// <summary>
217 /// Delete friend on friendlistowner's friendlist. 217 /// Delete friend on friendlistowner's friendlist.
218 /// </summary> 218 /// </summary>
219 /// <param name="friendlistowner">The agent that who's friends list is being updated</param> 219 /// <param name="friendlistowner">The agent that who's friends list is being updated</param>
220 /// <param name="friend">The Ex-friend agent</param> 220 /// <param name="friend">The Ex-friend agent</param>
221 public void RemoveUserFriend(UUID friendlistowner, UUID friend) 221 public void RemoveUserFriend(UUID friendlistowner, UUID friend)
222 { 222 {
223 m_remoteUserServices.RemoveUserFriend(friend, friend); 223 m_remoteUserServices.RemoveUserFriend(friend, friend);
224 } 224 }
225 225
226 /// <summary> 226 /// <summary>
227 /// Update permissions for friend on friendlistowner's friendlist. 227 /// Update permissions for friend on friendlistowner's friendlist.
228 /// </summary> 228 /// </summary>
229 /// <param name="friendlistowner">The agent that who's friends list is being updated</param> 229 /// <param name="friendlistowner">The agent that who's friends list is being updated</param>
230 /// <param name="friend">The agent that is getting or loosing permissions</param> 230 /// <param name="friend">The agent that is getting or loosing permissions</param>
231 /// <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> 231 /// <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>
232 public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms) 232 public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms)
233 { 233 {
234 m_remoteUserServices.UpdateUserFriendPerms(friendlistowner, friend, perms); 234 m_remoteUserServices.UpdateUserFriendPerms(friendlistowner, friend, perms);
235 } 235 }
236 /// <summary> 236 /// <summary>
237 /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for UUID friendslistowner 237 /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for UUID friendslistowner
238 /// </summary> 238 /// </summary>
239 /// <param name="friendlistowner">The agent that we're retreiving the friends Data.</param> 239 /// <param name="friendlistowner">The agent that we're retreiving the friends Data.</param>
240 public List<FriendListItem> GetUserFriendList(UUID friendlistowner) 240 public List<FriendListItem> GetUserFriendList(UUID friendlistowner)
241 { 241 {
242 return m_remoteUserServices.GetUserFriendList(friendlistowner); 242 return m_remoteUserServices.GetUserFriendList(friendlistowner);
243 } 243 }
244 244
245 #endregion 245 #endregion
246 246
247 /// Appearance 247 /// Appearance
248 public AvatarAppearance GetUserAppearance(UUID user) 248 public AvatarAppearance GetUserAppearance(UUID user)
249 { 249 {
250 return m_remoteUserServices.GetUserAppearance(user); 250 return m_remoteUserServices.GetUserAppearance(user);
251 } 251 }
252 252
253 public void UpdateUserAppearance(UUID user, AvatarAppearance appearance) 253 public void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
254 { 254 {
255 m_remoteUserServices.UpdateUserAppearance(user, appearance); 255 m_remoteUserServices.UpdateUserAppearance(user, appearance);
256 } 256 }
257 257
258 #region IMessagingService 258 #region IMessagingService
259 259
260 public Dictionary<UUID, FriendRegionInfo> GetFriendRegionInfos(List<UUID> uuids) 260 public Dictionary<UUID, FriendRegionInfo> GetFriendRegionInfos(List<UUID> uuids)
261 { 261 {
262 return m_remoteUserServices.GetFriendRegionInfos(uuids); 262 return m_remoteUserServices.GetFriendRegionInfos(uuids);
263 } 263 }
264 #endregion 264 #endregion
265 265
266 } 266 }
267} 267}