* 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;

View File

@@ -201,17 +201,17 @@ namespace OpenSim.Framework.Communications
return (xmlRpcResponse);
}
public LLSD GenerateFailureResponseLLSD(string reason, string message, string login)
public OSD GenerateFailureResponseLLSD(string reason, string message, string login)
{
LLSDMap map = new LLSDMap();
OSDMap map = new OSDMap();
// Ensure Login Failed message/reason;
ErrorMessage = message;
ErrorReason = reason;
map["reason"] = LLSD.FromString(ErrorReason);
map["message"] = LLSD.FromString(ErrorMessage);
map["login"] = LLSD.FromString(login);
map["reason"] = OSD.FromString(ErrorReason);
map["message"] = OSD.FromString(ErrorMessage);
map["login"] = OSD.FromString(login);
return map;
}
@@ -221,7 +221,7 @@ namespace OpenSim.Framework.Communications
return (CreateLoginFailedResponse());
}
public LLSD CreateFailedResponseLLSD()
public OSD CreateFailedResponseLLSD()
{
return CreateLoginFailedResponseLLSD();
}
@@ -234,7 +234,7 @@ namespace OpenSim.Framework.Communications
"false"));
}
public LLSD CreateLoginFailedResponseLLSD()
public OSD CreateLoginFailedResponseLLSD()
{
return GenerateFailureResponseLLSD(
"key",
@@ -265,7 +265,7 @@ namespace OpenSim.Framework.Communications
"false"));
}
public LLSD CreateAlreadyLoggedInResponseLLSD()
public OSD CreateAlreadyLoggedInResponseLLSD()
{
return GenerateFailureResponseLLSD(
"presence",
@@ -283,7 +283,7 @@ namespace OpenSim.Framework.Communications
"false"));
}
public LLSD CreateLoginBlockedResponseLLSD()
public OSD CreateLoginBlockedResponseLLSD()
{
return GenerateFailureResponseLLSD(
"presence",
@@ -299,7 +299,7 @@ namespace OpenSim.Framework.Communications
"false"));
}
public LLSD CreateDeadRegionResponseLLSD()
public OSD CreateDeadRegionResponseLLSD()
{
return GenerateFailureResponseLLSD(
"key",
@@ -315,7 +315,7 @@ namespace OpenSim.Framework.Communications
"false"));
}
public LLSD CreateGridErrorResponseLLSD()
public OSD CreateGridErrorResponseLLSD()
{
return GenerateFailureResponseLLSD(
"key",
@@ -404,90 +404,90 @@ namespace OpenSim.Framework.Communications
}
}
public LLSD ToLLSDResponse()
public OSD ToLLSDResponse()
{
try
{
LLSDMap map = new LLSDMap();
OSDMap map = new OSDMap();
map["first_name"] = LLSD.FromString(Firstname);
map["last_name"] = LLSD.FromString(Lastname);
map["agent_access"] = LLSD.FromString(agentAccess);
map["first_name"] = OSD.FromString(Firstname);
map["last_name"] = OSD.FromString(Lastname);
map["agent_access"] = OSD.FromString(agentAccess);
map["sim_port"] = LLSD.FromInteger(SimPort);
map["sim_ip"] = LLSD.FromString(SimAddress);
map["sim_port"] = OSD.FromInteger(SimPort);
map["sim_ip"] = OSD.FromString(SimAddress);
map["agent_id"] = LLSD.FromUUID(AgentID);
map["session_id"] = LLSD.FromUUID(SessionID);
map["secure_session_id"] = LLSD.FromUUID(SecureSessionID);
map["circuit_code"] = LLSD.FromInteger(CircuitCode);
map["seconds_since_epoch"] = LLSD.FromInteger((int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds);
map["agent_id"] = OSD.FromUUID(AgentID);
map["session_id"] = OSD.FromUUID(SessionID);
map["secure_session_id"] = OSD.FromUUID(SecureSessionID);
map["circuit_code"] = OSD.FromInteger(CircuitCode);
map["seconds_since_epoch"] = OSD.FromInteger((int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds);
#region Login Flags
LLSDMap loginFlagsLLSD = new LLSDMap();
loginFlagsLLSD["daylight_savings"] = LLSD.FromString(DST);
loginFlagsLLSD["stipend_since_login"] = LLSD.FromString(StipendSinceLogin);
loginFlagsLLSD["gendered"] = LLSD.FromString(Gendered);
loginFlagsLLSD["ever_logged_in"] = LLSD.FromString(EverLoggedIn);
map["login-flags"] = WrapLLSDMap(loginFlagsLLSD);
OSDMap loginFlagsLLSD = new OSDMap();
loginFlagsLLSD["daylight_savings"] = OSD.FromString(DST);
loginFlagsLLSD["stipend_since_login"] = OSD.FromString(StipendSinceLogin);
loginFlagsLLSD["gendered"] = OSD.FromString(Gendered);
loginFlagsLLSD["ever_logged_in"] = OSD.FromString(EverLoggedIn);
map["login-flags"] = WrapOSDMap(loginFlagsLLSD);
#endregion Login Flags
#region Global Textures
LLSDMap globalTexturesLLSD = new LLSDMap();
globalTexturesLLSD["sun_texture_id"] = LLSD.FromString(SunTexture);
globalTexturesLLSD["cloud_texture_id"] = LLSD.FromString(CloudTexture);
globalTexturesLLSD["moon_texture_id"] = LLSD.FromString(MoonTexture);
OSDMap globalTexturesLLSD = new OSDMap();
globalTexturesLLSD["sun_texture_id"] = OSD.FromString(SunTexture);
globalTexturesLLSD["cloud_texture_id"] = OSD.FromString(CloudTexture);
globalTexturesLLSD["moon_texture_id"] = OSD.FromString(MoonTexture);
map["global-textures"] = WrapLLSDMap(globalTexturesLLSD);
map["global-textures"] = WrapOSDMap(globalTexturesLLSD);
#endregion Global Textures
map["seed_capability"] = LLSD.FromString(seedCapability);
map["seed_capability"] = OSD.FromString(seedCapability);
map["event_categories"] = ArrayListToLLSDArray(eventCategories);
//map["event_notifications"] = new LLSDArray(); // todo
map["classified_categories"] = ArrayListToLLSDArray(classifiedCategories);
map["event_categories"] = ArrayListToOSDArray(eventCategories);
//map["event_notifications"] = new OSDArray(); // todo
map["classified_categories"] = ArrayListToOSDArray(classifiedCategories);
#region UI Config
LLSDMap uiConfigLLSD = new LLSDMap();
uiConfigLLSD["allow_first_life"] = LLSD.FromString(allowFirstLife);
map["ui-config"] = WrapLLSDMap(uiConfigLLSD);
OSDMap uiConfigLLSD = new OSDMap();
uiConfigLLSD["allow_first_life"] = OSD.FromString(allowFirstLife);
map["ui-config"] = WrapOSDMap(uiConfigLLSD);
#endregion UI Config
#region Inventory
map["inventory-skeleton"] = ArrayListToLLSDArray(agentInventory);
map["inventory-skeleton"] = ArrayListToOSDArray(agentInventory);
map["inventory-skel-lib"] = ArrayListToLLSDArray(inventoryLibrary);
map["inventory-root"] = ArrayListToLLSDArray(inventoryRoot); ;
map["inventory-lib-root"] = ArrayListToLLSDArray(inventoryLibRoot);
map["inventory-lib-owner"] = ArrayListToLLSDArray(inventoryLibraryOwner);
map["inventory-skel-lib"] = ArrayListToOSDArray(inventoryLibrary);
map["inventory-root"] = ArrayListToOSDArray(inventoryRoot); ;
map["inventory-lib-root"] = ArrayListToOSDArray(inventoryLibRoot);
map["inventory-lib-owner"] = ArrayListToOSDArray(inventoryLibraryOwner);
#endregion Inventory
map["gestures"] = ArrayListToLLSDArray(activeGestures);
map["gestures"] = ArrayListToOSDArray(activeGestures);
map["initial-outfit"] = ArrayListToLLSDArray(initialOutfit);
map["start_location"] = LLSD.FromString(startLocation);
map["initial-outfit"] = ArrayListToOSDArray(initialOutfit);
map["start_location"] = OSD.FromString(startLocation);
map["seed_capability"] = LLSD.FromString(seedCapability);
map["home"] = LLSD.FromString(home);
map["look_at"] = LLSD.FromString(lookAt);
map["message"] = LLSD.FromString(welcomeMessage);
map["region_x"] = LLSD.FromInteger(RegionX * Constants.RegionSize);
map["region_y"] = LLSD.FromInteger(RegionY * Constants.RegionSize);
map["seed_capability"] = OSD.FromString(seedCapability);
map["home"] = OSD.FromString(home);
map["look_at"] = OSD.FromString(lookAt);
map["message"] = OSD.FromString(welcomeMessage);
map["region_x"] = OSD.FromInteger(RegionX * Constants.RegionSize);
map["region_y"] = OSD.FromInteger(RegionY * Constants.RegionSize);
if (m_buddyList != null)
{
map["buddy-list"] = ArrayListToLLSDArray(m_buddyList.ToArray());
map["buddy-list"] = ArrayListToOSDArray(m_buddyList.ToArray());
}
map["login"] = LLSD.FromString("true");
map["login"] = OSD.FromString("true");
return map;
}
@@ -499,24 +499,24 @@ namespace OpenSim.Framework.Communications
}
}
public LLSDArray ArrayListToLLSDArray(ArrayList arrlst)
public OSDArray ArrayListToOSDArray(ArrayList arrlst)
{
LLSDArray llsdBack = new LLSDArray();
OSDArray llsdBack = new OSDArray();
foreach (Hashtable ht in arrlst)
{
LLSDMap mp = new LLSDMap();
OSDMap mp = new OSDMap();
foreach (DictionaryEntry deHt in ht)
{
mp.Add((string)deHt.Key, LLSDString.FromObject(deHt.Value));
mp.Add((string)deHt.Key, OSDString.FromObject(deHt.Value));
}
llsdBack.Add(mp);
}
return llsdBack;
}
private static LLSDArray WrapLLSDMap(LLSDMap wrapMe)
private static OSDArray WrapOSDMap(OSDMap wrapMe)
{
LLSDArray array = new LLSDArray();
OSDArray array = new OSDArray();
array.Add(wrapMe);
return array;
}

View File

@@ -321,7 +321,7 @@ namespace OpenSim.Framework.Communications
/// </summary>
/// <param name="request">The LLSD request</param>
/// <returns>The response to send</returns>
public LLSD LLSDLoginMethod(LLSD request)
public OSD LLSDLoginMethod(OSD request)
{
// Temporary fix
m_loginMutex.WaitOne();
@@ -335,9 +335,9 @@ namespace OpenSim.Framework.Communications
UserProfileData userProfile = null;
LoginResponse logResponse = new LoginResponse();
if (request.Type == LLSDType.Map)
if (request.Type == OSDType.Map)
{
LLSDMap map = (LLSDMap)request;
OSDMap map = (OSDMap)request;
if (map.ContainsKey("first") && map.ContainsKey("last") && map.ContainsKey("passwd"))
{
@@ -749,7 +749,7 @@ namespace OpenSim.Framework.Communications
m_userManager.CreateAgent(profile, request);
}
public void CreateAgent(UserProfileData profile, LLSD request)
public void CreateAgent(UserProfileData profile, OSD request)
{
m_userManager.CreateAgent(profile, request);
}

View File

@@ -448,7 +448,7 @@ namespace OpenSim.Framework.Communications
profile.CurrentAgent = agent;
}
public void CreateAgent(UserProfileData profile, LLSD request)
public void CreateAgent(UserProfileData profile, OSD request)
{
UserAgentData agent = new UserAgentData();

View File

@@ -50,7 +50,7 @@ namespace OpenSim.Framework
public ulong RegionHandle
{
get { return Helpers.UIntsToLong((uint) m_x, (uint) m_y); }
get { return Utils.UIntsToLong((uint)m_x, (uint)m_y); }
}
public int X

View File

@@ -874,7 +874,7 @@ namespace OpenSim.Framework
for (int k = 0; k < extraParamCount; k++)
{
ushort epType = Helpers.BytesToUInt16(data, i);
ushort epType = Utils.BytesToUInt16(data, i);
i += 2;
// uint paramLength = Helpers.BytesToUIntBig(data, i);
@@ -1014,9 +1014,9 @@ namespace OpenSim.Framework
_lightColorG = lColor.G;
_lightColorB = lColor.B;
_lightRadius = Helpers.BytesToFloat(data, pos + 4);
_lightCutoff = Helpers.BytesToFloat(data, pos + 8);
_lightFalloff = Helpers.BytesToFloat(data, pos + 12);
_lightRadius = Utils.BytesToFloat(data, pos + 4);
_lightCutoff = Utils.BytesToFloat(data, pos + 8);
_lightFalloff = Utils.BytesToFloat(data, pos + 12);
}
else
{
@@ -1040,9 +1040,9 @@ namespace OpenSim.Framework
Color4 tmpColor = new Color4(_lightColorR,_lightColorG,_lightColorB,_lightIntensity);
tmpColor.GetBytes().CopyTo(data, 0);
Helpers.FloatToBytes(_lightRadius).CopyTo(data, 4);
Helpers.FloatToBytes(_lightCutoff).CopyTo(data, 8);
Helpers.FloatToBytes(_lightFalloff).CopyTo(data, 12);
Utils.FloatToBytes(_lightRadius).CopyTo(data, 4);
Utils.FloatToBytes(_lightCutoff).CopyTo(data, 8);
Utils.FloatToBytes(_lightFalloff).CopyTo(data, 12);
return data;
}

View File

@@ -692,8 +692,8 @@ namespace OpenSim.Framework.Servers
//m_log.DebugFormat("[OGP]: {0}:{1}", request.RawUrl, requestBody);
response.KeepAlive = true;
LLSD llsdRequest = null;
LLSD llsdResponse = null;
OSD llsdRequest = null;
OSD llsdResponse = null;
bool LegacyLLSDLoginLibOMV = (requestBody.Contains("passwd") && requestBody.Contains("mac") && requestBody.Contains("viewer_digest"));
@@ -704,7 +704,7 @@ namespace OpenSim.Framework.Servers
}
try
{
llsdRequest = LLSDParser.DeserializeXml(requestBody);
llsdRequest = OSDParser.DeserializeLLSDXml(requestBody);
}
catch (Exception ex)
{
@@ -756,7 +756,7 @@ namespace OpenSim.Framework.Servers
{
response.ContentType = "application/llsd+xml";
//m_log.Info("[Debug BASE HTTP SERVER]: Response: " + llsdResponse.ToString());
buffer = LLSDParser.SerializeXmlBytes(llsdResponse);
buffer = OSDParser.SerializeLLSDXmlBytes(llsdResponse);
}
response.SendChunked = false;
response.ContentLength64 = buffer.Length;
@@ -948,12 +948,12 @@ namespace OpenSim.Framework.Servers
}
}
private LLSDMap GenerateNoLLSDHandlerResponse()
private OSDMap GenerateNoLLSDHandlerResponse()
{
LLSDMap map = new LLSDMap();
map["reason"] = LLSD.FromString("LLSDRequest");
map["message"] = LLSD.FromString("No handler registered for LLSD Requests");
map["login"] = LLSD.FromString("false");
OSDMap map = new OSDMap();
map["reason"] = OSD.FromString("LLSDRequest");
map["message"] = OSD.FromString("No handler registered for LLSD Requests");
map["login"] = OSD.FromString("false");
return map;
}
/// <summary>

View File

@@ -341,8 +341,7 @@ namespace OpenSim.Framework.Servers
public virtual void Show(string[] showParams)
{
switch (showParams[0])
{
{
case "info":
Notice("Version: " + m_version);
Notice("Startup directory: " + m_startupDirectory);
@@ -350,9 +349,7 @@ namespace OpenSim.Framework.Servers
case "stats":
if (m_stats != null)
{
Notice(m_stats.Report());
}
break;
case "threads":

View File

@@ -29,6 +29,6 @@ using OpenMetaverse.StructuredData;
namespace OpenSim.Framework.Servers
{
public delegate LLSD LLSDMethod( string path, LLSD request, string endpoint );
public delegate LLSD DefaultLLSDMethod(LLSD request);
public delegate OSD LLSDMethod( string path, OSD request, string endpoint );
public delegate OSD DefaultLLSDMethod(OSD request);
}

View File

@@ -29,5 +29,5 @@ using OpenMetaverse.StructuredData;
namespace OpenSim.Framework.Servers
{
public delegate LLSD LLSDMethodString(LLSD request, string thePath);
public delegate OSD LLSDMethodString(OSD request, string thePath);
}

View File

@@ -156,7 +156,7 @@ namespace OpenSim.Framework
/// </summary>
public virtual ulong HomeRegion
{
get { return Helpers.UIntsToLong((_homeRegionX * (uint) Constants.RegionSize), (_homeRegionY * (uint) Constants.RegionSize)); }
get { return Utils.UIntsToLong((_homeRegionX * (uint)Constants.RegionSize), (_homeRegionY * (uint)Constants.RegionSize)); }
set
{
_homeRegionX = (uint) (value >> 40);

View File

@@ -185,7 +185,7 @@ namespace OpenSim.Framework
public static ulong UIntsToLong(uint X, uint Y)
{
return Helpers.UIntsToLong(X, Y);
return Utils.UIntsToLong(X, Y);
}
public static T Clamp<T>(T x, T min, T max)
@@ -783,9 +783,9 @@ namespace OpenSim.Framework
public static void ParseFakeParcelID(UUID parcelID, out ulong regionHandle, out uint x, out uint y)
{
byte[] bytes = parcelID.GetBytes();
regionHandle = Helpers.BytesToUInt64(bytes);
x = Helpers.BytesToUInt(bytes, 8);
y = Helpers.BytesToUInt(bytes, 12);
regionHandle = Utils.BytesToUInt64(bytes);
x = Utils.BytesToUInt(bytes, 8);
y = Utils.BytesToUInt(bytes, 12);
}
public static void FakeParcelIDToGlobalPosition(UUID parcelID, out uint x, out uint y)
@@ -794,7 +794,7 @@ namespace OpenSim.Framework
uint rx, ry;
ParseFakeParcelID(parcelID, out regionHandle, out x, out y);
Helpers.LongToUInts(regionHandle, out rx, out ry);
Utils.LongToUInts(regionHandle, out rx, out ry);
x += rx;
y += ry;