aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorJohn Hurliman2010-02-22 14:18:59 -0800
committerJohn Hurliman2010-02-22 14:18:59 -0800
commitdf76e95aa2dc9f3f3a0c546761b7624adc183ed0 (patch)
tree74e7cc684b12ca9b67e01e62bfcf481c1da98eb2 /OpenSim/Framework
parentMerge branch 'presence-refactor' of ssh://opensimulator.org/var/git/opensim i... (diff)
downloadopensim-SC_OLD-df76e95aa2dc9f3f3a0c546761b7624adc183ed0.zip
opensim-SC_OLD-df76e95aa2dc9f3f3a0c546761b7624adc183ed0.tar.gz
opensim-SC_OLD-df76e95aa2dc9f3f3a0c546761b7624adc183ed0.tar.bz2
opensim-SC_OLD-df76e95aa2dc9f3f3a0c546761b7624adc183ed0.tar.xz
Changed asset CreatorID to a string
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/AssetBase.cs11
-rw-r--r--OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs2
-rw-r--r--OpenSim/Framework/Capabilities/Caps.cs2
-rw-r--r--OpenSim/Framework/Tests/AssetBaseTest.cs2
4 files changed, 10 insertions, 7 deletions
diff --git a/OpenSim/Framework/AssetBase.cs b/OpenSim/Framework/AssetBase.cs
index f21a9b5..19ca232 100644
--- a/OpenSim/Framework/AssetBase.cs
+++ b/OpenSim/Framework/AssetBase.cs
@@ -59,9 +59,10 @@ namespace OpenSim.Framework
59 m_metadata.FullID = UUID.Zero; 59 m_metadata.FullID = UUID.Zero;
60 m_metadata.ID = UUID.Zero.ToString(); 60 m_metadata.ID = UUID.Zero.ToString();
61 m_metadata.Type = (sbyte)AssetType.Unknown; 61 m_metadata.Type = (sbyte)AssetType.Unknown;
62 m_metadata.CreatorID = String.Empty;
62 } 63 }
63 64
64 public AssetBase(UUID assetID, string name, sbyte assetType, UUID creatorID) 65 public AssetBase(UUID assetID, string name, sbyte assetType, string creatorID)
65 { 66 {
66 if (assetType == (sbyte)AssetType.Unknown) 67 if (assetType == (sbyte)AssetType.Unknown)
67 { 68 {
@@ -74,9 +75,10 @@ namespace OpenSim.Framework
74 m_metadata.FullID = assetID; 75 m_metadata.FullID = assetID;
75 m_metadata.Name = name; 76 m_metadata.Name = name;
76 m_metadata.Type = assetType; 77 m_metadata.Type = assetType;
78 m_metadata.CreatorID = creatorID;
77 } 79 }
78 80
79 public AssetBase(string assetID, string name, sbyte assetType, UUID creatorID) 81 public AssetBase(string assetID, string name, sbyte assetType, string creatorID)
80 { 82 {
81 if (assetType == (sbyte)AssetType.Unknown) 83 if (assetType == (sbyte)AssetType.Unknown)
82 { 84 {
@@ -89,6 +91,7 @@ namespace OpenSim.Framework
89 m_metadata.ID = assetID; 91 m_metadata.ID = assetID;
90 m_metadata.Name = name; 92 m_metadata.Name = name;
91 m_metadata.Type = assetType; 93 m_metadata.Type = assetType;
94 m_metadata.CreatorID = creatorID;
92 } 95 }
93 96
94 public bool ContainsReferences 97 public bool ContainsReferences
@@ -229,7 +232,7 @@ namespace OpenSim.Framework
229 private byte[] m_sha1; 232 private byte[] m_sha1;
230 private bool m_local; 233 private bool m_local;
231 private bool m_temporary; 234 private bool m_temporary;
232 private UUID m_creatorid; 235 private string m_creatorid;
233 236
234 public UUID FullID 237 public UUID FullID
235 { 238 {
@@ -322,7 +325,7 @@ namespace OpenSim.Framework
322 set { m_temporary = value; } 325 set { m_temporary = value; }
323 } 326 }
324 327
325 public UUID CreatorID 328 public string CreatorID
326 { 329 {
327 get { return m_creatorid; } 330 get { return m_creatorid; }
328 set { m_creatorid = value; } 331 set { m_creatorid = value; }
diff --git a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
index 458dfdc..097ad7d 100644
--- a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
+++ b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
46 46
47 protected static AssetBase CreateAsset(string assetIdStr, string name, string path, sbyte type) 47 protected static AssetBase CreateAsset(string assetIdStr, string name, string path, sbyte type)
48 { 48 {
49 AssetBase asset = new AssetBase(new UUID(assetIdStr), name, type, LIBRARY_OWNER_ID); 49 AssetBase asset = new AssetBase(new UUID(assetIdStr), name, type, LIBRARY_OWNER_ID.ToString());
50 50
51 if (!String.IsNullOrEmpty(path)) 51 if (!String.IsNullOrEmpty(path))
52 { 52 {
diff --git a/OpenSim/Framework/Capabilities/Caps.cs b/OpenSim/Framework/Capabilities/Caps.cs
index 323c94c..b27d011 100644
--- a/OpenSim/Framework/Capabilities/Caps.cs
+++ b/OpenSim/Framework/Capabilities/Caps.cs
@@ -888,7 +888,7 @@ namespace OpenSim.Framework.Capabilities
888 } 888 }
889 889
890 AssetBase asset; 890 AssetBase asset;
891 asset = new AssetBase(assetID, assetName, assType, m_agentID); 891 asset = new AssetBase(assetID, assetName, assType, m_agentID.ToString());
892 asset.Data = data; 892 asset.Data = data;
893 if (AddNewAsset != null) 893 if (AddNewAsset != null)
894 AddNewAsset(asset); 894 AddNewAsset(asset);
diff --git a/OpenSim/Framework/Tests/AssetBaseTest.cs b/OpenSim/Framework/Tests/AssetBaseTest.cs
index 0f22600..6db1aa0 100644
--- a/OpenSim/Framework/Tests/AssetBaseTest.cs
+++ b/OpenSim/Framework/Tests/AssetBaseTest.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Framework.Tests
67 67
68 private void CheckContainsReferences(AssetType assetType, bool expected) 68 private void CheckContainsReferences(AssetType assetType, bool expected)
69 { 69 {
70 AssetBase asset = new AssetBase(UUID.Zero, String.Empty, (sbyte)assetType, UUID.Zero); 70 AssetBase asset = new AssetBase(UUID.Zero, String.Empty, (sbyte)assetType, UUID.Zero.ToString());
71 bool actual = asset.ContainsReferences; 71 bool actual = asset.ContainsReferences;
72 Assert.AreEqual(expected, actual, "Expected "+assetType+".ContainsReferences to be "+expected+" but was "+actual+"."); 72 Assert.AreEqual(expected, actual, "Expected "+assetType+".ContainsReferences to be "+expected+" but was "+actual+".");
73 } 73 }