diff options
author | Sean McNamara | 2011-04-26 11:45:38 -0400 |
---|---|---|
committer | Sean McNamara | 2011-04-26 11:45:38 -0400 |
commit | 587aa91e36216e75f9b293b57c5b974d31e5ec54 (patch) | |
tree | a1c2a4e78cb6414cdebb93c46552dce5bc8e7ea0 /OpenSim | |
parent | Wait for OnOarFileSaved event callback before executing script (diff) | |
parent | Removed stale client components: MXP and VWoHTTP. (diff) | |
download | opensim-SC_OLD-587aa91e36216e75f9b293b57c5b974d31e5ec54.zip opensim-SC_OLD-587aa91e36216e75f9b293b57c5b974d31e5ec54.tar.gz opensim-SC_OLD-587aa91e36216e75f9b293b57c5b974d31e5ec54.tar.bz2 opensim-SC_OLD-587aa91e36216e75f9b293b57c5b974d31e5ec54.tar.xz |
Merge git://opensimulator.org/git/opensim
Diffstat (limited to 'OpenSim')
12 files changed, 47 insertions, 3846 deletions
diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs deleted file mode 100644 index a604a2e..0000000 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ /dev/null | |||
@@ -1,1728 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
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 | ||
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 | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Net; | ||
31 | using System.Reflection; | ||
32 | using System.Text; | ||
33 | using log4net; | ||
34 | using MXP; | ||
35 | using MXP.Messages; | ||
36 | using OpenMetaverse; | ||
37 | using OpenMetaverse.Packets; | ||
38 | using OpenSim.Framework; | ||
39 | using OpenSim.Framework.Client; | ||
40 | using Packet=OpenMetaverse.Packets.Packet; | ||
41 | using MXP.Extentions.OpenMetaverseFragments.Proto; | ||
42 | using MXP.Util; | ||
43 | using MXP.Fragments; | ||
44 | using MXP.Common.Proto; | ||
45 | using OpenSim.Region.Framework.Scenes; | ||
46 | |||
47 | namespace OpenSim.Client.MXP.ClientStack | ||
48 | { | ||
49 | public class MXPClientView : IClientAPI, IClientCore | ||
50 | { | ||
51 | internal static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
52 | |||
53 | #region Constants | ||
54 | private Vector3 FORWARD = new Vector3(1, 0, 0); | ||
55 | private Vector3 BACKWARD = new Vector3(-1, 0, 0); | ||
56 | private Vector3 LEFT = new Vector3(0, 1, 0); | ||
57 | private Vector3 RIGHT = new Vector3(0, -1, 0); | ||
58 | private Vector3 UP = new Vector3(0, 0, 1); | ||
59 | private Vector3 DOWN = new Vector3(0, 0, -1); | ||
60 | #endregion | ||
61 | |||
62 | #region Fields | ||
63 | private readonly Session m_session; | ||
64 | private readonly UUID m_sessionID; | ||
65 | private readonly UUID m_userID; | ||
66 | private readonly IScene m_scene; | ||
67 | private readonly string m_firstName; | ||
68 | private readonly string m_lastName; | ||
69 | // private int m_objectsToSynchronize = 0; | ||
70 | // private int m_objectsSynchronized = -1; | ||
71 | |||
72 | private Vector3 m_startPosition=new Vector3(128f, 128f, 128f); | ||
73 | #endregion | ||
74 | |||
75 | #region Properties | ||
76 | |||
77 | public Session Session | ||
78 | { | ||
79 | get { return m_session; } | ||
80 | } | ||
81 | |||
82 | public Vector3 StartPos | ||
83 | { | ||
84 | get { return m_startPosition; } | ||
85 | set { m_startPosition = value; } | ||
86 | } | ||
87 | |||
88 | public UUID AgentId | ||
89 | { | ||
90 | get { return m_userID; } | ||
91 | } | ||
92 | |||
93 | public UUID SessionId | ||
94 | { | ||
95 | get { return m_sessionID; } | ||
96 | } | ||
97 | |||
98 | public UUID SecureSessionId | ||
99 | { | ||
100 | get { return m_sessionID; } | ||
101 | } | ||
102 | |||
103 | public UUID ActiveGroupId | ||
104 | { | ||
105 | get { return UUID.Zero; } | ||
106 | } | ||
107 | |||
108 | public string ActiveGroupName | ||
109 | { | ||
110 | get { return ""; } | ||
111 | } | ||
112 | |||
113 | public ulong ActiveGroupPowers | ||
114 | { | ||
115 | get { return 0; } | ||
116 | } | ||
117 | |||
118 | public ulong GetGroupPowers(UUID groupID) | ||
119 | { | ||
120 | return 0; | ||
121 | } | ||
122 | |||
123 | public bool IsGroupMember(UUID GroupID) | ||
124 | { | ||
125 | return false; | ||
126 | } | ||
127 | |||
128 | public string FirstName | ||
129 | { | ||
130 | get { return m_firstName; } | ||
131 | } | ||
132 | |||
133 | public string LastName | ||
134 | { | ||
135 | get { return m_lastName; } | ||
136 | } | ||
137 | |||
138 | public IScene Scene | ||
139 | { | ||
140 | get { return m_scene; } | ||
141 | } | ||
142 | |||
143 | public int NextAnimationSequenceNumber | ||
144 | { | ||
145 | get { return 0; } | ||
146 | } | ||
147 | |||
148 | public string Name | ||
149 | { | ||
150 | get { return FirstName; } | ||
151 | } | ||
152 | |||
153 | public bool IsActive | ||
154 | { | ||
155 | get { return Session.SessionState == SessionState.Connected; } | ||
156 | set | ||
157 | { | ||
158 | if (!value) | ||
159 | Stop(); | ||
160 | } | ||
161 | } | ||
162 | |||
163 | public bool IsLoggingOut | ||
164 | { | ||
165 | get { return false ; } | ||
166 | set { } | ||
167 | } | ||
168 | |||
169 | #endregion | ||
170 | |||
171 | #region Constructors | ||
172 | public MXPClientView(Session mxpSession, UUID mxpSessionID, UUID userID, IScene mxpHostBubble, string mxpFirstName, string mxpLastName) | ||
173 | { | ||
174 | this.m_session = mxpSession; | ||
175 | this.m_userID = userID; | ||
176 | this.m_firstName = mxpFirstName; | ||
177 | this.m_lastName = mxpLastName; | ||
178 | this.m_scene = mxpHostBubble; | ||
179 | this.m_sessionID = mxpSessionID; | ||
180 | } | ||
181 | #endregion | ||
182 | |||
183 | #region MXP Incoming Message Processing | ||
184 | |||
185 | public void MXPPRocessMessage(Message message) | ||
186 | { | ||
187 | if (message.GetType() == typeof(ModifyRequestMessage)) | ||
188 | { | ||
189 | MXPProcessModifyRequest((ModifyRequestMessage)message); | ||
190 | } | ||
191 | else | ||
192 | { | ||
193 | m_log.Warn("[MXP ClientStack] Received messaged unhandled: " + message); | ||
194 | } | ||
195 | } | ||
196 | |||
197 | private void MXPProcessModifyRequest(ModifyRequestMessage modifyRequest) | ||
198 | { | ||
199 | ObjectFragment objectFragment=modifyRequest.ObjectFragment; | ||
200 | if (objectFragment.ObjectId == m_userID.Guid) | ||
201 | { | ||
202 | OmAvatarExt avatarExt = modifyRequest.GetExtension<OmAvatarExt>(); | ||
203 | |||
204 | AgentUpdateArgs agentUpdate = new AgentUpdateArgs(); | ||
205 | agentUpdate.AgentID = new UUID(objectFragment.ObjectId); | ||
206 | agentUpdate.SessionID = m_sessionID; | ||
207 | agentUpdate.State = (byte)avatarExt.State; | ||
208 | |||
209 | Quaternion avatarOrientation = FromOmQuaternion(objectFragment.Orientation); | ||
210 | if (avatarOrientation.X == 0 && avatarOrientation.Y == 0 && avatarOrientation.Z == 0 && avatarOrientation.W == 0) | ||
211 | { | ||
212 | avatarOrientation = Quaternion.Identity; | ||
213 | } | ||
214 | Vector3 avatarLocation=FromOmVector(objectFragment.Location); | ||
215 | |||
216 | if (avatarExt.MovementDirection != null) | ||
217 | { | ||
218 | Vector3 direction = FromOmVector(avatarExt.MovementDirection); | ||
219 | |||
220 | direction = direction * Quaternion.Inverse(avatarOrientation); | ||
221 | |||
222 | if ((direction - FORWARD).Length() < 0.5) | ||
223 | { | ||
224 | agentUpdate.ControlFlags += (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_POS; | ||
225 | } | ||
226 | if ((direction - BACKWARD).Length() < 0.5) | ||
227 | { | ||
228 | agentUpdate.ControlFlags += (uint)AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG; | ||
229 | } | ||
230 | if ((direction - LEFT).Length() < 0.5) | ||
231 | { | ||
232 | agentUpdate.ControlFlags += (uint)AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS; | ||
233 | } | ||
234 | if ((direction - RIGHT).Length() < 0.5) | ||
235 | { | ||
236 | agentUpdate.ControlFlags += (uint)AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG; | ||
237 | } | ||
238 | if ((direction - UP).Length() < 0.5) | ||
239 | { | ||
240 | agentUpdate.ControlFlags += (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_POS; | ||
241 | } | ||
242 | if ((direction - DOWN).Length() < 0.5) | ||
243 | { | ||
244 | agentUpdate.ControlFlags += (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG; | ||
245 | } | ||
246 | |||
247 | } | ||
248 | if (avatarExt.TargetOrientation != null) | ||
249 | { | ||
250 | agentUpdate.BodyRotation = FromOmQuaternion(avatarExt.TargetOrientation); | ||
251 | } | ||
252 | else | ||
253 | { | ||
254 | agentUpdate.BodyRotation = FromOmQuaternion(objectFragment.Orientation); | ||
255 | } | ||
256 | |||
257 | if (avatarExt.Body != null) | ||
258 | { | ||
259 | foreach (OmBipedBoneOrientation boneOrientation in avatarExt.Body.BipedBoneOrientations) | ||
260 | { | ||
261 | if (boneOrientation.Bone == OmBipedBones.Head) | ||
262 | { | ||
263 | agentUpdate.HeadRotation = FromOmQuaternion(boneOrientation.Orientation); | ||
264 | } | ||
265 | } | ||
266 | } | ||
267 | else | ||
268 | { | ||
269 | agentUpdate.HeadRotation = Quaternion.Identity; | ||
270 | } | ||
271 | |||
272 | if (avatarExt.Camera != null) | ||
273 | { | ||
274 | Quaternion cameraOrientation = FromOmQuaternion(avatarExt.Camera.Orientation); | ||
275 | agentUpdate.CameraCenter = FromOmVector(avatarExt.Camera.Location); | ||
276 | agentUpdate.CameraAtAxis = FORWARD * cameraOrientation; | ||
277 | agentUpdate.CameraLeftAxis = LEFT * cameraOrientation; | ||
278 | agentUpdate.CameraUpAxis = UP * cameraOrientation; | ||
279 | } | ||
280 | else | ||
281 | { | ||
282 | agentUpdate.CameraCenter = avatarLocation; | ||
283 | agentUpdate.CameraAtAxis = FORWARD * avatarOrientation; | ||
284 | agentUpdate.CameraLeftAxis = LEFT * avatarOrientation; | ||
285 | agentUpdate.CameraUpAxis = UP * avatarOrientation; | ||
286 | } | ||
287 | |||
288 | OnAgentUpdate(this, agentUpdate); | ||
289 | |||
290 | ModifyResponseMessage modifyResponse = new ModifyResponseMessage(); | ||
291 | modifyResponse.FailureCode = MxpResponseCodes.SUCCESS; | ||
292 | modifyResponse.RequestMessageId = modifyRequest.MessageId; | ||
293 | m_session.Send(modifyResponse); | ||
294 | } | ||
295 | else | ||
296 | { | ||
297 | ModifyResponseMessage modifyResponse = new ModifyResponseMessage(); | ||
298 | modifyResponse.FailureCode = MxpResponseCodes.UNAUTHORIZED_OPERATION; | ||
299 | modifyResponse.RequestMessageId = modifyRequest.MessageId; | ||
300 | m_session.Send(modifyResponse); | ||
301 | } | ||
302 | } | ||
303 | |||
304 | #endregion | ||
305 | |||
306 | #region MXP Outgoing Message Processing | ||
307 | |||
308 | // private void MXPSendPrimitive(uint localID, UUID ownerID, Vector3 acc, Vector3 rvel, PrimitiveBaseShape primShape, Vector3 pos, UUID objectID, Vector3 vel, Quaternion rotation, uint flags, string text, byte[] textColor, uint parentID, byte[] particleSystem, byte clickAction, byte material, byte[] textureanim) | ||
309 | // { | ||
310 | // String typeName = ToOmType(primShape.PCode); | ||
311 | // m_log.Info("[MXP ClientStack] Transmitting Primitive" + typeName); | ||
312 | // | ||
313 | // PerceptionEventMessage pe = new PerceptionEventMessage(); | ||
314 | // pe.ObjectFragment.ObjectId = objectID.Guid; | ||
315 | // | ||
316 | // pe.ObjectFragment.ParentObjectId = Guid.Empty; | ||
317 | // | ||
318 | // // Resolving parent UUID. | ||
319 | // OpenSim.Region.Framework.Scenes.Scene scene = (OpenSim.Region.Framework.Scenes.Scene)Scene; | ||
320 | // if (scene.Entities.ContainsKey(parentID)) | ||
321 | // { | ||
322 | // pe.ObjectFragment.ParentObjectId = scene.Entities[parentID].UUID.Guid; | ||
323 | // } | ||
324 | // | ||
325 | // pe.ObjectFragment.ObjectIndex = localID; | ||
326 | // pe.ObjectFragment.ObjectName = typeName + " Object"; | ||
327 | // pe.ObjectFragment.OwnerId = ownerID.Guid; | ||
328 | // pe.ObjectFragment.TypeId = Guid.Empty; | ||
329 | // pe.ObjectFragment.TypeName = typeName; | ||
330 | // pe.ObjectFragment.Acceleration = ToOmVector(acc); | ||
331 | // pe.ObjectFragment.AngularAcceleration=new MsdQuaternion4f(); | ||
332 | // pe.ObjectFragment.AngularVelocity = ToOmQuaternion(rvel); | ||
333 | // pe.ObjectFragment.BoundingSphereRadius = primShape.Scale.Length(); | ||
334 | // | ||
335 | // pe.ObjectFragment.Location = ToOmVector(pos); | ||
336 | // | ||
337 | // pe.ObjectFragment.Mass = 1.0f; | ||
338 | // pe.ObjectFragment.Orientation = ToOmQuaternion(rotation); | ||
339 | // pe.ObjectFragment.Velocity =ToOmVector(vel); | ||
340 | // | ||
341 | // OmSlPrimitiveExt ext = new OmSlPrimitiveExt(); | ||
342 | // | ||
343 | // if (!((primShape.PCode == (byte)PCode.NewTree) || (primShape.PCode == (byte)PCode.Tree) || (primShape.PCode == (byte)PCode.Grass))) | ||
344 | // { | ||
345 | // | ||
346 | // ext.PathBegin = primShape.PathBegin; | ||
347 | // ext.PathEnd = primShape.PathEnd; | ||
348 | // ext.PathScaleX = primShape.PathScaleX; | ||
349 | // ext.PathScaleY = primShape.PathScaleY; | ||
350 | // ext.PathShearX = primShape.PathShearX; | ||
351 | // ext.PathShearY = primShape.PathShearY; | ||
352 | // ext.PathSkew = primShape.PathSkew; | ||
353 | // ext.ProfileBegin = primShape.ProfileBegin; | ||
354 | // ext.ProfileEnd = primShape.ProfileEnd; | ||
355 | // ext.PathCurve = primShape.PathCurve; | ||
356 | // ext.ProfileCurve = primShape.ProfileCurve; | ||
357 | // ext.ProfileHollow = primShape.ProfileHollow; | ||
358 | // ext.PathRadiusOffset = primShape.PathRadiusOffset; | ||
359 | // ext.PathRevolutions = primShape.PathRevolutions; | ||
360 | // ext.PathTaperX = primShape.PathTaperX; | ||
361 | // ext.PathTaperY = primShape.PathTaperY; | ||
362 | // ext.PathTwist = primShape.PathTwist; | ||
363 | // ext.PathTwistBegin = primShape.PathTwistBegin; | ||
364 | // | ||
365 | // | ||
366 | // } | ||
367 | // | ||
368 | // ext.UpdateFlags = flags; | ||
369 | // ext.ExtraParams = primShape.ExtraParams; | ||
370 | // ext.State = primShape.State; | ||
371 | // ext.TextureEntry = primShape.TextureEntry; | ||
372 | // ext.TextureAnim = textureanim; | ||
373 | // ext.Scale = ToOmVector(primShape.Scale); | ||
374 | // ext.Text = text; | ||
375 | // ext.TextColor = ToOmColor(textColor); | ||
376 | // ext.PSBlock = particleSystem; | ||
377 | // ext.ClickAction = clickAction; | ||
378 | // ext.Material = material; | ||
379 | // | ||
380 | // pe.SetExtension<OmSlPrimitiveExt>(ext); | ||
381 | // | ||
382 | // Session.Send(pe); | ||
383 | // | ||
384 | // if (m_objectsSynchronized != -1) | ||
385 | // { | ||
386 | // m_objectsSynchronized++; | ||
387 | // | ||
388 | // if (m_objectsToSynchronize >= m_objectsSynchronized) | ||
389 | // { | ||
390 | // SynchronizationEndEventMessage synchronizationEndEventMessage = new SynchronizationEndEventMessage(); | ||
391 | // Session.Send(synchronizationEndEventMessage); | ||
392 | // m_objectsSynchronized = -1; | ||
393 | // } | ||
394 | // } | ||
395 | // } | ||
396 | |||
397 | public void MXPSendAvatarData(string participantName, UUID ownerID, UUID parentId, UUID avatarID, uint avatarLocalID, Vector3 position, Quaternion rotation) | ||
398 | { | ||
399 | m_log.Info("[MXP ClientStack] Transmitting Avatar Data " + participantName); | ||
400 | |||
401 | PerceptionEventMessage pe = new PerceptionEventMessage(); | ||
402 | |||
403 | pe.ObjectFragment.ObjectId = avatarID.Guid; | ||
404 | pe.ObjectFragment.ParentObjectId = parentId.Guid; | ||
405 | pe.ObjectFragment.ObjectIndex = avatarLocalID; | ||
406 | pe.ObjectFragment.ObjectName = participantName; | ||
407 | pe.ObjectFragment.OwnerId = ownerID.Guid; | ||
408 | pe.ObjectFragment.TypeId = Guid.Empty; | ||
409 | pe.ObjectFragment.TypeName = "Avatar"; | ||
410 | pe.ObjectFragment.Acceleration = new MsdVector3f(); | ||
411 | pe.ObjectFragment.AngularAcceleration = new MsdQuaternion4f(); | ||
412 | pe.ObjectFragment.AngularVelocity = new MsdQuaternion4f(); | ||
413 | |||
414 | pe.ObjectFragment.BoundingSphereRadius = 1.0f; // TODO Fill in appropriate value | ||
415 | |||
416 | pe.ObjectFragment.Location = ToOmVector(position); | ||
417 | |||
418 | pe.ObjectFragment.Mass = 1.0f; // TODO Fill in appropriate value | ||
419 | pe.ObjectFragment.Orientation = ToOmQuaternion(rotation); | ||
420 | pe.ObjectFragment.Velocity = new MsdVector3f(); | ||
421 | |||
422 | Session.Send(pe); | ||
423 | } | ||
424 | |||
425 | public void MXPSendTerrain(float[] map) | ||
426 | { | ||
427 | m_log.Info("[MXP ClientStack] Transmitting terrain for " + m_scene.RegionInfo.RegionName); | ||
428 | |||
429 | PerceptionEventMessage pe = new PerceptionEventMessage(); | ||
430 | |||
431 | // Hacking terrain object uuid to zero and index to hashcode of regionuuid | ||
432 | pe.ObjectFragment.ObjectId = m_scene.RegionInfo.RegionSettings.RegionUUID.Guid; | ||
433 | pe.ObjectFragment.ObjectIndex = (uint)(m_scene.RegionInfo.RegionSettings.RegionUUID.GetHashCode() + ((long)int.MaxValue) / 2); | ||
434 | pe.ObjectFragment.ParentObjectId = UUID.Zero.Guid; | ||
435 | pe.ObjectFragment.ObjectName = "Terrain of " + m_scene.RegionInfo.RegionName; | ||
436 | pe.ObjectFragment.OwnerId = m_scene.RegionInfo.EstateSettings.EstateOwner.Guid; | ||
437 | pe.ObjectFragment.TypeId = Guid.Empty; | ||
438 | pe.ObjectFragment.TypeName = "Terrain"; | ||
439 | pe.ObjectFragment.Acceleration = new MsdVector3f(); | ||
440 | pe.ObjectFragment.AngularAcceleration = new MsdQuaternion4f(); | ||
441 | pe.ObjectFragment.AngularVelocity = new MsdQuaternion4f(); | ||
442 | pe.ObjectFragment.BoundingSphereRadius = 128f; | ||
443 | |||
444 | pe.ObjectFragment.Location = new MsdVector3f(); | ||
445 | |||
446 | pe.ObjectFragment.Mass = 1.0f; | ||
447 | pe.ObjectFragment.Orientation = new MsdQuaternion4f(); | ||
448 | pe.ObjectFragment.Velocity = new MsdVector3f(); | ||
449 | |||
450 | OmBitmapTerrainExt terrainExt = new OmBitmapTerrainExt(); | ||
451 | terrainExt.Width = 256; | ||
452 | terrainExt.Height = 256; | ||
453 | terrainExt.WaterLevel = (float) m_scene.RegionInfo.RegionSettings.WaterHeight; | ||
454 | terrainExt.Offset = 0; | ||
455 | terrainExt.Scale = 10; | ||
456 | terrainExt.HeightMap = CompressUtil.CompressHeightMap(map, 0, 10); | ||
457 | |||
458 | pe.SetExtension<OmBitmapTerrainExt>(terrainExt); | ||
459 | |||
460 | Session.Send(pe); | ||
461 | } | ||
462 | |||
463 | public void MXPSendSynchronizationBegin(int objectCount) | ||
464 | { | ||
465 | // m_objectsToSynchronize = objectCount; | ||
466 | // m_objectsSynchronized = 0; | ||
467 | SynchronizationBeginEventMessage synchronizationBeginEventMessage = new SynchronizationBeginEventMessage(); | ||
468 | synchronizationBeginEventMessage.ObjectCount = (uint)objectCount; | ||
469 | Session.Send(synchronizationBeginEventMessage); | ||
470 | } | ||
471 | |||
472 | #endregion | ||
473 | |||
474 | #region MXP Conversions | ||
475 | |||
476 | private MsdVector3f ToOmVector(Vector3 value) | ||
477 | { | ||
478 | MsdVector3f encodedValue = new MsdVector3f(); | ||
479 | encodedValue.X = value.X; | ||
480 | encodedValue.Y = value.Y; | ||
481 | encodedValue.Z = value.Z; | ||
482 | return encodedValue; | ||
483 | } | ||
484 | |||
485 | private MsdQuaternion4f ToOmQuaternion(Vector3 value) | ||
486 | { | ||
487 | Quaternion quaternion=Quaternion.CreateFromEulers(value); | ||
488 | MsdQuaternion4f encodedValue = new MsdQuaternion4f(); | ||
489 | encodedValue.X = quaternion.X; | ||
490 | encodedValue.Y = quaternion.Y; | ||
491 | encodedValue.Z = quaternion.Z; | ||
492 | encodedValue.W = quaternion.W; | ||
493 | return encodedValue; | ||
494 | } | ||
495 | |||
496 | private MsdQuaternion4f ToOmQuaternion(Quaternion value) | ||
497 | { | ||
498 | MsdQuaternion4f encodedValue = new MsdQuaternion4f(); | ||
499 | encodedValue.X = value.X; | ||
500 | encodedValue.Y = value.Y; | ||
501 | encodedValue.Z = value.Z; | ||
502 | encodedValue.W = value.W; | ||
503 | return encodedValue; | ||
504 | } | ||
505 | |||
506 | private Vector3 FromOmVector(MsdVector3f vector) | ||
507 | { | ||
508 | return new Vector3(vector.X, vector.Y, vector.Z); | ||
509 | } | ||
510 | |||
511 | // private Vector3 FromOmVector(float[] vector) | ||
512 | // { | ||
513 | // return new Vector3(vector[0], vector[1], vector[2]); | ||
514 | // } | ||
515 | |||
516 | private Quaternion FromOmQuaternion(MsdQuaternion4f quaternion) | ||
517 | { | ||
518 | return new Quaternion(quaternion.X, quaternion.Y, quaternion.Z, quaternion.W); | ||
519 | } | ||
520 | |||
521 | // private Quaternion FromOmQuaternion(float[] quaternion) | ||
522 | // { | ||
523 | // return new Quaternion(quaternion[0], quaternion[1], quaternion[2], quaternion[3]); | ||
524 | // } | ||
525 | |||
526 | private MsdColor4f ToOmColor(byte[] value) | ||
527 | { | ||
528 | MsdColor4f encodedValue = new MsdColor4f(); | ||
529 | encodedValue.R = value[0]; | ||
530 | encodedValue.G = value[1]; | ||
531 | encodedValue.B = value[2]; | ||
532 | encodedValue.A = value[3]; | ||
533 | return encodedValue; | ||
534 | } | ||
535 | |||
536 | private string ToOmType(byte value) | ||
537 | { | ||
538 | if (value == (byte)PCodeEnum.Avatar) | ||
539 | { | ||
540 | return "Avatar"; | ||
541 | } | ||
542 | if (value == (byte)PCodeEnum.Grass) | ||
543 | { | ||
544 | return "Grass"; | ||
545 | } | ||
546 | if (value == (byte)PCodeEnum.NewTree) | ||
547 | { | ||
548 | return "NewTree"; | ||
549 | } | ||
550 | if (value == (byte)PCodeEnum.ParticleSystem) | ||
551 | { | ||
552 | return "ParticleSystem"; | ||
553 | } | ||
554 | if (value == (byte)PCodeEnum.Primitive) | ||
555 | { | ||
556 | return "Primitive"; | ||
557 | } | ||
558 | if (value == (byte)PCodeEnum.Tree) | ||
559 | { | ||
560 | return "Tree"; | ||
561 | } | ||
562 | throw new Exception("Unsupported PCode value: " + value); | ||
563 | } | ||
564 | |||
565 | #endregion | ||
566 | |||
567 | #region OpenSim Event Handlers | ||
568 | |||
569 | #pragma warning disable 67 | ||
570 | public event GenericMessage OnGenericMessage; | ||
571 | public event ImprovedInstantMessage OnInstantMessage; | ||
572 | public event ChatMessage OnChatFromClient; | ||
573 | public event TextureRequest OnRequestTexture; | ||
574 | public event RezObject OnRezObject; | ||
575 | public event ModifyTerrain OnModifyTerrain; | ||
576 | public event BakeTerrain OnBakeTerrain; | ||
577 | public event EstateChangeInfo OnEstateChangeInfo; | ||
578 | public event SetAppearance OnSetAppearance; | ||
579 | public event AvatarNowWearing OnAvatarNowWearing; | ||
580 | public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv; | ||
581 | public event RezMultipleAttachmentsFromInv OnRezMultipleAttachmentsFromInv; | ||
582 | public event UUIDNameRequest OnDetachAttachmentIntoInv; | ||
583 | public event ObjectAttach OnObjectAttach; | ||
584 | public event ObjectDeselect OnObjectDetach; | ||
585 | public event ObjectDrop OnObjectDrop; | ||
586 | public event StartAnim OnStartAnim; | ||
587 | public event StopAnim OnStopAnim; | ||
588 | public event LinkObjects OnLinkObjects; | ||
589 | public event DelinkObjects OnDelinkObjects; | ||
590 | public event RequestMapBlocks OnRequestMapBlocks; | ||
591 | public event RequestMapName OnMapNameRequest; | ||
592 | public event TeleportLocationRequest OnTeleportLocationRequest; | ||
593 | public event DisconnectUser OnDisconnectUser; | ||
594 | public event RequestAvatarProperties OnRequestAvatarProperties; | ||
595 | public event SetAlwaysRun OnSetAlwaysRun; | ||
596 | public event TeleportLandmarkRequest OnTeleportLandmarkRequest; | ||
597 | public event DeRezObject OnDeRezObject; | ||
598 | public event Action<IClientAPI> OnRegionHandShakeReply; | ||
599 | public event GenericCall1 OnRequestWearables; | ||
600 | public event GenericCall1 OnCompleteMovementToRegion; | ||
601 | public event UpdateAgent OnPreAgentUpdate; | ||
602 | public event UpdateAgent OnAgentUpdate; | ||
603 | public event AgentRequestSit OnAgentRequestSit; | ||
604 | public event AgentSit OnAgentSit; | ||
605 | public event AvatarPickerRequest OnAvatarPickerRequest; | ||
606 | public event Action<IClientAPI> OnRequestAvatarsData; | ||
607 | public event AddNewPrim OnAddPrim; | ||
608 | public event FetchInventory OnAgentDataUpdateRequest; | ||
609 | public event TeleportLocationRequest OnSetStartLocationRequest; | ||
610 | public event RequestGodlikePowers OnRequestGodlikePowers; | ||
611 | public event GodKickUser OnGodKickUser; | ||
612 | public event ObjectDuplicate OnObjectDuplicate; | ||
613 | public event ObjectDuplicateOnRay OnObjectDuplicateOnRay; | ||
614 | public event GrabObject OnGrabObject; | ||
615 | public event DeGrabObject OnDeGrabObject; | ||
616 | public event MoveObject OnGrabUpdate; | ||
617 | public event SpinStart OnSpinStart; | ||
618 | public event SpinObject OnSpinUpdate; | ||
619 | public event SpinStop OnSpinStop; | ||
620 | public event UpdateShape OnUpdatePrimShape; | ||
621 | public event ObjectExtraParams OnUpdateExtraParams; | ||
622 | public event ObjectRequest OnObjectRequest; | ||
623 | public event ObjectSelect OnObjectSelect; | ||
624 | public event ObjectDeselect OnObjectDeselect; | ||
625 | public event GenericCall7 OnObjectDescription; | ||
626 | public event GenericCall7 OnObjectName; | ||
627 | public event GenericCall7 OnObjectClickAction; | ||
628 | public event GenericCall7 OnObjectMaterial; | ||
629 | public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; | ||
630 | public event UpdatePrimFlags OnUpdatePrimFlags; | ||
631 | public event UpdatePrimTexture OnUpdatePrimTexture; | ||
632 | public event UpdateVector OnUpdatePrimGroupPosition; | ||
633 | public event UpdateVector OnUpdatePrimSinglePosition; | ||
634 | public event UpdatePrimRotation OnUpdatePrimGroupRotation; | ||
635 | public event UpdatePrimSingleRotationPosition OnUpdatePrimSingleRotationPosition; | ||
636 | public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; | ||
637 | public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation; | ||
638 | public event UpdateVector OnUpdatePrimScale; | ||
639 | public event UpdateVector OnUpdatePrimGroupScale; | ||
640 | public event StatusChange OnChildAgentStatus; | ||
641 | public event GenericCall2 OnStopMovement; | ||
642 | public event Action<UUID> OnRemoveAvatar; | ||
643 | public event ObjectPermissions OnObjectPermissions; | ||
644 | public event CreateNewInventoryItem OnCreateNewInventoryItem; | ||
645 | public event LinkInventoryItem OnLinkInventoryItem; | ||
646 | public event CreateInventoryFolder OnCreateNewInventoryFolder; | ||
647 | public event UpdateInventoryFolder OnUpdateInventoryFolder; | ||
648 | public event MoveInventoryFolder OnMoveInventoryFolder; | ||
649 | public event FetchInventoryDescendents OnFetchInventoryDescendents; | ||
650 | public event PurgeInventoryDescendents OnPurgeInventoryDescendents; | ||
651 | public event FetchInventory OnFetchInventory; | ||
652 | public event RequestTaskInventory OnRequestTaskInventory; | ||
653 | public event UpdateInventoryItem OnUpdateInventoryItem; | ||
654 | public event CopyInventoryItem OnCopyInventoryItem; | ||
655 | public event MoveInventoryItem OnMoveInventoryItem; | ||
656 | public event RemoveInventoryFolder OnRemoveInventoryFolder; | ||
657 | public event RemoveInventoryItem OnRemoveInventoryItem; | ||
658 | public event UDPAssetUploadRequest OnAssetUploadRequest; | ||
659 | public event XferReceive OnXferReceive; | ||
660 | public event RequestXfer OnRequestXfer; | ||
661 | public event ConfirmXfer OnConfirmXfer; | ||
662 | public event AbortXfer OnAbortXfer; | ||
663 | public event RezScript OnRezScript; | ||
664 | public event UpdateTaskInventory OnUpdateTaskInventory; | ||
665 | public event MoveTaskInventory OnMoveTaskItem; | ||
666 | public event RemoveTaskInventory OnRemoveTaskItem; | ||
667 | public event RequestAsset OnRequestAsset; | ||
668 | public event UUIDNameRequest OnNameFromUUIDRequest; | ||
669 | public event ParcelAccessListRequest OnParcelAccessListRequest; | ||
670 | public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest; | ||
671 | public event ParcelPropertiesRequest OnParcelPropertiesRequest; | ||
672 | public event ParcelDivideRequest OnParcelDivideRequest; | ||
673 | public event ParcelJoinRequest OnParcelJoinRequest; | ||
674 | public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; | ||
675 | public event ParcelSelectObjects OnParcelSelectObjects; | ||
676 | public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; | ||
677 | public event ParcelAbandonRequest OnParcelAbandonRequest; | ||
678 | public event ParcelGodForceOwner OnParcelGodForceOwner; | ||
679 | public event ParcelReclaim OnParcelReclaim; | ||
680 | public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest; | ||
681 | public event ParcelDeedToGroup OnParcelDeedToGroup; | ||
682 | public event RegionInfoRequest OnRegionInfoRequest; | ||
683 | public event EstateCovenantRequest OnEstateCovenantRequest; | ||
684 | public event FriendActionDelegate OnApproveFriendRequest; | ||
685 | public event FriendActionDelegate OnDenyFriendRequest; | ||
686 | public event FriendshipTermination OnTerminateFriendship; | ||
687 | public event GrantUserFriendRights OnGrantUserRights; | ||
688 | public event MoneyTransferRequest OnMoneyTransferRequest; | ||
689 | public event EconomyDataRequest OnEconomyDataRequest; | ||
690 | public event MoneyBalanceRequest OnMoneyBalanceRequest; | ||
691 | public event UpdateAvatarProperties OnUpdateAvatarProperties; | ||
692 | public event ParcelBuy OnParcelBuy; | ||
693 | public event RequestPayPrice OnRequestPayPrice; | ||
694 | public event ObjectSaleInfo OnObjectSaleInfo; | ||
695 | public event ObjectBuy OnObjectBuy; | ||
696 | public event BuyObjectInventory OnBuyObjectInventory; | ||
697 | public event RequestTerrain OnRequestTerrain; | ||
698 | public event RequestTerrain OnUploadTerrain; | ||
699 | public event ObjectIncludeInSearch OnObjectIncludeInSearch; | ||
700 | public event UUIDNameRequest OnTeleportHomeRequest; | ||
701 | public event ScriptAnswer OnScriptAnswer; | ||
702 | public event AgentSit OnUndo; | ||
703 | public event AgentSit OnRedo; | ||
704 | public event LandUndo OnLandUndo; | ||
705 | public event ForceReleaseControls OnForceReleaseControls; | ||
706 | public event GodLandStatRequest OnLandStatRequest; | ||
707 | public event DetailedEstateDataRequest OnDetailedEstateDataRequest; | ||
708 | public event SetEstateFlagsRequest OnSetEstateFlagsRequest; | ||
709 | public event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture; | ||
710 | public event SetEstateTerrainDetailTexture OnSetEstateTerrainDetailTexture; | ||
711 | public event SetEstateTerrainTextureHeights OnSetEstateTerrainTextureHeights; | ||
712 | public event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest; | ||
713 | public event SetRegionTerrainSettings OnSetRegionTerrainSettings; | ||
714 | public event EstateRestartSimRequest OnEstateRestartSimRequest; | ||
715 | public event EstateChangeCovenantRequest OnEstateChangeCovenantRequest; | ||
716 | public event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest; | ||
717 | public event SimulatorBlueBoxMessageRequest OnSimulatorBlueBoxMessageRequest; | ||
718 | public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest; | ||
719 | public event EstateDebugRegionRequest OnEstateDebugRegionRequest; | ||
720 | public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; | ||
721 | public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest; | ||
722 | public event UUIDNameRequest OnUUIDGroupNameRequest; | ||
723 | public event RegionHandleRequest OnRegionHandleRequest; | ||
724 | public event ParcelInfoRequest OnParcelInfoRequest; | ||
725 | public event RequestObjectPropertiesFamily OnObjectGroupRequest; | ||
726 | public event ScriptReset OnScriptReset; | ||
727 | public event GetScriptRunning OnGetScriptRunning; | ||
728 | public event SetScriptRunning OnSetScriptRunning; | ||
729 | public event UpdateVector OnAutoPilotGo; | ||
730 | public event TerrainUnacked OnUnackedTerrain; | ||
731 | public event ActivateGesture OnActivateGesture; | ||
732 | public event DeactivateGesture OnDeactivateGesture; | ||
733 | public event ObjectOwner OnObjectOwner; | ||
734 | public event DirPlacesQuery OnDirPlacesQuery; | ||
735 | public event DirFindQuery OnDirFindQuery; | ||
736 | public event DirLandQuery OnDirLandQuery; | ||
737 | public event DirPopularQuery OnDirPopularQuery; | ||
738 | public event DirClassifiedQuery OnDirClassifiedQuery; | ||
739 | public event EventInfoRequest OnEventInfoRequest; | ||
740 | public event ParcelSetOtherCleanTime OnParcelSetOtherCleanTime; | ||
741 | public event MapItemRequest OnMapItemRequest; | ||
742 | public event OfferCallingCard OnOfferCallingCard; | ||
743 | public event AcceptCallingCard OnAcceptCallingCard; | ||
744 | public event DeclineCallingCard OnDeclineCallingCard; | ||
745 | public event SoundTrigger OnSoundTrigger; | ||
746 | public event StartLure OnStartLure; | ||
747 | public event TeleportLureRequest OnTeleportLureRequest; | ||
748 | public event NetworkStats OnNetworkStatsUpdate; | ||
749 | public event ClassifiedInfoRequest OnClassifiedInfoRequest; | ||
750 | public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; | ||
751 | public event ClassifiedDelete OnClassifiedDelete; | ||
752 | public event ClassifiedDelete OnClassifiedGodDelete; | ||
753 | public event EventNotificationAddRequest OnEventNotificationAddRequest; | ||
754 | public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; | ||
755 | public event EventGodDelete OnEventGodDelete; | ||
756 | public event ParcelDwellRequest OnParcelDwellRequest; | ||
757 | public event UserInfoRequest OnUserInfoRequest; | ||
758 | public event UpdateUserInfo OnUpdateUserInfo; | ||
759 | public event ViewerEffectEventHandler OnViewerEffect; | ||
760 | public event Action<IClientAPI> OnLogout; | ||
761 | public event Action<IClientAPI> OnConnectionClosed; | ||
762 | public event RetrieveInstantMessages OnRetrieveInstantMessages; | ||
763 | public event PickDelete OnPickDelete; | ||
764 | public event PickGodDelete OnPickGodDelete; | ||
765 | public event PickInfoUpdate OnPickInfoUpdate; | ||
766 | public event AvatarNotesUpdate OnAvatarNotesUpdate; | ||
767 | public event MuteListRequest OnMuteListRequest; | ||
768 | public event AvatarInterestUpdate OnAvatarInterestUpdate; | ||
769 | public event FindAgentUpdate OnFindAgent; | ||
770 | public event TrackAgentUpdate OnTrackAgent; | ||
771 | public event NewUserReport OnUserReport; | ||
772 | public event SaveStateHandler OnSaveState; | ||
773 | public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; | ||
774 | public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; | ||
775 | public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; | ||
776 | public event FreezeUserUpdate OnParcelFreezeUser; | ||
777 | public event EjectUserUpdate OnParcelEjectUser; | ||
778 | public event ParcelBuyPass OnParcelBuyPass; | ||
779 | public event ParcelGodMark OnParcelGodMark; | ||
780 | public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; | ||
781 | public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; | ||
782 | public event SimWideDeletesDelegate OnSimWideDeletes; | ||
783 | public event SendPostcard OnSendPostcard; | ||
784 | public event MuteListEntryUpdate OnUpdateMuteListEntry; | ||
785 | public event MuteListEntryRemove OnRemoveMuteListEntry; | ||
786 | public event GodlikeMessage onGodlikeMessage; | ||
787 | public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; | ||
788 | |||
789 | public event PlacesQuery OnPlacesQuery; | ||
790 | |||
791 | #pragma warning restore 67 | ||
792 | |||
793 | #endregion | ||
794 | |||
795 | #region OpenSim ClientView Public Methods | ||
796 | // Do we need this? | ||
797 | public bool SendLogoutPacketWhenClosing | ||
798 | { | ||
799 | set { } | ||
800 | } | ||
801 | |||
802 | public uint CircuitCode | ||
803 | { | ||
804 | get { return m_sessionID.CRC(); } | ||
805 | } | ||
806 | |||
807 | public IPEndPoint RemoteEndPoint | ||
808 | { | ||
809 | get { return Session.RemoteEndPoint; } | ||
810 | } | ||
811 | |||
812 | public void SetDebugPacketLevel(int newDebug) | ||
813 | { | ||
814 | //m_debugLevel = newDebug; | ||
815 | } | ||
816 | |||
817 | public void InPacket(object NewPack) | ||
818 | { | ||
819 | //throw new System.NotImplementedException(); | ||
820 | } | ||
821 | |||
822 | public void ProcessInPacket(Packet NewPack) | ||
823 | { | ||
824 | //throw new System.NotImplementedException(); | ||
825 | } | ||
826 | |||
827 | public void OnClean() | ||
828 | { | ||
829 | if (OnLogout != null) | ||
830 | OnLogout(this); | ||
831 | |||
832 | if (OnConnectionClosed != null) | ||
833 | OnConnectionClosed(this); | ||
834 | } | ||
835 | |||
836 | public void Close() | ||
837 | { | ||
838 | m_log.Info("[MXP ClientStack] Close Called"); | ||
839 | |||
840 | // Tell the client to go | ||
841 | SendLogoutPacket(); | ||
842 | |||
843 | // Let MXPPacketServer clean it up | ||
844 | if (Session.SessionState != SessionState.Disconnected) | ||
845 | { | ||
846 | Session.SetStateDisconnected(); | ||
847 | } | ||
848 | |||
849 | } | ||
850 | |||
851 | public void Kick(string message) | ||
852 | { | ||
853 | Close(); | ||
854 | } | ||
855 | |||
856 | public void Start() | ||
857 | { | ||
858 | Scene.AddNewClient(this); | ||
859 | |||
860 | // Mimicking LLClientView which gets always set appearance from client. | ||
861 | OpenSim.Region.Framework.Scenes.Scene scene=(OpenSim.Region.Framework.Scenes.Scene)Scene; | ||
862 | AvatarAppearance appearance; | ||
863 | scene.GetAvatarAppearance(this,out appearance); | ||
864 | OnSetAppearance(this, appearance.Texture, (byte[])appearance.VisualParams.Clone()); | ||
865 | } | ||
866 | |||
867 | public void Stop() | ||
868 | { | ||
869 | // Nor this | ||
870 | } | ||
871 | |||
872 | public void SendWearables(AvatarWearable[] wearables, int serial) | ||
873 | { | ||
874 | // Need to translate to MXP somehow | ||
875 | } | ||
876 | |||
877 | public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) | ||
878 | { | ||
879 | // Need to translate to MXP somehow | ||
880 | } | ||
881 | |||
882 | public void SendStartPingCheck(byte seq) | ||
883 | { | ||
884 | // Need to translate to MXP somehow | ||
885 | } | ||
886 | |||
887 | public void SendKillObject(ulong regionHandle, uint localID) | ||
888 | { | ||
889 | DisappearanceEventMessage de = new DisappearanceEventMessage(); | ||
890 | de.ObjectIndex = localID; | ||
891 | |||
892 | Session.Send(de); | ||
893 | } | ||
894 | |||
895 | public void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs) | ||
896 | { | ||
897 | // Need to translate to MXP somehow | ||
898 | } | ||
899 | |||
900 | public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) | ||
901 | { | ||
902 | m_log.Info("[MXP ClientStack] Completing Handshake to Region"); | ||
903 | |||
904 | if (OnRegionHandShakeReply != null) | ||
905 | { | ||
906 | OnRegionHandShakeReply(this); | ||
907 | } | ||
908 | |||
909 | if (OnCompleteMovementToRegion != null) | ||
910 | { | ||
911 | OnCompleteMovementToRegion(this); | ||
912 | } | ||
913 | |||
914 | // Need to translate to MXP somehow | ||
915 | } | ||
916 | |||
917 | public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible) | ||
918 | { | ||
919 | ActionEventMessage chatActionEvent = new ActionEventMessage(); | ||
920 | chatActionEvent.ActionFragment.ActionName = "Chat"; | ||
921 | chatActionEvent.ActionFragment.SourceObjectId = fromAgentID.Guid; | ||
922 | chatActionEvent.ActionFragment.ObservationRadius = 180.0f; | ||
923 | chatActionEvent.ActionFragment.ExtensionDialect = "TEXT"; | ||
924 | chatActionEvent.SetPayloadData(Util.UTF8.GetBytes(message)); | ||
925 | |||
926 | Session.Send(chatActionEvent); | ||
927 | } | ||
928 | |||
929 | public void SendInstantMessage(GridInstantMessage im) | ||
930 | { | ||
931 | // Need to translate to MXP somehow | ||
932 | } | ||
933 | |||
934 | public void SendGenericMessage(string method, List<string> message) | ||
935 | { | ||
936 | } | ||
937 | |||
938 | public void SendGenericMessage(string method, List<byte[]> message) | ||
939 | { | ||
940 | // Need to translate to MXP somehow | ||
941 | } | ||
942 | |||
943 | public void SendLayerData(float[] map) | ||
944 | { | ||
945 | MXPSendTerrain(map); | ||
946 | } | ||
947 | |||
948 | public void SendLayerData(int px, int py, float[] map) | ||
949 | { | ||
950 | } | ||
951 | |||
952 | public void SendWindData(Vector2[] windSpeeds) | ||
953 | { | ||
954 | // Need to translate to MXP somehow | ||
955 | } | ||
956 | |||
957 | public void SendCloudData(float[] cloudCover) | ||
958 | { | ||
959 | // Need to translate to MXP somehow | ||
960 | } | ||
961 | |||
962 | public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) | ||
963 | { | ||
964 | //throw new System.NotImplementedException(); | ||
965 | } | ||
966 | |||
967 | public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint) | ||
968 | { | ||
969 | //throw new System.NotImplementedException(); | ||
970 | } | ||
971 | |||
972 | public AgentCircuitData RequestClientInfo() | ||
973 | { | ||
974 | AgentCircuitData clientinfo = new AgentCircuitData(); | ||
975 | clientinfo.AgentID = AgentId; | ||
976 | clientinfo.Appearance = new AvatarAppearance(); | ||
977 | clientinfo.BaseFolder = UUID.Zero; | ||
978 | clientinfo.CapsPath = ""; | ||
979 | clientinfo.child = false; | ||
980 | clientinfo.ChildrenCapSeeds = new Dictionary<ulong, string>(); | ||
981 | clientinfo.circuitcode = CircuitCode; | ||
982 | clientinfo.firstname = FirstName; | ||
983 | clientinfo.InventoryFolder = UUID.Zero; | ||
984 | clientinfo.lastname = LastName; | ||
985 | clientinfo.SecureSessionID = SecureSessionId; | ||
986 | clientinfo.SessionID = SessionId; | ||
987 | clientinfo.startpos = StartPos; | ||
988 | |||
989 | return clientinfo; | ||
990 | } | ||
991 | |||
992 | public void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL) | ||
993 | { | ||
994 | // TODO: We'll want to get this one working. | ||
995 | // Need to translate to MXP somehow | ||
996 | } | ||
997 | |||
998 | public void SendMapBlock(List<MapBlockData> mapBlocks, uint flag) | ||
999 | { | ||
1000 | // Need to translate to MXP somehow | ||
1001 | } | ||
1002 | |||
1003 | public void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags) | ||
1004 | { | ||
1005 | //throw new System.NotImplementedException(); | ||
1006 | } | ||
1007 | |||
1008 | public void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL) | ||
1009 | { | ||
1010 | // Need to translate to MXP somehow | ||
1011 | } | ||
1012 | |||
1013 | public void SendTeleportFailed(string reason) | ||
1014 | { | ||
1015 | // Need to translate to MXP somehow | ||
1016 | } | ||
1017 | |||
1018 | public void SendTeleportStart(uint flags) | ||
1019 | { | ||
1020 | // Need to translate to MXP somehow | ||
1021 | } | ||
1022 | |||
1023 | public void SendTeleportProgress(uint flags, string message) | ||
1024 | { | ||
1025 | } | ||
1026 | |||
1027 | public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) | ||
1028 | { | ||
1029 | // Need to translate to MXP somehow | ||
1030 | } | ||
1031 | |||
1032 | public void SendPayPrice(UUID objectID, int[] payPrice) | ||
1033 | { | ||
1034 | // Need to translate to MXP somehow | ||
1035 | } | ||
1036 | |||
1037 | public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) | ||
1038 | { | ||
1039 | // Minimap function, not used. | ||
1040 | } | ||
1041 | |||
1042 | public void SetChildAgentThrottle(byte[] throttle) | ||
1043 | { | ||
1044 | // Need to translate to MXP somehow | ||
1045 | } | ||
1046 | |||
1047 | public void SendAvatarDataImmediate(ISceneEntity avatar) | ||
1048 | { | ||
1049 | //ScenePresence presence=((Scene)this.Scene).GetScenePresence(avatarID); | ||
1050 | ScenePresence presence = (ScenePresence)avatar; | ||
1051 | UUID ownerID = presence.UUID; | ||
1052 | MXPSendAvatarData(presence.Firstname + " " + presence.Lastname, ownerID, UUID.Zero, presence.UUID, presence.LocalId, presence.AbsolutePosition, presence.Rotation); | ||
1053 | } | ||
1054 | |||
1055 | public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) | ||
1056 | { | ||
1057 | //MovementEventMessage me = new MovementEventMessage(); | ||
1058 | //me.ObjectIndex = data.LocalID; | ||
1059 | //me.Location = ToOmVector(data.Position); | ||
1060 | //me.Orientation = ToOmQuaternion(data.Rotation); | ||
1061 | |||
1062 | //MXPSendPrimitive(data.localID, data.ownerID, data.acc, data.rvel, data.primShape, data.pos, data.objectID, data.vel, | ||
1063 | // data.rotation, (uint)data.flags, data.text, data.color, data.parentID, data.particleSystem, data.clickAction, | ||
1064 | // data.material, data.textureanim); | ||
1065 | |||
1066 | //Session.Send(me); | ||
1067 | |||
1068 | throw new System.NotImplementedException(); | ||
1069 | } | ||
1070 | |||
1071 | public void ReprioritizeUpdates() | ||
1072 | { | ||
1073 | } | ||
1074 | |||
1075 | public void FlushPrimUpdates() | ||
1076 | { | ||
1077 | } | ||
1078 | |||
1079 | public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, int version, bool fetchFolders, bool fetchItems) | ||
1080 | { | ||
1081 | // Need to translate to MXP somehow | ||
1082 | } | ||
1083 | |||
1084 | public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item) | ||
1085 | { | ||
1086 | // Need to translate to MXP somehow | ||
1087 | } | ||
1088 | |||
1089 | public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId) | ||
1090 | { | ||
1091 | // Need to translate to MXP somehow | ||
1092 | } | ||
1093 | |||
1094 | public void SendRemoveInventoryItem(UUID itemID) | ||
1095 | { | ||
1096 | // Need to translate to MXP somehow | ||
1097 | } | ||
1098 | |||
1099 | public void SendTakeControls(int controls, bool passToAgent, bool TakeControls) | ||
1100 | { | ||
1101 | // Need to translate to MXP somehow | ||
1102 | } | ||
1103 | |||
1104 | public void SendTaskInventory(UUID taskID, short serial, byte[] fileName) | ||
1105 | { | ||
1106 | // Need to translate to MXP somehow | ||
1107 | } | ||
1108 | |||
1109 | public void SendBulkUpdateInventory(InventoryNodeBase node) | ||
1110 | { | ||
1111 | // Need to translate to MXP somehow | ||
1112 | } | ||
1113 | |||
1114 | public void SendXferPacket(ulong xferID, uint packet, byte[] data) | ||
1115 | { | ||
1116 | // SL Specific, Ignore. (Remove from IClient) | ||
1117 | } | ||
1118 | |||
1119 | public void SendAbortXferPacket(ulong xferID) | ||
1120 | { | ||
1121 | |||
1122 | } | ||
1123 | |||
1124 | |||
1125 | public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent) | ||
1126 | { | ||
1127 | // SL Specific, Ignore. (Remove from IClient) | ||
1128 | } | ||
1129 | |||
1130 | public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data) | ||
1131 | { | ||
1132 | // Need to translate to MXP somehow | ||
1133 | } | ||
1134 | |||
1135 | public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) | ||
1136 | { | ||
1137 | // Need to translate to MXP somehow | ||
1138 | // TODO: This may need doing - involves displaying the users avatar name | ||
1139 | } | ||
1140 | |||
1141 | public void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID) | ||
1142 | { | ||
1143 | // Need to translate to MXP somehow | ||
1144 | } | ||
1145 | |||
1146 | public void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags) | ||
1147 | { | ||
1148 | // Need to translate to MXP somehow | ||
1149 | } | ||
1150 | |||
1151 | public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain) | ||
1152 | { | ||
1153 | // Need to translate to MXP somehow | ||
1154 | } | ||
1155 | |||
1156 | public void SendAttachedSoundGainChange(UUID objectID, float gain) | ||
1157 | { | ||
1158 | // Need to translate to MXP somehow | ||
1159 | } | ||
1160 | |||
1161 | public void SendNameReply(UUID profileId, string firstname, string lastname) | ||
1162 | { | ||
1163 | // SL Specific | ||
1164 | } | ||
1165 | |||
1166 | public void SendAlertMessage(string message) | ||
1167 | { | ||
1168 | SendChatMessage(message, 0, Vector3.Zero, "System", UUID.Zero, 0, 0); | ||
1169 | } | ||
1170 | |||
1171 | public void SendAgentAlertMessage(string message, bool modal) | ||
1172 | { | ||
1173 | SendChatMessage(message, 0, Vector3.Zero, "System" + (modal ? " Notice" : ""), UUID.Zero, 0, 0); | ||
1174 | } | ||
1175 | |||
1176 | public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url) | ||
1177 | { | ||
1178 | // TODO: Probably can do this better | ||
1179 | SendChatMessage("Please visit: " + url, 0, Vector3.Zero, objectname, UUID.Zero, 0, 0); | ||
1180 | } | ||
1181 | |||
1182 | public void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) | ||
1183 | { | ||
1184 | // TODO: Probably can do this better | ||
1185 | SendChatMessage("Dialog: " + msg, 0, Vector3.Zero, objectname, UUID.Zero, 0, 0); | ||
1186 | } | ||
1187 | |||
1188 | public bool AddMoney(int debit) | ||
1189 | { | ||
1190 | SendChatMessage("You were paid: " + debit, 0, Vector3.Zero, "System", UUID.Zero, 0, 0); | ||
1191 | return true; | ||
1192 | } | ||
1193 | |||
1194 | public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition) | ||
1195 | { | ||
1196 | // Need to translate to MXP somehow | ||
1197 | // Send a light object? | ||
1198 | } | ||
1199 | |||
1200 | public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks) | ||
1201 | { | ||
1202 | // Need to translate to MXP somehow | ||
1203 | } | ||
1204 | |||
1205 | public void SendViewerTime(int phase) | ||
1206 | { | ||
1207 | // Need to translate to MXP somehow | ||
1208 | } | ||
1209 | |||
1210 | public UUID GetDefaultAnimation(string name) | ||
1211 | { | ||
1212 | return UUID.Zero; | ||
1213 | } | ||
1214 | |||
1215 | public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] charterMember, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID) | ||
1216 | { | ||
1217 | // Need to translate to MXP somehow | ||
1218 | } | ||
1219 | |||
1220 | public void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question) | ||
1221 | { | ||
1222 | // Need to translate to MXP somehow | ||
1223 | } | ||
1224 | |||
1225 | public void SendHealth(float health) | ||
1226 | { | ||
1227 | // Need to translate to MXP somehow | ||
1228 | } | ||
1229 | |||
1230 | public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) | ||
1231 | { | ||
1232 | // Need to translate to MXP somehow | ||
1233 | } | ||
1234 | |||
1235 | public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID) | ||
1236 | { | ||
1237 | // Need to translate to MXP somehow | ||
1238 | } | ||
1239 | |||
1240 | public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) | ||
1241 | { | ||
1242 | // Need to translate to MXP somehow | ||
1243 | } | ||
1244 | |||
1245 | public void SendEstateCovenantInformation(UUID covenant) | ||
1246 | { | ||
1247 | // Need to translate to MXP somehow | ||
1248 | } | ||
1249 | |||
1250 | public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner) | ||
1251 | { | ||
1252 | // Need to translate to MXP somehow | ||
1253 | } | ||
1254 | |||
1255 | public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, ILandObject lo, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) | ||
1256 | { | ||
1257 | // Need to translate to MXP somehow | ||
1258 | } | ||
1259 | |||
1260 | public void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID) | ||
1261 | { | ||
1262 | // Need to translate to MXP somehow | ||
1263 | } | ||
1264 | |||
1265 | public void SendForceClientSelectObjects(List<uint> objectIDs) | ||
1266 | { | ||
1267 | // Need to translate to MXP somehow | ||
1268 | } | ||
1269 | |||
1270 | public void SendLandObjectOwners(LandData land, List<UUID> groups, Dictionary<UUID, int> ownersAndCount) | ||
1271 | { | ||
1272 | // Need to translate to MXP somehow | ||
1273 | } | ||
1274 | |||
1275 | public void SendCameraConstraint(Vector4 ConstraintPlane) | ||
1276 | { | ||
1277 | |||
1278 | } | ||
1279 | |||
1280 | public void SendLandParcelOverlay(byte[] data, int sequence_id) | ||
1281 | { | ||
1282 | // Need to translate to MXP somehow | ||
1283 | } | ||
1284 | |||
1285 | public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time) | ||
1286 | { | ||
1287 | // Need to translate to MXP somehow | ||
1288 | } | ||
1289 | |||
1290 | public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop) | ||
1291 | { | ||
1292 | // Need to translate to MXP somehow | ||
1293 | } | ||
1294 | |||
1295 | public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) | ||
1296 | { | ||
1297 | // Need to translate to MXP somehow | ||
1298 | } | ||
1299 | |||
1300 | public void SendConfirmXfer(ulong xferID, uint PacketID) | ||
1301 | { | ||
1302 | // Need to translate to MXP somehow | ||
1303 | } | ||
1304 | |||
1305 | public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName) | ||
1306 | { | ||
1307 | // Need to translate to MXP somehow | ||
1308 | } | ||
1309 | |||
1310 | public void SendInitiateDownload(string simFileName, string clientFileName) | ||
1311 | { | ||
1312 | // Need to translate to MXP somehow | ||
1313 | } | ||
1314 | |||
1315 | public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) | ||
1316 | { | ||
1317 | // Need to translate to MXP somehow | ||
1318 | } | ||
1319 | |||
1320 | public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData) | ||
1321 | { | ||
1322 | // Need to translate to MXP somehow | ||
1323 | } | ||
1324 | |||
1325 | public void SendImageNotFound(UUID imageid) | ||
1326 | { | ||
1327 | // Need to translate to MXP somehow | ||
1328 | } | ||
1329 | |||
1330 | public void SendShutdownConnectionNotice() | ||
1331 | { | ||
1332 | // Need to translate to MXP somehow | ||
1333 | } | ||
1334 | |||
1335 | public void SendSimStats(SimStats stats) | ||
1336 | { | ||
1337 | // Need to translate to MXP somehow | ||
1338 | } | ||
1339 | |||
1340 | public void SendObjectPropertiesFamilyData(ISceneEntity Entity, uint RequestFlags) | ||
1341 | { | ||
1342 | //throw new System.NotImplementedException(); | ||
1343 | } | ||
1344 | |||
1345 | public void SendObjectPropertiesReply(ISceneEntity entity) | ||
1346 | { | ||
1347 | //throw new System.NotImplementedException(); | ||
1348 | } | ||
1349 | |||
1350 | public void SendAgentOffline(UUID[] agentIDs) | ||
1351 | { | ||
1352 | // Need to translate to MXP somehow (Friends List) | ||
1353 | } | ||
1354 | |||
1355 | public void SendAgentOnline(UUID[] agentIDs) | ||
1356 | { | ||
1357 | // Need to translate to MXP somehow (Friends List) | ||
1358 | } | ||
1359 | |||
1360 | public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) | ||
1361 | { | ||
1362 | // Need to translate to MXP somehow | ||
1363 | } | ||
1364 | |||
1365 | public void SendAdminResponse(UUID Token, uint AdminLevel) | ||
1366 | { | ||
1367 | // Need to translate to MXP somehow | ||
1368 | } | ||
1369 | |||
1370 | public void SendGroupMembership(GroupMembershipData[] GroupMembership) | ||
1371 | { | ||
1372 | // Need to translate to MXP somehow | ||
1373 | } | ||
1374 | |||
1375 | public void SendGroupNameReply(UUID groupLLUID, string GroupName) | ||
1376 | { | ||
1377 | // Need to translate to MXP somehow | ||
1378 | } | ||
1379 | |||
1380 | public void SendJoinGroupReply(UUID groupID, bool success) | ||
1381 | { | ||
1382 | // Need to translate to MXP somehow | ||
1383 | } | ||
1384 | |||
1385 | public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success) | ||
1386 | { | ||
1387 | // Need to translate to MXP somehow | ||
1388 | } | ||
1389 | |||
1390 | public void SendLeaveGroupReply(UUID groupID, bool success) | ||
1391 | { | ||
1392 | // Need to translate to MXP somehow | ||
1393 | } | ||
1394 | |||
1395 | public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia) | ||
1396 | { | ||
1397 | // Need to translate to MXP somehow | ||
1398 | } | ||
1399 | |||
1400 | public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running) | ||
1401 | { | ||
1402 | // Need to translate to MXP somehow | ||
1403 | } | ||
1404 | |||
1405 | public void SendAsset(AssetRequestToClient req) | ||
1406 | { | ||
1407 | // Need to translate to MXP somehow | ||
1408 | } | ||
1409 | |||
1410 | public void SendTexture(AssetBase TextureAsset) | ||
1411 | { | ||
1412 | // Need to translate to MXP somehow | ||
1413 | } | ||
1414 | |||
1415 | public byte[] GetThrottlesPacked(float multiplier) | ||
1416 | { | ||
1417 | // LL Specific, get out of IClientAPI | ||
1418 | |||
1419 | const int singlefloat = 4; | ||
1420 | float tResend = multiplier; | ||
1421 | float tLand = multiplier; | ||
1422 | float tWind = multiplier; | ||
1423 | float tCloud = multiplier; | ||
1424 | float tTask = multiplier; | ||
1425 | float tTexture = multiplier; | ||
1426 | float tAsset = multiplier; | ||
1427 | |||
1428 | byte[] throttles = new byte[singlefloat * 7]; | ||
1429 | int i = 0; | ||
1430 | Buffer.BlockCopy(BitConverter.GetBytes(tResend), 0, throttles, singlefloat * i, singlefloat); | ||
1431 | i++; | ||
1432 | Buffer.BlockCopy(BitConverter.GetBytes(tLand), 0, throttles, singlefloat * i, singlefloat); | ||
1433 | i++; | ||
1434 | Buffer.BlockCopy(BitConverter.GetBytes(tWind), 0, throttles, singlefloat * i, singlefloat); | ||
1435 | i++; | ||
1436 | Buffer.BlockCopy(BitConverter.GetBytes(tCloud), 0, throttles, singlefloat * i, singlefloat); | ||
1437 | i++; | ||
1438 | Buffer.BlockCopy(BitConverter.GetBytes(tTask), 0, throttles, singlefloat * i, singlefloat); | ||
1439 | i++; | ||
1440 | Buffer.BlockCopy(BitConverter.GetBytes(tTexture), 0, throttles, singlefloat * i, singlefloat); | ||
1441 | i++; | ||
1442 | Buffer.BlockCopy(BitConverter.GetBytes(tAsset), 0, throttles, singlefloat * i, singlefloat); | ||
1443 | |||
1444 | return throttles; | ||
1445 | } | ||
1446 | |||
1447 | public void SendBlueBoxMessage(UUID FromAvatarID, string FromAvatarName, string Message) | ||
1448 | { | ||
1449 | SendChatMessage(Message, 0, Vector3.Zero, FromAvatarName, UUID.Zero, 0, 0); | ||
1450 | } | ||
1451 | |||
1452 | public void SendLogoutPacket() | ||
1453 | { | ||
1454 | LeaveRequestMessage lrm = new LeaveRequestMessage(); | ||
1455 | Session.Send(lrm); | ||
1456 | } | ||
1457 | |||
1458 | public EndPoint GetClientEP() | ||
1459 | { | ||
1460 | return null; | ||
1461 | } | ||
1462 | |||
1463 | public ClientInfo GetClientInfo() | ||
1464 | { | ||
1465 | return null; | ||
1466 | //throw new System.NotImplementedException(); | ||
1467 | } | ||
1468 | |||
1469 | public void SetClientInfo(ClientInfo info) | ||
1470 | { | ||
1471 | //throw new System.NotImplementedException(); | ||
1472 | } | ||
1473 | |||
1474 | public void SetClientOption(string option, string value) | ||
1475 | { | ||
1476 | // Need to translate to MXP somehow | ||
1477 | } | ||
1478 | |||
1479 | public string GetClientOption(string option) | ||
1480 | { | ||
1481 | // Need to translate to MXP somehow | ||
1482 | return ""; | ||
1483 | } | ||
1484 | |||
1485 | public void Terminate() | ||
1486 | { | ||
1487 | Close(); | ||
1488 | } | ||
1489 | |||
1490 | public void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters) | ||
1491 | { | ||
1492 | // Need to translate to MXP somehow | ||
1493 | } | ||
1494 | |||
1495 | public void SendClearFollowCamProperties(UUID objectID) | ||
1496 | { | ||
1497 | // Need to translate to MXP somehow | ||
1498 | } | ||
1499 | |||
1500 | public void SendRegionHandle(UUID regoinID, ulong handle) | ||
1501 | { | ||
1502 | // Need to translate to MXP somehow | ||
1503 | } | ||
1504 | |||
1505 | public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y) | ||
1506 | { | ||
1507 | // Need to translate to MXP somehow | ||
1508 | } | ||
1509 | |||
1510 | public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt) | ||
1511 | { | ||
1512 | // Need to translate to MXP somehow | ||
1513 | } | ||
1514 | |||
1515 | public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data) | ||
1516 | { | ||
1517 | // Need to translate to MXP somehow | ||
1518 | } | ||
1519 | |||
1520 | public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data) | ||
1521 | { | ||
1522 | // Need to translate to MXP somehow | ||
1523 | } | ||
1524 | |||
1525 | public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data) | ||
1526 | { | ||
1527 | // Need to translate to MXP somehow | ||
1528 | } | ||
1529 | |||
1530 | public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data) | ||
1531 | { | ||
1532 | // Need to translate to MXP somehow | ||
1533 | } | ||
1534 | |||
1535 | public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data) | ||
1536 | { | ||
1537 | // Need to translate to MXP somehow | ||
1538 | } | ||
1539 | |||
1540 | public void SendDirLandReply(UUID queryID, DirLandReplyData[] data) | ||
1541 | { | ||
1542 | // Need to translate to MXP somehow | ||
1543 | } | ||
1544 | |||
1545 | public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data) | ||
1546 | { | ||
1547 | // Need to translate to MXP somehow | ||
1548 | } | ||
1549 | |||
1550 | public void SendEventInfoReply(EventData info) | ||
1551 | { | ||
1552 | // Need to translate to MXP somehow | ||
1553 | } | ||
1554 | |||
1555 | public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags) | ||
1556 | { | ||
1557 | // Need to translate to MXP somehow | ||
1558 | } | ||
1559 | |||
1560 | public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data) | ||
1561 | { | ||
1562 | // Need to translate to MXP somehow | ||
1563 | } | ||
1564 | |||
1565 | public void SendOfferCallingCard(UUID srcID, UUID transactionID) | ||
1566 | { | ||
1567 | // Need to translate to MXP somehow | ||
1568 | } | ||
1569 | |||
1570 | public void SendAcceptCallingCard(UUID transactionID) | ||
1571 | { | ||
1572 | // Need to translate to MXP somehow | ||
1573 | } | ||
1574 | |||
1575 | public void SendDeclineCallingCard(UUID transactionID) | ||
1576 | { | ||
1577 | // Need to translate to MXP somehow | ||
1578 | } | ||
1579 | |||
1580 | public void SendTerminateFriend(UUID exFriendID) | ||
1581 | { | ||
1582 | // Need to translate to MXP somehow | ||
1583 | } | ||
1584 | |||
1585 | public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name) | ||
1586 | { | ||
1587 | // Need to translate to MXP somehow | ||
1588 | } | ||
1589 | |||
1590 | public void SendClassifiedInfoReply(UUID classifiedID, UUID creatorID, uint creationDate, uint expirationDate, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, string simName, Vector3 globalPos, string parcelName, byte classifiedFlags, int price) | ||
1591 | { | ||
1592 | // Need to translate to MXP somehow | ||
1593 | } | ||
1594 | |||
1595 | public void SendAgentDropGroup(UUID groupID) | ||
1596 | { | ||
1597 | // Need to translate to MXP somehow | ||
1598 | } | ||
1599 | |||
1600 | public void SendAvatarNotesReply(UUID targetID, string text) | ||
1601 | { | ||
1602 | // Need to translate to MXP somehow | ||
1603 | } | ||
1604 | |||
1605 | public void SendAvatarPicksReply(UUID targetID, Dictionary<UUID, string> picks) | ||
1606 | { | ||
1607 | // Need to translate to MXP somehow | ||
1608 | } | ||
1609 | |||
1610 | public void SendAvatarClassifiedReply(UUID targetID, Dictionary<UUID, string> classifieds) | ||
1611 | { | ||
1612 | // Need to translate to MXP somehow | ||
1613 | } | ||
1614 | |||
1615 | public void SendParcelDwellReply(int localID, UUID parcelID, float dwell) | ||
1616 | { | ||
1617 | // Need to translate to MXP somehow | ||
1618 | } | ||
1619 | |||
1620 | public void SendUserInfoReply(bool imViaEmail, bool visible, string email) | ||
1621 | { | ||
1622 | // Need to translate to MXP somehow | ||
1623 | } | ||
1624 | |||
1625 | public void KillEndDone() | ||
1626 | { | ||
1627 | Stop(); | ||
1628 | } | ||
1629 | |||
1630 | public bool AddGenericPacketHandler(string MethodName, GenericMessage handler) | ||
1631 | { | ||
1632 | // Need to translate to MXP somehow | ||
1633 | return true; | ||
1634 | } | ||
1635 | |||
1636 | #endregion | ||
1637 | |||
1638 | #region IClientCore | ||
1639 | |||
1640 | public bool TryGet<T>(out T iface) | ||
1641 | { | ||
1642 | iface = default(T); | ||
1643 | return false; | ||
1644 | } | ||
1645 | |||
1646 | public T Get<T>() | ||
1647 | { | ||
1648 | return default(T); | ||
1649 | } | ||
1650 | |||
1651 | public void Disconnect(string reason) | ||
1652 | { | ||
1653 | Kick(reason); | ||
1654 | Close(); | ||
1655 | } | ||
1656 | |||
1657 | public void Disconnect() | ||
1658 | { | ||
1659 | Close(); | ||
1660 | } | ||
1661 | |||
1662 | #endregion | ||
1663 | |||
1664 | public void SendCreateGroupReply(UUID groupID, bool success, string message) | ||
1665 | { | ||
1666 | } | ||
1667 | |||
1668 | public void RefreshGroupMembership() | ||
1669 | { | ||
1670 | } | ||
1671 | |||
1672 | public void SendUseCachedMuteList() | ||
1673 | { | ||
1674 | } | ||
1675 | |||
1676 | public void SendMuteListUpdate(string filename) | ||
1677 | { | ||
1678 | } | ||
1679 | |||
1680 | public void SendPickInfoReply(UUID pickID,UUID creatorID, bool topPick, UUID parcelID, string name, string desc, UUID snapshotID, string user, string originalName, string simName, Vector3 posGlobal, int sortOrder, bool enabled) | ||
1681 | { | ||
1682 | } | ||
1683 | |||
1684 | public void SendRebakeAvatarTextures(UUID textureID) | ||
1685 | { | ||
1686 | } | ||
1687 | |||
1688 | public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages) | ||
1689 | { | ||
1690 | } | ||
1691 | |||
1692 | public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) | ||
1693 | { | ||
1694 | } | ||
1695 | |||
1696 | public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) | ||
1697 | { | ||
1698 | } | ||
1699 | |||
1700 | public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) | ||
1701 | { | ||
1702 | } | ||
1703 | |||
1704 | public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) | ||
1705 | { | ||
1706 | } | ||
1707 | |||
1708 | public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) | ||
1709 | { | ||
1710 | } | ||
1711 | |||
1712 | public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) | ||
1713 | { | ||
1714 | } | ||
1715 | |||
1716 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | ||
1717 | { | ||
1718 | } | ||
1719 | |||
1720 | public void StopFlying(ISceneEntity presence) | ||
1721 | { | ||
1722 | } | ||
1723 | |||
1724 | public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) | ||
1725 | { | ||
1726 | } | ||
1727 | } | ||
1728 | } | ||
diff --git a/OpenSim/Client/MXP/MXPModule.cs b/OpenSim/Client/MXP/MXPModule.cs deleted file mode 100644 index 0b442cc..0000000 --- a/OpenSim/Client/MXP/MXPModule.cs +++ /dev/null | |||
@@ -1,131 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
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 | ||
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 | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Reflection; | ||
31 | using System.Text; | ||
32 | using System.Timers; | ||
33 | using log4net; | ||
34 | using MXP; | ||
35 | using Nini.Config; | ||
36 | using OpenMetaverse; | ||
37 | using OpenSim.Client.MXP.PacketHandler; | ||
38 | using OpenSim.Region.Framework.Interfaces; | ||
39 | using OpenSim.Region.Framework.Scenes; | ||
40 | |||
41 | namespace OpenSim.Client.MXP | ||
42 | { | ||
43 | |||
44 | /** | ||
45 | * MXP Client Module which adds MXP support to client / region communication. | ||
46 | */ | ||
47 | public class MXPModule : IRegionModule | ||
48 | { | ||
49 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
50 | |||
51 | private MXPPacketServer m_server; | ||
52 | |||
53 | private IConfigSource m_config; | ||
54 | private int m_port = 1253; | ||
55 | private Timer m_ticker; | ||
56 | |||
57 | private readonly Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>(); | ||
58 | private bool m_shutdown; | ||
59 | |||
60 | public void Initialise(Scene scene, IConfigSource source) | ||
61 | { | ||
62 | if (!m_scenes.ContainsKey(scene.RegionInfo.RegionID)) | ||
63 | m_scenes.Add(scene.RegionInfo.RegionID, scene); | ||
64 | |||
65 | m_config = source; | ||
66 | } | ||
67 | |||
68 | public void PostInitialise() | ||
69 | { | ||
70 | if (m_config.Configs["MXP"] != null) | ||
71 | { | ||
72 | IConfig con = m_config.Configs["MXP"]; | ||
73 | |||
74 | if (!con.GetBoolean("Enabled", false)) | ||
75 | return; | ||
76 | |||
77 | m_port = con.GetInt("Port", m_port); | ||
78 | |||
79 | m_server = new MXPPacketServer(m_port, m_scenes,m_config.Configs["StandAlone"].GetBoolean("accounts_authenticate",true)); | ||
80 | |||
81 | m_ticker = new Timer(100); | ||
82 | m_ticker.AutoReset = false; | ||
83 | m_ticker.Elapsed += ticker_Elapsed; | ||
84 | |||
85 | lock (m_ticker) | ||
86 | m_ticker.Start(); | ||
87 | |||
88 | m_log.Info("[MXP ClientStack] MXP Enabled and Listening"); | ||
89 | } | ||
90 | } | ||
91 | |||
92 | void ticker_Elapsed(object sender, ElapsedEventArgs e) | ||
93 | { | ||
94 | try | ||
95 | { | ||
96 | m_server.Process(); | ||
97 | } | ||
98 | catch (Exception ex) | ||
99 | { | ||
100 | m_log.Error("[MXP ClientStack]: Unhandled exception in process loop: " + ex.ToString() + " :" + ex.StackTrace.ToString()); | ||
101 | } | ||
102 | |||
103 | if (!m_shutdown) | ||
104 | { | ||
105 | lock (m_ticker) | ||
106 | m_ticker.Start(); | ||
107 | } | ||
108 | } | ||
109 | |||
110 | public void Close() | ||
111 | { | ||
112 | m_shutdown = true; | ||
113 | if (m_ticker != null) | ||
114 | { | ||
115 | lock (m_ticker) | ||
116 | m_ticker.Stop(); | ||
117 | } | ||
118 | } | ||
119 | |||
120 | public string Name | ||
121 | { | ||
122 | get { return "MXP ClientStack Module"; } | ||
123 | } | ||
124 | |||
125 | public bool IsSharedModule | ||
126 | { | ||
127 | get { return true; } | ||
128 | } | ||
129 | |||
130 | } | ||
131 | } | ||
diff --git a/OpenSim/Client/MXP/MXPUtil.cs b/OpenSim/Client/MXP/MXPUtil.cs deleted file mode 100644 index 3387145..0000000 --- a/OpenSim/Client/MXP/MXPUtil.cs +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
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 | ||
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 | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | using OpenMetaverse; | ||
32 | |||
33 | namespace OpenSim.Client.MXP | ||
34 | { | ||
35 | public static class MXPUtil | ||
36 | { | ||
37 | public static string GenerateMXPURL(string server, int port, UUID bubbleID, Vector3 location) | ||
38 | { | ||
39 | return string.Format("mxp://{0}:{1}/{2}/{3}", server, port, bubbleID.Guid, location); | ||
40 | } | ||
41 | } | ||
42 | } | ||
diff --git a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs deleted file mode 100644 index dcecb8b..0000000 --- a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs +++ /dev/null | |||
@@ -1,561 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
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 | ||
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 | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | /* This file borrows heavily from MXPServer.cs - the reference MXPServer | ||
29 | * See http://www.bubblecloud.org for a copy of the original file and | ||
30 | * implementation details. */ | ||
31 | |||
32 | using System; | ||
33 | using System.Collections.Generic; | ||
34 | using System.Reflection; | ||
35 | using System.Threading; | ||
36 | using log4net; | ||
37 | using MXP; | ||
38 | using MXP.Messages; | ||
39 | using OpenMetaverse; | ||
40 | using OpenSim.Client.MXP.ClientStack; | ||
41 | using OpenSim.Framework; | ||
42 | using OpenSim.Region.Framework.Scenes; | ||
43 | using OpenSim.Framework.Communications; | ||
44 | using OpenSim.Services.Interfaces; | ||
45 | using System.Security.Cryptography; | ||
46 | |||
47 | namespace OpenSim.Client.MXP.PacketHandler | ||
48 | { | ||
49 | public class MXPPacketServer | ||
50 | { | ||
51 | internal static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
52 | |||
53 | #region Fields | ||
54 | |||
55 | private readonly List<MXPClientView> m_clients = new List<MXPClientView>(); | ||
56 | private readonly Dictionary<UUID, Scene> m_scenes; | ||
57 | private readonly Transmitter m_transmitter; | ||
58 | |||
59 | // private readonly Thread m_clientThread; | ||
60 | |||
61 | private readonly IList<Session> m_sessions = new List<Session>(); | ||
62 | private readonly IList<Session> m_sessionsToClient = new List<Session>(); | ||
63 | private readonly IList<MXPClientView> m_sessionsToRemove = new List<MXPClientView>(); | ||
64 | |||
65 | private readonly int m_port; | ||
66 | // private readonly bool m_accountsAuthenticate; | ||
67 | |||
68 | private readonly String m_programName; | ||
69 | private readonly byte m_programMajorVersion; | ||
70 | private readonly byte m_programMinorVersion; | ||
71 | |||
72 | #endregion | ||
73 | |||
74 | #region Constructors | ||
75 | |||
76 | public MXPPacketServer(int port, Dictionary<UUID, Scene> scenes, bool accountsAuthenticate) | ||
77 | { | ||
78 | m_port = port; | ||
79 | // m_accountsAuthenticate = accountsAuthenticate; | ||
80 | |||
81 | m_scenes = scenes; | ||
82 | |||
83 | m_programMinorVersion = 63; | ||
84 | m_programMajorVersion = 0; | ||
85 | m_programName = "OpenSimulator"; | ||
86 | |||
87 | m_transmitter = new Transmitter(port); | ||
88 | |||
89 | StartListener(); | ||
90 | } | ||
91 | |||
92 | public void StartListener() | ||
93 | { | ||
94 | m_log.Info("[MXP ClientStack] Transmitter starting on UDP server port: " + m_port); | ||
95 | m_transmitter.Startup(); | ||
96 | m_log.Info("[MXP ClientStack] Transmitter started. MXP version: "+MxpConstants.ProtocolMajorVersion+"."+MxpConstants.ProtocolMinorVersion+" Source Revision: "+MxpConstants.ProtocolSourceRevision); | ||
97 | } | ||
98 | |||
99 | #endregion | ||
100 | |||
101 | #region Properties | ||
102 | |||
103 | /// <summary> | ||
104 | /// Number of sessions pending. (Process() accepts pending sessions). | ||
105 | /// </summary> | ||
106 | public int PendingSessionCount | ||
107 | { | ||
108 | get | ||
109 | { | ||
110 | return m_transmitter.PendingSessionCount; | ||
111 | } | ||
112 | } | ||
113 | /// <summary> | ||
114 | /// Number of connected sessions. | ||
115 | /// </summary> | ||
116 | public int SessionCount | ||
117 | { | ||
118 | get | ||
119 | { | ||
120 | return m_sessions.Count; | ||
121 | } | ||
122 | } | ||
123 | /// <summary> | ||
124 | /// Property reflecting whether client transmitter threads are alive. | ||
125 | /// </summary> | ||
126 | public bool IsTransmitterAlive | ||
127 | { | ||
128 | get | ||
129 | { | ||
130 | return m_transmitter != null && m_transmitter.IsAlive; | ||
131 | } | ||
132 | } | ||
133 | /// <summary> | ||
134 | /// Number of packets sent. | ||
135 | /// </summary> | ||
136 | public ulong PacketsSent | ||
137 | { | ||
138 | get | ||
139 | { | ||
140 | return m_transmitter != null ? m_transmitter.PacketsSent : 0; | ||
141 | } | ||
142 | } | ||
143 | /// <summary> | ||
144 | /// Number of packets received. | ||
145 | /// </summary> | ||
146 | public ulong PacketsReceived | ||
147 | { | ||
148 | get | ||
149 | { | ||
150 | return m_transmitter != null ? m_transmitter.PacketsReceived : 0; | ||
151 | } | ||
152 | } | ||
153 | /// <summary> | ||
154 | /// Bytes client has received so far. | ||
155 | /// </summary> | ||
156 | public ulong BytesReceived | ||
157 | { | ||
158 | get | ||
159 | { | ||
160 | return m_transmitter != null ? m_transmitter.BytesReceived : 0; | ||
161 | } | ||
162 | } | ||
163 | /// <summary> | ||
164 | /// Bytes client has sent so far. | ||
165 | /// </summary> | ||
166 | public ulong BytesSent | ||
167 | { | ||
168 | get | ||
169 | { | ||
170 | return m_transmitter != null ? m_transmitter.BytesSent : 0; | ||
171 | } | ||
172 | } | ||
173 | /// <summary> | ||
174 | /// Number of bytes received (bytes per second) during past second. | ||
175 | /// </summary> | ||
176 | public double ReceiveRate | ||
177 | { | ||
178 | get | ||
179 | { | ||
180 | return m_transmitter != null ? m_transmitter.ReceiveRate : 0; | ||
181 | } | ||
182 | } | ||
183 | /// <summary> | ||
184 | /// Number of bytes sent (bytes per second) during past second. | ||
185 | /// </summary> | ||
186 | public double SendRate | ||
187 | { | ||
188 | get | ||
189 | { | ||
190 | return m_transmitter != null ? m_transmitter.SendRate : 0; | ||
191 | } | ||
192 | } | ||
193 | |||
194 | #endregion | ||
195 | |||
196 | #region Session Management | ||
197 | |||
198 | public void Disconnect(Session session) | ||
199 | { | ||
200 | if (session.IsConnected) | ||
201 | { | ||
202 | Message message = MessageFactory.Current.ReserveMessage(typeof(LeaveRequestMessage)); | ||
203 | session.Send(message); | ||
204 | MessageFactory.Current.ReleaseMessage(message); | ||
205 | } | ||
206 | else | ||
207 | { | ||
208 | throw new Exception("Not connected."); | ||
209 | } | ||
210 | } | ||
211 | |||
212 | #endregion | ||
213 | |||
214 | #region Processing | ||
215 | |||
216 | public void Process() | ||
217 | { | ||
218 | ProcessMessages(); | ||
219 | Clean(); | ||
220 | } | ||
221 | |||
222 | public void Clean() | ||
223 | { | ||
224 | foreach (MXPClientView clientView in m_clients) | ||
225 | { | ||
226 | if (clientView.Session.SessionState == SessionState.Disconnected) | ||
227 | { | ||
228 | m_sessionsToRemove.Add(clientView); | ||
229 | } | ||
230 | } | ||
231 | |||
232 | foreach (MXPClientView clientView in m_sessionsToRemove) | ||
233 | { | ||
234 | clientView.Scene.RemoveClient(clientView.AgentId); | ||
235 | clientView.OnClean(); | ||
236 | m_clients.Remove(clientView); | ||
237 | m_sessions.Remove(clientView.Session); | ||
238 | } | ||
239 | |||
240 | m_sessionsToRemove.Clear(); | ||
241 | } | ||
242 | |||
243 | public void ProcessMessages() | ||
244 | { | ||
245 | if (m_transmitter.PendingSessionCount > 0) | ||
246 | { | ||
247 | Session tmp = m_transmitter.AcceptPendingSession(); | ||
248 | m_sessions.Add(tmp); | ||
249 | m_sessionsToClient.Add(tmp); | ||
250 | |||
251 | } | ||
252 | |||
253 | List<Session> tmpRemove = new List<Session>(); | ||
254 | |||
255 | foreach (Session session in m_sessionsToClient) | ||
256 | { | ||
257 | while (session.AvailableMessages > 0) | ||
258 | { | ||
259 | Message message = session.Receive(); | ||
260 | |||
261 | if (message.GetType() == typeof (JoinRequestMessage)) | ||
262 | { | ||
263 | |||
264 | JoinRequestMessage joinRequestMessage = (JoinRequestMessage) message; | ||
265 | |||
266 | m_log.Info("[MXP ClientStack]: Session join request: " + session.SessionId + " (" + | ||
267 | (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + | ||
268 | session.RemoteEndPoint.Port + ")"); | ||
269 | |||
270 | try | ||
271 | { | ||
272 | |||
273 | if (joinRequestMessage.BubbleId == Guid.Empty) | ||
274 | { | ||
275 | foreach (Scene scene in m_scenes.Values) | ||
276 | { | ||
277 | if (scene.RegionInfo.RegionName == joinRequestMessage.BubbleName) | ||
278 | { | ||
279 | m_log.Info("[MXP ClientStack]: Resolved region by name: " + joinRequestMessage.BubbleName + " (" + scene.RegionInfo.RegionID + ")"); | ||
280 | joinRequestMessage.BubbleId = scene.RegionInfo.RegionID.Guid; | ||
281 | } | ||
282 | } | ||
283 | } | ||
284 | |||
285 | if (joinRequestMessage.BubbleId == Guid.Empty) | ||
286 | { | ||
287 | m_log.Warn("[MXP ClientStack]: Failed to resolve region by name: " + joinRequestMessage.BubbleName); | ||
288 | } | ||
289 | |||
290 | UUID sceneId = new UUID(joinRequestMessage.BubbleId); | ||
291 | |||
292 | bool regionExists = true; | ||
293 | if (!m_scenes.ContainsKey(sceneId)) | ||
294 | { | ||
295 | m_log.Info("[MXP ClientStack]: No such region: " + sceneId); | ||
296 | regionExists = false; | ||
297 | } | ||
298 | |||
299 | UUID userId = UUID.Zero; | ||
300 | UserAccount account = null; | ||
301 | bool authorized = regionExists ? AuthoriseUser(joinRequestMessage.ParticipantName, | ||
302 | joinRequestMessage.ParticipantPassphrase, | ||
303 | new UUID(joinRequestMessage.BubbleId), out account) | ||
304 | : false; | ||
305 | |||
306 | if (authorized) | ||
307 | { | ||
308 | Scene scene = m_scenes[sceneId]; | ||
309 | UUID mxpSessionID = UUID.Random(); | ||
310 | |||
311 | string reason; | ||
312 | |||
313 | m_log.Debug("[MXP ClientStack]: Session join request success: " + session.SessionId + " (" + | ||
314 | (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + | ||
315 | session.RemoteEndPoint.Port + ")"); | ||
316 | |||
317 | m_log.Debug("[MXP ClientStack]: Attaching UserAgent to UserProfile..."); | ||
318 | UUID secureSession = UUID.Zero; | ||
319 | AttachUserAgentToUserProfile(account, session, mxpSessionID, sceneId, out secureSession); | ||
320 | m_log.Debug("[MXP ClientStack]: Attached UserAgent to UserProfile."); | ||
321 | m_log.Debug("[MXP ClientStack]: Preparing Scene to Connection..."); | ||
322 | if (!PrepareSceneForConnection(mxpSessionID, secureSession, sceneId, account, out reason)) | ||
323 | { | ||
324 | m_log.DebugFormat("[MXP ClientStack]: Scene refused connection: {0}", reason); | ||
325 | DeclineConnection(session, joinRequestMessage); | ||
326 | tmpRemove.Add(session); | ||
327 | continue; | ||
328 | } | ||
329 | m_log.Debug("[MXP ClientStack]: Prepared Scene to Connection."); | ||
330 | m_log.Debug("[MXP ClientStack]: Accepting connection..."); | ||
331 | AcceptConnection(session, joinRequestMessage, mxpSessionID, userId); | ||
332 | m_log.Info("[MXP ClientStack]: Accepted connection."); | ||
333 | |||
334 | m_log.Debug("[MXP ClientStack]: Creating ClientView...."); | ||
335 | MXPClientView client = new MXPClientView(session, mxpSessionID, userId, scene, account.FirstName, account.LastName); | ||
336 | m_clients.Add(client); | ||
337 | m_log.Debug("[MXP ClientStack]: Created ClientView."); | ||
338 | |||
339 | client.MXPSendSynchronizationBegin(m_scenes[new UUID(joinRequestMessage.BubbleId)].SceneContents.GetTotalObjectsCount()); | ||
340 | |||
341 | m_log.Debug("[MXP ClientStack]: Starting ClientView..."); | ||
342 | try | ||
343 | { | ||
344 | client.Start(); | ||
345 | m_log.Debug("[MXP ClientStack]: Started ClientView."); | ||
346 | } | ||
347 | catch (Exception e) | ||
348 | { | ||
349 | m_log.Error(e); | ||
350 | } | ||
351 | |||
352 | m_log.Debug("[MXP ClientStack]: Connected"); | ||
353 | } | ||
354 | else | ||
355 | { | ||
356 | m_log.Info("[MXP ClientStack]: Session join request failure: " + session.SessionId + " (" + | ||
357 | (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + | ||
358 | session.RemoteEndPoint.Port + ")"); | ||
359 | |||
360 | DeclineConnection(session, joinRequestMessage); | ||
361 | } | ||
362 | } | ||
363 | catch (Exception e) | ||
364 | { | ||
365 | m_log.Error("[MXP ClientStack]: Session join request failure: " + session.SessionId + " (" + | ||
366 | (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + | ||
367 | session.RemoteEndPoint.Port + "): "+e.ToString()+" :"+e.StackTrace.ToString()); | ||
368 | } | ||
369 | tmpRemove.Add(session); | ||
370 | } | ||
371 | } | ||
372 | } | ||
373 | |||
374 | foreach (Session session in tmpRemove) | ||
375 | { | ||
376 | m_sessionsToClient.Remove(session); | ||
377 | } | ||
378 | |||
379 | foreach (MXPClientView clientView in m_clients) | ||
380 | { | ||
381 | int messagesProcessedCount = 0; | ||
382 | Session session = clientView.Session; | ||
383 | |||
384 | while (session.AvailableMessages > 0) | ||
385 | { | ||
386 | Message message = session.Receive(); | ||
387 | |||
388 | if (message.GetType() == typeof(LeaveRequestMessage)) | ||
389 | { | ||
390 | LeaveResponseMessage leaveResponseMessage = (LeaveResponseMessage)MessageFactory.Current.ReserveMessage( | ||
391 | typeof(LeaveResponseMessage)); | ||
392 | |||
393 | m_log.Debug("[MXP ClientStack]: Session leave request: " + session.SessionId + " (" + (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + session.RemoteEndPoint.Port + ")"); | ||
394 | |||
395 | leaveResponseMessage.RequestMessageId = message.MessageId; | ||
396 | leaveResponseMessage.FailureCode = 0; | ||
397 | session.Send(leaveResponseMessage); | ||
398 | |||
399 | if (session.SessionState != SessionState.Disconnected) | ||
400 | { | ||
401 | session.SetStateDisconnected(); | ||
402 | } | ||
403 | |||
404 | m_log.Debug("[MXP ClientStack]: Removing Client from Scene"); | ||
405 | //clientView.Scene.RemoveClient(clientView.AgentId); | ||
406 | } | ||
407 | if (message.GetType() == typeof(LeaveResponseMessage)) | ||
408 | { | ||
409 | LeaveResponseMessage leaveResponseMessage = (LeaveResponseMessage)message; | ||
410 | |||
411 | m_log.Debug("[MXP ClientStack]: Session leave response: " + session.SessionId + " (" + (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + session.RemoteEndPoint.Port + ")"); | ||
412 | |||
413 | if (leaveResponseMessage.FailureCode == 0) | ||
414 | { | ||
415 | session.SetStateDisconnected(); | ||
416 | } | ||
417 | |||
418 | m_log.Debug("[MXP ClientStack]: Removing Client from Scene"); | ||
419 | //clientView.Scene.RemoveClient(clientView.AgentId); | ||
420 | } | ||
421 | else | ||
422 | { | ||
423 | clientView.MXPPRocessMessage(message); | ||
424 | } | ||
425 | |||
426 | MessageFactory.Current.ReleaseMessage(message); | ||
427 | messagesProcessedCount++; | ||
428 | if (messagesProcessedCount > 1000) | ||
429 | { | ||
430 | break; | ||
431 | } | ||
432 | } | ||
433 | } | ||
434 | } | ||
435 | |||
436 | private void AcceptConnection(Session session, JoinRequestMessage joinRequestMessage, UUID mxpSessionID, UUID userId) | ||
437 | { | ||
438 | JoinResponseMessage joinResponseMessage = (JoinResponseMessage)MessageFactory.Current.ReserveMessage( | ||
439 | typeof(JoinResponseMessage)); | ||
440 | |||
441 | joinResponseMessage.RequestMessageId = joinRequestMessage.MessageId; | ||
442 | joinResponseMessage.FailureCode = MxpResponseCodes.SUCCESS; | ||
443 | |||
444 | joinResponseMessage.BubbleId = joinRequestMessage.BubbleId; | ||
445 | joinResponseMessage.ParticipantId = userId.Guid; | ||
446 | joinResponseMessage.AvatarId = userId.Guid; | ||
447 | joinResponseMessage.BubbleAssetCacheUrl = "http://" + | ||
448 | NetworkUtil.GetHostFor(session.RemoteEndPoint.Address, | ||
449 | m_scenes[ | ||
450 | new UUID(joinRequestMessage.BubbleId)]. | ||
451 | RegionInfo. | ||
452 | ExternalHostName) + ":" + | ||
453 | m_scenes[new UUID(joinRequestMessage.BubbleId)].RegionInfo. | ||
454 | HttpPort + "/assets/"; | ||
455 | |||
456 | joinResponseMessage.BubbleName = m_scenes[new UUID(joinRequestMessage.BubbleId)].RegionInfo.RegionName; | ||
457 | |||
458 | joinResponseMessage.BubbleRange = 128; | ||
459 | joinResponseMessage.BubblePerceptionRange = 128 + 256; | ||
460 | joinResponseMessage.BubbleRealTime = 0; | ||
461 | joinResponseMessage.ProgramName = m_programName; | ||
462 | joinResponseMessage.ProgramMajorVersion = m_programMajorVersion; | ||
463 | joinResponseMessage.ProgramMinorVersion = m_programMinorVersion; | ||
464 | joinResponseMessage.ProtocolMajorVersion = MxpConstants.ProtocolMajorVersion; | ||
465 | joinResponseMessage.ProtocolMinorVersion = MxpConstants.ProtocolMinorVersion; | ||
466 | joinResponseMessage.ProtocolSourceRevision = MxpConstants.ProtocolSourceRevision; | ||
467 | |||
468 | session.Send(joinResponseMessage); | ||
469 | |||
470 | session.SetStateConnected(); | ||
471 | } | ||
472 | |||
473 | private void DeclineConnection(Session session, Message joinRequestMessage) | ||
474 | { | ||
475 | JoinResponseMessage joinResponseMessage = (JoinResponseMessage)MessageFactory.Current.ReserveMessage(typeof(JoinResponseMessage)); | ||
476 | |||
477 | joinResponseMessage.RequestMessageId = joinRequestMessage.MessageId; | ||
478 | joinResponseMessage.FailureCode = MxpResponseCodes.UNAUTHORIZED_OPERATION; | ||
479 | |||
480 | joinResponseMessage.ProgramName = m_programName; | ||
481 | joinResponseMessage.ProgramMajorVersion = m_programMajorVersion; | ||
482 | joinResponseMessage.ProgramMinorVersion = m_programMinorVersion; | ||
483 | joinResponseMessage.ProtocolMajorVersion = MxpConstants.ProtocolMajorVersion; | ||
484 | joinResponseMessage.ProtocolMinorVersion = MxpConstants.ProtocolMinorVersion; | ||
485 | joinResponseMessage.ProtocolSourceRevision = MxpConstants.ProtocolSourceRevision; | ||
486 | |||
487 | session.Send(joinResponseMessage); | ||
488 | |||
489 | session.SetStateDisconnected(); | ||
490 | } | ||
491 | |||
492 | public bool AuthoriseUser(string participantName, string password, UUID sceneId, out UserAccount account) | ||
493 | { | ||
494 | string firstName = ""; | ||
495 | string lastName = ""; | ||
496 | account = null; | ||
497 | |||
498 | string[] nameParts = participantName.Split(' '); | ||
499 | if (nameParts.Length != 2) | ||
500 | { | ||
501 | m_log.Error("[MXP ClientStack]: Login failed as user name is not formed of first and last name separated by space: " + participantName); | ||
502 | return false; | ||
503 | } | ||
504 | firstName = nameParts[0]; | ||
505 | lastName = nameParts[1]; | ||
506 | |||
507 | account = m_scenes[sceneId].UserAccountService.GetUserAccount(m_scenes[sceneId].RegionInfo.ScopeID, firstName, lastName); | ||
508 | if (account != null) | ||
509 | return (m_scenes[sceneId].AuthenticationService.Authenticate(account.PrincipalID, password, 1) != string.Empty); | ||
510 | |||
511 | return false; | ||
512 | } | ||
513 | |||
514 | private void AttachUserAgentToUserProfile(UserAccount account, Session session, UUID sessionId, UUID sceneId, out UUID secureSessionId) | ||
515 | { | ||
516 | secureSessionId = UUID.Random(); | ||
517 | Scene scene = m_scenes[sceneId]; | ||
518 | scene.PresenceService.LoginAgent(account.PrincipalID.ToString(), sessionId, secureSessionId); | ||
519 | } | ||
520 | |||
521 | private bool PrepareSceneForConnection(UUID sessionId, UUID secureSessionId, UUID sceneId, UserAccount account, out string reason) | ||
522 | { | ||
523 | Scene scene = m_scenes[sceneId]; | ||
524 | |||
525 | AgentCircuitData agent = new AgentCircuitData(); | ||
526 | agent.AgentID = account.PrincipalID; | ||
527 | agent.firstname = account.FirstName; | ||
528 | agent.lastname = account.LastName; | ||
529 | agent.SessionID = sessionId; | ||
530 | agent.SecureSessionID = secureSessionId; | ||
531 | agent.circuitcode = sessionId.CRC(); | ||
532 | agent.BaseFolder = UUID.Zero; | ||
533 | agent.InventoryFolder = UUID.Zero; | ||
534 | agent.startpos = new Vector3(0, 0, 0); // TODO Fill in region start position | ||
535 | agent.CapsPath = "http://localhost/"; | ||
536 | agent.Appearance = scene.AvatarService.GetAppearance(account.PrincipalID); | ||
537 | |||
538 | if (agent.Appearance == null) | ||
539 | { | ||
540 | m_log.WarnFormat("[INTER]: Appearance not found for {0} {1}. Creating default.", agent.firstname, agent.lastname); | ||
541 | agent.Appearance = new AvatarAppearance(); | ||
542 | } | ||
543 | |||
544 | return scene.NewUserConnection(agent, 0, out reason); | ||
545 | } | ||
546 | |||
547 | public void PrintDebugInformation() | ||
548 | { | ||
549 | m_log.Info("[MXP ClientStack]: Statistics report"); | ||
550 | m_log.Info("Pending Sessions: " + PendingSessionCount); | ||
551 | m_log.Info("Sessions: " + SessionCount + " (Clients: " + m_clients.Count + " )"); | ||
552 | m_log.Info("Transmitter Alive?: " + IsTransmitterAlive); | ||
553 | m_log.Info("Packets Sent/Received: " + PacketsSent + " / " + PacketsReceived); | ||
554 | m_log.Info("Bytes Sent/Received: " + BytesSent + " / " + BytesReceived); | ||
555 | m_log.Info("Send/Receive Rate (bps): " + SendRate + " / " + ReceiveRate); | ||
556 | } | ||
557 | |||
558 | #endregion | ||
559 | |||
560 | } | ||
561 | } | ||
diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs deleted file mode 100644 index d8cd0ac..0000000 --- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs +++ /dev/null | |||
@@ -1,1231 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
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 | ||
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 | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Drawing; | ||
31 | using System.Drawing.Imaging; | ||
32 | using System.IO; | ||
33 | using System.Net; | ||
34 | using System.Text; | ||
35 | using OpenMetaverse; | ||
36 | using OpenMetaverse.Imaging; | ||
37 | using OpenMetaverse.Packets; | ||
38 | using OpenSim.Framework; | ||
39 | using OpenSim.Framework.Servers; | ||
40 | using OpenSim.Framework.Servers.HttpServer; | ||
41 | using OpenSim.Region.Framework.Scenes; | ||
42 | |||
43 | namespace OpenSim.Client.VWoHTTP.ClientStack | ||
44 | { | ||
45 | class VWHClientView : IClientAPI | ||
46 | { | ||
47 | private Scene m_scene; | ||
48 | |||
49 | |||
50 | public bool ProcessInMsg(OSHttpRequest req, OSHttpResponse resp) | ||
51 | { | ||
52 | // 0 1 2 3 | ||
53 | // http://simulator.com:9000/vwohttp/sessionid/methodname/param | ||
54 | string[] urlparts = req.Url.AbsolutePath.Split(new char[] {'/'}, StringSplitOptions.RemoveEmptyEntries); | ||
55 | |||
56 | UUID sessionID; | ||
57 | // Check for session | ||
58 | if (!UUID.TryParse(urlparts[1], out sessionID)) | ||
59 | return false; | ||
60 | // Check we match session | ||
61 | if (sessionID != SessionId) | ||
62 | return false; | ||
63 | |||
64 | string method = urlparts[2]; | ||
65 | |||
66 | string param = String.Empty; | ||
67 | if (urlparts.Length > 3) | ||
68 | param = urlparts[3]; | ||
69 | |||
70 | bool found; | ||
71 | |||
72 | switch (method.ToLower()) | ||
73 | { | ||
74 | case "textures": | ||
75 | found = ProcessTextureRequest(param, resp); | ||
76 | break; | ||
77 | default: | ||
78 | found = false; | ||
79 | break; | ||
80 | } | ||
81 | |||
82 | return found; | ||
83 | } | ||
84 | |||
85 | private bool ProcessTextureRequest(string param, OSHttpResponse resp) | ||
86 | { | ||
87 | UUID assetID; | ||
88 | if (!UUID.TryParse(param, out assetID)) | ||
89 | return false; | ||
90 | |||
91 | AssetBase asset = m_scene.AssetService.Get(assetID.ToString()); | ||
92 | |||
93 | if (asset == null) | ||
94 | return false; | ||
95 | |||
96 | ManagedImage tmp; | ||
97 | Image imgData; | ||
98 | byte[] jpegdata; | ||
99 | |||
100 | OpenJPEG.DecodeToImage(asset.Data, out tmp, out imgData); | ||
101 | |||
102 | using (MemoryStream ms = new MemoryStream()) | ||
103 | { | ||
104 | imgData.Save(ms, ImageFormat.Jpeg); | ||
105 | jpegdata = ms.GetBuffer(); | ||
106 | } | ||
107 | |||
108 | resp.ContentType = "image/jpeg"; | ||
109 | resp.ContentLength = jpegdata.Length; | ||
110 | resp.StatusCode = 200; | ||
111 | resp.Body.Write(jpegdata, 0, jpegdata.Length); | ||
112 | |||
113 | return true; | ||
114 | } | ||
115 | |||
116 | public VWHClientView(UUID sessionID, UUID agentID, string agentName, Scene scene) | ||
117 | { | ||
118 | m_scene = scene; | ||
119 | } | ||
120 | |||
121 | #region Implementation of IClientAPI | ||
122 | |||
123 | public Vector3 StartPos | ||
124 | { | ||
125 | get { throw new System.NotImplementedException(); } | ||
126 | set { throw new System.NotImplementedException(); } | ||
127 | } | ||
128 | |||
129 | public UUID AgentId | ||
130 | { | ||
131 | get { throw new System.NotImplementedException(); } | ||
132 | } | ||
133 | |||
134 | public UUID SessionId | ||
135 | { | ||
136 | get { throw new System.NotImplementedException(); } | ||
137 | } | ||
138 | |||
139 | public UUID SecureSessionId | ||
140 | { | ||
141 | get { throw new System.NotImplementedException(); } | ||
142 | } | ||
143 | |||
144 | public UUID ActiveGroupId | ||
145 | { | ||
146 | get { throw new System.NotImplementedException(); } | ||
147 | } | ||
148 | |||
149 | public string ActiveGroupName | ||
150 | { | ||
151 | get { throw new System.NotImplementedException(); } | ||
152 | } | ||
153 | |||
154 | public ulong ActiveGroupPowers | ||
155 | { | ||
156 | get { throw new System.NotImplementedException(); } | ||
157 | } | ||
158 | |||
159 | public ulong GetGroupPowers(UUID groupID) | ||
160 | { | ||
161 | throw new System.NotImplementedException(); | ||
162 | } | ||
163 | |||
164 | public bool IsGroupMember(UUID GroupID) | ||
165 | { | ||
166 | throw new System.NotImplementedException(); | ||
167 | } | ||
168 | |||
169 | public string FirstName | ||
170 | { | ||
171 | get { throw new System.NotImplementedException(); } | ||
172 | } | ||
173 | |||
174 | public string LastName | ||
175 | { | ||
176 | get { throw new System.NotImplementedException(); } | ||
177 | } | ||
178 | |||
179 | public IScene Scene | ||
180 | { | ||
181 | get { throw new System.NotImplementedException(); } | ||
182 | } | ||
183 | |||
184 | public int NextAnimationSequenceNumber | ||
185 | { | ||
186 | get { throw new System.NotImplementedException(); } | ||
187 | } | ||
188 | |||
189 | public string Name | ||
190 | { | ||
191 | get { throw new System.NotImplementedException(); } | ||
192 | } | ||
193 | |||
194 | public bool IsActive | ||
195 | { | ||
196 | get { throw new System.NotImplementedException(); } | ||
197 | set { throw new System.NotImplementedException(); } | ||
198 | } | ||
199 | public bool IsLoggingOut | ||
200 | { | ||
201 | get { throw new System.NotImplementedException(); } | ||
202 | set { throw new System.NotImplementedException(); } | ||
203 | } | ||
204 | public bool SendLogoutPacketWhenClosing | ||
205 | { | ||
206 | set { throw new System.NotImplementedException(); } | ||
207 | } | ||
208 | |||
209 | public uint CircuitCode | ||
210 | { | ||
211 | get { throw new System.NotImplementedException(); } | ||
212 | } | ||
213 | |||
214 | public IPEndPoint RemoteEndPoint | ||
215 | { | ||
216 | get { throw new System.NotImplementedException(); } | ||
217 | } | ||
218 | |||
219 | public event GenericMessage OnGenericMessage = delegate { }; | ||
220 | public event ImprovedInstantMessage OnInstantMessage = delegate { }; | ||
221 | public event ChatMessage OnChatFromClient = delegate { }; | ||
222 | public event TextureRequest OnRequestTexture = delegate { }; | ||
223 | public event RezObject OnRezObject = delegate { }; | ||
224 | public event ModifyTerrain OnModifyTerrain = delegate { }; | ||
225 | public event BakeTerrain OnBakeTerrain = delegate { }; | ||
226 | public event EstateChangeInfo OnEstateChangeInfo = delegate { }; | ||
227 | public event SetAppearance OnSetAppearance = delegate { }; | ||
228 | public event AvatarNowWearing OnAvatarNowWearing = delegate { }; | ||
229 | public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv = delegate { return new UUID(); }; | ||
230 | public event RezMultipleAttachmentsFromInv OnRezMultipleAttachmentsFromInv = delegate { }; | ||
231 | public event UUIDNameRequest OnDetachAttachmentIntoInv = delegate { }; | ||
232 | public event ObjectAttach OnObjectAttach = delegate { }; | ||
233 | public event ObjectDeselect OnObjectDetach = delegate { }; | ||
234 | public event ObjectDrop OnObjectDrop = delegate { }; | ||
235 | public event StartAnim OnStartAnim = delegate { }; | ||
236 | public event StopAnim OnStopAnim = delegate { }; | ||
237 | public event LinkObjects OnLinkObjects = delegate { }; | ||
238 | public event DelinkObjects OnDelinkObjects = delegate { }; | ||
239 | public event RequestMapBlocks OnRequestMapBlocks = delegate { }; | ||
240 | public event RequestMapName OnMapNameRequest = delegate { }; | ||
241 | public event TeleportLocationRequest OnTeleportLocationRequest = delegate { }; | ||
242 | public event DisconnectUser OnDisconnectUser = delegate { }; | ||
243 | public event RequestAvatarProperties OnRequestAvatarProperties = delegate { }; | ||
244 | public event SetAlwaysRun OnSetAlwaysRun = delegate { }; | ||
245 | public event TeleportLandmarkRequest OnTeleportLandmarkRequest = delegate { }; | ||
246 | public event DeRezObject OnDeRezObject = delegate { }; | ||
247 | public event Action<IClientAPI> OnRegionHandShakeReply = delegate { }; | ||
248 | public event GenericCall1 OnRequestWearables = delegate { }; | ||
249 | public event GenericCall1 OnCompleteMovementToRegion = delegate { }; | ||
250 | public event UpdateAgent OnPreAgentUpdate; | ||
251 | public event UpdateAgent OnAgentUpdate = delegate { }; | ||
252 | public event AgentRequestSit OnAgentRequestSit = delegate { }; | ||
253 | public event AgentSit OnAgentSit = delegate { }; | ||
254 | public event AvatarPickerRequest OnAvatarPickerRequest = delegate { }; | ||
255 | public event Action<IClientAPI> OnRequestAvatarsData = delegate { }; | ||
256 | public event AddNewPrim OnAddPrim = delegate { }; | ||
257 | public event FetchInventory OnAgentDataUpdateRequest = delegate { }; | ||
258 | public event TeleportLocationRequest OnSetStartLocationRequest = delegate { }; | ||
259 | public event RequestGodlikePowers OnRequestGodlikePowers = delegate { }; | ||
260 | public event GodKickUser OnGodKickUser = delegate { }; | ||
261 | public event ObjectDuplicate OnObjectDuplicate = delegate { }; | ||
262 | public event ObjectDuplicateOnRay OnObjectDuplicateOnRay = delegate { }; | ||
263 | public event GrabObject OnGrabObject = delegate { }; | ||
264 | public event DeGrabObject OnDeGrabObject = delegate { }; | ||
265 | public event MoveObject OnGrabUpdate = delegate { }; | ||
266 | public event SpinStart OnSpinStart = delegate { }; | ||
267 | public event SpinObject OnSpinUpdate = delegate { }; | ||
268 | public event SpinStop OnSpinStop = delegate { }; | ||
269 | public event UpdateShape OnUpdatePrimShape = delegate { }; | ||
270 | public event ObjectExtraParams OnUpdateExtraParams = delegate { }; | ||
271 | public event ObjectRequest OnObjectRequest = delegate { }; | ||
272 | public event ObjectSelect OnObjectSelect = delegate { }; | ||
273 | public event ObjectDeselect OnObjectDeselect = delegate { }; | ||
274 | public event GenericCall7 OnObjectDescription = delegate { }; | ||
275 | public event GenericCall7 OnObjectName = delegate { }; | ||
276 | public event GenericCall7 OnObjectClickAction = delegate { }; | ||
277 | public event GenericCall7 OnObjectMaterial = delegate { }; | ||
278 | public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily = delegate { }; | ||
279 | public event UpdatePrimFlags OnUpdatePrimFlags = delegate { }; | ||
280 | public event UpdatePrimTexture OnUpdatePrimTexture = delegate { }; | ||
281 | public event UpdateVector OnUpdatePrimGroupPosition = delegate { }; | ||
282 | public event UpdateVector OnUpdatePrimSinglePosition = delegate { }; | ||
283 | public event UpdatePrimRotation OnUpdatePrimGroupRotation = delegate { }; | ||
284 | public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation = delegate { }; | ||
285 | public event UpdatePrimSingleRotationPosition OnUpdatePrimSingleRotationPosition = delegate { }; | ||
286 | public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation = delegate { }; | ||
287 | public event UpdateVector OnUpdatePrimScale = delegate { }; | ||
288 | public event UpdateVector OnUpdatePrimGroupScale = delegate { }; | ||
289 | public event StatusChange OnChildAgentStatus = delegate { }; | ||
290 | public event GenericCall2 OnStopMovement = delegate { }; | ||
291 | public event Action<UUID> OnRemoveAvatar = delegate { }; | ||
292 | public event ObjectPermissions OnObjectPermissions = delegate { }; | ||
293 | public event CreateNewInventoryItem OnCreateNewInventoryItem = delegate { }; | ||
294 | public event LinkInventoryItem OnLinkInventoryItem = delegate { }; | ||
295 | public event CreateInventoryFolder OnCreateNewInventoryFolder = delegate { }; | ||
296 | public event UpdateInventoryFolder OnUpdateInventoryFolder = delegate { }; | ||
297 | public event MoveInventoryFolder OnMoveInventoryFolder = delegate { }; | ||
298 | public event FetchInventoryDescendents OnFetchInventoryDescendents = delegate { }; | ||
299 | public event PurgeInventoryDescendents OnPurgeInventoryDescendents = delegate { }; | ||
300 | public event FetchInventory OnFetchInventory = delegate { }; | ||
301 | public event RequestTaskInventory OnRequestTaskInventory = delegate { }; | ||
302 | public event UpdateInventoryItem OnUpdateInventoryItem = delegate { }; | ||
303 | public event CopyInventoryItem OnCopyInventoryItem = delegate { }; | ||
304 | public event MoveInventoryItem OnMoveInventoryItem = delegate { }; | ||
305 | public event RemoveInventoryFolder OnRemoveInventoryFolder = delegate { }; | ||
306 | public event RemoveInventoryItem OnRemoveInventoryItem = delegate { }; | ||
307 | public event UDPAssetUploadRequest OnAssetUploadRequest = delegate { }; | ||
308 | public event XferReceive OnXferReceive = delegate { }; | ||
309 | public event RequestXfer OnRequestXfer = delegate { }; | ||
310 | public event ConfirmXfer OnConfirmXfer = delegate { }; | ||
311 | public event AbortXfer OnAbortXfer = delegate { }; | ||
312 | public event RezScript OnRezScript = delegate { }; | ||
313 | public event UpdateTaskInventory OnUpdateTaskInventory = delegate { }; | ||
314 | public event MoveTaskInventory OnMoveTaskItem = delegate { }; | ||
315 | public event RemoveTaskInventory OnRemoveTaskItem = delegate { }; | ||
316 | public event RequestAsset OnRequestAsset = delegate { }; | ||
317 | public event UUIDNameRequest OnNameFromUUIDRequest = delegate { }; | ||
318 | public event ParcelAccessListRequest OnParcelAccessListRequest = delegate { }; | ||
319 | public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest = delegate { }; | ||
320 | public event ParcelPropertiesRequest OnParcelPropertiesRequest = delegate { }; | ||
321 | public event ParcelDivideRequest OnParcelDivideRequest = delegate { }; | ||
322 | public event ParcelJoinRequest OnParcelJoinRequest = delegate { }; | ||
323 | public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest = delegate { }; | ||
324 | public event ParcelSelectObjects OnParcelSelectObjects = delegate { }; | ||
325 | public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest = delegate { }; | ||
326 | public event ParcelAbandonRequest OnParcelAbandonRequest = delegate { }; | ||
327 | public event ParcelGodForceOwner OnParcelGodForceOwner = delegate { }; | ||
328 | public event ParcelReclaim OnParcelReclaim = delegate { }; | ||
329 | public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest = delegate { }; | ||
330 | public event ParcelDeedToGroup OnParcelDeedToGroup = delegate { }; | ||
331 | public event RegionInfoRequest OnRegionInfoRequest = delegate { }; | ||
332 | public event EstateCovenantRequest OnEstateCovenantRequest = delegate { }; | ||
333 | public event FriendActionDelegate OnApproveFriendRequest = delegate { }; | ||
334 | public event FriendActionDelegate OnDenyFriendRequest = delegate { }; | ||
335 | public event FriendshipTermination OnTerminateFriendship = delegate { }; | ||
336 | public event GrantUserFriendRights OnGrantUserRights = delegate { }; | ||
337 | public event MoneyTransferRequest OnMoneyTransferRequest = delegate { }; | ||
338 | public event EconomyDataRequest OnEconomyDataRequest = delegate { }; | ||
339 | public event MoneyBalanceRequest OnMoneyBalanceRequest = delegate { }; | ||
340 | public event UpdateAvatarProperties OnUpdateAvatarProperties = delegate { }; | ||
341 | public event ParcelBuy OnParcelBuy = delegate { }; | ||
342 | public event RequestPayPrice OnRequestPayPrice = delegate { }; | ||
343 | public event ObjectSaleInfo OnObjectSaleInfo = delegate { }; | ||
344 | public event ObjectBuy OnObjectBuy = delegate { }; | ||
345 | public event BuyObjectInventory OnBuyObjectInventory = delegate { }; | ||
346 | public event RequestTerrain OnRequestTerrain = delegate { }; | ||
347 | public event RequestTerrain OnUploadTerrain = delegate { }; | ||
348 | public event ObjectIncludeInSearch OnObjectIncludeInSearch = delegate { }; | ||
349 | public event UUIDNameRequest OnTeleportHomeRequest = delegate { }; | ||
350 | public event ScriptAnswer OnScriptAnswer = delegate { }; | ||
351 | public event AgentSit OnUndo = delegate { }; | ||
352 | public event AgentSit OnRedo = delegate { }; | ||
353 | public event LandUndo OnLandUndo = delegate { }; | ||
354 | public event ForceReleaseControls OnForceReleaseControls = delegate { }; | ||
355 | public event GodLandStatRequest OnLandStatRequest = delegate { }; | ||
356 | public event DetailedEstateDataRequest OnDetailedEstateDataRequest = delegate { }; | ||
357 | public event SetEstateFlagsRequest OnSetEstateFlagsRequest = delegate { }; | ||
358 | public event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture = delegate { }; | ||
359 | public event SetEstateTerrainDetailTexture OnSetEstateTerrainDetailTexture = delegate { }; | ||
360 | public event SetEstateTerrainTextureHeights OnSetEstateTerrainTextureHeights = delegate { }; | ||
361 | public event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest = delegate { }; | ||
362 | public event SetRegionTerrainSettings OnSetRegionTerrainSettings = delegate { }; | ||
363 | public event EstateRestartSimRequest OnEstateRestartSimRequest = delegate { }; | ||
364 | public event EstateChangeCovenantRequest OnEstateChangeCovenantRequest = delegate { }; | ||
365 | public event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest = delegate { }; | ||
366 | public event SimulatorBlueBoxMessageRequest OnSimulatorBlueBoxMessageRequest = delegate { }; | ||
367 | public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest = delegate { }; | ||
368 | public event EstateDebugRegionRequest OnEstateDebugRegionRequest = delegate { }; | ||
369 | public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest = delegate { }; | ||
370 | public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest = delegate { }; | ||
371 | public event UUIDNameRequest OnUUIDGroupNameRequest = delegate { }; | ||
372 | public event RegionHandleRequest OnRegionHandleRequest = delegate { }; | ||
373 | public event ParcelInfoRequest OnParcelInfoRequest = delegate { }; | ||
374 | public event RequestObjectPropertiesFamily OnObjectGroupRequest = delegate { }; | ||
375 | public event ScriptReset OnScriptReset = delegate { }; | ||
376 | public event GetScriptRunning OnGetScriptRunning = delegate { }; | ||
377 | public event SetScriptRunning OnSetScriptRunning = delegate { }; | ||
378 | public event UpdateVector OnAutoPilotGo = delegate { }; | ||
379 | public event TerrainUnacked OnUnackedTerrain = delegate { }; | ||
380 | public event ActivateGesture OnActivateGesture = delegate { }; | ||
381 | public event DeactivateGesture OnDeactivateGesture = delegate { }; | ||
382 | public event ObjectOwner OnObjectOwner = delegate { }; | ||
383 | public event DirPlacesQuery OnDirPlacesQuery = delegate { }; | ||
384 | public event DirFindQuery OnDirFindQuery = delegate { }; | ||
385 | public event DirLandQuery OnDirLandQuery = delegate { }; | ||
386 | public event DirPopularQuery OnDirPopularQuery = delegate { }; | ||
387 | public event DirClassifiedQuery OnDirClassifiedQuery = delegate { }; | ||
388 | public event EventInfoRequest OnEventInfoRequest = delegate { }; | ||
389 | public event ParcelSetOtherCleanTime OnParcelSetOtherCleanTime = delegate { }; | ||
390 | public event MapItemRequest OnMapItemRequest = delegate { }; | ||
391 | public event OfferCallingCard OnOfferCallingCard = delegate { }; | ||
392 | public event AcceptCallingCard OnAcceptCallingCard = delegate { }; | ||
393 | public event DeclineCallingCard OnDeclineCallingCard = delegate { }; | ||
394 | public event SoundTrigger OnSoundTrigger = delegate { }; | ||
395 | public event StartLure OnStartLure = delegate { }; | ||
396 | public event TeleportLureRequest OnTeleportLureRequest = delegate { }; | ||
397 | public event NetworkStats OnNetworkStatsUpdate = delegate { }; | ||
398 | public event ClassifiedInfoRequest OnClassifiedInfoRequest = delegate { }; | ||
399 | public event ClassifiedInfoUpdate OnClassifiedInfoUpdate = delegate { }; | ||
400 | public event ClassifiedDelete OnClassifiedDelete = delegate { }; | ||
401 | public event ClassifiedDelete OnClassifiedGodDelete = delegate { }; | ||
402 | public event EventNotificationAddRequest OnEventNotificationAddRequest = delegate { }; | ||
403 | public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest = delegate { }; | ||
404 | public event EventGodDelete OnEventGodDelete = delegate { }; | ||
405 | public event ParcelDwellRequest OnParcelDwellRequest = delegate { }; | ||
406 | public event UserInfoRequest OnUserInfoRequest = delegate { }; | ||
407 | public event UpdateUserInfo OnUpdateUserInfo = delegate { }; | ||
408 | public event RetrieveInstantMessages OnRetrieveInstantMessages = delegate { }; | ||
409 | public event PickDelete OnPickDelete = delegate { }; | ||
410 | public event PickGodDelete OnPickGodDelete = delegate { }; | ||
411 | public event PickInfoUpdate OnPickInfoUpdate = delegate { }; | ||
412 | public event AvatarNotesUpdate OnAvatarNotesUpdate = delegate { }; | ||
413 | public event MuteListRequest OnMuteListRequest = delegate { }; | ||
414 | public event AvatarInterestUpdate OnAvatarInterestUpdate = delegate { }; | ||
415 | public event PlacesQuery OnPlacesQuery = delegate { }; | ||
416 | public event FindAgentUpdate OnFindAgent = delegate { }; | ||
417 | public event TrackAgentUpdate OnTrackAgent = delegate { }; | ||
418 | public event NewUserReport OnUserReport = delegate { }; | ||
419 | public event SaveStateHandler OnSaveState = delegate { }; | ||
420 | public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest = delegate { }; | ||
421 | public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest = delegate { }; | ||
422 | public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest = delegate { }; | ||
423 | public event FreezeUserUpdate OnParcelFreezeUser = delegate { }; | ||
424 | public event EjectUserUpdate OnParcelEjectUser = delegate { }; | ||
425 | public event ParcelBuyPass OnParcelBuyPass = delegate { }; | ||
426 | public event ParcelGodMark OnParcelGodMark = delegate { }; | ||
427 | public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest = delegate { }; | ||
428 | public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest = delegate { }; | ||
429 | public event SimWideDeletesDelegate OnSimWideDeletes = delegate { }; | ||
430 | public event SendPostcard OnSendPostcard = delegate { }; | ||
431 | public event MuteListEntryUpdate OnUpdateMuteListEntry = delegate { }; | ||
432 | public event MuteListEntryRemove OnRemoveMuteListEntry = delegate { }; | ||
433 | public event GodlikeMessage onGodlikeMessage = delegate { }; | ||
434 | public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate = delegate { }; | ||
435 | |||
436 | |||
437 | |||
438 | public void SetDebugPacketLevel(int newDebug) | ||
439 | { | ||
440 | throw new System.NotImplementedException(); | ||
441 | } | ||
442 | |||
443 | public void InPacket(object NewPack) | ||
444 | { | ||
445 | throw new System.NotImplementedException(); | ||
446 | } | ||
447 | |||
448 | public void ProcessInPacket(Packet NewPack) | ||
449 | { | ||
450 | throw new System.NotImplementedException(); | ||
451 | } | ||
452 | |||
453 | public void Close() | ||
454 | { | ||
455 | throw new System.NotImplementedException(); | ||
456 | } | ||
457 | |||
458 | public void Kick(string message) | ||
459 | { | ||
460 | throw new System.NotImplementedException(); | ||
461 | } | ||
462 | |||
463 | public void Start() | ||
464 | { | ||
465 | throw new System.NotImplementedException(); | ||
466 | } | ||
467 | |||
468 | public void Stop() | ||
469 | { | ||
470 | throw new System.NotImplementedException(); | ||
471 | } | ||
472 | |||
473 | public void SendWearables(AvatarWearable[] wearables, int serial) | ||
474 | { | ||
475 | throw new System.NotImplementedException(); | ||
476 | } | ||
477 | |||
478 | public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) | ||
479 | { | ||
480 | throw new System.NotImplementedException(); | ||
481 | } | ||
482 | |||
483 | public void SendStartPingCheck(byte seq) | ||
484 | { | ||
485 | throw new System.NotImplementedException(); | ||
486 | } | ||
487 | |||
488 | public void SendKillObject(ulong regionHandle, uint localID) | ||
489 | { | ||
490 | throw new System.NotImplementedException(); | ||
491 | } | ||
492 | |||
493 | public void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs) | ||
494 | { | ||
495 | throw new System.NotImplementedException(); | ||
496 | } | ||
497 | |||
498 | public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) | ||
499 | { | ||
500 | throw new System.NotImplementedException(); | ||
501 | } | ||
502 | |||
503 | public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible) | ||
504 | { | ||
505 | throw new System.NotImplementedException(); | ||
506 | } | ||
507 | |||
508 | public void SendInstantMessage(GridInstantMessage im) | ||
509 | { | ||
510 | throw new System.NotImplementedException(); | ||
511 | } | ||
512 | |||
513 | public void SendGenericMessage(string method, List<string> message) | ||
514 | { | ||
515 | } | ||
516 | |||
517 | public void SendGenericMessage(string method, List<byte[]> message) | ||
518 | { | ||
519 | throw new System.NotImplementedException(); | ||
520 | } | ||
521 | |||
522 | public void SendLayerData(float[] map) | ||
523 | { | ||
524 | throw new System.NotImplementedException(); | ||
525 | } | ||
526 | |||
527 | public void SendLayerData(int px, int py, float[] map) | ||
528 | { | ||
529 | throw new System.NotImplementedException(); | ||
530 | } | ||
531 | |||
532 | public void SendWindData(Vector2[] windSpeeds) | ||
533 | { | ||
534 | throw new System.NotImplementedException(); | ||
535 | } | ||
536 | |||
537 | public void SendCloudData(float[] cloudCover) | ||
538 | { | ||
539 | throw new System.NotImplementedException(); | ||
540 | } | ||
541 | |||
542 | public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) | ||
543 | { | ||
544 | throw new System.NotImplementedException(); | ||
545 | } | ||
546 | |||
547 | public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint) | ||
548 | { | ||
549 | throw new System.NotImplementedException(); | ||
550 | } | ||
551 | |||
552 | public AgentCircuitData RequestClientInfo() | ||
553 | { | ||
554 | throw new System.NotImplementedException(); | ||
555 | } | ||
556 | |||
557 | public void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL) | ||
558 | { | ||
559 | throw new System.NotImplementedException(); | ||
560 | } | ||
561 | |||
562 | public void SendMapBlock(List<MapBlockData> mapBlocks, uint flag) | ||
563 | { | ||
564 | throw new System.NotImplementedException(); | ||
565 | } | ||
566 | |||
567 | public void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags) | ||
568 | { | ||
569 | throw new System.NotImplementedException(); | ||
570 | } | ||
571 | |||
572 | public void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL) | ||
573 | { | ||
574 | throw new System.NotImplementedException(); | ||
575 | } | ||
576 | |||
577 | public void SendTeleportFailed(string reason) | ||
578 | { | ||
579 | throw new System.NotImplementedException(); | ||
580 | } | ||
581 | |||
582 | public void SendTeleportStart(uint flags) | ||
583 | { | ||
584 | throw new System.NotImplementedException(); | ||
585 | } | ||
586 | |||
587 | public void SendTeleportProgress(uint flags, string message) | ||
588 | { | ||
589 | throw new System.NotImplementedException(); | ||
590 | } | ||
591 | |||
592 | public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) | ||
593 | { | ||
594 | throw new System.NotImplementedException(); | ||
595 | } | ||
596 | |||
597 | public void SendPayPrice(UUID objectID, int[] payPrice) | ||
598 | { | ||
599 | throw new System.NotImplementedException(); | ||
600 | } | ||
601 | |||
602 | public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) | ||
603 | { | ||
604 | throw new System.NotImplementedException(); | ||
605 | } | ||
606 | |||
607 | public void SetChildAgentThrottle(byte[] throttle) | ||
608 | { | ||
609 | throw new System.NotImplementedException(); | ||
610 | } | ||
611 | |||
612 | public void SendAvatarDataImmediate(ISceneEntity avatar) | ||
613 | { | ||
614 | throw new System.NotImplementedException(); | ||
615 | } | ||
616 | |||
617 | public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) | ||
618 | { | ||
619 | throw new System.NotImplementedException(); | ||
620 | } | ||
621 | |||
622 | public void ReprioritizeUpdates() | ||
623 | { | ||
624 | throw new System.NotImplementedException(); | ||
625 | } | ||
626 | |||
627 | public void FlushPrimUpdates() | ||
628 | { | ||
629 | throw new System.NotImplementedException(); | ||
630 | } | ||
631 | |||
632 | public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, int version, bool fetchFolders, bool fetchItems) | ||
633 | { | ||
634 | throw new System.NotImplementedException(); | ||
635 | } | ||
636 | |||
637 | public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item) | ||
638 | { | ||
639 | throw new System.NotImplementedException(); | ||
640 | } | ||
641 | |||
642 | public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId) | ||
643 | { | ||
644 | throw new System.NotImplementedException(); | ||
645 | } | ||
646 | |||
647 | public void SendRemoveInventoryItem(UUID itemID) | ||
648 | { | ||
649 | throw new System.NotImplementedException(); | ||
650 | } | ||
651 | |||
652 | public void SendTakeControls(int controls, bool passToAgent, bool TakeControls) | ||
653 | { | ||
654 | throw new System.NotImplementedException(); | ||
655 | } | ||
656 | |||
657 | public void SendTaskInventory(UUID taskID, short serial, byte[] fileName) | ||
658 | { | ||
659 | throw new System.NotImplementedException(); | ||
660 | } | ||
661 | |||
662 | public void SendBulkUpdateInventory(InventoryNodeBase node) | ||
663 | { | ||
664 | throw new System.NotImplementedException(); | ||
665 | } | ||
666 | |||
667 | public void SendXferPacket(ulong xferID, uint packet, byte[] data) | ||
668 | { | ||
669 | throw new System.NotImplementedException(); | ||
670 | } | ||
671 | |||
672 | public virtual void SendAbortXferPacket(ulong xferID) | ||
673 | { | ||
674 | throw new System.NotImplementedException(); | ||
675 | } | ||
676 | |||
677 | public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent) | ||
678 | { | ||
679 | throw new System.NotImplementedException(); | ||
680 | } | ||
681 | |||
682 | public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data) | ||
683 | { | ||
684 | throw new System.NotImplementedException(); | ||
685 | } | ||
686 | |||
687 | public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) | ||
688 | { | ||
689 | throw new System.NotImplementedException(); | ||
690 | } | ||
691 | |||
692 | public void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID) | ||
693 | { | ||
694 | throw new System.NotImplementedException(); | ||
695 | } | ||
696 | |||
697 | public void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags) | ||
698 | { | ||
699 | throw new System.NotImplementedException(); | ||
700 | } | ||
701 | |||
702 | public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain) | ||
703 | { | ||
704 | throw new System.NotImplementedException(); | ||
705 | } | ||
706 | |||
707 | public void SendAttachedSoundGainChange(UUID objectID, float gain) | ||
708 | { | ||
709 | throw new System.NotImplementedException(); | ||
710 | } | ||
711 | |||
712 | public void SendNameReply(UUID profileId, string firstname, string lastname) | ||
713 | { | ||
714 | throw new System.NotImplementedException(); | ||
715 | } | ||
716 | |||
717 | public void SendAlertMessage(string message) | ||
718 | { | ||
719 | throw new System.NotImplementedException(); | ||
720 | } | ||
721 | |||
722 | public void SendAgentAlertMessage(string message, bool modal) | ||
723 | { | ||
724 | throw new System.NotImplementedException(); | ||
725 | } | ||
726 | |||
727 | public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url) | ||
728 | { | ||
729 | throw new System.NotImplementedException(); | ||
730 | } | ||
731 | |||
732 | public void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) | ||
733 | { | ||
734 | throw new System.NotImplementedException(); | ||
735 | } | ||
736 | |||
737 | public bool AddMoney(int debit) | ||
738 | { | ||
739 | throw new System.NotImplementedException(); | ||
740 | } | ||
741 | |||
742 | public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition) | ||
743 | { | ||
744 | throw new System.NotImplementedException(); | ||
745 | } | ||
746 | |||
747 | public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks) | ||
748 | { | ||
749 | throw new System.NotImplementedException(); | ||
750 | } | ||
751 | |||
752 | public void SendViewerTime(int phase) | ||
753 | { | ||
754 | throw new System.NotImplementedException(); | ||
755 | } | ||
756 | |||
757 | public UUID GetDefaultAnimation(string name) | ||
758 | { | ||
759 | throw new System.NotImplementedException(); | ||
760 | } | ||
761 | |||
762 | public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] charterMember, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID) | ||
763 | { | ||
764 | throw new System.NotImplementedException(); | ||
765 | } | ||
766 | |||
767 | public void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question) | ||
768 | { | ||
769 | throw new System.NotImplementedException(); | ||
770 | } | ||
771 | |||
772 | public void SendHealth(float health) | ||
773 | { | ||
774 | throw new System.NotImplementedException(); | ||
775 | } | ||
776 | |||
777 | public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) | ||
778 | { | ||
779 | throw new System.NotImplementedException(); | ||
780 | } | ||
781 | |||
782 | public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID) | ||
783 | { | ||
784 | throw new System.NotImplementedException(); | ||
785 | } | ||
786 | |||
787 | public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) | ||
788 | { | ||
789 | throw new System.NotImplementedException(); | ||
790 | } | ||
791 | |||
792 | public void SendEstateCovenantInformation(UUID covenant) | ||
793 | { | ||
794 | throw new System.NotImplementedException(); | ||
795 | } | ||
796 | |||
797 | public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner) | ||
798 | { | ||
799 | throw new System.NotImplementedException(); | ||
800 | } | ||
801 | |||
802 | public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, ILandObject lo, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) | ||
803 | { | ||
804 | throw new System.NotImplementedException(); | ||
805 | } | ||
806 | |||
807 | public void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID) | ||
808 | { | ||
809 | throw new System.NotImplementedException(); | ||
810 | } | ||
811 | |||
812 | public void SendForceClientSelectObjects(List<uint> objectIDs) | ||
813 | { | ||
814 | throw new System.NotImplementedException(); | ||
815 | } | ||
816 | |||
817 | public void SendCameraConstraint(Vector4 ConstraintPlane) | ||
818 | { | ||
819 | |||
820 | } | ||
821 | |||
822 | public void SendLandObjectOwners(LandData land, List<UUID> groups, Dictionary<UUID, int> ownersAndCount) | ||
823 | { | ||
824 | throw new System.NotImplementedException(); | ||
825 | } | ||
826 | |||
827 | public void SendLandParcelOverlay(byte[] data, int sequence_id) | ||
828 | { | ||
829 | throw new System.NotImplementedException(); | ||
830 | } | ||
831 | |||
832 | public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time) | ||
833 | { | ||
834 | throw new System.NotImplementedException(); | ||
835 | } | ||
836 | |||
837 | public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop) | ||
838 | { | ||
839 | throw new System.NotImplementedException(); | ||
840 | } | ||
841 | |||
842 | public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) | ||
843 | { | ||
844 | throw new System.NotImplementedException(); | ||
845 | } | ||
846 | |||
847 | public void SendConfirmXfer(ulong xferID, uint PacketID) | ||
848 | { | ||
849 | throw new System.NotImplementedException(); | ||
850 | } | ||
851 | |||
852 | public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName) | ||
853 | { | ||
854 | throw new System.NotImplementedException(); | ||
855 | } | ||
856 | |||
857 | public void SendInitiateDownload(string simFileName, string clientFileName) | ||
858 | { | ||
859 | throw new System.NotImplementedException(); | ||
860 | } | ||
861 | |||
862 | public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) | ||
863 | { | ||
864 | throw new System.NotImplementedException(); | ||
865 | } | ||
866 | |||
867 | public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData) | ||
868 | { | ||
869 | throw new System.NotImplementedException(); | ||
870 | } | ||
871 | |||
872 | public void SendImageNotFound(UUID imageid) | ||
873 | { | ||
874 | throw new System.NotImplementedException(); | ||
875 | } | ||
876 | |||
877 | public void SendShutdownConnectionNotice() | ||
878 | { | ||
879 | throw new System.NotImplementedException(); | ||
880 | } | ||
881 | |||
882 | public void SendSimStats(SimStats stats) | ||
883 | { | ||
884 | throw new System.NotImplementedException(); | ||
885 | } | ||
886 | |||
887 | public void SendObjectPropertiesFamilyData(ISceneEntity Entity, uint RequestFlags) | ||
888 | { | ||
889 | throw new System.NotImplementedException(); | ||
890 | } | ||
891 | |||
892 | public void SendObjectPropertiesReply(ISceneEntity entity) | ||
893 | { | ||
894 | throw new System.NotImplementedException(); | ||
895 | } | ||
896 | |||
897 | public void SendAgentOffline(UUID[] agentIDs) | ||
898 | { | ||
899 | throw new System.NotImplementedException(); | ||
900 | } | ||
901 | |||
902 | public void SendAgentOnline(UUID[] agentIDs) | ||
903 | { | ||
904 | throw new System.NotImplementedException(); | ||
905 | } | ||
906 | |||
907 | public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) | ||
908 | { | ||
909 | throw new System.NotImplementedException(); | ||
910 | } | ||
911 | |||
912 | public void SendAdminResponse(UUID Token, uint AdminLevel) | ||
913 | { | ||
914 | throw new System.NotImplementedException(); | ||
915 | } | ||
916 | |||
917 | public void SendGroupMembership(GroupMembershipData[] GroupMembership) | ||
918 | { | ||
919 | throw new System.NotImplementedException(); | ||
920 | } | ||
921 | |||
922 | public void SendGroupNameReply(UUID groupLLUID, string GroupName) | ||
923 | { | ||
924 | throw new System.NotImplementedException(); | ||
925 | } | ||
926 | |||
927 | public void SendJoinGroupReply(UUID groupID, bool success) | ||
928 | { | ||
929 | throw new System.NotImplementedException(); | ||
930 | } | ||
931 | |||
932 | public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success) | ||
933 | { | ||
934 | throw new System.NotImplementedException(); | ||
935 | } | ||
936 | |||
937 | public void SendLeaveGroupReply(UUID groupID, bool success) | ||
938 | { | ||
939 | throw new System.NotImplementedException(); | ||
940 | } | ||
941 | |||
942 | public void SendCreateGroupReply(UUID groupID, bool success, string message) | ||
943 | { | ||
944 | throw new System.NotImplementedException(); | ||
945 | } | ||
946 | |||
947 | public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia) | ||
948 | { | ||
949 | throw new System.NotImplementedException(); | ||
950 | } | ||
951 | |||
952 | public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running) | ||
953 | { | ||
954 | throw new System.NotImplementedException(); | ||
955 | } | ||
956 | |||
957 | public void SendAsset(AssetRequestToClient req) | ||
958 | { | ||
959 | throw new System.NotImplementedException(); | ||
960 | } | ||
961 | |||
962 | public void SendTexture(AssetBase TextureAsset) | ||
963 | { | ||
964 | throw new System.NotImplementedException(); | ||
965 | } | ||
966 | |||
967 | public byte[] GetThrottlesPacked(float multiplier) | ||
968 | { | ||
969 | throw new System.NotImplementedException(); | ||
970 | } | ||
971 | |||
972 | public event ViewerEffectEventHandler OnViewerEffect; | ||
973 | public event Action<IClientAPI> OnLogout; | ||
974 | public event Action<IClientAPI> OnConnectionClosed; | ||
975 | public void SendBlueBoxMessage(UUID FromAvatarID, string FromAvatarName, string Message) | ||
976 | { | ||
977 | throw new System.NotImplementedException(); | ||
978 | } | ||
979 | |||
980 | public void SendLogoutPacket() | ||
981 | { | ||
982 | throw new System.NotImplementedException(); | ||
983 | } | ||
984 | |||
985 | public EndPoint GetClientEP() | ||
986 | { | ||
987 | return null; | ||
988 | } | ||
989 | |||
990 | public ClientInfo GetClientInfo() | ||
991 | { | ||
992 | throw new System.NotImplementedException(); | ||
993 | } | ||
994 | |||
995 | public void SetClientInfo(ClientInfo info) | ||
996 | { | ||
997 | throw new System.NotImplementedException(); | ||
998 | } | ||
999 | |||
1000 | public void SetClientOption(string option, string value) | ||
1001 | { | ||
1002 | throw new System.NotImplementedException(); | ||
1003 | } | ||
1004 | |||
1005 | public string GetClientOption(string option) | ||
1006 | { | ||
1007 | throw new System.NotImplementedException(); | ||
1008 | } | ||
1009 | |||
1010 | public void Terminate() | ||
1011 | { | ||
1012 | throw new System.NotImplementedException(); | ||
1013 | } | ||
1014 | |||
1015 | public void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters) | ||
1016 | { | ||
1017 | throw new System.NotImplementedException(); | ||
1018 | } | ||
1019 | |||
1020 | public void SendClearFollowCamProperties(UUID objectID) | ||
1021 | { | ||
1022 | throw new System.NotImplementedException(); | ||
1023 | } | ||
1024 | |||
1025 | public void SendRegionHandle(UUID regoinID, ulong handle) | ||
1026 | { | ||
1027 | throw new System.NotImplementedException(); | ||
1028 | } | ||
1029 | |||
1030 | public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y) | ||
1031 | { | ||
1032 | throw new System.NotImplementedException(); | ||
1033 | } | ||
1034 | |||
1035 | public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt) | ||
1036 | { | ||
1037 | throw new System.NotImplementedException(); | ||
1038 | } | ||
1039 | |||
1040 | public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data) | ||
1041 | { | ||
1042 | throw new System.NotImplementedException(); | ||
1043 | } | ||
1044 | |||
1045 | public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data) | ||
1046 | { | ||
1047 | throw new System.NotImplementedException(); | ||
1048 | } | ||
1049 | |||
1050 | public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data) | ||
1051 | { | ||
1052 | throw new System.NotImplementedException(); | ||
1053 | } | ||
1054 | |||
1055 | public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data) | ||
1056 | { | ||
1057 | throw new System.NotImplementedException(); | ||
1058 | } | ||
1059 | |||
1060 | public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data) | ||
1061 | { | ||
1062 | throw new System.NotImplementedException(); | ||
1063 | } | ||
1064 | |||
1065 | public void SendDirLandReply(UUID queryID, DirLandReplyData[] data) | ||
1066 | { | ||
1067 | throw new System.NotImplementedException(); | ||
1068 | } | ||
1069 | |||
1070 | public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data) | ||
1071 | { | ||
1072 | throw new System.NotImplementedException(); | ||
1073 | } | ||
1074 | |||
1075 | public void SendEventInfoReply(EventData info) | ||
1076 | { | ||
1077 | throw new System.NotImplementedException(); | ||
1078 | } | ||
1079 | |||
1080 | public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags) | ||
1081 | { | ||
1082 | throw new System.NotImplementedException(); | ||
1083 | } | ||
1084 | |||
1085 | public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data) | ||
1086 | { | ||
1087 | throw new System.NotImplementedException(); | ||
1088 | } | ||
1089 | |||
1090 | public void SendOfferCallingCard(UUID srcID, UUID transactionID) | ||
1091 | { | ||
1092 | throw new System.NotImplementedException(); | ||
1093 | } | ||
1094 | |||
1095 | public void SendAcceptCallingCard(UUID transactionID) | ||
1096 | { | ||
1097 | throw new System.NotImplementedException(); | ||
1098 | } | ||
1099 | |||
1100 | public void SendDeclineCallingCard(UUID transactionID) | ||
1101 | { | ||
1102 | throw new System.NotImplementedException(); | ||
1103 | } | ||
1104 | |||
1105 | public void SendTerminateFriend(UUID exFriendID) | ||
1106 | { | ||
1107 | throw new System.NotImplementedException(); | ||
1108 | } | ||
1109 | |||
1110 | public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name) | ||
1111 | { | ||
1112 | throw new System.NotImplementedException(); | ||
1113 | } | ||
1114 | |||
1115 | public void SendClassifiedInfoReply(UUID classifiedID, UUID creatorID, uint creationDate, uint expirationDate, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, string simName, Vector3 globalPos, string parcelName, byte classifiedFlags, int price) | ||
1116 | { | ||
1117 | throw new System.NotImplementedException(); | ||
1118 | } | ||
1119 | |||
1120 | public void SendAgentDropGroup(UUID groupID) | ||
1121 | { | ||
1122 | throw new System.NotImplementedException(); | ||
1123 | } | ||
1124 | |||
1125 | public void RefreshGroupMembership() | ||
1126 | { | ||
1127 | throw new System.NotImplementedException(); | ||
1128 | } | ||
1129 | |||
1130 | public void SendAvatarNotesReply(UUID targetID, string text) | ||
1131 | { | ||
1132 | throw new System.NotImplementedException(); | ||
1133 | } | ||
1134 | |||
1135 | public void SendAvatarPicksReply(UUID targetID, Dictionary<UUID, string> picks) | ||
1136 | { | ||
1137 | throw new System.NotImplementedException(); | ||
1138 | } | ||
1139 | |||
1140 | public void SendPickInfoReply(UUID pickID, UUID creatorID, bool topPick, UUID parcelID, string name, string desc, UUID snapshotID, string user, string originalName, string simName, Vector3 posGlobal, int sortOrder, bool enabled) | ||
1141 | { | ||
1142 | throw new System.NotImplementedException(); | ||
1143 | } | ||
1144 | |||
1145 | public void SendAvatarClassifiedReply(UUID targetID, Dictionary<UUID, string> classifieds) | ||
1146 | { | ||
1147 | throw new System.NotImplementedException(); | ||
1148 | } | ||
1149 | |||
1150 | public void SendAvatarInterestUpdate(IClientAPI client, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages) | ||
1151 | { | ||
1152 | throw new System.NotImplementedException(); | ||
1153 | } | ||
1154 | |||
1155 | public void SendParcelDwellReply(int localID, UUID parcelID, float dwell) | ||
1156 | { | ||
1157 | throw new System.NotImplementedException(); | ||
1158 | } | ||
1159 | |||
1160 | public void SendUserInfoReply(bool imViaEmail, bool visible, string email) | ||
1161 | { | ||
1162 | throw new System.NotImplementedException(); | ||
1163 | } | ||
1164 | |||
1165 | public void SendUseCachedMuteList() | ||
1166 | { | ||
1167 | throw new System.NotImplementedException(); | ||
1168 | } | ||
1169 | |||
1170 | public void SendMuteListUpdate(string filename) | ||
1171 | { | ||
1172 | throw new System.NotImplementedException(); | ||
1173 | } | ||
1174 | |||
1175 | public void KillEndDone() | ||
1176 | { | ||
1177 | throw new System.NotImplementedException(); | ||
1178 | } | ||
1179 | |||
1180 | public bool AddGenericPacketHandler(string MethodName, GenericMessage handler) | ||
1181 | { | ||
1182 | throw new System.NotImplementedException(); | ||
1183 | } | ||
1184 | |||
1185 | #endregion | ||
1186 | |||
1187 | public void SendRebakeAvatarTextures(UUID textureID) | ||
1188 | { | ||
1189 | } | ||
1190 | |||
1191 | public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages) | ||
1192 | { | ||
1193 | } | ||
1194 | |||
1195 | public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) | ||
1196 | { | ||
1197 | } | ||
1198 | |||
1199 | public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) | ||
1200 | { | ||
1201 | } | ||
1202 | |||
1203 | public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) | ||
1204 | { | ||
1205 | } | ||
1206 | |||
1207 | public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) | ||
1208 | { | ||
1209 | } | ||
1210 | |||
1211 | public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) | ||
1212 | { | ||
1213 | } | ||
1214 | |||
1215 | public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) | ||
1216 | { | ||
1217 | } | ||
1218 | |||
1219 | public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) | ||
1220 | { | ||
1221 | } | ||
1222 | |||
1223 | public void StopFlying(ISceneEntity presence) | ||
1224 | { | ||
1225 | } | ||
1226 | |||
1227 | public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) | ||
1228 | { | ||
1229 | } | ||
1230 | } | ||
1231 | } | ||
diff --git a/OpenSim/Client/VWoHTTP/VWoHTTPModule.cs b/OpenSim/Client/VWoHTTP/VWoHTTPModule.cs deleted file mode 100644 index 31385ba..0000000 --- a/OpenSim/Client/VWoHTTP/VWoHTTPModule.cs +++ /dev/null | |||
@@ -1,133 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
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 | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
24 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
25 | */ | ||
26 | |||
27 | using System; | ||
28 | using System.Collections.Generic; | ||
29 | using System.Text; | ||
30 | using Nini.Config; | ||
31 | using OpenMetaverse; | ||
32 | using OpenSim.Client.VWoHTTP.ClientStack; | ||
33 | using OpenSim.Framework; | ||
34 | using OpenSim.Framework.Servers; | ||
35 | using OpenSim.Framework.Servers.HttpServer; | ||
36 | using OpenSim.Region.Framework.Interfaces; | ||
37 | using OpenSim.Region.Framework.Scenes; | ||
38 | |||
39 | namespace OpenSim.Client.VWoHTTP | ||
40 | { | ||
41 | class VWoHTTPModule : IRegionModule, IHttpAgentHandler | ||
42 | { | ||
43 | private bool m_disabled = true; | ||
44 | |||
45 | private IHttpServer m_httpd; | ||
46 | |||
47 | private readonly List<Scene> m_scenes = new List<Scene>(); | ||
48 | |||
49 | private Dictionary<UUID, VWHClientView> m_clients = new Dictionary<UUID, VWHClientView>(); | ||
50 | |||
51 | #region Implementation of IRegionModule | ||
52 | |||
53 | public void Initialise(Scene scene, IConfigSource source) | ||
54 | { | ||
55 | if (m_disabled) | ||
56 | return; | ||
57 | |||
58 | m_scenes.Add(scene); | ||
59 | |||
60 | m_httpd = MainServer.Instance; | ||
61 | } | ||
62 | |||
63 | public void PostInitialise() | ||
64 | { | ||
65 | if (m_disabled) | ||
66 | return; | ||
67 | |||
68 | m_httpd.AddAgentHandler("vwohttp", this); | ||
69 | } | ||
70 | |||
71 | public void Close() | ||
72 | { | ||
73 | if (m_disabled) | ||
74 | return; | ||
75 | |||
76 | m_httpd.RemoveAgentHandler("vwohttp", this); | ||
77 | } | ||
78 | |||
79 | public string Name | ||
80 | { | ||
81 | get { return "VWoHTTP ClientStack"; } | ||
82 | } | ||
83 | |||
84 | public bool IsSharedModule | ||
85 | { | ||
86 | get { return true; } | ||
87 | } | ||
88 | |||
89 | #endregion | ||
90 | |||
91 | #region Implementation of IHttpAgentHandler | ||
92 | |||
93 | public bool Handle(OSHttpRequest req, OSHttpResponse resp) | ||
94 | { | ||
95 | string[] urlparts = req.Url.AbsolutePath.Split(new char[] {'/'}, StringSplitOptions.RemoveEmptyEntries); | ||
96 | |||
97 | if (urlparts.Length < 2) | ||
98 | return false; | ||
99 | |||
100 | if (urlparts[1] == "connect") | ||
101 | { | ||
102 | UUID sessID = UUID.Random(); | ||
103 | |||
104 | VWHClientView client = new VWHClientView(sessID, UUID.Random(), "VWoHTTPClient", m_scenes[0]); | ||
105 | |||
106 | m_clients.Add(sessID, client); | ||
107 | |||
108 | return true; | ||
109 | } | ||
110 | else | ||
111 | { | ||
112 | if (urlparts.Length < 3) | ||
113 | return false; | ||
114 | |||
115 | UUID sessionID; | ||
116 | if (!UUID.TryParse(urlparts[1], out sessionID)) | ||
117 | return false; | ||
118 | |||
119 | if (!m_clients.ContainsKey(sessionID)) | ||
120 | return false; | ||
121 | |||
122 | return m_clients[sessionID].ProcessInMsg(req, resp); | ||
123 | } | ||
124 | } | ||
125 | |||
126 | public bool Match(OSHttpRequest req, OSHttpResponse resp) | ||
127 | { | ||
128 | return req.Url.ToString().Contains("vwohttp"); | ||
129 | } | ||
130 | |||
131 | #endregion | ||
132 | } | ||
133 | } | ||
diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs index c9d4c93..53a3f17 100644 --- a/OpenSim/Framework/Servers/VersionInfo.cs +++ b/OpenSim/Framework/Servers/VersionInfo.cs | |||
@@ -29,7 +29,7 @@ namespace OpenSim | |||
29 | { | 29 | { |
30 | public class VersionInfo | 30 | public class VersionInfo |
31 | { | 31 | { |
32 | private const string VERSION_NUMBER = "0.7.1"; | 32 | private const string VERSION_NUMBER = "0.7.2"; |
33 | private const Flavour VERSION_FLAVOUR = Flavour.Dev; | 33 | private const Flavour VERSION_FLAVOUR = Flavour.Dev; |
34 | 34 | ||
35 | public enum Flavour | 35 | public enum Flavour |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 1f7e66d..0f7f666 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -4764,7 +4764,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4764 | data.RelativePosition.ToBytes(objectData, 0); | 4764 | data.RelativePosition.ToBytes(objectData, 0); |
4765 | data.Velocity.ToBytes(objectData, 12); | 4765 | data.Velocity.ToBytes(objectData, 12); |
4766 | data.Acceleration.ToBytes(objectData, 24); | 4766 | data.Acceleration.ToBytes(objectData, 24); |
4767 | data.RotationOffset.ToBytes(objectData, 36); | 4767 | try |
4768 | { | ||
4769 | data.RotationOffset.ToBytes(objectData, 36); | ||
4770 | } | ||
4771 | catch (Exception e) | ||
4772 | { | ||
4773 | m_log.Warn("[LLClientView]: exception converting quaternion to bytes, using Quaternion.Identity. Exception: " + e.ToString()); | ||
4774 | OpenMetaverse.Quaternion.Identity.ToBytes(objectData, 36); | ||
4775 | } | ||
4768 | data.AngularVelocity.ToBytes(objectData, 48); | 4776 | data.AngularVelocity.ToBytes(objectData, 48); |
4769 | 4777 | ||
4770 | ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock(); | 4778 | ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock(); |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index c7244c8..6dd871f 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs | |||
@@ -182,9 +182,12 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
182 | public InventoryCollection GetFolderContent(UUID userID, UUID folderID) | 182 | public InventoryCollection GetFolderContent(UUID userID, UUID folderID) |
183 | { | 183 | { |
184 | InventoryCollection invCol = m_InventoryService.GetFolderContent(userID, folderID); | 184 | InventoryCollection invCol = m_InventoryService.GetFolderContent(userID, folderID); |
185 | if (UserManager != null) | 185 | Util.FireAndForget(delegate |
186 | foreach (InventoryItemBase item in invCol.Items) | 186 | { |
187 | UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData); | 187 | if (UserManager != null) |
188 | foreach (InventoryItemBase item in invCol.Items) | ||
189 | UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData); | ||
190 | }); | ||
188 | 191 | ||
189 | return invCol; | 192 | return invCol; |
190 | } | 193 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs index bd01bb9..8f1f257 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs | |||
@@ -46,10 +46,22 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
46 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 46 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
47 | 47 | ||
48 | private bool m_Enabled = false; | 48 | private bool m_Enabled = false; |
49 | private bool m_Initialized = false; | 49 | private Scene m_Scene; |
50 | // private Scene m_Scene; | ||
51 | private XInventoryServicesConnector m_RemoteConnector; | 50 | private XInventoryServicesConnector m_RemoteConnector; |
52 | 51 | ||
52 | private IUserManagement m_UserManager; | ||
53 | private IUserManagement UserManager | ||
54 | { | ||
55 | get | ||
56 | { | ||
57 | if (m_UserManager == null) | ||
58 | { | ||
59 | m_UserManager = m_Scene.RequestModuleInterface<IUserManagement>(); | ||
60 | } | ||
61 | return m_UserManager; | ||
62 | } | ||
63 | } | ||
64 | |||
53 | public Type ReplaceableInterface | 65 | public Type ReplaceableInterface |
54 | { | 66 | { |
55 | get { return null; } | 67 | get { return null; } |
@@ -114,12 +126,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
114 | if (!m_Enabled) | 126 | if (!m_Enabled) |
115 | return; | 127 | return; |
116 | 128 | ||
117 | if (!m_Initialized) | ||
118 | { | ||
119 | m_Initialized = true; | ||
120 | } | ||
121 | |||
122 | scene.RegisterModuleInterface<IInventoryService>(this); | 129 | scene.RegisterModuleInterface<IInventoryService>(this); |
130 | |||
131 | if (m_Scene == null) | ||
132 | m_Scene = scene; | ||
123 | } | 133 | } |
124 | 134 | ||
125 | public void RemoveRegion(Scene scene) | 135 | public void RemoveRegion(Scene scene) |
@@ -173,7 +183,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
173 | 183 | ||
174 | public InventoryCollection GetFolderContent(UUID userID, UUID folderID) | 184 | public InventoryCollection GetFolderContent(UUID userID, UUID folderID) |
175 | { | 185 | { |
176 | return m_RemoteConnector.GetFolderContent(userID, folderID); | 186 | InventoryCollection invCol = m_RemoteConnector.GetFolderContent(userID, folderID); |
187 | Util.FireAndForget(delegate | ||
188 | { | ||
189 | if (UserManager != null) | ||
190 | foreach (InventoryItemBase item in invCol.Items) | ||
191 | UserManager.AddUser(item.CreatorIdAsUuid, item.CreatorData); | ||
192 | }); | ||
193 | |||
194 | return invCol; | ||
177 | } | 195 | } |
178 | 196 | ||
179 | public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) | 197 | public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID) |
diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs index cd9f2bf..a662abb 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryConnector.cs | |||
@@ -158,7 +158,10 @@ namespace OpenSim.Services.Connectors | |||
158 | public InventoryCollection GetFolderContent(UUID principalID, UUID folderID) | 158 | public InventoryCollection GetFolderContent(UUID principalID, UUID folderID) |
159 | { | 159 | { |
160 | InventoryCollection inventory = new InventoryCollection(); | 160 | InventoryCollection inventory = new InventoryCollection(); |
161 | 161 | inventory.Folders = new List<InventoryFolderBase>(); | |
162 | inventory.Items = new List<InventoryItemBase>(); | ||
163 | inventory.UserID = principalID; | ||
164 | |||
162 | try | 165 | try |
163 | { | 166 | { |
164 | Dictionary<string,object> ret = MakeRequest("GETFOLDERCONTENT", | 167 | Dictionary<string,object> ret = MakeRequest("GETFOLDERCONTENT", |
@@ -172,11 +175,6 @@ namespace OpenSim.Services.Connectors | |||
172 | if (ret.Count == 0) | 175 | if (ret.Count == 0) |
173 | return null; | 176 | return null; |
174 | 177 | ||
175 | |||
176 | inventory.Folders = new List<InventoryFolderBase>(); | ||
177 | inventory.Items = new List<InventoryItemBase>(); | ||
178 | inventory.UserID = principalID; | ||
179 | |||
180 | Dictionary<string,object> folders = | 178 | Dictionary<string,object> folders = |
181 | (Dictionary<string,object>)ret["FOLDERS"]; | 179 | (Dictionary<string,object>)ret["FOLDERS"]; |
182 | Dictionary<string,object> items = | 180 | Dictionary<string,object> items = |
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index e602412..0af35c8 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs | |||
@@ -244,7 +244,7 @@ namespace OpenSim.Services.InventoryService | |||
244 | // connector. So we disregard the principal and look | 244 | // connector. So we disregard the principal and look |
245 | // by ID. | 245 | // by ID. |
246 | // | 246 | // |
247 | m_log.DebugFormat("[XINVENTORY SERVICE]: Fetch contents for folder {0}", folderID.ToString()); | 247 | //m_log.DebugFormat("[XINVENTORY SERVICE]: Fetch contents for folder {0}", folderID.ToString()); |
248 | InventoryCollection inventory = new InventoryCollection(); | 248 | InventoryCollection inventory = new InventoryCollection(); |
249 | inventory.UserID = principalID; | 249 | inventory.UserID = principalID; |
250 | inventory.Folders = new List<InventoryFolderBase>(); | 250 | inventory.Folders = new List<InventoryFolderBase>(); |