diff options
author | Adam Frisby | 2008-05-01 16:35:00 +0000 |
---|---|---|
committer | Adam Frisby | 2008-05-01 16:35:00 +0000 |
commit | 13526097f24b7a8ad63b1d482c44b44397fa055f (patch) | |
tree | 7a82c20ed7c63e2aea5ad3863325e37f64e1cbea /OpenSim/Region/Environment/Modules/Agent/AssetTransaction | |
parent | * Breaking all the code, breaking all the code..! (diff) | |
download | opensim-SC_OLD-13526097f24b7a8ad63b1d482c44b44397fa055f.zip opensim-SC_OLD-13526097f24b7a8ad63b1d482c44b44397fa055f.tar.gz opensim-SC_OLD-13526097f24b7a8ad63b1d482c44b44397fa055f.tar.bz2 opensim-SC_OLD-13526097f24b7a8ad63b1d482c44b44397fa055f.tar.xz |
* Spring cleaning on Region.Environment.
* Converted a large number of read-only fields to be actually, readonly.
* Reformatted code sections.
* Removed redundant code.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Agent/AssetTransaction')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs | 20 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs | 13 |
2 files changed, 14 insertions, 19 deletions
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs index 555d5f4..008daa2 100644 --- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs +++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
44 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 44 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
46 | // Fields | 46 | // Fields |
47 | private bool m_dumpAssetsToFile; | 47 | private readonly bool m_dumpAssetsToFile; |
48 | public AgentAssetTransactionsManager Manager; | 48 | public AgentAssetTransactionsManager Manager; |
49 | public LLUUID UserID; | 49 | public LLUUID UserID; |
50 | public Dictionary<LLUUID, AssetXferUploader> XferUploaders = new Dictionary<LLUUID, AssetXferUploader>(); | 50 | public Dictionary<LLUUID, AssetXferUploader> XferUploaders = new Dictionary<LLUUID, AssetXferUploader>(); |
@@ -141,23 +141,23 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
141 | public class AssetXferUploader | 141 | public class AssetXferUploader |
142 | { | 142 | { |
143 | // Fields | 143 | // Fields |
144 | private readonly bool m_dumpAssetToFile; | ||
145 | private readonly AgentAssetTransactions m_userTransactions; | ||
144 | public bool AddToInventory; | 146 | public bool AddToInventory; |
145 | public AssetBase Asset; | 147 | public AssetBase Asset; |
146 | public LLUUID InventFolder = LLUUID.Zero; | 148 | public LLUUID InventFolder = LLUUID.Zero; |
147 | private sbyte invType = 0; | 149 | private sbyte invType; |
148 | private bool m_createItem = false; | 150 | private bool m_createItem; |
149 | private string m_description = String.Empty; | 151 | private string m_description = String.Empty; |
150 | private bool m_dumpAssetToFile; | 152 | private bool m_finished; |
151 | private bool m_finished = false; | ||
152 | private string m_name = String.Empty; | 153 | private string m_name = String.Empty; |
153 | private bool m_storeLocal; | 154 | private bool m_storeLocal; |
154 | private AgentAssetTransactions m_userTransactions; | 155 | private uint nextPerm; |
155 | private uint nextPerm = 0; | ||
156 | private IClientAPI ourClient; | 156 | private IClientAPI ourClient; |
157 | public LLUUID TransactionID = LLUUID.Zero; | 157 | public LLUUID TransactionID = LLUUID.Zero; |
158 | private sbyte type = 0; | 158 | private sbyte type; |
159 | public bool UploadComplete; | 159 | public bool UploadComplete; |
160 | private byte wearableType = 0; | 160 | private byte wearableType; |
161 | public ulong XferID; | 161 | public ulong XferID; |
162 | 162 | ||
163 | public AssetXferUploader(AgentAssetTransactions transactions, bool dumpAssetToFile) | 163 | public AssetXferUploader(AgentAssetTransactions transactions, bool dumpAssetToFile) |
@@ -390,7 +390,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
390 | item.BasePermissions = 2147483647; | 390 | item.BasePermissions = 2147483647; |
391 | item.CurrentPermissions = 2147483647; | 391 | item.CurrentPermissions = 2147483647; |
392 | item.NextPermissions = nextPerm; | 392 | item.NextPermissions = nextPerm; |
393 | item.Flags = (uint) wearableType; | 393 | item.Flags = wearableType; |
394 | 394 | ||
395 | userInfo.AddItem(ourClient.AgentId, item); | 395 | userInfo.AddItem(ourClient.AgentId, item); |
396 | ourClient.SendInventoryItemCreateUpdate(item); | 396 | ourClient.SendInventoryItemCreateUpdate(item); |
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs index fcd0e0c..d7f5804 100644 --- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs +++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs | |||
@@ -40,16 +40,11 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
40 | public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions | 40 | public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions |
41 | { | 41 | { |
42 | private readonly Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>(); | 42 | private readonly Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>(); |
43 | private bool m_dumpAssetsToFile = false; | 43 | private bool m_dumpAssetsToFile; |
44 | private Scene m_scene = null; | 44 | private Scene m_scene; |
45 | 45 | ||
46 | private AgentAssetTransactionsManager m_transactionManager; | 46 | private AgentAssetTransactionsManager m_transactionManager; |
47 | 47 | ||
48 | public AssetTransactionModule() | ||
49 | { | ||
50 | // System.Console.WriteLine("creating AgentAssetTransactionModule"); | ||
51 | } | ||
52 | |||
53 | #region IAgentAssetTransactions Members | 48 | #region IAgentAssetTransactions Members |
54 | 49 | ||
55 | public void HandleItemCreationFromTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, | 50 | public void HandleItemCreationFromTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, |
@@ -145,13 +140,13 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
145 | /// <summary> | 140 | /// <summary> |
146 | /// Each agent has its own singleton collection of transactions | 141 | /// Each agent has its own singleton collection of transactions |
147 | /// </summary> | 142 | /// </summary> |
148 | private Dictionary<LLUUID, AgentAssetTransactions> AgentTransactions = | 143 | private readonly Dictionary<LLUUID, AgentAssetTransactions> AgentTransactions = |
149 | new Dictionary<LLUUID, AgentAssetTransactions>(); | 144 | new Dictionary<LLUUID, AgentAssetTransactions>(); |
150 | 145 | ||
151 | /// <summary> | 146 | /// <summary> |
152 | /// Should we dump uploaded assets to the filesystem? | 147 | /// Should we dump uploaded assets to the filesystem? |
153 | /// </summary> | 148 | /// </summary> |
154 | private bool m_dumpAssetsToFile; | 149 | private readonly bool m_dumpAssetsToFile; |
155 | 150 | ||
156 | public Scene MyScene; | 151 | public Scene MyScene; |
157 | 152 | ||