Thank you, Snowdrop, for a patch that makes the callback ID parameter

usable. Applied with formatting changes, please don't introduce
K&R style indentations into OpenSim
Fixes Mantis #3190
GenericGridServerConcept
Melanie Thielker 2009-02-19 03:09:56 +00:00
parent 7e0e9ef179
commit 863556f2cc
8 changed files with 18 additions and 16 deletions

View File

@ -878,7 +878,7 @@ namespace OpenSim.Framework
/// Tell the client that we have created the item it requested.
/// </summary>
/// <param name="Item"></param>
void SendInventoryItemCreateUpdate(InventoryItemBase Item);
void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId);
void SendRemoveInventoryItem(UUID itemID);

View File

@ -2062,7 +2062,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
/// <see>IClientAPI.SendInventoryItemCreateUpdate(InventoryItemBase)</see>
public void SendInventoryItemCreateUpdate(InventoryItemBase Item)
public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId)
{
const uint FULL_MASK_PERMISSIONS = (uint)PermissionMask.All;
@ -2088,6 +2088,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
InventoryReply.InventoryData[0].OwnerID = Item.Owner;
InventoryReply.InventoryData[0].OwnerMask = Item.CurrentPermissions;
InventoryReply.InventoryData[0].Type = (sbyte)Item.AssetType;
InventoryReply.InventoryData[0].CallbackID = callbackId;
InventoryReply.InventoryData[0].GroupID = Item.GroupID;
InventoryReply.InventoryData[0].GroupOwned = Item.GroupOwned;

View File

@ -148,7 +148,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
m_finished = true;
if (m_createItem)
{
DoCreateItem();
DoCreateItem(0);
}
else if (m_storeLocal)
{
@ -200,7 +200,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
if (m_finished)
{
DoCreateItem();
DoCreateItem(callbackID);
}
else
{
@ -210,7 +210,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
}
private void DoCreateItem()
private void DoCreateItem(uint callbackID)
{
m_userTransactions.Manager.MyScene.CommsManager.AssetCache.AddAsset(m_asset);
CachedUserInfo userInfo =
@ -238,7 +238,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
item.CreationDate = Util.UnixTimeSinceEpoch();
userInfo.AddItem(item);
ourClient.SendInventoryItemCreateUpdate(item);
ourClient.SendInventoryItemCreateUpdate(item, callbackID);
}
else
{

View File

@ -540,7 +540,7 @@ namespace OpenSim.Region.Examples.SimpleModule
{
}
public virtual void SendInventoryItemCreateUpdate(InventoryItemBase Item)
public virtual void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackID)
{
}

View File

@ -140,7 +140,7 @@ namespace OpenSim.Region.Framework.Scenes
if (userInfo != null)
{
AddInventoryItem(remoteClient.AgentId, item);
remoteClient.SendInventoryItemCreateUpdate(item);
remoteClient.SendInventoryItemCreateUpdate(item, 0);
}
else
{
@ -846,7 +846,7 @@ namespace OpenSim.Region.Framework.Scenes
item.CreationDate = creationDate;
userInfo.AddItem(item);
remoteClient.SendInventoryItemCreateUpdate(item);
remoteClient.SendInventoryItemCreateUpdate(item, callbackID);
}
else
{
@ -1379,6 +1379,7 @@ namespace OpenSim.Region.Framework.Scenes
if (part != null)
{
TaskInventoryItem currentItem = part.Inventory.GetInventoryItem(itemID);
bool allowInventoryDrop = (part.GetEffectiveObjectFlags()
& (uint)PrimFlags.AllowInventoryDrop) != 0;
@ -2003,14 +2004,14 @@ namespace OpenSim.Region.Framework.Scenes
if (remoteClient != null && item.Owner == remoteClient.AgentId)
{
remoteClient.SendInventoryItemCreateUpdate(item);
remoteClient.SendInventoryItemCreateUpdate(item, 0);
}
else
{
ScenePresence notifyUser = GetScenePresence(item.Owner);
if (notifyUser != null)
{
notifyUser.ControllingClient.SendInventoryItemCreateUpdate(item);
notifyUser.ControllingClient.SendInventoryItemCreateUpdate(item, 0);
}
}
}
@ -2092,7 +2093,7 @@ namespace OpenSim.Region.Framework.Scenes
// this gets called when the agent loggs off!
if (remoteClient != null)
{
remoteClient.SendInventoryItemCreateUpdate(item);
remoteClient.SendInventoryItemCreateUpdate(item, 0);
}
}
}
@ -2151,7 +2152,7 @@ namespace OpenSim.Region.Framework.Scenes
grp.SetFromAssetID(item.ID);
userInfo.AddItem(item);
remoteClient.SendInventoryItemCreateUpdate(item);
remoteClient.SendInventoryItemCreateUpdate(item, 0);
itemID = item.ID;
return item.AssetID;

View File

@ -3581,7 +3581,7 @@ namespace OpenSim.Region.Framework.Scenes
item.CreationDate = Util.UnixTimeSinceEpoch();
userInfo.AddItem(item);
remoteClient.SendInventoryItemCreateUpdate(item);
remoteClient.SendInventoryItemCreateUpdate(item, 0);
}
else
{

View File

@ -628,7 +628,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
{
}
public virtual void SendInventoryItemCreateUpdate(InventoryItemBase Item)
public virtual void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackID)
{
}

View File

@ -619,7 +619,7 @@ namespace OpenSim.Tests.Common.Mock
{
}
public virtual void SendInventoryItemCreateUpdate(InventoryItemBase Item)
public virtual void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackID)
{
}