aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
authorJohn Hurliman2010-02-22 13:27:17 -0800
committerJohn Hurliman2010-02-22 13:27:17 -0800
commit7665aad002ef066fc31fa9497225d2668641c769 (patch)
treece2ad89f1ffd20c6f5e9a3b6558f7b90c651c830 /OpenSim/Data
parent* Added a sanity check for missing asset data in LLClientView (diff)
downloadopensim-SC_OLD-7665aad002ef066fc31fa9497225d2668641c769.zip
opensim-SC_OLD-7665aad002ef066fc31fa9497225d2668641c769.tar.gz
opensim-SC_OLD-7665aad002ef066fc31fa9497225d2668641c769.tar.bz2
opensim-SC_OLD-7665aad002ef066fc31fa9497225d2668641c769.tar.xz
* Adds CreatorID to asset metadata. This is just the plumbing to support CreatorID, it doesn't modify database backends or OAR files to support storing/loading it
Diffstat (limited to 'OpenSim/Data')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLAssetData.cs3
-rw-r--r--OpenSim/Data/MySQL/MySQLAssetData.cs2
-rw-r--r--OpenSim/Data/SQLite/SQLiteAssetData.cs3
-rw-r--r--OpenSim/Data/Tests/BasicAssetTest.cs6
-rw-r--r--OpenSim/Data/Tests/PropertyCompareConstraint.cs12
-rw-r--r--OpenSim/Data/Tests/PropertyScrambler.cs4
6 files changed, 16 insertions, 14 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
index 1ce4abf..ee149ce 100644
--- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
@@ -135,7 +135,8 @@ namespace OpenSim.Data.MSSQL
135 AssetBase asset = new AssetBase( 135 AssetBase asset = new AssetBase(
136 new UUID((Guid)reader["id"]), 136 new UUID((Guid)reader["id"]),
137 (string)reader["name"], 137 (string)reader["name"],
138 Convert.ToSByte(reader["assetType"]) 138 Convert.ToSByte(reader["assetType"]),
139 UUID.Zero
139 ); 140 );
140 // Region Main 141 // Region Main
141 asset.Description = (string)reader["description"]; 142 asset.Description = (string)reader["description"];
diff --git a/OpenSim/Data/MySQL/MySQLAssetData.cs b/OpenSim/Data/MySQL/MySQLAssetData.cs
index 666c22f..a1b5d94 100644
--- a/OpenSim/Data/MySQL/MySQLAssetData.cs
+++ b/OpenSim/Data/MySQL/MySQLAssetData.cs
@@ -122,7 +122,7 @@ namespace OpenSim.Data.MySQL
122 { 122 {
123 if (dbReader.Read()) 123 if (dbReader.Read())
124 { 124 {
125 asset = new AssetBase(assetID, (string)dbReader["name"], (sbyte)dbReader["assetType"]); 125 asset = new AssetBase(assetID, (string)dbReader["name"], (sbyte)dbReader["assetType"], UUID.Zero);
126 asset.Data = (byte[])dbReader["data"]; 126 asset.Data = (byte[])dbReader["data"];
127 asset.Description = (string)dbReader["description"]; 127 asset.Description = (string)dbReader["description"];
128 128
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index c52f60b..46f173e 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -234,7 +234,8 @@ namespace OpenSim.Data.SQLite
234 AssetBase asset = new AssetBase( 234 AssetBase asset = new AssetBase(
235 new UUID((String)row["UUID"]), 235 new UUID((String)row["UUID"]),
236 (String)row["Name"], 236 (String)row["Name"],
237 Convert.ToSByte(row["Type"]) 237 Convert.ToSByte(row["Type"]),
238 UUID.Zero
238 ); 239 );
239 240
240 asset.Description = (String) row["Description"]; 241 asset.Description = (String) row["Description"];
diff --git a/OpenSim/Data/Tests/BasicAssetTest.cs b/OpenSim/Data/Tests/BasicAssetTest.cs
index 25aed61..58a17c2 100644
--- a/OpenSim/Data/Tests/BasicAssetTest.cs
+++ b/OpenSim/Data/Tests/BasicAssetTest.cs
@@ -66,9 +66,9 @@ namespace OpenSim.Data.Tests
66 [Test] 66 [Test]
67 public void T010_StoreSimpleAsset() 67 public void T010_StoreSimpleAsset()
68 { 68 {
69 AssetBase a1 = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture); 69 AssetBase a1 = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture, UUID.Zero);
70 AssetBase a2 = new AssetBase(uuid2, "asset two", (sbyte)AssetType.Texture); 70 AssetBase a2 = new AssetBase(uuid2, "asset two", (sbyte)AssetType.Texture, UUID.Zero);
71 AssetBase a3 = new AssetBase(uuid3, "asset three", (sbyte)AssetType.Texture); 71 AssetBase a3 = new AssetBase(uuid3, "asset three", (sbyte)AssetType.Texture, UUID.Zero);
72 a1.Data = asset1; 72 a1.Data = asset1;
73 a2.Data = asset1; 73 a2.Data = asset1;
74 a3.Data = asset1; 74 a3.Data = asset1;
diff --git a/OpenSim/Data/Tests/PropertyCompareConstraint.cs b/OpenSim/Data/Tests/PropertyCompareConstraint.cs
index 5b1f935..8c28fad 100644
--- a/OpenSim/Data/Tests/PropertyCompareConstraint.cs
+++ b/OpenSim/Data/Tests/PropertyCompareConstraint.cs
@@ -297,8 +297,8 @@ namespace OpenSim.Data.Tests
297 public void AssetShouldMatch() 297 public void AssetShouldMatch()
298 { 298 {
299 UUID uuid1 = UUID.Random(); 299 UUID uuid1 = UUID.Random();
300 AssetBase actual = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture); 300 AssetBase actual = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture, UUID.Zero);
301 AssetBase expected = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture); 301 AssetBase expected = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture, UUID.Zero);
302 302
303 var constraint = Constraints.PropertyCompareConstraint(expected); 303 var constraint = Constraints.PropertyCompareConstraint(expected);
304 304
@@ -309,8 +309,8 @@ namespace OpenSim.Data.Tests
309 public void AssetShouldNotMatch() 309 public void AssetShouldNotMatch()
310 { 310 {
311 UUID uuid1 = UUID.Random(); 311 UUID uuid1 = UUID.Random();
312 AssetBase actual = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture); 312 AssetBase actual = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture, UUID.Zero);
313 AssetBase expected = new AssetBase(UUID.Random(), "asset one", (sbyte)AssetType.Texture); 313 AssetBase expected = new AssetBase(UUID.Random(), "asset one", (sbyte)AssetType.Texture, UUID.Zero);
314 314
315 var constraint = Constraints.PropertyCompareConstraint(expected); 315 var constraint = Constraints.PropertyCompareConstraint(expected);
316 316
@@ -321,8 +321,8 @@ namespace OpenSim.Data.Tests
321 public void AssetShouldNotMatch2() 321 public void AssetShouldNotMatch2()
322 { 322 {
323 UUID uuid1 = UUID.Random(); 323 UUID uuid1 = UUID.Random();
324 AssetBase actual = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture); 324 AssetBase actual = new AssetBase(uuid1, "asset one", (sbyte)AssetType.Texture, UUID.Zero);
325 AssetBase expected = new AssetBase(uuid1, "asset two", (sbyte)AssetType.Texture); 325 AssetBase expected = new AssetBase(uuid1, "asset two", (sbyte)AssetType.Texture, UUID.Zero);
326 326
327 var constraint = Constraints.PropertyCompareConstraint(expected); 327 var constraint = Constraints.PropertyCompareConstraint(expected);
328 328
diff --git a/OpenSim/Data/Tests/PropertyScrambler.cs b/OpenSim/Data/Tests/PropertyScrambler.cs
index c968364..3ee22c8 100644
--- a/OpenSim/Data/Tests/PropertyScrambler.cs
+++ b/OpenSim/Data/Tests/PropertyScrambler.cs
@@ -165,7 +165,7 @@ namespace OpenSim.Data.Tests
165 [Test] 165 [Test]
166 public void TestScramble() 166 public void TestScramble()
167 { 167 {
168 AssetBase actual = new AssetBase(UUID.Random(), "asset one", (sbyte)AssetType.Texture); 168 AssetBase actual = new AssetBase(UUID.Random(), "asset one", (sbyte)AssetType.Texture, UUID.Zero);
169 new PropertyScrambler<AssetBase>().Scramble(actual); 169 new PropertyScrambler<AssetBase>().Scramble(actual);
170 } 170 }
171 171
@@ -173,7 +173,7 @@ namespace OpenSim.Data.Tests
173 public void DontScramble() 173 public void DontScramble()
174 { 174 {
175 UUID uuid = UUID.Random(); 175 UUID uuid = UUID.Random();
176 AssetBase asset = new AssetBase(uuid, "asset", (sbyte)AssetType.Texture); 176 AssetBase asset = new AssetBase(uuid, "asset", (sbyte)AssetType.Texture, UUID.Zero);
177 new PropertyScrambler<AssetBase>() 177 new PropertyScrambler<AssetBase>()
178 .DontScramble(x => x.Metadata) 178 .DontScramble(x => x.Metadata)
179 .DontScramble(x => x.FullID) 179 .DontScramble(x => x.FullID)