* Update libOMV to r2359. This is necessary for the progressive texture patch

* Update libopenjpeg as well for this patch.
* Appears to be okay on a very short sniff test
* Source code will be placed in opensim-libs shortly
This commit is contained in:
Justin Clarke Casey
2008-11-17 21:00:34 +00:00
parent 072624b19d
commit c25a0ea792
58 changed files with 465 additions and 446 deletions

View File

@@ -159,7 +159,7 @@ namespace OpenSim.Framework.Communications.Capabilities
m_capsHandlers["SEED"] = new RestStreamHandler("POST", capsBase + m_requestPath, CapsRequest);
m_log.Warn("[SEED]: " + capsBase + m_requestPath);
//m_capsHandlers["MapLayer"] =
// new LLSDStreamhandler<LLSDMapRequest, LLSDMapLayerResponse>("POST",
// new LLSDStreamhandler<OSDMapRequest, OSDMapLayerResponse>("POST",
// capsBase + m_mapLayerPath,
// GetMapLayer);
m_capsHandlers["NewFileAgentInventory"] =
@@ -297,7 +297,7 @@ namespace OpenSim.Framework.Communications.Capabilities
Hashtable inventoryhash = (Hashtable)foldersrequested[i];
LLSDFetchInventoryDescendents llsdRequest = new LLSDFetchInventoryDescendents();
LLSDHelpers.DeserialiseLLSDMap(inventoryhash, llsdRequest);
LLSDHelpers.DeserialiseOSDMap(inventoryhash, llsdRequest);
LLSDInventoryDescendents reply = FetchInventoryReply(llsdRequest);
inventoryitemstr = LLSDHelpers.SerialiseLLSDReply(reply);
@@ -431,7 +431,7 @@ namespace OpenSim.Framework.Communications.Capabilities
{
m_log.Debug("[CAPS]: MapLayer Request in region: " + m_regionName);
LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse();
mapResponse.LayerData.Array.Add(GetLLSDMapLayerResponse());
mapResponse.LayerData.Array.Add(GetOSDMapLayerResponse());
return mapResponse;
}
@@ -439,9 +439,9 @@ namespace OpenSim.Framework.Communications.Capabilities
///
/// </summary>
/// <returns></returns>
protected static LLSDMapLayer GetLLSDMapLayerResponse()
protected static OSDMapLayer GetOSDMapLayerResponse()
{
LLSDMapLayer mapLayer = new LLSDMapLayer();
OSDMapLayer mapLayer = new OSDMapLayer();
mapLayer.Right = 5000;
mapLayer.Top = 5000;
mapLayer.ImageID = new UUID("00000000-0000-1111-9999-000000000006");
@@ -545,7 +545,7 @@ namespace OpenSim.Framework.Communications.Capabilities
Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Utils.StringToBytes(request));
LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate();
LLSDHelpers.DeserialiseLLSDMap(hash, llsdUpdateRequest);
LLSDHelpers.DeserialiseOSDMap(hash, llsdUpdateRequest);
string capsBase = "/CAPS/" + m_capsObjectPath;
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
@@ -600,10 +600,10 @@ namespace OpenSim.Framework.Communications.Capabilities
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName);
//OpenMetaverse.StructuredData.LLSDMap hash = (OpenMetaverse.StructuredData.LLSDMap)OpenMetaverse.StructuredData.LLSDParser.DeserializeBinary(Utils.StringToBytes(request));
//OpenMetaverse.StructuredData.OSDMap hash = (OpenMetaverse.StructuredData.OSDMap)OpenMetaverse.StructuredData.LLSDParser.DeserializeBinary(Utils.StringToBytes(request));
Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Utils.StringToBytes(request));
LLSDItemUpdate llsdRequest = new LLSDItemUpdate();
LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest);
LLSDHelpers.DeserialiseOSDMap(hash, llsdRequest);
string capsBase = "/CAPS/" + m_capsObjectPath;
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");

View File

@@ -30,11 +30,11 @@ using System.Collections;
namespace OpenSim.Framework.Communications.Capabilities
{
[LLSDType("ARRAY")]
public class LLSDArray
public class OSDArray
{
public ArrayList Array = new ArrayList();
public LLSDArray()
public OSDArray()
{
}
}

View File

@@ -30,7 +30,7 @@ using OpenMetaverse;
namespace OpenSim.Framework.Communications.Capabilities
{
[LLSDMap]
[OSDMap]
public class LLSDAssetUploadRequest
{
public string asset_type = String.Empty;

View File

@@ -29,7 +29,7 @@ using System;
namespace OpenSim.Framework.Communications.Capabilities
{
[LLSDMap]
[OSDMap]
public class LLSDAssetUploadResponse
{
public string uploader = String.Empty;

View File

@@ -31,7 +31,7 @@ namespace OpenSim.Framework.Communications.Capabilities
public class LLSDCapEvent
{
public int id = 0;
public LLSDArray events = new LLSDArray();
public OSDArray events = new OSDArray();
public LLSDCapEvent()
{

View File

@@ -44,7 +44,7 @@ namespace OpenSim.Framework.Communications.Capabilities
XmlTextWriter writer = new XmlTextWriter(sw);
writer.Formatting = Formatting.None;
writer.WriteStartElement(String.Empty, "llsd", String.Empty);
SerializeLLSDType(writer, obj);
SerializeOSDType(writer, obj);
writer.WriteEndElement();
writer.Close();
@@ -53,7 +53,7 @@ namespace OpenSim.Framework.Communications.Capabilities
return sw.ToString();
}
private static void SerializeLLSDType(XmlTextWriter writer, object obj)
private static void SerializeOSDType(XmlTextWriter writer, object obj)
{
Type myType = obj.GetType();
LLSDType[] llsdattributes = (LLSDType[]) myType.GetCustomAttributes(typeof (LLSDType), false);
@@ -76,7 +76,7 @@ namespace OpenSim.Framework.Communications.Capabilities
fieldName = fieldName.Replace("___", "-");
writer.WriteString(fieldName);
writer.WriteEndElement();
SerializeLLSDType(writer, fieldValue);
SerializeOSDType(writer, fieldValue);
}
else
{
@@ -87,13 +87,13 @@ namespace OpenSim.Framework.Communications.Capabilities
writer.WriteEndElement();
LLSD.LLSDWriteOne(writer, fieldValue);
// OpenMetaverse.StructuredData.LLSDParser.SerializeXmlElement(
// writer, OpenMetaverse.StructuredData.LLSD.FromObject(fieldValue));
// writer, OpenMetaverse.StructuredData.OSD.FromObject(fieldValue));
}
}
writer.WriteEndElement();
break;
case "ARRAY":
// LLSDArray arrayObject = obj as LLSDArray;
// OSDArray arrayObject = obj as OSDArray;
// ArrayList a = arrayObject.Array;
ArrayList a = (ArrayList) obj.GetType().GetField("Array").GetValue(obj);
if (a != null)
@@ -101,7 +101,7 @@ namespace OpenSim.Framework.Communications.Capabilities
writer.WriteStartElement(String.Empty, "array", String.Empty);
foreach (object item in a)
{
SerializeLLSDType(writer, item);
SerializeOSDType(writer, item);
}
writer.WriteEndElement();
}
@@ -112,11 +112,11 @@ namespace OpenSim.Framework.Communications.Capabilities
{
LLSD.LLSDWriteOne(writer, obj);
//OpenMetaverse.StructuredData.LLSDParser.SerializeXmlElement(
// writer, OpenMetaverse.StructuredData.LLSD.FromObject(obj));
// writer, OpenMetaverse.StructuredData.OSD.FromObject(obj));
}
}
public static object DeserialiseLLSDMap(Hashtable llsd, object obj)
public static object DeserialiseOSDMap(Hashtable llsd, object obj)
{
Type myType = obj.GetType();
LLSDType[] llsdattributes = (LLSDType[]) myType.GetCustomAttributes(typeof (LLSDType), false);
@@ -133,12 +133,12 @@ namespace OpenSim.Framework.Communications.Capabilities
FieldInfo field = myType.GetField(keyName);
if (field != null)
{
// if (enumerator.Value is OpenMetaverse.StructuredData.LLSDMap)
// if (enumerator.Value is OpenMetaverse.StructuredData.OSDMap)
if (enumerator.Value is Hashtable)
{
object fieldValue = field.GetValue(obj);
DeserialiseLLSDMap((Hashtable) enumerator.Value, fieldValue);
// DeserialiseLLSDMap((OpenMetaverse.StructuredData.LLSDMap) enumerator.Value, fieldValue);
DeserialiseOSDMap((Hashtable) enumerator.Value, fieldValue);
// DeserialiseOSDMap((OpenMetaverse.StructuredData.OSDMap) enumerator.Value, fieldValue);
}
else if (enumerator.Value is ArrayList)
{

View File

@@ -29,7 +29,7 @@ using OpenMetaverse;
namespace OpenSim.Framework.Communications.Capabilities
{
[LLSDMap]
[OSDMap]
public class LLSDInventoryItem
{
public UUID parent_id;
@@ -47,7 +47,7 @@ namespace OpenSim.Framework.Communications.Capabilities
public int created_at;
}
[LLSDMap]
[OSDMap]
public class LLSDPermissions
{
public UUID creator_id;
@@ -61,20 +61,20 @@ namespace OpenSim.Framework.Communications.Capabilities
public bool is_owner_group;
}
[LLSDMap]
[OSDMap]
public class LLSDSaleInfo
{
public int sale_price;
public string sale_type;
}
[LLSDMap]
[OSDMap]
public class LLSDInventoryDescendents
{
public LLSDArray folders = new LLSDArray();
public OSDArray folders = new OSDArray();
}
[LLSDMap]
[OSDMap]
public class LLSDFetchInventoryDescendents
{
public UUID folder_id;
@@ -84,13 +84,13 @@ namespace OpenSim.Framework.Communications.Capabilities
public bool fetch_items;
}
[LLSDMap]
[OSDMap]
public class LLSDInventoryFolderContents
{
public UUID agent___id; // the (three "_") "___" so the serialising knows to change this to a "-"
public int descendents;
public UUID folder___id; //as LL can't decide if they are going to use "_" or "-" to separate words in the field names
public LLSDArray items = new LLSDArray();
public OSDArray items = new OSDArray();
public UUID owner___id; // and of course we can't have field names with "-" in
public int version;
}

View File

@@ -29,7 +29,7 @@ using OpenMetaverse;
namespace OpenSim.Framework.Communications.Capabilities
{
[LLSDMap]
[OSDMap]
public class LLSDItemUpdate
{
public UUID item_id;

View File

@@ -30,7 +30,7 @@ using OpenMetaverse;
namespace OpenSim.Framework.Communications.Capabilities
{
[LLSDType("MAP")]
public class LLSDMapLayer
public class OSDMapLayer
{
public int Left = 0;
public int Right = 0;
@@ -38,7 +38,7 @@ namespace OpenSim.Framework.Communications.Capabilities
public int Bottom = 0;
public UUID ImageID = UUID.Zero;
public LLSDMapLayer()
public OSDMapLayer()
{
}
}

View File

@@ -31,7 +31,7 @@ namespace OpenSim.Framework.Communications.Capabilities
public class LLSDMapLayerResponse
{
public LLSDMapRequest AgentData = new LLSDMapRequest();
public LLSDArray LayerData = new LLSDArray();
public OSDArray LayerData = new OSDArray();
public LLSDMapLayerResponse()
{

View File

@@ -30,7 +30,7 @@ using System.Collections;
namespace OpenSim.Framework.Communications.Capabilities
{
[LLSDMap]
[OSDMap]
public class LLSDParcelVoiceInfoResponse
{
public int parcel_local_id;

View File

@@ -53,12 +53,12 @@ namespace OpenSim.Framework.Communications.Capabilities
//string requestBody = streamReader.ReadToEnd();
//streamReader.Close();
// OpenMetaverse.StructuredData.LLSDMap hash = (OpenMetaverse.StructuredData.LLSDMap)
// OpenMetaverse.StructuredData.OSDMap hash = (OpenMetaverse.StructuredData.OSDMap)
// OpenMetaverse.StructuredData.LLSDParser.DeserializeXml(new XmlTextReader(request));
Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(request);
TRequest llsdRequest = new TRequest();
LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest);
LLSDHelpers.DeserialiseOSDMap(hash, llsdRequest);
TResponse response = m_method(llsdRequest);

View File

@@ -29,7 +29,7 @@ using OpenMetaverse;
namespace OpenSim.Framework.Communications.Capabilities
{
[LLSDMap]
[OSDMap]
public class LLSDTaskInventoryUploadComplete
{
/// <summary>

View File

@@ -29,7 +29,7 @@ using OpenMetaverse;
namespace OpenSim.Framework.Communications.Capabilities
{
[LLSDMap]
[OSDMap]
public class LLSDTaskScriptUpdate
{
/// <summary>

View File

@@ -46,9 +46,9 @@ namespace OpenSim.Framework.Communications.Capabilities
}
[AttributeUsage(AttributeTargets.Class)]
public class LLSDMap : LLSDType
public class OSDMap : LLSDType
{
public LLSDMap() : base("MAP")
public OSDMap() : base("MAP")
{
}
}

View File

@@ -28,7 +28,7 @@
namespace OpenSim.Framework.Communications.Capabilities
{
[LLSDMap]
[OSDMap]
public class LLSDVoiceAccountResponse
{
public string username;