diff options
Diffstat (limited to 'OpenSim/Region/Framework')
6 files changed, 174 insertions, 94 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/ICloudModule.cs b/OpenSim/Region/Framework/Interfaces/ICloudModule.cs index 7296ac3..54172bd 100644 --- a/OpenSim/Region/Framework/Interfaces/ICloudModule.cs +++ b/OpenSim/Region/Framework/Interfaces/ICloudModule.cs | |||
@@ -27,7 +27,7 @@ | |||
27 | 27 | ||
28 | namespace OpenSim.Region.Framework.Interfaces | 28 | namespace OpenSim.Region.Framework.Interfaces |
29 | { | 29 | { |
30 | public interface ICloudModule : IRegionModule | 30 | public interface ICloudModule |
31 | { | 31 | { |
32 | /// <summary> | 32 | /// <summary> |
33 | /// Retrieves the cloud density at the given region coordinates | 33 | /// Retrieves the cloud density at the given region coordinates |
diff --git a/OpenSim/Region/Framework/Interfaces/IDialogModule.cs b/OpenSim/Region/Framework/Interfaces/IDialogModule.cs index be9764a..4d35c1c 100644 --- a/OpenSim/Region/Framework/Interfaces/IDialogModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IDialogModule.cs | |||
@@ -33,95 +33,140 @@ namespace OpenSim.Region.Framework.Interfaces | |||
33 | public interface IDialogModule | 33 | public interface IDialogModule |
34 | { | 34 | { |
35 | /// <summary> | 35 | /// <summary> |
36 | /// Send a non-modal alert message to a particular user. This can disappear from the user's view after a | 36 | /// Send a non-modal alert message to a particular user. This can |
37 | /// small interval. | 37 | /// disappear from the user's view after a small interval. |
38 | /// </summary> | 38 | /// </summary> |
39 | /// <param name="client"></param> | 39 | /// <param name="client"> |
40 | /// <param name="message"></param> | 40 | /// IClientAPI object representing the user. |
41 | /// </param> | ||
42 | /// <param name="message">Message text to send to the user.</param> | ||
41 | void SendAlertToUser(IClientAPI client, string message); | 43 | void SendAlertToUser(IClientAPI client, string message); |
42 | 44 | ||
43 | /// <summary> | 45 | /// <summary> |
44 | /// Send an alert message to a particular user. | 46 | /// Send an alert message to a particular user. |
45 | /// </summary> | 47 | /// </summary> |
46 | /// <param name="client"></param> | 48 | /// <param name="client"> |
47 | /// <param name="message"></param> | 49 | /// IClientAPI object representing the user. |
48 | /// <param name="modal"></param> | 50 | /// </param> |
51 | /// <param name="message">Message text to send to the user.</param> | ||
52 | /// <param name="modal">Flag to control modality.</param> | ||
49 | void SendAlertToUser(IClientAPI client, string message, bool modal); | 53 | void SendAlertToUser(IClientAPI client, string message, bool modal); |
50 | 54 | ||
51 | /// <summary> | 55 | /// <summary> |
52 | /// Send a non-modal alert message to a particular user. | 56 | /// Send a non-modal alert message to a particular user. |
53 | /// </summary> | 57 | /// </summary> |
54 | /// <param name="agentID"></param> | 58 | /// <param name="agentID">UUID of agent representing the user.</param> |
55 | /// <param name="message"></param> | 59 | /// <param name="message">Message text to send to the user.</param> |
56 | void SendAlertToUser(UUID agentID, string message); | 60 | void SendAlertToUser(UUID agentID, string message); |
57 | 61 | ||
58 | /// <summary> | 62 | /// <summary> |
59 | /// Send an alert message to a particular user. | 63 | /// Send an alert message to a particular user. |
60 | /// </summary> | 64 | /// </summary> |
61 | /// <param name="agentID"></param> | 65 | /// <param name="agentID">UUID of agent representing the user.</param> |
62 | /// <param name="message"></param> | 66 | /// <param name="message">Message text to send to the user.</param> |
63 | /// <param name="modal"></param> | 67 | /// <param name="modal">Flag to control modality.</param> |
64 | void SendAlertToUser(UUID agentID, string message, bool modal); | 68 | void SendAlertToUser(UUID agentID, string message, bool modal); |
65 | 69 | ||
66 | /// <summary> | 70 | /// <summary> |
67 | /// Send an alert message to a particular user. | 71 | /// Send an alert message to a particular user. |
68 | /// </summary> | 72 | /// </summary> |
69 | /// <param name="firstName"></param> | 73 | /// <param name="firstName">Account first name</param> |
70 | /// <param name="lastName"></param> | 74 | /// <param name="lastName">Account last name</param> |
71 | /// <param name="message"></param> | 75 | /// <param name="message">Message text to send to the user.</param> |
72 | /// <param name="modal"></param> | 76 | /// <param name="modal">Flag to control modality.</param> |
73 | void SendAlertToUser(string firstName, string lastName, string message, bool modal); | 77 | void SendAlertToUser(string firstName, string lastName, |
74 | 78 | string message, bool modal); | |
79 | |||
75 | /// <summary> | 80 | /// <summary> |
76 | /// Send an alert message to all users in the scene. | 81 | /// Send an alert message to all users in the scene. |
77 | /// </summary> | 82 | /// </summary> |
78 | /// <param name="message"></param> | 83 | /// <param name="message">Message text to send to all users.</param> |
79 | void SendGeneralAlert(string message); | 84 | void SendGeneralAlert(string message); |
80 | 85 | ||
81 | /// <summary> | 86 | /// <summary> |
82 | /// Send a dialog box to a particular user. | 87 | /// Send a dialog box to a particular user. |
83 | /// </summary> | 88 | /// </summary> |
84 | /// <param name="avatarID"></param> | 89 | /// <param name="avatarID"> |
85 | /// <param name="objectName"></param> | 90 | /// UUID of the avatar representing the user. |
86 | /// <param name="objectID"></param> | 91 | /// </param> |
87 | /// <param name="ownerID"></param> | 92 | /// <param name="objectName"> |
88 | /// <param name="message"></param> | 93 | /// Name of the object sending the dialog. |
89 | /// <param name="textureID"></param> | 94 | /// </param> |
90 | /// <param name="ch"></param> | 95 | /// <param name="objectID"> |
91 | /// <param name="buttonlabels"></param> | 96 | /// UUID of the object sending the dialog. |
92 | void SendDialogToUser( | 97 | /// </param> |
93 | UUID avatarID, string objectName, UUID objectID, UUID ownerID, | 98 | /// <param name="ownerID"> |
94 | string message, UUID textureID, int ch, string[] buttonlabels); | 99 | /// UUID of the user that owns the object. |
95 | 100 | /// </param> | |
101 | /// <param name="message">Message text to send to the user.</param> | ||
102 | /// <param name="textureID"> | ||
103 | /// Texture UUID to pass along with the dialog. | ||
104 | /// </param> | ||
105 | /// <param name="ch"> | ||
106 | /// Channel on which the selected button text should be broadcast. | ||
107 | /// </param> | ||
108 | /// <param name="buttonlabels">Dialog button text.</param> | ||
109 | void SendDialogToUser(UUID avatarID, string objectName, UUID objectID, | ||
110 | UUID ownerID, string message, UUID textureID, int ch, | ||
111 | string[] buttonlabels); | ||
112 | |||
96 | /// <summary> | 113 | /// <summary> |
97 | /// Send a url to a particular user. | 114 | /// Send a url to a particular user. |
98 | /// </summary> | 115 | /// </summary> |
99 | /// <param name="avatarID"></param> | 116 | /// <param name="avatarID"> |
100 | /// <param name="objectName"></param> | 117 | /// UUID of the avatar representing the user. |
101 | /// <param name="objectID"></param> | 118 | /// </param> |
102 | /// <param name="ownerID"></param> | 119 | /// <param name="objectName"> |
103 | /// <param name="groupOwned"></param> | 120 | /// Name of the object sending the dialog. |
104 | /// <param name="message"></param> | 121 | /// </param> |
105 | /// <param name="url"></param> | 122 | /// <param name="objectID"> |
106 | void SendUrlToUser( | 123 | /// UUID of the object sending the dialog. |
107 | UUID avatarID, string objectName, UUID objectID, UUID ownerID, bool groupOwned, string message, string url); | 124 | /// </param> |
108 | 125 | /// <param name="ownerID"> | |
126 | /// UUID of the user that owns the object. | ||
127 | /// </param> | ||
128 | /// <param name="groupOwned"> | ||
129 | /// Flag indicating whether or not the object is group-owned. | ||
130 | /// </param> | ||
131 | /// <param name="message">Message text to send to the user.</param> | ||
132 | /// <param name="url">Url to send to the user.</param> | ||
133 | void SendUrlToUser(UUID avatarID, string objectName, UUID objectID, | ||
134 | UUID ownerID, bool groupOwned, string message, string url); | ||
135 | |||
109 | /// <summary> | 136 | /// <summary> |
110 | /// Send a notification to all users in the scene. This notification should remain around until the | 137 | /// Send a notification to all users in the scene. This notification |
111 | /// user explicitly dismisses it. | 138 | /// should remain around until the user explicitly dismisses it. |
112 | /// </summary> | 139 | /// </summary> |
113 | /// | 140 | /// <remarks> |
114 | /// On the Linden Labs Second Client (as of 1.21), this is a big blue box message on the upper right of the | 141 | /// On the Linden Labs Second Client (as of 1.21), this is a big blue |
115 | /// screen. | 142 | /// box message on the upper right of the screen. |
116 | /// | 143 | /// </remarks> |
117 | /// <param name="fromAvatarID">The user sending the message</param> | 144 | /// <param name="fromAvatarID">The user sending the message</param> |
118 | /// <param name="fromAvatarName">The name of the user doing the sending</param> | 145 | /// <param name="fromAvatarName"> |
146 | /// The name of the user doing the sending | ||
147 | /// </param> | ||
119 | /// <param name="message">The message being sent to the user</param> | 148 | /// <param name="message">The message being sent to the user</param> |
120 | void SendNotificationToUsersInRegion(UUID fromAvatarID, string fromAvatarName, string message); | 149 | void SendNotificationToUsersInRegion(UUID fromAvatarID, |
121 | 150 | string fromAvatarName, string message); | |
151 | |||
122 | /// <summary> | 152 | /// <summary> |
123 | /// Send a textbox entry for the client to respond to | 153 | /// Send a textbox entry for the client to respond to |
124 | /// </summary> | 154 | /// </summary> |
125 | void SendTextBoxToUser(UUID avatarid, string message, int chatChannel, string name, UUID objectid, UUID ownerid); | 155 | /// <param name="avatarID"> |
156 | /// UUID of the avatar representing the user. | ||
157 | /// </param> | ||
158 | /// <param name="message">Message text to send to the user.</param> | ||
159 | /// <param name="chatChannel"> | ||
160 | /// Chat channel that the user's input should be broadcast on. | ||
161 | /// </param> | ||
162 | /// <param name="name">Name of the object sending the dialog.</param> | ||
163 | /// <param name="objectid"> | ||
164 | /// UUID of the object sending the dialog. | ||
165 | /// </param> | ||
166 | /// <param name="ownerid"> | ||
167 | /// UUID of the user that owns the object. | ||
168 | /// </param> | ||
169 | void SendTextBoxToUser(UUID avatarid, string message, int chatChannel, | ||
170 | string name, UUID objectid, UUID ownerid); | ||
126 | } | 171 | } |
127 | } | 172 | } |
diff --git a/OpenSim/Region/Framework/Interfaces/ISunModule.cs b/OpenSim/Region/Framework/Interfaces/ISunModule.cs index 819ae11..8231716 100644 --- a/OpenSim/Region/Framework/Interfaces/ISunModule.cs +++ b/OpenSim/Region/Framework/Interfaces/ISunModule.cs | |||
@@ -29,7 +29,7 @@ using OpenMetaverse; | |||
29 | 29 | ||
30 | namespace OpenSim.Region.Framework.Interfaces | 30 | namespace OpenSim.Region.Framework.Interfaces |
31 | { | 31 | { |
32 | public interface ISunModule : IRegionModule | 32 | public interface ISunModule : INonSharedRegionModule |
33 | { | 33 | { |
34 | double GetSunParameter(string param); | 34 | double GetSunParameter(string param); |
35 | 35 | ||
diff --git a/OpenSim/Region/Framework/Interfaces/IWindModule.cs b/OpenSim/Region/Framework/Interfaces/IWindModule.cs index 10ecc32..4a26a71 100644 --- a/OpenSim/Region/Framework/Interfaces/IWindModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IWindModule.cs | |||
@@ -29,7 +29,7 @@ using OpenMetaverse; | |||
29 | 29 | ||
30 | namespace OpenSim.Region.Framework.Interfaces | 30 | namespace OpenSim.Region.Framework.Interfaces |
31 | { | 31 | { |
32 | public interface IWindModule : IRegionModule | 32 | public interface IWindModule : INonSharedRegionModule |
33 | { | 33 | { |
34 | 34 | ||
35 | /// <summary> | 35 | /// <summary> |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 6208a57..c9d1205 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -1954,8 +1954,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
1954 | } | 1954 | } |
1955 | } | 1955 | } |
1956 | 1956 | ||
1957 | public virtual void DeRezObjects(IClientAPI remoteClient, List<uint> localIDs, | 1957 | /// <summary> |
1958 | UUID groupID, DeRezAction action, UUID destinationID) | 1958 | /// Derez one or more objects from the scene. |
1959 | /// </summary> | ||
1960 | /// <remarks> | ||
1961 | /// Won't actually remove the scene object in the case where the object is being copied to a user inventory. | ||
1962 | /// </remarks> | ||
1963 | /// <param name='remoteClient'>Client requesting derez</param> | ||
1964 | /// <param name='localIDs'>Local ids of root parts of objects to delete.</param> | ||
1965 | /// <param name='groupID'>Not currently used. Here because the client passes this to us.</param> | ||
1966 | /// <param name='action'>DeRezAction</param> | ||
1967 | /// <param name='destinationID'>User folder ID to place derezzed object</param> | ||
1968 | public virtual void DeRezObjects( | ||
1969 | IClientAPI remoteClient, List<uint> localIDs, UUID groupID, DeRezAction action, UUID destinationID) | ||
1959 | { | 1970 | { |
1960 | // First, see of we can perform the requested action and | 1971 | // First, see of we can perform the requested action and |
1961 | // build a list of eligible objects | 1972 | // build a list of eligible objects |
diff --git a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs index 3398a53..5b334c6 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/SceneObjectBasicTests.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
29 | using System.Reflection; | 30 | using System.Reflection; |
30 | using System.Threading; | 31 | using System.Threading; |
31 | using NUnit.Framework; | 32 | using NUnit.Framework; |
@@ -33,6 +34,7 @@ using OpenMetaverse; | |||
33 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
34 | using OpenSim.Framework.Communications; | 35 | using OpenSim.Framework.Communications; |
35 | using OpenSim.Region.Framework.Scenes; | 36 | using OpenSim.Region.Framework.Scenes; |
37 | using OpenSim.Services.Interfaces; | ||
36 | using OpenSim.Tests.Common; | 38 | using OpenSim.Tests.Common; |
37 | using OpenSim.Tests.Common.Mock; | 39 | using OpenSim.Tests.Common.Mock; |
38 | 40 | ||
@@ -42,7 +44,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
42 | /// Basic scene object tests (create, read and delete but not update). | 44 | /// Basic scene object tests (create, read and delete but not update). |
43 | /// </summary> | 45 | /// </summary> |
44 | [TestFixture] | 46 | [TestFixture] |
45 | public class SceneObjectBasicTests | 47 | public class SceneObjectBasicTests : OpenSimTestCase |
46 | { | 48 | { |
47 | // [TearDown] | 49 | // [TearDown] |
48 | // public void TearDown() | 50 | // public void TearDown() |
@@ -237,38 +239,60 @@ namespace OpenSim.Region.Framework.Scenes.Tests | |||
237 | /// <summary> | 239 | /// <summary> |
238 | /// Test deleting an object asynchronously to user inventory. | 240 | /// Test deleting an object asynchronously to user inventory. |
239 | /// </summary> | 241 | /// </summary> |
240 | //[Test] | 242 | // [Test] |
241 | //public void TestDeleteSceneObjectAsyncToUserInventory() | 243 | public void TestDeleteSceneObjectAsyncToUserInventory() |
242 | //{ | 244 | { |
243 | // TestHelper.InMethod(); | 245 | TestHelpers.InMethod(); |
244 | // //log4net.Config.XmlConfigurator.Configure(); | 246 | TestHelpers.EnableLogging(); |
245 | 247 | ||
246 | // UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001"); | 248 | UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001"); |
247 | // string myObjectName = "Fred"; | 249 | string myObjectName = "Fred"; |
248 | 250 | ||
249 | // TestScene scene = SceneSetupHelpers.SetupScene(); | 251 | TestScene scene = new SceneHelpers().SetupScene(); |
250 | // SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene, myObjectName); | 252 | |
251 | 253 | // Turn off the timer on the async sog deleter - we'll crank it by hand for this test. | |
252 | // Assert.That( | 254 | AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter; |
253 | // scene.CommsManager.UserAdminService.AddUser( | 255 | sogd.Enabled = false; |
254 | // "Bob", "Hoskins", "test", "test@test.com", 1000, 1000, agentId), | 256 | |
255 | // Is.EqualTo(agentId)); | 257 | SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, myObjectName, agentId); |
256 | 258 | ||
257 | // IClientAPI client = SceneSetupHelpers.AddRootAgent(scene, agentId); | 259 | // Assert.That( |
258 | 260 | // scene.CommsManager.UserAdminService.AddUser( | |
259 | // CachedUserInfo userInfo = scene.CommsManager.UserProfileCacheService.GetUserDetails(agentId); | 261 | // "Bob", "Hoskins", "test", "test@test.com", 1000, 1000, agentId), |
260 | // Assert.That(userInfo, Is.Not.Null); | 262 | // Is.EqualTo(agentId)); |
261 | // Assert.That(userInfo.RootFolder, Is.Not.Null); | 263 | |
262 | 264 | UserAccount ua = UserAccountHelpers.CreateUserWithInventory(scene, agentId); | |
263 | // SceneSetupHelpers.DeleteSceneObjectAsync(scene, part, DeRezAction.Take, userInfo.RootFolder.ID, client); | 265 | InventoryFolderBase folder1 |
264 | 266 | = UserInventoryHelpers.CreateInventoryFolder(scene.InventoryService, ua.PrincipalID, "folder1"); | |
265 | // // Check that we now have the taken part in our inventory | 267 | |
266 | // Assert.That(myObjectName, Is.EqualTo(userInfo.RootFolder.FindItemByPath(myObjectName).Name)); | 268 | IClientAPI client = SceneHelpers.AddScenePresence(scene, agentId).ControllingClient; |
267 | 269 | scene.DeRezObjects(client, new List<uint>() { so.LocalId }, UUID.Zero, DeRezAction.Take, folder1.ID); | |
268 | // // Check that the taken part has actually disappeared | 270 | |
269 | // SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); | 271 | SceneObjectPart retrievedPart = scene.GetSceneObjectPart(so.LocalId); |
270 | // Assert.That(retrievedPart, Is.Null); | 272 | |
271 | //} | 273 | Assert.That(retrievedPart, Is.Not.Null); |
274 | Assert.That(so.IsDeleted, Is.False); | ||
275 | |||
276 | sogd.InventoryDeQueueAndDelete(); | ||
277 | |||
278 | Assert.That(so.IsDeleted, Is.True); | ||
279 | |||
280 | SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId); | ||
281 | Assert.That(retrievedPart2, Is.Null); | ||
282 | |||
283 | // SceneSetupHelpers.DeleteSceneObjectAsync(scene, part, DeRezAction.Take, userInfo.RootFolder.ID, client); | ||
284 | |||
285 | InventoryItemBase retrievedItem | ||
286 | = UserInventoryHelpers.GetInventoryItem( | ||
287 | scene.InventoryService, ua.PrincipalID, "folder1/" + myObjectName); | ||
288 | |||
289 | // Check that we now have the taken part in our inventory | ||
290 | Assert.That(retrievedItem, Is.Not.Null); | ||
291 | |||
292 | // Check that the taken part has actually disappeared | ||
293 | // SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId); | ||
294 | // Assert.That(retrievedPart, Is.Null); | ||
295 | } | ||
272 | 296 | ||
273 | /// <summary> | 297 | /// <summary> |
274 | /// Changing a scene object uuid changes the root part uuid. This is a valid operation if the object is not | 298 | /// Changing a scene object uuid changes the root part uuid. This is a valid operation if the object is not |