diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Communications/Capabilities/Caps.cs | 4 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/Capabilities/LLSDRemoteParcelResponse.cs | 42 | ||||
-rw-r--r-- | OpenSim/Framework/Communications/IGridServices.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 9 | ||||
-rw-r--r-- | OpenSim/Framework/IRegionCommsListener.cs | 5 | ||||
-rw-r--r-- | OpenSim/Framework/RegionCommsListener.cs | 15 | ||||
-rw-r--r-- | OpenSim/Framework/Util.cs | 19 |
7 files changed, 92 insertions, 4 deletions
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 7350d4d..1aa8eb0 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs | |||
@@ -86,11 +86,13 @@ namespace OpenSim.Framework.Communications.Capabilities | |||
86 | private static readonly string m_notecardTaskUpdatePath = "0005/"; | 86 | private static readonly string m_notecardTaskUpdatePath = "0005/"; |
87 | // private static readonly string m_fetchInventoryPath = "0006/"; | 87 | // private static readonly string m_fetchInventoryPath = "0006/"; |
88 | 88 | ||
89 | // The following two entries are in a module, however, there also here so that we don't re-assign | 89 | // The following entries are in a module, however, they are also here so that we don't re-assign |
90 | // the path to another cap by mistake. | 90 | // the path to another cap by mistake. |
91 | // private static readonly string m_parcelVoiceInfoRequestPath = "0007/"; // This is in a module. | 91 | // private static readonly string m_parcelVoiceInfoRequestPath = "0007/"; // This is in a module. |
92 | // private static readonly string m_provisionVoiceAccountRequestPath = "0008/";// This is in a module. | 92 | // private static readonly string m_provisionVoiceAccountRequestPath = "0008/";// This is in a module. |
93 | 93 | ||
94 | // private static readonly string m_remoteParcelRequestPath = "0009/";// This is in the LandManagementModule. | ||
95 | |||
94 | //private string eventQueue = "0100/"; | 96 | //private string eventQueue = "0100/"; |
95 | private BaseHttpServer m_httpListener; | 97 | private BaseHttpServer m_httpListener; |
96 | private LLUUID m_agentID; | 98 | private LLUUID m_agentID; |
diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDRemoteParcelResponse.cs b/OpenSim/Framework/Communications/Capabilities/LLSDRemoteParcelResponse.cs new file mode 100644 index 0000000..27adea0 --- /dev/null +++ b/OpenSim/Framework/Communications/Capabilities/LLSDRemoteParcelResponse.cs | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | |||
29 | using libsecondlife; | ||
30 | |||
31 | namespace OpenSim.Framework.Communications.Capabilities | ||
32 | { | ||
33 | [LLSDType("MAP")] | ||
34 | public class LLSDRemoteParcelResponse | ||
35 | { | ||
36 | public LLUUID parcel_id; | ||
37 | |||
38 | public LLSDRemoteParcelResponse() | ||
39 | { | ||
40 | } | ||
41 | } | ||
42 | } | ||
diff --git a/OpenSim/Framework/Communications/IGridServices.cs b/OpenSim/Framework/Communications/IGridServices.cs index 3ecda68..509f408 100644 --- a/OpenSim/Framework/Communications/IGridServices.cs +++ b/OpenSim/Framework/Communications/IGridServices.cs | |||
@@ -57,5 +57,7 @@ namespace OpenSim.Framework.Communications | |||
57 | RegionInfo RequestClosestRegion(string regionName); | 57 | RegionInfo RequestClosestRegion(string regionName); |
58 | Dictionary<string, string> GetGridSettings(); | 58 | Dictionary<string, string> GetGridSettings(); |
59 | List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY); | 59 | List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY); |
60 | // not complete yet, only contains the fields needed for ParcelInfoReqeust | ||
61 | LandData RequestLandData(ulong regionHandle, uint x, uint y); | ||
60 | } | 62 | } |
61 | } | 63 | } |
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 36842cc..536050c 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -293,6 +293,9 @@ namespace OpenSim.Framework | |||
293 | public delegate void EstateBlueBoxMessageRequest(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, LLUUID sessionID, string senderName, string message); | 293 | public delegate void EstateBlueBoxMessageRequest(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, LLUUID sessionID, string senderName, string message); |
294 | public delegate void EstateDebugRegionRequest(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, bool scripted, bool collisionEvents, bool physics); | 294 | public delegate void EstateDebugRegionRequest(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, bool scripted, bool collisionEvents, bool physics); |
295 | public delegate void EstateTeleportOneUserHomeRequest(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, LLUUID prey); | 295 | public delegate void EstateTeleportOneUserHomeRequest(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, LLUUID prey); |
296 | public delegate void RegionHandleRequest(IClientAPI remoteClient, LLUUID regionID); | ||
297 | public delegate void ParcelInfoRequest(IClientAPI remoteClient, LLUUID parcelID); | ||
298 | |||
296 | public delegate void ScriptReset(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID); | 299 | public delegate void ScriptReset(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID); |
297 | public delegate void GetScriptRunning(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID); | 300 | public delegate void GetScriptRunning(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID); |
298 | public delegate void SetScriptRunning(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID, bool running); | 301 | public delegate void SetScriptRunning(IClientAPI remoteClient, LLUUID objectID, LLUUID itemID, bool running); |
@@ -498,6 +501,9 @@ namespace OpenSim.Framework | |||
498 | event EstateDebugRegionRequest OnEstateDebugRegionRequest; | 501 | event EstateDebugRegionRequest OnEstateDebugRegionRequest; |
499 | event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; | 502 | event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; |
500 | event UUIDNameRequest OnUUIDGroupNameRequest; | 503 | event UUIDNameRequest OnUUIDGroupNameRequest; |
504 | |||
505 | event RegionHandleRequest OnRegionHandleRequest; | ||
506 | event ParcelInfoRequest OnParcelInfoRequest; | ||
501 | 507 | ||
502 | event RequestObjectPropertiesFamily OnObjectGroupRequest; | 508 | event RequestObjectPropertiesFamily OnObjectGroupRequest; |
503 | event ScriptReset OnScriptReset; | 509 | event ScriptReset OnScriptReset; |
@@ -721,5 +727,8 @@ namespace OpenSim.Framework | |||
721 | 727 | ||
722 | void SendSetFollowCamProperties(LLUUID objectID, SortedDictionary<int, float> parameters); | 728 | void SendSetFollowCamProperties(LLUUID objectID, SortedDictionary<int, float> parameters); |
723 | void SendClearFollowCamProperties(LLUUID objectID); | 729 | void SendClearFollowCamProperties(LLUUID objectID); |
730 | |||
731 | void SendRegionHandle(LLUUID regoinID, ulong handle); | ||
732 | void SendParcelInfo(RegionInfo info, LandData land, LLUUID parcelID, uint x, uint y); | ||
724 | } | 733 | } |
725 | } | 734 | } |
diff --git a/OpenSim/Framework/IRegionCommsListener.cs b/OpenSim/Framework/IRegionCommsListener.cs index ce84a40..1758508 100644 --- a/OpenSim/Framework/IRegionCommsListener.cs +++ b/OpenSim/Framework/IRegionCommsListener.cs | |||
@@ -52,6 +52,8 @@ namespace OpenSim.Framework | |||
52 | 52 | ||
53 | public delegate void LogOffUser(ulong regionHandle, LLUUID agentID, LLUUID regionSecret, string message); | 53 | public delegate void LogOffUser(ulong regionHandle, LLUUID agentID, LLUUID regionSecret, string message); |
54 | 54 | ||
55 | public delegate LandData GetLandData(uint x, uint y); | ||
56 | |||
55 | public interface IRegionCommsListener | 57 | public interface IRegionCommsListener |
56 | { | 58 | { |
57 | event ExpectUserDelegate OnExpectUser; | 59 | event ExpectUserDelegate OnExpectUser; |
@@ -66,5 +68,6 @@ namespace OpenSim.Framework | |||
66 | event RegionUp OnRegionUp; | 68 | event RegionUp OnRegionUp; |
67 | event ChildAgentUpdate OnChildAgentUpdate; | 69 | event ChildAgentUpdate OnChildAgentUpdate; |
68 | event LogOffUser OnLogOffUser; | 70 | event LogOffUser OnLogOffUser; |
71 | event GetLandData OnGetLandData; | ||
69 | } | 72 | } |
70 | } \ No newline at end of file | 73 | } |
diff --git a/OpenSim/Framework/RegionCommsListener.cs b/OpenSim/Framework/RegionCommsListener.cs index 4045b44..0b50a81 100644 --- a/OpenSim/Framework/RegionCommsListener.cs +++ b/OpenSim/Framework/RegionCommsListener.cs | |||
@@ -46,7 +46,8 @@ namespace OpenSim.Framework | |||
46 | private PrimCrossing handlerPrimCrossingIntoRegion = null; // OnPrimCrossingIntoRegion; | 46 | private PrimCrossing handlerPrimCrossingIntoRegion = null; // OnPrimCrossingIntoRegion; |
47 | private RegionUp handlerRegionUp = null; // OnRegionUp; | 47 | private RegionUp handlerRegionUp = null; // OnRegionUp; |
48 | private LogOffUser handlerLogOffUser = null; | 48 | private LogOffUser handlerLogOffUser = null; |
49 | 49 | private GetLandData handlerGetLandData = null; | |
50 | |||
50 | #region IRegionCommsListener Members | 51 | #region IRegionCommsListener Members |
51 | 52 | ||
52 | public event ExpectUserDelegate OnExpectUser; | 53 | public event ExpectUserDelegate OnExpectUser; |
@@ -61,6 +62,7 @@ namespace OpenSim.Framework | |||
61 | public event RegionUp OnRegionUp; | 62 | public event RegionUp OnRegionUp; |
62 | public event ChildAgentUpdate OnChildAgentUpdate; | 63 | public event ChildAgentUpdate OnChildAgentUpdate; |
63 | public event LogOffUser OnLogOffUser; | 64 | public event LogOffUser OnLogOffUser; |
65 | public event GetLandData OnGetLandData; | ||
64 | 66 | ||
65 | #endregion | 67 | #endregion |
66 | 68 | ||
@@ -226,5 +228,14 @@ namespace OpenSim.Framework | |||
226 | 228 | ||
227 | return false; | 229 | return false; |
228 | } | 230 | } |
231 | |||
232 | public LandData TriggerGetLandData(uint x, uint y) | ||
233 | { | ||
234 | handlerGetLandData = OnGetLandData; | ||
235 | if (handlerGetLandData != null) | ||
236 | return handlerGetLandData(x, y); | ||
237 | |||
238 | return null; | ||
239 | } | ||
229 | } | 240 | } |
230 | } \ No newline at end of file | 241 | } |
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index d72e03e..bc35fa6 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -716,5 +716,24 @@ namespace OpenSim.Framework | |||
716 | XmlRpcRequest client = new XmlRpcRequest(methodName, args); | 716 | XmlRpcRequest client = new XmlRpcRequest(methodName, args); |
717 | return client.Send(url, 6000); | 717 | return client.Send(url, 6000); |
718 | } | 718 | } |
719 | |||
720 | // used for RemoteParcelRequest (for "About Landmark") | ||
721 | public static LLUUID BuildFakeParcelID(ulong regionHandle, uint x, uint y) { | ||
722 | byte[] bytes = { | ||
723 | (byte)(regionHandle >> 56), (byte)(regionHandle >> 48), (byte)(regionHandle >> 40), (byte)(regionHandle >> 32), | ||
724 | (byte)(regionHandle >> 24), (byte)(regionHandle >> 16), (byte)(regionHandle >> 8), (byte)regionHandle, | ||
725 | (byte)(x >> 24), (byte)(x >> 16), (byte)(x >> 8), (byte)x, | ||
726 | (byte)(y >> 24), (byte)(y >> 16), (byte)(y >> 8), (byte)y }; | ||
727 | return new LLUUID(bytes, 0); | ||
728 | } | ||
729 | |||
730 | public static void ParseFakeParcelID(LLUUID parcelID, out ulong regionHandle, out uint x, out uint y) { | ||
731 | byte[] bytes = parcelID.GetBytes(); | ||
732 | regionHandle = Helpers.BytesToUInt64(bytes); | ||
733 | x = Helpers.BytesToUInt(bytes, 8); | ||
734 | // grrr. I'd like to use that code in the next line, but libsl has an off-by-one bug here and returns 0. | ||
735 | //uint y = Helpers.BytesToUInt(bytes, 12); | ||
736 | y = (uint)((bytes[12] << 24) | (bytes[13] << 16) | (bytes[14] << 8) | bytes[15]); | ||
737 | } | ||
719 | } | 738 | } |
720 | } | 739 | } |