aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Client/MXP/ClientStack/MXPClientView.cs2375
-rw-r--r--OpenSim/Client/MXP/MXPModule.cs34
-rw-r--r--OpenSim/Client/MXP/MXPUtil.cs29
-rw-r--r--OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs30
-rw-r--r--OpenSim/Grid/MessagingServer/IMessageRegionService.cs49
-rw-r--r--OpenSim/Grid/MessagingServer/IMessageUserServerService.cs43
-rw-r--r--OpenSim/Grid/MessagingServer/IUGAIMCore.cs57
-rw-r--r--OpenSim/Grid/MessagingServer/MessageRegionModule.cs424
-rw-r--r--OpenSim/Grid/MessagingServer/MessageUserServerModule.cs370
-rw-r--r--OpenSim/Grid/MessagingServer/UserDataBaseService.cs150
-rw-r--r--OpenSim/Grid/UserServer/UserDataBaseService.cs136
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs2
13 files changed, 1945 insertions, 1758 deletions
diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
index d9c4077..c34c6b0 100644
--- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
+++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs
@@ -1,1174 +1,1201 @@
1using System; 1/*
2using System.Collections.Generic; 2 * Copyright (c) Contributors, http://opensimulator.org/
3using System.Net; 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4using System.Reflection; 4 *
5using System.Text; 5 * Redistribution and use in source and binary forms, with or without
6using log4net; 6 * modification, are permitted provided that the following conditions are met:
7using MXP; 7 * * Redistributions of source code must retain the above copyright
8using MXP.Messages; 8 * notice, this list of conditions and the following disclaimer.
9using OpenMetaverse; 9 * * Redistributions in binary form must reproduce the above copyright
10using OpenMetaverse.Packets; 10 * notice, this list of conditions and the following disclaimer in the
11using OpenSim.Framework; 11 * documentation and/or other materials provided with the distribution.
12using OpenSim.Framework.Client; 12 * * Neither the name of the OpenSimulator Project nor the
13using Packet=OpenMetaverse.Packets.Packet; 13 * names of its contributors may be used to endorse or promote products
14 14 * derived from this software without specific prior written permission.
15namespace OpenSim.Client.MXP.ClientStack 15 *
16{ 16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 class MXPClientView : IClientAPI, IClientCore 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 { 18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 internal static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 private readonly Session mxpSession; 21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 private readonly UUID mxpSessionID; 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 private readonly IScene mxpHostBubble; 23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 private readonly string mxpUsername; 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 private int debugLevel; 26 */
27 27
28 public MXPClientView(Session mxpSession, UUID mxpSessionID, IScene mxpHostBubble, string mxpUsername) 28using System;
29 { 29using System.Collections.Generic;
30 this.mxpSession = mxpSession; 30using System.Net;
31 this.mxpUsername = mxpUsername; 31using System.Reflection;
32 this.mxpHostBubble = mxpHostBubble; 32using System.Text;
33 this.mxpSessionID = mxpSessionID; 33using log4net;
34 } 34using MXP;
35 35using MXP.Messages;
36 public Session Session 36using OpenMetaverse;
37 { 37using OpenMetaverse.Packets;
38 get { return mxpSession; } 38using OpenSim.Framework;
39 } 39using OpenSim.Framework.Client;
40 40using Packet=OpenMetaverse.Packets.Packet;
41 public bool ProcessMXPPacket(Message msg) 41
42 { 42namespace OpenSim.Client.MXP.ClientStack
43 if (debugLevel > 0) 43{
44 m_log.Warn("[MXP] Got Action/Command Packet: " + msg); 44 class MXPClientView : IClientAPI, IClientCore
45 45 {
46 return false; 46 internal static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 } 47
48 48 private readonly Session mxpSession;
49 #region IClientAPI 49 private readonly UUID mxpSessionID;
50 50 private readonly IScene mxpHostBubble;
51 public Vector3 StartPos 51 private readonly string mxpUsername;
52 { 52
53 get { return new Vector3(128f, 128f, 128f); } 53 private int debugLevel;
54 set { } // TODO: Implement Me 54
55 } 55 public MXPClientView(Session mxpSession, UUID mxpSessionID, IScene mxpHostBubble, string mxpUsername)
56 56 {
57 public UUID AgentId 57 this.mxpSession = mxpSession;
58 { 58 this.mxpUsername = mxpUsername;
59 get { return mxpSessionID; } 59 this.mxpHostBubble = mxpHostBubble;
60 } 60 this.mxpSessionID = mxpSessionID;
61 61 }
62 public UUID SessionId 62
63 { 63 public Session Session
64 get { return mxpSessionID; } 64 {
65 } 65 get { return mxpSession; }
66 66 }
67 public UUID SecureSessionId 67
68 { 68 public bool ProcessMXPPacket(Message msg)
69 get { return mxpSessionID; } 69 {
70 } 70 if (debugLevel > 0)
71 71 m_log.Warn("[MXP] Got Action/Command Packet: " + msg);
72 public UUID ActiveGroupId 72
73 { 73 return false;
74 get { return UUID.Zero; } 74 }
75 } 75
76 76 #region IClientAPI
77 public string ActiveGroupName 77
78 { 78 public Vector3 StartPos
79 get { return ""; } 79 {
80 } 80 get { return new Vector3(128f, 128f, 128f); }
81 81 set { } // TODO: Implement Me
82 public ulong ActiveGroupPowers 82 }
83 { 83
84 get { return 0; } 84 public UUID AgentId
85 } 85 {
86 86 get { return mxpSessionID; }
87 public ulong GetGroupPowers(UUID groupID) 87 }
88 { 88
89 return 0; 89 public UUID SessionId
90 } 90 {
91 91 get { return mxpSessionID; }
92 public bool IsGroupMember(UUID GroupID) 92 }
93 { 93
94 return false; 94 public UUID SecureSessionId
95 } 95 {
96 96 get { return mxpSessionID; }
97 public string FirstName 97 }
98 { 98
99 get { return mxpUsername; } 99 public UUID ActiveGroupId
100 } 100 {
101 101 get { return UUID.Zero; }
102 public string LastName 102 }
103 { 103
104 get { return "@mxp://" + Session.RemoteEndPoint.Address; } 104 public string ActiveGroupName
105 } 105 {
106 106 get { return ""; }
107 public IScene Scene 107 }
108 { 108
109 get { return mxpHostBubble; } 109 public ulong ActiveGroupPowers
110 } 110 {
111 111 get { return 0; }
112 public int NextAnimationSequenceNumber 112 }
113 { 113
114 get { return 0; } 114 public ulong GetGroupPowers(UUID groupID)
115 } 115 {
116 116 return 0;
117 public string Name 117 }
118 { 118
119 get { return FirstName; } 119 public bool IsGroupMember(UUID GroupID)
120 } 120 {
121 121 return false;
122 public bool IsActive 122 }
123 { 123
124 get { return Session.SessionState == SessionState.Connected; } 124 public string FirstName
125 set 125 {
126 { 126 get { return mxpUsername; }
127 if (!value) 127 }
128 Stop(); 128
129 } 129 public string LastName
130 } 130 {
131 131 get { return "@mxp://" + Session.RemoteEndPoint.Address; }
132 // Do we need this? 132 }
133 public bool SendLogoutPacketWhenClosing 133
134 { 134 public IScene Scene
135 set { } 135 {
136 } 136 get { return mxpHostBubble; }
137 137 }
138 public uint CircuitCode 138
139 { 139 public int NextAnimationSequenceNumber
140 get { return mxpSessionID.CRC(); } 140 {
141 } 141 get { return 0; }
142 142 }
143 public event GenericMessage OnGenericMessage; 143
144 public event ImprovedInstantMessage OnInstantMessage; 144 public string Name
145 public event ChatMessage OnChatFromClient; 145 {
146 public event TextureRequest OnRequestTexture; 146 get { return FirstName; }
147 public event RezObject OnRezObject; 147 }
148 public event ModifyTerrain OnModifyTerrain; 148
149 public event BakeTerrain OnBakeTerrain; 149 public bool IsActive
150 public event EstateChangeInfo OnEstateChangeInfo; 150 {
151 public event SetAppearance OnSetAppearance; 151 get { return Session.SessionState == SessionState.Connected; }
152 public event AvatarNowWearing OnAvatarNowWearing; 152 set
153 public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv; 153 {
154 public event UUIDNameRequest OnDetachAttachmentIntoInv; 154 if (!value)
155 public event ObjectAttach OnObjectAttach; 155 Stop();
156 public event ObjectDeselect OnObjectDetach; 156 }
157 public event ObjectDrop OnObjectDrop; 157 }
158 public event StartAnim OnStartAnim; 158
159 public event StopAnim OnStopAnim; 159 // Do we need this?
160 public event LinkObjects OnLinkObjects; 160 public bool SendLogoutPacketWhenClosing
161 public event DelinkObjects OnDelinkObjects; 161 {
162 public event RequestMapBlocks OnRequestMapBlocks; 162 set { }
163 public event RequestMapName OnMapNameRequest; 163 }
164 public event TeleportLocationRequest OnTeleportLocationRequest; 164
165 public event DisconnectUser OnDisconnectUser; 165 public uint CircuitCode
166 public event RequestAvatarProperties OnRequestAvatarProperties; 166 {
167 public event SetAlwaysRun OnSetAlwaysRun; 167 get { return mxpSessionID.CRC(); }
168 public event TeleportLandmarkRequest OnTeleportLandmarkRequest; 168 }
169 public event DeRezObject OnDeRezObject; 169
170 public event Action<IClientAPI> OnRegionHandShakeReply; 170 public event GenericMessage OnGenericMessage;
171 public event GenericCall2 OnRequestWearables; 171 public event ImprovedInstantMessage OnInstantMessage;
172 public event GenericCall2 OnCompleteMovementToRegion; 172 public event ChatMessage OnChatFromClient;
173 public event UpdateAgent OnAgentUpdate; 173 public event TextureRequest OnRequestTexture;
174 public event AgentRequestSit OnAgentRequestSit; 174 public event RezObject OnRezObject;
175 public event AgentSit OnAgentSit; 175 public event ModifyTerrain OnModifyTerrain;
176 public event AvatarPickerRequest OnAvatarPickerRequest; 176 public event BakeTerrain OnBakeTerrain;
177 public event Action<IClientAPI> OnRequestAvatarsData; 177 public event EstateChangeInfo OnEstateChangeInfo;
178 public event AddNewPrim OnAddPrim; 178 public event SetAppearance OnSetAppearance;
179 public event FetchInventory OnAgentDataUpdateRequest; 179 public event AvatarNowWearing OnAvatarNowWearing;
180 public event TeleportLocationRequest OnSetStartLocationRequest; 180 public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv;
181 public event RequestGodlikePowers OnRequestGodlikePowers; 181 public event UUIDNameRequest OnDetachAttachmentIntoInv;
182 public event GodKickUser OnGodKickUser; 182 public event ObjectAttach OnObjectAttach;
183 public event ObjectDuplicate OnObjectDuplicate; 183 public event ObjectDeselect OnObjectDetach;
184 public event ObjectDuplicateOnRay OnObjectDuplicateOnRay; 184 public event ObjectDrop OnObjectDrop;
185 public event GrabObject OnGrabObject; 185 public event StartAnim OnStartAnim;
186 public event ObjectSelect OnDeGrabObject; 186 public event StopAnim OnStopAnim;
187 public event MoveObject OnGrabUpdate; 187 public event LinkObjects OnLinkObjects;
188 public event UpdateShape OnUpdatePrimShape; 188 public event DelinkObjects OnDelinkObjects;
189 public event ObjectExtraParams OnUpdateExtraParams; 189 public event RequestMapBlocks OnRequestMapBlocks;
190 public event ObjectSelect OnObjectSelect; 190 public event RequestMapName OnMapNameRequest;
191 public event ObjectDeselect OnObjectDeselect; 191 public event TeleportLocationRequest OnTeleportLocationRequest;
192 public event GenericCall7 OnObjectDescription; 192 public event DisconnectUser OnDisconnectUser;
193 public event GenericCall7 OnObjectName; 193 public event RequestAvatarProperties OnRequestAvatarProperties;
194 public event GenericCall7 OnObjectClickAction; 194 public event SetAlwaysRun OnSetAlwaysRun;
195 public event GenericCall7 OnObjectMaterial; 195 public event TeleportLandmarkRequest OnTeleportLandmarkRequest;
196 public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; 196 public event DeRezObject OnDeRezObject;
197 public event UpdatePrimFlags OnUpdatePrimFlags; 197 public event Action<IClientAPI> OnRegionHandShakeReply;
198 public event UpdatePrimTexture OnUpdatePrimTexture; 198 public event GenericCall2 OnRequestWearables;
199 public event UpdateVector OnUpdatePrimGroupPosition; 199 public event GenericCall2 OnCompleteMovementToRegion;
200 public event UpdateVector OnUpdatePrimSinglePosition; 200 public event UpdateAgent OnAgentUpdate;
201 public event UpdatePrimRotation OnUpdatePrimGroupRotation; 201 public event AgentRequestSit OnAgentRequestSit;
202 public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; 202 public event AgentSit OnAgentSit;
203 public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation; 203 public event AvatarPickerRequest OnAvatarPickerRequest;
204 public event UpdateVector OnUpdatePrimScale; 204 public event Action<IClientAPI> OnRequestAvatarsData;
205 public event UpdateVector OnUpdatePrimGroupScale; 205 public event AddNewPrim OnAddPrim;
206 public event StatusChange OnChildAgentStatus; 206 public event FetchInventory OnAgentDataUpdateRequest;
207 public event GenericCall2 OnStopMovement; 207 public event TeleportLocationRequest OnSetStartLocationRequest;
208 public event Action<UUID> OnRemoveAvatar; 208 public event RequestGodlikePowers OnRequestGodlikePowers;
209 public event ObjectPermissions OnObjectPermissions; 209 public event GodKickUser OnGodKickUser;
210 public event CreateNewInventoryItem OnCreateNewInventoryItem; 210 public event ObjectDuplicate OnObjectDuplicate;
211 public event CreateInventoryFolder OnCreateNewInventoryFolder; 211 public event ObjectDuplicateOnRay OnObjectDuplicateOnRay;
212 public event UpdateInventoryFolder OnUpdateInventoryFolder; 212 public event GrabObject OnGrabObject;
213 public event MoveInventoryFolder OnMoveInventoryFolder; 213 public event ObjectSelect OnDeGrabObject;
214 public event FetchInventoryDescendents OnFetchInventoryDescendents; 214 public event MoveObject OnGrabUpdate;
215 public event PurgeInventoryDescendents OnPurgeInventoryDescendents; 215 public event UpdateShape OnUpdatePrimShape;
216 public event FetchInventory OnFetchInventory; 216 public event ObjectExtraParams OnUpdateExtraParams;
217 public event RequestTaskInventory OnRequestTaskInventory; 217 public event ObjectSelect OnObjectSelect;
218 public event UpdateInventoryItem OnUpdateInventoryItem; 218 public event ObjectDeselect OnObjectDeselect;
219 public event CopyInventoryItem OnCopyInventoryItem; 219 public event GenericCall7 OnObjectDescription;
220 public event MoveInventoryItem OnMoveInventoryItem; 220 public event GenericCall7 OnObjectName;
221 public event RemoveInventoryFolder OnRemoveInventoryFolder; 221 public event GenericCall7 OnObjectClickAction;
222 public event RemoveInventoryItem OnRemoveInventoryItem; 222 public event GenericCall7 OnObjectMaterial;
223 public event UDPAssetUploadRequest OnAssetUploadRequest; 223 public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily;
224 public event XferReceive OnXferReceive; 224 public event UpdatePrimFlags OnUpdatePrimFlags;
225 public event RequestXfer OnRequestXfer; 225 public event UpdatePrimTexture OnUpdatePrimTexture;
226 public event ConfirmXfer OnConfirmXfer; 226 public event UpdateVector OnUpdatePrimGroupPosition;
227 public event AbortXfer OnAbortXfer; 227 public event UpdateVector OnUpdatePrimSinglePosition;
228 public event RezScript OnRezScript; 228 public event UpdatePrimRotation OnUpdatePrimGroupRotation;
229 public event UpdateTaskInventory OnUpdateTaskInventory; 229 public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation;
230 public event MoveTaskInventory OnMoveTaskItem; 230 public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation;
231 public event RemoveTaskInventory OnRemoveTaskItem; 231 public event UpdateVector OnUpdatePrimScale;
232 public event RequestAsset OnRequestAsset; 232 public event UpdateVector OnUpdatePrimGroupScale;
233 public event UUIDNameRequest OnNameFromUUIDRequest; 233 public event StatusChange OnChildAgentStatus;
234 public event ParcelAccessListRequest OnParcelAccessListRequest; 234 public event GenericCall2 OnStopMovement;
235 public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest; 235 public event Action<UUID> OnRemoveAvatar;
236 public event ParcelPropertiesRequest OnParcelPropertiesRequest; 236 public event ObjectPermissions OnObjectPermissions;
237 public event ParcelDivideRequest OnParcelDivideRequest; 237 public event CreateNewInventoryItem OnCreateNewInventoryItem;
238 public event ParcelJoinRequest OnParcelJoinRequest; 238 public event CreateInventoryFolder OnCreateNewInventoryFolder;
239 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; 239 public event UpdateInventoryFolder OnUpdateInventoryFolder;
240 public event ParcelSelectObjects OnParcelSelectObjects; 240 public event MoveInventoryFolder OnMoveInventoryFolder;
241 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; 241 public event FetchInventoryDescendents OnFetchInventoryDescendents;
242 public event ParcelAbandonRequest OnParcelAbandonRequest; 242 public event PurgeInventoryDescendents OnPurgeInventoryDescendents;
243 public event ParcelGodForceOwner OnParcelGodForceOwner; 243 public event FetchInventory OnFetchInventory;
244 public event ParcelReclaim OnParcelReclaim; 244 public event RequestTaskInventory OnRequestTaskInventory;
245 public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest; 245 public event UpdateInventoryItem OnUpdateInventoryItem;
246 public event RegionInfoRequest OnRegionInfoRequest; 246 public event CopyInventoryItem OnCopyInventoryItem;
247 public event EstateCovenantRequest OnEstateCovenantRequest; 247 public event MoveInventoryItem OnMoveInventoryItem;
248 public event FriendActionDelegate OnApproveFriendRequest; 248 public event RemoveInventoryFolder OnRemoveInventoryFolder;
249 public event FriendActionDelegate OnDenyFriendRequest; 249 public event RemoveInventoryItem OnRemoveInventoryItem;
250 public event FriendshipTermination OnTerminateFriendship; 250 public event UDPAssetUploadRequest OnAssetUploadRequest;
251 public event MoneyTransferRequest OnMoneyTransferRequest; 251 public event XferReceive OnXferReceive;
252 public event EconomyDataRequest OnEconomyDataRequest; 252 public event RequestXfer OnRequestXfer;
253 public event MoneyBalanceRequest OnMoneyBalanceRequest; 253 public event ConfirmXfer OnConfirmXfer;
254 public event UpdateAvatarProperties OnUpdateAvatarProperties; 254 public event AbortXfer OnAbortXfer;
255 public event ParcelBuy OnParcelBuy; 255 public event RezScript OnRezScript;
256 public event RequestPayPrice OnRequestPayPrice; 256 public event UpdateTaskInventory OnUpdateTaskInventory;
257 public event ObjectSaleInfo OnObjectSaleInfo; 257 public event MoveTaskInventory OnMoveTaskItem;
258 public event ObjectBuy OnObjectBuy; 258 public event RemoveTaskInventory OnRemoveTaskItem;
259 public event BuyObjectInventory OnBuyObjectInventory; 259 public event RequestAsset OnRequestAsset;
260 public event RequestTerrain OnRequestTerrain; 260 public event UUIDNameRequest OnNameFromUUIDRequest;
261 public event RequestTerrain OnUploadTerrain; 261 public event ParcelAccessListRequest OnParcelAccessListRequest;
262 public event ObjectIncludeInSearch OnObjectIncludeInSearch; 262 public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest;
263 public event UUIDNameRequest OnTeleportHomeRequest; 263 public event ParcelPropertiesRequest OnParcelPropertiesRequest;
264 public event ScriptAnswer OnScriptAnswer; 264 public event ParcelDivideRequest OnParcelDivideRequest;
265 public event AgentSit OnUndo; 265 public event ParcelJoinRequest OnParcelJoinRequest;
266 public event ForceReleaseControls OnForceReleaseControls; 266 public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest;
267 public event GodLandStatRequest OnLandStatRequest; 267 public event ParcelSelectObjects OnParcelSelectObjects;
268 public event DetailedEstateDataRequest OnDetailedEstateDataRequest; 268 public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest;
269 public event SetEstateFlagsRequest OnSetEstateFlagsRequest; 269 public event ParcelAbandonRequest OnParcelAbandonRequest;
270 public event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture; 270 public event ParcelGodForceOwner OnParcelGodForceOwner;
271 public event SetEstateTerrainDetailTexture OnSetEstateTerrainDetailTexture; 271 public event ParcelReclaim OnParcelReclaim;
272 public event SetEstateTerrainTextureHeights OnSetEstateTerrainTextureHeights; 272 public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest;
273 public event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest; 273 public event RegionInfoRequest OnRegionInfoRequest;
274 public event SetRegionTerrainSettings OnSetRegionTerrainSettings; 274 public event EstateCovenantRequest OnEstateCovenantRequest;
275 public event EstateRestartSimRequest OnEstateRestartSimRequest; 275 public event FriendActionDelegate OnApproveFriendRequest;
276 public event EstateChangeCovenantRequest OnEstateChangeCovenantRequest; 276 public event FriendActionDelegate OnDenyFriendRequest;
277 public event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest; 277 public event FriendshipTermination OnTerminateFriendship;
278 public event SimulatorBlueBoxMessageRequest OnSimulatorBlueBoxMessageRequest; 278 public event MoneyTransferRequest OnMoneyTransferRequest;
279 public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest; 279 public event EconomyDataRequest OnEconomyDataRequest;
280 public event EstateDebugRegionRequest OnEstateDebugRegionRequest; 280 public event MoneyBalanceRequest OnMoneyBalanceRequest;
281 public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; 281 public event UpdateAvatarProperties OnUpdateAvatarProperties;
282 public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest; 282 public event ParcelBuy OnParcelBuy;
283 public event UUIDNameRequest OnUUIDGroupNameRequest; 283 public event RequestPayPrice OnRequestPayPrice;
284 public event RegionHandleRequest OnRegionHandleRequest; 284 public event ObjectSaleInfo OnObjectSaleInfo;
285 public event ParcelInfoRequest OnParcelInfoRequest; 285 public event ObjectBuy OnObjectBuy;
286 public event RequestObjectPropertiesFamily OnObjectGroupRequest; 286 public event BuyObjectInventory OnBuyObjectInventory;
287 public event ScriptReset OnScriptReset; 287 public event RequestTerrain OnRequestTerrain;
288 public event GetScriptRunning OnGetScriptRunning; 288 public event RequestTerrain OnUploadTerrain;
289 public event SetScriptRunning OnSetScriptRunning; 289 public event ObjectIncludeInSearch OnObjectIncludeInSearch;
290 public event UpdateVector OnAutoPilotGo; 290 public event UUIDNameRequest OnTeleportHomeRequest;
291 public event TerrainUnacked OnUnackedTerrain; 291 public event ScriptAnswer OnScriptAnswer;
292 public event ActivateGesture OnActivateGesture; 292 public event AgentSit OnUndo;
293 public event DeactivateGesture OnDeactivateGesture; 293 public event ForceReleaseControls OnForceReleaseControls;
294 public event ObjectOwner OnObjectOwner; 294 public event GodLandStatRequest OnLandStatRequest;
295 public event DirPlacesQuery OnDirPlacesQuery; 295 public event DetailedEstateDataRequest OnDetailedEstateDataRequest;
296 public event DirFindQuery OnDirFindQuery; 296 public event SetEstateFlagsRequest OnSetEstateFlagsRequest;
297 public event DirLandQuery OnDirLandQuery; 297 public event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture;
298 public event DirPopularQuery OnDirPopularQuery; 298 public event SetEstateTerrainDetailTexture OnSetEstateTerrainDetailTexture;
299 public event DirClassifiedQuery OnDirClassifiedQuery; 299 public event SetEstateTerrainTextureHeights OnSetEstateTerrainTextureHeights;
300 public event EventInfoRequest OnEventInfoRequest; 300 public event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest;
301 public event ParcelSetOtherCleanTime OnParcelSetOtherCleanTime; 301 public event SetRegionTerrainSettings OnSetRegionTerrainSettings;
302 public event MapItemRequest OnMapItemRequest; 302 public event EstateRestartSimRequest OnEstateRestartSimRequest;
303 public event OfferCallingCard OnOfferCallingCard; 303 public event EstateChangeCovenantRequest OnEstateChangeCovenantRequest;
304 public event AcceptCallingCard OnAcceptCallingCard; 304 public event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest;
305 public event DeclineCallingCard OnDeclineCallingCard; 305 public event SimulatorBlueBoxMessageRequest OnSimulatorBlueBoxMessageRequest;
306 public event SoundTrigger OnSoundTrigger; 306 public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest;
307 public event StartLure OnStartLure; 307 public event EstateDebugRegionRequest OnEstateDebugRegionRequest;
308 public event TeleportLureRequest OnTeleportLureRequest; 308 public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest;
309 public event NetworkStats OnNetworkStatsUpdate; 309 public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest;
310 public event ClassifiedInfoRequest OnClassifiedInfoRequest; 310 public event UUIDNameRequest OnUUIDGroupNameRequest;
311 public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; 311 public event RegionHandleRequest OnRegionHandleRequest;
312 public event ClassifiedDelete OnClassifiedDelete; 312 public event ParcelInfoRequest OnParcelInfoRequest;
313 public event ClassifiedDelete OnClassifiedGodDelete; 313 public event RequestObjectPropertiesFamily OnObjectGroupRequest;
314 public event EventNotificationAddRequest OnEventNotificationAddRequest; 314 public event ScriptReset OnScriptReset;
315 public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; 315 public event GetScriptRunning OnGetScriptRunning;
316 public event EventGodDelete OnEventGodDelete; 316 public event SetScriptRunning OnSetScriptRunning;
317 public event ParcelDwellRequest OnParcelDwellRequest; 317 public event UpdateVector OnAutoPilotGo;
318 public event UserInfoRequest OnUserInfoRequest; 318 public event TerrainUnacked OnUnackedTerrain;
319 public event UpdateUserInfo OnUpdateUserInfo; 319 public event ActivateGesture OnActivateGesture;
320 320 public event DeactivateGesture OnDeactivateGesture;
321 public void SetDebugPacketLevel(int newDebug) 321 public event ObjectOwner OnObjectOwner;
322 { 322 public event DirPlacesQuery OnDirPlacesQuery;
323 debugLevel = newDebug; 323 public event DirFindQuery OnDirFindQuery;
324 } 324 public event DirLandQuery OnDirLandQuery;
325 325 public event DirPopularQuery OnDirPopularQuery;
326 public void InPacket(object NewPack) 326 public event DirClassifiedQuery OnDirClassifiedQuery;
327 { 327 public event EventInfoRequest OnEventInfoRequest;
328 //throw new System.NotImplementedException(); 328 public event ParcelSetOtherCleanTime OnParcelSetOtherCleanTime;
329 } 329 public event MapItemRequest OnMapItemRequest;
330 330 public event OfferCallingCard OnOfferCallingCard;
331 public void ProcessInPacket(Packet NewPack) 331 public event AcceptCallingCard OnAcceptCallingCard;
332 { 332 public event DeclineCallingCard OnDeclineCallingCard;
333 //throw new System.NotImplementedException(); 333 public event SoundTrigger OnSoundTrigger;
334 } 334 public event StartLure OnStartLure;
335 335 public event TeleportLureRequest OnTeleportLureRequest;
336 public void Close(bool ShutdownCircuit) 336 public event NetworkStats OnNetworkStatsUpdate;
337 { 337 public event ClassifiedInfoRequest OnClassifiedInfoRequest;
338 m_log.Info("[MXP ClientStack] Close Called with SC=" + ShutdownCircuit); 338 public event ClassifiedInfoUpdate OnClassifiedInfoUpdate;
339 339 public event ClassifiedDelete OnClassifiedDelete;
340 // Tell the client to go 340 public event ClassifiedDelete OnClassifiedGodDelete;
341 SendLogoutPacket(); 341 public event EventNotificationAddRequest OnEventNotificationAddRequest;
342 342 public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest;
343 // Let MXPPacketServer clean it up 343 public event EventGodDelete OnEventGodDelete;
344 if (Session.SessionState != SessionState.Disconnected) 344 public event ParcelDwellRequest OnParcelDwellRequest;
345 { 345 public event UserInfoRequest OnUserInfoRequest;
346 Session.SetStateDisconnected(); 346 public event UpdateUserInfo OnUpdateUserInfo;
347 } 347
348 348 public void SetDebugPacketLevel(int newDebug)
349 // Handle OpenSim cleanup 349 {
350 if (ShutdownCircuit) 350 debugLevel = newDebug;
351 { 351 }
352 if (OnConnectionClosed != null) 352
353 OnConnectionClosed(this); 353 public void InPacket(object NewPack)
354 } 354 {
355 else 355 //throw new System.NotImplementedException();
356 { 356 }
357 Scene.RemoveClient(AgentId); 357
358 } 358 public void ProcessInPacket(Packet NewPack)
359 } 359 {
360 360 //throw new System.NotImplementedException();
361 public void Kick(string message) 361 }
362 { 362
363 Close(false); 363 public void Close(bool ShutdownCircuit)
364 } 364 {
365 365 m_log.Info("[MXP ClientStack] Close Called with SC=" + ShutdownCircuit);
366 public void Start() 366
367 { 367 // Tell the client to go
368 Scene.AddNewClient(this); 368 SendLogoutPacket();
369 } 369
370 370 // Let MXPPacketServer clean it up
371 public void Stop() 371 if (Session.SessionState != SessionState.Disconnected)
372 { 372 {
373 // Nor this 373 Session.SetStateDisconnected();
374 } 374 }
375 375
376 public void SendWearables(AvatarWearable[] wearables, int serial) 376 // Handle OpenSim cleanup
377 { 377 if (ShutdownCircuit)
378 // Need to translate to MXP somehow 378 {
379 } 379 if (OnConnectionClosed != null)
380 380 OnConnectionClosed(this);
381 public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) 381 }
382 { 382 else
383 // Need to translate to MXP somehow 383 {
384 } 384 Scene.RemoveClient(AgentId);
385 385 }
386 public void SendStartPingCheck(byte seq) 386 }
387 { 387
388 // Need to translate to MXP somehow 388 public void Kick(string message)
389 } 389 {
390 390 Close(false);
391 public void SendKillObject(ulong regionHandle, uint localID) 391 }
392 { 392
393 DisappearanceEventMessage de = new DisappearanceEventMessage(); 393 public void Start()
394 de.ObjectIndex = localID; 394 {
395 395 Scene.AddNewClient(this);
396 Session.Send(de); 396 }
397 } 397
398 398 public void Stop()
399 public void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs) 399 {
400 { 400 // Nor this
401 // Need to translate to MXP somehow 401 }
402 } 402
403 403 public void SendWearables(AvatarWearable[] wearables, int serial)
404 public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) 404 {
405 { 405 // Need to translate to MXP somehow
406 m_log.Info("[MXP] Completing Handshake to Region"); 406 }
407 407
408 if (OnRegionHandShakeReply != null) 408 public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry)
409 { 409 {
410 OnRegionHandShakeReply(this); 410 // Need to translate to MXP somehow
411 } 411 }
412 412
413 if (OnCompleteMovementToRegion != null) 413 public void SendStartPingCheck(byte seq)
414 { 414 {
415 OnCompleteMovementToRegion(); 415 // Need to translate to MXP somehow
416 } 416 }
417 417
418 // Need to translate to MXP somehow 418 public void SendKillObject(ulong regionHandle, uint localID)
419 } 419 {
420 420 DisappearanceEventMessage de = new DisappearanceEventMessage();
421 public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible) 421 de.ObjectIndex = localID;
422 { 422
423 ActionEventMessage chatActionEvent = new ActionEventMessage(); 423 Session.Send(de);
424 chatActionEvent.ActionFragment.ActionName = "Chat"; 424 }
425 chatActionEvent.ActionFragment.SourceObjectId = fromAgentID.Guid; 425
426 chatActionEvent.ActionFragment.ObservationRadius = 180.0f; 426 public void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs)
427 chatActionEvent.ActionFragment.ActionPayloadDialect = "TEXT"; 427 {
428 chatActionEvent.SetPayloadData(Encoding.UTF8.GetBytes(message)); 428 // Need to translate to MXP somehow
429 chatActionEvent.ActionFragment.ActionPayloadLength = (uint)chatActionEvent.GetPayloadData().Length; 429 }
430 430
431 Session.Send(chatActionEvent); 431 public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args)
432 } 432 {
433 433 m_log.Info("[MXP] Completing Handshake to Region");
434 public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp) 434
435 { 435 if (OnRegionHandShakeReply != null)
436 // Need to translate to MXP somehow 436 {
437 } 437 OnRegionHandShakeReply(this);
438 438 }
439 public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp, UUID transactionID, bool fromGroup, byte[] binaryBucket) 439
440 { 440 if (OnCompleteMovementToRegion != null)
441 // Need to translate to MXP somehow 441 {
442 } 442 OnCompleteMovementToRegion();
443 443 }
444 public void SendGenericMessage(string method, List<string> message) 444
445 { 445 // Need to translate to MXP somehow
446 // Need to translate to MXP somehow 446 }
447 } 447
448 448 public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible)
449 public void SendLayerData(float[] map) 449 {
450 { 450 ActionEventMessage chatActionEvent = new ActionEventMessage();
451 // Need to translate to MXP somehow 451 chatActionEvent.ActionFragment.ActionName = "Chat";
452 } 452 chatActionEvent.ActionFragment.SourceObjectId = fromAgentID.Guid;
453 453 chatActionEvent.ActionFragment.ObservationRadius = 180.0f;
454 public void SendLayerData(int px, int py, float[] map) 454 chatActionEvent.ActionFragment.ActionPayloadDialect = "TEXT";
455 { 455 chatActionEvent.SetPayloadData(Encoding.UTF8.GetBytes(message));
456 // Need to translate to MXP somehow 456 chatActionEvent.ActionFragment.ActionPayloadLength = (uint)chatActionEvent.GetPayloadData().Length;
457 } 457
458 458 Session.Send(chatActionEvent);
459 public void SendWindData(Vector2[] windSpeeds) 459 }
460 { 460
461 // Need to translate to MXP somehow 461 public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp)
462 } 462 {
463 463 // Need to translate to MXP somehow
464 public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) 464 }
465 { 465
466 //throw new System.NotImplementedException(); 466 public void SendInstantMessage(UUID fromAgent, string message, UUID toAgent, string fromName, byte dialog, uint timeStamp, UUID transactionID, bool fromGroup, byte[] binaryBucket)
467 } 467 {
468 468 // Need to translate to MXP somehow
469 public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint) 469 }
470 { 470
471 //throw new System.NotImplementedException(); 471 public void SendGenericMessage(string method, List<string> message)
472 } 472 {
473 473 // Need to translate to MXP somehow
474 public AgentCircuitData RequestClientInfo() 474 }
475 { 475
476 AgentCircuitData clientinfo = new AgentCircuitData(); 476 public void SendLayerData(float[] map)
477 clientinfo.AgentID = AgentId; 477 {
478 clientinfo.Appearance = new AvatarAppearance(); 478 // Need to translate to MXP somehow
479 clientinfo.BaseFolder = UUID.Zero; 479 }
480 clientinfo.CapsPath = ""; 480
481 clientinfo.child = false; 481 public void SendLayerData(int px, int py, float[] map)
482 clientinfo.ChildrenCapSeeds = new Dictionary<ulong, string>(); 482 {
483 clientinfo.circuitcode = CircuitCode; 483 // Need to translate to MXP somehow
484 clientinfo.firstname = FirstName; 484 }
485 clientinfo.InventoryFolder = UUID.Zero; 485
486 clientinfo.lastname = LastName; 486 public void SendWindData(Vector2[] windSpeeds)
487 clientinfo.SecureSessionID = SecureSessionId; 487 {
488 clientinfo.SessionID = SessionId; 488 // Need to translate to MXP somehow
489 clientinfo.startpos = StartPos; 489 }
490 490
491 return clientinfo; 491 public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look)
492 } 492 {
493 493 //throw new System.NotImplementedException();
494 public void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL) 494 }
495 { 495
496 // TODO: We'll want to get this one working. 496 public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint)
497 // Need to translate to MXP somehow 497 {
498 } 498 //throw new System.NotImplementedException();
499 499 }
500 public void SendMapBlock(List<MapBlockData> mapBlocks, uint flag) 500
501 { 501 public AgentCircuitData RequestClientInfo()
502 // Need to translate to MXP somehow 502 {
503 } 503 AgentCircuitData clientinfo = new AgentCircuitData();
504 504 clientinfo.AgentID = AgentId;
505 public void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags) 505 clientinfo.Appearance = new AvatarAppearance();
506 { 506 clientinfo.BaseFolder = UUID.Zero;
507 //throw new System.NotImplementedException(); 507 clientinfo.CapsPath = "";
508 } 508 clientinfo.child = false;
509 509 clientinfo.ChildrenCapSeeds = new Dictionary<ulong, string>();
510 public void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL) 510 clientinfo.circuitcode = CircuitCode;
511 { 511 clientinfo.firstname = FirstName;
512 // Need to translate to MXP somehow 512 clientinfo.InventoryFolder = UUID.Zero;
513 } 513 clientinfo.lastname = LastName;
514 514 clientinfo.SecureSessionID = SecureSessionId;
515 public void SendTeleportFailed(string reason) 515 clientinfo.SessionID = SessionId;
516 { 516 clientinfo.startpos = StartPos;
517 // Need to translate to MXP somehow 517
518 } 518 return clientinfo;
519 519 }
520 public void SendTeleportLocationStart() 520
521 { 521 public void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL)
522 // Need to translate to MXP somehow 522 {
523 } 523 // TODO: We'll want to get this one working.
524 524 // Need to translate to MXP somehow
525 public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) 525 }
526 { 526
527 // Need to translate to MXP somehow 527 public void SendMapBlock(List<MapBlockData> mapBlocks, uint flag)
528 } 528 {
529 529 // Need to translate to MXP somehow
530 public void SendPayPrice(UUID objectID, int[] payPrice) 530 }
531 { 531
532 // Need to translate to MXP somehow 532 public void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags)
533 } 533 {
534 534 //throw new System.NotImplementedException();
535 public void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID, uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation) 535 }
536 { 536
537 // TODO: This needs handling - to display other avatars 537 public void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL)
538 } 538 {
539 539 // Need to translate to MXP somehow
540 public void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Vector3 velocity, Quaternion rotation) 540 }
541 { 541
542 // TODO: This probably needs handling - update other avatar positions 542 public void SendTeleportFailed(string reason)
543 } 543 {
544 544 // Need to translate to MXP somehow
545 public void SendCoarseLocationUpdate(List<Vector3> CoarseLocations) 545 }
546 { 546
547 // Minimap function, not used. 547 public void SendTeleportLocationStart()
548 } 548 {
549 549 // Need to translate to MXP somehow
550 public void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID) 550 }
551 { 551
552 // Need to translate to MXP somehow 552 public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance)
553 } 553 {
554 554 // Need to translate to MXP somehow
555 public void SetChildAgentThrottle(byte[] throttle) 555 }
556 { 556
557 // Need to translate to MXP somehow 557 public void SendPayPrice(UUID objectID, int[] payPrice)
558 } 558 {
559 559 // Need to translate to MXP somehow
560 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) 560 }
561 { 561
562 MXPSendPrimitive(localID, ownerID, acc, rvel, primShape, pos, objectID, vel, rotation); 562 public void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID, uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation)
563 } 563 {
564 564 // TODO: This needs handling - to display other avatars
565 private void MXPSendPrimitive(uint localID, UUID ownerID, Vector3 acc, Vector3 rvel, PrimitiveBaseShape primShape, Vector3 pos, UUID objectID, Vector3 vel, Quaternion rotation) 565 }
566 { 566
567 m_log.Info("[MXP] Transmitting Primitive"); 567 public void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Vector3 velocity, Quaternion rotation)
568 568 {
569 PerceptionEventMessage pe = new PerceptionEventMessage(); 569 // TODO: This probably needs handling - update other avatar positions
570 570 }
571 pe.ObjectFragment.ObjectIndex = localID; 571
572 pe.ObjectFragment.ObjectName = "Object"; 572 public void SendCoarseLocationUpdate(List<Vector3> CoarseLocations)
573 pe.ObjectFragment.OwnerId = ownerID.Guid; 573 {
574 pe.ObjectFragment.TypeId = Guid.Empty; 574 // Minimap function, not used.
575 575 }
576 pe.ObjectFragment.Acceleration = new float[] { acc.X, acc.Y, acc.Z }; 576
577 pe.ObjectFragment.AngularAcceleration = new float[4]; 577 public void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID)
578 pe.ObjectFragment.AngularVelocity = new float[] { rvel.X, rvel.Y, rvel.Z, 0.0f }; 578 {
579 pe.ObjectFragment.BoundingSphereRadius = primShape.Scale.Length()/2.0f; 579 // Need to translate to MXP somehow
580 580 }
581 pe.ObjectFragment.Location = new float[] { pos.X - 120.0f, pos.Z, pos.Y - 128.0f }; 581
582 582 public void SetChildAgentThrottle(byte[] throttle)
583 pe.ObjectFragment.Mass = 1.0f; 583 {
584 pe.ObjectFragment.ObjectId = objectID.Guid; 584 // Need to translate to MXP somehow
585 pe.ObjectFragment.Orientation = new float[] { rotation.X, rotation.Y, rotation.Z, rotation.W }; 585 }
586 pe.ObjectFragment.ParentObjectId = Guid.Empty; 586
587 pe.ObjectFragment.Velocity = new float[] { vel.X, vel.Y, vel.Z }; 587 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)
588 588 {
589 pe.ObjectFragment.StatePayloadDialect = ""; 589 MXPSendPrimitive(localID, ownerID, acc, rvel, primShape, pos, objectID, vel, rotation);
590 pe.ObjectFragment.StatePayloadLength = 0; 590 }
591 pe.ObjectFragment.SetStatePayloadData(new byte[0]); 591
592 592 private void MXPSendPrimitive(uint localID, UUID ownerID, Vector3 acc, Vector3 rvel, PrimitiveBaseShape primShape, Vector3 pos, UUID objectID, Vector3 vel, Quaternion rotation)
593 Session.Send(pe); 593 {
594 } 594 m_log.Info("[MXP] Transmitting Primitive");
595 595
596 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) 596 PerceptionEventMessage pe = new PerceptionEventMessage();
597 { 597
598 MXPSendPrimitive(localID, ownerID, acc, rvel, primShape, pos, objectID, vel, rotation); 598 pe.ObjectFragment.ObjectIndex = localID;
599 } 599 pe.ObjectFragment.ObjectName = "Object";
600 600 pe.ObjectFragment.OwnerId = ownerID.Guid;
601 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) 601 pe.ObjectFragment.TypeId = Guid.Empty;
602 { 602
603 MovementEventMessage me = new MovementEventMessage(); 603 pe.ObjectFragment.Acceleration = new float[] { acc.X, acc.Y, acc.Z };
604 me.ObjectIndex = localID; 604 pe.ObjectFragment.AngularAcceleration = new float[4];
605 me.Location = new float[] {position.X, position.Y, position.Z}; 605 pe.ObjectFragment.AngularVelocity = new float[] { rvel.X, rvel.Y, rvel.Z, 0.0f };
606 me.Orientation = new float[] {rotation.X, rotation.Y, rotation.Z, rotation.W}; 606 pe.ObjectFragment.BoundingSphereRadius = primShape.Scale.Length()/2.0f;
607 607
608 Session.Send(me); 608 pe.ObjectFragment.Location = new float[] { pos.X - 120.0f, pos.Z, pos.Y - 128.0f };
609 } 609
610 610 pe.ObjectFragment.Mass = 1.0f;
611 public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, bool fetchFolders, bool fetchItems) 611 pe.ObjectFragment.ObjectId = objectID.Guid;
612 { 612 pe.ObjectFragment.Orientation = new float[] { rotation.X, rotation.Y, rotation.Z, rotation.W };
613 // Need to translate to MXP somehow 613 pe.ObjectFragment.ParentObjectId = Guid.Empty;
614 } 614 pe.ObjectFragment.Velocity = new float[] { vel.X, vel.Y, vel.Z };
615 615
616 public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item) 616 pe.ObjectFragment.StatePayloadDialect = "";
617 { 617 pe.ObjectFragment.StatePayloadLength = 0;
618 // Need to translate to MXP somehow 618 pe.ObjectFragment.SetStatePayloadData(new byte[0]);
619 } 619
620 620 Session.Send(pe);
621 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId) 621 }
622 { 622
623 // Need to translate to MXP somehow 623 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)
624 } 624 {
625 625 MXPSendPrimitive(localID, ownerID, acc, rvel, primShape, pos, objectID, vel, rotation);
626 public void SendRemoveInventoryItem(UUID itemID) 626 }
627 { 627
628 // Need to translate to MXP somehow 628 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)
629 } 629 {
630 630 MovementEventMessage me = new MovementEventMessage();
631 public void SendTakeControls(int controls, bool passToAgent, bool TakeControls) 631 me.ObjectIndex = localID;
632 { 632 me.Location = new float[] {position.X, position.Y, position.Z};
633 // Need to translate to MXP somehow 633 me.Orientation = new float[] {rotation.X, rotation.Y, rotation.Z, rotation.W};
634 } 634
635 635 Session.Send(me);
636 public void SendTaskInventory(UUID taskID, short serial, byte[] fileName) 636 }
637 { 637
638 // Need to translate to MXP somehow 638 public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List<InventoryItemBase> items, List<InventoryFolderBase> folders, bool fetchFolders, bool fetchItems)
639 } 639 {
640 640 // Need to translate to MXP somehow
641 public void SendBulkUpdateInventory(InventoryNodeBase node) 641 }
642 { 642
643 // Need to translate to MXP somehow 643 public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item)
644 } 644 {
645 645 // Need to translate to MXP somehow
646 public void SendXferPacket(ulong xferID, uint packet, byte[] data) 646 }
647 { 647
648 // SL Specific, Ignore. (Remove from IClient) 648 public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId)
649 } 649 {
650 650 // Need to translate to MXP somehow
651 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) 651 }
652 { 652
653 // SL Specific, Ignore. (Remove from IClient) 653 public void SendRemoveInventoryItem(UUID itemID)
654 } 654 {
655 655 // Need to translate to MXP somehow
656 public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data) 656 }
657 { 657
658 // Need to translate to MXP somehow 658 public void SendTakeControls(int controls, bool passToAgent, bool TakeControls)
659 } 659 {
660 660 // Need to translate to MXP somehow
661 public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) 661 }
662 { 662
663 // Need to translate to MXP somehow 663 public void SendTaskInventory(UUID taskID, short serial, byte[] fileName)
664 // TODO: This may need doing - involves displaying the users avatar name 664 {
665 } 665 // Need to translate to MXP somehow
666 666 }
667 public void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID) 667
668 { 668 public void SendBulkUpdateInventory(InventoryNodeBase node)
669 // Need to translate to MXP somehow 669 {
670 } 670 // Need to translate to MXP somehow
671 671 }
672 public void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags) 672
673 { 673 public void SendXferPacket(ulong xferID, uint packet, byte[] data)
674 // Need to translate to MXP somehow 674 {
675 } 675 // SL Specific, Ignore. (Remove from IClient)
676 676 }
677 public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain) 677
678 { 678 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)
679 // Need to translate to MXP somehow 679 {
680 } 680 // SL Specific, Ignore. (Remove from IClient)
681 681 }
682 public void SendAttachedSoundGainChange(UUID objectID, float gain) 682
683 { 683 public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data)
684 // Need to translate to MXP somehow 684 {
685 } 685 // Need to translate to MXP somehow
686 686 }
687 public void SendNameReply(UUID profileId, string firstname, string lastname) 687
688 { 688 public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle)
689 // SL Specific 689 {
690 } 690 // Need to translate to MXP somehow
691 691 // TODO: This may need doing - involves displaying the users avatar name
692 public void SendAlertMessage(string message) 692 }
693 { 693
694 SendChatMessage(message, 0, Vector3.Zero, "System", UUID.Zero, 0, 0); 694 public void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID)
695 } 695 {
696 696 // Need to translate to MXP somehow
697 public void SendAgentAlertMessage(string message, bool modal) 697 }
698 { 698
699 SendChatMessage(message, 0, Vector3.Zero, "System" + (modal ? " Notice" : ""), UUID.Zero, 0, 0); 699 public void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags)
700 } 700 {
701 701 // Need to translate to MXP somehow
702 public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url) 702 }
703 { 703
704 // TODO: Probably can do this better 704 public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain)
705 SendChatMessage("Please visit: " + url, 0, Vector3.Zero, objectname, UUID.Zero, 0, 0); 705 {
706 } 706 // Need to translate to MXP somehow
707 707 }
708 public void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels) 708
709 { 709 public void SendAttachedSoundGainChange(UUID objectID, float gain)
710 // TODO: Probably can do this better 710 {
711 SendChatMessage("Dialog: " + msg, 0, Vector3.Zero, objectname, UUID.Zero, 0, 0); 711 // Need to translate to MXP somehow
712 } 712 }
713 713
714 public bool AddMoney(int debit) 714 public void SendNameReply(UUID profileId, string firstname, string lastname)
715 { 715 {
716 SendChatMessage("You were paid: " + debit, 0, Vector3.Zero, "System", UUID.Zero, 0, 0); 716 // SL Specific
717 return true; 717 }
718 } 718
719 719 public void SendAlertMessage(string message)
720 public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition) 720 {
721 { 721 SendChatMessage(message, 0, Vector3.Zero, "System", UUID.Zero, 0, 0);
722 // Need to translate to MXP somehow 722 }
723 // Send a light object? 723
724 } 724 public void SendAgentAlertMessage(string message, bool modal)
725 725 {
726 public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks) 726 SendChatMessage(message, 0, Vector3.Zero, "System" + (modal ? " Notice" : ""), UUID.Zero, 0, 0);
727 { 727 }
728 // Need to translate to MXP somehow 728
729 } 729 public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url)
730 730 {
731 public void SendViewerTime(int phase) 731 // TODO: Probably can do this better
732 { 732 SendChatMessage("Please visit: " + url, 0, Vector3.Zero, objectname, UUID.Zero, 0, 0);
733 // Need to translate to MXP somehow 733 }
734 } 734
735 735 public void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels)
736 public UUID GetDefaultAnimation(string name) 736 {
737 { 737 // TODO: Probably can do this better
738 return UUID.Zero; 738 SendChatMessage("Dialog: " + msg, 0, Vector3.Zero, objectname, UUID.Zero, 0, 0);
739 } 739 }
740 740
741 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] charterMember, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID) 741 public bool AddMoney(int debit)
742 { 742 {
743 // Need to translate to MXP somehow 743 SendChatMessage("You were paid: " + debit, 0, Vector3.Zero, "System", UUID.Zero, 0, 0);
744 } 744 return true;
745 745 }
746 public void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question) 746
747 { 747 public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition)
748 // Need to translate to MXP somehow 748 {
749 } 749 // Need to translate to MXP somehow
750 750 // Send a light object?
751 public void SendHealth(float health) 751 }
752 { 752
753 // Need to translate to MXP somehow 753 public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks)
754 } 754 {
755 755 // Need to translate to MXP somehow
756 public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) 756 }
757 { 757
758 // Need to translate to MXP somehow 758 public void SendViewerTime(int phase)
759 } 759 {
760 760 // Need to translate to MXP somehow
761 public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID) 761 }
762 { 762
763 // Need to translate to MXP somehow 763 public UUID GetDefaultAnimation(string name)
764 } 764 {
765 765 return UUID.Zero;
766 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) 766 }
767 { 767
768 // Need to translate to MXP somehow 768 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] charterMember, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID)
769 } 769 {
770 770 // Need to translate to MXP somehow
771 public void SendEstateCovenantInformation(UUID covenant) 771 }
772 { 772
773 // Need to translate to MXP somehow 773 public void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question)
774 } 774 {
775 775 // Need to translate to MXP somehow
776 public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner) 776 }
777 { 777
778 // Need to translate to MXP somehow 778 public void SendHealth(float health)
779 } 779 {
780 780 // Need to translate to MXP somehow
781 public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) 781 }
782 { 782
783 // Need to translate to MXP somehow 783 public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID)
784 } 784 {
785 785 // Need to translate to MXP somehow
786 public void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID) 786 }
787 { 787
788 // Need to translate to MXP somehow 788 public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID)
789 } 789 {
790 790 // Need to translate to MXP somehow
791 public void SendForceClientSelectObjects(List<uint> objectIDs) 791 }
792 { 792
793 // Need to translate to MXP somehow 793 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args)
794 } 794 {
795 795 // Need to translate to MXP somehow
796 public void SendLandObjectOwners(Dictionary<UUID, int> ownersAndCount) 796 }
797 { 797
798 // Need to translate to MXP somehow 798 public void SendEstateCovenantInformation(UUID covenant)
799 } 799 {
800 800 // Need to translate to MXP somehow
801 public void SendLandParcelOverlay(byte[] data, int sequence_id) 801 }
802 { 802
803 // Need to translate to MXP somehow 803 public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner)
804 } 804 {
805 805 // Need to translate to MXP somehow
806 public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time) 806 }
807 { 807
808 // Need to translate to MXP somehow 808 public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
809 } 809 {
810 810 // Need to translate to MXP somehow
811 public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop) 811 }
812 { 812
813 // Need to translate to MXP somehow 813 public void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID)
814 } 814 {
815 815 // Need to translate to MXP somehow
816 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) 816 }
817 { 817
818 // Need to translate to MXP somehow 818 public void SendForceClientSelectObjects(List<uint> objectIDs)
819 } 819 {
820 820 // Need to translate to MXP somehow
821 public void SendConfirmXfer(ulong xferID, uint PacketID) 821 }
822 { 822
823 // Need to translate to MXP somehow 823 public void SendLandObjectOwners(Dictionary<UUID, int> ownersAndCount)
824 } 824 {
825 825 // Need to translate to MXP somehow
826 public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName) 826 }
827 { 827
828 // Need to translate to MXP somehow 828 public void SendLandParcelOverlay(byte[] data, int sequence_id)
829 } 829 {
830 830 // Need to translate to MXP somehow
831 public void SendInitiateDownload(string simFileName, string clientFileName) 831 }
832 { 832
833 // Need to translate to MXP somehow 833 public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time)
834 } 834 {
835 835 // Need to translate to MXP somehow
836 public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) 836 }
837 { 837
838 // Need to translate to MXP somehow 838 public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop)
839 } 839 {
840 840 // Need to translate to MXP somehow
841 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData) 841 }
842 { 842
843 // Need to translate to MXP somehow 843 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID)
844 } 844 {
845 845 // Need to translate to MXP somehow
846 public void SendImageNotFound(UUID imageid) 846 }
847 { 847
848 // Need to translate to MXP somehow 848 public void SendConfirmXfer(ulong xferID, uint PacketID)
849 } 849 {
850 850 // Need to translate to MXP somehow
851 public void SendShutdownConnectionNotice() 851 }
852 { 852
853 // Need to translate to MXP somehow 853 public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName)
854 } 854 {
855 855 // Need to translate to MXP somehow
856 public void SendSimStats(SimStats stats) 856 }
857 { 857
858 // Need to translate to MXP somehow 858 public void SendInitiateDownload(string simFileName, string clientFileName)
859 } 859 {
860 860 // Need to translate to MXP somehow
861 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) 861 }
862 { 862
863 //throw new System.NotImplementedException(); 863 public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
864 } 864 {
865 865 // Need to translate to MXP somehow
866 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) 866 }
867 { 867
868 //throw new System.NotImplementedException(); 868 public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
869 } 869 {
870 870 // Need to translate to MXP somehow
871 public void SendAgentOffline(UUID[] agentIDs) 871 }
872 { 872
873 // Need to translate to MXP somehow (Friends List) 873 public void SendImageNotFound(UUID imageid)
874 } 874 {
875 875 // Need to translate to MXP somehow
876 public void SendAgentOnline(UUID[] agentIDs) 876 }
877 { 877
878 // Need to translate to MXP somehow (Friends List) 878 public void SendShutdownConnectionNotice()
879 } 879 {
880 880 // Need to translate to MXP somehow
881 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) 881 }
882 { 882
883 // Need to translate to MXP somehow 883 public void SendSimStats(SimStats stats)
884 } 884 {
885 885 // Need to translate to MXP somehow
886 public void SendAdminResponse(UUID Token, uint AdminLevel) 886 }
887 { 887
888 // Need to translate to MXP somehow 888 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)
889 } 889 {
890 890 //throw new System.NotImplementedException();
891 public void SendGroupMembership(GroupMembershipData[] GroupMembership) 891 }
892 { 892
893 // Need to translate to MXP somehow 893 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)
894 } 894 {
895 895 //throw new System.NotImplementedException();
896 public void SendGroupNameReply(UUID groupLLUID, string GroupName) 896 }
897 { 897
898 // Need to translate to MXP somehow 898 public void SendAgentOffline(UUID[] agentIDs)
899 } 899 {
900 900 // Need to translate to MXP somehow (Friends List)
901 public void SendJoinGroupReply(UUID groupID, bool success) 901 }
902 { 902
903 // Need to translate to MXP somehow 903 public void SendAgentOnline(UUID[] agentIDs)
904 } 904 {
905 905 // Need to translate to MXP somehow (Friends List)
906 public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success) 906 }
907 { 907
908 // Need to translate to MXP somehow 908 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook)
909 } 909 {
910 910 // Need to translate to MXP somehow
911 public void SendLeaveGroupReply(UUID groupID, bool success) 911 }
912 { 912
913 // Need to translate to MXP somehow 913 public void SendAdminResponse(UUID Token, uint AdminLevel)
914 } 914 {
915 915 // Need to translate to MXP somehow
916 public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia) 916 }
917 { 917
918 // Need to translate to MXP somehow 918 public void SendGroupMembership(GroupMembershipData[] GroupMembership)
919 } 919 {
920 920 // Need to translate to MXP somehow
921 public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running) 921 }
922 { 922
923 // Need to translate to MXP somehow 923 public void SendGroupNameReply(UUID groupLLUID, string GroupName)
924 } 924 {
925 925 // Need to translate to MXP somehow
926 public void SendAsset(AssetRequestToClient req) 926 }
927 { 927
928 // Need to translate to MXP somehow 928 public void SendJoinGroupReply(UUID groupID, bool success)
929 } 929 {
930 930 // Need to translate to MXP somehow
931 public void SendTexture(AssetBase TextureAsset) 931 }
932 { 932
933 // Need to translate to MXP somehow 933 public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success)
934 } 934 {
935 935 // Need to translate to MXP somehow
936 public byte[] GetThrottlesPacked(float multiplier) 936 }
937 { 937
938 // LL Specific, get out of IClientAPI 938 public void SendLeaveGroupReply(UUID groupID, bool success)
939 939 {
940 const int singlefloat = 4; 940 // Need to translate to MXP somehow
941 float tResend = multiplier; 941 }
942 float tLand = multiplier; 942
943 float tWind = multiplier; 943 public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia)
944 float tCloud = multiplier; 944 {
945 float tTask = multiplier; 945 // Need to translate to MXP somehow
946 float tTexture = multiplier; 946 }
947 float tAsset = multiplier; 947
948 948 public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running)
949 byte[] throttles = new byte[singlefloat * 7]; 949 {
950 int i = 0; 950 // Need to translate to MXP somehow
951 Buffer.BlockCopy(BitConverter.GetBytes(tResend), 0, throttles, singlefloat * i, singlefloat); 951 }
952 i++; 952
953 Buffer.BlockCopy(BitConverter.GetBytes(tLand), 0, throttles, singlefloat * i, singlefloat); 953 public void SendAsset(AssetRequestToClient req)
954 i++; 954 {
955 Buffer.BlockCopy(BitConverter.GetBytes(tWind), 0, throttles, singlefloat * i, singlefloat); 955 // Need to translate to MXP somehow
956 i++; 956 }
957 Buffer.BlockCopy(BitConverter.GetBytes(tCloud), 0, throttles, singlefloat * i, singlefloat); 957
958 i++; 958 public void SendTexture(AssetBase TextureAsset)
959 Buffer.BlockCopy(BitConverter.GetBytes(tTask), 0, throttles, singlefloat * i, singlefloat); 959 {
960 i++; 960 // Need to translate to MXP somehow
961 Buffer.BlockCopy(BitConverter.GetBytes(tTexture), 0, throttles, singlefloat * i, singlefloat); 961 }
962 i++; 962
963 Buffer.BlockCopy(BitConverter.GetBytes(tAsset), 0, throttles, singlefloat * i, singlefloat); 963 public byte[] GetThrottlesPacked(float multiplier)
964 964 {
965 return throttles; 965 // LL Specific, get out of IClientAPI
966 } 966
967 967 const int singlefloat = 4;
968 public event ViewerEffectEventHandler OnViewerEffect; 968 float tResend = multiplier;
969 public event Action<IClientAPI> OnLogout; 969 float tLand = multiplier;
970 public event Action<IClientAPI> OnConnectionClosed; 970 float tWind = multiplier;
971 971 float tCloud = multiplier;
972 972 float tTask = multiplier;
973 public void SendBlueBoxMessage(UUID FromAvatarID, string FromAvatarName, string Message) 973 float tTexture = multiplier;
974 { 974 float tAsset = multiplier;
975 SendChatMessage(Message, 0, Vector3.Zero, FromAvatarName, UUID.Zero, 0, 0); 975
976 } 976 byte[] throttles = new byte[singlefloat * 7];
977 977 int i = 0;
978 public void SendLogoutPacket() 978 Buffer.BlockCopy(BitConverter.GetBytes(tResend), 0, throttles, singlefloat * i, singlefloat);
979 { 979 i++;
980 LeaveRequestMessage lrm = new LeaveRequestMessage(); 980 Buffer.BlockCopy(BitConverter.GetBytes(tLand), 0, throttles, singlefloat * i, singlefloat);
981 Session.Send(lrm); 981 i++;
982 } 982 Buffer.BlockCopy(BitConverter.GetBytes(tWind), 0, throttles, singlefloat * i, singlefloat);
983 983 i++;
984 public ClientInfo GetClientInfo() 984 Buffer.BlockCopy(BitConverter.GetBytes(tCloud), 0, throttles, singlefloat * i, singlefloat);
985 { 985 i++;
986 return null; 986 Buffer.BlockCopy(BitConverter.GetBytes(tTask), 0, throttles, singlefloat * i, singlefloat);
987 //throw new System.NotImplementedException(); 987 i++;
988 } 988 Buffer.BlockCopy(BitConverter.GetBytes(tTexture), 0, throttles, singlefloat * i, singlefloat);
989 989 i++;
990 public void SetClientInfo(ClientInfo info) 990 Buffer.BlockCopy(BitConverter.GetBytes(tAsset), 0, throttles, singlefloat * i, singlefloat);
991 { 991
992 //throw new System.NotImplementedException(); 992 return throttles;
993 } 993 }
994 994
995 public void SetClientOption(string option, string value) 995 public event ViewerEffectEventHandler OnViewerEffect;
996 { 996 public event Action<IClientAPI> OnLogout;
997 // Need to translate to MXP somehow 997 public event Action<IClientAPI> OnConnectionClosed;
998 } 998
999 999
1000 public string GetClientOption(string option) 1000 public void SendBlueBoxMessage(UUID FromAvatarID, string FromAvatarName, string Message)
1001 { 1001 {
1002 // Need to translate to MXP somehow 1002 SendChatMessage(Message, 0, Vector3.Zero, FromAvatarName, UUID.Zero, 0, 0);
1003 return ""; 1003 }
1004 } 1004
1005 1005 public void SendLogoutPacket()
1006 public void Terminate() 1006 {
1007 { 1007 LeaveRequestMessage lrm = new LeaveRequestMessage();
1008 Close(false); 1008 Session.Send(lrm);
1009 } 1009 }
1010 1010
1011 public void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters) 1011 public ClientInfo GetClientInfo()
1012 { 1012 {
1013 // Need to translate to MXP somehow 1013 return null;
1014 } 1014 //throw new System.NotImplementedException();
1015 1015 }
1016 public void SendClearFollowCamProperties(UUID objectID) 1016
1017 { 1017 public void SetClientInfo(ClientInfo info)
1018 // Need to translate to MXP somehow 1018 {
1019 } 1019 //throw new System.NotImplementedException();
1020 1020 }
1021 public void SendRegionHandle(UUID regoinID, ulong handle) 1021
1022 { 1022 public void SetClientOption(string option, string value)
1023 // Need to translate to MXP somehow 1023 {
1024 } 1024 // Need to translate to MXP somehow
1025 1025 }
1026 public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y) 1026
1027 { 1027 public string GetClientOption(string option)
1028 // Need to translate to MXP somehow 1028 {
1029 } 1029 // Need to translate to MXP somehow
1030 1030 return "";
1031 public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt) 1031 }
1032 { 1032
1033 // Need to translate to MXP somehow 1033 public void Terminate()
1034 } 1034 {
1035 1035 Close(false);
1036 public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data) 1036 }
1037 { 1037
1038 // Need to translate to MXP somehow 1038 public void SendSetFollowCamProperties(UUID objectID, SortedDictionary<int, float> parameters)
1039 } 1039 {
1040 1040 // Need to translate to MXP somehow
1041 public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data) 1041 }
1042 { 1042
1043 // Need to translate to MXP somehow 1043 public void SendClearFollowCamProperties(UUID objectID)
1044 } 1044 {
1045 1045 // Need to translate to MXP somehow
1046 public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data) 1046 }
1047 { 1047
1048 // Need to translate to MXP somehow 1048 public void SendRegionHandle(UUID regoinID, ulong handle)
1049 } 1049 {
1050 1050 // Need to translate to MXP somehow
1051 public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data) 1051 }
1052 { 1052
1053 // Need to translate to MXP somehow 1053 public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y)
1054 } 1054 {
1055 1055 // Need to translate to MXP somehow
1056 public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data) 1056 }
1057 { 1057
1058 // Need to translate to MXP somehow 1058 public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt)
1059 } 1059 {
1060 1060 // Need to translate to MXP somehow
1061 public void SendDirLandReply(UUID queryID, DirLandReplyData[] data) 1061 }
1062 { 1062
1063 // Need to translate to MXP somehow 1063 public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data)
1064 } 1064 {
1065 1065 // Need to translate to MXP somehow
1066 public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data) 1066 }
1067 { 1067
1068 // Need to translate to MXP somehow 1068 public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data)
1069 } 1069 {
1070 1070 // Need to translate to MXP somehow
1071 public void SendEventInfoReply(EventData info) 1071 }
1072 { 1072
1073 // Need to translate to MXP somehow 1073 public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data)
1074 } 1074 {
1075 1075 // Need to translate to MXP somehow
1076 public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags) 1076 }
1077 { 1077
1078 // Need to translate to MXP somehow 1078 public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data)
1079 } 1079 {
1080 1080 // Need to translate to MXP somehow
1081 public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data) 1081 }
1082 { 1082
1083 // Need to translate to MXP somehow 1083 public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data)
1084 } 1084 {
1085 1085 // Need to translate to MXP somehow
1086 public void SendOfferCallingCard(UUID srcID, UUID transactionID) 1086 }
1087 { 1087
1088 // Need to translate to MXP somehow 1088 public void SendDirLandReply(UUID queryID, DirLandReplyData[] data)
1089 } 1089 {
1090 1090 // Need to translate to MXP somehow
1091 public void SendAcceptCallingCard(UUID transactionID) 1091 }
1092 { 1092
1093 // Need to translate to MXP somehow 1093 public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data)
1094 } 1094 {
1095 1095 // Need to translate to MXP somehow
1096 public void SendDeclineCallingCard(UUID transactionID) 1096 }
1097 { 1097
1098 // Need to translate to MXP somehow 1098 public void SendEventInfoReply(EventData info)
1099 } 1099 {
1100 1100 // Need to translate to MXP somehow
1101 public void SendTerminateFriend(UUID exFriendID) 1101 }
1102 { 1102
1103 // Need to translate to MXP somehow 1103 public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags)
1104 } 1104 {
1105 1105 // Need to translate to MXP somehow
1106 public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name) 1106 }
1107 { 1107
1108 // Need to translate to MXP somehow 1108 public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data)
1109 } 1109 {
1110 1110 // Need to translate to MXP somehow
1111 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) 1111 }
1112 { 1112
1113 // Need to translate to MXP somehow 1113 public void SendOfferCallingCard(UUID srcID, UUID transactionID)
1114 } 1114 {
1115 1115 // Need to translate to MXP somehow
1116 public void SendAgentDropGroup(UUID groupID) 1116 }
1117 { 1117
1118 // Need to translate to MXP somehow 1118 public void SendAcceptCallingCard(UUID transactionID)
1119 } 1119 {
1120 1120 // Need to translate to MXP somehow
1121 public void SendAvatarNotesReply(UUID targetID, string text) 1121 }
1122 { 1122
1123 // Need to translate to MXP somehow 1123 public void SendDeclineCallingCard(UUID transactionID)
1124 } 1124 {
1125 1125 // Need to translate to MXP somehow
1126 public void SendAvatarPicksReply(UUID targetID, Dictionary<UUID, string> picks) 1126 }
1127 { 1127
1128 // Need to translate to MXP somehow 1128 public void SendTerminateFriend(UUID exFriendID)
1129 } 1129 {
1130 1130 // Need to translate to MXP somehow
1131 public void SendAvatarClassifiedReply(UUID targetID, Dictionary<UUID, string> classifieds) 1131 }
1132 { 1132
1133 // Need to translate to MXP somehow 1133 public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name)
1134 } 1134 {
1135 1135 // Need to translate to MXP somehow
1136 public void SendParcelDwellReply(int localID, UUID parcelID, float dwell) 1136 }
1137 { 1137
1138 // Need to translate to MXP somehow 1138 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)
1139 } 1139 {
1140 1140 // Need to translate to MXP somehow
1141 public void SendUserInfoReply(bool imViaEmail, bool visible, string email) 1141 }
1142 { 1142
1143 // Need to translate to MXP somehow 1143 public void SendAgentDropGroup(UUID groupID)
1144 } 1144 {
1145 1145 // Need to translate to MXP somehow
1146 public void KillEndDone() 1146 }
1147 { 1147
1148 Stop(); 1148 public void SendAvatarNotesReply(UUID targetID, string text)
1149 } 1149 {
1150 1150 // Need to translate to MXP somehow
1151 public bool AddGenericPacketHandler(string MethodName, GenericMessage handler) 1151 }
1152 { 1152
1153 // Need to translate to MXP somehow 1153 public void SendAvatarPicksReply(UUID targetID, Dictionary<UUID, string> picks)
1154 return true; 1154 {
1155 } 1155 // Need to translate to MXP somehow
1156 1156 }
1157 #endregion 1157
1158 1158 public void SendAvatarClassifiedReply(UUID targetID, Dictionary<UUID, string> classifieds)
1159 #region IClientCore 1159 {
1160 1160 // Need to translate to MXP somehow
1161 public bool TryGet<T>(out T iface) 1161 }
1162 { 1162
1163 iface = default(T); 1163 public void SendParcelDwellReply(int localID, UUID parcelID, float dwell)
1164 return false; 1164 {
1165 } 1165 // Need to translate to MXP somehow
1166 1166 }
1167 public T Get<T>() 1167
1168 { 1168 public void SendUserInfoReply(bool imViaEmail, bool visible, string email)
1169 return default(T); 1169 {
1170 } 1170 // Need to translate to MXP somehow
1171 1171 }
1172 #endregion 1172
1173 } 1173 public void KillEndDone()
1174} 1174 {
1175 Stop();
1176 }
1177
1178 public bool AddGenericPacketHandler(string MethodName, GenericMessage handler)
1179 {
1180 // Need to translate to MXP somehow
1181 return true;
1182 }
1183
1184 #endregion
1185
1186 #region IClientCore
1187
1188 public bool TryGet<T>(out T iface)
1189 {
1190 iface = default(T);
1191 return false;
1192 }
1193
1194 public T Get<T>()
1195 {
1196 return default(T);
1197 }
1198
1199 #endregion
1200 }
1201}
diff --git a/OpenSim/Client/MXP/MXPModule.cs b/OpenSim/Client/MXP/MXPModule.cs
index f2b2f66..5873bf4 100644
--- a/OpenSim/Client/MXP/MXPModule.cs
+++ b/OpenSim/Client/MXP/MXPModule.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2using System.Collections.Generic; 29using System.Collections.Generic;
3using System.Text; 30using System.Text;
4using System.Timers; 31using System.Timers;
@@ -40,12 +67,11 @@ namespace OpenSim.Client.MXP
40 { 67 {
41 IConfig con = config.Configs["MXP"]; 68 IConfig con = config.Configs["MXP"];
42 69
43 if(!con.GetBoolean("Enabled",false)) 70 if (!con.GetBoolean("Enabled", false))
44 return; 71 return;
45 72
46 mxp_Port = con.GetInt("Port", mxp_Port); 73 mxp_Port = con.GetInt("Port", mxp_Port);
47 74
48
49 server = new MXPPacketServer("http://null", mxp_Port, m_scenes); 75 server = new MXPPacketServer("http://null", mxp_Port, m_scenes);
50 76
51 ticker.AutoReset = false; 77 ticker.AutoReset = false;
@@ -62,7 +88,7 @@ namespace OpenSim.Client.MXP
62 if (!shutdown) 88 if (!shutdown)
63 ticker.Start(); 89 ticker.Start();
64 90
65 if(++ticks % 100 == 0) 91 if (++ticks % 100 == 0)
66 { 92 {
67 server.PrintDebugInformation(); 93 server.PrintDebugInformation();
68 } 94 }
diff --git a/OpenSim/Client/MXP/MXPUtil.cs b/OpenSim/Client/MXP/MXPUtil.cs
index 674842b..cbf2eac 100644
--- a/OpenSim/Client/MXP/MXPUtil.cs
+++ b/OpenSim/Client/MXP/MXPUtil.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2using System.Collections.Generic; 29using System.Collections.Generic;
3using System.Text; 30using System.Text;
4using OpenMetaverse; 31using OpenMetaverse;
diff --git a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
index 1e343c4..e540286 100644
--- a/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
+++ b/OpenSim/Client/MXP/PacketHandler/MXPPacketServer.cs
@@ -1,4 +1,31 @@
1/* This file borrows heavily from MXPServer.cs - the reference MXPServer 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28/* This file borrows heavily from MXPServer.cs - the reference MXPServer
2 * See http://www.bubblecloud.org for a copy of the original file and 29 * See http://www.bubblecloud.org for a copy of the original file and
3 * implementation details. */ 30 * implementation details. */
4using System; 31using System;
@@ -415,6 +442,5 @@ namespace OpenSim.Client.MXP.PacketHandler
415 } 442 }
416 443
417 #endregion 444 #endregion
418
419 } 445 }
420} 446}
diff --git a/OpenSim/Grid/MessagingServer/IMessageRegionService.cs b/OpenSim/Grid/MessagingServer/IMessageRegionService.cs
index 907e89d..e203c98 100644
--- a/OpenSim/Grid/MessagingServer/IMessageRegionService.cs
+++ b/OpenSim/Grid/MessagingServer/IMessageRegionService.cs
@@ -1,11 +1,38 @@
1using System; 1/*
2using OpenSim.Data; 2 * Copyright (c) Contributors, http://opensimulator.org/
3 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4namespace OpenSim.Grid.MessagingServer 4 *
5{ 5 * Redistribution and use in source and binary forms, with or without
6 public interface IMessageRegionService 6 * modification, are permitted provided that the following conditions are met:
7 { 7 * * Redistributions of source code must retain the above copyright
8 int ClearRegionCache(); 8 * notice, this list of conditions and the following disclaimer.
9 RegionProfileData GetRegionInfo(ulong regionhandle); 9 * * Redistributions in binary form must reproduce the above copyright
10 } 10 * notice, this list of conditions and the following disclaimer in the
11} 11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using OpenSim.Data;
30
31namespace OpenSim.Grid.MessagingServer
32{
33 public interface IMessageRegionService
34 {
35 int ClearRegionCache();
36 RegionProfileData GetRegionInfo(ulong regionhandle);
37 }
38}
diff --git a/OpenSim/Grid/MessagingServer/IMessageUserServerService.cs b/OpenSim/Grid/MessagingServer/IMessageUserServerService.cs
index dff2052..2abbc41 100644
--- a/OpenSim/Grid/MessagingServer/IMessageUserServerService.cs
+++ b/OpenSim/Grid/MessagingServer/IMessageUserServerService.cs
@@ -1,8 +1,35 @@
1using System; 1/*
2namespace OpenSim.Grid.MessagingServer 2 * Copyright (c) Contributors, http://opensimulator.org/
3{ 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 public interface IMessageUserServerService 4 *
5 { 5 * Redistribution and use in source and binary forms, with or without
6 bool SendToUserServer(System.Collections.Hashtable request, string method); 6 * modification, are permitted provided that the following conditions are met:
7 } 7 * * Redistributions of source code must retain the above copyright
8} 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29namespace OpenSim.Grid.MessagingServer
30{
31 public interface IMessageUserServerService
32 {
33 bool SendToUserServer(System.Collections.Hashtable request, string method);
34 }
35}
diff --git a/OpenSim/Grid/MessagingServer/IUGAIMCore.cs b/OpenSim/Grid/MessagingServer/IUGAIMCore.cs
index 5ab1166..4428205 100644
--- a/OpenSim/Grid/MessagingServer/IUGAIMCore.cs
+++ b/OpenSim/Grid/MessagingServer/IUGAIMCore.cs
@@ -1,15 +1,42 @@
1using System; 1/*
2using System.Collections.Generic; 2 * Copyright (c) Contributors, http://opensimulator.org/
3using System.Text; 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4using OpenSim.Framework.Servers; 4 *
5 5 * Redistribution and use in source and binary forms, with or without
6namespace OpenSim.Grid.MessagingServer 6 * modification, are permitted provided that the following conditions are met:
7{ 7 * * Redistributions of source code must retain the above copyright
8 public interface IUGAIMCore 8 * notice, this list of conditions and the following disclaimer.
9 { 9 * * Redistributions in binary form must reproduce the above copyright
10 T Get<T>(); 10 * notice, this list of conditions and the following disclaimer in the
11 void RegisterInterface<T>(T iface); 11 * documentation and/or other materials provided with the distribution.
12 bool TryGet<T>(out T iface); 12 * * Neither the name of the OpenSimulator Project nor the
13 BaseHttpServer GetHttpServer(); 13 * names of its contributors may be used to endorse or promote products
14 } 14 * derived from this software without specific prior written permission.
15} 15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using System.Collections.Generic;
30using System.Text;
31using OpenSim.Framework.Servers;
32
33namespace OpenSim.Grid.MessagingServer
34{
35 public interface IUGAIMCore
36 {
37 T Get<T>();
38 void RegisterInterface<T>(T iface);
39 bool TryGet<T>(out T iface);
40 BaseHttpServer GetHttpServer();
41 }
42}
diff --git a/OpenSim/Grid/MessagingServer/MessageRegionModule.cs b/OpenSim/Grid/MessagingServer/MessageRegionModule.cs
index b3fd7ae..a2a7ade 100644
--- a/OpenSim/Grid/MessagingServer/MessageRegionModule.cs
+++ b/OpenSim/Grid/MessagingServer/MessageRegionModule.cs
@@ -1,212 +1,212 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the 12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products 13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission. 14 * derived from this software without specific prior written permission.
15 * 15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY 16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Net; 31using System.Net;
32using System.Reflection; 32using System.Reflection;
33using System.Threading; 33using System.Threading;
34using System.Timers; 34using System.Timers;
35using log4net; 35using log4net;
36using Nwc.XmlRpc; 36using Nwc.XmlRpc;
37using OpenMetaverse; 37using OpenMetaverse;
38using OpenSim.Data; 38using OpenSim.Data;
39using OpenSim.Framework; 39using OpenSim.Framework;
40using Timer = System.Timers.Timer; 40using Timer = System.Timers.Timer;
41 41
42namespace OpenSim.Grid.MessagingServer 42namespace OpenSim.Grid.MessagingServer
43{ 43{
44 public class MessageRegionModule : IMessageRegionService 44 public class MessageRegionModule : IMessageRegionService
45 { 45 {
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 private MessageServerConfig m_cfg; 48 private MessageServerConfig m_cfg;
49 49
50 private IMessageUserServerService m_userServerModule; 50 private IMessageUserServerService m_userServerModule;
51 51
52 private IUGAIMCore m_messageCore; 52 private IUGAIMCore m_messageCore;
53 53
54 // a dictionary of all current regions this server knows about 54 // a dictionary of all current regions this server knows about
55 private Dictionary<ulong, RegionProfileData> m_regionInfoCache = new Dictionary<ulong, RegionProfileData>(); 55 private Dictionary<ulong, RegionProfileData> m_regionInfoCache = new Dictionary<ulong, RegionProfileData>();
56 56
57 public MessageRegionModule(MessageServerConfig config, IUGAIMCore messageCore) 57 public MessageRegionModule(MessageServerConfig config, IUGAIMCore messageCore)
58 { 58 {
59 m_cfg = config; 59 m_cfg = config;
60 m_messageCore = messageCore; 60 m_messageCore = messageCore;
61 } 61 }
62 62
63 public void Initialise() 63 public void Initialise()
64 { 64 {
65 m_messageCore.RegisterInterface<IMessageRegionService>(this); 65 m_messageCore.RegisterInterface<IMessageRegionService>(this);
66 } 66 }
67 67
68 public void PostInitialise() 68 public void PostInitialise()
69 { 69 {
70 IMessageUserServerService messageUserServer; 70 IMessageUserServerService messageUserServer;
71 if (m_messageCore.TryGet<IMessageUserServerService>(out messageUserServer)) 71 if (m_messageCore.TryGet<IMessageUserServerService>(out messageUserServer))
72 { 72 {
73 m_userServerModule = messageUserServer; 73 m_userServerModule = messageUserServer;
74 } 74 }
75 } 75 }
76 76
77 public void RegisterHandlers() 77 public void RegisterHandlers()
78 { 78 {
79 //have these in separate method as some servers restart the http server and reregister all the handlers. 79 //have these in separate method as some servers restart the http server and reregister all the handlers.
80 80
81 } 81 }
82 82
83 /// <summary> 83 /// <summary>
84 /// Gets and caches a RegionInfo object from the gridserver based on regionhandle 84 /// Gets and caches a RegionInfo object from the gridserver based on regionhandle
85 /// if the regionhandle is already cached, use the cached values 85 /// if the regionhandle is already cached, use the cached values
86 /// Gets called by lots of threads!!!!! 86 /// Gets called by lots of threads!!!!!
87 /// </summary> 87 /// </summary>
88 /// <param name="regionhandle">handle to the XY of the region we're looking for</param> 88 /// <param name="regionhandle">handle to the XY of the region we're looking for</param>
89 /// <returns>A RegionInfo object to stick in the presence info</returns> 89 /// <returns>A RegionInfo object to stick in the presence info</returns>
90 public RegionProfileData GetRegionInfo(ulong regionhandle) 90 public RegionProfileData GetRegionInfo(ulong regionhandle)
91 { 91 {
92 RegionProfileData regionInfo = null; 92 RegionProfileData regionInfo = null;
93 93
94 lock (m_regionInfoCache) 94 lock (m_regionInfoCache)
95 { 95 {
96 m_regionInfoCache.TryGetValue(regionhandle, out regionInfo); 96 m_regionInfoCache.TryGetValue(regionhandle, out regionInfo);
97 } 97 }
98 98
99 if (regionInfo == null) // not found in cache 99 if (regionInfo == null) // not found in cache
100 { 100 {
101 regionInfo = RequestRegionInfo(regionhandle); 101 regionInfo = RequestRegionInfo(regionhandle);
102 102
103 if (regionInfo != null) // lookup was successful 103 if (regionInfo != null) // lookup was successful
104 { 104 {
105 lock (m_regionInfoCache) 105 lock (m_regionInfoCache)
106 { 106 {
107 m_regionInfoCache[regionhandle] = regionInfo; 107 m_regionInfoCache[regionhandle] = regionInfo;
108 } 108 }
109 } 109 }
110 } 110 }
111 111
112 return regionInfo; 112 return regionInfo;
113 } 113 }
114 114
115 public int ClearRegionCache() 115 public int ClearRegionCache()
116 { 116 {
117 int cachecount = 0; 117 int cachecount = 0;
118 118
119 lock (m_regionInfoCache) 119 lock (m_regionInfoCache)
120 { 120 {
121 cachecount = m_regionInfoCache.Count; 121 cachecount = m_regionInfoCache.Count;
122 m_regionInfoCache.Clear(); 122 m_regionInfoCache.Clear();
123 } 123 }
124 124
125 return cachecount; 125 return cachecount;
126 } 126 }
127 127
128 /// <summary> 128 /// <summary>
129 /// Get RegionProfileData from the GridServer. 129 /// Get RegionProfileData from the GridServer.
130 /// We'll cache this information in GetRegionInfo and use it for presence updates 130 /// We'll cache this information in GetRegionInfo and use it for presence updates
131 /// </summary> 131 /// </summary>
132 /// <param name="regionHandle"></param> 132 /// <param name="regionHandle"></param>
133 /// <returns></returns> 133 /// <returns></returns>
134 public RegionProfileData RequestRegionInfo(ulong regionHandle) 134 public RegionProfileData RequestRegionInfo(ulong regionHandle)
135 { 135 {
136 RegionProfileData regionProfile = null; 136 RegionProfileData regionProfile = null;
137 try 137 try
138 { 138 {
139 Hashtable requestData = new Hashtable(); 139 Hashtable requestData = new Hashtable();
140 requestData["region_handle"] = regionHandle.ToString(); 140 requestData["region_handle"] = regionHandle.ToString();
141 requestData["authkey"] = m_cfg.GridSendKey; 141 requestData["authkey"] = m_cfg.GridSendKey;
142 142
143 ArrayList SendParams = new ArrayList(); 143 ArrayList SendParams = new ArrayList();
144 SendParams.Add(requestData); 144 SendParams.Add(requestData);
145 145
146 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams); 146 XmlRpcRequest GridReq = new XmlRpcRequest("simulator_data_request", SendParams);
147 147
148 XmlRpcResponse GridResp = GridReq.Send(m_cfg.GridServerURL, 3000); 148 XmlRpcResponse GridResp = GridReq.Send(m_cfg.GridServerURL, 3000);
149 149
150 Hashtable responseData = (Hashtable)GridResp.Value; 150 Hashtable responseData = (Hashtable)GridResp.Value;
151 151
152 if (responseData.ContainsKey("error")) 152 if (responseData.ContainsKey("error"))
153 { 153 {
154 m_log.Error("[GRID]: error received from grid server" + responseData["error"]); 154 m_log.Error("[GRID]: error received from grid server" + responseData["error"]);
155 return null; 155 return null;
156 } 156 }
157 157
158 uint regX = Convert.ToUInt32((string)responseData["region_locx"]); 158 uint regX = Convert.ToUInt32((string)responseData["region_locx"]);
159 uint regY = Convert.ToUInt32((string)responseData["region_locy"]); 159 uint regY = Convert.ToUInt32((string)responseData["region_locy"]);
160 string internalIpStr = (string)responseData["sim_ip"]; 160 string internalIpStr = (string)responseData["sim_ip"];
161 161
162 regionProfile = new RegionProfileData(); 162 regionProfile = new RegionProfileData();
163 regionProfile.httpPort = (uint)Convert.ToInt32((string)responseData["http_port"]); 163 regionProfile.httpPort = (uint)Convert.ToInt32((string)responseData["http_port"]);
164 regionProfile.httpServerURI = "http://" + internalIpStr + ":" + regionProfile.httpPort + "/"; 164 regionProfile.httpServerURI = "http://" + internalIpStr + ":" + regionProfile.httpPort + "/";
165 regionProfile.regionHandle = Utils.UIntsToLong((regX * Constants.RegionSize), (regY * Constants.RegionSize)); 165 regionProfile.regionHandle = Utils.UIntsToLong((regX * Constants.RegionSize), (regY * Constants.RegionSize));
166 regionProfile.regionLocX = regX; 166 regionProfile.regionLocX = regX;
167 regionProfile.regionLocY = regY; 167 regionProfile.regionLocY = regY;
168 168
169 regionProfile.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); 169 regionProfile.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]);
170 regionProfile.UUID = new UUID((string)responseData["region_UUID"]); 170 regionProfile.UUID = new UUID((string)responseData["region_UUID"]);
171 regionProfile.regionName = (string)responseData["region_name"]; 171 regionProfile.regionName = (string)responseData["region_name"];
172 } 172 }
173 catch (WebException) 173 catch (WebException)
174 { 174 {
175 m_log.Error("[GRID]: " + 175 m_log.Error("[GRID]: " +
176 "Region lookup failed for: " + regionHandle.ToString() + 176 "Region lookup failed for: " + regionHandle.ToString() +
177 " - Is the GridServer down?"); 177 " - Is the GridServer down?");
178 } 178 }
179 179
180 return regionProfile; 180 return regionProfile;
181 } 181 }
182 182
183 public XmlRpcResponse RegionStartup(XmlRpcRequest request) 183 public XmlRpcResponse RegionStartup(XmlRpcRequest request)
184 { 184 {
185 Hashtable requestData = (Hashtable)request.Params[0]; 185 Hashtable requestData = (Hashtable)request.Params[0];
186 Hashtable result = new Hashtable(); 186 Hashtable result = new Hashtable();
187 result["success"] = "FALSE"; 187 result["success"] = "FALSE";
188 188
189 if (m_userServerModule.SendToUserServer(requestData, "region_startup")) 189 if (m_userServerModule.SendToUserServer(requestData, "region_startup"))
190 result["success"] = "TRUE"; 190 result["success"] = "TRUE";
191 191
192 XmlRpcResponse response = new XmlRpcResponse(); 192 XmlRpcResponse response = new XmlRpcResponse();
193 response.Value = result; 193 response.Value = result;
194 return response; 194 return response;
195 } 195 }
196 196
197 public XmlRpcResponse RegionShutdown(XmlRpcRequest request) 197 public XmlRpcResponse RegionShutdown(XmlRpcRequest request)
198 { 198 {
199 Hashtable requestData = (Hashtable)request.Params[0]; 199 Hashtable requestData = (Hashtable)request.Params[0];
200 Hashtable result = new Hashtable(); 200 Hashtable result = new Hashtable();
201 result["success"] = "FALSE"; 201 result["success"] = "FALSE";
202 202
203 if (m_userServerModule.SendToUserServer(requestData, "region_shutdown")) 203 if (m_userServerModule.SendToUserServer(requestData, "region_shutdown"))
204 result["success"] = "TRUE"; 204 result["success"] = "TRUE";
205 205
206 XmlRpcResponse response = new XmlRpcResponse(); 206 XmlRpcResponse response = new XmlRpcResponse();
207 response.Value = result; 207 response.Value = result;
208 return response; 208 return response;
209 } 209 }
210 210
211 } 211 }
212} 212}
diff --git a/OpenSim/Grid/MessagingServer/MessageUserServerModule.cs b/OpenSim/Grid/MessagingServer/MessageUserServerModule.cs
index 904674f..c6bf9e7 100644
--- a/OpenSim/Grid/MessagingServer/MessageUserServerModule.cs
+++ b/OpenSim/Grid/MessagingServer/MessageUserServerModule.cs
@@ -1,185 +1,185 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the 12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products 13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission. 14 * derived from this software without specific prior written permission.
15 * 15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY 16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Net; 31using System.Net;
32using System.Reflection; 32using System.Reflection;
33using System.Threading; 33using System.Threading;
34using System.Timers; 34using System.Timers;
35using log4net; 35using log4net;
36using Nwc.XmlRpc; 36using Nwc.XmlRpc;
37using OpenMetaverse; 37using OpenMetaverse;
38using OpenSim.Data; 38using OpenSim.Data;
39using OpenSim.Framework; 39using OpenSim.Framework;
40using Timer = System.Timers.Timer; 40using Timer = System.Timers.Timer;
41 41
42namespace OpenSim.Grid.MessagingServer 42namespace OpenSim.Grid.MessagingServer
43{ 43{
44 public class MessageUserServerModule : IMessageUserServerService 44 public class MessageUserServerModule : IMessageUserServerService
45 { 45 {
46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 46 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 47
48 private MessageServerConfig m_cfg; 48 private MessageServerConfig m_cfg;
49 49
50 private IUGAIMCore m_messageCore; 50 private IUGAIMCore m_messageCore;
51 51
52 private Timer reconnectTimer = new Timer(300000); // 5 mins 52 private Timer reconnectTimer = new Timer(300000); // 5 mins
53 53
54 public MessageUserServerModule(MessageServerConfig config, IUGAIMCore messageCore) 54 public MessageUserServerModule(MessageServerConfig config, IUGAIMCore messageCore)
55 { 55 {
56 m_cfg = config; 56 m_cfg = config;
57 m_messageCore = messageCore; 57 m_messageCore = messageCore;
58 58
59 reconnectTimer.Elapsed += registerWithUserServer; 59 reconnectTimer.Elapsed += registerWithUserServer;
60 reconnectTimer.Start(); 60 reconnectTimer.Start();
61 } 61 }
62 62
63 public void Initialise() 63 public void Initialise()
64 { 64 {
65 m_messageCore.RegisterInterface<IMessageUserServerService>(this); 65 m_messageCore.RegisterInterface<IMessageUserServerService>(this);
66 } 66 }
67 67
68 public void PostInitialise() 68 public void PostInitialise()
69 { 69 {
70 70
71 } 71 }
72 72
73 public void RegisterHandlers() 73 public void RegisterHandlers()
74 { 74 {
75 //have these in separate method as some servers restart the http server and reregister all the handlers. 75 //have these in separate method as some servers restart the http server and reregister all the handlers.
76 76
77 } 77 }
78 78
79 public void registerWithUserServer(object sender, ElapsedEventArgs e) 79 public void registerWithUserServer(object sender, ElapsedEventArgs e)
80 { 80 {
81 registerWithUserServer(); 81 registerWithUserServer();
82 } 82 }
83 83
84 public bool registerWithUserServer() 84 public bool registerWithUserServer()
85 { 85 {
86 Hashtable UserParams = new Hashtable(); 86 Hashtable UserParams = new Hashtable();
87 // Login / Authentication 87 // Login / Authentication
88 88
89 if (m_cfg.HttpSSL) 89 if (m_cfg.HttpSSL)
90 { 90 {
91 UserParams["uri"] = "https://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort; 91 UserParams["uri"] = "https://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort;
92 } 92 }
93 else 93 else
94 { 94 {
95 UserParams["uri"] = "http://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort; 95 UserParams["uri"] = "http://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort;
96 } 96 }
97 97
98 UserParams["recvkey"] = m_cfg.UserRecvKey; 98 UserParams["recvkey"] = m_cfg.UserRecvKey;
99 UserParams["sendkey"] = m_cfg.UserRecvKey; 99 UserParams["sendkey"] = m_cfg.UserRecvKey;
100 100
101 // Package into an XMLRPC Request 101 // Package into an XMLRPC Request
102 ArrayList SendParams = new ArrayList(); 102 ArrayList SendParams = new ArrayList();
103 SendParams.Add(UserParams); 103 SendParams.Add(UserParams);
104 104
105 bool success = true; 105 bool success = true;
106 string[] servers = m_cfg.UserServerURL.Split(' '); 106 string[] servers = m_cfg.UserServerURL.Split(' ');
107 107
108 foreach (string srv in servers) 108 foreach (string srv in servers)
109 { 109 {
110 // Send Request 110 // Send Request
111 try 111 try
112 { 112 {
113 XmlRpcRequest UserReq = new XmlRpcRequest("register_messageserver", SendParams); 113 XmlRpcRequest UserReq = new XmlRpcRequest("register_messageserver", SendParams);
114 XmlRpcResponse UserResp = UserReq.Send(srv, 16000); 114 XmlRpcResponse UserResp = UserReq.Send(srv, 16000);
115 115
116 // Process Response 116 // Process Response
117 Hashtable GridRespData = (Hashtable)UserResp.Value; 117 Hashtable GridRespData = (Hashtable)UserResp.Value;
118 // if we got a response, we were successful 118 // if we got a response, we were successful
119 if (!GridRespData.ContainsKey("responsestring")) 119 if (!GridRespData.ContainsKey("responsestring"))
120 success = false; 120 success = false;
121 else 121 else
122 m_log.InfoFormat("[SERVER] Registered with {0}", srv); 122 m_log.InfoFormat("[SERVER] Registered with {0}", srv);
123 } 123 }
124 catch 124 catch
125 { 125 {
126 m_log.ErrorFormat("Unable to connect to server {0}. Server not running?", srv); 126 m_log.ErrorFormat("Unable to connect to server {0}. Server not running?", srv);
127 success = false; 127 success = false;
128 } 128 }
129 } 129 }
130 return success; 130 return success;
131 } 131 }
132 132
133 public bool deregisterWithUserServer() 133 public bool deregisterWithUserServer()
134 { 134 {
135 Hashtable request = new Hashtable(); 135 Hashtable request = new Hashtable();
136 136
137 return SendToUserServer(request, "deregister_messageserver"); 137 return SendToUserServer(request, "deregister_messageserver");
138 } 138 }
139 139
140 public bool SendToUserServer(Hashtable request, string method) 140 public bool SendToUserServer(Hashtable request, string method)
141 { 141 {
142 // Login / Authentication 142 // Login / Authentication
143 143
144 if (m_cfg.HttpSSL) 144 if (m_cfg.HttpSSL)
145 { 145 {
146 request["uri"] = "https://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort; 146 request["uri"] = "https://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort;
147 } 147 }
148 else 148 else
149 { 149 {
150 request["uri"] = "http://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort; 150 request["uri"] = "http://" + m_cfg.MessageServerIP + ":" + m_cfg.HttpPort;
151 } 151 }
152 152
153 request["recvkey"] = m_cfg.UserRecvKey; 153 request["recvkey"] = m_cfg.UserRecvKey;
154 request["sendkey"] = m_cfg.UserRecvKey; 154 request["sendkey"] = m_cfg.UserRecvKey;
155 155
156 // Package into an XMLRPC Request 156 // Package into an XMLRPC Request
157 ArrayList SendParams = new ArrayList(); 157 ArrayList SendParams = new ArrayList();
158 SendParams.Add(request); 158 SendParams.Add(request);
159 159
160 bool success = true; 160 bool success = true;
161 string[] servers = m_cfg.UserServerURL.Split(' '); 161 string[] servers = m_cfg.UserServerURL.Split(' ');
162 162
163 // Send Request 163 // Send Request
164 foreach (string srv in servers) 164 foreach (string srv in servers)
165 { 165 {
166 try 166 try
167 { 167 {
168 XmlRpcRequest UserReq = new XmlRpcRequest(method, SendParams); 168 XmlRpcRequest UserReq = new XmlRpcRequest(method, SendParams);
169 XmlRpcResponse UserResp = UserReq.Send(m_cfg.UserServerURL, 16000); 169 XmlRpcResponse UserResp = UserReq.Send(m_cfg.UserServerURL, 16000);
170 // Process Response 170 // Process Response
171 Hashtable UserRespData = (Hashtable)UserResp.Value; 171 Hashtable UserRespData = (Hashtable)UserResp.Value;
172 // if we got a response, we were successful 172 // if we got a response, we were successful
173 if (!UserRespData.ContainsKey("responsestring")) 173 if (!UserRespData.ContainsKey("responsestring"))
174 success = false; 174 success = false;
175 } 175 }
176 catch 176 catch
177 { 177 {
178 m_log.ErrorFormat("Unable to connect to server {0}. Server not running?", srv); 178 m_log.ErrorFormat("Unable to connect to server {0}. Server not running?", srv);
179 success = false; 179 success = false;
180 } 180 }
181 } 181 }
182 return success; 182 return success;
183 } 183 }
184 } 184 }
185} 185}
diff --git a/OpenSim/Grid/MessagingServer/UserDataBaseService.cs b/OpenSim/Grid/MessagingServer/UserDataBaseService.cs
index f554cc2..32d5e61 100644
--- a/OpenSim/Grid/MessagingServer/UserDataBaseService.cs
+++ b/OpenSim/Grid/MessagingServer/UserDataBaseService.cs
@@ -1,75 +1,75 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the 12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products 13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission. 14 * derived from this software without specific prior written permission.
15 * 15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY 16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using OpenMetaverse; 28using OpenMetaverse;
29using OpenSim.Framework; 29using OpenSim.Framework;
30using OpenSim.Framework.Communications; 30using OpenSim.Framework.Communications;
31 31
32namespace OpenSim.Grid.MessagingServer 32namespace OpenSim.Grid.MessagingServer
33{ 33{
34 public class UserDataBaseService : UserManagerBase 34 public class UserDataBaseService : UserManagerBase
35 { 35 {
36 /// <summary> 36 /// <summary>
37 /// Constructor. 37 /// Constructor.
38 /// </summary> 38 /// </summary>
39 /// Passing null to parent because we never use any function that requires an interservice inventory call. 39 /// Passing null to parent because we never use any function that requires an interservice inventory call.
40 public UserDataBaseService() 40 public UserDataBaseService()
41 : base(null) 41 : base(null)
42 { 42 {
43 } 43 }
44 44
45 public UserAgentData GetUserAgentData(UUID AgentID) 45 public UserAgentData GetUserAgentData(UUID AgentID)
46 { 46 {
47 UserProfileData userProfile = GetUserProfile(AgentID); 47 UserProfileData userProfile = GetUserProfile(AgentID);
48 48
49 if (userProfile != null) 49 if (userProfile != null)
50 { 50 {
51 return userProfile.CurrentAgent; 51 return userProfile.CurrentAgent;
52 } 52 }
53 53
54 return null; 54 return null;
55 } 55 }
56 56
57 public override UserProfileData SetupMasterUser(string firstName, string lastName) 57 public override UserProfileData SetupMasterUser(string firstName, string lastName)
58 { 58 {
59 //throw new Exception("The method or operation is not implemented."); 59 //throw new Exception("The method or operation is not implemented.");
60 return null; 60 return null;
61 } 61 }
62 62
63 public override UserProfileData SetupMasterUser(string firstName, string lastName, string password) 63 public override UserProfileData SetupMasterUser(string firstName, string lastName, string password)
64 { 64 {
65 //throw new Exception("The method or operation is not implemented."); 65 //throw new Exception("The method or operation is not implemented.");
66 return null; 66 return null;
67 } 67 }
68 68
69 public override UserProfileData SetupMasterUser(UUID uuid) 69 public override UserProfileData SetupMasterUser(UUID uuid)
70 { 70 {
71 //throw new Exception("The method or operation is not implemented."); 71 //throw new Exception("The method or operation is not implemented.");
72 return null; 72 return null;
73 } 73 }
74 } 74 }
75} 75}
diff --git a/OpenSim/Grid/UserServer/UserDataBaseService.cs b/OpenSim/Grid/UserServer/UserDataBaseService.cs
index 6c144d9..85c98a6 100644
--- a/OpenSim/Grid/UserServer/UserDataBaseService.cs
+++ b/OpenSim/Grid/UserServer/UserDataBaseService.cs
@@ -1,68 +1,68 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright 7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright 9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the 12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products 13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission. 14 * derived from this software without specific prior written permission.
15 * 15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY 16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY 19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Reflection; 31using System.Reflection;
32using log4net; 32using log4net;
33using Nwc.XmlRpc; 33using Nwc.XmlRpc;
34using OpenMetaverse; 34using OpenMetaverse;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Framework.Communications; 36using OpenSim.Framework.Communications;
37using OpenSim.Framework.Servers; 37using OpenSim.Framework.Servers;
38 38
39namespace OpenSim.Grid.UserServer 39namespace OpenSim.Grid.UserServer
40{ 40{
41 public class UserDataBaseService : UserManagerBase 41 public class UserDataBaseService : UserManagerBase
42 { 42 {
43 public UserDataBaseService() 43 public UserDataBaseService()
44 : base(null) 44 : base(null)
45 { 45 {
46 } 46 }
47 47
48 public UserDataBaseService(IInterServiceInventoryServices interServiceInventoryService) 48 public UserDataBaseService(IInterServiceInventoryServices interServiceInventoryService)
49 : base(interServiceInventoryService) 49 : base(interServiceInventoryService)
50 { 50 {
51 } 51 }
52 52
53 public override UserProfileData SetupMasterUser(string firstName, string lastName) 53 public override UserProfileData SetupMasterUser(string firstName, string lastName)
54 { 54 {
55 throw new Exception("The method or operation is not implemented."); 55 throw new Exception("The method or operation is not implemented.");
56 } 56 }
57 57
58 public override UserProfileData SetupMasterUser(string firstName, string lastName, string password) 58 public override UserProfileData SetupMasterUser(string firstName, string lastName, string password)
59 { 59 {
60 throw new Exception("The method or operation is not implemented."); 60 throw new Exception("The method or operation is not implemented.");
61 } 61 }
62 62
63 public override UserProfileData SetupMasterUser(UUID uuid) 63 public override UserProfileData SetupMasterUser(UUID uuid)
64 { 64 {
65 throw new Exception("The method or operation is not implemented."); 65 throw new Exception("The method or operation is not implemented.");
66 } 66 }
67 } 67 }
68} 68}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 3cf3038..36b9702 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -863,7 +863,7 @@ namespace OpenSim.Region.Framework.Scenes
863 ThreadTracker.Add(m_updateEntitiesThread); 863 ThreadTracker.Add(m_updateEntitiesThread);
864 } 864 }
865 865
866 if(m_updateEntitiesThread.ThreadState == ThreadState.Stopped) 866 if (m_updateEntitiesThread.ThreadState == ThreadState.Stopped)
867 m_updateEntitiesThread.Start(); 867 m_updateEntitiesThread.Start();
868 */ 868 */
869 m_sceneGraph.UpdateEntities(); 869 m_sceneGraph.UpdateEntities();
@@ -2131,7 +2131,7 @@ namespace OpenSim.Region.Framework.Scenes
2131 { 2131 {
2132 AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(client.CircuitCode); 2132 AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(client.CircuitCode);
2133 2133
2134 if(aCircuit == null) 2134 if (aCircuit == null)
2135 { 2135 {
2136 m_log.DebugFormat("[APPEARANCE] Client did not supply a circuit. Non-Linden? Creating default appearance."); 2136 m_log.DebugFormat("[APPEARANCE] Client did not supply a circuit. Non-Linden? Creating default appearance.");
2137 appearance = new AvatarAppearance(client.AgentId); 2137 appearance = new AvatarAppearance(client.AgentId);
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
index 59d862d..5b851f6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs
@@ -339,7 +339,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
339 compileScript = LSL_Converter.Convert(Script); 339 compileScript = LSL_Converter.Convert(Script);
340 340
341 // copy converter warnings into our warnings. 341 // copy converter warnings into our warnings.
342 foreach(string warning in LSL_Converter.GetWarnings()) 342 foreach (string warning in LSL_Converter.GetWarnings())
343 { 343 {
344 AddWarning(warning); 344 AddWarning(warning);
345 } 345 }