diff options
author | lbsa71 | 2007-03-27 18:27:11 +0000 |
---|---|---|
committer | lbsa71 | 2007-03-27 18:27:11 +0000 |
commit | 893a1824d075a6edfd40ac1ef2a7e4fc2fec968c (patch) | |
tree | 0bf4a03dd6635be9691c3cc114a4229ac2db5a12 /OpenSim.RegionServer/AgentAssetUpload.cs | |
parent | * Prebuild breaks nant build if project is empty. Quick fix : add dummy file (diff) | |
download | opensim-SC-893a1824d075a6edfd40ac1ef2a7e4fc2fec968c.zip opensim-SC-893a1824d075a6edfd40ac1ef2a7e4fc2fec968c.tar.gz opensim-SC-893a1824d075a6edfd40ac1ef2a7e4fc2fec968c.tar.bz2 opensim-SC-893a1824d075a6edfd40ac1ef2a7e4fc2fec968c.tar.xz |
* Introduced BaseHttpServer (doing nothing at the moment)
* Removed OpenSimRoot dependencies from SimClient and AgentAssetUpload. 2 down, 7 left to go.
Diffstat (limited to 'OpenSim.RegionServer/AgentAssetUpload.cs')
-rw-r--r-- | OpenSim.RegionServer/AgentAssetUpload.cs | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/OpenSim.RegionServer/AgentAssetUpload.cs b/OpenSim.RegionServer/AgentAssetUpload.cs index a482e80..9f85598 100644 --- a/OpenSim.RegionServer/AgentAssetUpload.cs +++ b/OpenSim.RegionServer/AgentAssetUpload.cs | |||
@@ -1,6 +1,7 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | using OpenSim.Assets; | ||
4 | using OpenSim.Framework.Assets; | 5 | using OpenSim.Framework.Assets; |
5 | using OpenSim.Framework.Utilities; | 6 | using OpenSim.Framework.Utilities; |
6 | using libsecondlife; | 7 | using libsecondlife; |
@@ -12,10 +13,14 @@ namespace OpenSim | |||
12 | { | 13 | { |
13 | private Dictionary<LLUUID, AssetTransaction> transactions = new Dictionary<LLUUID, AssetTransaction>(); | 14 | private Dictionary<LLUUID, AssetTransaction> transactions = new Dictionary<LLUUID, AssetTransaction>(); |
14 | private SimClient ourClient; | 15 | private SimClient ourClient; |
16 | private AssetCache m_assetCache; | ||
17 | private InventoryCache m_inventoryCache; | ||
15 | 18 | ||
16 | public AgentAssetUpload(SimClient client) | 19 | public AgentAssetUpload(SimClient client, AssetCache assetCache, InventoryCache inventoryCache) |
17 | { | 20 | { |
18 | this.ourClient = client; | 21 | this.ourClient = client; |
22 | m_assetCache = assetCache; | ||
23 | m_inventoryCache = inventoryCache; | ||
19 | } | 24 | } |
20 | 25 | ||
21 | public void AddUpload(LLUUID transactionID, AssetBase asset) | 26 | public void AddUpload(LLUUID transactionID, AssetBase asset) |
@@ -148,8 +153,8 @@ namespace OpenSim | |||
148 | //check if we should add it to inventory | 153 | //check if we should add it to inventory |
149 | if (trans.AddToInventory) | 154 | if (trans.AddToInventory) |
150 | { | 155 | { |
151 | OpenSimRoot.Instance.AssetCache.AddAsset(trans.Asset); | 156 | m_assetCache.AddAsset(trans.Asset); |
152 | OpenSimRoot.Instance.InventoryCache.AddNewInventoryItem(this.ourClient, trans.InventFolder, trans.Asset); | 157 | m_inventoryCache.AddNewInventoryItem(this.ourClient, trans.InventFolder, trans.Asset); |
153 | } | 158 | } |
154 | 159 | ||
155 | 160 | ||
@@ -176,7 +181,7 @@ namespace OpenSim | |||
176 | AssetTransaction trans = this.transactions[transactionID]; | 181 | AssetTransaction trans = this.transactions[transactionID]; |
177 | if (trans.UploadComplete) | 182 | if (trans.UploadComplete) |
178 | { | 183 | { |
179 | OpenSimRoot.Instance.AssetCache.AddAsset(trans.Asset); | 184 | m_assetCache.AddAsset(trans.Asset); |
180 | asset = trans.Asset; | 185 | asset = trans.Asset; |
181 | } | 186 | } |
182 | } | 187 | } |
@@ -195,8 +200,8 @@ namespace OpenSim | |||
195 | if (trans.UploadComplete) | 200 | if (trans.UploadComplete) |
196 | { | 201 | { |
197 | //already complete so we can add it to the inventory | 202 | //already complete so we can add it to the inventory |
198 | OpenSimRoot.Instance.AssetCache.AddAsset(trans.Asset); | 203 | m_assetCache.AddAsset(trans.Asset); |
199 | Console.WriteLine( "ITem created is " +OpenSimRoot.Instance.InventoryCache.AddNewInventoryItem(this.ourClient, packet.InventoryBlock.FolderID, trans.Asset).ToStringHyphenated()); | 204 | Console.WriteLine( "ITem created is " +m_inventoryCache.AddNewInventoryItem(this.ourClient, packet.InventoryBlock.FolderID, trans.Asset).ToStringHyphenated()); |
200 | } | 205 | } |
201 | else | 206 | else |
202 | { | 207 | { |