From 280a5cba8b6ab1566b1f5d2dae96e2f8402c8ab4 Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Mon, 24 Dec 2007 22:35:01 +0000
Subject: Prim inventory script saving phase 1. Create necessary CAPS
structures for correctly accepting prim inventory script updates. No user
functionality yet. Refactoring to follow.
---
.../Region/Environment/Scenes/Scene.Inventory.cs | 41 +++++++++++++++++++++-
1 file changed, 40 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/Environment/Scenes/Scene.Inventory.cs')
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 2d0ffd8..531e8de 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -74,6 +74,13 @@ namespace OpenSim.Region.Environment.Scenes
return LLUUID.Zero;
}
+ ///
+ /// Capability originating call to update the asset of an item in an agent's inventory
+ ///
+ ///
+ ///
+ ///
+ ///
public LLUUID CapsUpdateInventoryItemAsset(IClientAPI remoteClient, LLUUID itemID, byte[] data)
{
CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
@@ -106,6 +113,39 @@ namespace OpenSim.Region.Environment.Scenes
}
return LLUUID.Zero;
}
+
+ ///
+ /// Capability originating call to update the asset of a script in a prim's (task's) inventory
+ ///
+ ///
+ ///
+ /// The prim which contains the item to update
+ /// Indicates whether the script to update is currently running
+ ///
+ /// Asset LLUID created
+ public LLUUID CapsUpdateTaskInventoryScriptAsset(LLUUID avatarID, LLUUID itemID,
+ LLUUID primID, bool isScriptRunning, byte[] data)
+ {
+ // TODO Not currently doing anything with the isScriptRunning bool
+
+ MainLog.Instance.Verbose(
+ "PRIMINVENTORY",
+ "Prim inventory script save functionality not yet implemented."
+ + " remoteClient: {0}, itemID: {1}, primID: {2}, isScriptRunning: {3}",
+ avatarID, itemID, primID, isScriptRunning);
+
+ // TODO
+ // Retrieve client LLUID
+ // Retrieve sog containing primID
+ // Retrieve item
+ // Create new asset and add to cache
+ // Update item with new asset
+ // Trigger SOG update (see RezScript)
+ // Trigger rerunning of script (use TriggerRezScript event, see RezScript)
+ // return new asset id
+
+ return null;
+ }
///
/// Update an item which is either already in the client's inventory or is within
@@ -470,7 +510,6 @@ namespace OpenSim.Region.Environment.Scenes
if (rezAsset != null)
{
string script = Util.FieldToString(rezAsset.Data);
- //Console.WriteLine("rez script "+script);
EventManager.TriggerRezScript(localID, copyID, script);
rezzed = true;
}
--
cgit v1.1