aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorAdam Frisby2008-05-07 20:31:48 +0000
committerAdam Frisby2008-05-07 20:31:48 +0000
commita95f13a646e6c0ff07c765437011a29c3372f1b9 (patch)
tree7129f9dae3624287f7f8320d0cf16e90e46f0298 /OpenSim/Framework
parentenable velocity on our full update, as I think I know why (diff)
downloadopensim-SC-a95f13a646e6c0ff07c765437011a29c3372f1b9.zip
opensim-SC-a95f13a646e6c0ff07c765437011a29c3372f1b9.tar.gz
opensim-SC-a95f13a646e6c0ff07c765437011a29c3372f1b9.tar.bz2
opensim-SC-a95f13a646e6c0ff07c765437011a29c3372f1b9.tar.xz
* Removes references to libsecondlife.Packets from IClientAPI. BAD PROGRAMMERS. NAUGHTY.
* Thanks to Andrew (DeepThink) for working on this one.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/ClientManager.cs19
-rw-r--r--OpenSim/Framework/IClientAPI.cs84
2 files changed, 92 insertions, 11 deletions
diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs
index 35c9319..4f21ab6 100644
--- a/OpenSim/Framework/ClientManager.cs
+++ b/OpenSim/Framework/ClientManager.cs
@@ -171,11 +171,22 @@ namespace OpenSim.Framework
171 return circuits; 171 return circuits;
172 } 172 }
173 173
174 public void ViewerEffectHandler(IClientAPI sender, ViewerEffectPacket.EffectBlock[] effectBlock) 174 public void ViewerEffectHandler(IClientAPI sender, List<ViewerEffectEventHandlerArg> args)
175 { 175 {
176 ViewerEffectPacket packet = (ViewerEffectPacket) PacketPool.Instance.GetPacket(PacketType.ViewerEffect); 176 ViewerEffectPacket packet = (ViewerEffectPacket)PacketPool.Instance.GetPacket(PacketType.ViewerEffect);
177 // TODO: don't create new blocks if recycling an old packet 177 // TODO: don't create new blocks if recycling an old packet
178 packet.Effect = effectBlock; 178 List<ViewerEffectPacket.EffectBlock> effectBlock = new List<ViewerEffectPacket.EffectBlock>();
179 for (int i = 0; i < args.Count; i++)
180 {
181 ViewerEffectPacket.EffectBlock effect = new ViewerEffectPacket.EffectBlock();
182 effect.AgentID = args[i].AgentID;
183 effect.Color = args[i].Color;
184 effect.Duration = args[i].Duration;
185 effect.ID = args[i].ID;
186 effect.Type = args[i].Type;
187 effectBlock.Add(effect);
188 }
189 packet.Effect = effectBlock.ToArray();
179 190
180 // Wasteful, I know 191 // Wasteful, I know
181 IClientAPI[] LocalClients = new IClientAPI[0]; 192 IClientAPI[] LocalClients = new IClientAPI[0];
@@ -205,4 +216,4 @@ namespace OpenSim.Framework
205 } 216 }
206 } 217 }
207 } 218 }
208} \ No newline at end of file 219}
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 8344196..2ade592 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -41,7 +41,8 @@ namespace OpenSim.Framework
41 IClientAPI Sender { get; set; } 41 IClientAPI Sender { get; set; }
42 } 42 }
43 43
44 public delegate void ViewerEffectEventHandler(IClientAPI sender, ViewerEffectPacket.EffectBlock[] effectBlock); 44
45 public delegate void ViewerEffectEventHandler(IClientAPI sender, List<ViewerEffectEventHandlerArg> args);
45 46
46 public delegate void ChatFromViewer(Object sender, ChatFromViewerArgs e); 47 public delegate void ChatFromViewer(Object sender, ChatFromViewerArgs e);
47 48
@@ -235,6 +236,15 @@ namespace OpenSim.Framework
235 #endregion 236 #endregion
236 } 237 }
237 238
239 public class ViewerEffectEventHandlerArg : EventArgs
240 {
241 public LLUUID AgentID;
242 public byte[] Color;
243 public float Duration;
244 public LLUUID ID;
245 public byte Type;
246 }
247
238 public class LandUpdateArgs : EventArgs 248 public class LandUpdateArgs : EventArgs
239 { 249 {
240 public LLUUID AuthBuyerID; 250 public LLUUID AuthBuyerID;
@@ -301,6 +311,66 @@ namespace OpenSim.Framework
301 public float waterHeight; 311 public float waterHeight;
302 public string simName; 312 public string simName;
303 } 313 }
314
315 public class UpdateShapeArgs : EventArgs
316 {
317 public uint ObjectLocalID;
318 public ushort PathBegin;
319 public byte PathCurve;
320 public ushort PathEnd;
321 public sbyte PathRadiusOffset;
322 public byte PathRevolutions;
323 public byte PathScaleX;
324 public byte PathScaleY;
325 public byte PathShearX;
326 public byte PathShearY;
327 public sbyte PathSkew;
328 public sbyte PathTaperX;
329 public sbyte PathTaperY;
330 public sbyte PathTwist;
331 public sbyte PathTwistBegin;
332 public ushort ProfileBegin;
333 public byte ProfileCurve;
334 public ushort ProfileEnd;
335 public ushort ProfileHollow;
336 }
337
338 public class RequestAssetArgs : EventArgs
339 {
340 public int ChannelType;
341 public float Priority;
342 public int SourceType;
343 public LLUUID TransferID;
344 }
345 public class AgentUpdateArgs : EventArgs
346 {
347 public LLUUID AgentID;
348 public LLQuaternion BodyRotation;
349 public LLVector3 CameraAtAxis;
350 public LLVector3 CameraCenter;
351 public LLVector3 CameraLeftAxis;
352 public LLVector3 CameraUpAxis;
353 public uint ControlFlags;
354 public float Far;
355 public byte Flags;
356 public LLQuaternion HeadRotation;
357 public LLUUID SessionID;
358 public byte State;
359 }
360
361 public class AvatarPickerReplyAgentDataArgs : EventArgs
362 {
363 public LLUUID AgentID;
364 public LLUUID QueryID;
365 }
366
367 public class AvatarPickerReplyDataArgs : EventArgs
368 {
369 public LLUUID AvatarID;
370 public byte[] FirstName;
371 public byte[] LastName;
372 }
373
304 public delegate void TextureRequest(Object sender, TextureRequestArgs e); 374 public delegate void TextureRequest(Object sender, TextureRequestArgs e);
305 375
306 public delegate void AvatarNowWearing(Object sender, AvatarWearingArgs e); 376 public delegate void AvatarNowWearing(Object sender, AvatarWearingArgs e);
@@ -325,7 +395,7 @@ namespace OpenSim.Framework
325 float height, float seconds, byte size, byte action, float north, float west, float south, float east, 395 float height, float seconds, byte size, byte action, float north, float west, float south, float east,
326 IClientAPI remoteClient); 396 IClientAPI remoteClient);
327 397
328 public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam); 398 public delegate void SetAppearance(byte[] texture, List<byte> visualParamList);
329 399
330 public delegate void StartAnim(IClientAPI remoteClient, LLUUID animID); 400 public delegate void StartAnim(IClientAPI remoteClient, LLUUID animID);
331 401
@@ -362,7 +432,7 @@ namespace OpenSim.Framework
362 432
363 public delegate void GenericCall7(IClientAPI remoteClient, uint localID, string message); 433 public delegate void GenericCall7(IClientAPI remoteClient, uint localID, string message);
364 434
365 public delegate void UpdateShape(LLUUID agentID, uint localID, ObjectShapePacket.ObjectDataBlock shapeBlock); 435 public delegate void UpdateShape(LLUUID agentID, uint localID, UpdateShapeArgs shapeBlock);
366 436
367 public delegate void ObjectExtraParams(LLUUID agentID, uint localID, ushort type, bool inUse, byte[] data); 437 public delegate void ObjectExtraParams(LLUUID agentID, uint localID, ushort type, bool inUse, byte[] data);
368 438
@@ -396,7 +466,7 @@ namespace OpenSim.Framework
396 466
397 public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status); 467 public delegate void NewAvatar(IClientAPI remoteClient, LLUUID agentID, bool status);
398 468
399 public delegate void UpdateAgent(IClientAPI remoteClient, AgentUpdatePacket agentData); 469 public delegate void UpdateAgent(IClientAPI remoteClient, AgentUpdateArgs agentData);
400 470
401 public delegate void AgentRequestSit(IClientAPI remoteClient, LLUUID agentID, LLUUID targetID, LLVector3 offset); 471 public delegate void AgentRequestSit(IClientAPI remoteClient, LLUUID agentID, LLUUID targetID, LLVector3 offset);
402 472
@@ -427,7 +497,7 @@ namespace OpenSim.Framework
427 497
428 public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client); 498 public delegate void ParcelObjectOwnerRequest(int local_id, IClientAPI remote_client);
429 499
430 public delegate void EstateOwnerMessageRequest(EstateOwnerMessagePacket packet, IClientAPI remote_client); 500 public delegate void EstateOwnerMessageRequest(LLUUID AgentID, LLUUID SessionID, LLUUID TransactionID, LLUUID Invoice, byte[] Method, byte[][] Parameters, IClientAPI remote_client);
431 501
432 public delegate void RegionInfoRequest(IClientAPI remote_client); 502 public delegate void RegionInfoRequest(IClientAPI remote_client);
433 503
@@ -487,7 +557,7 @@ namespace OpenSim.Framework
487 public delegate void RemoveInventoryFolder( 557 public delegate void RemoveInventoryFolder(
488 IClientAPI remoteClient, LLUUID folderID); 558 IClientAPI remoteClient, LLUUID folderID);
489 559
490 public delegate void RequestAsset(IClientAPI remoteClient, TransferRequestPacket transferRequest); 560 public delegate void RequestAsset(IClientAPI remoteClient, RequestAssetArgs transferRequest);
491 561
492 public delegate void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID); 562 public delegate void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID);
493 563
@@ -822,7 +892,7 @@ namespace OpenSim.Framework
822 int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, 892 int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay,
823 int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent); 893 int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent);
824 894
825 void SendAvatarPickerReply(AvatarPickerReplyPacket Pack); 895 void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data);
826 896
827 void SendAgentDataUpdate(LLUUID agentid, LLUUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle); 897 void SendAgentDataUpdate(LLUUID agentid, LLUUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle);
828 898