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 | |
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')
9 files changed, 114 insertions, 114 deletions
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs index 689b4d5..7f4bb0b 100644 --- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs +++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs | |||
@@ -72,7 +72,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
72 | } | 72 | } |
73 | 73 | ||
74 | public void HandleXfer(ulong xferID, uint packetID, byte[] data) | 74 | public void HandleXfer(ulong xferID, uint packetID, byte[] data) |
75 | { | 75 | { |
76 | lock (XferUploaders) | 76 | lock (XferUploaders) |
77 | { | 77 | { |
78 | foreach (AssetXferUploader uploader in XferUploaders.Values) | 78 | foreach (AssetXferUploader uploader in XferUploaders.Values) |
@@ -97,8 +97,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
97 | wearableType, nextOwnerMask); | 97 | wearableType, nextOwnerMask); |
98 | } | 98 | } |
99 | } | 99 | } |
100 | 100 | ||
101 | 101 | ||
102 | 102 | ||
103 | /// <summary> | 103 | /// <summary> |
104 | /// Get an uploaded asset. If the data is successfully retrieved, the transaction will be removed. | 104 | /// Get an uploaded asset. If the data is successfully retrieved, the transaction will be removed. |
@@ -171,10 +171,10 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
171 | "[ASSET TRANSACTIONS]: Updating task item {0} in {1} with asset in transaction {2}", | 171 | "[ASSET TRANSACTIONS]: Updating task item {0} in {1} with asset in transaction {2}", |
172 | item.Name, part.Name, transactionID); | 172 | item.Name, part.Name, transactionID); |
173 | 173 | ||
174 | asset.Name = item.Name; | 174 | asset.Metadata.Name = item.Name; |
175 | asset.Description = item.Description; | 175 | asset.Metadata.Description = item.Description; |
176 | asset.Type = (sbyte)item.Type; | 176 | asset.Metadata.Type = (sbyte)item.Type; |
177 | item.AssetID = asset.FullID; | 177 | item.AssetID = asset.Metadata.FullID; |
178 | 178 | ||
179 | Manager.MyScene.CommsManager.AssetCache.AddAsset(asset); | 179 | Manager.MyScene.CommsManager.AssetCache.AddAsset(asset); |
180 | 180 | ||
@@ -206,14 +206,14 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction | |||
206 | asset = GetTransactionAsset(transactionID); | 206 | asset = GetTransactionAsset(transactionID); |
207 | } | 207 | } |
208 | 208 | ||
209 | if (asset != null && asset.FullID == assetID) | 209 | if (asset != null && asset.Metadata.FullID == assetID) |
210 | { | 210 | { |
211 | // Assets never get updated, new ones get created | 211 | // Assets never get updated, new ones get created |
212 | asset.FullID = UUID.Random(); | 212 | asset.Metadata.FullID = UUID.Random(); |
213 | asset.Name = item.Name; | 213 | asset.Metadata.Name = item.Name; |
214 | asset.Description = item.Description; | 214 | asset.Metadata.Description = item.Description; |
215 | asset.Type = (sbyte)item.AssetType; | 215 | asset.Metadata.Type = (sbyte)item.AssetType; |
216 | item.AssetID = asset.FullID; | 216 | item.AssetID = asset.Metadata.FullID; |
217 | 217 | ||
218 | Manager.MyScene.CommsManager.AssetCache.AddAsset(asset); | 218 | Manager.MyScene.CommsManager.AssetCache.AddAsset(asset); |
219 | } | 219 | } |
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 | } |
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs b/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs index a6901b6..f9a10bf 100644 --- a/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs +++ b/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender | |||
55 | /// </summary> | 55 | /// </summary> |
56 | private AssetBase m_asset; | 56 | private AssetBase m_asset; |
57 | 57 | ||
58 | //public UUID assetID { get { return m_asset.FullID; } } | 58 | //public UUID assetID { get { return m_asset.Metadata.FullID; } } |
59 | 59 | ||
60 | // private bool m_cancel = false; | 60 | // private bool m_cancel = false; |
61 | 61 | ||
@@ -93,7 +93,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender | |||
93 | get { return false; } | 93 | get { return false; } |
94 | set | 94 | set |
95 | { | 95 | { |
96 | // m_cancel = value; | 96 | // m_cancel = value; |
97 | } | 97 | } |
98 | } | 98 | } |
99 | 99 | ||
@@ -102,7 +102,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender | |||
102 | get { return false; } | 102 | get { return false; } |
103 | set | 103 | set |
104 | { | 104 | { |
105 | // m_sending = value; | 105 | // m_sending = value; |
106 | } | 106 | } |
107 | } | 107 | } |
108 | 108 | ||
@@ -117,7 +117,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender | |||
117 | // See ITextureSender | 117 | // See ITextureSender |
118 | public bool SendTexturePacket() | 118 | public bool SendTexturePacket() |
119 | { | 119 | { |
120 | //m_log.DebugFormat("[TEXTURE SENDER]: Sending packet for {0}", m_asset.FullID); | 120 | //m_log.DebugFormat("[TEXTURE SENDER]: Sending packet for {0}", m_asset.Metadata.FullID); |
121 | 121 | ||
122 | SendPacket(); | 122 | SendPacket(); |
123 | counter++; | 123 | counter++; |
@@ -154,7 +154,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender | |||
154 | { | 154 | { |
155 | if (NumPackets == 0) | 155 | if (NumPackets == 0) |
156 | { | 156 | { |
157 | RequestUser.SendImageFirstPart(1, m_asset.FullID, (uint)m_asset.Data.Length, m_asset.Data, 2); | 157 | RequestUser.SendImageFirstPart(1, m_asset.Metadata.FullID, (uint)m_asset.Data.Length, m_asset.Data, 2); |
158 | PacketCounter++; | 158 | PacketCounter++; |
159 | } | 159 | } |
160 | else | 160 | else |
@@ -163,7 +163,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender | |||
163 | Array.Copy(m_asset.Data, 0, ImageData1, 0, 600); | 163 | Array.Copy(m_asset.Data, 0, ImageData1, 0, 600); |
164 | 164 | ||
165 | RequestUser.SendImageFirstPart( | 165 | RequestUser.SendImageFirstPart( |
166 | (ushort)(NumPackets), m_asset.FullID, (uint)m_asset.Data.Length, ImageData1, 2); | 166 | (ushort)(NumPackets), m_asset.Metadata.FullID, (uint)m_asset.Data.Length, ImageData1, 2); |
167 | PacketCounter++; | 167 | PacketCounter++; |
168 | } | 168 | } |
169 | } | 169 | } |
@@ -179,11 +179,11 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender | |||
179 | catch (ArgumentOutOfRangeException) | 179 | catch (ArgumentOutOfRangeException) |
180 | { | 180 | { |
181 | m_log.Error("[TEXTURE SENDER]: Unable to separate texture into multiple packets: Array bounds failure on asset:" + | 181 | m_log.Error("[TEXTURE SENDER]: Unable to separate texture into multiple packets: Array bounds failure on asset:" + |
182 | m_asset.FullID.ToString()); | 182 | m_asset.Metadata.ID); |
183 | return; | 183 | return; |
184 | } | 184 | } |
185 | 185 | ||
186 | RequestUser.SendImageNextPart((ushort)PacketCounter, m_asset.FullID, imageData); | 186 | RequestUser.SendImageNextPart((ushort)PacketCounter, m_asset.Metadata.FullID, imageData); |
187 | PacketCounter++; | 187 | PacketCounter++; |
188 | } | 188 | } |
189 | } | 189 | } |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/Environment/Modules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs index 862caa9..dcfcba3 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs | |||
@@ -46,7 +46,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Archiver | |||
46 | public class InventoryArchiveReadRequest | 46 | public class InventoryArchiveReadRequest |
47 | { | 47 | { |
48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 48 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
49 | 49 | ||
50 | protected Scene scene; | 50 | protected Scene scene; |
51 | protected TarArchiveReader archive; | 51 | protected TarArchiveReader archive; |
52 | private static System.Text.ASCIIEncoding m_asciiEncoding = new System.Text.ASCIIEncoding(); | 52 | private static System.Text.ASCIIEncoding m_asciiEncoding = new System.Text.ASCIIEncoding(); |
@@ -65,7 +65,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Archiver | |||
65 | InventoryItemBase item = new InventoryItemBase(); | 65 | InventoryItemBase item = new InventoryItemBase(); |
66 | StringReader sr = new StringReader(contents); | 66 | StringReader sr = new StringReader(contents); |
67 | XmlTextReader reader = new XmlTextReader(sr); | 67 | XmlTextReader reader = new XmlTextReader(sr); |
68 | 68 | ||
69 | if (contents.Equals("")) return null; | 69 | if (contents.Equals("")) return null; |
70 | 70 | ||
71 | reader.ReadStartElement("InventoryObject"); | 71 | reader.ReadStartElement("InventoryObject"); |
@@ -79,7 +79,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Archiver | |||
79 | item.InvType = System.Convert.ToInt32(reader.ReadString()); | 79 | item.InvType = System.Convert.ToInt32(reader.ReadString()); |
80 | reader.ReadEndElement(); | 80 | reader.ReadEndElement(); |
81 | reader.ReadStartElement("CreatorUUID"); | 81 | reader.ReadStartElement("CreatorUUID"); |
82 | item.Creator = UUID.Parse(reader.ReadString()); | 82 | item.Creator = UUID.Parse(reader.ReadString()); |
83 | reader.ReadEndElement(); | 83 | reader.ReadEndElement(); |
84 | reader.ReadStartElement("CreationDate"); | 84 | reader.ReadStartElement("CreationDate"); |
85 | item.CreationDate = System.Convert.ToInt32(reader.ReadString()); | 85 | item.CreationDate = System.Convert.ToInt32(reader.ReadString()); |
@@ -94,7 +94,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Archiver | |||
94 | } | 94 | } |
95 | else | 95 | else |
96 | { | 96 | { |
97 | reader.ReadStartElement("Description"); | 97 | reader.ReadStartElement("Description"); |
98 | item.Description = reader.ReadString(); | 98 | item.Description = reader.ReadString(); |
99 | reader.ReadEndElement(); | 99 | reader.ReadEndElement(); |
100 | } | 100 | } |
@@ -145,7 +145,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Archiver | |||
145 | int successfulAssetRestores = 0; | 145 | int successfulAssetRestores = 0; |
146 | int failedAssetRestores = 0; | 146 | int failedAssetRestores = 0; |
147 | int successfulItemRestores = 0; | 147 | int successfulItemRestores = 0; |
148 | 148 | ||
149 | UserProfileData userProfile = commsManager.UserService.GetUserProfile(firstName, lastName); | 149 | UserProfileData userProfile = commsManager.UserService.GetUserProfile(firstName, lastName); |
150 | if (null == userProfile) | 150 | if (null == userProfile) |
151 | { | 151 | { |
@@ -157,28 +157,28 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Archiver | |||
157 | if (null == userInfo) | 157 | if (null == userInfo) |
158 | { | 158 | { |
159 | m_log.ErrorFormat( | 159 | m_log.ErrorFormat( |
160 | "[CONSOLE]: Failed to find user info for {0} {1} {2}", | 160 | "[CONSOLE]: Failed to find user info for {0} {1} {2}", |
161 | firstName, lastName, userProfile.ID); | 161 | firstName, lastName, userProfile.ID); |
162 | 162 | ||
163 | return; | 163 | return; |
164 | } | 164 | } |
165 | 165 | ||
166 | if (!userInfo.HasReceivedInventory) | 166 | if (!userInfo.HasReceivedInventory) |
167 | { | 167 | { |
168 | m_log.ErrorFormat( | 168 | m_log.ErrorFormat( |
169 | "[CONSOLE]: Have not yet received inventory info for user {0} {1} {2}", | 169 | "[CONSOLE]: Have not yet received inventory info for user {0} {1} {2}", |
170 | firstName, lastName, userProfile.ID); | 170 | firstName, lastName, userProfile.ID); |
171 | 171 | ||
172 | return; | 172 | return; |
173 | } | 173 | } |
174 | 174 | ||
175 | InventoryFolderImpl inventoryFolder = userInfo.RootFolder.FindFolderByPath(invPath); | 175 | InventoryFolderImpl inventoryFolder = userInfo.RootFolder.FindFolderByPath(invPath); |
176 | 176 | ||
177 | if (null == inventoryFolder) | 177 | if (null == inventoryFolder) |
178 | { | 178 | { |
179 | // TODO: Later on, automatically create this folder if it does not exist | 179 | // TODO: Later on, automatically create this folder if it does not exist |
180 | m_log.ErrorFormat("[ARCHIVER]: Inventory path {0} does not exist", invPath); | 180 | m_log.ErrorFormat("[ARCHIVER]: Inventory path {0} does not exist", invPath); |
181 | 181 | ||
182 | return; | 182 | return; |
183 | } | 183 | } |
184 | 184 | ||
@@ -202,17 +202,17 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Archiver | |||
202 | else | 202 | else |
203 | { | 203 | { |
204 | InventoryItemBase item = loadInvItem(filePath, m_asciiEncoding.GetString(data)); | 204 | InventoryItemBase item = loadInvItem(filePath, m_asciiEncoding.GetString(data)); |
205 | 205 | ||
206 | if (item != null) | 206 | if (item != null) |
207 | { | 207 | { |
208 | item.Creator = userProfile.ID; | 208 | item.Creator = userProfile.ID; |
209 | item.Owner = userProfile.ID; | 209 | item.Owner = userProfile.ID; |
210 | 210 | ||
211 | // Reset folder ID to the one in which we want to load it | 211 | // Reset folder ID to the one in which we want to load it |
212 | // TODO: Properly restore entire folder structure. At the moment all items are dumped in this | 212 | // TODO: Properly restore entire folder structure. At the moment all items are dumped in this |
213 | // single folder no matter where in the saved folder structure they are. | 213 | // single folder no matter where in the saved folder structure they are. |
214 | item.Folder = inventoryFolder.ID; | 214 | item.Folder = inventoryFolder.ID; |
215 | 215 | ||
216 | userInfo.AddItem(item); | 216 | userInfo.AddItem(item); |
217 | successfulItemRestores++; | 217 | successfulItemRestores++; |
218 | } | 218 | } |
@@ -258,7 +258,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory.Archiver | |||
258 | 258 | ||
259 | AssetBase asset = new AssetBase(new UUID(uuid), "RandomName"); | 259 | AssetBase asset = new AssetBase(new UUID(uuid), "RandomName"); |
260 | 260 | ||
261 | asset.Type = assetType; | 261 | asset.Metadata.Type = assetType; |
262 | asset.Data = data; | 262 | asset.Data = data; |
263 | 263 | ||
264 | scene.AssetCache.AddAsset(asset); | 264 | scene.AssetCache.AddAsset(asset); |
diff --git a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs index 0974f02..bddf10d 100644 --- a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs +++ b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs | |||
@@ -231,21 +231,21 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture | |||
231 | 231 | ||
232 | // Create a new asset for user | 232 | // Create a new asset for user |
233 | AssetBase asset = new AssetBase(); | 233 | AssetBase asset = new AssetBase(); |
234 | asset.FullID = UUID.Random(); | 234 | asset.Metadata.FullID = UUID.Random(); |
235 | asset.Data = assetData; | 235 | asset.Data = assetData; |
236 | asset.Name = "DynamicImage" + Util.RandomClass.Next(1, 10000); | 236 | asset.Metadata.Name = "DynamicImage" + Util.RandomClass.Next(1, 10000); |
237 | asset.Type = 0; | 237 | asset.Metadata.Type = 0; |
238 | asset.Description = "dynamic image"; | 238 | asset.Metadata.Description = "dynamic image"; |
239 | asset.Local = false; | 239 | asset.Metadata.Local = false; |
240 | asset.Temporary = true; | 240 | asset.Metadata.Temporary = true; |
241 | scene.AssetCache.AddAsset(asset); | 241 | scene.AssetCache.AddAsset(asset); |
242 | 242 | ||
243 | LastAssetID = asset.FullID; | 243 | LastAssetID = asset.Metadata.FullID; |
244 | 244 | ||
245 | IJ2KDecoder cacheLayerDecode = scene.RequestModuleInterface<IJ2KDecoder>(); | 245 | IJ2KDecoder cacheLayerDecode = scene.RequestModuleInterface<IJ2KDecoder>(); |
246 | if (cacheLayerDecode != null) | 246 | if (cacheLayerDecode != null) |
247 | { | 247 | { |
248 | cacheLayerDecode.syncdecode(asset.FullID, asset.Data); | 248 | cacheLayerDecode.syncdecode(asset.Metadata.FullID, asset.Data); |
249 | } | 249 | } |
250 | cacheLayerDecode = null; | 250 | cacheLayerDecode = null; |
251 | 251 | ||
@@ -256,7 +256,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture | |||
256 | UUID oldID = tmptex.DefaultTexture.TextureID; | 256 | UUID oldID = tmptex.DefaultTexture.TextureID; |
257 | scene.AssetCache.ExpireAsset(oldID); | 257 | scene.AssetCache.ExpireAsset(oldID); |
258 | 258 | ||
259 | tmptex.DefaultTexture.TextureID = asset.FullID; | 259 | tmptex.DefaultTexture.TextureID = asset.Metadata.FullID; |
260 | // I'm pretty sure we always want to force this to true | 260 | // I'm pretty sure we always want to force this to true |
261 | tmptex.DefaultTexture.Fullbright = true; | 261 | tmptex.DefaultTexture.Fullbright = true; |
262 | 262 | ||
@@ -287,7 +287,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture | |||
287 | try | 287 | try |
288 | { | 288 | { |
289 | result = OpenJPEG.EncodeFromImage(joint, true); | 289 | result = OpenJPEG.EncodeFromImage(joint, true); |
290 | } | 290 | } |
291 | catch (Exception) | 291 | catch (Exception) |
292 | { | 292 | { |
293 | Console.WriteLine( | 293 | Console.WriteLine( |
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs index 4e9fcef..c860d01 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -66,12 +66,12 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
66 | m_loadStream = new GZipStream(GetStream(loadPath), CompressionMode.Decompress); | 66 | m_loadStream = new GZipStream(GetStream(loadPath), CompressionMode.Decompress); |
67 | m_errorMessage = String.Empty; | 67 | m_errorMessage = String.Empty; |
68 | } | 68 | } |
69 | 69 | ||
70 | public ArchiveReadRequest(Scene scene, Stream loadStream) | 70 | public ArchiveReadRequest(Scene scene, Stream loadStream) |
71 | { | 71 | { |
72 | m_scene = scene; | 72 | m_scene = scene; |
73 | m_loadStream = loadStream; | 73 | m_loadStream = loadStream; |
74 | } | 74 | } |
75 | 75 | ||
76 | /// <summary> | 76 | /// <summary> |
77 | /// Dearchive the region embodied in this request. | 77 | /// Dearchive the region embodied in this request. |
@@ -81,7 +81,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
81 | // The same code can handle dearchiving 0.1 and 0.2 OpenSim Archive versions | 81 | // The same code can handle dearchiving 0.1 and 0.2 OpenSim Archive versions |
82 | DearchiveRegion0DotStar(); | 82 | DearchiveRegion0DotStar(); |
83 | } | 83 | } |
84 | 84 | ||
85 | private void DearchiveRegion0DotStar() | 85 | private void DearchiveRegion0DotStar() |
86 | { | 86 | { |
87 | int successfulAssetRestores = 0; | 87 | int successfulAssetRestores = 0; |
@@ -98,12 +98,12 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
98 | 98 | ||
99 | byte[] data; | 99 | byte[] data; |
100 | TarArchiveReader.TarEntryType entryType; | 100 | TarArchiveReader.TarEntryType entryType; |
101 | 101 | ||
102 | while ((data = archive.ReadEntry(out filePath, out entryType)) != null) | 102 | while ((data = archive.ReadEntry(out filePath, out entryType)) != null) |
103 | { | 103 | { |
104 | //m_log.DebugFormat( | 104 | //m_log.DebugFormat( |
105 | // "[ARCHIVER]: Successfully read {0} ({1} bytes)}", filePath, data.Length); | 105 | // "[ARCHIVER]: Successfully read {0} ({1} bytes)}", filePath, data.Length); |
106 | if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType) | 106 | if (TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType) |
107 | { | 107 | { |
108 | m_log.WarnFormat("[ARCHIVER]: Ignoring directory entry {0}", | 108 | m_log.WarnFormat("[ARCHIVER]: Ignoring directory entry {0}", |
109 | filePath); | 109 | filePath); |
@@ -133,7 +133,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
133 | LoadRegionSettings(filePath, data); | 133 | LoadRegionSettings(filePath, data); |
134 | } | 134 | } |
135 | } | 135 | } |
136 | 136 | ||
137 | //m_log.Debug("[ARCHIVER]: Reached end of archive"); | 137 | //m_log.Debug("[ARCHIVER]: Reached end of archive"); |
138 | 138 | ||
139 | archive.Close(); | 139 | archive.Close(); |
@@ -154,10 +154,10 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
154 | m_log.ErrorFormat("[ARCHIVER]: Failed to load {0} assets", failedAssetRestores); | 154 | m_log.ErrorFormat("[ARCHIVER]: Failed to load {0} assets", failedAssetRestores); |
155 | m_errorMessage += String.Format("Failed to load {0} assets", failedAssetRestores); | 155 | m_errorMessage += String.Format("Failed to load {0} assets", failedAssetRestores); |
156 | } | 156 | } |
157 | 157 | ||
158 | m_log.Info("[ARCHIVER]: Clearing all existing scene objects"); | 158 | m_log.Info("[ARCHIVER]: Clearing all existing scene objects"); |
159 | m_scene.DeleteAllSceneObjects(); | 159 | m_scene.DeleteAllSceneObjects(); |
160 | 160 | ||
161 | // Reload serialized prims | 161 | // Reload serialized prims |
162 | m_log.InfoFormat("[ARCHIVER]: Loading {0} scene objects. Please wait.", serialisedSceneObjects.Count); | 162 | m_log.InfoFormat("[ARCHIVER]: Loading {0} scene objects. Please wait.", serialisedSceneObjects.Count); |
163 | 163 | ||
@@ -176,10 +176,10 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
176 | // Try to retain the original creator/owner/lastowner if their uuid is present on this grid | 176 | // Try to retain the original creator/owner/lastowner if their uuid is present on this grid |
177 | // otherwise, use the master avatar uuid instead | 177 | // otherwise, use the master avatar uuid instead |
178 | UUID masterAvatarId = m_scene.RegionInfo.MasterAvatarAssignedUUID; | 178 | UUID masterAvatarId = m_scene.RegionInfo.MasterAvatarAssignedUUID; |
179 | 179 | ||
180 | if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) | 180 | if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) |
181 | masterAvatarId = m_scene.RegionInfo.EstateSettings.EstateOwner; | 181 | masterAvatarId = m_scene.RegionInfo.EstateSettings.EstateOwner; |
182 | 182 | ||
183 | foreach (SceneObjectPart part in sceneObject.Children.Values) | 183 | foreach (SceneObjectPart part in sceneObject.Children.Values) |
184 | { | 184 | { |
185 | if (!resolveUserUuid(part.CreatorID)) | 185 | if (!resolveUserUuid(part.CreatorID)) |
@@ -233,7 +233,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
233 | { | 233 | { |
234 | sceneObject.CreateScriptInstances(0, true, m_scene.DefaultScriptEngine, 0); | 234 | sceneObject.CreateScriptInstances(0, true, m_scene.DefaultScriptEngine, 0); |
235 | } | 235 | } |
236 | 236 | ||
237 | m_scene.EventManager.TriggerOarFileLoaded(m_errorMessage); | 237 | m_scene.EventManager.TriggerOarFileLoaded(m_errorMessage); |
238 | } | 238 | } |
239 | 239 | ||
@@ -290,12 +290,12 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
290 | //m_log.DebugFormat("[ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType); | 290 | //m_log.DebugFormat("[ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType); |
291 | 291 | ||
292 | AssetBase asset = new AssetBase(new UUID(uuid), String.Empty); | 292 | AssetBase asset = new AssetBase(new UUID(uuid), String.Empty); |
293 | asset.Type = assetType; | 293 | asset.Metadata.Type = assetType; |
294 | asset.Data = data; | 294 | asset.Data = data; |
295 | 295 | ||
296 | m_scene.AssetCache.AddAsset(asset); | 296 | m_scene.AssetCache.AddAsset(asset); |
297 | 297 | ||
298 | /** | 298 | /** |
299 | * Create layers on decode for image assets. This is likely to significantly increase the time to load archives so | 299 | * Create layers on decode for image assets. This is likely to significantly increase the time to load archives so |
300 | * it might be best done when dearchive takes place on a separate thread | 300 | * it might be best done when dearchive takes place on a separate thread |
301 | if (asset.Type=AssetType.Texture) | 301 | if (asset.Type=AssetType.Texture) |
@@ -317,7 +317,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
317 | return false; | 317 | return false; |
318 | } | 318 | } |
319 | } | 319 | } |
320 | 320 | ||
321 | /// <summary> | 321 | /// <summary> |
322 | /// Load region settings data | 322 | /// Load region settings data |
323 | /// </summary> | 323 | /// </summary> |
@@ -329,7 +329,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
329 | private bool LoadRegionSettings(string settingsPath, byte[] data) | 329 | private bool LoadRegionSettings(string settingsPath, byte[] data) |
330 | { | 330 | { |
331 | RegionSettings loadedRegionSettings; | 331 | RegionSettings loadedRegionSettings; |
332 | 332 | ||
333 | try | 333 | try |
334 | { | 334 | { |
335 | loadedRegionSettings = RegionSettingsSerializer.Deserialize(data); | 335 | loadedRegionSettings = RegionSettingsSerializer.Deserialize(data); |
@@ -337,13 +337,13 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
337 | catch (Exception e) | 337 | catch (Exception e) |
338 | { | 338 | { |
339 | m_log.ErrorFormat( | 339 | m_log.ErrorFormat( |
340 | "[ARCHIVER]: Could not parse region settings file {0}. Ignoring. Exception was {1}", | 340 | "[ARCHIVER]: Could not parse region settings file {0}. Ignoring. Exception was {1}", |
341 | settingsPath, e); | 341 | settingsPath, e); |
342 | return false; | 342 | return false; |
343 | } | 343 | } |
344 | 344 | ||
345 | RegionSettings currentRegionSettings = m_scene.RegionInfo.RegionSettings; | 345 | RegionSettings currentRegionSettings = m_scene.RegionInfo.RegionSettings; |
346 | 346 | ||
347 | currentRegionSettings.AgentLimit = loadedRegionSettings.AgentLimit; | 347 | currentRegionSettings.AgentLimit = loadedRegionSettings.AgentLimit; |
348 | currentRegionSettings.AllowDamage = loadedRegionSettings.AllowDamage; | 348 | currentRegionSettings.AllowDamage = loadedRegionSettings.AllowDamage; |
349 | currentRegionSettings.AllowLandJoinDivide = loadedRegionSettings.AllowLandJoinDivide; | 349 | currentRegionSettings.AllowLandJoinDivide = loadedRegionSettings.AllowLandJoinDivide; |
@@ -373,10 +373,10 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
373 | currentRegionSettings.TerrainTexture4 = loadedRegionSettings.TerrainTexture4; | 373 | currentRegionSettings.TerrainTexture4 = loadedRegionSettings.TerrainTexture4; |
374 | currentRegionSettings.UseEstateSun = loadedRegionSettings.UseEstateSun; | 374 | currentRegionSettings.UseEstateSun = loadedRegionSettings.UseEstateSun; |
375 | currentRegionSettings.WaterHeight = loadedRegionSettings.WaterHeight; | 375 | currentRegionSettings.WaterHeight = loadedRegionSettings.WaterHeight; |
376 | 376 | ||
377 | IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>(); | 377 | IEstateModule estateModule = m_scene.RequestModuleInterface<IEstateModule>(); |
378 | estateModule.sendRegionHandshakeToAll(); | 378 | estateModule.sendRegionHandshakeToAll(); |
379 | 379 | ||
380 | return true; | 380 | return true; |
381 | } | 381 | } |
382 | 382 | ||
@@ -411,11 +411,11 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
411 | if (File.Exists(path)) | 411 | if (File.Exists(path)) |
412 | { | 412 | { |
413 | return new FileStream(path, FileMode.Open); | 413 | return new FileStream(path, FileMode.Open); |
414 | } | 414 | } |
415 | else | 415 | else |
416 | { | 416 | { |
417 | Uri uri = new Uri(path); // throw exception if not valid URI | 417 | Uri uri = new Uri(path); // throw exception if not valid URI |
418 | if (uri.Scheme == "file") | 418 | if (uri.Scheme == "file") |
419 | { | 419 | { |
420 | return new FileStream(uri.AbsolutePath, FileMode.Open); | 420 | return new FileStream(uri.AbsolutePath, FileMode.Open); |
421 | } | 421 | } |
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs index 75ae474..36a60f3 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs | |||
@@ -86,16 +86,16 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
86 | 86 | ||
87 | string extension = string.Empty; | 87 | string extension = string.Empty; |
88 | 88 | ||
89 | if (ArchiveConstants.ASSET_TYPE_TO_EXTENSION.ContainsKey(asset.Type)) | 89 | if (ArchiveConstants.ASSET_TYPE_TO_EXTENSION.ContainsKey(asset.Metadata.Type)) |
90 | { | 90 | { |
91 | extension = ArchiveConstants.ASSET_TYPE_TO_EXTENSION[asset.Type]; | 91 | extension = ArchiveConstants.ASSET_TYPE_TO_EXTENSION[asset.Metadata.Type]; |
92 | } | 92 | } |
93 | 93 | ||
94 | xtw.WriteElementString("filename", uuid.ToString() + extension); | 94 | xtw.WriteElementString("filename", uuid.ToString() + extension); |
95 | 95 | ||
96 | xtw.WriteElementString("name", asset.Name); | 96 | xtw.WriteElementString("name", asset.Metadata.Name); |
97 | xtw.WriteElementString("description", asset.Description); | 97 | xtw.WriteElementString("description", asset.Metadata.Description); |
98 | xtw.WriteElementString("asset-type", asset.Type.ToString()); | 98 | xtw.WriteElementString("asset-type", asset.Metadata.Type.ToString()); |
99 | 99 | ||
100 | xtw.WriteEndElement(); | 100 | xtw.WriteEndElement(); |
101 | } | 101 | } |
@@ -123,15 +123,15 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
123 | 123 | ||
124 | string extension = string.Empty; | 124 | string extension = string.Empty; |
125 | 125 | ||
126 | if (ArchiveConstants.ASSET_TYPE_TO_EXTENSION.ContainsKey(asset.Type)) | 126 | if (ArchiveConstants.ASSET_TYPE_TO_EXTENSION.ContainsKey(asset.Metadata.Type)) |
127 | { | 127 | { |
128 | extension = ArchiveConstants.ASSET_TYPE_TO_EXTENSION[asset.Type]; | 128 | extension = ArchiveConstants.ASSET_TYPE_TO_EXTENSION[asset.Metadata.Type]; |
129 | } | 129 | } |
130 | else | 130 | else |
131 | { | 131 | { |
132 | m_log.ErrorFormat( | 132 | m_log.ErrorFormat( |
133 | "[ARCHIVER]: Unrecognized asset type {0} with uuid {1}. This asset will be saved but not reloaded", | 133 | "[ARCHIVER]: Unrecognized asset type {0} with uuid {1}. This asset will be saved but not reloaded", |
134 | asset.Type, asset.ID); | 134 | asset.Metadata.Type, asset.Metadata.ID); |
135 | } | 135 | } |
136 | 136 | ||
137 | archive.AddFile( | 137 | archive.AddFile( |
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs index b26fe4c..0ef1e1d 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs | |||
@@ -157,8 +157,8 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
157 | m_log.DebugFormat("[ARCHIVER]: Importing asset {0}", filename); | 157 | m_log.DebugFormat("[ARCHIVER]: Importing asset {0}", filename); |
158 | 158 | ||
159 | AssetBase asset = new AssetBase(new UUID(filename), metadata.Name); | 159 | AssetBase asset = new AssetBase(new UUID(filename), metadata.Name); |
160 | asset.Description = metadata.Description; | 160 | asset.Metadata.Description = metadata.Description; |
161 | asset.Type = metadata.AssetType; | 161 | asset.Metadata.Type = metadata.AssetType; |
162 | asset.Data = data; | 162 | asset.Data = data; |
163 | 163 | ||
164 | m_cache.AddAsset(asset); | 164 | m_cache.AddAsset(asset); |
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateTerrainXferHandler.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateTerrainXferHandler.cs index 6d69443..2ba4e34 100644 --- a/OpenSim/Region/Environment/Modules/World/Estate/EstateTerrainXferHandler.cs +++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateTerrainXferHandler.cs | |||
@@ -37,13 +37,13 @@ using OpenSim.Region.Environment.Scenes; | |||
37 | 37 | ||
38 | namespace OpenSim.Region.Environment.Modules.World.Estate | 38 | namespace OpenSim.Region.Environment.Modules.World.Estate |
39 | { | 39 | { |
40 | 40 | ||
41 | public class EstateTerrainXferHandler | 41 | public class EstateTerrainXferHandler |
42 | { | 42 | { |
43 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 43 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
44 | 44 | ||
45 | private AssetBase m_asset; | 45 | private AssetBase m_asset; |
46 | 46 | ||
47 | public delegate void TerrainUploadComplete(string name, byte[] filedata, IClientAPI remoteClient); | 47 | public delegate void TerrainUploadComplete(string name, byte[] filedata, IClientAPI remoteClient); |
48 | 48 | ||
49 | public event TerrainUploadComplete TerrainUploadDone; | 49 | public event TerrainUploadComplete TerrainUploadDone; |
@@ -52,21 +52,21 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
52 | //private string m_name = String.Empty; | 52 | //private string m_name = String.Empty; |
53 | //private UUID TransactionID = UUID.Zero; | 53 | //private UUID TransactionID = UUID.Zero; |
54 | private sbyte type = 0; | 54 | private sbyte type = 0; |
55 | 55 | ||
56 | public ulong mXferID; | 56 | public ulong mXferID; |
57 | private TerrainUploadComplete handlerTerrainUploadDone; | 57 | private TerrainUploadComplete handlerTerrainUploadDone; |
58 | 58 | ||
59 | public EstateTerrainXferHandler(IClientAPI pRemoteClient, string pClientFilename) | 59 | public EstateTerrainXferHandler(IClientAPI pRemoteClient, string pClientFilename) |
60 | { | 60 | { |
61 | 61 | ||
62 | m_asset = new AssetBase(); | 62 | m_asset = new AssetBase(); |
63 | m_asset.FullID = UUID.Zero; | 63 | m_asset.Metadata.FullID = UUID.Zero; |
64 | m_asset.Type = type; | 64 | m_asset.Metadata.Type = type; |
65 | m_asset.Data = new byte[0]; | 65 | m_asset.Data = new byte[0]; |
66 | m_asset.Name = pClientFilename; | 66 | m_asset.Metadata.Name = pClientFilename; |
67 | m_asset.Description = "empty"; | 67 | m_asset.Metadata.Description = "empty"; |
68 | m_asset.Local = true; | 68 | m_asset.Metadata.Local = true; |
69 | m_asset.Temporary = true; | 69 | m_asset.Metadata.Temporary = true; |
70 | 70 | ||
71 | } | 71 | } |
72 | 72 | ||
@@ -78,7 +78,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
78 | public void RequestStartXfer(IClientAPI pRemoteClient) | 78 | public void RequestStartXfer(IClientAPI pRemoteClient) |
79 | { | 79 | { |
80 | mXferID = Util.GetNextXferID(); | 80 | mXferID = Util.GetNextXferID(); |
81 | pRemoteClient.SendXferRequest(mXferID, m_asset.Type, m_asset.FullID, 0, Utils.StringToBytes(m_asset.Name)); | 81 | pRemoteClient.SendXferRequest(mXferID, m_asset.Metadata.Type, m_asset.Metadata.FullID, 0, Utils.StringToBytes(m_asset.Metadata.Name)); |
82 | } | 82 | } |
83 | 83 | ||
84 | /// <summary> | 84 | /// <summary> |
@@ -86,7 +86,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
86 | /// </summary> | 86 | /// </summary> |
87 | /// <param name="xferID"></param> | 87 | /// <param name="xferID"></param> |
88 | /// <param name="packetID"></param> | 88 | /// <param name="packetID"></param> |
89 | /// <param name="data"></param> | 89 | /// <param name="data"></param> |
90 | public void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data) | 90 | public void XferReceive(IClientAPI remoteClient, ulong xferID, uint packetID, byte[] data) |
91 | { | 91 | { |
92 | if (mXferID == xferID) | 92 | if (mXferID == xferID) |
@@ -110,7 +110,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
110 | if ((packetID & 0x80000000) != 0) | 110 | if ((packetID & 0x80000000) != 0) |
111 | { | 111 | { |
112 | SendCompleteMessage(remoteClient); | 112 | SendCompleteMessage(remoteClient); |
113 | 113 | ||
114 | } | 114 | } |
115 | } | 115 | } |
116 | } | 116 | } |
@@ -120,7 +120,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate | |||
120 | handlerTerrainUploadDone = TerrainUploadDone; | 120 | handlerTerrainUploadDone = TerrainUploadDone; |
121 | if (handlerTerrainUploadDone != null) | 121 | if (handlerTerrainUploadDone != null) |
122 | { | 122 | { |
123 | handlerTerrainUploadDone(m_asset.Name,m_asset.Data, remoteClient); | 123 | handlerTerrainUploadDone(m_asset.Metadata.Name, m_asset.Data, remoteClient); |
124 | } | 124 | } |
125 | } | 125 | } |
126 | } | 126 | } |