diff options
Diffstat (limited to 'OpenSim/Framework/AssetBase.cs')
-rw-r--r-- | OpenSim/Framework/AssetBase.cs | 44 |
1 files changed, 26 insertions, 18 deletions
diff --git a/OpenSim/Framework/AssetBase.cs b/OpenSim/Framework/AssetBase.cs index 212f41d..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) | 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) | 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 |
@@ -220,7 +223,6 @@ namespace OpenSim.Framework | |||
220 | public class AssetMetadata | 223 | public class AssetMetadata |
221 | { | 224 | { |
222 | private UUID m_fullid; | 225 | private UUID m_fullid; |
223 | // m_id added as a dirty hack to transition from FullID to ID | ||
224 | private string m_id; | 226 | private string m_id; |
225 | private string m_name = String.Empty; | 227 | private string m_name = String.Empty; |
226 | private string m_description = String.Empty; | 228 | private string m_description = String.Empty; |
@@ -230,8 +232,7 @@ namespace OpenSim.Framework | |||
230 | private byte[] m_sha1; | 232 | private byte[] m_sha1; |
231 | private bool m_local; | 233 | private bool m_local; |
232 | private bool m_temporary; | 234 | private bool m_temporary; |
233 | //private Dictionary<string, Uri> m_methods = new Dictionary<string, Uri>(); | 235 | private string m_creatorid; |
234 | //private OSDMap m_extra_data; | ||
235 | 236 | ||
236 | public UUID FullID | 237 | public UUID FullID |
237 | { | 238 | { |
@@ -289,8 +290,21 @@ namespace OpenSim.Framework | |||
289 | 290 | ||
290 | public string ContentType | 291 | public string ContentType |
291 | { | 292 | { |
292 | get { return m_content_type; } | 293 | get |
293 | set { m_content_type = value; } | 294 | { |
295 | if (!String.IsNullOrEmpty(m_content_type)) | ||
296 | return m_content_type; | ||
297 | else | ||
298 | return SLUtil.SLAssetTypeToContentType(m_type); | ||
299 | } | ||
300 | set | ||
301 | { | ||
302 | m_content_type = value; | ||
303 | |||
304 | sbyte type = (sbyte)SLUtil.ContentTypeToSLAssetType(value); | ||
305 | if (type != -1) | ||
306 | m_type = type; | ||
307 | } | ||
294 | } | 308 | } |
295 | 309 | ||
296 | public byte[] SHA1 | 310 | public byte[] SHA1 |
@@ -311,16 +325,10 @@ namespace OpenSim.Framework | |||
311 | set { m_temporary = value; } | 325 | set { m_temporary = value; } |
312 | } | 326 | } |
313 | 327 | ||
314 | //public Dictionary<string, Uri> Methods | 328 | public string CreatorID |
315 | //{ | 329 | { |
316 | // get { return m_methods; } | 330 | get { return m_creatorid; } |
317 | // set { m_methods = value; } | 331 | set { m_creatorid = value; } |
318 | //} | 332 | } |
319 | |||
320 | //public OSDMap ExtraData | ||
321 | //{ | ||
322 | // get { return m_extra_data; } | ||
323 | // set { m_extra_data = value; } | ||
324 | //} | ||
325 | } | 333 | } |
326 | } | 334 | } |