aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Client/MXP/ClientStack/MXPClientView.cs')
-rw-r--r--OpenSim/Client/MXP/ClientStack/MXPClientView.cs1743
1 files changed, 0 insertions, 1743 deletions
diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
deleted file mode 100644
index eebb7eb..0000000
--- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
+++ /dev/null
@@ -1,1743 +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
28using System;
29using System.Collections.Generic;
30using System.Net;
31using System.Reflection;
32using System.Text;
33using log4net;
34using MXP;
35using MXP.Messages;
36using OpenMetaverse;
37using OpenMetaverse.Packets;
38using OpenSim.Framework;
39using OpenSim.Framework.Client;
40using Packet=OpenMetaverse.Packets.Packet;
41using MXP.Extentions.OpenMetaverseFragments.Proto;
42using MXP.Util;
43using MXP.Fragments;
44using MXP.Common.Proto;
45using OpenSim.Region.Framework.Scenes;
46
47namespace 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 MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy;
597 public event TeleportLandmarkRequest OnTeleportLandmarkRequest;
598 public event DeRezObject OnDeRezObject;
599 public event Action<IClientAPI> OnRegionHandShakeReply;
600 public event GenericCall1 OnRequestWearables;
601 public event GenericCall1 OnCompleteMovementToRegion;
602 public event UpdateAgent OnPreAgentUpdate;
603 public event UpdateAgent OnAgentUpdate;
604 public event AgentRequestSit OnAgentRequestSit;
605 public event AgentSit OnAgentSit;
606 public event AvatarPickerRequest OnAvatarPickerRequest;
607 public event Action<IClientAPI> OnRequestAvatarsData;
608 public event AddNewPrim OnAddPrim;
609 public event FetchInventory OnAgentDataUpdateRequest;
610 public event TeleportLocationRequest OnSetStartLocationRequest;
611 public event RequestGodlikePowers OnRequestGodlikePowers;
612 public event GodKickUser OnGodKickUser;
613 public event ObjectDuplicate OnObjectDuplicate;
614 public event ObjectDuplicateOnRay OnObjectDuplicateOnRay;
615 public event GrabObject OnGrabObject;
616 public event DeGrabObject OnDeGrabObject;
617 public event MoveObject OnGrabUpdate;
618 public event SpinStart OnSpinStart;
619 public event SpinObject OnSpinUpdate;
620 public event SpinStop OnSpinStop;
621 public event UpdateShape OnUpdatePrimShape;
622 public event ObjectExtraParams OnUpdateExtraParams;
623 public event ObjectRequest OnObjectRequest;
624 public event ObjectSelect OnObjectSelect;
625 public event ObjectDeselect OnObjectDeselect;
626 public event GenericCall7 OnObjectDescription;
627 public event GenericCall7 OnObjectName;
628 public event GenericCall7 OnObjectClickAction;
629 public event GenericCall7 OnObjectMaterial;
630 public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
631 public event UpdatePrimFlags OnUpdatePrimFlags;
632 public event UpdatePrimTexture OnUpdatePrimTexture;
633 public event UpdateVector OnUpdatePrimGroupPosition;
634 public event UpdateVector OnUpdatePrimSinglePosition;
635 public event UpdatePrimRotation OnUpdatePrimGroupRotation;
636 public event UpdatePrimSingleRotationPosition OnUpdatePrimSingleRotationPosition;
637 public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
638 public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
639 public event UpdateVector OnUpdatePrimScale;
640 public event UpdateVector OnUpdatePrimGroupScale;
641 public event StatusChange OnChildAgentStatus;
642 public event GenericCall2 OnStopMovement;
643 public event Action<UUID> OnRemoveAvatar;
644 public event ObjectPermissions OnObjectPermissions;
645 public event CreateNewInventoryItem OnCreateNewInventoryItem;
646 public event LinkInventoryItem OnLinkInventoryItem;
647 public event CreateInventoryFolder OnCreateNewInventoryFolder;
648 public event UpdateInventoryFolder OnUpdateInventoryFolder;
649 public event MoveInventoryFolder OnMoveInventoryFolder;
650 public event FetchInventoryDescendents OnFetchInventoryDescendents;
651 public event PurgeInventoryDescendents OnPurgeInventoryDescendents;
652 public event FetchInventory OnFetchInventory;
653 public event RequestTaskInventory OnRequestTaskInventory;
654 public event UpdateInventoryItem OnUpdateInventoryItem;
655 public event CopyInventoryItem OnCopyInventoryItem;
656 public event MoveInventoryItem OnMoveInventoryItem;
657 public event RemoveInventoryFolder OnRemoveInventoryFolder;
658 public event RemoveInventoryItem OnRemoveInventoryItem;
659 public event UDPAssetUploadRequest OnAssetUploadRequest;
660 public event XferReceive OnXferReceive;
661 public event RequestXfer OnRequestXfer;
662 public event ConfirmXfer OnConfirmXfer;
663 public event AbortXfer OnAbortXfer;
664 public event RezScript OnRezScript;
665 public event UpdateTaskInventory OnUpdateTaskInventory;
666 public event MoveTaskInventory OnMoveTaskItem;
667 public event RemoveTaskInventory OnRemoveTaskItem;
668 public event RequestAsset OnRequestAsset;
669 public event UUIDNameRequest OnNameFromUUIDRequest;
670 public event ParcelAccessListRequest OnParcelAccessListRequest;
671 public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;
672 public event ParcelPropertiesRequest OnParcelPropertiesRequest;
673 public event ParcelDivideRequest OnParcelDivideRequest;
674 public event ParcelJoinRequest OnParcelJoinRequest;
675 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
676 public event ParcelSelectObjects OnParcelSelectObjects;
677 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
678 public event ParcelAbandonRequest OnParcelAbandonRequest;
679 public event ParcelGodForceOwner OnParcelGodForceOwner;
680 public event ParcelReclaim OnParcelReclaim;
681 public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
682 public event ParcelDeedToGroup OnParcelDeedToGroup;
683 public event RegionInfoRequest OnRegionInfoRequest;
684 public event EstateCovenantRequest OnEstateCovenantRequest;
685 public event FriendActionDelegate OnApproveFriendRequest;
686 public event FriendActionDelegate OnDenyFriendRequest;
687 public event FriendshipTermination OnTerminateFriendship;
688 public event GrantUserFriendRights OnGrantUserRights;
689 public event MoneyTransferRequest OnMoneyTransferRequest;
690 public event EconomyDataRequest OnEconomyDataRequest;
691 public event MoneyBalanceRequest OnMoneyBalanceRequest;
692 public event UpdateAvatarProperties OnUpdateAvatarProperties;
693 public event ParcelBuy OnParcelBuy;
694 public event RequestPayPrice OnRequestPayPrice;
695 public event ObjectSaleInfo OnObjectSaleInfo;
696 public event ObjectBuy OnObjectBuy;
697 public event BuyObjectInventory OnBuyObjectInventory;
698 public event RequestTerrain OnRequestTerrain;
699 public event RequestTerrain OnUploadTerrain;
700 public event ObjectIncludeInSearch OnObjectIncludeInSearch;
701 public event UUIDNameRequest OnTeleportHomeRequest;
702 public event ScriptAnswer OnScriptAnswer;
703 public event AgentSit OnUndo;
704 public event AgentSit OnRedo;
705 public event LandUndo OnLandUndo;
706 public event ForceReleaseControls OnForceReleaseControls;
707 public event GodLandStatRequest OnLandStatRequest;
708 public event DetailedEstateDataRequest OnDetailedEstateDataRequest;
709 public event SetEstateFlagsRequest OnSetEstateFlagsRequest;
710 public event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture;
711 public event SetEstateTerrainDetailTexture OnSetEstateTerrainDetailTexture;
712 public event SetEstateTerrainTextureHeights OnSetEstateTerrainTextureHeights;
713 public event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest;
714 public event SetRegionTerrainSettings OnSetRegionTerrainSettings;
715 public event EstateRestartSimRequest OnEstateRestartSimRequest;
716 public event EstateChangeCovenantRequest OnEstateChangeCovenantRequest;
717 public event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest;
718 public event SimulatorBlueBoxMessageRequest OnSimulatorBlueBoxMessageRequest;
719 public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest;
720 public event EstateDebugRegionRequest OnEstateDebugRegionRequest;
721 public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
722 public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest;
723 public event UUIDNameRequest OnUUIDGroupNameRequest;
724 public event RegionHandleRequest OnRegionHandleRequest;
725 public event ParcelInfoRequest OnParcelInfoRequest;
726 public event RequestObjectPropertiesFamily OnObjectGroupRequest;
727 public event ScriptReset OnScriptReset;
728 public event GetScriptRunning OnGetScriptRunning;
729 public event SetScriptRunning OnSetScriptRunning;
730 public event UpdateVector OnAutoPilotGo;
731 public event TerrainUnacked OnUnackedTerrain;
732 public event ActivateGesture OnActivateGesture;
733 public event DeactivateGesture OnDeactivateGesture;
734 public event ObjectOwner OnObjectOwner;
735 public event DirPlacesQuery OnDirPlacesQuery;
736 public event DirFindQuery OnDirFindQuery;
737 public event DirLandQuery OnDirLandQuery;
738 public event DirPopularQuery OnDirPopularQuery;
739 public event DirClassifiedQuery OnDirClassifiedQuery;
740 public event EventInfoRequest OnEventInfoRequest;
741 public event ParcelSetOtherCleanTime OnParcelSetOtherCleanTime;
742 public event MapItemRequest OnMapItemRequest;
743 public event OfferCallingCard OnOfferCallingCard;
744 public event AcceptCallingCard OnAcceptCallingCard;
745 public event DeclineCallingCard OnDeclineCallingCard;
746 public event SoundTrigger OnSoundTrigger;
747 public event StartLure OnStartLure;
748 public event TeleportLureRequest OnTeleportLureRequest;
749 public event NetworkStats OnNetworkStatsUpdate;
750 public event ClassifiedInfoRequest OnClassifiedInfoRequest;
751 public event ClassifiedInfoUpdate OnClassifiedInfoUpdate;
752 public event ClassifiedDelete OnClassifiedDelete;
753 public event ClassifiedGodDelete OnClassifiedGodDelete;
754 public event EventNotificationAddRequest OnEventNotificationAddRequest;
755 public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest;
756 public event EventGodDelete OnEventGodDelete;
757 public event ParcelDwellRequest OnParcelDwellRequest;
758 public event UserInfoRequest OnUserInfoRequest;
759 public event UpdateUserInfo OnUpdateUserInfo;
760 public event ViewerEffectEventHandler OnViewerEffect;
761 public event Action<IClientAPI> OnLogout;
762 public event Action<IClientAPI> OnConnectionClosed;
763 public event RetrieveInstantMessages OnRetrieveInstantMessages;
764 public event PickDelete OnPickDelete;
765 public event PickGodDelete OnPickGodDelete;
766 public event PickInfoUpdate OnPickInfoUpdate;
767 public event AvatarNotesUpdate OnAvatarNotesUpdate;
768 public event MuteListRequest OnMuteListRequest;
769 public event AvatarInterestUpdate OnAvatarInterestUpdate;
770 public event FindAgentUpdate OnFindAgent;
771 public event TrackAgentUpdate OnTrackAgent;
772 public event NewUserReport OnUserReport;
773 public event SaveStateHandler OnSaveState;
774 public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest;
775 public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest;
776 public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest;
777 public event FreezeUserUpdate OnParcelFreezeUser;
778 public event EjectUserUpdate OnParcelEjectUser;
779 public event ParcelBuyPass OnParcelBuyPass;
780 public event ParcelGodMark OnParcelGodMark;
781 public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest;
782 public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
783 public event SimWideDeletesDelegate OnSimWideDeletes;
784 public event SendPostcard OnSendPostcard;
785 public event MuteListEntryUpdate OnUpdateMuteListEntry;
786 public event MuteListEntryRemove OnRemoveMuteListEntry;
787 public event GodlikeMessage onGodlikeMessage;
788 public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate;
789
790 public event PlacesQuery OnPlacesQuery;
791
792 #pragma warning restore 67
793
794 #endregion
795
796 #region OpenSim ClientView Public Methods
797 // Do we need this?
798 public bool SendLogoutPacketWhenClosing
799 {
800 set { }
801 }
802
803 public uint CircuitCode
804 {
805 get { return m_sessionID.CRC(); }
806 }
807
808 public IPEndPoint RemoteEndPoint
809 {
810 get { return Session.RemoteEndPoint; }
811 }
812
813 public void SetDebugPacketLevel(int newDebug)
814 {
815 //m_debugLevel = newDebug;
816 }
817
818 public void InPacket(object NewPack)
819 {
820 //throw new System.NotImplementedException();
821 }
822
823 public void ProcessInPacket(Packet NewPack)
824 {
825 //throw new System.NotImplementedException();
826 }
827
828 public void OnClean()
829 {
830 if (OnLogout != null)
831 OnLogout(this);
832
833 if (OnConnectionClosed != null)
834 OnConnectionClosed(this);
835 }
836
837 public void Close()
838 {
839 Close(true);
840 }
841
842 public void Close(bool sendStop)
843 {
844 m_log.Info("[MXP ClientStack] Close Called");
845
846 // Tell the client to go
847 if (sendStop == true)
848 {
849 SendLogoutPacket();
850 }
851
852 // Let MXPPacketServer clean it up
853 if (Session.SessionState != SessionState.Disconnected)
854 {
855 Session.SetStateDisconnected();
856 }
857
858 }
859
860 public void Kick(string message)
861 {
862 Close();
863 }
864
865 public void Start()
866 {
867 Scene.AddNewClient(this);
868
869 // Mimicking LLClientView which gets always set appearance from client.
870 OpenSim.Region.Framework.Scenes.Scene scene=(OpenSim.Region.Framework.Scenes.Scene)Scene;
871 AvatarAppearance appearance;
872 scene.GetAvatarAppearance(this,out appearance);
873 OnSetAppearance(this, appearance.Texture, (byte[])appearance.VisualParams.Clone());
874 }
875
876 public void Stop()
877 {
878 // Nor this
879 }
880
881 public void SendWearables(AvatarWearable[] wearables, int serial)
882 {
883 // Need to translate to MXP somehow
884 }
885
886 public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry)
887 {
888 // Need to translate to MXP somehow
889 }
890
891 public void SendStartPingCheck(byte seq)
892 {
893 // Need to translate to MXP somehow
894 }
895
896 public void SendKillObject(ulong regionHandle, List<uint> localIDs)
897 {
898 foreach (uint localID in localIDs)
899 SendKillObject(regionHandle, localID);
900 }
901
902 private void SendKillObject(ulong regionHandle, uint localID)
903 {
904 DisappearanceEventMessage de = new DisappearanceEventMessage();
905 de.ObjectIndex = localID;
906
907 Session.Send(de);
908 }
909
910 public void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs)
911 {
912 // Need to translate to MXP somehow
913 }
914
915 public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args)
916 {
917 m_log.Info("[MXP ClientStack] Completing Handshake to Region");
918
919 if (OnRegionHandShakeReply != null)
920 {
921 OnRegionHandShakeReply(this);
922 }
923
924 if (OnCompleteMovementToRegion != null)
925 {
926 OnCompleteMovementToRegion(this);
927 }
928
929 // Need to translate to MXP somehow
930 }
931
932 public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible)
933 {
934 ActionEventMessage chatActionEvent = new ActionEventMessage();
935 chatActionEvent.ActionFragment.ActionName = "Chat";
936 chatActionEvent.ActionFragment.SourceObjectId = fromAgentID.Guid;
937 chatActionEvent.ActionFragment.ObservationRadius = 180.0f;
938 chatActionEvent.ActionFragment.ExtensionDialect = "TEXT";
939 chatActionEvent.SetPayloadData(Util.UTF8.GetBytes(message));
940
941 Session.Send(chatActionEvent);
942 }
943
944 public void SendInstantMessage(GridInstantMessage im)
945 {
946 // Need to translate to MXP somehow
947 }
948
949 public void SendGenericMessage(string method, List<string> message)
950 {
951 }
952
953 public void SendGenericMessage(string method, List<byte[]> message)
954 {
955 // Need to translate to MXP somehow
956 }
957
958 public void SendLayerData(float[] map)
959 {
960 MXPSendTerrain(map);
961 }
962
963 public void SendLayerData(int px, int py, float[] map)
964 {
965 }
966
967 public void SendWindData(Vector2[] windSpeeds)
968 {
969 // Need to translate to MXP somehow
970 }
971
972 public void SendCloudData(float[] cloudCover)
973 {
974 // Need to translate to MXP somehow
975 }
976
977 public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look)
978 {
979 //throw new System.NotImplementedException();
980 }
981
982 public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint)
983 {
984 //throw new System.NotImplementedException();
985 }
986
987 public AgentCircuitData RequestClientInfo()
988 {
989 AgentCircuitData clientinfo = new AgentCircuitData();
990 clientinfo.AgentID = AgentId;
991 clientinfo.Appearance = new AvatarAppearance();
992 clientinfo.BaseFolder = UUID.Zero;
993 clientinfo.CapsPath = "";
994 clientinfo.child = false;
995 clientinfo.ChildrenCapSeeds = new Dictionary<ulong, string>();
996 clientinfo.circuitcode = CircuitCode;
997 clientinfo.firstname = FirstName;
998 clientinfo.InventoryFolder = UUID.Zero;
999 clientinfo.lastname = LastName;
1000 clientinfo.SecureSessionID = SecureSessionId;
1001 clientinfo.SessionID = SessionId;
1002 clientinfo.startpos = StartPos;
1003
1004 return clientinfo;
1005 }
1006
1007 public void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL)
1008 {
1009 // TODO: We'll want to get this one working.
1010 // Need to translate to MXP somehow
1011 }
1012
1013 public void SendMapBlock(List<MapBlockData> mapBlocks, uint flag)
1014 {
1015 // Need to translate to MXP somehow
1016 }
1017
1018 public void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags)
1019 {
1020 //throw new System.NotImplementedException();
1021 }
1022
1023 public void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL)
1024 {
1025 // Need to translate to MXP somehow
1026 }
1027
1028 public void SendTeleportFailed(string reason)
1029 {
1030 // Need to translate to MXP somehow
1031 }
1032
1033 public void SendTeleportStart(uint flags)
1034 {
1035 // Need to translate to MXP somehow
1036 }
1037
1038 public void SendTeleportProgress(uint flags, string message)
1039 {
1040 }
1041
1042 public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance)
1043 {
1044 // Need to translate to MXP somehow
1045 }
1046
1047 public void SendPayPrice(UUID objectID, int[] payPrice)
1048 {
1049 // Need to translate to MXP somehow
1050 }
1051
1052 public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations)
1053 {
1054 // Minimap function, not used.
1055 }
1056
1057 public void SetChildAgentThrottle(byte[] throttle)
1058 {
1059 // Need to translate to MXP somehow
1060 }
1061
1062 public void SendAvatarDataImmediate(ISceneEntity avatar)
1063 {
1064 //ScenePresence presence=((Scene)this.Scene).GetScenePresence(avatarID);
1065 ScenePresence presence = (ScenePresence)avatar;
1066 UUID ownerID = presence.UUID;
1067 MXPSendAvatarData(presence.Firstname + " " + presence.Lastname, ownerID, UUID.Zero, presence.UUID, presence.LocalId, presence.AbsolutePosition, presence.Rotation);
1068 }
1069
1070 public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags)
1071 {
1072 //MovementEventMessage me = new MovementEventMessage();
1073 //me.ObjectIndex = data.LocalID;
1074 //me.Location = ToOmVector(data.Position);
1075 //me.Orientation = ToOmQuaternion(data.Rotation);
1076
1077 //MXPSendPrimitive(data.localID, data.ownerID, data.acc, data.rvel, data.primShape, data.pos, data.objectID, data.vel,
1078 // data.rotation, (uint)data.flags, data.text, data.color, data.parentID, data.particleSystem, data.clickAction,
1079 // data.material, data.textureanim);
1080
1081 //Session.Send(me);
1082
1083 throw new System.NotImplementedException();
1084 }
1085
1086 public void ReprioritizeUpdates()
1087 {
1088 }
1089
1090 public void FlushPrimUpdates()
1091 {
1092 }
1093
1094 public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, int version, bool fetchFolders, bool fetchItems)
1095 {
1096 // Need to translate to MXP somehow
1097 }
1098
1099 public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item)
1100 {
1101 // Need to translate to MXP somehow
1102 }
1103
1104 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId)
1105 {
1106 // Need to translate to MXP somehow
1107 }
1108
1109 public void SendRemoveInventoryItem(UUID itemID)
1110 {
1111 // Need to translate to MXP somehow
1112 }
1113
1114 public void SendTakeControls(int controls, bool passToAgent, bool TakeControls)
1115 {
1116 // Need to translate to MXP somehow
1117 }
1118
1119 public void SendTaskInventory(UUID taskID, short serial, byte[] fileName)
1120 {
1121 // Need to translate to MXP somehow
1122 }
1123
1124 public void SendBulkUpdateInventory(InventoryNodeBase node)
1125 {
1126 // Need to translate to MXP somehow
1127 }
1128
1129 public void SendXferPacket(ulong xferID, uint packet, byte[] data)
1130 {
1131 // SL Specific, Ignore. (Remove from IClient)
1132 }
1133
1134 public void SendAbortXferPacket(ulong xferID)
1135 {
1136
1137 }
1138
1139
1140 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)
1141 {
1142 // SL Specific, Ignore. (Remove from IClient)
1143 }
1144
1145 public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data)
1146 {
1147 // Need to translate to MXP somehow
1148 }
1149
1150 public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle)
1151 {
1152 // Need to translate to MXP somehow
1153 // TODO: This may need doing - involves displaying the users avatar name
1154 }
1155
1156 public void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID)
1157 {
1158 // Need to translate to MXP somehow
1159 }
1160
1161 public void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags)
1162 {
1163 // Need to translate to MXP somehow
1164 }
1165
1166 public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain)
1167 {
1168 // Need to translate to MXP somehow
1169 }
1170
1171 public void SendAttachedSoundGainChange(UUID objectID, float gain)
1172 {
1173 // Need to translate to MXP somehow
1174 }
1175
1176 public void SendNameReply(UUID profileId, string firstname, string lastname)
1177 {
1178 // SL Specific
1179 }
1180
1181 public void SendAlertMessage(string message)
1182 {
1183 SendChatMessage(message, 0, Vector3.Zero, "System", UUID.Zero, 0, 0);
1184 }
1185
1186 public void SendAgentAlertMessage(string message, bool modal)
1187 {
1188 SendChatMessage(message, 0, Vector3.Zero, "System" + (modal ? " Notice" : ""), UUID.Zero, 0, 0);
1189 }
1190
1191 public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url)
1192 {
1193 // TODO: Probably can do this better
1194 SendChatMessage("Please visit: " + url, 0, Vector3.Zero, objectname, UUID.Zero, 0, 0);
1195 }
1196
1197 public void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels)
1198 {
1199 // TODO: Probably can do this better
1200 SendChatMessage("Dialog: " + msg, 0, Vector3.Zero, objectname, UUID.Zero, 0, 0);
1201 }
1202
1203 public bool AddMoney(int debit)
1204 {
1205 SendChatMessage("You were paid: " + debit, 0, Vector3.Zero, "System", UUID.Zero, 0, 0);
1206 return true;
1207 }
1208
1209 public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition)
1210 {
1211 // Need to translate to MXP somehow
1212 // Send a light object?
1213 }
1214
1215 public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks)
1216 {
1217 // Need to translate to MXP somehow
1218 }
1219
1220 public void SendViewerTime(int phase)
1221 {
1222 // Need to translate to MXP somehow
1223 }
1224
1225 public UUID GetDefaultAnimation(string name)
1226 {
1227 return UUID.Zero;
1228 }
1229
1230 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] charterMember, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID)
1231 {
1232 // Need to translate to MXP somehow
1233 }
1234
1235 public void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question)
1236 {
1237 // Need to translate to MXP somehow
1238 }
1239
1240 public void SendHealth(float health)
1241 {
1242 // Need to translate to MXP somehow
1243 }
1244
1245 public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID)
1246 {
1247 // Need to translate to MXP somehow
1248 }
1249
1250 public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID)
1251 {
1252 // Need to translate to MXP somehow
1253 }
1254
1255 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args)
1256 {
1257 // Need to translate to MXP somehow
1258 }
1259
1260 public void SendEstateCovenantInformation(UUID covenant)
1261 {
1262 // Need to translate to MXP somehow
1263 }
1264
1265 public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner)
1266 {
1267 // Need to translate to MXP somehow
1268 }
1269
1270 public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, ILandObject lo, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
1271 {
1272 // Need to translate to MXP somehow
1273 }
1274
1275 public void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID)
1276 {
1277 // Need to translate to MXP somehow
1278 }
1279
1280 public void SendForceClientSelectObjects(List<uint> objectIDs)
1281 {
1282 // Need to translate to MXP somehow
1283 }
1284
1285 public void SendLandObjectOwners(LandData land, List<UUID> groups, Dictionary<UUID, int> ownersAndCount)
1286 {
1287 // Need to translate to MXP somehow
1288 }
1289
1290 public void SendCameraConstraint(Vector4 ConstraintPlane)
1291 {
1292
1293 }
1294
1295 public void SendLandParcelOverlay(byte[] data, int sequence_id)
1296 {
1297 // Need to translate to MXP somehow
1298 }
1299
1300 public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time)
1301 {
1302 // Need to translate to MXP somehow
1303 }
1304
1305 public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop)
1306 {
1307 // Need to translate to MXP somehow
1308 }
1309
1310 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID)
1311 {
1312 // Need to translate to MXP somehow
1313 }
1314
1315 public void SendConfirmXfer(ulong xferID, uint PacketID)
1316 {
1317 // Need to translate to MXP somehow
1318 }
1319
1320 public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName)
1321 {
1322 // Need to translate to MXP somehow
1323 }
1324
1325 public void SendInitiateDownload(string simFileName, string clientFileName)
1326 {
1327 // Need to translate to MXP somehow
1328 }
1329
1330 public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
1331 {
1332 // Need to translate to MXP somehow
1333 }
1334
1335 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
1336 {
1337 // Need to translate to MXP somehow
1338 }
1339
1340 public void SendImageNotFound(UUID imageid)
1341 {
1342 // Need to translate to MXP somehow
1343 }
1344
1345 public void SendShutdownConnectionNotice()
1346 {
1347 // Need to translate to MXP somehow
1348 }
1349
1350 public void SendSimStats(SimStats stats)
1351 {
1352 // Need to translate to MXP somehow
1353 }
1354
1355 public void SendObjectPropertiesFamilyData(ISceneEntity Entity, uint RequestFlags)
1356 {
1357 //throw new System.NotImplementedException();
1358 }
1359
1360 public void SendObjectPropertiesReply(ISceneEntity entity)
1361 {
1362 //throw new System.NotImplementedException();
1363 }
1364
1365 public void SendAgentOffline(UUID[] agentIDs)
1366 {
1367 // Need to translate to MXP somehow (Friends List)
1368 }
1369
1370 public void SendAgentOnline(UUID[] agentIDs)
1371 {
1372 // Need to translate to MXP somehow (Friends List)
1373 }
1374
1375 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook)
1376 {
1377 // Need to translate to MXP somehow
1378 }
1379
1380 public void SendAdminResponse(UUID Token, uint AdminLevel)
1381 {
1382 // Need to translate to MXP somehow
1383 }
1384
1385 public void SendGroupMembership(GroupMembershipData[] GroupMembership)
1386 {
1387 // Need to translate to MXP somehow
1388 }
1389
1390 public void SendGroupNameReply(UUID groupLLUID, string GroupName)
1391 {
1392 // Need to translate to MXP somehow
1393 }
1394
1395 public void SendJoinGroupReply(UUID groupID, bool success)
1396 {
1397 // Need to translate to MXP somehow
1398 }
1399
1400 public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success)
1401 {
1402 // Need to translate to MXP somehow
1403 }
1404
1405 public void SendLeaveGroupReply(UUID groupID, bool success)
1406 {
1407 // Need to translate to MXP somehow
1408 }
1409
1410 public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia)
1411 {
1412 // Need to translate to MXP somehow
1413 }
1414
1415 public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running)
1416 {
1417 // Need to translate to MXP somehow
1418 }
1419
1420 public void SendAsset(AssetRequestToClient req)
1421 {
1422 // Need to translate to MXP somehow
1423 }
1424
1425 public void SendTexture(AssetBase TextureAsset)
1426 {
1427 // Need to translate to MXP somehow
1428 }
1429
1430 public byte[] GetThrottlesPacked(float multiplier)
1431 {
1432 // LL Specific, get out of IClientAPI
1433
1434 const int singlefloat = 4;
1435 float tResend = multiplier;
1436 float tLand = multiplier;
1437 float tWind = multiplier;
1438 float tCloud = multiplier;
1439 float tTask = multiplier;
1440 float tTexture = multiplier;
1441 float tAsset = multiplier;
1442
1443 byte[] throttles = new byte[singlefloat * 7];
1444 int i = 0;
1445 Buffer.BlockCopy(BitConverter.GetBytes(tResend), 0, throttles, singlefloat * i, singlefloat);
1446 i++;
1447 Buffer.BlockCopy(BitConverter.GetBytes(tLand), 0, throttles, singlefloat * i, singlefloat);
1448 i++;
1449 Buffer.BlockCopy(BitConverter.GetBytes(tWind), 0, throttles, singlefloat * i, singlefloat);
1450 i++;
1451 Buffer.BlockCopy(BitConverter.GetBytes(tCloud), 0, throttles, singlefloat * i, singlefloat);
1452 i++;
1453 Buffer.BlockCopy(BitConverter.GetBytes(tTask), 0, throttles, singlefloat * i, singlefloat);
1454 i++;
1455 Buffer.BlockCopy(BitConverter.GetBytes(tTexture), 0, throttles, singlefloat * i, singlefloat);
1456 i++;
1457 Buffer.BlockCopy(BitConverter.GetBytes(tAsset), 0, throttles, singlefloat * i, singlefloat);
1458
1459 return throttles;
1460 }
1461
1462 public void SendBlueBoxMessage(UUID FromAvatarID, string FromAvatarName, string Message)
1463 {
1464 SendChatMessage(Message, 0, Vector3.Zero, FromAvatarName, UUID.Zero, 0, 0);
1465 }
1466
1467 public void SendLogoutPacket()
1468 {
1469 LeaveRequestMessage lrm = new LeaveRequestMessage();
1470 Session.Send(lrm);
1471 }
1472
1473 public EndPoint GetClientEP()
1474 {
1475 return null;
1476 }
1477
1478 public ClientInfo GetClientInfo()
1479 {
1480 return null;
1481 //throw new System.NotImplementedException();
1482 }
1483
1484 public void SetClientInfo(ClientInfo info)
1485 {
1486 //throw new System.NotImplementedException();
1487 }
1488
1489 public void SetClientOption(string option, string value)
1490 {
1491 // Need to translate to MXP somehow
1492 }
1493
1494 public string GetClientOption(string option)
1495 {
1496 // Need to translate to MXP somehow
1497 return "";
1498 }
1499
1500 public void Terminate()
1501 {
1502 Close();
1503 }
1504
1505 public void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters)
1506 {
1507 // Need to translate to MXP somehow
1508 }
1509
1510 public void SendClearFollowCamProperties(UUID objectID)
1511 {
1512 // Need to translate to MXP somehow
1513 }
1514
1515 public void SendRegionHandle(UUID regoinID, ulong handle)
1516 {
1517 // Need to translate to MXP somehow
1518 }
1519
1520 public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y)
1521 {
1522 // Need to translate to MXP somehow
1523 }
1524
1525 public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt)
1526 {
1527 // Need to translate to MXP somehow
1528 }
1529
1530 public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data)
1531 {
1532 // Need to translate to MXP somehow
1533 }
1534
1535 public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data)
1536 {
1537 // Need to translate to MXP somehow
1538 }
1539
1540 public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data)
1541 {
1542 // Need to translate to MXP somehow
1543 }
1544
1545 public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data)
1546 {
1547 // Need to translate to MXP somehow
1548 }
1549
1550 public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data)
1551 {
1552 // Need to translate to MXP somehow
1553 }
1554
1555 public void SendDirLandReply(UUID queryID, DirLandReplyData[] data)
1556 {
1557 // Need to translate to MXP somehow
1558 }
1559
1560 public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data)
1561 {
1562 // Need to translate to MXP somehow
1563 }
1564
1565 public void SendEventInfoReply(EventData info)
1566 {
1567 // Need to translate to MXP somehow
1568 }
1569
1570 public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags)
1571 {
1572 // Need to translate to MXP somehow
1573 }
1574
1575 public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data)
1576 {
1577 // Need to translate to MXP somehow
1578 }
1579
1580 public void SendOfferCallingCard(UUID srcID, UUID transactionID)
1581 {
1582 // Need to translate to MXP somehow
1583 }
1584
1585 public void SendAcceptCallingCard(UUID transactionID)
1586 {
1587 // Need to translate to MXP somehow
1588 }
1589
1590 public void SendDeclineCallingCard(UUID transactionID)
1591 {
1592 // Need to translate to MXP somehow
1593 }
1594
1595 public void SendTerminateFriend(UUID exFriendID)
1596 {
1597 // Need to translate to MXP somehow
1598 }
1599
1600 public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name)
1601 {
1602 // Need to translate to MXP somehow
1603 }
1604
1605 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)
1606 {
1607 // Need to translate to MXP somehow
1608 }
1609
1610 public void SendAgentDropGroup(UUID groupID)
1611 {
1612 // Need to translate to MXP somehow
1613 }
1614
1615 public void SendAvatarNotesReply(UUID targetID, string text)
1616 {
1617 // Need to translate to MXP somehow
1618 }
1619
1620 public void SendAvatarPicksReply(UUID targetID, Dictionary<UUID, string> picks)
1621 {
1622 // Need to translate to MXP somehow
1623 }
1624
1625 public void SendAvatarClassifiedReply(UUID targetID, Dictionary<UUID, string> classifieds)
1626 {
1627 // Need to translate to MXP somehow
1628 }
1629
1630 public void SendParcelDwellReply(int localID, UUID parcelID, float dwell)
1631 {
1632 // Need to translate to MXP somehow
1633 }
1634
1635 public void SendUserInfoReply(bool imViaEmail, bool visible, string email)
1636 {
1637 // Need to translate to MXP somehow
1638 }
1639
1640 public void KillEndDone()
1641 {
1642 Stop();
1643 }
1644
1645 public bool AddGenericPacketHandler(string MethodName, GenericMessage handler)
1646 {
1647 // Need to translate to MXP somehow
1648 return true;
1649 }
1650
1651 #endregion
1652
1653 #region IClientCore
1654
1655 public bool TryGet<T>(out T iface)
1656 {
1657 iface = default(T);
1658 return false;
1659 }
1660
1661 public T Get<T>()
1662 {
1663 return default(T);
1664 }
1665
1666 public void Disconnect(string reason)
1667 {
1668 Kick(reason);
1669 Close();
1670 }
1671
1672 public void Disconnect()
1673 {
1674 Close();
1675 }
1676
1677 #endregion
1678
1679 public void SendCreateGroupReply(UUID groupID, bool success, string message)
1680 {
1681 }
1682
1683 public void RefreshGroupMembership()
1684 {
1685 }
1686
1687 public void SendUseCachedMuteList()
1688 {
1689 }
1690
1691 public void SendMuteListUpdate(string filename)
1692 {
1693 }
1694
1695 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)
1696 {
1697 }
1698
1699 public void SendRebakeAvatarTextures(UUID textureID)
1700 {
1701 }
1702
1703 public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
1704 {
1705 }
1706
1707 public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
1708 {
1709 }
1710
1711 public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
1712 {
1713 }
1714
1715 public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
1716 {
1717 }
1718
1719 public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes)
1720 {
1721 }
1722
1723 public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals)
1724 {
1725 }
1726
1727 public void SendChangeUserRights(UUID agentID, UUID friendID, int rights)
1728 {
1729 }
1730
1731 public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId)
1732 {
1733 }
1734
1735 public void StopFlying(ISceneEntity presence)
1736 {
1737 }
1738
1739 public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data)
1740 {
1741 }
1742 }
1743}