diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs index 21be82a..0d0eed2 100644 --- a/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs +++ b/OpenSim/Region/Environment/Modules/Framework/EventQueueHelper.cs | |||
@@ -52,70 +52,70 @@ namespace OpenSim.Region.Environment | |||
52 | }; | 52 | }; |
53 | } | 53 | } |
54 | 54 | ||
55 | public static OSD buildEvent(string eventName, OSD eventBody) | 55 | public static LLSD buildEvent(string eventName, LLSD eventBody) |
56 | { | 56 | { |
57 | OSDMap llsdEvent = new OSDMap(2); | 57 | LLSDMap llsdEvent = new LLSDMap(2); |
58 | llsdEvent.Add("message", new OSDString(eventName)); | 58 | llsdEvent.Add("message", new LLSDString(eventName)); |
59 | llsdEvent.Add("body", eventBody); | 59 | llsdEvent.Add("body", eventBody); |
60 | 60 | ||
61 | return llsdEvent; | 61 | return llsdEvent; |
62 | } | 62 | } |
63 | 63 | ||
64 | public static OSD EnableSimulator(ulong Handle, IPEndPoint endPoint) | 64 | public static LLSD EnableSimulator(ulong Handle, IPEndPoint endPoint) |
65 | { | 65 | { |
66 | OSDMap llsdSimInfo = new OSDMap(3); | 66 | LLSDMap llsdSimInfo = new LLSDMap(3); |
67 | 67 | ||
68 | llsdSimInfo.Add("Handle", new OSDBinary(regionHandleToByteArray(Handle))); | 68 | llsdSimInfo.Add("Handle", new LLSDBinary(regionHandleToByteArray(Handle))); |
69 | llsdSimInfo.Add("IP", new OSDBinary(endPoint.Address.GetAddressBytes())); | 69 | llsdSimInfo.Add("IP", new LLSDBinary(endPoint.Address.GetAddressBytes())); |
70 | llsdSimInfo.Add("Port", new OSDInteger(endPoint.Port)); | 70 | llsdSimInfo.Add("Port", new LLSDInteger(endPoint.Port)); |
71 | 71 | ||
72 | OSDArray arr = new OSDArray(1); | 72 | LLSDArray arr = new LLSDArray(1); |
73 | arr.Add(llsdSimInfo); | 73 | arr.Add(llsdSimInfo); |
74 | 74 | ||
75 | OSDMap llsdBody = new OSDMap(1); | 75 | LLSDMap llsdBody = new LLSDMap(1); |
76 | llsdBody.Add("SimulatorInfo", arr); | 76 | llsdBody.Add("SimulatorInfo", arr); |
77 | 77 | ||
78 | return buildEvent("EnableSimulator", llsdBody); | 78 | return buildEvent("EnableSimulator", llsdBody); |
79 | } | 79 | } |
80 | 80 | ||
81 | public static OSD CrossRegion(ulong Handle, Vector3 pos, Vector3 lookAt, | 81 | public static LLSD CrossRegion(ulong Handle, Vector3 pos, Vector3 lookAt, |
82 | IPEndPoint newRegionExternalEndPoint, | 82 | IPEndPoint newRegionExternalEndPoint, |
83 | string capsURL, UUID AgentID, UUID SessionID) | 83 | string capsURL, UUID AgentID, UUID SessionID) |
84 | { | 84 | { |
85 | OSDArray LookAtArr = new OSDArray(3); | 85 | LLSDArray LookAtArr = new LLSDArray(3); |
86 | LookAtArr.Add(OSD.FromReal(lookAt.X)); | 86 | LookAtArr.Add(LLSD.FromReal(lookAt.X)); |
87 | LookAtArr.Add(OSD.FromReal(lookAt.Y)); | 87 | LookAtArr.Add(LLSD.FromReal(lookAt.Y)); |
88 | LookAtArr.Add(OSD.FromReal(lookAt.Z)); | 88 | LookAtArr.Add(LLSD.FromReal(lookAt.Z)); |
89 | 89 | ||
90 | OSDArray PositionArr = new OSDArray(3); | 90 | LLSDArray PositionArr = new LLSDArray(3); |
91 | PositionArr.Add(OSD.FromReal(pos.X)); | 91 | PositionArr.Add(LLSD.FromReal(pos.X)); |
92 | PositionArr.Add(OSD.FromReal(pos.Y)); | 92 | PositionArr.Add(LLSD.FromReal(pos.Y)); |
93 | PositionArr.Add(OSD.FromReal(pos.Z)); | 93 | PositionArr.Add(LLSD.FromReal(pos.Z)); |
94 | 94 | ||
95 | OSDMap InfoMap = new OSDMap(2); | 95 | LLSDMap InfoMap = new LLSDMap(2); |
96 | InfoMap.Add("LookAt", LookAtArr); | 96 | InfoMap.Add("LookAt", LookAtArr); |
97 | InfoMap.Add("Position", PositionArr); | 97 | InfoMap.Add("Position", PositionArr); |
98 | 98 | ||
99 | OSDArray InfoArr = new OSDArray(1); | 99 | LLSDArray InfoArr = new LLSDArray(1); |
100 | InfoArr.Add(InfoMap); | 100 | InfoArr.Add(InfoMap); |
101 | 101 | ||
102 | OSDMap AgentDataMap = new OSDMap(2); | 102 | LLSDMap AgentDataMap = new LLSDMap(2); |
103 | AgentDataMap.Add("AgentID", OSD.FromUUID(AgentID)); | 103 | AgentDataMap.Add("AgentID", LLSD.FromUUID(AgentID)); |
104 | AgentDataMap.Add("SessionID", OSD.FromUUID(SessionID)); | 104 | AgentDataMap.Add("SessionID", LLSD.FromUUID(SessionID)); |
105 | 105 | ||
106 | OSDArray AgentDataArr = new OSDArray(1); | 106 | LLSDArray AgentDataArr = new LLSDArray(1); |
107 | AgentDataArr.Add(AgentDataMap); | 107 | AgentDataArr.Add(AgentDataMap); |
108 | 108 | ||
109 | OSDMap RegionDataMap = new OSDMap(4); | 109 | LLSDMap RegionDataMap = new LLSDMap(4); |
110 | RegionDataMap.Add("RegionHandle", OSD.FromBinary(regionHandleToByteArray(Handle))); | 110 | RegionDataMap.Add("RegionHandle", LLSD.FromBinary(regionHandleToByteArray(Handle))); |
111 | RegionDataMap.Add("SeedCapability", OSD.FromString(capsURL)); | 111 | RegionDataMap.Add("SeedCapability", LLSD.FromString(capsURL)); |
112 | RegionDataMap.Add("SimIP", OSD.FromBinary(newRegionExternalEndPoint.Address.GetAddressBytes())); | 112 | RegionDataMap.Add("SimIP", LLSD.FromBinary(newRegionExternalEndPoint.Address.GetAddressBytes())); |
113 | RegionDataMap.Add("SimPort", OSD.FromInteger(newRegionExternalEndPoint.Port)); | 113 | RegionDataMap.Add("SimPort", LLSD.FromInteger(newRegionExternalEndPoint.Port)); |
114 | 114 | ||
115 | OSDArray RegionDataArr = new OSDArray(1); | 115 | LLSDArray RegionDataArr = new LLSDArray(1); |
116 | RegionDataArr.Add(RegionDataMap); | 116 | RegionDataArr.Add(RegionDataMap); |
117 | 117 | ||
118 | OSDMap llsdBody = new OSDMap(3); | 118 | LLSDMap llsdBody = new LLSDMap(3); |
119 | llsdBody.Add("Info", InfoArr); | 119 | llsdBody.Add("Info", InfoArr); |
120 | llsdBody.Add("AgentData", AgentDataArr); | 120 | llsdBody.Add("AgentData", AgentDataArr); |
121 | llsdBody.Add("RegionData", RegionDataArr); | 121 | llsdBody.Add("RegionData", RegionDataArr); |
@@ -123,49 +123,49 @@ namespace OpenSim.Region.Environment | |||
123 | return buildEvent("CrossedRegion", llsdBody); | 123 | return buildEvent("CrossedRegion", llsdBody); |
124 | } | 124 | } |
125 | 125 | ||
126 | public static OSD TeleportFinishEvent( | 126 | public static LLSD TeleportFinishEvent( |
127 | ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, | 127 | ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, |
128 | uint locationID, uint flags, string capsURL, UUID AgentID) | 128 | uint locationID, uint flags, string capsURL, UUID AgentID) |
129 | { | 129 | { |
130 | OSDMap info = new OSDMap(); | 130 | LLSDMap info = new LLSDMap(); |
131 | info.Add("AgentID", OSD.FromUUID(AgentID)); | 131 | info.Add("AgentID", LLSD.FromUUID(AgentID)); |
132 | info.Add("LocationID", OSD.FromInteger(4)); // TODO what is this? | 132 | info.Add("LocationID", LLSD.FromInteger(4)); // TODO what is this? |
133 | info.Add("RegionHandle", OSD.FromBinary(regionHandleToByteArray(regionHandle))); | 133 | info.Add("RegionHandle", LLSD.FromBinary(regionHandleToByteArray(regionHandle))); |
134 | info.Add("SeedCapability", OSD.FromString(capsURL)); | 134 | info.Add("SeedCapability", LLSD.FromString(capsURL)); |
135 | info.Add("SimAccess", OSD.FromInteger(simAccess)); | 135 | info.Add("SimAccess", LLSD.FromInteger(simAccess)); |
136 | info.Add("SimIP", OSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes())); | 136 | info.Add("SimIP", LLSD.FromBinary(regionExternalEndPoint.Address.GetAddressBytes())); |
137 | info.Add("SimPort", OSD.FromInteger(regionExternalEndPoint.Port)); | 137 | info.Add("SimPort", LLSD.FromInteger(regionExternalEndPoint.Port)); |
138 | info.Add("TeleportFlags", OSD.FromBinary(1L << 4)); // AgentManager.TeleportFlags.ViaLocation | 138 | info.Add("TeleportFlags", LLSD.FromBinary(1L << 4)); // AgentManager.TeleportFlags.ViaLocation |
139 | 139 | ||
140 | OSDArray infoArr = new OSDArray(); | 140 | LLSDArray infoArr = new LLSDArray(); |
141 | infoArr.Add(info); | 141 | infoArr.Add(info); |
142 | 142 | ||
143 | OSDMap body = new OSDMap(); | 143 | LLSDMap body = new LLSDMap(); |
144 | body.Add("Info", infoArr); | 144 | body.Add("Info", infoArr); |
145 | 145 | ||
146 | return buildEvent("TeleportFinish", body); | 146 | return buildEvent("TeleportFinish", body); |
147 | } | 147 | } |
148 | 148 | ||
149 | public static OSD ScriptRunningReplyEvent(UUID objectID, UUID itemID, bool running, bool mono) | 149 | public static LLSD ScriptRunningReplyEvent(UUID objectID, UUID itemID, bool running, bool mono) |
150 | { | 150 | { |
151 | OSDMap script = new OSDMap(); | 151 | LLSDMap script = new LLSDMap(); |
152 | script.Add("ObjectID", OSD.FromUUID(objectID)); | 152 | script.Add("ObjectID", LLSD.FromUUID(objectID)); |
153 | script.Add("ItemID", OSD.FromUUID(itemID)); | 153 | script.Add("ItemID", LLSD.FromUUID(itemID)); |
154 | script.Add("Running", OSD.FromBoolean(running)); | 154 | script.Add("Running", LLSD.FromBoolean(running)); |
155 | script.Add("Mono", OSD.FromBoolean(mono)); | 155 | script.Add("Mono", LLSD.FromBoolean(mono)); |
156 | 156 | ||
157 | OSDArray scriptArr = new OSDArray(); | 157 | LLSDArray scriptArr = new LLSDArray(); |
158 | scriptArr.Add(script); | 158 | scriptArr.Add(script); |
159 | 159 | ||
160 | OSDMap body = new OSDMap(); | 160 | LLSDMap body = new LLSDMap(); |
161 | body.Add("Script", scriptArr); | 161 | body.Add("Script", scriptArr); |
162 | 162 | ||
163 | return buildEvent("ScriptRunningReply", body); | 163 | return buildEvent("ScriptRunningReply", body); |
164 | } | 164 | } |
165 | 165 | ||
166 | public static OSD KeepAliveEvent() | 166 | public static LLSD KeepAliveEvent() |
167 | { | 167 | { |
168 | return buildEvent("FAKEEVENT", new OSDMap()); | 168 | return buildEvent("FAKEEVENT", new LLSDMap()); |
169 | } | 169 | } |
170 | } | 170 | } |
171 | } | 171 | } |