diff options
author | UbitUmarov | 2019-01-25 21:40:30 +0000 |
---|---|---|
committer | UbitUmarov | 2019-01-25 21:40:30 +0000 |
commit | 07946e040d49eb389fdb6b1132f524b4fa72770f (patch) | |
tree | b7363a412749ca5ab991dbed6d62fea6c8872422 /OpenSim | |
parent | ok take the all change (diff) | |
download | opensim-SC-07946e040d49eb389fdb6b1132f524b4fa72770f.zip opensim-SC-07946e040d49eb389fdb6b1132f524b4fa72770f.tar.gz opensim-SC-07946e040d49eb389fdb6b1132f524b4fa72770f.tar.bz2 opensim-SC-07946e040d49eb389fdb6b1132f524b4fa72770f.tar.xz |
ok i said all ( lie )
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs index 6f392d5..0c4af6e 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueHelper.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Text; | ||
29 | using System.Net; | 30 | using System.Net; |
30 | using OpenMetaverse; | 31 | using OpenMetaverse; |
31 | using OpenMetaverse.Packets; | 32 | using OpenMetaverse.Packets; |
@@ -40,7 +41,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
40 | { | 41 | { |
41 | private EventQueueHelper() {} // no construction possible, it's an utility class | 42 | private EventQueueHelper() {} // no construction possible, it's an utility class |
42 | 43 | ||
43 | private static byte[] ulongToByteArray(ulong uLongValue) | 44 | public static byte[] ulongToByteArray(ulong uLongValue) |
44 | { | 45 | { |
45 | // Reverse endianness of RegionHandle | 46 | // Reverse endianness of RegionHandle |
46 | return new byte[8] | 47 | return new byte[8] |
@@ -56,12 +57,23 @@ namespace OpenSim.Region.ClientStack.Linden | |||
56 | }; | 57 | }; |
57 | } | 58 | } |
58 | 59 | ||
59 | // private static byte[] uintToByteArray(uint uIntValue) | 60 | public static StringBuilder StartEvent(string eventName) |
60 | // { | 61 | { |
61 | // byte[] result = new byte[4]; | 62 | StringBuilder sb = new StringBuilder(256); |
62 | // Utils.UIntToBytesBig(uIntValue, result, 0); | 63 | LLSDxmlEncode.AddMap(sb); |
63 | // return result; | 64 | LLSDxmlEncode.AddElem("message", eventName, sb); |
64 | // } | 65 | LLSDxmlEncode.AddMap("body", sb); |
66 | |||
67 | return sb; | ||
68 | } | ||
69 | |||
70 | public static string EndEvent(StringBuilder sb) | ||
71 | { | ||
72 | LLSDxmlEncode.AddEndMap(sb); // close body | ||
73 | LLSDxmlEncode.AddEndMap(sb); // close event | ||
74 | return sb.ToString(); | ||
75 | } | ||
76 | |||
65 | 77 | ||
66 | public static OSD BuildEvent(string eventName, OSD eventBody) | 78 | public static OSD BuildEvent(string eventName, OSD eventBody) |
67 | { | 79 | { |