Merge branch 'master' into careminster

Conflicts:
	OpenSim/Region/CoreModules/Avatar/Gods/GodsModule.cs
	OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs
	OpenSim/Region/CoreModules/World/WorldMap/MapSearchModule.cs
This commit is contained in:
Melanie
2012-11-11 16:31:01 +00:00
35 changed files with 1359 additions and 2209 deletions

View File

@@ -27,7 +27,7 @@
namespace OpenSim.Region.Framework.Interfaces
{
public interface ICloudModule : IRegionModule
public interface ICloudModule
{
/// <summary>
/// Retrieves the cloud density at the given region coordinates

View File

@@ -33,95 +33,140 @@ namespace OpenSim.Region.Framework.Interfaces
public interface IDialogModule
{
/// <summary>
/// Send a non-modal alert message to a particular user. This can disappear from the user's view after a
/// small interval.
/// Send a non-modal alert message to a particular user. This can
/// disappear from the user's view after a small interval.
/// </summary>
/// <param name="client"></param>
/// <param name="message"></param>
/// <param name="client">
/// IClientAPI object representing the user.
/// </param>
/// <param name="message">Message text to send to the user.</param>
void SendAlertToUser(IClientAPI client, string message);
/// <summary>
/// Send an alert message to a particular user.
/// </summary>
/// <param name="client"></param>
/// <param name="message"></param>
/// <param name="modal"></param>
/// <param name="client">
/// IClientAPI object representing the user.
/// </param>
/// <param name="message">Message text to send to the user.</param>
/// <param name="modal">Flag to control modality.</param>
void SendAlertToUser(IClientAPI client, string message, bool modal);
/// <summary>
/// Send a non-modal alert message to a particular user.
/// </summary>
/// <param name="agentID"></param>
/// <param name="message"></param>
/// <param name="agentID">UUID of agent representing the user.</param>
/// <param name="message">Message text to send to the user.</param>
void SendAlertToUser(UUID agentID, string message);
/// <summary>
/// Send an alert message to a particular user.
/// </summary>
/// <param name="agentID"></param>
/// <param name="message"></param>
/// <param name="modal"></param>
/// <param name="agentID">UUID of agent representing the user.</param>
/// <param name="message">Message text to send to the user.</param>
/// <param name="modal">Flag to control modality.</param>
void SendAlertToUser(UUID agentID, string message, bool modal);
/// <summary>
/// Send an alert message to a particular user.
/// </summary>
/// <param name="firstName"></param>
/// <param name="lastName"></param>
/// <param name="message"></param>
/// <param name="modal"></param>
void SendAlertToUser(string firstName, string lastName, string message, bool modal);
/// <param name="firstName">Account first name</param>
/// <param name="lastName">Account last name</param>
/// <param name="message">Message text to send to the user.</param>
/// <param name="modal">Flag to control modality.</param>
void SendAlertToUser(string firstName, string lastName,
string message, bool modal);
/// <summary>
/// Send an alert message to all users in the scene.
/// </summary>
/// <param name="message"></param>
/// <param name="message">Message text to send to all users.</param>
void SendGeneralAlert(string message);
/// <summary>
/// Send a dialog box to a particular user.
/// </summary>
/// <param name="avatarID"></param>
/// <param name="objectName"></param>
/// <param name="objectID"></param>
/// <param name="ownerID"></param>
/// <param name="message"></param>
/// <param name="textureID"></param>
/// <param name="ch"></param>
/// <param name="buttonlabels"></param>
void SendDialogToUser(
UUID avatarID, string objectName, UUID objectID, UUID ownerID,
string message, UUID textureID, int ch, string[] buttonlabels);
/// <param name="avatarID">
/// UUID of the avatar representing the user.
/// </param>
/// <param name="objectName">
/// Name of the object sending the dialog.
/// </param>
/// <param name="objectID">
/// UUID of the object sending the dialog.
/// </param>
/// <param name="ownerID">
/// UUID of the user that owns the object.
/// </param>
/// <param name="message">Message text to send to the user.</param>
/// <param name="textureID">
/// Texture UUID to pass along with the dialog.
/// </param>
/// <param name="ch">
/// Channel on which the selected button text should be broadcast.
/// </param>
/// <param name="buttonlabels">Dialog button text.</param>
void SendDialogToUser(UUID avatarID, string objectName, UUID objectID,
UUID ownerID, string message, UUID textureID, int ch,
string[] buttonlabels);
/// <summary>
/// Send a url to a particular user.
/// </summary>
/// <param name="avatarID"></param>
/// <param name="objectName"></param>
/// <param name="objectID"></param>
/// <param name="ownerID"></param>
/// <param name="groupOwned"></param>
/// <param name="message"></param>
/// <param name="url"></param>
void SendUrlToUser(
UUID avatarID, string objectName, UUID objectID, UUID ownerID, bool groupOwned, string message, string url);
/// <param name="avatarID">
/// UUID of the avatar representing the user.
/// </param>
/// <param name="objectName">
/// Name of the object sending the dialog.
/// </param>
/// <param name="objectID">
/// UUID of the object sending the dialog.
/// </param>
/// <param name="ownerID">
/// UUID of the user that owns the object.
/// </param>
/// <param name="groupOwned">
/// Flag indicating whether or not the object is group-owned.
/// </param>
/// <param name="message">Message text to send to the user.</param>
/// <param name="url">Url to send to the user.</param>
void SendUrlToUser(UUID avatarID, string objectName, UUID objectID,
UUID ownerID, bool groupOwned, string message, string url);
/// <summary>
/// Send a notification to all users in the scene. This notification should remain around until the
/// user explicitly dismisses it.
/// Send a notification to all users in the scene. This notification
/// should remain around until the user explicitly dismisses it.
/// </summary>
///
/// On the Linden Labs Second Client (as of 1.21), this is a big blue box message on the upper right of the
/// screen.
///
/// <remarks>
/// On the Linden Labs Second Client (as of 1.21), this is a big blue
/// box message on the upper right of the screen.
/// </remarks>
/// <param name="fromAvatarID">The user sending the message</param>
/// <param name="fromAvatarName">The name of the user doing the sending</param>
/// <param name="fromAvatarName">
/// The name of the user doing the sending
/// </param>
/// <param name="message">The message being sent to the user</param>
void SendNotificationToUsersInRegion(UUID fromAvatarID, string fromAvatarName, string message);
void SendNotificationToUsersInRegion(UUID fromAvatarID,
string fromAvatarName, string message);
/// <summary>
/// Send a textbox entry for the client to respond to
/// </summary>
void SendTextBoxToUser(UUID avatarid, string message, int chatChannel, string name, UUID objectid, UUID ownerid);
/// <param name="avatarID">
/// UUID of the avatar representing the user.
/// </param>
/// <param name="message">Message text to send to the user.</param>
/// <param name="chatChannel">
/// Chat channel that the user's input should be broadcast on.
/// </param>
/// <param name="name">Name of the object sending the dialog.</param>
/// <param name="objectid">
/// UUID of the object sending the dialog.
/// </param>
/// <param name="ownerid">
/// UUID of the user that owns the object.
/// </param>
void SendTextBoxToUser(UUID avatarid, string message, int chatChannel,
string name, UUID objectid, UUID ownerid);
}
}

View File

@@ -29,7 +29,7 @@ using OpenMetaverse;
namespace OpenSim.Region.Framework.Interfaces
{
public interface ISunModule : IRegionModule
public interface ISunModule : INonSharedRegionModule
{
double GetSunParameter(string param);

View File

@@ -29,7 +29,7 @@ using OpenMetaverse;
namespace OpenSim.Region.Framework.Interfaces
{
public interface IWindModule : IRegionModule
public interface IWindModule : INonSharedRegionModule
{
/// <summary>

View File

@@ -1954,8 +1954,19 @@ namespace OpenSim.Region.Framework.Scenes
}
}
public virtual void DeRezObjects(IClientAPI remoteClient, List<uint> localIDs,
UUID groupID, DeRezAction action, UUID destinationID)
/// <summary>
/// Derez one or more objects from the scene.
/// </summary>
/// <remarks>
/// Won't actually remove the scene object in the case where the object is being copied to a user inventory.
/// </remarks>
/// <param name='remoteClient'>Client requesting derez</param>
/// <param name='localIDs'>Local ids of root parts of objects to delete.</param>
/// <param name='groupID'>Not currently used. Here because the client passes this to us.</param>
/// <param name='action'>DeRezAction</param>
/// <param name='destinationID'>User folder ID to place derezzed object</param>
public virtual void DeRezObjects(
IClientAPI remoteClient, List<uint> localIDs, UUID groupID, DeRezAction action, UUID destinationID)
{
// First, see of we can perform the requested action and
// build a list of eligible objects

View File

@@ -26,6 +26,7 @@
*/
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Threading;
using NUnit.Framework;
@@ -33,6 +34,7 @@ using OpenMetaverse;
using OpenSim.Framework;
using OpenSim.Framework.Communications;
using OpenSim.Region.Framework.Scenes;
using OpenSim.Services.Interfaces;
using OpenSim.Tests.Common;
using OpenSim.Tests.Common.Mock;
@@ -42,7 +44,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// Basic scene object tests (create, read and delete but not update).
/// </summary>
[TestFixture]
public class SceneObjectBasicTests
public class SceneObjectBasicTests : OpenSimTestCase
{
// [TearDown]
// public void TearDown()
@@ -237,38 +239,60 @@ namespace OpenSim.Region.Framework.Scenes.Tests
/// <summary>
/// Test deleting an object asynchronously to user inventory.
/// </summary>
//[Test]
//public void TestDeleteSceneObjectAsyncToUserInventory()
//{
// TestHelper.InMethod();
// //log4net.Config.XmlConfigurator.Configure();
// UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001");
// string myObjectName = "Fred";
// TestScene scene = SceneSetupHelpers.SetupScene();
// SceneObjectPart part = SceneSetupHelpers.AddSceneObject(scene, myObjectName);
// Assert.That(
// scene.CommsManager.UserAdminService.AddUser(
// "Bob", "Hoskins", "test", "test@test.com", 1000, 1000, agentId),
// Is.EqualTo(agentId));
// IClientAPI client = SceneSetupHelpers.AddRootAgent(scene, agentId);
// CachedUserInfo userInfo = scene.CommsManager.UserProfileCacheService.GetUserDetails(agentId);
// Assert.That(userInfo, Is.Not.Null);
// Assert.That(userInfo.RootFolder, Is.Not.Null);
// SceneSetupHelpers.DeleteSceneObjectAsync(scene, part, DeRezAction.Take, userInfo.RootFolder.ID, client);
// // Check that we now have the taken part in our inventory
// Assert.That(myObjectName, Is.EqualTo(userInfo.RootFolder.FindItemByPath(myObjectName).Name));
// // Check that the taken part has actually disappeared
// SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
// Assert.That(retrievedPart, Is.Null);
//}
// [Test]
public void TestDeleteSceneObjectAsyncToUserInventory()
{
TestHelpers.InMethod();
TestHelpers.EnableLogging();
UUID agentId = UUID.Parse("00000000-0000-0000-0000-000000000001");
string myObjectName = "Fred";
TestScene scene = new SceneHelpers().SetupScene();
// Turn off the timer on the async sog deleter - we'll crank it by hand for this test.
AsyncSceneObjectGroupDeleter sogd = scene.SceneObjectGroupDeleter;
sogd.Enabled = false;
SceneObjectGroup so = SceneHelpers.AddSceneObject(scene, myObjectName, agentId);
// Assert.That(
// scene.CommsManager.UserAdminService.AddUser(
// "Bob", "Hoskins", "test", "test@test.com", 1000, 1000, agentId),
// Is.EqualTo(agentId));
UserAccount ua = UserAccountHelpers.CreateUserWithInventory(scene, agentId);
InventoryFolderBase folder1
= UserInventoryHelpers.CreateInventoryFolder(scene.InventoryService, ua.PrincipalID, "folder1");
IClientAPI client = SceneHelpers.AddScenePresence(scene, agentId).ControllingClient;
scene.DeRezObjects(client, new List<uint>() { so.LocalId }, UUID.Zero, DeRezAction.Take, folder1.ID);
SceneObjectPart retrievedPart = scene.GetSceneObjectPart(so.LocalId);
Assert.That(retrievedPart, Is.Not.Null);
Assert.That(so.IsDeleted, Is.False);
sogd.InventoryDeQueueAndDelete();
Assert.That(so.IsDeleted, Is.True);
SceneObjectPart retrievedPart2 = scene.GetSceneObjectPart(so.LocalId);
Assert.That(retrievedPart2, Is.Null);
// SceneSetupHelpers.DeleteSceneObjectAsync(scene, part, DeRezAction.Take, userInfo.RootFolder.ID, client);
InventoryItemBase retrievedItem
= UserInventoryHelpers.GetInventoryItem(
scene.InventoryService, ua.PrincipalID, "folder1/" + myObjectName);
// Check that we now have the taken part in our inventory
Assert.That(retrievedItem, Is.Not.Null);
// Check that the taken part has actually disappeared
// SceneObjectPart retrievedPart = scene.GetSceneObjectPart(part.LocalId);
// Assert.That(retrievedPart, Is.Null);
}
/// <summary>
/// Changing a scene object uuid changes the root part uuid. This is a valid operation if the object is not