aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs')
-rw-r--r--OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs37
1 files changed, 18 insertions, 19 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs b/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs
index d622e02..55b255a 100644
--- a/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs
+++ b/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs
@@ -25,15 +25,8 @@
25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26* 26*
27*/ 27*/
28using System;
29using System.Collections;
30using System.Collections.Generic; 28using System.Collections.Generic;
31using System.Text;
32using System.IO;
33using libsecondlife; 29using libsecondlife;
34using OpenSim.Framework.Interfaces;
35using OpenSim.Framework;
36using OpenSim.Framework.Data;
37 30
38namespace OpenSim.Framework.Communications.Cache 31namespace OpenSim.Framework.Communications.Cache
39{ 32{
@@ -41,7 +34,10 @@ namespace OpenSim.Framework.Communications.Cache
41 { 34 {
42 // Fields 35 // Fields
43 public CommunicationsManager CommsManager; 36 public CommunicationsManager CommsManager;
44 public Dictionary<LLUUID, AgentAssetTransactions> AgentTransactions = new Dictionary<LLUUID, AgentAssetTransactions>(); 37
38 public Dictionary<LLUUID, AgentAssetTransactions> AgentTransactions =
39 new Dictionary<LLUUID, AgentAssetTransactions>();
40
45 private bool m_dumpAssetsToFile; 41 private bool m_dumpAssetsToFile;
46 42
47 public AssetTransactionManager(CommunicationsManager commsManager, bool dumpAssetsToFile) 43 public AssetTransactionManager(CommunicationsManager commsManager, bool dumpAssetsToFile)
@@ -53,10 +49,10 @@ namespace OpenSim.Framework.Communications.Cache
53 // Methods 49 // Methods
54 public AgentAssetTransactions AddUser(LLUUID userID) 50 public AgentAssetTransactions AddUser(LLUUID userID)
55 { 51 {
56 if (!this.AgentTransactions.ContainsKey(userID)) 52 if (!AgentTransactions.ContainsKey(userID))
57 { 53 {
58 AgentAssetTransactions transactions = new AgentAssetTransactions(userID, this, m_dumpAssetsToFile); 54 AgentAssetTransactions transactions = new AgentAssetTransactions(userID, this, m_dumpAssetsToFile);
59 this.AgentTransactions.Add(userID, transactions); 55 AgentTransactions.Add(userID, transactions);
60 return transactions; 56 return transactions;
61 } 57 }
62 return null; 58 return null;
@@ -64,27 +60,30 @@ namespace OpenSim.Framework.Communications.Cache
64 60
65 public AgentAssetTransactions GetUserTransActions(LLUUID userID) 61 public AgentAssetTransactions GetUserTransActions(LLUUID userID)
66 { 62 {
67 if (this.AgentTransactions.ContainsKey(userID)) 63 if (AgentTransactions.ContainsKey(userID))
68 { 64 {
69 return this.AgentTransactions[userID]; 65 return AgentTransactions[userID];
70 } 66 }
71 return null; 67 return null;
72 } 68 }
73 69
74 public void HandleInventoryFromTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, uint callbackID, string description, string name, sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask) 70 public void HandleInventoryFromTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID,
71 uint callbackID, string description, string name, sbyte invType,
72 sbyte type, byte wearableType, uint nextOwnerMask)
75 { 73 {
76 AgentAssetTransactions transactions = this.GetUserTransActions(remoteClient.AgentId); 74 AgentAssetTransactions transactions = GetUserTransActions(remoteClient.AgentId);
77 if (transactions != null) 75 if (transactions != null)
78 { 76 {
79 transactions.RequestCreateInventoryItem(remoteClient, transactionID, folderID, callbackID, description, name, invType, type, wearableType, nextOwnerMask); 77 transactions.RequestCreateInventoryItem(remoteClient, transactionID, folderID, callbackID, description,
78 name, invType, type, wearableType, nextOwnerMask);
80 } 79 }
81
82 } 80 }
83 81
84 public void HandleUDPUploadRequest(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, bool storeLocal) 82 public void HandleUDPUploadRequest(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type,
83 byte[] data, bool storeLocal)
85 { 84 {
86 // Console.WriteLine("asset upload of " + assetID); 85 // Console.WriteLine("asset upload of " + assetID);
87 AgentAssetTransactions transactions = this.GetUserTransActions(remoteClient.AgentId); 86 AgentAssetTransactions transactions = GetUserTransActions(remoteClient.AgentId);
88 if (transactions != null) 87 if (transactions != null)
89 { 88 {
90 AgentAssetTransactions.AssetXferUploader uploader = transactions.RequestXferUploader(transaction); 89 AgentAssetTransactions.AssetXferUploader uploader = transactions.RequestXferUploader(transaction);
@@ -97,7 +96,7 @@ namespace OpenSim.Framework.Communications.Cache
97 96
98 public void HandleXfer(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data) 97 public void HandleXfer(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data)
99 { 98 {
100 AgentAssetTransactions transactions = this.GetUserTransActions(remoteClient.AgentId); 99 AgentAssetTransactions transactions = GetUserTransActions(remoteClient.AgentId);
101 if (transactions != null) 100 if (transactions != null)
102 { 101 {
103 transactions.HandleXfer(xferID, packetID, data); 102 transactions.HandleXfer(xferID, packetID, data);