From 230835dbaab80bc672b5cbd9f12e09930ed516e1 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Wed, 15 Oct 2008 17:06:47 +0000 Subject: * refactor: Remove OutPacket from the IClientAPI * I believe this is reasonable since code outside the Linden client stack shouldn't be aware of the packet format being used * I would love to have made the method protected, but the LoadBalancerPlugin is still calling it and resolving that would require more work --- OpenSim/Framework/IClientAPI.cs | 4 +--- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 14 +++++++------- .../Region/Environment/Modules/World/Land/LandObject.cs | 2 +- OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | 6 +----- OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 15 +++++++-------- 5 files changed, 17 insertions(+), 24 deletions(-) diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 89fc0af..db6025d 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -625,8 +625,6 @@ namespace OpenSim.Framework // void ActivateGesture(UUID assetId, UUID gestureId); - // [Obsolete("IClientAPI.OutPacket SHOULD NOT EXIST outside of LLClientView please refactor appropriately.")] - void OutPacket(Packet newPack, ThrottleOutPacketType packType); void SendWearables(AvatarWearable[] wearables, int serial); void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry); void SendStartPingCheck(byte seq); @@ -774,7 +772,7 @@ namespace OpenSim.Framework void SendEstateCovenantInformation(UUID covenant); void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner); - void SendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags); + void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags); void SendLandAccessListData(List avatars, uint accessFlag, int localLandID); void SendForceClientSelectObjects(List objectIDs); void SendLandObjectOwners(Dictionary ownersAndCount); diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 251ba78..198d660 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -2921,7 +2921,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP this.OutPacket(packet, ThrottleOutPacketType.Task); } - public void SendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) + public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) { ParcelPropertiesPacket updatePacket = (ParcelPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ParcelProperties); // TODO: don't create new blocks if recycling an old packet @@ -2999,7 +2999,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP updatePacket.ParcelData.UserLocation = landData.UserLocation; updatePacket.ParcelData.UserLookAt = landData.UserLookAt; updatePacket.Header.Zerocoded = true; - remote_client.OutPacket((Packet)updatePacket, ThrottleOutPacketType.Task); + + OutPacket((Packet)updatePacket, ThrottleOutPacketType.Task); } public void SendLandAccessListData(List avatars, uint accessFlag, int localLandID) @@ -3945,14 +3946,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// - /// The dreaded OutPacket. This should only be called from within - /// the ClientStack itself right now - /// This is the entry point for simulator packets to go out to - /// the client. + /// This is the starting point for sending a simulator packet out to the client. + /// + /// Please do not call this from outside the LindenUDP client stack. /// /// /// Corresponds to the type of data that is going out. Enum - public virtual void OutPacket(Packet NewPack, ThrottleOutPacketType throttlePacketType) + public void OutPacket(Packet NewPack, ThrottleOutPacketType throttlePacketType) { m_PacketHandler.OutPacket(NewPack, throttlePacketType); } diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs index 14f43b4..097e55f 100644 --- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs +++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs @@ -172,7 +172,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land // regionFlags |= (uint)RegionFlags.AllowLandmark; // if (landData.OwnerID == remote_client.AgentId) // regionFlags |= (uint)RegionFlags.AllowSetHome; - remote_client.SendLandProperties(remote_client, sequence_id, + remote_client.SendLandProperties(sequence_id, snap_selection, request_result, landData, (float)m_scene.RegionInfo.RegionSettings.ObjectBonus, getParcelMaxPrimCount(this), diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index 86f3288..e5e6a79 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs @@ -414,10 +414,6 @@ namespace OpenSim.Region.Environment.Modules.World.NPC get { return 1; } } - public virtual void OutPacket(Packet newPack, ThrottleOutPacketType packType) - { - } - public virtual void SendWearables(AvatarWearable[] wearables, int serial) { } @@ -840,7 +836,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { } - public void SendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor,int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) + public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor,int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) { } public void SendLandAccessListData(List avatars, uint accessFlag, int localLandID) diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 663e768..cc49072 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -326,11 +326,6 @@ namespace OpenSim.Region.Examples.SimpleModule { } - - public virtual void OutPacket(Packet newPack, ThrottleOutPacketType packType) - { - } - public virtual void SendWearables(AvatarWearable[] wearables, int serial) { } @@ -821,38 +816,42 @@ namespace OpenSim.Region.Examples.SimpleModule public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) { } + public void SendEstateCovenantInformation(UUID covenant) { } + public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner) { } - public void SendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) + public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) { } + public void SendLandAccessListData(List avatars, uint accessFlag, int localLandID) { } + public void SendForceClientSelectObjects(List objectIDs) { } + public void SendLandObjectOwners(Dictionary ownersAndCount) { } + public void SendLandParcelOverlay(byte[] data, int sequence_id) { } public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time) { - } public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop) { - } public void SendGroupNameReply(UUID groupLLUID, string GroupName) -- cgit v1.1