diff options
author | Mike Mazur | 2009-02-04 00:01:36 +0000 |
---|---|---|
committer | Mike Mazur | 2009-02-04 00:01:36 +0000 |
commit | 0c03a48fb2060eda4d288e2d2ca4e650ce000b4b (patch) | |
tree | a90465075960c92367b0a5e62db3121e4e3a139d /OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs | |
parent | * Add another object to the existing save oar test (diff) | |
download | opensim-SC-0c03a48fb2060eda4d288e2d2ca4e650ce000b4b.zip opensim-SC-0c03a48fb2060eda4d288e2d2ca4e650ce000b4b.tar.gz opensim-SC-0c03a48fb2060eda4d288e2d2ca4e650ce000b4b.tar.bz2 opensim-SC-0c03a48fb2060eda4d288e2d2ca4e650ce000b4b.tar.xz |
- add OpenSim.Framework.AssetMetadata class. AssetBase is now composed of it
- trim trailing whitespace
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs index 6dcbe83..5387165 100644 --- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs +++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetXferUploader.cs | |||
@@ -113,17 +113,17 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
113 | { | 113 | { |
114 | ourClient = remoteClient; | 114 | ourClient = remoteClient; |
115 | m_asset = new AssetBase(); | 115 | m_asset = new AssetBase(); |
116 | m_asset.FullID = assetID; | 116 | m_asset.Metadata.FullID = assetID; |
117 | m_asset.Type = type; | 117 | m_asset.Metadata.Type = type; |
118 | m_asset.Data = data; | 118 | m_asset.Data = data; |
119 | m_asset.Name = "blank"; | 119 | m_asset.Metadata.Name = "blank"; |
120 | m_asset.Description = "empty"; | 120 | m_asset.Metadata.Description = "empty"; |
121 | m_asset.Local = storeLocal; | 121 | m_asset.Metadata.Local = storeLocal; |
122 | m_asset.Temporary = tempFile; | 122 | m_asset.Metadata.Temporary = tempFile; |
123 | 123 | ||
124 | TransactionID = transaction; | 124 | TransactionID = transaction; |
125 | m_storeLocal = storeLocal; | 125 | m_storeLocal = storeLocal; |
126 | 126 | ||
127 | if (m_asset.Data.Length > 2) | 127 | if (m_asset.Data.Length > 2) |
128 | { | 128 | { |
129 | SendCompleteMessage(); | 129 | SendCompleteMessage(); |
@@ -140,12 +140,12 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
140 | protected void RequestStartXfer() | 140 | protected void RequestStartXfer() |
141 | { | 141 | { |
142 | XferID = Util.GetNextXferID(); | 142 | XferID = Util.GetNextXferID(); |
143 | ourClient.SendXferRequest(XferID, m_asset.Type, m_asset.FullID, 0, new byte[0]); | 143 | ourClient.SendXferRequest(XferID, m_asset.Metadata.Type, m_asset.Metadata.FullID, 0, new byte[0]); |
144 | } | 144 | } |
145 | 145 | ||
146 | protected void SendCompleteMessage() | 146 | protected void SendCompleteMessage() |
147 | { | 147 | { |
148 | ourClient.SendAssetUploadCompleteMessage(m_asset.Type, true, m_asset.FullID); | 148 | ourClient.SendAssetUploadCompleteMessage(m_asset.Metadata.Type, true, m_asset.Metadata.FullID); |
149 | 149 | ||
150 | m_finished = true; | 150 | m_finished = true; |
151 | if (m_createItem) | 151 | if (m_createItem) |
@@ -164,7 +164,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
164 | DateTime now = DateTime.Now; | 164 | DateTime now = DateTime.Now; |
165 | string filename = | 165 | string filename = |
166 | String.Format("{6}_{7}_{0:d2}{1:d2}{2:d2}_{3:d2}{4:d2}{5:d2}.dat", now.Year, now.Month, now.Day, | 166 | String.Format("{6}_{7}_{0:d2}{1:d2}{2:d2}_{3:d2}{4:d2}{5:d2}.dat", now.Year, now.Month, now.Day, |
167 | now.Hour, now.Minute, now.Second, m_asset.Name, m_asset.Type); | 167 | now.Hour, now.Minute, now.Second, m_asset.Metadata.Name, m_asset.Metadata.Type); |
168 | SaveAssetToFile(filename, m_asset.Data); | 168 | SaveAssetToFile(filename, m_asset.Data); |
169 | } | 169 | } |
170 | } | 170 | } |
@@ -196,9 +196,9 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
196 | this.invType = invType; | 196 | this.invType = invType; |
197 | this.wearableType = wearableType; | 197 | this.wearableType = wearableType; |
198 | nextPerm = nextOwnerMask; | 198 | nextPerm = nextOwnerMask; |
199 | m_asset.Name = name; | 199 | m_asset.Metadata.Name = name; |
200 | m_asset.Description = description; | 200 | m_asset.Metadata.Description = description; |
201 | m_asset.Type = type; | 201 | m_asset.Metadata.Type = type; |
202 | 202 | ||
203 | if (m_finished) | 203 | if (m_finished) |
204 | { | 204 | { |
@@ -211,7 +211,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
211 | } | 211 | } |
212 | } | 212 | } |
213 | 213 | ||
214 | 214 | ||
215 | private void DoCreateItem() | 215 | private void DoCreateItem() |
216 | { | 216 | { |
217 | m_userTransactions.Manager.MyScene.CommsManager.AssetCache.AddAsset(m_asset); | 217 | m_userTransactions.Manager.MyScene.CommsManager.AssetCache.AddAsset(m_asset); |
@@ -225,7 +225,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
225 | item.Owner = ourClient.AgentId; | 225 | item.Owner = ourClient.AgentId; |
226 | item.Creator = ourClient.AgentId; | 226 | item.Creator = ourClient.AgentId; |
227 | item.ID = UUID.Random(); | 227 | item.ID = UUID.Random(); |
228 | item.AssetID = m_asset.FullID; | 228 | item.AssetID = m_asset.Metadata.FullID; |
229 | item.Description = m_description; | 229 | item.Description = m_description; |
230 | item.Name = m_name; | 230 | item.Name = m_name; |
231 | item.AssetType = type; | 231 | item.AssetType = type; |
@@ -245,9 +245,9 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
245 | else | 245 | else |
246 | { | 246 | { |
247 | m_log.ErrorFormat( | 247 | m_log.ErrorFormat( |
248 | "[ASSET TRANSACTIONS]: Could not find user {0} for inventory item creation", | 248 | "[ASSET TRANSACTIONS]: Could not find user {0} for inventory item creation", |
249 | ourClient.AgentId); | 249 | ourClient.AgentId); |
250 | } | 250 | } |
251 | } | 251 | } |
252 | 252 | ||
253 | /// <summary> | 253 | /// <summary> |
@@ -260,7 +260,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
260 | { | 260 | { |
261 | return m_asset; | 261 | return m_asset; |
262 | } | 262 | } |
263 | 263 | ||
264 | return null; | 264 | return null; |
265 | } | 265 | } |
266 | } | 266 | } |