From ab5e3328323a66028bfd47562d9d515dbec433be Mon Sep 17 00:00:00 2001
From: Mike Mazur
Date: Mon, 16 Feb 2009 02:28:34 +0000
Subject: - removed OpenSim.Grid.AssetInventoryServer.Metadata class in favor
 of   OpenSim.Framework.AssetMetadata and related updates in AssetInventory  
 server - removed dependency on MySql.Data.MySqlClient - commented out the
 bulk of OpenSimInventoryStorage due to missing   MySql.Data dependency -
 refactor asset creation in OpenSimAssetFrontend - commented out ForEach
 implementation, which also depended on   MySql.Data, until it's supported by
 OpenSim backends - commented out some handlers in BrowseFrontend and
 ReferenceFrontend as   they relied on either ForEach or the removed Metadata
 class

---
 OpenSim/Grid/AssetInventoryServer/Metadata.cs | 84 ---------------------------
 1 file changed, 84 deletions(-)
 delete mode 100644 OpenSim/Grid/AssetInventoryServer/Metadata.cs

(limited to 'OpenSim/Grid/AssetInventoryServer/Metadata.cs')

diff --git a/OpenSim/Grid/AssetInventoryServer/Metadata.cs b/OpenSim/Grid/AssetInventoryServer/Metadata.cs
deleted file mode 100644
index ebd379d..0000000
--- a/OpenSim/Grid/AssetInventoryServer/Metadata.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-using System;
-using System.Collections.Generic;
-using OpenMetaverse;
-using OpenMetaverse.StructuredData;
-
-namespace OpenSim.Grid.AssetInventoryServer
-{
-    public class Metadata
-    {
-        public UUID ID;
-        public string Name;
-        public string Description;
-        public DateTime CreationDate;
-        public string ContentType;
-        public byte[] SHA1;
-        public bool Temporary;
-        public Dictionary<string, Uri> Methods = new Dictionary<string, Uri>();
-        public OSDMap ExtraData;
-
-        public OSDMap SerializeToOSD()
-        {
-            OSDMap osdata = new OSDMap();
-
-            if (ID != UUID.Zero) osdata["id"] = OSD.FromUUID(ID);
-            osdata["name"] = OSD.FromString(Name);
-            osdata["description"] = OSD.FromString(Description);
-            osdata["creation_date"] = OSD.FromDate(CreationDate);
-            osdata["type"] = OSD.FromString(ContentType);
-            osdata["sha1"] = OSD.FromBinary(SHA1);
-            osdata["temporary"] = OSD.FromBoolean(Temporary);
-
-            OSDMap methods = new OSDMap(Methods.Count);
-            foreach (KeyValuePair<string, Uri> kvp in Methods)
-                methods.Add(kvp.Key, OSD.FromUri(kvp.Value));
-            osdata["methods"] = methods;
-
-            if (ExtraData != null) osdata["extra_data"] = ExtraData;
-
-            return osdata;
-        }
-
-        public byte[] SerializeToBytes()
-        {
-            LitJson.JsonData jsonData = OSDParser.SerializeJson(SerializeToOSD());
-            return System.Text.Encoding.UTF8.GetBytes(jsonData.ToJson());
-        }
-
-        public void Deserialize(byte[] data)
-        {
-            OSD osdata = OSDParser.DeserializeJson(System.Text.Encoding.UTF8.GetString(data));
-            Deserialize(osdata);
-        }
-
-        public void Deserialize(string data)
-        {
-            OSD osdata = OSDParser.DeserializeJson(data);
-            Deserialize(osdata);
-        }
-
-        public void Deserialize(OSD osdata)
-        {
-            if (osdata.Type == OSDType.Map)
-            {
-                OSDMap map = (OSDMap)osdata;
-                ID = map["id"].AsUUID();
-                Name = map["name"].AsString();
-                Description = map["description"].AsString();
-                CreationDate = map["creation_date"].AsDate();
-                ContentType = map["type"].AsString();
-                SHA1 = map["sha1"].AsBinary();
-                Temporary = map["temporary"].AsBoolean();
-
-                OSDMap methods = map["methods"] as OSDMap;
-                if (methods != null)
-                {
-                    foreach (KeyValuePair<string, OSD> kvp in methods)
-                        Methods.Add(kvp.Key, kvp.Value.AsUri());
-                }
-
-                ExtraData = map["extra_data"] as OSDMap;
-            }
-        }
-    }
-}
-- 
cgit v1.1