* Renamed LLSD to OSD. The LLSD-specific (de)serialization functions have been renamed to specify they use LLSD. Other serialization formats will be added in the future, along with better native support for vectors and unsigned integers

* Added Utils.SHA1()

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2321 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
John Hurliman
2008-10-30 01:50:59 +00:00
parent 4286a00655
commit bad3108ddf
39 changed files with 2021 additions and 2141 deletions

View File

@@ -20,12 +20,12 @@ namespace Simian.Extensions
{
this.server = server;
LLSD llsd;
OSD osd;
try
{
XmlTextReader reader = new XmlTextReader(File.OpenRead(server.DataDir + "simiandata.xml"));
llsd = LLSDParser.DeserializeXml(reader);
osd = LLSDParser.DeserializeLLSDXml(reader);
reader.Close();
}
catch (FileNotFoundException)
@@ -38,15 +38,15 @@ namespace Simian.Extensions
return;
}
if (llsd is LLSDMap)
if (osd is OSDMap)
{
LLSDMap dictionary = (LLSDMap)llsd;
OSDMap dictionary = (OSDMap)osd;
for (int i = 0; i < server.PersistentExtensions.Count; i++)
{
IPersistable persistable = server.PersistentExtensions[i];
LLSD savedData;
OSD savedData;
if (dictionary.TryGetValue(persistable.ToString(), out savedData))
{
Logger.DebugLog("Loading saved data for " + persistable.ToString());
@@ -62,7 +62,7 @@ namespace Simian.Extensions
public void Stop()
{
LLSDMap dictionary = new LLSDMap(server.PersistentExtensions.Count);
OSDMap dictionary = new OSDMap(server.PersistentExtensions.Count);
for (int i = 0; i < server.PersistentExtensions.Count; i++)
{
@@ -77,7 +77,7 @@ namespace Simian.Extensions
XmlTextWriter writer = new XmlTextWriter(server.DataDir + "simiandata.xml", System.Text.Encoding.UTF8);
writer.Formatting = Formatting.Indented;
writer.WriteStartElement("llsd");
LLSDParser.SerializeXmlElement(writer, dictionary);
LLSDParser.SerializeLLSDXmlElement(writer, dictionary);
writer.WriteEndElement();
writer.Close();
}