diff options
More work on inventory, can now create other inventory types, like Clothes and body parts. [Note while you can edit these, at the moment your changes won't be saved between restarts. This will be fixed very soon.]
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs b/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs index f9f814a..1f5f99d 100644 --- a/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs +++ b/OpenSim/Framework/Communications/Cache/AssetTransactionManager.cs | |||
@@ -41,14 +41,20 @@ namespace OpenSim.Framework.Communications.Caches | |||
41 | public class AssetTransactionManager | 41 | public class AssetTransactionManager |
42 | { | 42 | { |
43 | // Fields | 43 | // Fields |
44 | public CommunicationsManager CommsManager; | ||
44 | public Dictionary<LLUUID, AgentAssetTransactions> AgentTransactions = new Dictionary<LLUUID, AgentAssetTransactions>(); | 45 | public Dictionary<LLUUID, AgentAssetTransactions> AgentTransactions = new Dictionary<LLUUID, AgentAssetTransactions>(); |
45 | 46 | ||
47 | public AssetTransactionManager(CommunicationsManager commsManager) | ||
48 | { | ||
49 | CommsManager = commsManager; | ||
50 | } | ||
51 | |||
46 | // Methods | 52 | // Methods |
47 | public AgentAssetTransactions AddUser(LLUUID userID) | 53 | public AgentAssetTransactions AddUser(LLUUID userID) |
48 | { | 54 | { |
49 | if (!this.AgentTransactions.ContainsKey(userID)) | 55 | if (!this.AgentTransactions.ContainsKey(userID)) |
50 | { | 56 | { |
51 | AgentAssetTransactions transactions = new AgentAssetTransactions(userID); | 57 | AgentAssetTransactions transactions = new AgentAssetTransactions(userID, this); |
52 | this.AgentTransactions.Add(userID, transactions); | 58 | this.AgentTransactions.Add(userID, transactions); |
53 | return transactions; | 59 | return transactions; |
54 | } | 60 | } |
@@ -64,18 +70,38 @@ namespace OpenSim.Framework.Communications.Caches | |||
64 | return null; | 70 | return null; |
65 | } | 71 | } |
66 | 72 | ||
67 | public void HandleInventoryFromTransaction() | 73 | public void HandleInventoryFromTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, uint callbackID, string description, string name, sbyte invType, sbyte type, byte wearableType, uint nextOwnerMask) |
68 | { | 74 | { |
75 | AgentAssetTransactions transactions = this.GetUserTransActions(remoteClient.AgentId); | ||
76 | if (transactions != null) | ||
77 | { | ||
78 | transactions.RequestCreateInventoryItem(remoteClient, transactionID, folderID, callbackID, description, name, invType, type, wearableType, nextOwnerMask); | ||
79 | } | ||
80 | |||
69 | } | 81 | } |
70 | 82 | ||
71 | public void HandleUDPUploadRequest() | 83 | public void HandleUDPUploadRequest(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data) |
72 | { | 84 | { |
85 | AgentAssetTransactions transactions = this.GetUserTransActions(remoteClient.AgentId); | ||
86 | if (transactions != null) | ||
87 | { | ||
88 | AgentAssetTransactions.AssetXferUploader uploader = transactions.RequestXferUploader(transaction); | ||
89 | if (uploader != null) | ||
90 | { | ||
91 | uploader.Initialise(remoteClient, assetID, transaction, type, data); | ||
92 | } | ||
93 | } | ||
73 | } | 94 | } |
74 | 95 | ||
75 | public void HandleXfer(IClientAPI remoteClient, uint xferID, uint packetID, byte[] data) | 96 | public void HandleXfer(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data) |
76 | { | 97 | { |
98 | AgentAssetTransactions transactions = this.GetUserTransActions(remoteClient.AgentId); | ||
99 | if (transactions != null) | ||
100 | { | ||
101 | transactions.HandleXfer(xferID, packetID, data); | ||
102 | } | ||
77 | } | 103 | } |
78 | } | 104 | } |
79 | } | 105 | } |
80 | 106 | ||
81 | 107 | ||