* This is the fabled LibOMV update with all of the libOMV types from JHurliman

* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point.  Regular people should let the dust settle.
* This has been tested to work with most basic functions. However..   make sure you back up 'everything' before using this.  It's that big!  
* Essentially we're back at square 1 in the testing phase..  so lets identify things that broke.
This commit is contained in:
Teravus Ovares
2008-09-06 07:52:41 +00:00
parent cbec2bf22b
commit 7d89e12293
388 changed files with 6811 additions and 7138 deletions

View File

@@ -26,8 +26,8 @@
*/
using System.Collections.Generic;
using libsecondlife;
using libsecondlife.Packets;
using OpenMetaverse;
using OpenMetaverse.Packets;
using Nini.Config;
using OpenSim.Framework;
using OpenSim.Region.Environment.Interfaces;
@@ -43,16 +43,16 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
private List<AssetRequest> AssetRequests;
private Scene m_scene;
private Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>();
private Dictionary<UUID, Scene> RegisteredScenes = new Dictionary<UUID, Scene>();
///
/// Assets requests (for each user) which are waiting for asset server data. This includes texture requests
/// </summary>
private Dictionary<LLUUID, Dictionary<LLUUID, AssetRequest>> RequestedAssets;
private Dictionary<UUID, Dictionary<UUID, AssetRequest>> RequestedAssets;
public AssetDownloadModule()
{
RequestedAssets = new Dictionary<LLUUID, Dictionary<LLUUID, AssetRequest>>();
RequestedAssets = new Dictionary<UUID, Dictionary<UUID, AssetRequest>>();
AssetRequests = new List<AssetRequest>();
}
@@ -109,24 +109,24 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
/// <param name="transferRequest"></param>
public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest)
{
LLUUID requestID = null;
UUID requestID = null;
byte source = 2;
if (transferRequest.TransferInfo.SourceType == 2)
{
//direct asset request
requestID = new LLUUID(transferRequest.TransferInfo.Params, 0);
requestID = new UUID(transferRequest.TransferInfo.Params, 0);
}
else if (transferRequest.TransferInfo.SourceType == 3)
{
//inventory asset request
requestID = new LLUUID(transferRequest.TransferInfo.Params, 80);
requestID = new UUID(transferRequest.TransferInfo.Params, 80);
source = 3;
//Console.WriteLine("asset request " + requestID);
}
//not found asset
// so request from asset server
Dictionary<LLUUID, AssetRequest> userRequests = null;
Dictionary<UUID, AssetRequest> userRequests = null;
if (RequestedAssets.TryGetValue(userInfo.AgentId, out userRequests))
{
if (!userRequests.ContainsKey(requestID))
@@ -143,7 +143,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
}
else
{
userRequests = new Dictionary<LLUUID, AssetRequest>();
userRequests = new Dictionary<UUID, AssetRequest>();
AssetRequest request = new AssetRequest();
request.RequestUser = userInfo;
request.RequestAssetID = requestID;
@@ -156,11 +156,11 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
}
}
public void AssetCallback(LLUUID assetID, AssetBase asset)
public void AssetCallback(UUID assetID, AssetBase asset)
{
if (asset != null)
{
foreach (Dictionary<LLUUID, AssetRequest> userRequests in RequestedAssets.Values)
foreach (Dictionary<UUID, AssetRequest> userRequests in RequestedAssets.Values)
{
if (userRequests.ContainsKey(assetID))
{
@@ -212,9 +212,9 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
public int NumPackets = 0;
public int PacketCounter = 0;
public byte[] Params = null;
public LLUUID RequestAssetID;
public UUID RequestAssetID;
public IClientAPI RequestUser;
public LLUUID TransferRequestID;
public UUID TransferRequestID;
//public bool AssetInCache;
//public int TimeRequested;
@@ -225,4 +225,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
#endregion
}
}
}

View File

@@ -28,8 +28,8 @@
using System;
using System.Collections.Generic;
using System.IO;
using libsecondlife;
using libsecondlife.Packets;
using OpenMetaverse;
using OpenMetaverse.Packets;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Cache;
@@ -46,18 +46,18 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
// Fields
private bool m_dumpAssetsToFile;
public AgentAssetTransactionsManager Manager;
public LLUUID UserID;
public Dictionary<LLUUID, AssetXferUploader> XferUploaders = new Dictionary<LLUUID, AssetXferUploader>();
public UUID UserID;
public Dictionary<UUID, AssetXferUploader> XferUploaders = new Dictionary<UUID, AssetXferUploader>();
// Methods
public AgentAssetTransactions(LLUUID agentID, AgentAssetTransactionsManager manager, bool dumpAssetsToFile)
public AgentAssetTransactions(UUID agentID, AgentAssetTransactionsManager manager, bool dumpAssetsToFile)
{
UserID = agentID;
Manager = manager;
m_dumpAssetsToFile = dumpAssetsToFile;
}
public AssetXferUploader RequestXferUploader(LLUUID transactionID)
public AssetXferUploader RequestXferUploader(UUID transactionID)
{
if (!XferUploaders.ContainsKey(transactionID))
{
@@ -90,7 +90,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
}
}
public void RequestCreateInventoryItem(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID,
public void RequestCreateInventoryItem(IClientAPI remoteClient, UUID transactionID, UUID folderID,
uint callbackID, string description, string name, sbyte invType,
sbyte type, byte wearableType, uint nextOwnerMask)
{
@@ -102,7 +102,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
}
}
public void RequestUpdateInventoryItem(IClientAPI remoteClient, LLUUID transactionID,
public void RequestUpdateInventoryItem(IClientAPI remoteClient, UUID transactionID,
InventoryItemBase item)
{
if (XferUploaders.ContainsKey(transactionID))
@@ -116,7 +116,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
/// </summary>
/// <param name="transactionID"></param>
/// <returns>The asset if the upload has completed, null if it has not.</returns>
public AssetBase GetTransactionAsset(LLUUID transactionID)
public AssetBase GetTransactionAsset(UUID transactionID)
{
if (XferUploaders.ContainsKey(transactionID))
{
@@ -143,7 +143,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
// Fields
public bool AddToInventory;
public AssetBase Asset;
public LLUUID InventFolder = LLUUID.Zero;
public UUID InventFolder = UUID.Zero;
private sbyte invType = 0;
private bool m_createItem = false;
private string m_description = String.Empty;
@@ -154,7 +154,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
private AgentAssetTransactions m_userTransactions;
private uint nextPerm = 0;
private IClientAPI ourClient;
public LLUUID TransactionID = LLUUID.Zero;
public UUID TransactionID = UUID.Zero;
private sbyte type = 0;
public bool UploadComplete;
private byte wearableType = 0;
@@ -210,7 +210,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
/// <param name="packetID"></param>
/// <param name="data"></param>
/// <returns>True if the transfer is complete, false otherwise</returns>
public bool Initialise(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data,
public bool Initialise(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type, byte[] data,
bool storeLocal, bool tempFile)
{
ourClient = remoteClient;
@@ -297,7 +297,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
fs.Close();
}
public void RequestCreateInventoryItem(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID,
public void RequestCreateInventoryItem(IClientAPI remoteClient, UUID transactionID, UUID folderID,
uint callbackID, string description, string name, sbyte invType,
sbyte type, byte wearableType, uint nextOwnerMask)
{
@@ -321,7 +321,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
}
}
public void RequestUpdateInventoryItem(IClientAPI remoteClient, LLUUID transactionID,
public void RequestUpdateInventoryItem(IClientAPI remoteClient, UUID transactionID,
InventoryItemBase item)
{
if (TransactionID == transactionID)
@@ -332,7 +332,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
if (userInfo != null)
{
LLUUID assetID = LLUUID.Combine(transactionID, remoteClient.SecureSessionId);
UUID assetID = UUID.Combine(transactionID, remoteClient.SecureSessionId);
AssetBase asset
= m_userTransactions.Manager.MyScene.CommsManager.AssetCache.GetAsset(
@@ -346,7 +346,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
if (asset != null && asset.FullID == assetID)
{
// Assets never get updated, new ones get created
asset.FullID = LLUUID.Random();
asset.FullID = UUID.Random();
asset.Name = item.Name;
asset.Description = item.Description;
asset.Type = (sbyte) item.AssetType;
@@ -371,7 +371,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
InventoryItemBase item = new InventoryItemBase();
item.Owner = ourClient.AgentId;
item.Creator = ourClient.AgentId;
item.ID = LLUUID.Random();
item.ID = UUID.Random();
item.AssetID = Asset.FullID;
item.Description = m_description;
item.Name = m_name;

View File

@@ -28,7 +28,7 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using libsecondlife;
using OpenMetaverse;
using log4net;
using Nini.Config;
using OpenSim.Framework;
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
{
public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions
{
private readonly Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>();
private readonly Dictionary<UUID, Scene> RegisteredScenes = new Dictionary<UUID, Scene>();
private bool m_dumpAssetsToFile = false;
private Scene m_scene = null;
@@ -53,7 +53,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
#region IAgentAssetTransactions Members
public void HandleItemCreationFromTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID,
public void HandleItemCreationFromTransaction(IClientAPI remoteClient, UUID transactionID, UUID folderID,
uint callbackID, string description, string name, sbyte invType,
sbyte type, byte wearableType, uint nextOwnerMask)
{
@@ -61,13 +61,13 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
wearableType, nextOwnerMask);
}
public void HandleItemUpdateFromTransaction(IClientAPI remoteClient, LLUUID transactionID,
public void HandleItemUpdateFromTransaction(IClientAPI remoteClient, UUID transactionID,
InventoryItemBase item)
{
m_transactionManager.HandleItemUpdateFromTransaction(remoteClient, transactionID, item);
}
public void RemoveAgentAssetTransactions(LLUUID userID)
public void RemoveAgentAssetTransactions(UUID userID)
{
m_transactionManager.RemoveAgentAssetTransactions(userID);
}
@@ -146,8 +146,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
/// <summary>
/// Each agent has its own singleton collection of transactions
/// </summary>
private Dictionary<LLUUID, AgentAssetTransactions> AgentTransactions =
new Dictionary<LLUUID, AgentAssetTransactions>();
private Dictionary<UUID, AgentAssetTransactions> AgentTransactions =
new Dictionary<UUID, AgentAssetTransactions>();
/// <summary>
/// Should we dump uploaded assets to the filesystem?
@@ -168,7 +168,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
/// </summary>
/// <param name="userID"></param>
/// <returns></returns>
private AgentAssetTransactions GetUserTransactions(LLUUID userID)
private AgentAssetTransactions GetUserTransactions(UUID userID)
{
lock (AgentTransactions)
{
@@ -188,7 +188,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
/// from a scene (and hence won't be making any more transactions here).
/// </summary>
/// <param name="userID"></param>
public void RemoveAgentAssetTransactions(LLUUID userID)
public void RemoveAgentAssetTransactions(UUID userID)
{
// m_log.DebugFormat("Removing agent asset transactions structure for agent {0}", userID);
@@ -214,7 +214,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
/// <param name="type"></param>
/// <param name="wearableType"></param>
/// <param name="nextOwnerMask"></param>
public void HandleItemCreationFromTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID,
public void HandleItemCreationFromTransaction(IClientAPI remoteClient, UUID transactionID, UUID folderID,
uint callbackID, string description, string name, sbyte invType,
sbyte type, byte wearableType, uint nextOwnerMask)
{
@@ -237,7 +237,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
/// <param name="remoteClient"></param>
/// <param name="transactionID"></param>
/// <param name="item"></param>
public void HandleItemUpdateFromTransaction(IClientAPI remoteClient, LLUUID transactionID,
public void HandleItemUpdateFromTransaction(IClientAPI remoteClient, UUID transactionID,
InventoryItemBase item)
{
m_log.DebugFormat(
@@ -259,7 +259,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
/// <param name="type"></param>
/// <param name="data"></param></param>
/// <param name="tempFile"></param>
public void HandleUDPUploadRequest(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type,
public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type,
byte[] data, bool storeLocal, bool tempFile)
{
if (((AssetType)type == AssetType.Texture ||

View File

@@ -28,7 +28,7 @@
using System;
using System.Collections.Generic;
using System.Threading;
using libsecondlife;
using OpenMetaverse;
using Nini.Config;
using OpenSim.Framework;
using OpenSim.Region.Environment.Interfaces;
@@ -50,8 +50,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
/// <summary>
/// Each user has their own texture download service.
/// </summary>
private readonly Dictionary<LLUUID, UserTextureDownloadService> m_userTextureServices =
new Dictionary<LLUUID, UserTextureDownloadService>();
private readonly Dictionary<UUID, UserTextureDownloadService> m_userTextureServices =
new Dictionary<UUID, UserTextureDownloadService>();
private Scene m_scene;
private List<Scene> m_scenes = new List<Scene>();
@@ -109,7 +109,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
/// Cleanup the texture service related objects for the removed presence.
/// </summary>
/// <param name="agentId"> </param>
private void EventManager_OnRemovePresence(LLUUID agentId)
private void EventManager_OnRemovePresence(UUID agentId)
{
UserTextureDownloadService textureService;
@@ -216,4 +216,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
m_scene.AddPendingDownloads(-1);
}
}
}
}

View File

@@ -25,8 +25,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using libsecondlife;
using libsecondlife.Packets;
using OpenMetaverse;
using OpenMetaverse.Packets;
using OpenSim.Framework;
using OpenSim.Region.Environment.Interfaces;
@@ -46,11 +46,11 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
// See ITextureSender
// private bool m_sending = false;
private LLUUID m_textureId;
private UUID m_textureId;
// See ITextureSender
public TextureNotFoundSender(IClientAPI client, LLUUID textureID)
public TextureNotFoundSender(IClientAPI client, UUID textureID)
{
// // m_client = client;
m_textureId = textureID;
@@ -101,4 +101,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
#endregion
}
}
}

View File

@@ -27,7 +27,7 @@
using System.Collections.Generic;
using System.Reflection;
using libsecondlife;
using OpenMetaverse;
using log4net;
using OpenSim.Framework;
using OpenSim.Framework.Communications.Limit;
@@ -65,8 +65,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
/// <summary>
/// XXX Also going to limit requests for found textures.
/// </summary>
private readonly IRequestLimitStrategy<LLUUID> foundTextureLimitStrategy
= new RepeatLimitStrategy<LLUUID>(MAX_ALLOWED_TEXTURE_REQUESTS);
private readonly IRequestLimitStrategy<UUID> foundTextureLimitStrategy
= new RepeatLimitStrategy<UUID>(MAX_ALLOWED_TEXTURE_REQUESTS);
private readonly IClientAPI m_client;
private readonly Scene m_scene;
@@ -80,15 +80,15 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
/// <summary>
/// Holds texture senders before they have received the appropriate texture from the asset cache.
/// </summary>
private readonly Dictionary<LLUUID, TextureSender.TextureSender> m_textureSenders = new Dictionary<LLUUID, TextureSender.TextureSender>();
private readonly Dictionary<UUID, TextureSender.TextureSender> m_textureSenders = new Dictionary<UUID, TextureSender.TextureSender>();
/// <summary>
/// We're going to limit requests for the same missing texture.
/// XXX This is really a temporary solution to deal with the situation where a client continually requests
/// the same missing textures
/// </summary>
private readonly IRequestLimitStrategy<LLUUID> missingTextureLimitStrategy
= new RepeatLimitStrategy<LLUUID>(MAX_ALLOWED_TEXTURE_REQUESTS);
private readonly IRequestLimitStrategy<UUID> missingTextureLimitStrategy
= new RepeatLimitStrategy<UUID>(MAX_ALLOWED_TEXTURE_REQUESTS);
public UserTextureDownloadService(
IClientAPI client, Scene scene, BlockingQueue<ITextureSender> sharedQueue)
@@ -172,7 +172,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
/// </summary>
/// <param name="textureID"></param>
/// <param name="texture"></param>
public void TextureCallback(LLUUID textureID, AssetBase texture)
public void TextureCallback(UUID textureID, AssetBase texture)
{
//m_log.DebugFormat("[USER TEXTURE DOWNLOAD SERVICE]: Calling TextureCallback with {0}, texture == null is {1}", textureID, (texture == null ? true : false));

View File

@@ -27,7 +27,7 @@
using System;
using System.Reflection;
using libsecondlife.Packets;
using OpenMetaverse.Packets;
using log4net;
using OpenSim.Framework;
using OpenSim.Region.Environment.Interfaces;
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
/// </summary>
private AssetBase m_asset;
//public LLUUID assetID { get { return m_asset.FullID; } }
//public UUID assetID { get { return m_asset.FullID; } }
// private bool m_cancel = false;
@@ -220,4 +220,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
return numPackets;
}
}
}
}

View File

@@ -27,7 +27,7 @@
using System;
using System.Collections.Generic;
using libsecondlife;
using OpenMetaverse;
using Nini.Config;
using OpenSim.Framework;
using OpenSim.Region.Environment.Interfaces;
@@ -228,4 +228,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer
#endregion
}
}
}