From cc204a279e4207feec1e6082412d1c7685b1925f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 28 Jan 2019 00:40:33 +0000 Subject: change encoding of a another event cap message --- OpenSim/Framework/LLSDxmlEncode.cs | 40 +++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/LLSDxmlEncode.cs b/OpenSim/Framework/LLSDxmlEncode.cs index 5074f05..ac9b468 100644 --- a/OpenSim/Framework/LLSDxmlEncode.cs +++ b/OpenSim/Framework/LLSDxmlEncode.cs @@ -48,6 +48,8 @@ namespace OpenSim.Framework sb.Append(""); } + public const string LLSDEmpty = ""; + // got tired of creating a stringbuilder all the time; public static StringBuilder Start(int size = 256, bool addxmlversion = false) { @@ -97,6 +99,11 @@ namespace OpenSim.Framework sb.Append(""); } + public static void AddEndMapAndArray(StringBuilder sb) + { + sb.Append(""); + } + public static void AddEmptyArray(StringBuilder sb) { sb.Append(""); @@ -386,6 +393,13 @@ namespace OpenSim.Framework sb.Append(""); } + public static void AddArrayAndMap(string name, StringBuilder sb) + { + sb.Append(""); + sb.Append(name); + sb.Append(""); + } + public static void AddEmptyArray(string name, StringBuilder sb) { sb.Append(""); @@ -706,7 +720,7 @@ namespace OpenSim.Framework public static void AddLLSD(string e, StringBuilder sb) { - sb.Append(e); + sb.Append(e); } public static void EscapeToXML(string s, StringBuilder sb) @@ -746,14 +760,14 @@ namespace OpenSim.Framework { return new byte[8] { - (byte)((uLongValue >> 56) & 0xff), - (byte)((uLongValue >> 48) & 0xff), - (byte)((uLongValue >> 40) & 0xff), - (byte)((uLongValue >> 32) & 0xff), - (byte)((uLongValue >> 24) & 0xff), - (byte)((uLongValue >> 16) & 0xff), - (byte)((uLongValue >> 8) & 0xff), - (byte)(uLongValue & 0xff) + (byte)(uLongValue >> 56), + (byte)(uLongValue >> 48), + (byte)(uLongValue >> 40), + (byte)(uLongValue >> 32), + (byte)(uLongValue >> 24), + (byte)(uLongValue >> 16), + (byte)(uLongValue >> 8), + (byte)uLongValue }; } @@ -761,10 +775,10 @@ namespace OpenSim.Framework { return new byte[4] { - (byte)((value >> 24) & 0xff), - (byte)((value >> 16) & 0xff), - (byte)((value >> 8) & 0xff), - (byte)(value & 0xff) + (byte)(value >> 24), + (byte)(value >> 16), + (byte)(value >> 8), + (byte)value }; } } -- cgit v1.1