From 4e45718833f72b9149aed6d503e967b8916e5d08 Mon Sep 17 00:00:00 2001 From: Mikko Pallari Date: Thu, 15 Apr 2010 08:23:51 +0300 Subject: [PATCH] Added overload of SendGenericMessage to LLClientView with string list as parameter. Now modules themselfs don't necessarily need to convert strings to byte arrays. Added this as it was removed in LightShare patch. --- OpenSim/Client/MXP/ClientStack/MXPClientView.cs | 4 ++++ .../Sirikata/ClientStack/SirikataClientView.cs | 4 ++++ .../Client/VWoHTTP/ClientStack/VWHClientView.cs | 4 ++++ OpenSim/Framework/IClientAPI.cs | 1 + .../Region/ClientStack/LindenUDP/LLClientView.cs | 15 +++++++++++++++ .../Examples/SimpleModule/MyNpcCharacter.cs | 4 ++++ .../Server/IRCClientView.cs | 5 +++++ .../Region/OptionalModules/World/NPC/NPCAvatar.cs | 5 +++++ OpenSim/Tests/Common/Mock/TestClient.cs | 5 +++++ 9 files changed, 47 insertions(+) diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index 3e926587c2..d742039115 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs @@ -931,6 +931,10 @@ namespace OpenSim.Client.MXP.ClientStack // Need to translate to MXP somehow } + public void SendGenericMessage(string method, List message) + { + } + public void SendGenericMessage(string method, List message) { // Need to translate to MXP somehow diff --git a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs index c293480e76..d725943197 100644 --- a/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs +++ b/OpenSim/Client/Sirikata/ClientStack/SirikataClientView.cs @@ -504,6 +504,10 @@ namespace OpenSim.Client.Sirikata.ClientStack throw new System.NotImplementedException(); } + public void SendGenericMessage(string method, List message) + { + } + public void SendGenericMessage(string method, List message) { throw new System.NotImplementedException(); diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs index 51026abf80..2eec844b9d 100644 --- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs +++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs @@ -510,6 +510,10 @@ namespace OpenSim.Client.VWoHTTP.ClientStack throw new System.NotImplementedException(); } + public void SendGenericMessage(string method, List message) + { + } + public void SendGenericMessage(string method, List message) { throw new System.NotImplementedException(); diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index f51bf71f5d..c1333fc285 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -983,6 +983,7 @@ namespace OpenSim.Framework void SendInstantMessage(GridInstantMessage im); + void SendGenericMessage(string method, List message); void SendGenericMessage(string method, List message); void SendLayerData(float[] map); diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 9eb35fa67b..e67428d3c2 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -816,6 +816,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } + public void SendGenericMessage(string method, List message) + { + GenericMessagePacket gmp = new GenericMessagePacket(); + gmp.MethodData.Method = Util.StringToBytes256(method); + gmp.ParamList = new GenericMessagePacket.ParamListBlock[message.Count]; + int i = 0; + foreach (string val in message) + { + gmp.ParamList[i] = new GenericMessagePacket.ParamListBlock(); + gmp.ParamList[i++].Parameter = Util.StringToBytes256(val); + } + + OutPacket(gmp, ThrottleOutPacketType.Task); + } + public void SendGenericMessage(string method, List message) { GenericMessagePacket gmp = new GenericMessagePacket(); diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 967438fcf5..2681d4fcf3 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -461,6 +461,10 @@ namespace OpenSim.Region.Examples.SimpleModule } + public void SendGenericMessage(string method, List message) + { + } + public void SendGenericMessage(string method, List message) { diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 27de529e22..7453eae63e 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -965,6 +965,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server // TODO } + public void SendGenericMessage(string method, List message) + { + + } + public void SendGenericMessage(string method, List message) { diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index d2279c735e..146b3d6f32 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs @@ -551,6 +551,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC } + public void SendGenericMessage(string method, List message) + { + + } + public void SendGenericMessage(string method, List message) { diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 6b0efe920e..94d9d72b02 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs @@ -519,6 +519,11 @@ namespace OpenSim.Tests.Common.Mock } + public void SendGenericMessage(string method, List message) + { + + } + public void SendGenericMessage(string method, List message) {