aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Client/MXP/ClientStack/MXPClientView.cs2316
-rw-r--r--OpenSim/Client/MXP/MXPModule.cs174
-rw-r--r--OpenSim/Client/MXP/MXPUtil.cs30
-rw-r--r--OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs736
-rw-r--r--ThirdPartyLicenses/MXP.txt120
5 files changed, 1688 insertions, 1688 deletions
diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
index 4a102e9..8510e16 100644
--- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
+++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
@@ -1,1158 +1,1158 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Net; 3using System.Net;
4using System.Reflection; 4using System.Reflection;
5using System.Text; 5using System.Text;
6using log4net; 6using log4net;
7using MXP; 7using MXP;
8using MXP.Messages; 8using MXP.Messages;
9using OpenMetaverse; 9using OpenMetaverse;
10using OpenMetaverse.Packets; 10using OpenMetaverse.Packets;
11using OpenSim.Framework; 11using OpenSim.Framework;
12using OpenSim.Framework.Client; 12using OpenSim.Framework.Client;
13using Packet=OpenMetaverse.Packets.Packet; 13using Packet=OpenMetaverse.Packets.Packet;
14 14
15namespace OpenSim.Client.MXP.ClientStack 15namespace OpenSim.Client.MXP.ClientStack
16{ 16{
17 class MXPClientView : IClientAPI, IClientCore 17 class MXPClientView : IClientAPI, IClientCore
18 { 18 {
19 internal static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 19 internal static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
20 20
21 private readonly Session mxpSession; 21 private readonly Session mxpSession;
22 private readonly UUID mxpSessionID; 22 private readonly UUID mxpSessionID;
23 private readonly IScene mxpHostBubble; 23 private readonly IScene mxpHostBubble;
24 private readonly string mxpUsername; 24 private readonly string mxpUsername;
25 25
26 private int debugLevel; 26 private int debugLevel;
27 27
28 public MXPClientView(Session mxpSession, UUID mxpSessionID, IScene mxpHostBubble, string mxpUsername) 28 public MXPClientView(Session mxpSession, UUID mxpSessionID, IScene mxpHostBubble, string mxpUsername)
29 { 29 {
30 this.mxpSession = mxpSession; 30 this.mxpSession = mxpSession;
31 this.mxpUsername = mxpUsername; 31 this.mxpUsername = mxpUsername;
32 this.mxpHostBubble = mxpHostBubble; 32 this.mxpHostBubble = mxpHostBubble;
33 this.mxpSessionID = mxpSessionID; 33 this.mxpSessionID = mxpSessionID;
34 } 34 }
35 35
36 public Session Session 36 public Session Session
37 { 37 {
38 get { return mxpSession; } 38 get { return mxpSession; }
39 } 39 }
40 40
41 public bool ProcessMXPPacket(Message msg) 41 public bool ProcessMXPPacket(Message msg)
42 { 42 {
43 if (debugLevel > 0) 43 if (debugLevel > 0)
44 m_log.Warn("[MXP] Got Action/Command Packet: " + msg); 44 m_log.Warn("[MXP] Got Action/Command Packet: " + msg);
45 45
46 return false; 46 return false;
47 } 47 }
48 48
49 #region IClientAPI 49 #region IClientAPI
50 50
51 public Vector3 StartPos 51 public Vector3 StartPos
52 { 52 {
53 get { return new Vector3(128f, 128f, 128f); } 53 get { return new Vector3(128f, 128f, 128f); }
54 set { } // TODO: Implement Me 54 set { } // TODO: Implement Me
55 } 55 }
56 56
57 public UUID AgentId 57 public UUID AgentId
58 { 58 {
59 get { return mxpSessionID; } 59 get { return mxpSessionID; }
60 } 60 }
61 61
62 public UUID SessionId 62 public UUID SessionId
63 { 63 {
64 get { return mxpSessionID; } 64 get { return mxpSessionID; }
65 } 65 }
66 66
67 public UUID SecureSessionId 67 public UUID SecureSessionId
68 { 68 {
69 get { return mxpSessionID; } 69 get { return mxpSessionID; }
70 } 70 }
71 71
72 public UUID ActiveGroupId 72 public UUID ActiveGroupId
73 { 73 {
74 get { return UUID.Zero; } 74 get { return UUID.Zero; }
75 } 75 }
76 76
77 public string ActiveGroupName 77 public string ActiveGroupName
78 { 78 {
79 get { return ""; } 79 get { return ""; }
80 } 80 }
81 81
82 public ulong ActiveGroupPowers 82 public ulong ActiveGroupPowers
83 { 83 {
84 get { return 0; } 84 get { return 0; }
85 } 85 }
86 86
87 public ulong GetGroupPowers(UUID groupID) 87 public ulong GetGroupPowers(UUID groupID)
88 { 88 {
89 return 0; 89 return 0;
90 } 90 }
91 91
92 public bool IsGroupMember(UUID GroupID) 92 public bool IsGroupMember(UUID GroupID)
93 { 93 {
94 return false; 94 return false;
95 } 95 }
96 96
97 public string FirstName 97 public string FirstName
98 { 98 {
99 get { return mxpUsername; } 99 get { return mxpUsername; }
100 } 100 }
101 101
102 public string LastName 102 public string LastName
103 { 103 {
104 get { return "@mxp://" + Session.RemoteEndPoint.Address; } 104 get { return "@mxp://" + Session.RemoteEndPoint.Address; }
105 } 105 }
106 106
107 public IScene Scene 107 public IScene Scene
108 { 108 {
109 get { return mxpHostBubble; } 109 get { return mxpHostBubble; }
110 } 110 }
111 111
112 public int NextAnimationSequenceNumber 112 public int NextAnimationSequenceNumber
113 { 113 {
114 get { return 0; } 114 get { return 0; }
115 } 115 }
116 116
117 public string Name 117 public string Name
118 { 118 {
119 get { return FirstName; } 119 get { return FirstName; }
120 } 120 }
121 121
122 public bool IsActive 122 public bool IsActive
123 { 123 {
124 get { return Session.SessionState == SessionState.Connected; } 124 get { return Session.SessionState == SessionState.Connected; }
125 set 125 set
126 { 126 {
127 if (!value) 127 if (!value)
128 Stop(); 128 Stop();
129 } 129 }
130 } 130 }
131 131
132 // Do we need this? 132 // Do we need this?
133 public bool SendLogoutPacketWhenClosing 133 public bool SendLogoutPacketWhenClosing
134 { 134 {
135 set { } 135 set { }
136 } 136 }
137 137
138 public uint CircuitCode 138 public uint CircuitCode
139 { 139 {
140 get { return mxpSessionID.CRC(); } 140 get { return mxpSessionID.CRC(); }
141 } 141 }
142 142
143 public event GenericMessage OnGenericMessage; 143 public event GenericMessage OnGenericMessage;
144 public event ImprovedInstantMessage OnInstantMessage; 144 public event ImprovedInstantMessage OnInstantMessage;
145 public event ChatMessage OnChatFromClient; 145 public event ChatMessage OnChatFromClient;
146 public event TextureRequest OnRequestTexture; 146 public event TextureRequest OnRequestTexture;
147 public event RezObject OnRezObject; 147 public event RezObject OnRezObject;
148 public event ModifyTerrain OnModifyTerrain; 148 public event ModifyTerrain OnModifyTerrain;
149 public event BakeTerrain OnBakeTerrain; 149 public event BakeTerrain OnBakeTerrain;
150 public event EstateChangeInfo OnEstateChangeInfo; 150 public event EstateChangeInfo OnEstateChangeInfo;
151 public event SetAppearance OnSetAppearance; 151 public event SetAppearance OnSetAppearance;
152 public event AvatarNowWearing OnAvatarNowWearing; 152 public event AvatarNowWearing OnAvatarNowWearing;
153 public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv; 153 public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv;
154 public event UUIDNameRequest OnDetachAttachmentIntoInv; 154 public event UUIDNameRequest OnDetachAttachmentIntoInv;
155 public event ObjectAttach OnObjectAttach; 155 public event ObjectAttach OnObjectAttach;
156 public event ObjectDeselect OnObjectDetach; 156 public event ObjectDeselect OnObjectDetach;
157 public event ObjectDrop OnObjectDrop; 157 public event ObjectDrop OnObjectDrop;
158 public event StartAnim OnStartAnim; 158 public event StartAnim OnStartAnim;
159 public event StopAnim OnStopAnim; 159 public event StopAnim OnStopAnim;
160 public event LinkObjects OnLinkObjects; 160 public event LinkObjects OnLinkObjects;
161 public event DelinkObjects OnDelinkObjects; 161 public event DelinkObjects OnDelinkObjects;
162 public event RequestMapBlocks OnRequestMapBlocks; 162 public event RequestMapBlocks OnRequestMapBlocks;
163 public event RequestMapName OnMapNameRequest; 163 public event RequestMapName OnMapNameRequest;
164 public event TeleportLocationRequest OnTeleportLocationRequest; 164 public event TeleportLocationRequest OnTeleportLocationRequest;
165 public event DisconnectUser OnDisconnectUser; 165 public event DisconnectUser OnDisconnectUser;
166 public event RequestAvatarProperties OnRequestAvatarProperties; 166 public event RequestAvatarProperties OnRequestAvatarProperties;
167 public event SetAlwaysRun OnSetAlwaysRun; 167 public event SetAlwaysRun OnSetAlwaysRun;
168 public event TeleportLandmarkRequest OnTeleportLandmarkRequest; 168 public event TeleportLandmarkRequest OnTeleportLandmarkRequest;
169 public event DeRezObject OnDeRezObject; 169 public event DeRezObject OnDeRezObject;
170 public event Action<IClientAPI> OnRegionHandShakeReply; 170 public event Action<IClientAPI> OnRegionHandShakeReply;
171 public event GenericCall2 OnRequestWearables; 171 public event GenericCall2 OnRequestWearables;
172 public event GenericCall2 OnCompleteMovementToRegion; 172 public event GenericCall2 OnCompleteMovementToRegion;
173 public event UpdateAgent OnAgentUpdate; 173 public event UpdateAgent OnAgentUpdate;
174 public event AgentRequestSit OnAgentRequestSit; 174 public event AgentRequestSit OnAgentRequestSit;
175 public event AgentSit OnAgentSit; 175 public event AgentSit OnAgentSit;
176 public event AvatarPickerRequest OnAvatarPickerRequest; 176 public event AvatarPickerRequest OnAvatarPickerRequest;
177 public event Action<IClientAPI> OnRequestAvatarsData; 177 public event Action<IClientAPI> OnRequestAvatarsData;
178 public event AddNewPrim OnAddPrim; 178 public event AddNewPrim OnAddPrim;
179 public event FetchInventory OnAgentDataUpdateRequest; 179 public event FetchInventory OnAgentDataUpdateRequest;
180 public event TeleportLocationRequest OnSetStartLocationRequest; 180 public event TeleportLocationRequest OnSetStartLocationRequest;
181 public event RequestGodlikePowers OnRequestGodlikePowers; 181 public event RequestGodlikePowers OnRequestGodlikePowers;
182 public event GodKickUser OnGodKickUser; 182 public event GodKickUser OnGodKickUser;
183 public event ObjectDuplicate OnObjectDuplicate; 183 public event ObjectDuplicate OnObjectDuplicate;
184 public event ObjectDuplicateOnRay OnObjectDuplicateOnRay; 184 public event ObjectDuplicateOnRay OnObjectDuplicateOnRay;
185 public event GrabObject OnGrabObject; 185 public event GrabObject OnGrabObject;
186 public event ObjectSelect OnDeGrabObject; 186 public event ObjectSelect OnDeGrabObject;
187 public event MoveObject OnGrabUpdate; 187 public event MoveObject OnGrabUpdate;
188 public event UpdateShape OnUpdatePrimShape; 188 public event UpdateShape OnUpdatePrimShape;
189 public event ObjectExtraParams OnUpdateExtraParams; 189 public event ObjectExtraParams OnUpdateExtraParams;
190 public event ObjectSelect OnObjectSelect; 190 public event ObjectSelect OnObjectSelect;
191 public event ObjectDeselect OnObjectDeselect; 191 public event ObjectDeselect OnObjectDeselect;
192 public event GenericCall7 OnObjectDescription; 192 public event GenericCall7 OnObjectDescription;
193 public event GenericCall7 OnObjectName; 193 public event GenericCall7 OnObjectName;
194 public event GenericCall7 OnObjectClickAction; 194 public event GenericCall7 OnObjectClickAction;
195 public event GenericCall7 OnObjectMaterial; 195 public event GenericCall7 OnObjectMaterial;
196 public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; 196 public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
197 public event UpdatePrimFlags OnUpdatePrimFlags; 197 public event UpdatePrimFlags OnUpdatePrimFlags;
198 public event UpdatePrimTexture OnUpdatePrimTexture; 198 public event UpdatePrimTexture OnUpdatePrimTexture;
199 public event UpdateVector OnUpdatePrimGroupPosition; 199 public event UpdateVector OnUpdatePrimGroupPosition;
200 public event UpdateVector OnUpdatePrimSinglePosition; 200 public event UpdateVector OnUpdatePrimSinglePosition;
201 public event UpdatePrimRotation OnUpdatePrimGroupRotation; 201 public event UpdatePrimRotation OnUpdatePrimGroupRotation;
202 public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; 202 public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
203 public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation; 203 public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
204 public event UpdateVector OnUpdatePrimScale; 204 public event UpdateVector OnUpdatePrimScale;
205 public event UpdateVector OnUpdatePrimGroupScale; 205 public event UpdateVector OnUpdatePrimGroupScale;
206 public event StatusChange OnChildAgentStatus; 206 public event StatusChange OnChildAgentStatus;
207 public event GenericCall2 OnStopMovement; 207 public event GenericCall2 OnStopMovement;
208 public event Action<UUID> OnRemoveAvatar; 208 public event Action<UUID> OnRemoveAvatar;
209 public event ObjectPermissions OnObjectPermissions; 209 public event ObjectPermissions OnObjectPermissions;
210 public event CreateNewInventoryItem OnCreateNewInventoryItem; 210 public event CreateNewInventoryItem OnCreateNewInventoryItem;
211 public event CreateInventoryFolder OnCreateNewInventoryFolder; 211 public event CreateInventoryFolder OnCreateNewInventoryFolder;
212 public event UpdateInventoryFolder OnUpdateInventoryFolder; 212 public event UpdateInventoryFolder OnUpdateInventoryFolder;
213 public event MoveInventoryFolder OnMoveInventoryFolder; 213 public event MoveInventoryFolder OnMoveInventoryFolder;
214 public event FetchInventoryDescendents OnFetchInventoryDescendents; 214 public event FetchInventoryDescendents OnFetchInventoryDescendents;
215 public event PurgeInventoryDescendents OnPurgeInventoryDescendents; 215 public event PurgeInventoryDescendents OnPurgeInventoryDescendents;
216 public event FetchInventory OnFetchInventory; 216 public event FetchInventory OnFetchInventory;
217 public event RequestTaskInventory OnRequestTaskInventory; 217 public event RequestTaskInventory OnRequestTaskInventory;
218 public event UpdateInventoryItem OnUpdateInventoryItem; 218 public event UpdateInventoryItem OnUpdateInventoryItem;
219 public event CopyInventoryItem OnCopyInventoryItem; 219 public event CopyInventoryItem OnCopyInventoryItem;
220 public event MoveInventoryItem OnMoveInventoryItem; 220 public event MoveInventoryItem OnMoveInventoryItem;
221 public event RemoveInventoryFolder OnRemoveInventoryFolder; 221 public event RemoveInventoryFolder OnRemoveInventoryFolder;
222 public event RemoveInventoryItem OnRemoveInventoryItem; 222 public event RemoveInventoryItem OnRemoveInventoryItem;
223 public event UDPAssetUploadRequest OnAssetUploadRequest; 223 public event UDPAssetUploadRequest OnAssetUploadRequest;
224 public event XferReceive OnXferReceive; 224 public event XferReceive OnXferReceive;
225 public event RequestXfer OnRequestXfer; 225 public event RequestXfer OnRequestXfer;
226 public event ConfirmXfer OnConfirmXfer; 226 public event ConfirmXfer OnConfirmXfer;
227 public event AbortXfer OnAbortXfer; 227 public event AbortXfer OnAbortXfer;
228 public event RezScript OnRezScript; 228 public event RezScript OnRezScript;
229 public event UpdateTaskInventory OnUpdateTaskInventory; 229 public event UpdateTaskInventory OnUpdateTaskInventory;
230 public event MoveTaskInventory OnMoveTaskItem; 230 public event MoveTaskInventory OnMoveTaskItem;
231 public event RemoveTaskInventory OnRemoveTaskItem; 231 public event RemoveTaskInventory OnRemoveTaskItem;
232 public event RequestAsset OnRequestAsset; 232 public event RequestAsset OnRequestAsset;
233 public event UUIDNameRequest OnNameFromUUIDRequest; 233 public event UUIDNameRequest OnNameFromUUIDRequest;
234 public event ParcelAccessListRequest OnParcelAccessListRequest; 234 public event ParcelAccessListRequest OnParcelAccessListRequest;
235 public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest; 235 public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;
236 public event ParcelPropertiesRequest OnParcelPropertiesRequest; 236 public event ParcelPropertiesRequest OnParcelPropertiesRequest;
237 public event ParcelDivideRequest OnParcelDivideRequest; 237 public event ParcelDivideRequest OnParcelDivideRequest;
238 public event ParcelJoinRequest OnParcelJoinRequest; 238 public event ParcelJoinRequest OnParcelJoinRequest;
239 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; 239 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
240 public event ParcelSelectObjects OnParcelSelectObjects; 240 public event ParcelSelectObjects OnParcelSelectObjects;
241 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; 241 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
242 public event ParcelAbandonRequest OnParcelAbandonRequest; 242 public event ParcelAbandonRequest OnParcelAbandonRequest;
243 public event ParcelGodForceOwner OnParcelGodForceOwner; 243 public event ParcelGodForceOwner OnParcelGodForceOwner;
244 public event ParcelReclaim OnParcelReclaim; 244 public event ParcelReclaim OnParcelReclaim;
245 public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest; 245 public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
246 public event RegionInfoRequest OnRegionInfoRequest; 246 public event RegionInfoRequest OnRegionInfoRequest;
247 public event EstateCovenantRequest OnEstateCovenantRequest; 247 public event EstateCovenantRequest OnEstateCovenantRequest;
248 public event FriendActionDelegate OnApproveFriendRequest; 248 public event FriendActionDelegate OnApproveFriendRequest;
249 public event FriendActionDelegate OnDenyFriendRequest; 249 public event FriendActionDelegate OnDenyFriendRequest;
250 public event FriendshipTermination OnTerminateFriendship; 250 public event FriendshipTermination OnTerminateFriendship;
251 public event MoneyTransferRequest OnMoneyTransferRequest; 251 public event MoneyTransferRequest OnMoneyTransferRequest;
252 public event EconomyDataRequest OnEconomyDataRequest; 252 public event EconomyDataRequest OnEconomyDataRequest;
253 public event MoneyBalanceRequest OnMoneyBalanceRequest; 253 public event MoneyBalanceRequest OnMoneyBalanceRequest;
254 public event UpdateAvatarProperties OnUpdateAvatarProperties; 254 public event UpdateAvatarProperties OnUpdateAvatarProperties;
255 public event ParcelBuy OnParcelBuy; 255 public event ParcelBuy OnParcelBuy;
256 public event RequestPayPrice OnRequestPayPrice; 256 public event RequestPayPrice OnRequestPayPrice;
257 public event ObjectSaleInfo OnObjectSaleInfo; 257 public event ObjectSaleInfo OnObjectSaleInfo;
258 public event ObjectBuy OnObjectBuy; 258 public event ObjectBuy OnObjectBuy;
259 public event BuyObjectInventory OnBuyObjectInventory; 259 public event BuyObjectInventory OnBuyObjectInventory;
260 public event RequestTerrain OnRequestTerrain; 260 public event RequestTerrain OnRequestTerrain;
261 public event RequestTerrain OnUploadTerrain; 261 public event RequestTerrain OnUploadTerrain;
262 public event ObjectIncludeInSearch OnObjectIncludeInSearch; 262 public event ObjectIncludeInSearch OnObjectIncludeInSearch;
263 public event UUIDNameRequest OnTeleportHomeRequest; 263 public event UUIDNameRequest OnTeleportHomeRequest;
264 public event ScriptAnswer OnScriptAnswer; 264 public event ScriptAnswer OnScriptAnswer;
265 public event AgentSit OnUndo; 265 public event AgentSit OnUndo;
266 public event ForceReleaseControls OnForceReleaseControls; 266 public event ForceReleaseControls OnForceReleaseControls;
267 public event GodLandStatRequest OnLandStatRequest; 267 public event GodLandStatRequest OnLandStatRequest;
268 public event DetailedEstateDataRequest OnDetailedEstateDataRequest; 268 public event DetailedEstateDataRequest OnDetailedEstateDataRequest;
269 public event SetEstateFlagsRequest OnSetEstateFlagsRequest; 269 public event SetEstateFlagsRequest OnSetEstateFlagsRequest;
270 public event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture; 270 public event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture;
271 public event SetEstateTerrainDetailTexture OnSetEstateTerrainDetailTexture; 271 public event SetEstateTerrainDetailTexture OnSetEstateTerrainDetailTexture;
272 public event SetEstateTerrainTextureHeights OnSetEstateTerrainTextureHeights; 272 public event SetEstateTerrainTextureHeights OnSetEstateTerrainTextureHeights;
273 public event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest; 273 public event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest;
274 public event SetRegionTerrainSettings OnSetRegionTerrainSettings; 274 public event SetRegionTerrainSettings OnSetRegionTerrainSettings;
275 public event EstateRestartSimRequest OnEstateRestartSimRequest; 275 public event EstateRestartSimRequest OnEstateRestartSimRequest;
276 public event EstateChangeCovenantRequest OnEstateChangeCovenantRequest; 276 public event EstateChangeCovenantRequest OnEstateChangeCovenantRequest;
277 public event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest; 277 public event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest;
278 public event SimulatorBlueBoxMessageRequest OnSimulatorBlueBoxMessageRequest; 278 public event SimulatorBlueBoxMessageRequest OnSimulatorBlueBoxMessageRequest;
279 public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest; 279 public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest;
280 public event EstateDebugRegionRequest OnEstateDebugRegionRequest; 280 public event EstateDebugRegionRequest OnEstateDebugRegionRequest;
281 public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; 281 public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
282 public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest; 282 public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest;
283 public event UUIDNameRequest OnUUIDGroupNameRequest; 283 public event UUIDNameRequest OnUUIDGroupNameRequest;
284 public event RegionHandleRequest OnRegionHandleRequest; 284 public event RegionHandleRequest OnRegionHandleRequest;
285 public event ParcelInfoRequest OnParcelInfoRequest; 285 public event ParcelInfoRequest OnParcelInfoRequest;
286 public event RequestObjectPropertiesFamily OnObjectGroupRequest; 286 public event RequestObjectPropertiesFamily OnObjectGroupRequest;
287 public event ScriptReset OnScriptReset; 287 public event ScriptReset OnScriptReset;
288 public event GetScriptRunning OnGetScriptRunning; 288 public event GetScriptRunning OnGetScriptRunning;
289 public event SetScriptRunning OnSetScriptRunning; 289 public event SetScriptRunning OnSetScriptRunning;
290 public event UpdateVector OnAutoPilotGo; 290 public event UpdateVector OnAutoPilotGo;
291 public event TerrainUnacked OnUnackedTerrain; 291 public event TerrainUnacked OnUnackedTerrain;
292 public event ActivateGesture OnActivateGesture; 292 public event ActivateGesture OnActivateGesture;
293 public event DeactivateGesture OnDeactivateGesture; 293 public event DeactivateGesture OnDeactivateGesture;
294 public event ObjectOwner OnObjectOwner; 294 public event ObjectOwner OnObjectOwner;
295 public event DirPlacesQuery OnDirPlacesQuery; 295 public event DirPlacesQuery OnDirPlacesQuery;
296 public event DirFindQuery OnDirFindQuery; 296 public event DirFindQuery OnDirFindQuery;
297 public event DirLandQuery OnDirLandQuery; 297 public event DirLandQuery OnDirLandQuery;
298 public event DirPopularQuery OnDirPopularQuery; 298 public event DirPopularQuery OnDirPopularQuery;
299 public event DirClassifiedQuery OnDirClassifiedQuery; 299 public event DirClassifiedQuery OnDirClassifiedQuery;
300 public event EventInfoRequest OnEventInfoRequest; 300 public event EventInfoRequest OnEventInfoRequest;
301 public event ParcelSetOtherCleanTime OnParcelSetOtherCleanTime; 301 public event ParcelSetOtherCleanTime OnParcelSetOtherCleanTime;
302 public event MapItemRequest OnMapItemRequest; 302 public event MapItemRequest OnMapItemRequest;
303 public event OfferCallingCard OnOfferCallingCard; 303 public event OfferCallingCard OnOfferCallingCard;
304 public event AcceptCallingCard OnAcceptCallingCard; 304 public event AcceptCallingCard OnAcceptCallingCard;
305 public event DeclineCallingCard OnDeclineCallingCard; 305 public event DeclineCallingCard OnDeclineCallingCard;
306 public event SoundTrigger OnSoundTrigger; 306 public event SoundTrigger OnSoundTrigger;
307 public event StartLure OnStartLure; 307 public event StartLure OnStartLure;
308 public event TeleportLureRequest OnTeleportLureRequest; 308 public event TeleportLureRequest OnTeleportLureRequest;
309 public event NetworkStats OnNetworkStatsUpdate; 309 public event NetworkStats OnNetworkStatsUpdate;
310 public event ClassifiedInfoRequest OnClassifiedInfoRequest; 310 public event ClassifiedInfoRequest OnClassifiedInfoRequest;
311 public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; 311 public event ClassifiedInfoUpdate OnClassifiedInfoUpdate;
312 public event ClassifiedDelete OnClassifiedDelete; 312 public event ClassifiedDelete OnClassifiedDelete;
313 public event ClassifiedDelete OnClassifiedGodDelete; 313 public event ClassifiedDelete OnClassifiedGodDelete;
314 public event EventNotificationAddRequest OnEventNotificationAddRequest; 314 public event EventNotificationAddRequest OnEventNotificationAddRequest;
315 public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; 315 public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest;
316 public event EventGodDelete OnEventGodDelete; 316 public event EventGodDelete OnEventGodDelete;
317 public event ParcelDwellRequest OnParcelDwellRequest; 317 public event ParcelDwellRequest OnParcelDwellRequest;
318 public event UserInfoRequest OnUserInfoRequest; 318 public event UserInfoRequest OnUserInfoRequest;
319 public event UpdateUserInfo OnUpdateUserInfo; 319 public event UpdateUserInfo OnUpdateUserInfo;
320 320
321 public void SetDebugPacketLevel(int newDebug) 321 public void SetDebugPacketLevel(int newDebug)
322 { 322 {
323 debugLevel = newDebug; 323 debugLevel = newDebug;
324 } 324 }
325 325
326 public void InPacket(object NewPack) 326 public void InPacket(object NewPack)
327 { 327 {
328 //throw new System.NotImplementedException(); 328 //throw new System.NotImplementedException();
329 } 329 }
330 330
331 public void ProcessInPacket(Packet NewPack) 331 public void ProcessInPacket(Packet NewPack)
332 { 332 {
333 //throw new System.NotImplementedException(); 333 //throw new System.NotImplementedException();
334 } 334 }
335 335
336 public void Close(bool ShutdownCircuit) 336 public void Close(bool ShutdownCircuit)
337 { 337 {
338 m_log.Info("[MXP ClientStack] Close Called with SC=" + ShutdownCircuit); 338 m_log.Info("[MXP ClientStack] Close Called with SC=" + ShutdownCircuit);
339 339
340 // Tell the client to go 340 // Tell the client to go
341 SendLogoutPacket(); 341 SendLogoutPacket();
342 342
343 // Let MXPPacketServer clean it up 343 // Let MXPPacketServer clean it up
344 if (Session.SessionState != SessionState.Disconnected) 344 if (Session.SessionState != SessionState.Disconnected)
345 { 345 {
346 Session.SetStateDisconnected(); 346 Session.SetStateDisconnected();
347 } 347 }
348 348
349 // Handle OpenSim cleanup 349 // Handle OpenSim cleanup
350 if (ShutdownCircuit) 350 if (ShutdownCircuit)
351 { 351 {
352 if (OnConnectionClosed != null) 352 if (OnConnectionClosed != null)
353 OnConnectionClosed(this); 353 OnConnectionClosed(this);
354 } 354 }
355 else 355 else
356 { 356 {
357 Scene.RemoveClient(AgentId); 357 Scene.RemoveClient(AgentId);
358 } 358 }
359 } 359 }
360 360
361 public void Kick(string message) 361 public void Kick(string message)
362 { 362 {
363 Close(false); 363 Close(false);
364 } 364 }
365 365
366 public void Start() 366 public void Start()
367 { 367 {
368 // We dont do this 368 // We dont do this
369 } 369 }
370 370
371 public void Stop() 371 public void Stop()
372 { 372 {
373 // Nor this 373 // Nor this
374 } 374 }
375 375
376 public void SendWearables(AvatarWearable[] wearables, int serial) 376 public void SendWearables(AvatarWearable[] wearables, int serial)
377 { 377 {
378 // Need to translate to MXP somehow 378 // Need to translate to MXP somehow
379 } 379 }
380 380
381 public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) 381 public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry)
382 { 382 {
383 // Need to translate to MXP somehow 383 // Need to translate to MXP somehow
384 } 384 }
385 385
386 public void SendStartPingCheck(byte seq) 386 public void SendStartPingCheck(byte seq)
387 { 387 {
388 // Need to translate to MXP somehow 388 // Need to translate to MXP somehow
389 } 389 }
390 390
391 public void SendKillObject(ulong regionHandle, uint localID) 391 public void SendKillObject(ulong regionHandle, uint localID)
392 { 392 {
393 DisappearanceEventMessage de = new DisappearanceEventMessage(); 393 DisappearanceEventMessage de = new DisappearanceEventMessage();
394 de.ObjectIndex = localID; 394 de.ObjectIndex = localID;
395 395
396 Session.Send(de); 396 Session.Send(de);
397 } 397 }
398 398
399 public void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs) 399 public void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs)
400 { 400 {
401 // Need to translate to MXP somehow 401 // Need to translate to MXP somehow
402 } 402 }
403 403
404 public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) 404 public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args)
405 { 405 {
406 // Need to translate to MXP somehow 406 // Need to translate to MXP somehow
407 } 407 }
408 408
409 public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible) 409 public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible)
410 { 410 {
411 ActionEventMessage chatActionEvent = new ActionEventMessage(); 411 ActionEventMessage chatActionEvent = new ActionEventMessage();
412 chatActionEvent.ActionFragment.ActionName = "Chat"; 412 chatActionEvent.ActionFragment.ActionName = "Chat";
413 chatActionEvent.ActionFragment.SourceObjectId = fromAgentID.Guid; 413 chatActionEvent.ActionFragment.SourceObjectId = fromAgentID.Guid;
414 chatActionEvent.ActionFragment.ObservationRadius = 180.0f; 414 chatActionEvent.ActionFragment.ObservationRadius = 180.0f;
415 chatActionEvent.ActionFragment.ActionPayloadDialect = "TEXT"; 415 chatActionEvent.ActionFragment.ActionPayloadDialect = "TEXT";
416 chatActionEvent.SetPayloadData(Encoding.UTF8.GetBytes(message)); 416 chatActionEvent.SetPayloadData(Encoding.UTF8.GetBytes(message));
417 chatActionEvent.ActionFragment.ActionPayloadLength = (uint)chatActionEvent.GetPayloadData().Length; 417 chatActionEvent.ActionFragment.ActionPayloadLength = (uint)chatActionEvent.GetPayloadData().Length;
418 418
419 Session.Send(chatActionEvent); 419 Session.Send(chatActionEvent);
420 } 420 }
421 421
422 public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp) 422 public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp)
423 { 423 {
424 // Need to translate to MXP somehow 424 // Need to translate to MXP somehow
425 } 425 }
426 426
427 public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp, UUID transactionID, bool fromGroup, byte[] binaryBucket) 427 public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp, UUID transactionID, bool fromGroup, byte[] binaryBucket)
428 { 428 {
429 // Need to translate to MXP somehow 429 // Need to translate to MXP somehow
430 } 430 }
431 431
432 public void SendGenericMessage(string method, List<string> message) 432 public void SendGenericMessage(string method, List<string> message)
433 { 433 {
434 // Need to translate to MXP somehow 434 // Need to translate to MXP somehow
435 } 435 }
436 436
437 public void SendLayerData(float[] map) 437 public void SendLayerData(float[] map)
438 { 438 {
439 // Need to translate to MXP somehow 439 // Need to translate to MXP somehow
440 } 440 }
441 441
442 public void SendLayerData(int px, int py, float[] map) 442 public void SendLayerData(int px, int py, float[] map)
443 { 443 {
444 // Need to translate to MXP somehow 444 // Need to translate to MXP somehow
445 } 445 }
446 446
447 public void SendWindData(Vector2[] windSpeeds) 447 public void SendWindData(Vector2[] windSpeeds)
448 { 448 {
449 // Need to translate to MXP somehow 449 // Need to translate to MXP somehow
450 } 450 }
451 451
452 public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) 452 public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look)
453 { 453 {
454 //throw new System.NotImplementedException(); 454 //throw new System.NotImplementedException();
455 } 455 }
456 456
457 public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint) 457 public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint)
458 { 458 {
459 //throw new System.NotImplementedException(); 459 //throw new System.NotImplementedException();
460 } 460 }
461 461
462 public AgentCircuitData RequestClientInfo() 462 public AgentCircuitData RequestClientInfo()
463 { 463 {
464 AgentCircuitData clientinfo = new AgentCircuitData(); 464 AgentCircuitData clientinfo = new AgentCircuitData();
465 clientinfo.AgentID = AgentId; 465 clientinfo.AgentID = AgentId;
466 clientinfo.Appearance = new AvatarAppearance(); 466 clientinfo.Appearance = new AvatarAppearance();
467 clientinfo.BaseFolder = UUID.Zero; 467 clientinfo.BaseFolder = UUID.Zero;
468 clientinfo.CapsPath = ""; 468 clientinfo.CapsPath = "";
469 clientinfo.child = false; 469 clientinfo.child = false;
470 clientinfo.ChildrenCapSeeds = new Dictionary<ulong, string>(); 470 clientinfo.ChildrenCapSeeds = new Dictionary<ulong, string>();
471 clientinfo.circuitcode = CircuitCode; 471 clientinfo.circuitcode = CircuitCode;
472 clientinfo.firstname = FirstName; 472 clientinfo.firstname = FirstName;
473 clientinfo.InventoryFolder = UUID.Zero; 473 clientinfo.InventoryFolder = UUID.Zero;
474 clientinfo.lastname = LastName; 474 clientinfo.lastname = LastName;
475 clientinfo.SecureSessionID = SecureSessionId; 475 clientinfo.SecureSessionID = SecureSessionId;
476 clientinfo.SessionID = SessionId; 476 clientinfo.SessionID = SessionId;
477 clientinfo.startpos = StartPos; 477 clientinfo.startpos = StartPos;
478 478
479 return clientinfo; 479 return clientinfo;
480 } 480 }
481 481
482 public void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL) 482 public void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL)
483 { 483 {
484 // TODO: We'll want to get this one working. 484 // TODO: We'll want to get this one working.
485 // Need to translate to MXP somehow 485 // Need to translate to MXP somehow
486 } 486 }
487 487
488 public void SendMapBlock(List<MapBlockData> mapBlocks, uint flag) 488 public void SendMapBlock(List<MapBlockData> mapBlocks, uint flag)
489 { 489 {
490 // Need to translate to MXP somehow 490 // Need to translate to MXP somehow
491 } 491 }
492 492
493 public void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags) 493 public void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags)
494 { 494 {
495 //throw new System.NotImplementedException(); 495 //throw new System.NotImplementedException();
496 } 496 }
497 497
498 public void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL) 498 public void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL)
499 { 499 {
500 // Need to translate to MXP somehow 500 // Need to translate to MXP somehow
501 } 501 }
502 502
503 public void SendTeleportFailed(string reason) 503 public void SendTeleportFailed(string reason)
504 { 504 {
505 // Need to translate to MXP somehow 505 // Need to translate to MXP somehow
506 } 506 }
507 507
508 public void SendTeleportLocationStart() 508 public void SendTeleportLocationStart()
509 { 509 {
510 // Need to translate to MXP somehow 510 // Need to translate to MXP somehow
511 } 511 }
512 512
513 public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) 513 public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance)
514 { 514 {
515 // Need to translate to MXP somehow 515 // Need to translate to MXP somehow
516 } 516 }
517 517
518 public void SendPayPrice(UUID objectID, int[] payPrice) 518 public void SendPayPrice(UUID objectID, int[] payPrice)
519 { 519 {
520 // Need to translate to MXP somehow 520 // Need to translate to MXP somehow
521 } 521 }
522 522
523 public void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID, uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation) 523 public void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID, uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation)
524 { 524 {
525 // TODO: This needs handling - to display other avatars 525 // TODO: This needs handling - to display other avatars
526 } 526 }
527 527
528 public void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Vector3 velocity, Quaternion rotation) 528 public void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Vector3 velocity, Quaternion rotation)
529 { 529 {
530 // TODO: This probably needs handling - update other avatar positions 530 // TODO: This probably needs handling - update other avatar positions
531 } 531 }
532 532
533 public void SendCoarseLocationUpdate(List<Vector3> CoarseLocations) 533 public void SendCoarseLocationUpdate(List<Vector3> CoarseLocations)
534 { 534 {
535 // Minimap function, not used. 535 // Minimap function, not used.
536 } 536 }
537 537
538 public void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID) 538 public void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID)
539 { 539 {
540 // Need to translate to MXP somehow 540 // Need to translate to MXP somehow
541 } 541 }
542 542
543 public void SetChildAgentThrottle(byte[] throttle) 543 public void SetChildAgentThrottle(byte[] throttle)
544 { 544 {
545 // Need to translate to MXP somehow 545 // Need to translate to MXP somehow
546 } 546 }
547 547
548 public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material, byte[] textureanim, bool attachment, uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius) 548 public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material, byte[] textureanim, bool attachment, uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius)
549 { 549 {
550 MXPSendPrimitive(localID, ownerID, acc, rvel, primShape, pos, objectID, vel, rotation); 550 MXPSendPrimitive(localID, ownerID, acc, rvel, primShape, pos, objectID, vel, rotation);
551 } 551 }
552 552
553 private void MXPSendPrimitive(uint localID, UUID ownerID, Vector3 acc, Vector3 rvel, PrimitiveBaseShape primShape, Vector3 pos, UUID objectID, Vector3 vel, Quaternion rotation) 553 private void MXPSendPrimitive(uint localID, UUID ownerID, Vector3 acc, Vector3 rvel, PrimitiveBaseShape primShape, Vector3 pos, UUID objectID, Vector3 vel, Quaternion rotation)
554 { 554 {
555 PerceptionEventMessage pe = new PerceptionEventMessage(); 555 PerceptionEventMessage pe = new PerceptionEventMessage();
556 556
557 pe.ObjectFragment.ObjectIndex = localID; 557 pe.ObjectFragment.ObjectIndex = localID;
558 pe.ObjectFragment.ObjectName = "Object"; 558 pe.ObjectFragment.ObjectName = "Object";
559 pe.ObjectFragment.OwnerId = ownerID.Guid; 559 pe.ObjectFragment.OwnerId = ownerID.Guid;
560 pe.ObjectFragment.TypeId = Guid.Empty; 560 pe.ObjectFragment.TypeId = Guid.Empty;
561 561
562 pe.ObjectFragment.Acceleration = new[] { acc.X, acc.Y, acc.Z }; 562 pe.ObjectFragment.Acceleration = new[] { acc.X, acc.Y, acc.Z };
563 pe.ObjectFragment.AngularAcceleration = new float[4]; 563 pe.ObjectFragment.AngularAcceleration = new float[4];
564 pe.ObjectFragment.AngularVelocity = new[] { rvel.X, rvel.Y, rvel.Z, 0.0f }; 564 pe.ObjectFragment.AngularVelocity = new[] { rvel.X, rvel.Y, rvel.Z, 0.0f };
565 pe.ObjectFragment.BoundingSphereRadius = primShape.Scale.Length()/2.0f; 565 pe.ObjectFragment.BoundingSphereRadius = primShape.Scale.Length()/2.0f;
566 pe.ObjectFragment.Location = new[] { pos.X, pos.Y, pos.Z }; 566 pe.ObjectFragment.Location = new[] { pos.X, pos.Y, pos.Z };
567 pe.ObjectFragment.Mass = 1.0f; 567 pe.ObjectFragment.Mass = 1.0f;
568 pe.ObjectFragment.ObjectId = objectID.Guid; 568 pe.ObjectFragment.ObjectId = objectID.Guid;
569 pe.ObjectFragment.Orientation = new[] {rotation.X, rotation.Y, rotation.Z, rotation.W}; 569 pe.ObjectFragment.Orientation = new[] {rotation.X, rotation.Y, rotation.Z, rotation.W};
570 pe.ObjectFragment.ParentObjectId = Guid.Empty; 570 pe.ObjectFragment.ParentObjectId = Guid.Empty;
571 pe.ObjectFragment.Velocity = new[] { vel.X, vel.Y, vel.Z }; 571 pe.ObjectFragment.Velocity = new[] { vel.X, vel.Y, vel.Z };
572 572
573 pe.ObjectFragment.StatePayloadDialect = ""; 573 pe.ObjectFragment.StatePayloadDialect = "";
574 pe.ObjectFragment.StatePayloadLength = 0; 574 pe.ObjectFragment.StatePayloadLength = 0;
575 pe.ObjectFragment.SetStatePayloadData(new byte[0]); 575 pe.ObjectFragment.SetStatePayloadData(new byte[0]);
576 576
577 Session.Send(pe); 577 Session.Send(pe);
578 } 578 }
579 579
580 public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material) 580 public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material)
581 { 581 {
582 MXPSendPrimitive(localID, ownerID, acc, rvel, primShape, pos, objectID, vel, rotation); 582 MXPSendPrimitive(localID, ownerID, acc, rvel, primShape, pos, objectID, vel, rotation);
583 } 583 }
584 584
585 public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, UUID AssetId, UUID owner, int attachPoint) 585 public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, UUID AssetId, UUID owner, int attachPoint)
586 { 586 {
587 MovementEventMessage me = new MovementEventMessage(); 587 MovementEventMessage me = new MovementEventMessage();
588 me.ObjectIndex = localID; 588 me.ObjectIndex = localID;
589 me.Location = new[] {position.X, position.Y, position.Z}; 589 me.Location = new[] {position.X, position.Y, position.Z};
590 me.Orientation = new[] {rotation.X, rotation.Y, rotation.Z, rotation.W}; 590 me.Orientation = new[] {rotation.X, rotation.Y, rotation.Z, rotation.W};
591 591
592 Session.Send(me); 592 Session.Send(me);
593 } 593 }
594 594
595 public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, bool fetchFolders, bool fetchItems) 595 public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, bool fetchFolders, bool fetchItems)
596 { 596 {
597 // Need to translate to MXP somehow 597 // Need to translate to MXP somehow
598 } 598 }
599 599
600 public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item) 600 public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item)
601 { 601 {
602 // Need to translate to MXP somehow 602 // Need to translate to MXP somehow
603 } 603 }
604 604
605 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId) 605 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId)
606 { 606 {
607 // Need to translate to MXP somehow 607 // Need to translate to MXP somehow
608 } 608 }
609 609
610 public void SendRemoveInventoryItem(UUID itemID) 610 public void SendRemoveInventoryItem(UUID itemID)
611 { 611 {
612 // Need to translate to MXP somehow 612 // Need to translate to MXP somehow
613 } 613 }
614 614
615 public void SendTakeControls(int controls, bool passToAgent, bool TakeControls) 615 public void SendTakeControls(int controls, bool passToAgent, bool TakeControls)
616 { 616 {
617 // Need to translate to MXP somehow 617 // Need to translate to MXP somehow
618 } 618 }
619 619
620 public void SendTaskInventory(UUID taskID, short serial, byte[] fileName) 620 public void SendTaskInventory(UUID taskID, short serial, byte[] fileName)
621 { 621 {
622 // Need to translate to MXP somehow 622 // Need to translate to MXP somehow
623 } 623 }
624 624
625 public void SendBulkUpdateInventory(InventoryNodeBase node) 625 public void SendBulkUpdateInventory(InventoryNodeBase node)
626 { 626 {
627 // Need to translate to MXP somehow 627 // Need to translate to MXP somehow
628 } 628 }
629 629
630 public void SendXferPacket(ulong xferID, uint packet, byte[] data) 630 public void SendXferPacket(ulong xferID, uint packet, byte[] data)
631 { 631 {
632 // SL Specific, Ignore. (Remove from IClient) 632 // SL Specific, Ignore. (Remove from IClient)
633 } 633 }
634 634
635 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) 635 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)
636 { 636 {
637 // SL Specific, Ignore. (Remove from IClient) 637 // SL Specific, Ignore. (Remove from IClient)
638 } 638 }
639 639
640 public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data) 640 public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data)
641 { 641 {
642 // Need to translate to MXP somehow 642 // Need to translate to MXP somehow
643 } 643 }
644 644
645 public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) 645 public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle)
646 { 646 {
647 // Need to translate to MXP somehow 647 // Need to translate to MXP somehow
648 // TODO: This may need doing - involves displaying the users avatar name 648 // TODO: This may need doing - involves displaying the users avatar name
649 } 649 }
650 650
651 public void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID) 651 public void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID)
652 { 652 {
653 // Need to translate to MXP somehow 653 // Need to translate to MXP somehow
654 } 654 }
655 655
656 public void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags) 656 public void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags)
657 { 657 {
658 // Need to translate to MXP somehow 658 // Need to translate to MXP somehow
659 } 659 }
660 660
661 public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain) 661 public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain)
662 { 662 {
663 // Need to translate to MXP somehow 663 // Need to translate to MXP somehow
664 } 664 }
665 665
666 public void SendAttachedSoundGainChange(UUID objectID, float gain) 666 public void SendAttachedSoundGainChange(UUID objectID, float gain)
667 { 667 {
668 // Need to translate to MXP somehow 668 // Need to translate to MXP somehow
669 } 669 }
670 670
671 public void SendNameReply(UUID profileId, string firstname, string lastname) 671 public void SendNameReply(UUID profileId, string firstname, string lastname)
672 { 672 {
673 // SL Specific 673 // SL Specific
674 } 674 }
675 675
676 public void SendAlertMessage(string message) 676 public void SendAlertMessage(string message)
677 { 677 {
678 SendChatMessage(message, 0, Vector3.Zero, "System", UUID.Zero, 0, 0); 678 SendChatMessage(message, 0, Vector3.Zero, "System", UUID.Zero, 0, 0);
679 } 679 }
680 680
681 public void SendAgentAlertMessage(string message, bool modal) 681 public void SendAgentAlertMessage(string message, bool modal)
682 { 682 {
683 SendChatMessage(message, 0, Vector3.Zero, "System" + (modal ? " Notice" : ""), UUID.Zero, 0, 0); 683 SendChatMessage(message, 0, Vector3.Zero, "System" + (modal ? " Notice" : ""), UUID.Zero, 0, 0);
684 } 684 }
685 685
686 public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url) 686 public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url)
687 { 687 {
688 // TODO: Probably can do this better 688 // TODO: Probably can do this better
689 SendChatMessage("Please visit: " + url, 0, Vector3.Zero, objectname, UUID.Zero, 0, 0); 689 SendChatMessage("Please visit: " + url, 0, Vector3.Zero, objectname, UUID.Zero, 0, 0);
690 } 690 }
691 691
692 public void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels) 692 public void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels)
693 { 693 {
694 // TODO: Probably can do this better 694 // TODO: Probably can do this better
695 SendChatMessage("Dialog: " + msg, 0, Vector3.Zero, objectname, UUID.Zero, 0, 0); 695 SendChatMessage("Dialog: " + msg, 0, Vector3.Zero, objectname, UUID.Zero, 0, 0);
696 } 696 }
697 697
698 public bool AddMoney(int debit) 698 public bool AddMoney(int debit)
699 { 699 {
700 SendChatMessage("You were paid: " + debit, 0, Vector3.Zero, "System", UUID.Zero, 0, 0); 700 SendChatMessage("You were paid: " + debit, 0, Vector3.Zero, "System", UUID.Zero, 0, 0);
701 return true; 701 return true;
702 } 702 }
703 703
704 public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition) 704 public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition)
705 { 705 {
706 // Need to translate to MXP somehow 706 // Need to translate to MXP somehow
707 // Send a light object? 707 // Send a light object?
708 } 708 }
709 709
710 public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks) 710 public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks)
711 { 711 {
712 // Need to translate to MXP somehow 712 // Need to translate to MXP somehow
713 } 713 }
714 714
715 public void SendViewerTime(int phase) 715 public void SendViewerTime(int phase)
716 { 716 {
717 // Need to translate to MXP somehow 717 // Need to translate to MXP somehow
718 } 718 }
719 719
720 public UUID GetDefaultAnimation(string name) 720 public UUID GetDefaultAnimation(string name)
721 { 721 {
722 return UUID.Zero; 722 return UUID.Zero;
723 } 723 }
724 724
725 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] charterMember, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID) 725 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] charterMember, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID)
726 { 726 {
727 // Need to translate to MXP somehow 727 // Need to translate to MXP somehow
728 } 728 }
729 729
730 public void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question) 730 public void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question)
731 { 731 {
732 // Need to translate to MXP somehow 732 // Need to translate to MXP somehow
733 } 733 }
734 734
735 public void SendHealth(float health) 735 public void SendHealth(float health)
736 { 736 {
737 // Need to translate to MXP somehow 737 // Need to translate to MXP somehow
738 } 738 }
739 739
740 public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) 740 public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID)
741 { 741 {
742 // Need to translate to MXP somehow 742 // Need to translate to MXP somehow
743 } 743 }
744 744
745 public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID) 745 public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID)
746 { 746 {
747 // Need to translate to MXP somehow 747 // Need to translate to MXP somehow
748 } 748 }
749 749
750 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) 750 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args)
751 { 751 {
752 // Need to translate to MXP somehow 752 // Need to translate to MXP somehow
753 } 753 }
754 754
755 public void SendEstateCovenantInformation(UUID covenant) 755 public void SendEstateCovenantInformation(UUID covenant)
756 { 756 {
757 // Need to translate to MXP somehow 757 // Need to translate to MXP somehow
758 } 758 }
759 759
760 public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner) 760 public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner)
761 { 761 {
762 // Need to translate to MXP somehow 762 // Need to translate to MXP somehow
763 } 763 }
764 764
765 public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) 765 public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
766 { 766 {
767 // Need to translate to MXP somehow 767 // Need to translate to MXP somehow
768 } 768 }
769 769
770 public void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID) 770 public void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID)
771 { 771 {
772 // Need to translate to MXP somehow 772 // Need to translate to MXP somehow
773 } 773 }
774 774
775 public void SendForceClientSelectObjects(List<uint> objectIDs) 775 public void SendForceClientSelectObjects(List<uint> objectIDs)
776 { 776 {
777 // Need to translate to MXP somehow 777 // Need to translate to MXP somehow
778 } 778 }
779 779
780 public void SendLandObjectOwners(Dictionary<UUID, int> ownersAndCount) 780 public void SendLandObjectOwners(Dictionary<UUID, int> ownersAndCount)
781 { 781 {
782 // Need to translate to MXP somehow 782 // Need to translate to MXP somehow
783 } 783 }
784 784
785 public void SendLandParcelOverlay(byte[] data, int sequence_id) 785 public void SendLandParcelOverlay(byte[] data, int sequence_id)
786 { 786 {
787 // Need to translate to MXP somehow 787 // Need to translate to MXP somehow
788 } 788 }
789 789
790 public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time) 790 public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time)
791 { 791 {
792 // Need to translate to MXP somehow 792 // Need to translate to MXP somehow
793 } 793 }
794 794
795 public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop) 795 public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop)
796 { 796 {
797 // Need to translate to MXP somehow 797 // Need to translate to MXP somehow
798 } 798 }
799 799
800 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) 800 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID)
801 { 801 {
802 // Need to translate to MXP somehow 802 // Need to translate to MXP somehow
803 } 803 }
804 804
805 public void SendConfirmXfer(ulong xferID, uint PacketID) 805 public void SendConfirmXfer(ulong xferID, uint PacketID)
806 { 806 {
807 // Need to translate to MXP somehow 807 // Need to translate to MXP somehow
808 } 808 }
809 809
810 public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName) 810 public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName)
811 { 811 {
812 // Need to translate to MXP somehow 812 // Need to translate to MXP somehow
813 } 813 }
814 814
815 public void SendInitiateDownload(string simFileName, string clientFileName) 815 public void SendInitiateDownload(string simFileName, string clientFileName)
816 { 816 {
817 // Need to translate to MXP somehow 817 // Need to translate to MXP somehow
818 } 818 }
819 819
820 public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) 820 public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
821 { 821 {
822 // Need to translate to MXP somehow 822 // Need to translate to MXP somehow
823 } 823 }
824 824
825 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData) 825 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
826 { 826 {
827 // Need to translate to MXP somehow 827 // Need to translate to MXP somehow
828 } 828 }
829 829
830 public void SendImageNotFound(UUID imageid) 830 public void SendImageNotFound(UUID imageid)
831 { 831 {
832 // Need to translate to MXP somehow 832 // Need to translate to MXP somehow
833 } 833 }
834 834
835 public void SendShutdownConnectionNotice() 835 public void SendShutdownConnectionNotice()
836 { 836 {
837 // Need to translate to MXP somehow 837 // Need to translate to MXP somehow
838 } 838 }
839 839
840 public void SendSimStats(SimStats stats) 840 public void SendSimStats(SimStats stats)
841 { 841 {
842 // Need to translate to MXP somehow 842 // Need to translate to MXP somehow
843 } 843 }
844 844
845 public void SendObjectPropertiesFamilyData(uint RequestFlags, UUID ObjectUUID, UUID OwnerID, UUID GroupID, uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category, UUID LastOwnerID, string ObjectName, string Description) 845 public void SendObjectPropertiesFamilyData(uint RequestFlags, UUID ObjectUUID, UUID OwnerID, UUID GroupID, uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category, UUID LastOwnerID, string ObjectName, string Description)
846 { 846 {
847 //throw new System.NotImplementedException(); 847 //throw new System.NotImplementedException();
848 } 848 }
849 849
850 public void SendObjectPropertiesReply(UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID, UUID FromTaskUUID, UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID, UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, uint BaseMask, byte saleType, int salePrice) 850 public void SendObjectPropertiesReply(UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID, UUID FromTaskUUID, UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID, UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, uint BaseMask, byte saleType, int salePrice)
851 { 851 {
852 //throw new System.NotImplementedException(); 852 //throw new System.NotImplementedException();
853 } 853 }
854 854
855 public void SendAgentOffline(UUID[] agentIDs) 855 public void SendAgentOffline(UUID[] agentIDs)
856 { 856 {
857 // Need to translate to MXP somehow (Friends List) 857 // Need to translate to MXP somehow (Friends List)
858 } 858 }
859 859
860 public void SendAgentOnline(UUID[] agentIDs) 860 public void SendAgentOnline(UUID[] agentIDs)
861 { 861 {
862 // Need to translate to MXP somehow (Friends List) 862 // Need to translate to MXP somehow (Friends List)
863 } 863 }
864 864
865 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) 865 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook)
866 { 866 {
867 // Need to translate to MXP somehow 867 // Need to translate to MXP somehow
868 } 868 }
869 869
870 public void SendAdminResponse(UUID Token, uint AdminLevel) 870 public void SendAdminResponse(UUID Token, uint AdminLevel)
871 { 871 {
872 // Need to translate to MXP somehow 872 // Need to translate to MXP somehow
873 } 873 }
874 874
875 public void SendGroupMembership(GroupMembershipData[] GroupMembership) 875 public void SendGroupMembership(GroupMembershipData[] GroupMembership)
876 { 876 {
877 // Need to translate to MXP somehow 877 // Need to translate to MXP somehow
878 } 878 }
879 879
880 public void SendGroupNameReply(UUID groupLLUID, string GroupName) 880 public void SendGroupNameReply(UUID groupLLUID, string GroupName)
881 { 881 {
882 // Need to translate to MXP somehow 882 // Need to translate to MXP somehow
883 } 883 }
884 884
885 public void SendJoinGroupReply(UUID groupID, bool success) 885 public void SendJoinGroupReply(UUID groupID, bool success)
886 { 886 {
887 // Need to translate to MXP somehow 887 // Need to translate to MXP somehow
888 } 888 }
889 889
890 public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success) 890 public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success)
891 { 891 {
892 // Need to translate to MXP somehow 892 // Need to translate to MXP somehow
893 } 893 }
894 894
895 public void SendLeaveGroupReply(UUID groupID, bool success) 895 public void SendLeaveGroupReply(UUID groupID, bool success)
896 { 896 {
897 // Need to translate to MXP somehow 897 // Need to translate to MXP somehow
898 } 898 }
899 899
900 public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia) 900 public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia)
901 { 901 {
902 // Need to translate to MXP somehow 902 // Need to translate to MXP somehow
903 } 903 }
904 904
905 public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running) 905 public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running)
906 { 906 {
907 // Need to translate to MXP somehow 907 // Need to translate to MXP somehow
908 } 908 }
909 909
910 public void SendAsset(AssetRequestToClient req) 910 public void SendAsset(AssetRequestToClient req)
911 { 911 {
912 // Need to translate to MXP somehow 912 // Need to translate to MXP somehow
913 } 913 }
914 914
915 public void SendTexture(AssetBase TextureAsset) 915 public void SendTexture(AssetBase TextureAsset)
916 { 916 {
917 // Need to translate to MXP somehow 917 // Need to translate to MXP somehow
918 } 918 }
919 919
920 public byte[] GetThrottlesPacked(float multiplier) 920 public byte[] GetThrottlesPacked(float multiplier)
921 { 921 {
922 // LL Specific, get out of IClientAPI 922 // LL Specific, get out of IClientAPI
923 923
924 const int singlefloat = 4; 924 const int singlefloat = 4;
925 float tResend = multiplier; 925 float tResend = multiplier;
926 float tLand = multiplier; 926 float tLand = multiplier;
927 float tWind = multiplier; 927 float tWind = multiplier;
928 float tCloud = multiplier; 928 float tCloud = multiplier;
929 float tTask = multiplier; 929 float tTask = multiplier;
930 float tTexture = multiplier; 930 float tTexture = multiplier;
931 float tAsset = multiplier; 931 float tAsset = multiplier;
932 932
933 byte[] throttles = new byte[singlefloat * 7]; 933 byte[] throttles = new byte[singlefloat * 7];
934 int i = 0; 934 int i = 0;
935 Buffer.BlockCopy(BitConverter.GetBytes(tResend), 0, throttles, singlefloat * i, singlefloat); 935 Buffer.BlockCopy(BitConverter.GetBytes(tResend), 0, throttles, singlefloat * i, singlefloat);
936 i++; 936 i++;
937 Buffer.BlockCopy(BitConverter.GetBytes(tLand), 0, throttles, singlefloat * i, singlefloat); 937 Buffer.BlockCopy(BitConverter.GetBytes(tLand), 0, throttles, singlefloat * i, singlefloat);
938 i++; 938 i++;
939 Buffer.BlockCopy(BitConverter.GetBytes(tWind), 0, throttles, singlefloat * i, singlefloat); 939 Buffer.BlockCopy(BitConverter.GetBytes(tWind), 0, throttles, singlefloat * i, singlefloat);
940 i++; 940 i++;
941 Buffer.BlockCopy(BitConverter.GetBytes(tCloud), 0, throttles, singlefloat * i, singlefloat); 941 Buffer.BlockCopy(BitConverter.GetBytes(tCloud), 0, throttles, singlefloat * i, singlefloat);
942 i++; 942 i++;
943 Buffer.BlockCopy(BitConverter.GetBytes(tTask), 0, throttles, singlefloat * i, singlefloat); 943 Buffer.BlockCopy(BitConverter.GetBytes(tTask), 0, throttles, singlefloat * i, singlefloat);
944 i++; 944 i++;
945 Buffer.BlockCopy(BitConverter.GetBytes(tTexture), 0, throttles, singlefloat * i, singlefloat); 945 Buffer.BlockCopy(BitConverter.GetBytes(tTexture), 0, throttles, singlefloat * i, singlefloat);
946 i++; 946 i++;
947 Buffer.BlockCopy(BitConverter.GetBytes(tAsset), 0, throttles, singlefloat * i, singlefloat); 947 Buffer.BlockCopy(BitConverter.GetBytes(tAsset), 0, throttles, singlefloat * i, singlefloat);
948 948
949 return throttles; 949 return throttles;
950 } 950 }
951 951
952 public event ViewerEffectEventHandler OnViewerEffect; 952 public event ViewerEffectEventHandler OnViewerEffect;
953 public event Action<IClientAPI> OnLogout; 953 public event Action<IClientAPI> OnLogout;
954 public event Action<IClientAPI> OnConnectionClosed; 954 public event Action<IClientAPI> OnConnectionClosed;
955 955
956 956
957 public void SendBlueBoxMessage(UUID FromAvatarID, string FromAvatarName, string Message) 957 public void SendBlueBoxMessage(UUID FromAvatarID, string FromAvatarName, string Message)
958 { 958 {
959 SendChatMessage(Message, 0, Vector3.Zero, FromAvatarName, UUID.Zero, 0, 0); 959 SendChatMessage(Message, 0, Vector3.Zero, FromAvatarName, UUID.Zero, 0, 0);
960 } 960 }
961 961
962 public void SendLogoutPacket() 962 public void SendLogoutPacket()
963 { 963 {
964 LeaveRequestMessage lrm = new LeaveRequestMessage(); 964 LeaveRequestMessage lrm = new LeaveRequestMessage();
965 Session.Send(lrm); 965 Session.Send(lrm);
966 } 966 }
967 967
968 public ClientInfo GetClientInfo() 968 public ClientInfo GetClientInfo()
969 { 969 {
970 return null; 970 return null;
971 //throw new System.NotImplementedException(); 971 //throw new System.NotImplementedException();
972 } 972 }
973 973
974 public void SetClientInfo(ClientInfo info) 974 public void SetClientInfo(ClientInfo info)
975 { 975 {
976 //throw new System.NotImplementedException(); 976 //throw new System.NotImplementedException();
977 } 977 }
978 978
979 public void SetClientOption(string option, string value) 979 public void SetClientOption(string option, string value)
980 { 980 {
981 // Need to translate to MXP somehow 981 // Need to translate to MXP somehow
982 } 982 }
983 983
984 public string GetClientOption(string option) 984 public string GetClientOption(string option)
985 { 985 {
986 // Need to translate to MXP somehow 986 // Need to translate to MXP somehow
987 return ""; 987 return "";
988 } 988 }
989 989
990 public void Terminate() 990 public void Terminate()
991 { 991 {
992 Close(false); 992 Close(false);
993 } 993 }
994 994
995 public void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters) 995 public void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters)
996 { 996 {
997 // Need to translate to MXP somehow 997 // Need to translate to MXP somehow
998 } 998 }
999 999
1000 public void SendClearFollowCamProperties(UUID objectID) 1000 public void SendClearFollowCamProperties(UUID objectID)
1001 { 1001 {
1002 // Need to translate to MXP somehow 1002 // Need to translate to MXP somehow
1003 } 1003 }
1004 1004
1005 public void SendRegionHandle(UUID regoinID, ulong handle) 1005 public void SendRegionHandle(UUID regoinID, ulong handle)
1006 { 1006 {
1007 // Need to translate to MXP somehow 1007 // Need to translate to MXP somehow
1008 } 1008 }
1009 1009
1010 public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y) 1010 public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y)
1011 { 1011 {
1012 // Need to translate to MXP somehow 1012 // Need to translate to MXP somehow
1013 } 1013 }
1014 1014
1015 public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt) 1015 public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt)
1016 { 1016 {
1017 // Need to translate to MXP somehow 1017 // Need to translate to MXP somehow
1018 } 1018 }
1019 1019
1020 public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data) 1020 public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data)
1021 { 1021 {
1022 // Need to translate to MXP somehow 1022 // Need to translate to MXP somehow
1023 } 1023 }
1024 1024
1025 public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data) 1025 public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data)
1026 { 1026 {
1027 // Need to translate to MXP somehow 1027 // Need to translate to MXP somehow
1028 } 1028 }
1029 1029
1030 public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data) 1030 public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data)
1031 { 1031 {
1032 // Need to translate to MXP somehow 1032 // Need to translate to MXP somehow
1033 } 1033 }
1034 1034
1035 public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data) 1035 public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data)
1036 { 1036 {
1037 // Need to translate to MXP somehow 1037 // Need to translate to MXP somehow
1038 } 1038 }
1039 1039
1040 public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data) 1040 public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data)
1041 { 1041 {
1042 // Need to translate to MXP somehow 1042 // Need to translate to MXP somehow
1043 } 1043 }
1044 1044
1045 public void SendDirLandReply(UUID queryID, DirLandReplyData[] data) 1045 public void SendDirLandReply(UUID queryID, DirLandReplyData[] data)
1046 { 1046 {
1047 // Need to translate to MXP somehow 1047 // Need to translate to MXP somehow
1048 } 1048 }
1049 1049
1050 public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data) 1050 public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data)
1051 { 1051 {
1052 // Need to translate to MXP somehow 1052 // Need to translate to MXP somehow
1053 } 1053 }
1054 1054
1055 public void SendEventInfoReply(EventData info) 1055 public void SendEventInfoReply(EventData info)
1056 { 1056 {
1057 // Need to translate to MXP somehow 1057 // Need to translate to MXP somehow
1058 } 1058 }
1059 1059
1060 public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags) 1060 public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags)
1061 { 1061 {
1062 // Need to translate to MXP somehow 1062 // Need to translate to MXP somehow
1063 } 1063 }
1064 1064
1065 public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data) 1065 public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data)
1066 { 1066 {
1067 // Need to translate to MXP somehow 1067 // Need to translate to MXP somehow
1068 } 1068 }
1069 1069
1070 public void SendOfferCallingCard(UUID srcID, UUID transactionID) 1070 public void SendOfferCallingCard(UUID srcID, UUID transactionID)
1071 { 1071 {
1072 // Need to translate to MXP somehow 1072 // Need to translate to MXP somehow
1073 } 1073 }
1074 1074
1075 public void SendAcceptCallingCard(UUID transactionID) 1075 public void SendAcceptCallingCard(UUID transactionID)
1076 { 1076 {
1077 // Need to translate to MXP somehow 1077 // Need to translate to MXP somehow
1078 } 1078 }
1079 1079
1080 public void SendDeclineCallingCard(UUID transactionID) 1080 public void SendDeclineCallingCard(UUID transactionID)
1081 { 1081 {
1082 // Need to translate to MXP somehow 1082 // Need to translate to MXP somehow
1083 } 1083 }
1084 1084
1085 public void SendTerminateFriend(UUID exFriendID) 1085 public void SendTerminateFriend(UUID exFriendID)
1086 { 1086 {
1087 // Need to translate to MXP somehow 1087 // Need to translate to MXP somehow
1088 } 1088 }
1089 1089
1090 public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name) 1090 public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name)
1091 { 1091 {
1092 // Need to translate to MXP somehow 1092 // Need to translate to MXP somehow
1093 } 1093 }
1094 1094
1095 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) 1095 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)
1096 { 1096 {
1097 // Need to translate to MXP somehow 1097 // Need to translate to MXP somehow
1098 } 1098 }
1099 1099
1100 public void SendAgentDropGroup(UUID groupID) 1100 public void SendAgentDropGroup(UUID groupID)
1101 { 1101 {
1102 // Need to translate to MXP somehow 1102 // Need to translate to MXP somehow
1103 } 1103 }
1104 1104
1105 public void SendAvatarNotesReply(UUID targetID, string text) 1105 public void SendAvatarNotesReply(UUID targetID, string text)
1106 { 1106 {
1107 // Need to translate to MXP somehow 1107 // Need to translate to MXP somehow
1108 } 1108 }
1109 1109
1110 public void SendAvatarPicksReply(UUID targetID, Dictionary<UUID, string> picks) 1110 public void SendAvatarPicksReply(UUID targetID, Dictionary<UUID, string> picks)
1111 { 1111 {
1112 // Need to translate to MXP somehow 1112 // Need to translate to MXP somehow
1113 } 1113 }
1114 1114
1115 public void SendAvatarClassifiedReply(UUID targetID, Dictionary<UUID, string> classifieds) 1115 public void SendAvatarClassifiedReply(UUID targetID, Dictionary<UUID, string> classifieds)
1116 { 1116 {
1117 // Need to translate to MXP somehow 1117 // Need to translate to MXP somehow
1118 } 1118 }
1119 1119
1120 public void SendParcelDwellReply(int localID, UUID parcelID, float dwell) 1120 public void SendParcelDwellReply(int localID, UUID parcelID, float dwell)
1121 { 1121 {
1122 // Need to translate to MXP somehow 1122 // Need to translate to MXP somehow
1123 } 1123 }
1124 1124
1125 public void SendUserInfoReply(bool imViaEmail, bool visible, string email) 1125 public void SendUserInfoReply(bool imViaEmail, bool visible, string email)
1126 { 1126 {
1127 // Need to translate to MXP somehow 1127 // Need to translate to MXP somehow
1128 } 1128 }
1129 1129
1130 public void KillEndDone() 1130 public void KillEndDone()
1131 { 1131 {
1132 Stop(); 1132 Stop();
1133 } 1133 }
1134 1134
1135 public bool AddGenericPacketHandler(string MethodName, GenericMessage handler) 1135 public bool AddGenericPacketHandler(string MethodName, GenericMessage handler)
1136 { 1136 {
1137 // Need to translate to MXP somehow 1137 // Need to translate to MXP somehow
1138 return true; 1138 return true;
1139 } 1139 }
1140 1140
1141 #endregion 1141 #endregion
1142 1142
1143 #region IClientCore 1143 #region IClientCore
1144 1144
1145 public bool TryGet<T>(out T iface) 1145 public bool TryGet<T>(out T iface)
1146 { 1146 {
1147 iface = default(T); 1147 iface = default(T);
1148 return false; 1148 return false;
1149 } 1149 }
1150 1150
1151 public T Get<T>() 1151 public T Get<T>()
1152 { 1152 {
1153 return default(T); 1153 return default(T);
1154 } 1154 }
1155 1155
1156 #endregion 1156 #endregion
1157 } 1157 }
1158} 1158}
diff --git a/OpenSim/Client/MXP/MXPModule.cs b/OpenSim/Client/MXP/MXPModule.cs
index 345e4fb..f2b2f66 100644
--- a/OpenSim/Client/MXP/MXPModule.cs
+++ b/OpenSim/Client/MXP/MXPModule.cs
@@ -1,87 +1,87 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using System.Timers; 4using System.Timers;
5using MXP; 5using MXP;
6using Nini.Config; 6using Nini.Config;
7using OpenMetaverse; 7using OpenMetaverse;
8using OpenSim.Client.MXP.PacketHandler; 8using OpenSim.Client.MXP.PacketHandler;
9using OpenSim.Region.Framework.Interfaces; 9using OpenSim.Region.Framework.Interfaces;
10using OpenSim.Region.Framework.Scenes; 10using OpenSim.Region.Framework.Scenes;
11 11
12namespace OpenSim.Client.MXP 12namespace OpenSim.Client.MXP
13{ 13{
14 public class MXPModule : IRegionModule 14 public class MXPModule : IRegionModule
15 { 15 {
16 private int mxp_Port = 1253; 16 private int mxp_Port = 1253;
17 private double mxp_BubbleRadius = 181.01933598375616624661615669884; // Radius of a sphere big enough to encapsulate a 256x256 square 17 private double mxp_BubbleRadius = 181.01933598375616624661615669884; // Radius of a sphere big enough to encapsulate a 256x256 square
18 18
19 private readonly Timer ticker = new Timer(100); 19 private readonly Timer ticker = new Timer(100);
20 20
21 private int ticks; 21 private int ticks;
22 private bool shutdown = false; 22 private bool shutdown = false;
23 23
24 private IConfigSource config; 24 private IConfigSource config;
25 25
26 private readonly Dictionary<UUID,Scene> m_scenes = new Dictionary<UUID, Scene>(); 26 private readonly Dictionary<UUID,Scene> m_scenes = new Dictionary<UUID, Scene>();
27 27
28 private MXPPacketServer server; 28 private MXPPacketServer server;
29 29
30 30
31 public void Initialise(Scene scene, IConfigSource source) 31 public void Initialise(Scene scene, IConfigSource source)
32 { 32 {
33 m_scenes.Add(scene.RegionInfo.RegionID, scene); 33 m_scenes.Add(scene.RegionInfo.RegionID, scene);
34 config = source; 34 config = source;
35 } 35 }
36 36
37 public void PostInitialise() 37 public void PostInitialise()
38 { 38 {
39 if (config.Configs["MXP"] != null) 39 if (config.Configs["MXP"] != null)
40 { 40 {
41 IConfig con = config.Configs["MXP"]; 41 IConfig con = config.Configs["MXP"];
42 42
43 if(!con.GetBoolean("Enabled",false)) 43 if(!con.GetBoolean("Enabled",false))
44 return; 44 return;
45 45
46 mxp_Port = con.GetInt("Port", mxp_Port); 46 mxp_Port = con.GetInt("Port", mxp_Port);
47 47
48 48
49 server = new MXPPacketServer("http://null", mxp_Port, m_scenes); 49 server = new MXPPacketServer("http://null", mxp_Port, m_scenes);
50 50
51 ticker.AutoReset = false; 51 ticker.AutoReset = false;
52 ticker.Elapsed += ticker_Elapsed; 52 ticker.Elapsed += ticker_Elapsed;
53 53
54 ticker.Start(); 54 ticker.Start();
55 } 55 }
56 } 56 }
57 57
58 void ticker_Elapsed(object sender, ElapsedEventArgs e) 58 void ticker_Elapsed(object sender, ElapsedEventArgs e)
59 { 59 {
60 server.Process(); 60 server.Process();
61 61
62 if (!shutdown) 62 if (!shutdown)
63 ticker.Start(); 63 ticker.Start();
64 64
65 if(++ticks % 100 == 0) 65 if(++ticks % 100 == 0)
66 { 66 {
67 server.PrintDebugInformation(); 67 server.PrintDebugInformation();
68 } 68 }
69 } 69 }
70 70
71 public void Close() 71 public void Close()
72 { 72 {
73 shutdown = true; 73 shutdown = true;
74 ticker.Stop(); 74 ticker.Stop();
75 } 75 }
76 76
77 public string Name 77 public string Name
78 { 78 {
79 get { return "MXP ClientStack Module"; } 79 get { return "MXP ClientStack Module"; }
80 } 80 }
81 81
82 public bool IsSharedModule 82 public bool IsSharedModule
83 { 83 {
84 get { return true; } 84 get { return true; }
85 } 85 }
86 } 86 }
87} 87}
diff --git a/OpenSim/Client/MXP/MXPUtil.cs b/OpenSim/Client/MXP/MXPUtil.cs
index 7ca4533..674842b 100644
--- a/OpenSim/Client/MXP/MXPUtil.cs
+++ b/OpenSim/Client/MXP/MXPUtil.cs
@@ -1,15 +1,15 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using System.Text; 3using System.Text;
4using OpenMetaverse; 4using OpenMetaverse;
5 5
6namespace OpenSim.Client.MXP 6namespace OpenSim.Client.MXP
7{ 7{
8 static class MXPUtil 8 static class MXPUtil
9 { 9 {
10 public static string GenerateMXPURL(string server, int port, UUID bubbleID, Vector3 location) 10 public static string GenerateMXPURL(string server, int port, UUID bubbleID, Vector3 location)
11 { 11 {
12 return string.Format("mxp://{0}:{1}/{2}/{3}", server, port, bubbleID.Guid, location); 12 return string.Format("mxp://{0}:{1}/{2}/{3}", server, port, bubbleID.Guid, location);
13 } 13 }
14 } 14 }
15} 15}
diff --git a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
index 9f635fd..1687205 100644
--- a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
+++ b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
@@ -1,368 +1,368 @@
1/* This file borrows heavily from MXPServer.cs - the reference MXPServer 1/* This file borrows heavily from MXPServer.cs - the reference MXPServer
2 * See http://www.bubblecloud.org for a copy of the original file and 2 * See http://www.bubblecloud.org for a copy of the original file and
3 * implementation details. */ 3 * implementation details. */
4using System; 4using System;
5using System.Collections.Generic; 5using System.Collections.Generic;
6using System.Reflection; 6using System.Reflection;
7using log4net; 7using log4net;
8using MXP; 8using MXP;
9using MXP.Messages; 9using MXP.Messages;
10using OpenMetaverse; 10using OpenMetaverse;
11using OpenSim.Client.MXP.ClientStack; 11using OpenSim.Client.MXP.ClientStack;
12using OpenSim.Region.Framework.Scenes; 12using OpenSim.Region.Framework.Scenes;
13 13
14namespace OpenSim.Client.MXP.PacketHandler 14namespace OpenSim.Client.MXP.PacketHandler
15{ 15{
16 class MXPPacketServer 16 class MXPPacketServer
17 { 17 {
18 internal static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 18 internal static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
19 19
20 private readonly List<MXPClientView> Clients = new List<MXPClientView>(); 20 private readonly List<MXPClientView> Clients = new List<MXPClientView>();
21 private readonly Dictionary<UUID, Scene> Scenes; 21 private readonly Dictionary<UUID, Scene> Scenes;
22 22
23 #region Fields 23 #region Fields
24 24
25 private readonly Transmitter transmitter; 25 private readonly Transmitter transmitter;
26 26
27 private readonly IList<Session> sessions = new List<Session>(); 27 private readonly IList<Session> sessions = new List<Session>();
28 private readonly IList<MXPClientView> sessionsToRemove = new List<MXPClientView>(); 28 private readonly IList<MXPClientView> sessionsToRemove = new List<MXPClientView>();
29 29
30 private readonly String cloudUrl; 30 private readonly String cloudUrl;
31 private readonly String programName; 31 private readonly String programName;
32 private readonly byte programMajorVersion; 32 private readonly byte programMajorVersion;
33 private readonly byte programMinorVersion; 33 private readonly byte programMinorVersion;
34 34
35 #endregion 35 #endregion
36 36
37 #region Constructors 37 #region Constructors
38 38
39 public MXPPacketServer(string cloudUrl, int port, Dictionary<UUID, Scene> scenes) 39 public MXPPacketServer(string cloudUrl, int port, Dictionary<UUID, Scene> scenes)
40 { 40 {
41 this.cloudUrl = cloudUrl; 41 this.cloudUrl = cloudUrl;
42 42
43 Scenes = scenes; 43 Scenes = scenes;
44 44
45 programMinorVersion = 63; 45 programMinorVersion = 63;
46 programMajorVersion = 0; 46 programMajorVersion = 0;
47 programName = "OpenSimulator"; 47 programName = "OpenSimulator";
48 48
49 transmitter = new Transmitter(port); 49 transmitter = new Transmitter(port);
50 transmitter.Startup(); 50 transmitter.Startup();
51 } 51 }
52 52
53 #endregion 53 #endregion
54 54
55 #region Properties 55 #region Properties
56 56
57 /// <summary> 57 /// <summary>
58 /// Number of sessions pending. (Process() accepts pending sessions). 58 /// Number of sessions pending. (Process() accepts pending sessions).
59 /// </summary> 59 /// </summary>
60 public int PendingSessionCount 60 public int PendingSessionCount
61 { 61 {
62 get 62 get
63 { 63 {
64 return transmitter.PendingSessionCount; 64 return transmitter.PendingSessionCount;
65 } 65 }
66 } 66 }
67 /// <summary> 67 /// <summary>
68 /// Number of connected sessions. 68 /// Number of connected sessions.
69 /// </summary> 69 /// </summary>
70 public int SessionCount 70 public int SessionCount
71 { 71 {
72 get 72 get
73 { 73 {
74 return sessions.Count; 74 return sessions.Count;
75 } 75 }
76 } 76 }
77 /// <summary> 77 /// <summary>
78 /// Property reflecting whether client transmitter threads are alive. 78 /// Property reflecting whether client transmitter threads are alive.
79 /// </summary> 79 /// </summary>
80 public bool IsTransmitterAlive 80 public bool IsTransmitterAlive
81 { 81 {
82 get 82 get
83 { 83 {
84 return transmitter != null && transmitter.IsAlive; 84 return transmitter != null && transmitter.IsAlive;
85 } 85 }
86 } 86 }
87 /// <summary> 87 /// <summary>
88 /// Number of packets sent. 88 /// Number of packets sent.
89 /// </summary> 89 /// </summary>
90 public ulong PacketsSent 90 public ulong PacketsSent
91 { 91 {
92 get 92 get
93 { 93 {
94 return transmitter != null ? transmitter.PacketsSent : 0; 94 return transmitter != null ? transmitter.PacketsSent : 0;
95 } 95 }
96 } 96 }
97 /// <summary> 97 /// <summary>
98 /// Number of packets received. 98 /// Number of packets received.
99 /// </summary> 99 /// </summary>
100 public ulong PacketsReceived 100 public ulong PacketsReceived
101 { 101 {
102 get 102 get
103 { 103 {
104 return transmitter != null ? transmitter.PacketsReceived : 0; 104 return transmitter != null ? transmitter.PacketsReceived : 0;
105 } 105 }
106 } 106 }
107 /// <summary> 107 /// <summary>
108 /// Bytes client has received so far. 108 /// Bytes client has received so far.
109 /// </summary> 109 /// </summary>
110 public ulong BytesReceived 110 public ulong BytesReceived
111 { 111 {
112 get 112 get
113 { 113 {
114 return transmitter != null ? transmitter.BytesReceived : 0; 114 return transmitter != null ? transmitter.BytesReceived : 0;
115 } 115 }
116 } 116 }
117 /// <summary> 117 /// <summary>
118 /// Bytes client has sent so far. 118 /// Bytes client has sent so far.
119 /// </summary> 119 /// </summary>
120 public ulong BytesSent 120 public ulong BytesSent
121 { 121 {
122 get 122 get
123 { 123 {
124 return transmitter != null ? transmitter.BytesSent : 0; 124 return transmitter != null ? transmitter.BytesSent : 0;
125 } 125 }
126 } 126 }
127 /// <summary> 127 /// <summary>
128 /// Number of bytes received (bytes per second) during past second. 128 /// Number of bytes received (bytes per second) during past second.
129 /// </summary> 129 /// </summary>
130 public double ReceiveRate 130 public double ReceiveRate
131 { 131 {
132 get 132 get
133 { 133 {
134 return transmitter != null ? transmitter.ReceiveRate : 0; 134 return transmitter != null ? transmitter.ReceiveRate : 0;
135 } 135 }
136 } 136 }
137 /// <summary> 137 /// <summary>
138 /// Number of bytes sent (bytes per second) during past second. 138 /// Number of bytes sent (bytes per second) during past second.
139 /// </summary> 139 /// </summary>
140 public double SendRate 140 public double SendRate
141 { 141 {
142 get 142 get
143 { 143 {
144 return transmitter != null ? transmitter.SendRate : 0; 144 return transmitter != null ? transmitter.SendRate : 0;
145 } 145 }
146 } 146 }
147 147
148 #endregion 148 #endregion
149 149
150 #region Session Management 150 #region Session Management
151 151
152 public void Disconnect(Session session) 152 public void Disconnect(Session session)
153 { 153 {
154 if (session.IsConnected) 154 if (session.IsConnected)
155 { 155 {
156 Message message = MessageFactory.Current.ReserveMessage(typeof(LeaveRequestMessage)); 156 Message message = MessageFactory.Current.ReserveMessage(typeof(LeaveRequestMessage));
157 session.Send(message); 157 session.Send(message);
158 MessageFactory.Current.ReleaseMessage(message); 158 MessageFactory.Current.ReleaseMessage(message);
159 } 159 }
160 else 160 else
161 { 161 {
162 throw new Exception("Not connected."); 162 throw new Exception("Not connected.");
163 } 163 }
164 } 164 }
165 165
166 #endregion 166 #endregion
167 167
168 168
169 #region Processing 169 #region Processing
170 170
171 public void PrintDebugInformation() 171 public void PrintDebugInformation()
172 { 172 {
173 m_log.Info("[MXP ClientStack] Statistics report"); 173 m_log.Info("[MXP ClientStack] Statistics report");
174 m_log.Info("Pending Sessions: " + PendingSessionCount); 174 m_log.Info("Pending Sessions: " + PendingSessionCount);
175 m_log.Info("Sessions: " + SessionCount + " (Clients: " + Clients.Count + " )"); 175 m_log.Info("Sessions: " + SessionCount + " (Clients: " + Clients.Count + " )");
176 m_log.Info("Transmitter Alive?: " + IsTransmitterAlive); 176 m_log.Info("Transmitter Alive?: " + IsTransmitterAlive);
177 m_log.Info("Packets Sent/Recieved: " + PacketsSent + " / " + PacketsReceived); 177 m_log.Info("Packets Sent/Recieved: " + PacketsSent + " / " + PacketsReceived);
178 m_log.Info("Bytes Sent/Recieved: " + BytesSent + " / " + BytesReceived); 178 m_log.Info("Bytes Sent/Recieved: " + BytesSent + " / " + BytesReceived);
179 m_log.Info("Send/Recieve Rate (bps): " + SendRate + " / " + ReceiveRate); 179 m_log.Info("Send/Recieve Rate (bps): " + SendRate + " / " + ReceiveRate);
180 } 180 }
181 181
182 public void Process() 182 public void Process()
183 { 183 {
184 ProcessMessages(); 184 ProcessMessages();
185 Clean(); 185 Clean();
186 } 186 }
187 187
188 public void Clean() 188 public void Clean()
189 { 189 {
190 foreach (MXPClientView clientView in Clients) 190 foreach (MXPClientView clientView in Clients)
191 { 191 {
192 if (clientView.Session.SessionState == SessionState.Disconnected) 192 if (clientView.Session.SessionState == SessionState.Disconnected)
193 { 193 {
194 sessionsToRemove.Add(clientView); 194 sessionsToRemove.Add(clientView);
195 } 195 }
196 } 196 }
197 197
198 foreach (MXPClientView clientView in sessionsToRemove) 198 foreach (MXPClientView clientView in sessionsToRemove)
199 { 199 {
200 clientView.Scene.RemoveClient(clientView.AgentId); 200 clientView.Scene.RemoveClient(clientView.AgentId);
201 Clients.Remove(clientView); 201 Clients.Remove(clientView);
202 sessions.Remove(clientView.Session); 202 sessions.Remove(clientView.Session);
203 } 203 }
204 204
205 sessionsToRemove.Clear(); 205 sessionsToRemove.Clear();
206 } 206 }
207 207
208 public bool AuthoriseUser(string participantName, string pass, UUID scene) 208 public bool AuthoriseUser(string participantName, string pass, UUID scene)
209 { 209 {
210 if (Scenes.ContainsKey(scene)) 210 if (Scenes.ContainsKey(scene))
211 return true; 211 return true;
212 212
213 return false; 213 return false;
214 } 214 }
215 215
216 public void ProcessMessages() 216 public void ProcessMessages()
217 { 217 {
218 if (transmitter.PendingSessionCount > 0) 218 if (transmitter.PendingSessionCount > 0)
219 { 219 {
220 sessions.Add(transmitter.AcceptPendingSession()); 220 sessions.Add(transmitter.AcceptPendingSession());
221 } 221 }
222 222
223 foreach (MXPClientView clientView in Clients) 223 foreach (MXPClientView clientView in Clients)
224 { 224 {
225 225
226 int messagesProcessedCount = 0; 226 int messagesProcessedCount = 0;
227 Session session = clientView.Session; 227 Session session = clientView.Session;
228 228
229 while (session.AvailableMessages > 0) 229 while (session.AvailableMessages > 0)
230 { 230 {
231 231
232 Message message = session.Receive(); 232 Message message = session.Receive();
233 233
234 if (message.GetType() == typeof(JoinRequestMessage)) 234 if (message.GetType() == typeof(JoinRequestMessage))
235 { 235 {
236 236
237 JoinRequestMessage joinRequestMessage = (JoinRequestMessage)message; 237 JoinRequestMessage joinRequestMessage = (JoinRequestMessage)message;
238 238
239 bool authorized = AuthoriseUser(joinRequestMessage.ParticipantName, 239 bool authorized = AuthoriseUser(joinRequestMessage.ParticipantName,
240 joinRequestMessage.ParticipantPassphrase, 240 joinRequestMessage.ParticipantPassphrase,
241 new UUID(joinRequestMessage.BubbleId)); 241 new UUID(joinRequestMessage.BubbleId));
242 242
243 if (authorized) 243 if (authorized)
244 { 244 {
245 Scene target = Scenes[new UUID(joinRequestMessage.BubbleId)]; 245 Scene target = Scenes[new UUID(joinRequestMessage.BubbleId)];
246 246
247 UUID mxpSessionID = UUID.Random(); 247 UUID mxpSessionID = UUID.Random();
248 248
249 m_log.Info("[MXP ClientStack] Session join request success: " + session.SessionId + " (" + (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + session.RemoteEndPoint.Port + ")"); 249 m_log.Info("[MXP ClientStack] Session join request success: " + session.SessionId + " (" + (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + session.RemoteEndPoint.Port + ")");
250 250
251 AcceptConnection(session, joinRequestMessage, mxpSessionID); 251 AcceptConnection(session, joinRequestMessage, mxpSessionID);
252 252
253 MXPClientView client = new MXPClientView(session, mxpSessionID, target, 253 MXPClientView client = new MXPClientView(session, mxpSessionID, target,
254 joinRequestMessage.ParticipantName); 254 joinRequestMessage.ParticipantName);
255 Clients.Add(client); 255 Clients.Add(client);
256 256
257 target.AddNewClient(client); 257 target.AddNewClient(client);
258 } 258 }
259 else 259 else
260 { 260 {
261 m_log.Info("[MXP ClientStack] Session join request failure: " + session.SessionId + " (" + (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + session.RemoteEndPoint.Port + ")"); 261 m_log.Info("[MXP ClientStack] Session join request failure: " + session.SessionId + " (" + (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + session.RemoteEndPoint.Port + ")");
262 262
263 DeclineConnection(session, joinRequestMessage); 263 DeclineConnection(session, joinRequestMessage);
264 } 264 }
265 265
266 } 266 }
267 if (message.GetType() == typeof(LeaveRequestMessage)) 267 if (message.GetType() == typeof(LeaveRequestMessage))
268 { 268 {
269 269
270 LeaveResponseMessage leaveResponseMessage = (LeaveResponseMessage)MessageFactory.Current.ReserveMessage( 270 LeaveResponseMessage leaveResponseMessage = (LeaveResponseMessage)MessageFactory.Current.ReserveMessage(
271 typeof(LeaveResponseMessage)); 271 typeof(LeaveResponseMessage));
272 272
273 m_log.Info("[MXP ClientStack] Session leave request: " + session.SessionId + " (" + (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + session.RemoteEndPoint.Port + ")"); 273 m_log.Info("[MXP ClientStack] Session leave request: " + session.SessionId + " (" + (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + session.RemoteEndPoint.Port + ")");
274 274
275 leaveResponseMessage.RequestMessageId = message.MessageId; 275 leaveResponseMessage.RequestMessageId = message.MessageId;
276 leaveResponseMessage.FailureCode = 0; 276 leaveResponseMessage.FailureCode = 0;
277 session.Send(leaveResponseMessage); 277 session.Send(leaveResponseMessage);
278 278
279 if (session.SessionState != SessionState.Disconnected) 279 if (session.SessionState != SessionState.Disconnected)
280 { 280 {
281 session.SetStateDisconnected(); 281 session.SetStateDisconnected();
282 } 282 }
283 283
284 m_log.Info("[MXP ClientStack] Removing Client from Scene"); 284 m_log.Info("[MXP ClientStack] Removing Client from Scene");
285 clientView.Scene.RemoveClient(clientView.AgentId); 285 clientView.Scene.RemoveClient(clientView.AgentId);
286 } 286 }
287 if (message.GetType() == typeof(LeaveResponseMessage)) 287 if (message.GetType() == typeof(LeaveResponseMessage))
288 { 288 {
289 289
290 LeaveResponseMessage leaveResponseMessage = (LeaveResponseMessage)message; 290 LeaveResponseMessage leaveResponseMessage = (LeaveResponseMessage)message;
291 291
292 m_log.Info("[MXP ClientStack] Session leave response: " + session.SessionId + " (" + (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + session.RemoteEndPoint.Port + ")"); 292 m_log.Info("[MXP ClientStack] Session leave response: " + session.SessionId + " (" + (session.IsIncoming ? "from" : "to") + " " + session.RemoteEndPoint.Address + ":" + session.RemoteEndPoint.Port + ")");
293 293
294 if (leaveResponseMessage.FailureCode == 0) 294 if (leaveResponseMessage.FailureCode == 0)
295 { 295 {
296 session.SetStateDisconnected(); 296 session.SetStateDisconnected();
297 } 297 }
298 298
299 m_log.Info("[MXP ClientStack] Removing Client from Scene"); 299 m_log.Info("[MXP ClientStack] Removing Client from Scene");
300 clientView.Scene.RemoveClient(clientView.AgentId); 300 clientView.Scene.RemoveClient(clientView.AgentId);
301 } 301 }
302 else 302 else
303 { 303 {
304 clientView.ProcessMXPPacket(message); 304 clientView.ProcessMXPPacket(message);
305 } 305 }
306 306
307 MessageFactory.Current.ReleaseMessage(message); 307 MessageFactory.Current.ReleaseMessage(message);
308 messagesProcessedCount++; 308 messagesProcessedCount++;
309 if (messagesProcessedCount > 1000) 309 if (messagesProcessedCount > 1000)
310 { 310 {
311 break; 311 break;
312 } 312 }
313 } 313 }
314 } 314 }
315 } 315 }
316 316
317 private void AcceptConnection(Session session, JoinRequestMessage joinRequestMessage, UUID mxpSessionID) 317 private void AcceptConnection(Session session, JoinRequestMessage joinRequestMessage, UUID mxpSessionID)
318 { 318 {
319 JoinResponseMessage joinResponseMessage = (JoinResponseMessage)MessageFactory.Current.ReserveMessage( 319 JoinResponseMessage joinResponseMessage = (JoinResponseMessage)MessageFactory.Current.ReserveMessage(
320 typeof(JoinResponseMessage)); 320 typeof(JoinResponseMessage));
321 321
322 joinResponseMessage.RequestMessageId = joinRequestMessage.MessageId; 322 joinResponseMessage.RequestMessageId = joinRequestMessage.MessageId;
323 joinResponseMessage.FailureCode = 0; 323 joinResponseMessage.FailureCode = 0;
324 324
325 joinResponseMessage.ParticipantId = mxpSessionID.Guid; 325 joinResponseMessage.ParticipantId = mxpSessionID.Guid;
326 joinResponseMessage.CloudUrl = cloudUrl; 326 joinResponseMessage.CloudUrl = cloudUrl;
327 327
328 joinResponseMessage.BubbleName = Scenes[new UUID(joinRequestMessage.BubbleId)].RegionInfo.RegionName; 328 joinResponseMessage.BubbleName = Scenes[new UUID(joinRequestMessage.BubbleId)].RegionInfo.RegionName;
329 329
330 joinResponseMessage.BubbleRealTime = 0; 330 joinResponseMessage.BubbleRealTime = 0;
331 joinResponseMessage.ProgramName = programName; 331 joinResponseMessage.ProgramName = programName;
332 joinResponseMessage.ProgramMajorVersion = programMajorVersion; 332 joinResponseMessage.ProgramMajorVersion = programMajorVersion;
333 joinResponseMessage.ProgramMinorVersion = programMinorVersion; 333 joinResponseMessage.ProgramMinorVersion = programMinorVersion;
334 joinResponseMessage.ProtocolMajorVersion = MxpConstants.ProtocolMajorVersion; 334 joinResponseMessage.ProtocolMajorVersion = MxpConstants.ProtocolMajorVersion;
335 joinResponseMessage.ProtocolMinorVersion = MxpConstants.ProtocolMinorVersion; 335 joinResponseMessage.ProtocolMinorVersion = MxpConstants.ProtocolMinorVersion;
336 336
337 session.Send(joinResponseMessage); 337 session.Send(joinResponseMessage);
338 338
339 session.SetStateConnected(); 339 session.SetStateConnected();
340 } 340 }
341 341
342 private void DeclineConnection(Session session, Message joinRequestMessage) 342 private void DeclineConnection(Session session, Message joinRequestMessage)
343 { 343 {
344 JoinResponseMessage joinResponseMessage = (JoinResponseMessage)MessageFactory.Current.ReserveMessage(typeof(JoinResponseMessage)); 344 JoinResponseMessage joinResponseMessage = (JoinResponseMessage)MessageFactory.Current.ReserveMessage(typeof(JoinResponseMessage));
345 345
346 joinResponseMessage.RequestMessageId = joinRequestMessage.MessageId; 346 joinResponseMessage.RequestMessageId = joinRequestMessage.MessageId;
347 joinResponseMessage.FailureCode = 1; 347 joinResponseMessage.FailureCode = 1;
348 348
349 joinResponseMessage.CloudUrl = cloudUrl; 349 joinResponseMessage.CloudUrl = cloudUrl;
350 350
351 joinResponseMessage.BubbleName = "Declined OpenSim Region"; // Dont reveal anything about the sim in the disconnect notice 351 joinResponseMessage.BubbleName = "Declined OpenSim Region"; // Dont reveal anything about the sim in the disconnect notice
352 352
353 joinResponseMessage.BubbleRealTime = 0; 353 joinResponseMessage.BubbleRealTime = 0;
354 joinResponseMessage.ProgramName = programName; 354 joinResponseMessage.ProgramName = programName;
355 joinResponseMessage.ProgramMajorVersion = programMajorVersion; 355 joinResponseMessage.ProgramMajorVersion = programMajorVersion;
356 joinResponseMessage.ProgramMinorVersion = programMinorVersion; 356 joinResponseMessage.ProgramMinorVersion = programMinorVersion;
357 joinResponseMessage.ProtocolMajorVersion = MxpConstants.ProtocolMajorVersion; 357 joinResponseMessage.ProtocolMajorVersion = MxpConstants.ProtocolMajorVersion;
358 joinResponseMessage.ProtocolMinorVersion = MxpConstants.ProtocolMinorVersion; 358 joinResponseMessage.ProtocolMinorVersion = MxpConstants.ProtocolMinorVersion;
359 359
360 session.Send(joinResponseMessage); 360 session.Send(joinResponseMessage);
361 361
362 session.SetStateDisconnected(); 362 session.SetStateDisconnected();
363 } 363 }
364 364
365 #endregion 365 #endregion
366 366
367 } 367 }
368} 368}
diff --git a/ThirdPartyLicenses/MXP.txt b/ThirdPartyLicenses/MXP.txt
index fb4e47f..5b03181 100644
--- a/ThirdPartyLicenses/MXP.txt
+++ b/ThirdPartyLicenses/MXP.txt
@@ -1,60 +1,60 @@
1MXP Reference Implementation 1MXP Reference Implementation
2Code availible from: http://setp.googlecode.com/svn/trunk/ 2Code availible from: http://setp.googlecode.com/svn/trunk/
3http://www.bubblecloud.org 3http://www.bubblecloud.org
4 4
5 5
6Apache License 6Apache License
7Version 2.0, January 2004 7Version 2.0, January 2004
8http://www.apache.org/licenses/ 8http://www.apache.org/licenses/
9 9
10TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 10TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
11 11
121. Definitions. 121. Definitions.
13 13
14"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. 14"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
15 15
16"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. 16"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
17 17
18"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. 18"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
19 19
20"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. 20"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
21 21
22"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. 22"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
23 23
24"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. 24"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
25 25
26"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). 26"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
27 27
28"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. 28"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
29 29
30"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." 30"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
31 31
32"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 32"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
33 33
342. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 342. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
35 35
363. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 363. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
37 37
384. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: 384. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
39 39
40 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and 40 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
41 41
42 2. You must cause any modified files to carry prominent notices stating that You changed the files; and 42 2. You must cause any modified files to carry prominent notices stating that You changed the files; and
43 43
44 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and 44 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
45 45
46 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. 46 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
47 47
48You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 48You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
49 49
505. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 505. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
51 51
526. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 526. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
53 53
547. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 547. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
55 55
568. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 568. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
57 57
589. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. 589. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
59 59
60END OF TERMS AND CONDITIONS 60END OF TERMS AND CONDITIONS