diff options
Diffstat (limited to 'OpenSim/Services/Interfaces')
-rw-r--r-- | OpenSim/Services/Interfaces/IAttachmentsService.cs | 17 | ||||
-rw-r--r-- | OpenSim/Services/Interfaces/IAuthenticationService.cs | 1 | ||||
-rw-r--r-- | OpenSim/Services/Interfaces/IAvatarService.cs | 50 | ||||
-rw-r--r-- | OpenSim/Services/Interfaces/IBakedTextureService.cs | 17 | ||||
-rw-r--r-- | OpenSim/Services/Interfaces/IGridService.cs | 14 | ||||
-rw-r--r-- | OpenSim/Services/Interfaces/ISimulationService.cs | 8 | ||||
-rw-r--r-- | OpenSim/Services/Interfaces/IUserAccountService.cs | 5 |
7 files changed, 100 insertions, 12 deletions
diff --git a/OpenSim/Services/Interfaces/IAttachmentsService.cs b/OpenSim/Services/Interfaces/IAttachmentsService.cs new file mode 100644 index 0000000..bdde369 --- /dev/null +++ b/OpenSim/Services/Interfaces/IAttachmentsService.cs | |||
@@ -0,0 +1,17 @@ | |||
1 | //////////////////////////////////////////////////////////////// | ||
2 | // | ||
3 | // (c) 2009, 2010 Careminster Limited and Melanie Thielker | ||
4 | // | ||
5 | // All rights reserved | ||
6 | // | ||
7 | using System; | ||
8 | using Nini.Config; | ||
9 | |||
10 | namespace OpenSim.Services.Interfaces | ||
11 | { | ||
12 | public interface IAttachmentsService | ||
13 | { | ||
14 | string Get(string id); | ||
15 | void Store(string id, string data); | ||
16 | } | ||
17 | } | ||
diff --git a/OpenSim/Services/Interfaces/IAuthenticationService.cs b/OpenSim/Services/Interfaces/IAuthenticationService.cs index cee8bc0..cdcfad9 100644 --- a/OpenSim/Services/Interfaces/IAuthenticationService.cs +++ b/OpenSim/Services/Interfaces/IAuthenticationService.cs | |||
@@ -67,6 +67,7 @@ namespace OpenSim.Services.Interfaces | |||
67 | // various services. | 67 | // various services. |
68 | // | 68 | // |
69 | string Authenticate(UUID principalID, string password, int lifetime); | 69 | string Authenticate(UUID principalID, string password, int lifetime); |
70 | string Authenticate(UUID principalID, string password, int lifetime, out UUID realID); | ||
70 | 71 | ||
71 | ////////////////////////////////////////////////////// | 72 | ////////////////////////////////////////////////////// |
72 | // Verification | 73 | // Verification |
diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index 863fd93..3663a7a 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs | |||
@@ -162,10 +162,16 @@ namespace OpenSim.Services.Interfaces | |||
162 | } | 162 | } |
163 | 163 | ||
164 | // Visual Params | 164 | // Visual Params |
165 | string[] vps = new string[AvatarAppearance.VISUALPARAM_COUNT]; | 165 | // string[] vps = new string[AvatarAppearance.VISUALPARAM_COUNT]; |
166 | // byte[] binary = appearance.VisualParams; | ||
167 | |||
168 | // for (int i = 0 ; i < AvatarAppearance.VISUALPARAM_COUNT ; i++) | ||
169 | |||
170 | |||
166 | byte[] binary = appearance.VisualParams; | 171 | byte[] binary = appearance.VisualParams; |
172 | string[] vps = new string[binary.Length]; | ||
167 | 173 | ||
168 | for (int i = 0 ; i < AvatarAppearance.VISUALPARAM_COUNT ; i++) | 174 | for (int i = 0; i < binary.Length; i++) |
169 | { | 175 | { |
170 | vps[i] = binary[i].ToString(); | 176 | vps[i] = binary[i].ToString(); |
171 | } | 177 | } |
@@ -174,11 +180,18 @@ namespace OpenSim.Services.Interfaces | |||
174 | 180 | ||
175 | // Attachments | 181 | // Attachments |
176 | List<AvatarAttachment> attachments = appearance.GetAttachments(); | 182 | List<AvatarAttachment> attachments = appearance.GetAttachments(); |
183 | Dictionary<int, List<string>> atts = new Dictionary<int, List<string>>(); | ||
177 | foreach (AvatarAttachment attach in attachments) | 184 | foreach (AvatarAttachment attach in attachments) |
178 | { | 185 | { |
179 | if (attach.ItemID != UUID.Zero) | 186 | if (attach.ItemID != UUID.Zero) |
180 | Data["_ap_" + attach.AttachPoint] = attach.ItemID.ToString(); | 187 | { |
188 | if (!atts.ContainsKey(attach.AttachPoint)) | ||
189 | atts[attach.AttachPoint] = new List<string>(); | ||
190 | atts[attach.AttachPoint].Add(attach.ItemID.ToString()); | ||
191 | } | ||
181 | } | 192 | } |
193 | foreach (KeyValuePair<int, List<string>> kvp in atts) | ||
194 | Data["_ap_" + kvp.Key] = string.Join(",", kvp.Value.ToArray()); | ||
182 | } | 195 | } |
183 | 196 | ||
184 | public AvatarAppearance ToAvatarAppearance() | 197 | public AvatarAppearance ToAvatarAppearance() |
@@ -195,7 +208,13 @@ namespace OpenSim.Services.Interfaces | |||
195 | appearance.Serial = Int32.Parse(Data["Serial"]); | 208 | appearance.Serial = Int32.Parse(Data["Serial"]); |
196 | 209 | ||
197 | if (Data.ContainsKey("AvatarHeight")) | 210 | if (Data.ContainsKey("AvatarHeight")) |
198 | appearance.AvatarHeight = float.Parse(Data["AvatarHeight"]); | 211 | { |
212 | float h = float.Parse(Data["AvatarHeight"]); | ||
213 | if( h == 0f) | ||
214 | h = 1.9f; | ||
215 | appearance.SetSize(new Vector3(0.45f, 0.6f, h )); | ||
216 | // appearance.AvatarHeight = float.Parse(Data["AvatarHeight"]); | ||
217 | } | ||
199 | 218 | ||
200 | // Legacy Wearables | 219 | // Legacy Wearables |
201 | if (Data.ContainsKey("BodyItem")) | 220 | if (Data.ContainsKey("BodyItem")) |
@@ -266,10 +285,14 @@ namespace OpenSim.Services.Interfaces | |||
266 | if (Data.ContainsKey("VisualParams")) | 285 | if (Data.ContainsKey("VisualParams")) |
267 | { | 286 | { |
268 | string[] vps = Data["VisualParams"].Split(new char[] {','}); | 287 | string[] vps = Data["VisualParams"].Split(new char[] {','}); |
269 | byte[] binary = new byte[AvatarAppearance.VISUALPARAM_COUNT]; | 288 | // byte[] binary = new byte[AvatarAppearance.VISUALPARAM_COUNT]; |
270 | 289 | ||
271 | for (int i = 0 ; i < vps.Length && i < binary.Length ; i++) | 290 | // for (int i = 0 ; i < vps.Length && i < binary.Length ; i++) |
272 | binary[i] = (byte)Convert.ToInt32(vps[i]); | 291 | byte[] binary = new byte[vps.Length]; |
292 | |||
293 | for (int i = 0; i < vps.Length; i++) | ||
294 | |||
295 | binary[i] = (byte)Convert.ToInt32(vps[i]); | ||
273 | 296 | ||
274 | appearance.VisualParams = binary; | 297 | appearance.VisualParams = binary; |
275 | } | 298 | } |
@@ -304,10 +327,16 @@ namespace OpenSim.Services.Interfaces | |||
304 | if (!Int32.TryParse(pointStr, out point)) | 327 | if (!Int32.TryParse(pointStr, out point)) |
305 | continue; | 328 | continue; |
306 | 329 | ||
307 | UUID uuid = UUID.Zero; | 330 | List<string> idList = new List<string>(_kvp.Value.Split(new char[] {','})); |
308 | UUID.TryParse(_kvp.Value, out uuid); | 331 | |
332 | appearance.SetAttachment(point, UUID.Zero, UUID.Zero); | ||
333 | foreach (string id in idList) | ||
334 | { | ||
335 | UUID uuid = UUID.Zero; | ||
336 | UUID.TryParse(id, out uuid); | ||
309 | 337 | ||
310 | appearance.SetAttachment(point, uuid, UUID.Zero); | 338 | appearance.SetAttachment(point | 0x80, uuid, UUID.Zero); |
339 | } | ||
311 | } | 340 | } |
312 | 341 | ||
313 | if (appearance.Wearables[AvatarWearable.BODY].Count == 0) | 342 | if (appearance.Wearables[AvatarWearable.BODY].Count == 0) |
@@ -329,6 +358,7 @@ namespace OpenSim.Services.Interfaces | |||
329 | appearance.Wearables[AvatarWearable.EYES].Wear( | 358 | appearance.Wearables[AvatarWearable.EYES].Wear( |
330 | AvatarWearable.DefaultWearables[ | 359 | AvatarWearable.DefaultWearables[ |
331 | AvatarWearable.EYES][0]); | 360 | AvatarWearable.EYES][0]); |
361 | |||
332 | } | 362 | } |
333 | catch | 363 | catch |
334 | { | 364 | { |
diff --git a/OpenSim/Services/Interfaces/IBakedTextureService.cs b/OpenSim/Services/Interfaces/IBakedTextureService.cs new file mode 100644 index 0000000..8206ecd --- /dev/null +++ b/OpenSim/Services/Interfaces/IBakedTextureService.cs | |||
@@ -0,0 +1,17 @@ | |||
1 | //////////////////////////////////////////////////////////////// | ||
2 | // | ||
3 | // (c) 2009, 2010 Careminster Limited and Melanie Thielker | ||
4 | // | ||
5 | // All rights reserved | ||
6 | // | ||
7 | using System; | ||
8 | using Nini.Config; | ||
9 | |||
10 | namespace OpenSim.Services.Interfaces | ||
11 | { | ||
12 | public interface IBakedTextureService | ||
13 | { | ||
14 | string Get(string id); | ||
15 | void Store(string id, string data); | ||
16 | } | ||
17 | } | ||
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index d7da056..3f4c958 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs | |||
@@ -337,9 +337,13 @@ namespace OpenSim.Services.Interfaces | |||
337 | } | 337 | } |
338 | catch (SocketException e) | 338 | catch (SocketException e) |
339 | { | 339 | { |
340 | throw new Exception( | 340 | /*throw new Exception( |
341 | "Unable to resolve local hostname " + m_externalHostName + " innerException of type '" + | 341 | "Unable to resolve local hostname " + m_externalHostName + " innerException of type '" + |
342 | e + "' attached to this exception", e); | 342 | e + "' attached to this exception", e);*/ |
343 | // Don't throw a fatal exception here, instead, return Null and handle it in the caller. | ||
344 | // Reason is, on systems such as OSgrid it has occured that known hostnames stop | ||
345 | // resolving and thus make surrounding regions crash out with this exception. | ||
346 | return null; | ||
343 | } | 347 | } |
344 | 348 | ||
345 | return new IPEndPoint(ia, m_internalEndPoint.Port); | 349 | return new IPEndPoint(ia, m_internalEndPoint.Port); |
@@ -398,6 +402,12 @@ namespace OpenSim.Services.Interfaces | |||
398 | if (kvp.ContainsKey("regionName")) | 402 | if (kvp.ContainsKey("regionName")) |
399 | RegionName = (string)kvp["regionName"]; | 403 | RegionName = (string)kvp["regionName"]; |
400 | 404 | ||
405 | if (kvp.ContainsKey("access")) | ||
406 | { | ||
407 | byte access = Convert.ToByte((string)kvp["access"]); | ||
408 | Maturity = (int)Util.ConvertAccessLevelToMaturity(access); | ||
409 | } | ||
410 | |||
401 | if (kvp.ContainsKey("serverIP")) | 411 | if (kvp.ContainsKey("serverIP")) |
402 | { | 412 | { |
403 | //int port = 0; | 413 | //int port = 0; |
diff --git a/OpenSim/Services/Interfaces/ISimulationService.cs b/OpenSim/Services/Interfaces/ISimulationService.cs index b10a85c..a963b8e 100644 --- a/OpenSim/Services/Interfaces/ISimulationService.cs +++ b/OpenSim/Services/Interfaces/ISimulationService.cs | |||
@@ -90,6 +90,14 @@ namespace OpenSim.Services.Interfaces | |||
90 | bool ReleaseAgent(UUID originRegion, UUID id, string uri); | 90 | bool ReleaseAgent(UUID originRegion, UUID id, string uri); |
91 | 91 | ||
92 | /// <summary> | 92 | /// <summary> |
93 | /// Close child agent. | ||
94 | /// </summary> | ||
95 | /// <param name="regionHandle"></param> | ||
96 | /// <param name="id"></param> | ||
97 | /// <returns></returns> | ||
98 | bool CloseChildAgent(GridRegion destination, UUID id); | ||
99 | |||
100 | /// <summary> | ||
93 | /// Close agent. | 101 | /// Close agent. |
94 | /// </summary> | 102 | /// </summary> |
95 | /// <param name="regionHandle"></param> | 103 | /// <param name="regionHandle"></param> |
diff --git a/OpenSim/Services/Interfaces/IUserAccountService.cs b/OpenSim/Services/Interfaces/IUserAccountService.cs index 1b85980..6d5d2a0 100644 --- a/OpenSim/Services/Interfaces/IUserAccountService.cs +++ b/OpenSim/Services/Interfaces/IUserAccountService.cs | |||
@@ -91,6 +91,7 @@ namespace OpenSim.Services.Interfaces | |||
91 | public int UserLevel; | 91 | public int UserLevel; |
92 | public int UserFlags; | 92 | public int UserFlags; |
93 | public string UserTitle; | 93 | public string UserTitle; |
94 | public string UserCountry; | ||
94 | public Boolean LocalToGrid = true; | 95 | public Boolean LocalToGrid = true; |
95 | 96 | ||
96 | public Dictionary<string, object> ServiceURLs; | 97 | public Dictionary<string, object> ServiceURLs; |
@@ -120,6 +121,8 @@ namespace OpenSim.Services.Interfaces | |||
120 | UserFlags = Convert.ToInt32(kvp["UserFlags"].ToString()); | 121 | UserFlags = Convert.ToInt32(kvp["UserFlags"].ToString()); |
121 | if (kvp.ContainsKey("UserTitle")) | 122 | if (kvp.ContainsKey("UserTitle")) |
122 | UserTitle = kvp["UserTitle"].ToString(); | 123 | UserTitle = kvp["UserTitle"].ToString(); |
124 | if (kvp.ContainsKey("UserCountry")) | ||
125 | UserCountry = kvp["UserCountry"].ToString(); | ||
123 | if (kvp.ContainsKey("LocalToGrid")) | 126 | if (kvp.ContainsKey("LocalToGrid")) |
124 | Boolean.TryParse(kvp["LocalToGrid"].ToString(), out LocalToGrid); | 127 | Boolean.TryParse(kvp["LocalToGrid"].ToString(), out LocalToGrid); |
125 | 128 | ||
@@ -155,6 +158,7 @@ namespace OpenSim.Services.Interfaces | |||
155 | result["UserLevel"] = UserLevel.ToString(); | 158 | result["UserLevel"] = UserLevel.ToString(); |
156 | result["UserFlags"] = UserFlags.ToString(); | 159 | result["UserFlags"] = UserFlags.ToString(); |
157 | result["UserTitle"] = UserTitle; | 160 | result["UserTitle"] = UserTitle; |
161 | result["UserCountry"] = UserCountry; | ||
158 | result["LocalToGrid"] = LocalToGrid.ToString(); | 162 | result["LocalToGrid"] = LocalToGrid.ToString(); |
159 | 163 | ||
160 | string str = string.Empty; | 164 | string str = string.Empty; |
@@ -182,6 +186,7 @@ namespace OpenSim.Services.Interfaces | |||
182 | /// <param name="query"></param> | 186 | /// <param name="query"></param> |
183 | /// <returns></returns> | 187 | /// <returns></returns> |
184 | List<UserAccount> GetUserAccounts(UUID scopeID, string query); | 188 | List<UserAccount> GetUserAccounts(UUID scopeID, string query); |
189 | List<UserAccount> GetUserAccountsWhere(UUID scopeID, string where); | ||
185 | 190 | ||
186 | /// <summary> | 191 | /// <summary> |
187 | /// Store the data given, wich replaces the stored data, therefore must be complete. | 192 | /// Store the data given, wich replaces the stored data, therefore must be complete. |