mass update of files to have native line endings
parent
a47e2d9ae7
commit
74bb5282a0
|
@ -1,362 +1,362 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using OpenSim.Framework.Types;
|
using OpenSim.Framework.Types;
|
||||||
using OpenSim.Framework.Utilities;
|
using OpenSim.Framework.Utilities;
|
||||||
using OpenSim.Framework.Communications.Caches;
|
using OpenSim.Framework.Communications.Caches;
|
||||||
|
|
||||||
namespace OpenSim.Region.Capabilities
|
namespace OpenSim.Region.Capabilities
|
||||||
{
|
{
|
||||||
public delegate void UpLoadedTexture(string assetName, LLUUID assetID, LLUUID inventoryItem, byte[] data);
|
public delegate void UpLoadedTexture(string assetName, LLUUID assetID, LLUUID inventoryItem, byte[] data);
|
||||||
|
|
||||||
public class Caps
|
public class Caps
|
||||||
{
|
{
|
||||||
private string m_httpListenerHostName;
|
private string m_httpListenerHostName;
|
||||||
private int m_httpListenPort;
|
private int m_httpListenPort;
|
||||||
private string m_capsObjectPath = "00001-";
|
private string m_capsObjectPath = "00001-";
|
||||||
private string m_requestPath = "0000/";
|
private string m_requestPath = "0000/";
|
||||||
private string m_mapLayerPath = "0001/";
|
private string m_mapLayerPath = "0001/";
|
||||||
private string m_newInventory = "0002/";
|
private string m_newInventory = "0002/";
|
||||||
// private string m_requestTexture = "0003/";
|
// private string m_requestTexture = "0003/";
|
||||||
private string m_notecardUpdatePath = "0004/";
|
private string m_notecardUpdatePath = "0004/";
|
||||||
//private string eventQueue = "0100/";
|
//private string eventQueue = "0100/";
|
||||||
private BaseHttpServer httpListener;
|
private BaseHttpServer httpListener;
|
||||||
private LLUUID agentID;
|
private LLUUID agentID;
|
||||||
private AssetCache assetCache;
|
private AssetCache assetCache;
|
||||||
private int eventQueueCount = 1;
|
private int eventQueueCount = 1;
|
||||||
private Queue<string> CapsEventQueue = new Queue<string>();
|
private Queue<string> CapsEventQueue = new Queue<string>();
|
||||||
|
|
||||||
public Caps(AssetCache assetCach, BaseHttpServer httpServer, string httpListen, int httpPort, string capsPath, LLUUID agent)
|
public Caps(AssetCache assetCach, BaseHttpServer httpServer, string httpListen, int httpPort, string capsPath, LLUUID agent)
|
||||||
{
|
{
|
||||||
assetCache = assetCach;
|
assetCache = assetCach;
|
||||||
m_capsObjectPath = capsPath;
|
m_capsObjectPath = capsPath;
|
||||||
httpListener = httpServer;
|
httpListener = httpServer;
|
||||||
m_httpListenerHostName = httpListen;
|
m_httpListenerHostName = httpListen;
|
||||||
m_httpListenPort = httpPort;
|
m_httpListenPort = httpPort;
|
||||||
agentID = agent;
|
agentID = agent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void RegisterHandlers()
|
public void RegisterHandlers()
|
||||||
{
|
{
|
||||||
Console.WriteLine("registering CAPS handlers");
|
Console.WriteLine("registering CAPS handlers");
|
||||||
string capsBase = "/CAPS/" + m_capsObjectPath;
|
string capsBase = "/CAPS/" + m_capsObjectPath;
|
||||||
|
|
||||||
httpListener.AddStreamHandler(new LLSDStreamhandler<LLSDMapRequest, LLSDMapLayerResponse>("POST", capsBase + m_mapLayerPath, this.GetMapLayer ));
|
httpListener.AddStreamHandler(new LLSDStreamhandler<LLSDMapRequest, LLSDMapLayerResponse>("POST", capsBase + m_mapLayerPath, this.GetMapLayer ));
|
||||||
httpListener.AddStreamHandler( new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>("POST", capsBase + m_newInventory, this.NewAgentInventoryRequest));
|
httpListener.AddStreamHandler( new LLSDStreamhandler<LLSDAssetUploadRequest, LLSDAssetUploadResponse>("POST", capsBase + m_newInventory, this.NewAgentInventoryRequest));
|
||||||
|
|
||||||
AddLegacyCapsHandler(httpListener, m_requestPath, CapsRequest);
|
AddLegacyCapsHandler(httpListener, m_requestPath, CapsRequest);
|
||||||
AddLegacyCapsHandler(httpListener, m_notecardUpdatePath, NoteCardAgentInventory);
|
AddLegacyCapsHandler(httpListener, m_notecardUpdatePath, NoteCardAgentInventory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//[Obsolete("Use BaseHttpServer.AddStreamHandler(new LLSDStreamHandler( LLSDMethod delegate )) instead.")]
|
//[Obsolete("Use BaseHttpServer.AddStreamHandler(new LLSDStreamHandler( LLSDMethod delegate )) instead.")]
|
||||||
//Commented out the obsolete as at this time the first caps request can not use the new Caps method
|
//Commented out the obsolete as at this time the first caps request can not use the new Caps method
|
||||||
//as the sent type is a array and not a map and the deserialising doesn't deal properly with arrays.
|
//as the sent type is a array and not a map and the deserialising doesn't deal properly with arrays.
|
||||||
private void AddLegacyCapsHandler(BaseHttpServer httpListener, string path, RestMethod restMethod)
|
private void AddLegacyCapsHandler(BaseHttpServer httpListener, string path, RestMethod restMethod)
|
||||||
{
|
{
|
||||||
string capsBase = "/CAPS/" + m_capsObjectPath;
|
string capsBase = "/CAPS/" + m_capsObjectPath;
|
||||||
httpListener.AddStreamHandler(new RestStreamHandler("POST", capsBase + path, restMethod));
|
httpListener.AddStreamHandler(new RestStreamHandler("POST", capsBase + path, restMethod));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="request"></param>
|
/// <param name="request"></param>
|
||||||
/// <param name="path"></param>
|
/// <param name="path"></param>
|
||||||
/// <param name="param"></param>
|
/// <param name="param"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string CapsRequest(string request, string path, string param)
|
public string CapsRequest(string request, string path, string param)
|
||||||
{
|
{
|
||||||
//Console.WriteLine("caps request " + request);
|
//Console.WriteLine("caps request " + request);
|
||||||
string result = LLSDHelpers.SerialiseLLSDReply(this.GetCapabilities());
|
string result = LLSDHelpers.SerialiseLLSDReply(this.GetCapabilities());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected LLSDCapsDetails GetCapabilities()
|
protected LLSDCapsDetails GetCapabilities()
|
||||||
{
|
{
|
||||||
LLSDCapsDetails caps = new LLSDCapsDetails();
|
LLSDCapsDetails caps = new LLSDCapsDetails();
|
||||||
string capsBaseUrl = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + "/CAPS/" + m_capsObjectPath;
|
string capsBaseUrl = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + "/CAPS/" + m_capsObjectPath;
|
||||||
caps.MapLayer = capsBaseUrl + m_mapLayerPath;
|
caps.MapLayer = capsBaseUrl + m_mapLayerPath;
|
||||||
caps.NewFileAgentInventory = capsBaseUrl + m_newInventory;
|
caps.NewFileAgentInventory = capsBaseUrl + m_newInventory;
|
||||||
//caps.RequestTextureDownload = capsBaseUrl + m_requestTexture;
|
//caps.RequestTextureDownload = capsBaseUrl + m_requestTexture;
|
||||||
caps.UpdateNotecardAgentInventory = capsBaseUrl + m_notecardUpdatePath;
|
caps.UpdateNotecardAgentInventory = capsBaseUrl + m_notecardUpdatePath;
|
||||||
return caps;
|
return caps;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="mapReq"></param>
|
/// <param name="mapReq"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public LLSDMapLayerResponse GetMapLayer(LLSDMapRequest mapReq)
|
public LLSDMapLayerResponse GetMapLayer(LLSDMapRequest mapReq)
|
||||||
{
|
{
|
||||||
LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse();
|
LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse();
|
||||||
mapResponse.LayerData.Array.Add(this.GetLLSDMapLayerResponse());
|
mapResponse.LayerData.Array.Add(this.GetLLSDMapLayerResponse());
|
||||||
return mapResponse;
|
return mapResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
protected LLSDMapLayer GetLLSDMapLayerResponse()
|
protected LLSDMapLayer GetLLSDMapLayerResponse()
|
||||||
{
|
{
|
||||||
LLSDMapLayer mapLayer = new LLSDMapLayer();
|
LLSDMapLayer mapLayer = new LLSDMapLayer();
|
||||||
mapLayer.Right = 5000;
|
mapLayer.Right = 5000;
|
||||||
mapLayer.Top = 5000;
|
mapLayer.Top = 5000;
|
||||||
mapLayer.ImageID = new LLUUID("00000000-0000-0000-9999-000000000006");
|
mapLayer.ImageID = new LLUUID("00000000-0000-0000-9999-000000000006");
|
||||||
return mapLayer;
|
return mapLayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="request"></param>
|
/// <param name="request"></param>
|
||||||
/// <param name="path"></param>
|
/// <param name="path"></param>
|
||||||
/// <param name="param"></param>
|
/// <param name="param"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string RequestTexture(string request, string path, string param)
|
public string RequestTexture(string request, string path, string param)
|
||||||
{
|
{
|
||||||
Console.WriteLine("texture request " + request);
|
Console.WriteLine("texture request " + request);
|
||||||
// Needs implementing (added to remove compiler warning)
|
// Needs implementing (added to remove compiler warning)
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
#region EventQueue (Currently not enabled)
|
#region EventQueue (Currently not enabled)
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="request"></param>
|
/// <param name="request"></param>
|
||||||
/// <param name="path"></param>
|
/// <param name="path"></param>
|
||||||
/// <param name="param"></param>
|
/// <param name="param"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string ProcessEventQueue(string request, string path, string param)
|
public string ProcessEventQueue(string request, string path, string param)
|
||||||
{
|
{
|
||||||
string res = "";
|
string res = "";
|
||||||
|
|
||||||
if (this.CapsEventQueue.Count > 0)
|
if (this.CapsEventQueue.Count > 0)
|
||||||
{
|
{
|
||||||
lock (this.CapsEventQueue)
|
lock (this.CapsEventQueue)
|
||||||
{
|
{
|
||||||
string item = CapsEventQueue.Dequeue();
|
string item = CapsEventQueue.Dequeue();
|
||||||
res = item;
|
res = item;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
res = this.CreateEmptyEventResponse();
|
res = this.CreateEmptyEventResponse();
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="caps"></param>
|
/// <param name="caps"></param>
|
||||||
/// <param name="ipAddressPort"></param>
|
/// <param name="ipAddressPort"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string CreateEstablishAgentComms(string caps, string ipAddressPort)
|
public string CreateEstablishAgentComms(string caps, string ipAddressPort)
|
||||||
{
|
{
|
||||||
LLSDCapEvent eventItem = new LLSDCapEvent();
|
LLSDCapEvent eventItem = new LLSDCapEvent();
|
||||||
eventItem.id = eventQueueCount;
|
eventItem.id = eventQueueCount;
|
||||||
//should be creating a EstablishAgentComms item, but there isn't a class for it yet
|
//should be creating a EstablishAgentComms item, but there isn't a class for it yet
|
||||||
eventItem.events.Array.Add(new LLSDEmpty());
|
eventItem.events.Array.Add(new LLSDEmpty());
|
||||||
string res = LLSDHelpers.SerialiseLLSDReply(eventItem);
|
string res = LLSDHelpers.SerialiseLLSDReply(eventItem);
|
||||||
eventQueueCount++;
|
eventQueueCount++;
|
||||||
|
|
||||||
this.CapsEventQueue.Enqueue(res);
|
this.CapsEventQueue.Enqueue(res);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string CreateEmptyEventResponse()
|
public string CreateEmptyEventResponse()
|
||||||
{
|
{
|
||||||
LLSDCapEvent eventItem = new LLSDCapEvent();
|
LLSDCapEvent eventItem = new LLSDCapEvent();
|
||||||
eventItem.id = eventQueueCount;
|
eventItem.id = eventQueueCount;
|
||||||
eventItem.events.Array.Add(new LLSDEmpty());
|
eventItem.events.Array.Add(new LLSDEmpty());
|
||||||
string res = LLSDHelpers.SerialiseLLSDReply(eventItem);
|
string res = LLSDHelpers.SerialiseLLSDReply(eventItem);
|
||||||
eventQueueCount++;
|
eventQueueCount++;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="request"></param>
|
/// <param name="request"></param>
|
||||||
/// <param name="path"></param>
|
/// <param name="path"></param>
|
||||||
/// <param name="param"></param>
|
/// <param name="param"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string NoteCardAgentInventory(string request, string path, string param)
|
public string NoteCardAgentInventory(string request, string path, string param)
|
||||||
{
|
{
|
||||||
Console.WriteLine("notecard update request " + request);
|
Console.WriteLine("notecard update request " + request);
|
||||||
string assetName = "notecardupdate";
|
string assetName = "notecardupdate";
|
||||||
string capsBase = "/CAPS/" + m_capsObjectPath;
|
string capsBase = "/CAPS/" + m_capsObjectPath;
|
||||||
LLUUID newAsset = LLUUID.Random();
|
LLUUID newAsset = LLUUID.Random();
|
||||||
LLUUID newInvItem = LLUUID.Random();
|
LLUUID newInvItem = LLUUID.Random();
|
||||||
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
|
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
|
||||||
|
|
||||||
AssetUploader uploader = new AssetUploader(assetName, newAsset, newInvItem, capsBase + uploaderPath, this.httpListener);
|
AssetUploader uploader = new AssetUploader(assetName, newAsset, newInvItem, capsBase + uploaderPath, this.httpListener);
|
||||||
httpListener.AddStreamHandler(new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps));
|
httpListener.AddStreamHandler(new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps));
|
||||||
string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase + uploaderPath;
|
string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase + uploaderPath;
|
||||||
|
|
||||||
LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse();
|
LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse();
|
||||||
uploadResponse.uploader = uploaderURL;
|
uploadResponse.uploader = uploaderURL;
|
||||||
uploadResponse.state = "upload";
|
uploadResponse.state = "upload";
|
||||||
// uploader.OnUpLoad += this.UploadCompleteHandler;
|
// uploader.OnUpLoad += this.UploadCompleteHandler;
|
||||||
return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
|
return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="llsdRequest"></param>
|
/// <param name="llsdRequest"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public LLSDAssetUploadResponse NewAgentInventoryRequest(LLSDAssetUploadRequest llsdRequest)
|
public LLSDAssetUploadResponse NewAgentInventoryRequest(LLSDAssetUploadRequest llsdRequest)
|
||||||
{
|
{
|
||||||
// Console.WriteLine("asset upload request via CAPS");
|
// Console.WriteLine("asset upload request via CAPS");
|
||||||
string assetName = llsdRequest.name;
|
string assetName = llsdRequest.name;
|
||||||
string capsBase = "/CAPS/" + m_capsObjectPath;
|
string capsBase = "/CAPS/" + m_capsObjectPath;
|
||||||
LLUUID newAsset = LLUUID.Random();
|
LLUUID newAsset = LLUUID.Random();
|
||||||
LLUUID newInvItem = LLUUID.Random();
|
LLUUID newInvItem = LLUUID.Random();
|
||||||
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
|
string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
|
||||||
|
|
||||||
AssetUploader uploader = new AssetUploader(assetName, newAsset, newInvItem, capsBase + uploaderPath, this.httpListener);
|
AssetUploader uploader = new AssetUploader(assetName, newAsset, newInvItem, capsBase + uploaderPath, this.httpListener);
|
||||||
httpListener.AddStreamHandler(new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps));
|
httpListener.AddStreamHandler(new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps));
|
||||||
string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase + uploaderPath;
|
string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase + uploaderPath;
|
||||||
|
|
||||||
LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse();
|
LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse();
|
||||||
uploadResponse.uploader = uploaderURL;
|
uploadResponse.uploader = uploaderURL;
|
||||||
uploadResponse.state = "upload";
|
uploadResponse.state = "upload";
|
||||||
uploader.OnUpLoad += this.UploadCompleteHandler;
|
uploader.OnUpLoad += this.UploadCompleteHandler;
|
||||||
return uploadResponse;
|
return uploadResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="assetID"></param>
|
/// <param name="assetID"></param>
|
||||||
/// <param name="inventoryItem"></param>
|
/// <param name="inventoryItem"></param>
|
||||||
/// <param name="data"></param>
|
/// <param name="data"></param>
|
||||||
public void UploadCompleteHandler(string assetName, LLUUID assetID, LLUUID inventoryItem, byte[] data)
|
public void UploadCompleteHandler(string assetName, LLUUID assetID, LLUUID inventoryItem, byte[] data)
|
||||||
{
|
{
|
||||||
AssetBase asset;
|
AssetBase asset;
|
||||||
asset = new AssetBase();
|
asset = new AssetBase();
|
||||||
asset.FullID = assetID;
|
asset.FullID = assetID;
|
||||||
asset.Type = 0;
|
asset.Type = 0;
|
||||||
asset.InvType = 0;
|
asset.InvType = 0;
|
||||||
asset.Name = assetName;
|
asset.Name = assetName;
|
||||||
asset.Data = data;
|
asset.Data = data;
|
||||||
this.assetCache.AddAsset(asset);
|
this.assetCache.AddAsset(asset);
|
||||||
}
|
}
|
||||||
|
|
||||||
public class AssetUploader
|
public class AssetUploader
|
||||||
{
|
{
|
||||||
public event UpLoadedTexture OnUpLoad;
|
public event UpLoadedTexture OnUpLoad;
|
||||||
|
|
||||||
private string uploaderPath = "";
|
private string uploaderPath = "";
|
||||||
private LLUUID newAssetID;
|
private LLUUID newAssetID;
|
||||||
private LLUUID inventoryItemID;
|
private LLUUID inventoryItemID;
|
||||||
private BaseHttpServer httpListener;
|
private BaseHttpServer httpListener;
|
||||||
private bool SaveImages = false;
|
private bool SaveImages = false;
|
||||||
private string m_assetName = "";
|
private string m_assetName = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="assetID"></param>
|
/// <param name="assetID"></param>
|
||||||
/// <param name="inventoryItem"></param>
|
/// <param name="inventoryItem"></param>
|
||||||
/// <param name="path"></param>
|
/// <param name="path"></param>
|
||||||
/// <param name="httpServer"></param>
|
/// <param name="httpServer"></param>
|
||||||
public AssetUploader(string assetName, LLUUID assetID, LLUUID inventoryItem, string path, BaseHttpServer httpServer)
|
public AssetUploader(string assetName, LLUUID assetID, LLUUID inventoryItem, string path, BaseHttpServer httpServer)
|
||||||
{
|
{
|
||||||
m_assetName = assetName;
|
m_assetName = assetName;
|
||||||
newAssetID = assetID;
|
newAssetID = assetID;
|
||||||
inventoryItemID = inventoryItem;
|
inventoryItemID = inventoryItem;
|
||||||
uploaderPath = path;
|
uploaderPath = path;
|
||||||
httpListener = httpServer;
|
httpListener = httpServer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="data"></param>
|
/// <param name="data"></param>
|
||||||
/// <param name="path"></param>
|
/// <param name="path"></param>
|
||||||
/// <param name="param"></param>
|
/// <param name="param"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string uploaderCaps(byte[] data, string path, string param)
|
public string uploaderCaps(byte[] data, string path, string param)
|
||||||
{
|
{
|
||||||
LLUUID inv = this.inventoryItemID;
|
LLUUID inv = this.inventoryItemID;
|
||||||
string res = "";
|
string res = "";
|
||||||
LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete();
|
LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete();
|
||||||
uploadComplete.new_asset = newAssetID.ToStringHyphenated();
|
uploadComplete.new_asset = newAssetID.ToStringHyphenated();
|
||||||
uploadComplete.new_inventory_item = inv;
|
uploadComplete.new_inventory_item = inv;
|
||||||
uploadComplete.state = "complete";
|
uploadComplete.state = "complete";
|
||||||
|
|
||||||
res = LLSDHelpers.SerialiseLLSDReply(uploadComplete);
|
res = LLSDHelpers.SerialiseLLSDReply(uploadComplete);
|
||||||
|
|
||||||
httpListener.RemoveStreamHandler("POST", uploaderPath);
|
httpListener.RemoveStreamHandler("POST", uploaderPath);
|
||||||
|
|
||||||
if(this.SaveImages)
|
if(this.SaveImages)
|
||||||
this.SaveImageToFile(m_assetName + ".jp2", data);
|
this.SaveImageToFile(m_assetName + ".jp2", data);
|
||||||
|
|
||||||
if (OnUpLoad != null)
|
if (OnUpLoad != null)
|
||||||
{
|
{
|
||||||
OnUpLoad(m_assetName, newAssetID, inv, data);
|
OnUpLoad(m_assetName, newAssetID, inv, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SaveImageToFile(string filename, byte[] data)
|
private void SaveImageToFile(string filename, byte[] data)
|
||||||
{
|
{
|
||||||
FileStream fs = File.Create(filename);
|
FileStream fs = File.Create(filename);
|
||||||
BinaryWriter bw = new BinaryWriter(fs);
|
BinaryWriter bw = new BinaryWriter(fs);
|
||||||
bw.Write(data);
|
bw.Write(data);
|
||||||
bw.Close();
|
bw.Close();
|
||||||
fs.Close();
|
fs.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,42 +1,42 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
|
|
||||||
namespace OpenSim.Region.Capabilities
|
namespace OpenSim.Region.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDType("ARRAY")]
|
[LLSDType("ARRAY")]
|
||||||
public class LLSDArray
|
public class LLSDArray
|
||||||
{
|
{
|
||||||
public ArrayList Array = new ArrayList();
|
public ArrayList Array = new ArrayList();
|
||||||
|
|
||||||
public LLSDArray()
|
public LLSDArray()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,45 +1,45 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
|
||||||
namespace OpenSim.Region.Capabilities
|
namespace OpenSim.Region.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDType("MAP")]
|
[LLSDType("MAP")]
|
||||||
public class LLSDAssetUploadComplete
|
public class LLSDAssetUploadComplete
|
||||||
{
|
{
|
||||||
public string new_asset = "";
|
public string new_asset = "";
|
||||||
public LLUUID new_inventory_item = LLUUID.Zero;
|
public LLUUID new_inventory_item = LLUUID.Zero;
|
||||||
public string state = "";
|
public string state = "";
|
||||||
//public bool success = false;
|
//public bool success = false;
|
||||||
|
|
||||||
public LLSDAssetUploadComplete()
|
public LLSDAssetUploadComplete()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
|
||||||
namespace OpenSim.Region.Capabilities
|
namespace OpenSim.Region.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDMap]
|
[LLSDMap]
|
||||||
public class LLSDAssetUploadRequest
|
public class LLSDAssetUploadRequest
|
||||||
{
|
{
|
||||||
public string asset_type = "";
|
public string asset_type = "";
|
||||||
public string description = "";
|
public string description = "";
|
||||||
public LLUUID folder_id = LLUUID.Zero;
|
public LLUUID folder_id = LLUUID.Zero;
|
||||||
public string inventory_type = "";
|
public string inventory_type = "";
|
||||||
public string name = "";
|
public string name = "";
|
||||||
|
|
||||||
public LLSDAssetUploadRequest()
|
public LLSDAssetUploadRequest()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace OpenSim.Region.Capabilities
|
namespace OpenSim.Region.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDMap]
|
[LLSDMap]
|
||||||
public class LLSDAssetUploadResponse
|
public class LLSDAssetUploadResponse
|
||||||
{
|
{
|
||||||
public string uploader = "";
|
public string uploader = "";
|
||||||
public string state = "";
|
public string state = "";
|
||||||
|
|
||||||
public LLSDAssetUploadResponse()
|
public LLSDAssetUploadResponse()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,41 +1,41 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
namespace OpenSim.Region.Capabilities
|
namespace OpenSim.Region.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDType("MAP")]
|
[LLSDType("MAP")]
|
||||||
public class LLSDCapEvent
|
public class LLSDCapEvent
|
||||||
{
|
{
|
||||||
public int id = 0;
|
public int id = 0;
|
||||||
public LLSDArray events = new LLSDArray();
|
public LLSDArray events = new LLSDArray();
|
||||||
|
|
||||||
public LLSDCapEvent()
|
public LLSDCapEvent()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
namespace OpenSim.Region.Capabilities
|
namespace OpenSim.Region.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDType("MAP")]
|
[LLSDType("MAP")]
|
||||||
public class LLSDCapsDetails
|
public class LLSDCapsDetails
|
||||||
{
|
{
|
||||||
public string MapLayer = "";
|
public string MapLayer = "";
|
||||||
public string NewFileAgentInventory = "";
|
public string NewFileAgentInventory = "";
|
||||||
//public string EventQueueGet = "";
|
//public string EventQueueGet = "";
|
||||||
//public string RequestTextureDownload = "";
|
//public string RequestTextureDownload = "";
|
||||||
//public string ChatSessionRequest = "";
|
//public string ChatSessionRequest = "";
|
||||||
public string UpdateNotecardAgentInventory = "";
|
public string UpdateNotecardAgentInventory = "";
|
||||||
|
|
||||||
public LLSDCapsDetails()
|
public LLSDCapsDetails()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,38 +1,38 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
namespace OpenSim.Region.Capabilities
|
namespace OpenSim.Region.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDType("MAP")]
|
[LLSDType("MAP")]
|
||||||
public class LLSDEmpty
|
public class LLSDEmpty
|
||||||
{
|
{
|
||||||
public LLSDEmpty()
|
public LLSDEmpty()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,164 +1,164 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
|
||||||
namespace OpenSim.Region.Capabilities
|
namespace OpenSim.Region.Capabilities
|
||||||
{
|
{
|
||||||
public class LLSDHelpers
|
public class LLSDHelpers
|
||||||
{
|
{
|
||||||
public static string SerialiseLLSDReply(object obj)
|
public static string SerialiseLLSDReply(object obj)
|
||||||
{
|
{
|
||||||
StringWriter sw = new StringWriter();
|
StringWriter sw = new StringWriter();
|
||||||
XmlTextWriter writer = new XmlTextWriter(sw);
|
XmlTextWriter writer = new XmlTextWriter(sw);
|
||||||
writer.Formatting = Formatting.None;
|
writer.Formatting = Formatting.None;
|
||||||
writer.WriteStartElement(String.Empty, "llsd", String.Empty);
|
writer.WriteStartElement(String.Empty, "llsd", String.Empty);
|
||||||
SerializeLLSDType(writer, obj);
|
SerializeLLSDType(writer, obj);
|
||||||
writer.WriteEndElement();
|
writer.WriteEndElement();
|
||||||
writer.Close();
|
writer.Close();
|
||||||
return sw.ToString();
|
return sw.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SerializeLLSDType(XmlTextWriter writer, object obj)
|
public static void SerializeLLSDType(XmlTextWriter writer, object obj)
|
||||||
{
|
{
|
||||||
Type myType = obj.GetType();
|
Type myType = obj.GetType();
|
||||||
LLSDType[] llsdattributes = (LLSDType[])myType.GetCustomAttributes(typeof(LLSDType), false);
|
LLSDType[] llsdattributes = (LLSDType[])myType.GetCustomAttributes(typeof(LLSDType), false);
|
||||||
if (llsdattributes.Length > 0)
|
if (llsdattributes.Length > 0)
|
||||||
{
|
{
|
||||||
switch (llsdattributes[0].ObjectType)
|
switch (llsdattributes[0].ObjectType)
|
||||||
{
|
{
|
||||||
case "MAP":
|
case "MAP":
|
||||||
writer.WriteStartElement(String.Empty, "map", String.Empty);
|
writer.WriteStartElement(String.Empty, "map", String.Empty);
|
||||||
FieldInfo[] fields = myType.GetFields();
|
FieldInfo[] fields = myType.GetFields();
|
||||||
for (int i = 0; i < fields.Length; i++)
|
for (int i = 0; i < fields.Length; i++)
|
||||||
{
|
{
|
||||||
object fieldValue = fields[i].GetValue(obj);
|
object fieldValue = fields[i].GetValue(obj);
|
||||||
LLSDType[] fieldAttributes = (LLSDType[])fieldValue.GetType().GetCustomAttributes(typeof(LLSDType), false);
|
LLSDType[] fieldAttributes = (LLSDType[])fieldValue.GetType().GetCustomAttributes(typeof(LLSDType), false);
|
||||||
if (fieldAttributes.Length > 0)
|
if (fieldAttributes.Length > 0)
|
||||||
{
|
{
|
||||||
writer.WriteStartElement(String.Empty, "key", String.Empty);
|
writer.WriteStartElement(String.Empty, "key", String.Empty);
|
||||||
writer.WriteString(fields[i].Name);
|
writer.WriteString(fields[i].Name);
|
||||||
writer.WriteEndElement();
|
writer.WriteEndElement();
|
||||||
SerializeLLSDType(writer, fieldValue);
|
SerializeLLSDType(writer, fieldValue);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
writer.WriteStartElement(String.Empty, "key", String.Empty);
|
writer.WriteStartElement(String.Empty, "key", String.Empty);
|
||||||
writer.WriteString(fields[i].Name);
|
writer.WriteString(fields[i].Name);
|
||||||
writer.WriteEndElement();
|
writer.WriteEndElement();
|
||||||
LLSD.LLSDWriteOne(writer, fieldValue);
|
LLSD.LLSDWriteOne(writer, fieldValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
writer.WriteEndElement();
|
writer.WriteEndElement();
|
||||||
break;
|
break;
|
||||||
case "ARRAY":
|
case "ARRAY":
|
||||||
// LLSDArray arrayObject = obj as LLSDArray;
|
// LLSDArray arrayObject = obj as LLSDArray;
|
||||||
// ArrayList a = arrayObject.Array;
|
// ArrayList a = arrayObject.Array;
|
||||||
ArrayList a = (ArrayList)obj.GetType().GetField("Array").GetValue(obj);
|
ArrayList a = (ArrayList)obj.GetType().GetField("Array").GetValue(obj);
|
||||||
if (a != null)
|
if (a != null)
|
||||||
{
|
{
|
||||||
writer.WriteStartElement(String.Empty, "array", String.Empty);
|
writer.WriteStartElement(String.Empty, "array", String.Empty);
|
||||||
foreach (object item in a)
|
foreach (object item in a)
|
||||||
{
|
{
|
||||||
SerializeLLSDType(writer, item);
|
SerializeLLSDType(writer, item);
|
||||||
}
|
}
|
||||||
writer.WriteEndElement();
|
writer.WriteEndElement();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LLSD.LLSDWriteOne(writer, obj);
|
LLSD.LLSDWriteOne(writer, obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static object DeserialiseLLSDMap(Hashtable llsd, object obj)
|
public static object DeserialiseLLSDMap(Hashtable llsd, object obj)
|
||||||
{
|
{
|
||||||
Type myType = obj.GetType();
|
Type myType = obj.GetType();
|
||||||
LLSDType[] llsdattributes = (LLSDType[])myType.GetCustomAttributes(typeof(LLSDType), false);
|
LLSDType[] llsdattributes = (LLSDType[])myType.GetCustomAttributes(typeof(LLSDType), false);
|
||||||
if (llsdattributes.Length > 0)
|
if (llsdattributes.Length > 0)
|
||||||
{
|
{
|
||||||
switch (llsdattributes[0].ObjectType)
|
switch (llsdattributes[0].ObjectType)
|
||||||
{
|
{
|
||||||
case "MAP":
|
case "MAP":
|
||||||
IDictionaryEnumerator enumerator = llsd.GetEnumerator();
|
IDictionaryEnumerator enumerator = llsd.GetEnumerator();
|
||||||
while (enumerator.MoveNext())
|
while (enumerator.MoveNext())
|
||||||
{
|
{
|
||||||
FieldInfo field = myType.GetField((string)enumerator.Key);
|
FieldInfo field = myType.GetField((string)enumerator.Key);
|
||||||
if (field != null)
|
if (field != null)
|
||||||
{
|
{
|
||||||
if (enumerator.Value is Hashtable)
|
if (enumerator.Value is Hashtable)
|
||||||
{
|
{
|
||||||
object fieldValue = field.GetValue(obj);
|
object fieldValue = field.GetValue(obj);
|
||||||
DeserialiseLLSDMap((Hashtable) enumerator.Value, fieldValue);
|
DeserialiseLLSDMap((Hashtable) enumerator.Value, fieldValue);
|
||||||
}
|
}
|
||||||
else if (enumerator.Value is ArrayList)
|
else if (enumerator.Value is ArrayList)
|
||||||
{
|
{
|
||||||
object fieldValue = field.GetValue(obj);
|
object fieldValue = field.GetValue(obj);
|
||||||
fieldValue.GetType().GetField("Array").SetValue(fieldValue, enumerator.Value);
|
fieldValue.GetType().GetField("Array").SetValue(fieldValue, enumerator.Value);
|
||||||
//TODO
|
//TODO
|
||||||
// the LLSD map/array types in the array need to be deserialised
|
// the LLSD map/array types in the array need to be deserialised
|
||||||
// but first we need to know the right class to deserialise them into.
|
// but first we need to know the right class to deserialise them into.
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
field.SetValue(obj, enumerator.Value);
|
field.SetValue(obj, enumerator.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,46 +1,46 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
|
||||||
namespace OpenSim.Region.Capabilities
|
namespace OpenSim.Region.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDType("MAP")]
|
[LLSDType("MAP")]
|
||||||
public class LLSDMapLayer
|
public class LLSDMapLayer
|
||||||
{
|
{
|
||||||
public int Left = 0;
|
public int Left = 0;
|
||||||
public int Right = 0;
|
public int Right = 0;
|
||||||
public int Top = 0;
|
public int Top = 0;
|
||||||
public int Bottom = 0;
|
public int Bottom = 0;
|
||||||
public LLUUID ImageID = LLUUID.Zero;
|
public LLUUID ImageID = LLUUID.Zero;
|
||||||
|
|
||||||
public LLSDMapLayer()
|
public LLSDMapLayer()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,41 +1,41 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
namespace OpenSim.Region.Capabilities
|
namespace OpenSim.Region.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDType("MAP")]
|
[LLSDType("MAP")]
|
||||||
public class LLSDMapLayerResponse
|
public class LLSDMapLayerResponse
|
||||||
{
|
{
|
||||||
public LLSDMapRequest AgentData = new LLSDMapRequest();
|
public LLSDMapRequest AgentData = new LLSDMapRequest();
|
||||||
public LLSDArray LayerData = new LLSDArray();
|
public LLSDArray LayerData = new LLSDArray();
|
||||||
|
|
||||||
public LLSDMapLayerResponse()
|
public LLSDMapLayerResponse()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
namespace OpenSim.Region.Capabilities
|
namespace OpenSim.Region.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDType("MAP")]
|
[LLSDType("MAP")]
|
||||||
public class LLSDMapRequest
|
public class LLSDMapRequest
|
||||||
{
|
{
|
||||||
public int Flags = 0;
|
public int Flags = 0;
|
||||||
|
|
||||||
public LLSDMapRequest()
|
public LLSDMapRequest()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace OpenSim.Region.Capabilities
|
namespace OpenSim.Region.Capabilities
|
||||||
{
|
{
|
||||||
public delegate TResponse LLSDMethod<TRequest, TResponse>(TRequest request);
|
public delegate TResponse LLSDMethod<TRequest, TResponse>(TRequest request);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,42 +1,42 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using OpenSim.Framework.Servers;
|
using OpenSim.Framework.Servers;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
|
||||||
namespace OpenSim.Region.Capabilities
|
namespace OpenSim.Region.Capabilities
|
||||||
{
|
{
|
||||||
public class LLSDStreamhandler<TRequest, TResponse> : BaseStreamHandler
|
public class LLSDStreamhandler<TRequest, TResponse> : BaseStreamHandler
|
||||||
where TRequest : new()
|
where TRequest : new()
|
||||||
{
|
{
|
||||||
private LLSDMethod<TRequest, TResponse> m_method;
|
private LLSDMethod<TRequest, TResponse> m_method;
|
||||||
|
|
||||||
public LLSDStreamhandler(string httpMethod, string path, LLSDMethod<TRequest, TResponse> method)
|
public LLSDStreamhandler(string httpMethod, string path, LLSDMethod<TRequest, TResponse> method)
|
||||||
: base(httpMethod, path )
|
: base(httpMethod, path )
|
||||||
{
|
{
|
||||||
m_method = method;
|
m_method = method;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override byte[] Handle(string path, Stream request)
|
public override byte[] Handle(string path, Stream request)
|
||||||
{
|
{
|
||||||
//Encoding encoding = Encoding.UTF8;
|
//Encoding encoding = Encoding.UTF8;
|
||||||
//StreamReader streamReader = new StreamReader(request, false);
|
//StreamReader streamReader = new StreamReader(request, false);
|
||||||
|
|
||||||
//string requestBody = streamReader.ReadToEnd();
|
//string requestBody = streamReader.ReadToEnd();
|
||||||
//streamReader.Close();
|
//streamReader.Close();
|
||||||
|
|
||||||
Hashtable hash = (Hashtable)LLSD.LLSDDeserialize( request );
|
Hashtable hash = (Hashtable)LLSD.LLSDDeserialize( request );
|
||||||
TRequest llsdRequest = new TRequest();
|
TRequest llsdRequest = new TRequest();
|
||||||
LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest);
|
LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest);
|
||||||
|
|
||||||
TResponse response = m_method(llsdRequest);
|
TResponse response = m_method(llsdRequest);
|
||||||
|
|
||||||
Encoding encoding = new UTF8Encoding(false);
|
Encoding encoding = new UTF8Encoding(false);
|
||||||
|
|
||||||
return encoding.GetBytes( LLSDHelpers.SerialiseLLSDReply(response) );
|
return encoding.GetBytes( LLSDHelpers.SerialiseLLSDReply(response) );
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,41 +1,41 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
namespace OpenSim.Region.Capabilities
|
namespace OpenSim.Region.Capabilities
|
||||||
{
|
{
|
||||||
[LLSDType("MAP")]
|
[LLSDType("MAP")]
|
||||||
public class LLSDTest
|
public class LLSDTest
|
||||||
{
|
{
|
||||||
public int Test1 = 20;
|
public int Test1 = 20;
|
||||||
public int Test2 = 10;
|
public int Test2 = 10;
|
||||||
|
|
||||||
public LLSDTest()
|
public LLSDTest()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,59 +1,59 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace OpenSim.Region.Capabilities
|
namespace OpenSim.Region.Capabilities
|
||||||
{
|
{
|
||||||
[AttributeUsage(AttributeTargets.Class)]
|
[AttributeUsage(AttributeTargets.Class)]
|
||||||
public class LLSDType : Attribute
|
public class LLSDType : Attribute
|
||||||
{
|
{
|
||||||
protected string myType;
|
protected string myType;
|
||||||
|
|
||||||
public LLSDType(string type)
|
public LLSDType(string type)
|
||||||
{
|
{
|
||||||
myType = type;
|
myType = type;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string ObjectType
|
public string ObjectType
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return myType;
|
return myType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Class)]
|
[AttributeUsage(AttributeTargets.Class)]
|
||||||
public class LLSDMap : LLSDType
|
public class LLSDMap : LLSDType
|
||||||
{
|
{
|
||||||
public LLSDMap() : base( "MAP" )
|
public LLSDMap() : base( "MAP" )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,89 +1,89 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using OpenSim.Framework.Configuration.Interfaces;
|
using OpenSim.Framework.Configuration.Interfaces;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Configuration.HTTP
|
namespace OpenSim.Framework.Configuration.HTTP
|
||||||
{
|
{
|
||||||
public class HTTPConfiguration : IGenericConfig
|
public class HTTPConfiguration : IGenericConfig
|
||||||
{
|
{
|
||||||
RemoteConfigSettings remoteConfigSettings;
|
RemoteConfigSettings remoteConfigSettings;
|
||||||
|
|
||||||
XmlConfiguration xmlConfig;
|
XmlConfiguration xmlConfig;
|
||||||
|
|
||||||
private string configFileName = "";
|
private string configFileName = "";
|
||||||
|
|
||||||
public HTTPConfiguration()
|
public HTTPConfiguration()
|
||||||
{
|
{
|
||||||
remoteConfigSettings = new RemoteConfigSettings("remoteconfig.xml");
|
remoteConfigSettings = new RemoteConfigSettings("remoteconfig.xml");
|
||||||
xmlConfig = new XmlConfiguration();
|
xmlConfig = new XmlConfiguration();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetFileName(string fileName)
|
public void SetFileName(string fileName)
|
||||||
{
|
{
|
||||||
configFileName = fileName;
|
configFileName = fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadData()
|
public void LoadData()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
byte[] buf = new byte[8192];
|
byte[] buf = new byte[8192];
|
||||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(this.remoteConfigSettings.baseConfigURL + this.configFileName);
|
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(this.remoteConfigSettings.baseConfigURL + this.configFileName);
|
||||||
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
||||||
|
|
||||||
Stream resStream = response.GetResponseStream();
|
Stream resStream = response.GetResponseStream();
|
||||||
|
|
||||||
string tempString = null;
|
string tempString = null;
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
count = resStream.Read(buf, 0, buf.Length);
|
count = resStream.Read(buf, 0, buf.Length);
|
||||||
if (count != 0)
|
if (count != 0)
|
||||||
{
|
{
|
||||||
tempString = Encoding.ASCII.GetString(buf, 0, count);
|
tempString = Encoding.ASCII.GetString(buf, 0, count);
|
||||||
sb.Append(tempString);
|
sb.Append(tempString);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (count > 0);
|
while (count > 0);
|
||||||
LoadDataFromString(sb.ToString());
|
LoadDataFromString(sb.ToString());
|
||||||
}
|
}
|
||||||
catch (WebException)
|
catch (WebException)
|
||||||
{
|
{
|
||||||
Console.MainLog.Instance.Warn("Unable to connect to remote configuration file (" + remoteConfigSettings.baseConfigURL + configFileName + "). Creating local file instead.");
|
Console.MainLog.Instance.Warn("Unable to connect to remote configuration file (" + remoteConfigSettings.baseConfigURL + configFileName + "). Creating local file instead.");
|
||||||
xmlConfig.SetFileName(configFileName);
|
xmlConfig.SetFileName(configFileName);
|
||||||
xmlConfig.LoadData();
|
xmlConfig.LoadData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadDataFromString(string data)
|
public void LoadDataFromString(string data)
|
||||||
{
|
{
|
||||||
xmlConfig.LoadDataFromString(data);
|
xmlConfig.LoadDataFromString(data);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetAttribute(string attributeName)
|
public string GetAttribute(string attributeName)
|
||||||
{
|
{
|
||||||
return xmlConfig.GetAttribute(attributeName);
|
return xmlConfig.GetAttribute(attributeName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool SetAttribute(string attributeName, string attributeValue)
|
public bool SetAttribute(string attributeName, string attributeValue)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Commit()
|
public void Commit()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,34 +1,34 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using OpenSim.Framework.Configuration;
|
using OpenSim.Framework.Configuration;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Configuration.HTTP
|
namespace OpenSim.Framework.Configuration.HTTP
|
||||||
{
|
{
|
||||||
public class RemoteConfigSettings
|
public class RemoteConfigSettings
|
||||||
{
|
{
|
||||||
private ConfigurationMember configMember;
|
private ConfigurationMember configMember;
|
||||||
|
|
||||||
public string baseConfigURL = "";
|
public string baseConfigURL = "";
|
||||||
public RemoteConfigSettings(string filename)
|
public RemoteConfigSettings(string filename)
|
||||||
{
|
{
|
||||||
configMember = new ConfigurationMember(filename, "REMOTE CONFIG SETTINGS", loadConfigurationOptions, handleIncomingConfiguration);
|
configMember = new ConfigurationMember(filename, "REMOTE CONFIG SETTINGS", loadConfigurationOptions, handleIncomingConfiguration);
|
||||||
configMember.forceConfigurationPluginLibrary("OpenSim.Framework.Configuration.XML.dll");
|
configMember.forceConfigurationPluginLibrary("OpenSim.Framework.Configuration.XML.dll");
|
||||||
configMember.performConfigurationRetrieve();
|
configMember.performConfigurationRetrieve();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadConfigurationOptions()
|
public void loadConfigurationOptions()
|
||||||
{
|
{
|
||||||
configMember.addConfigurationOption("base_config_url", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "URL Containing Configuration Files", "http://localhost/", false);
|
configMember.addConfigurationOption("base_config_url", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "URL Containing Configuration Files", "http://localhost/", false);
|
||||||
}
|
}
|
||||||
public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
|
public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
|
||||||
{
|
{
|
||||||
if (configuration_key == "base_config_url")
|
if (configuration_key == "base_config_url")
|
||||||
{
|
{
|
||||||
baseConfigURL = (string)configuration_result;
|
baseConfigURL = (string)configuration_result;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,133 +1,133 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
|
||||||
using OpenSim.Framework.Interfaces;
|
using OpenSim.Framework.Interfaces;
|
||||||
using OpenSim.Framework.Configuration.Interfaces;
|
using OpenSim.Framework.Configuration.Interfaces;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Configuration
|
namespace OpenSim.Framework.Configuration
|
||||||
{
|
{
|
||||||
public class XmlConfiguration : IGenericConfig
|
public class XmlConfiguration : IGenericConfig
|
||||||
{
|
{
|
||||||
private XmlDocument doc;
|
private XmlDocument doc;
|
||||||
private XmlNode rootNode;
|
private XmlNode rootNode;
|
||||||
private XmlNode configNode;
|
private XmlNode configNode;
|
||||||
private string fileName;
|
private string fileName;
|
||||||
private bool createdFile = false;
|
private bool createdFile = false;
|
||||||
|
|
||||||
public void SetFileName(string file)
|
public void SetFileName(string file)
|
||||||
{
|
{
|
||||||
fileName = file;
|
fileName = file;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadDataToClass()
|
private void LoadDataToClass()
|
||||||
{
|
{
|
||||||
rootNode = doc.FirstChild;
|
rootNode = doc.FirstChild;
|
||||||
if (rootNode.Name != "Root")
|
if (rootNode.Name != "Root")
|
||||||
throw new Exception("Error: Invalid .xml File. Missing <Root>");
|
throw new Exception("Error: Invalid .xml File. Missing <Root>");
|
||||||
|
|
||||||
configNode = rootNode.FirstChild;
|
configNode = rootNode.FirstChild;
|
||||||
if (configNode.Name != "Config")
|
if (configNode.Name != "Config")
|
||||||
throw new Exception("Error: Invalid .xml File. <Root> first child should be <Config>");
|
throw new Exception("Error: Invalid .xml File. <Root> first child should be <Config>");
|
||||||
}
|
}
|
||||||
public void LoadData()
|
public void LoadData()
|
||||||
{
|
{
|
||||||
doc = new XmlDocument();
|
doc = new XmlDocument();
|
||||||
if (File.Exists(fileName))
|
if (File.Exists(fileName))
|
||||||
{
|
{
|
||||||
XmlTextReader reader = new XmlTextReader(fileName);
|
XmlTextReader reader = new XmlTextReader(fileName);
|
||||||
reader.WhitespaceHandling = WhitespaceHandling.None;
|
reader.WhitespaceHandling = WhitespaceHandling.None;
|
||||||
doc.Load(reader);
|
doc.Load(reader);
|
||||||
reader.Close();
|
reader.Close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
createdFile = true;
|
createdFile = true;
|
||||||
rootNode = doc.CreateNode(XmlNodeType.Element, "Root", "");
|
rootNode = doc.CreateNode(XmlNodeType.Element, "Root", "");
|
||||||
doc.AppendChild(rootNode);
|
doc.AppendChild(rootNode);
|
||||||
configNode = doc.CreateNode(XmlNodeType.Element, "Config", "");
|
configNode = doc.CreateNode(XmlNodeType.Element, "Config", "");
|
||||||
rootNode.AppendChild(configNode);
|
rootNode.AppendChild(configNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadDataToClass();
|
LoadDataToClass();
|
||||||
|
|
||||||
if (createdFile)
|
if (createdFile)
|
||||||
{
|
{
|
||||||
this.Commit();
|
this.Commit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadDataFromString(string data)
|
public void LoadDataFromString(string data)
|
||||||
{
|
{
|
||||||
doc = new XmlDocument();
|
doc = new XmlDocument();
|
||||||
doc.LoadXml(data);
|
doc.LoadXml(data);
|
||||||
|
|
||||||
LoadDataToClass();
|
LoadDataToClass();
|
||||||
}
|
}
|
||||||
public string GetAttribute(string attributeName)
|
public string GetAttribute(string attributeName)
|
||||||
{
|
{
|
||||||
string result = null;
|
string result = null;
|
||||||
if (configNode.Attributes[attributeName] != null)
|
if (configNode.Attributes[attributeName] != null)
|
||||||
{
|
{
|
||||||
result = ((XmlAttribute)configNode.Attributes.GetNamedItem(attributeName)).Value;
|
result = ((XmlAttribute)configNode.Attributes.GetNamedItem(attributeName)).Value;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool SetAttribute(string attributeName, string attributeValue)
|
public bool SetAttribute(string attributeName, string attributeValue)
|
||||||
{
|
{
|
||||||
if (configNode.Attributes[attributeName] != null)
|
if (configNode.Attributes[attributeName] != null)
|
||||||
{
|
{
|
||||||
((XmlAttribute)configNode.Attributes.GetNamedItem(attributeName)).Value = attributeValue;
|
((XmlAttribute)configNode.Attributes.GetNamedItem(attributeName)).Value = attributeValue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
XmlAttribute attri;
|
XmlAttribute attri;
|
||||||
attri = doc.CreateAttribute(attributeName);
|
attri = doc.CreateAttribute(attributeName);
|
||||||
attri.Value = attributeValue;
|
attri.Value = attributeValue;
|
||||||
configNode.Attributes.Append(attri);
|
configNode.Attributes.Append(attri);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Commit()
|
public void Commit()
|
||||||
{
|
{
|
||||||
doc.Save(fileName);
|
doc.Save(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
configNode = null;
|
configNode = null;
|
||||||
rootNode = null;
|
rootNode = null;
|
||||||
doc = null;
|
doc = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,379 +1,379 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Configuration.Interfaces;
|
using OpenSim.Framework.Configuration.Interfaces;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Configuration
|
namespace OpenSim.Framework.Configuration
|
||||||
{
|
{
|
||||||
public class ConfigurationMember
|
public class ConfigurationMember
|
||||||
{
|
{
|
||||||
public delegate bool ConfigurationOptionResult(string configuration_key, object configuration_result);
|
public delegate bool ConfigurationOptionResult(string configuration_key, object configuration_result);
|
||||||
public delegate void ConfigurationOptionsLoad();
|
public delegate void ConfigurationOptionsLoad();
|
||||||
|
|
||||||
private List<ConfigurationOption> configurationOptions = new List<ConfigurationOption>();
|
private List<ConfigurationOption> configurationOptions = new List<ConfigurationOption>();
|
||||||
private string configurationFilename = "";
|
private string configurationFilename = "";
|
||||||
private string configurationDescription = "";
|
private string configurationDescription = "";
|
||||||
|
|
||||||
private ConfigurationOptionsLoad loadFunction;
|
private ConfigurationOptionsLoad loadFunction;
|
||||||
private ConfigurationOptionResult resultFunction;
|
private ConfigurationOptionResult resultFunction;
|
||||||
|
|
||||||
private IGenericConfig configurationPlugin = null;
|
private IGenericConfig configurationPlugin = null;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is the default configuration DLL loaded
|
/// This is the default configuration DLL loaded
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private string configurationPluginFilename = "OpenSim.Framework.Configuration.XML.dll";
|
private string configurationPluginFilename = "OpenSim.Framework.Configuration.XML.dll";
|
||||||
public ConfigurationMember(string configuration_filename, string configuration_description, ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function)
|
public ConfigurationMember(string configuration_filename, string configuration_description, ConfigurationOptionsLoad load_function, ConfigurationOptionResult result_function)
|
||||||
{
|
{
|
||||||
this.configurationFilename = configuration_filename;
|
this.configurationFilename = configuration_filename;
|
||||||
this.configurationDescription = configuration_description;
|
this.configurationDescription = configuration_description;
|
||||||
this.loadFunction = load_function;
|
this.loadFunction = load_function;
|
||||||
this.resultFunction = result_function;
|
this.resultFunction = result_function;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setConfigurationFilename(string filename)
|
public void setConfigurationFilename(string filename)
|
||||||
{
|
{
|
||||||
configurationFilename = filename;
|
configurationFilename = filename;
|
||||||
}
|
}
|
||||||
public void setConfigurationDescription(string desc)
|
public void setConfigurationDescription(string desc)
|
||||||
{
|
{
|
||||||
configurationDescription = desc;
|
configurationDescription = desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setConfigurationResultFunction(ConfigurationOptionResult result)
|
public void setConfigurationResultFunction(ConfigurationOptionResult result)
|
||||||
{
|
{
|
||||||
resultFunction = result;
|
resultFunction = result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void forceConfigurationPluginLibrary(string dll_filename)
|
public void forceConfigurationPluginLibrary(string dll_filename)
|
||||||
{
|
{
|
||||||
configurationPluginFilename = dll_filename;
|
configurationPluginFilename = dll_filename;
|
||||||
}
|
}
|
||||||
public void addConfigurationOption(string configuration_key, ConfigurationOption.ConfigurationTypes configuration_type, string configuration_question, string configuration_default, bool use_default_no_prompt)
|
public void addConfigurationOption(string configuration_key, ConfigurationOption.ConfigurationTypes configuration_type, string configuration_question, string configuration_default, bool use_default_no_prompt)
|
||||||
{
|
{
|
||||||
ConfigurationOption configOption = new ConfigurationOption();
|
ConfigurationOption configOption = new ConfigurationOption();
|
||||||
configOption.configurationKey = configuration_key;
|
configOption.configurationKey = configuration_key;
|
||||||
configOption.configurationQuestion = configuration_question;
|
configOption.configurationQuestion = configuration_question;
|
||||||
configOption.configurationDefault = configuration_default;
|
configOption.configurationDefault = configuration_default;
|
||||||
configOption.configurationType = configuration_type;
|
configOption.configurationType = configuration_type;
|
||||||
configOption.configurationUseDefaultNoPrompt = use_default_no_prompt;
|
configOption.configurationUseDefaultNoPrompt = use_default_no_prompt;
|
||||||
|
|
||||||
if (configuration_key != "" && configuration_question != "")
|
if (configuration_key != "" && configuration_question != "")
|
||||||
{
|
{
|
||||||
if (!configurationOptions.Contains(configOption))
|
if (!configurationOptions.Contains(configOption))
|
||||||
{
|
{
|
||||||
configurationOptions.Add(configOption);
|
configurationOptions.Add(configOption);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainLog.Instance.Notice("Required fields for adding a configuration option is invalid. Will not add this option (" + configuration_key + ")");
|
MainLog.Instance.Notice("Required fields for adding a configuration option is invalid. Will not add this option (" + configuration_key + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void performConfigurationRetrieve()
|
public void performConfigurationRetrieve()
|
||||||
{
|
{
|
||||||
configurationPlugin = this.LoadConfigDll(configurationPluginFilename);
|
configurationPlugin = this.LoadConfigDll(configurationPluginFilename);
|
||||||
configurationOptions.Clear();
|
configurationOptions.Clear();
|
||||||
if(loadFunction == null)
|
if(loadFunction == null)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("Load Function for '" + this.configurationDescription + "' is null. Refusing to run configuration.");
|
MainLog.Instance.Error("Load Function for '" + this.configurationDescription + "' is null. Refusing to run configuration.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(resultFunction == null)
|
if(resultFunction == null)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("Result Function for '" + this.configurationDescription + "' is null. Refusing to run configuration.");
|
MainLog.Instance.Error("Result Function for '" + this.configurationDescription + "' is null. Refusing to run configuration.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MainLog.Instance.Verbose("Calling Configuration Load Function...");
|
MainLog.Instance.Verbose("Calling Configuration Load Function...");
|
||||||
this.loadFunction();
|
this.loadFunction();
|
||||||
|
|
||||||
if(configurationOptions.Count <= 0)
|
if(configurationOptions.Count <= 0)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("No configuration options were specified for '" + this.configurationOptions + "'. Refusing to continue configuration.");
|
MainLog.Instance.Error("No configuration options were specified for '" + this.configurationOptions + "'. Refusing to continue configuration.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool useFile = true;
|
bool useFile = true;
|
||||||
if (configurationPlugin == null)
|
if (configurationPlugin == null)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("Configuration Plugin NOT LOADED!");
|
MainLog.Instance.Error("Configuration Plugin NOT LOADED!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (configurationFilename.Trim() != "")
|
if (configurationFilename.Trim() != "")
|
||||||
{
|
{
|
||||||
configurationPlugin.SetFileName(configurationFilename);
|
configurationPlugin.SetFileName(configurationFilename);
|
||||||
configurationPlugin.LoadData();
|
configurationPlugin.LoadData();
|
||||||
useFile = true;
|
useFile = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainLog.Instance.Notice("XML Configuration Filename is not valid; will not save to the file.");
|
MainLog.Instance.Notice("XML Configuration Filename is not valid; will not save to the file.");
|
||||||
useFile = false;
|
useFile = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (ConfigurationOption configOption in configurationOptions)
|
foreach (ConfigurationOption configOption in configurationOptions)
|
||||||
{
|
{
|
||||||
bool convertSuccess = false;
|
bool convertSuccess = false;
|
||||||
object return_result = null;
|
object return_result = null;
|
||||||
string errorMessage = "";
|
string errorMessage = "";
|
||||||
bool ignoreNextFromConfig = false;
|
bool ignoreNextFromConfig = false;
|
||||||
while (convertSuccess == false)
|
while (convertSuccess == false)
|
||||||
{
|
{
|
||||||
|
|
||||||
string console_result = "";
|
string console_result = "";
|
||||||
string attribute = null;
|
string attribute = null;
|
||||||
if (useFile)
|
if (useFile)
|
||||||
{
|
{
|
||||||
if (!ignoreNextFromConfig)
|
if (!ignoreNextFromConfig)
|
||||||
{
|
{
|
||||||
attribute = configurationPlugin.GetAttribute(configOption.configurationKey);
|
attribute = configurationPlugin.GetAttribute(configOption.configurationKey);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ignoreNextFromConfig = false;
|
ignoreNextFromConfig = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (attribute == null)
|
if (attribute == null)
|
||||||
{
|
{
|
||||||
if (configOption.configurationUseDefaultNoPrompt)
|
if (configOption.configurationUseDefaultNoPrompt)
|
||||||
{
|
{
|
||||||
console_result = configOption.configurationDefault;
|
console_result = configOption.configurationDefault;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
if (configurationDescription.Trim() != "")
|
if (configurationDescription.Trim() != "")
|
||||||
{
|
{
|
||||||
console_result = MainLog.Instance.CmdPrompt(configurationDescription + ": " + configOption.configurationQuestion, configOption.configurationDefault);
|
console_result = MainLog.Instance.CmdPrompt(configurationDescription + ": " + configOption.configurationQuestion, configOption.configurationDefault);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
console_result = MainLog.Instance.CmdPrompt(configOption.configurationQuestion, configOption.configurationDefault);
|
console_result = MainLog.Instance.CmdPrompt(configOption.configurationQuestion, configOption.configurationDefault);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
console_result = attribute;
|
console_result = attribute;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (configOption.configurationType)
|
switch (configOption.configurationType)
|
||||||
{
|
{
|
||||||
case ConfigurationOption.ConfigurationTypes.TYPE_STRING:
|
case ConfigurationOption.ConfigurationTypes.TYPE_STRING:
|
||||||
return_result = console_result;
|
return_result = console_result;
|
||||||
convertSuccess = true;
|
convertSuccess = true;
|
||||||
break;
|
break;
|
||||||
case ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY:
|
case ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY:
|
||||||
if (console_result.Length > 0)
|
if (console_result.Length > 0)
|
||||||
{
|
{
|
||||||
return_result = console_result;
|
return_result = console_result;
|
||||||
convertSuccess = true;
|
convertSuccess = true;
|
||||||
}
|
}
|
||||||
errorMessage = "a string that is not empty";
|
errorMessage = "a string that is not empty";
|
||||||
break;
|
break;
|
||||||
case ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN:
|
case ConfigurationOption.ConfigurationTypes.TYPE_BOOLEAN:
|
||||||
bool boolResult;
|
bool boolResult;
|
||||||
if (Boolean.TryParse(console_result, out boolResult))
|
if (Boolean.TryParse(console_result, out boolResult))
|
||||||
{
|
{
|
||||||
convertSuccess = true;
|
convertSuccess = true;
|
||||||
return_result = boolResult;
|
return_result = boolResult;
|
||||||
}
|
}
|
||||||
errorMessage = "'true' or 'false' (Boolean)";
|
errorMessage = "'true' or 'false' (Boolean)";
|
||||||
break;
|
break;
|
||||||
case ConfigurationOption.ConfigurationTypes.TYPE_BYTE:
|
case ConfigurationOption.ConfigurationTypes.TYPE_BYTE:
|
||||||
byte byteResult;
|
byte byteResult;
|
||||||
if (Byte.TryParse(console_result, out byteResult))
|
if (Byte.TryParse(console_result, out byteResult))
|
||||||
{
|
{
|
||||||
convertSuccess = true;
|
convertSuccess = true;
|
||||||
return_result = byteResult;
|
return_result = byteResult;
|
||||||
}
|
}
|
||||||
errorMessage = "a byte (Byte)";
|
errorMessage = "a byte (Byte)";
|
||||||
break;
|
break;
|
||||||
case ConfigurationOption.ConfigurationTypes.TYPE_CHARACTER:
|
case ConfigurationOption.ConfigurationTypes.TYPE_CHARACTER:
|
||||||
char charResult;
|
char charResult;
|
||||||
if (Char.TryParse(console_result, out charResult))
|
if (Char.TryParse(console_result, out charResult))
|
||||||
{
|
{
|
||||||
convertSuccess = true;
|
convertSuccess = true;
|
||||||
return_result = charResult;
|
return_result = charResult;
|
||||||
}
|
}
|
||||||
errorMessage = "a character (Char)";
|
errorMessage = "a character (Char)";
|
||||||
break;
|
break;
|
||||||
case ConfigurationOption.ConfigurationTypes.TYPE_INT16:
|
case ConfigurationOption.ConfigurationTypes.TYPE_INT16:
|
||||||
short shortResult;
|
short shortResult;
|
||||||
if (Int16.TryParse(console_result, out shortResult))
|
if (Int16.TryParse(console_result, out shortResult))
|
||||||
{
|
{
|
||||||
convertSuccess = true;
|
convertSuccess = true;
|
||||||
return_result = shortResult;
|
return_result = shortResult;
|
||||||
}
|
}
|
||||||
errorMessage = "a signed 32 bit integer (short)";
|
errorMessage = "a signed 32 bit integer (short)";
|
||||||
break;
|
break;
|
||||||
case ConfigurationOption.ConfigurationTypes.TYPE_INT32:
|
case ConfigurationOption.ConfigurationTypes.TYPE_INT32:
|
||||||
int intResult;
|
int intResult;
|
||||||
if (Int32.TryParse(console_result, out intResult))
|
if (Int32.TryParse(console_result, out intResult))
|
||||||
{
|
{
|
||||||
convertSuccess = true;
|
convertSuccess = true;
|
||||||
return_result = intResult;
|
return_result = intResult;
|
||||||
|
|
||||||
}
|
}
|
||||||
errorMessage = "a signed 32 bit integer (int)";
|
errorMessage = "a signed 32 bit integer (int)";
|
||||||
break;
|
break;
|
||||||
case ConfigurationOption.ConfigurationTypes.TYPE_INT64:
|
case ConfigurationOption.ConfigurationTypes.TYPE_INT64:
|
||||||
long longResult;
|
long longResult;
|
||||||
if (Int64.TryParse(console_result, out longResult))
|
if (Int64.TryParse(console_result, out longResult))
|
||||||
{
|
{
|
||||||
convertSuccess = true;
|
convertSuccess = true;
|
||||||
return_result = longResult;
|
return_result = longResult;
|
||||||
}
|
}
|
||||||
errorMessage = "a signed 32 bit integer (long)";
|
errorMessage = "a signed 32 bit integer (long)";
|
||||||
break;
|
break;
|
||||||
case ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS:
|
case ConfigurationOption.ConfigurationTypes.TYPE_IP_ADDRESS:
|
||||||
IPAddress ipAddressResult;
|
IPAddress ipAddressResult;
|
||||||
if (IPAddress.TryParse(console_result, out ipAddressResult))
|
if (IPAddress.TryParse(console_result, out ipAddressResult))
|
||||||
{
|
{
|
||||||
convertSuccess = true;
|
convertSuccess = true;
|
||||||
return_result = ipAddressResult;
|
return_result = ipAddressResult;
|
||||||
}
|
}
|
||||||
errorMessage = "an IP Address (IPAddress)";
|
errorMessage = "an IP Address (IPAddress)";
|
||||||
break;
|
break;
|
||||||
case ConfigurationOption.ConfigurationTypes.TYPE_LLUUID:
|
case ConfigurationOption.ConfigurationTypes.TYPE_LLUUID:
|
||||||
LLUUID uuidResult;
|
LLUUID uuidResult;
|
||||||
if (LLUUID.TryParse(console_result, out uuidResult))
|
if (LLUUID.TryParse(console_result, out uuidResult))
|
||||||
{
|
{
|
||||||
convertSuccess = true;
|
convertSuccess = true;
|
||||||
return_result = uuidResult;
|
return_result = uuidResult;
|
||||||
}
|
}
|
||||||
errorMessage = "a UUID (LLUUID)";
|
errorMessage = "a UUID (LLUUID)";
|
||||||
break;
|
break;
|
||||||
case ConfigurationOption.ConfigurationTypes.TYPE_LLVECTOR3:
|
case ConfigurationOption.ConfigurationTypes.TYPE_LLVECTOR3:
|
||||||
LLVector3 vectorResult;
|
LLVector3 vectorResult;
|
||||||
if (LLVector3.TryParse(console_result, out vectorResult))
|
if (LLVector3.TryParse(console_result, out vectorResult))
|
||||||
{
|
{
|
||||||
convertSuccess = true;
|
convertSuccess = true;
|
||||||
return_result = vectorResult;
|
return_result = vectorResult;
|
||||||
}
|
}
|
||||||
errorMessage = "a vector (LLVector3)";
|
errorMessage = "a vector (LLVector3)";
|
||||||
break;
|
break;
|
||||||
case ConfigurationOption.ConfigurationTypes.TYPE_UINT16:
|
case ConfigurationOption.ConfigurationTypes.TYPE_UINT16:
|
||||||
ushort ushortResult;
|
ushort ushortResult;
|
||||||
if (UInt16.TryParse(console_result, out ushortResult))
|
if (UInt16.TryParse(console_result, out ushortResult))
|
||||||
{
|
{
|
||||||
convertSuccess = true;
|
convertSuccess = true;
|
||||||
return_result = ushortResult;
|
return_result = ushortResult;
|
||||||
}
|
}
|
||||||
errorMessage = "an unsigned 16 bit integer (ushort)";
|
errorMessage = "an unsigned 16 bit integer (ushort)";
|
||||||
break;
|
break;
|
||||||
case ConfigurationOption.ConfigurationTypes.TYPE_UINT32:
|
case ConfigurationOption.ConfigurationTypes.TYPE_UINT32:
|
||||||
uint uintResult;
|
uint uintResult;
|
||||||
if (UInt32.TryParse(console_result, out uintResult))
|
if (UInt32.TryParse(console_result, out uintResult))
|
||||||
{
|
{
|
||||||
convertSuccess = true;
|
convertSuccess = true;
|
||||||
return_result = uintResult;
|
return_result = uintResult;
|
||||||
|
|
||||||
}
|
}
|
||||||
errorMessage = "an unsigned 32 bit integer (uint)";
|
errorMessage = "an unsigned 32 bit integer (uint)";
|
||||||
break;
|
break;
|
||||||
case ConfigurationOption.ConfigurationTypes.TYPE_UINT64:
|
case ConfigurationOption.ConfigurationTypes.TYPE_UINT64:
|
||||||
ulong ulongResult;
|
ulong ulongResult;
|
||||||
if (UInt64.TryParse(console_result, out ulongResult))
|
if (UInt64.TryParse(console_result, out ulongResult))
|
||||||
{
|
{
|
||||||
convertSuccess = true;
|
convertSuccess = true;
|
||||||
return_result = ulongResult;
|
return_result = ulongResult;
|
||||||
}
|
}
|
||||||
errorMessage = "an unsigned 64 bit integer (ulong)";
|
errorMessage = "an unsigned 64 bit integer (ulong)";
|
||||||
break;
|
break;
|
||||||
case ConfigurationOption.ConfigurationTypes.TYPE_FLOAT:
|
case ConfigurationOption.ConfigurationTypes.TYPE_FLOAT:
|
||||||
float floatResult;
|
float floatResult;
|
||||||
if (float.TryParse(console_result, out floatResult))
|
if (float.TryParse(console_result, out floatResult))
|
||||||
{
|
{
|
||||||
convertSuccess = true;
|
convertSuccess = true;
|
||||||
return_result = floatResult;
|
return_result = floatResult;
|
||||||
}
|
}
|
||||||
errorMessage = "a single-precision floating point number (float)";
|
errorMessage = "a single-precision floating point number (float)";
|
||||||
break;
|
break;
|
||||||
case ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE:
|
case ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE:
|
||||||
double doubleResult;
|
double doubleResult;
|
||||||
if (Double.TryParse(console_result, out doubleResult))
|
if (Double.TryParse(console_result, out doubleResult))
|
||||||
{
|
{
|
||||||
convertSuccess = true;
|
convertSuccess = true;
|
||||||
return_result = doubleResult;
|
return_result = doubleResult;
|
||||||
}
|
}
|
||||||
errorMessage = "an double-precision floating point number (double)";
|
errorMessage = "an double-precision floating point number (double)";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (convertSuccess)
|
if (convertSuccess)
|
||||||
{
|
{
|
||||||
if (useFile)
|
if (useFile)
|
||||||
{
|
{
|
||||||
configurationPlugin.SetAttribute(configOption.configurationKey, console_result);
|
configurationPlugin.SetAttribute(configOption.configurationKey, console_result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!this.resultFunction(configOption.configurationKey, return_result))
|
if (!this.resultFunction(configOption.configurationKey, return_result))
|
||||||
{
|
{
|
||||||
Console.MainLog.Instance.Notice("The handler for the last configuration option denied that input, please try again.");
|
Console.MainLog.Instance.Notice("The handler for the last configuration option denied that input, please try again.");
|
||||||
convertSuccess = false;
|
convertSuccess = false;
|
||||||
ignoreNextFromConfig = true;
|
ignoreNextFromConfig = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (configOption.configurationUseDefaultNoPrompt)
|
if (configOption.configurationUseDefaultNoPrompt)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Error("Default given for '" + configOption.configurationKey + "' is not valid; the configuration result must be " + errorMessage + ". Will skip this option...");
|
MainLog.Instance.Error("Default given for '" + configOption.configurationKey + "' is not valid; the configuration result must be " + errorMessage + ". Will skip this option...");
|
||||||
convertSuccess = true;
|
convertSuccess = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MainLog.Instance.Warn("configuration","Incorrect result given, the configuration option must be " + errorMessage + ". Prompting for same option...");
|
MainLog.Instance.Warn("configuration","Incorrect result given, the configuration option must be " + errorMessage + ". Prompting for same option...");
|
||||||
ignoreNextFromConfig = true;
|
ignoreNextFromConfig = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(useFile)
|
if(useFile)
|
||||||
{
|
{
|
||||||
configurationPlugin.Commit();
|
configurationPlugin.Commit();
|
||||||
configurationPlugin.Close();
|
configurationPlugin.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private IGenericConfig LoadConfigDll(string dllName)
|
private IGenericConfig LoadConfigDll(string dllName)
|
||||||
{
|
{
|
||||||
Assembly pluginAssembly = Assembly.LoadFrom(dllName);
|
Assembly pluginAssembly = Assembly.LoadFrom(dllName);
|
||||||
IGenericConfig plug = null;
|
IGenericConfig plug = null;
|
||||||
|
|
||||||
foreach (Type pluginType in pluginAssembly.GetTypes())
|
foreach (Type pluginType in pluginAssembly.GetTypes())
|
||||||
{
|
{
|
||||||
if (pluginType.IsPublic)
|
if (pluginType.IsPublic)
|
||||||
{
|
{
|
||||||
if (!pluginType.IsAbstract)
|
if (!pluginType.IsAbstract)
|
||||||
{
|
{
|
||||||
Type typeInterface = pluginType.GetInterface("IGenericConfig", true);
|
Type typeInterface = pluginType.GetInterface("IGenericConfig", true);
|
||||||
|
|
||||||
if (typeInterface != null)
|
if (typeInterface != null)
|
||||||
{
|
{
|
||||||
plug = (IGenericConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
plug = (IGenericConfig)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pluginAssembly = null;
|
pluginAssembly = null;
|
||||||
return plug;
|
return plug;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,36 +1,36 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Configuration
|
namespace OpenSim.Framework.Configuration
|
||||||
{
|
{
|
||||||
public class ConfigurationOption
|
public class ConfigurationOption
|
||||||
{
|
{
|
||||||
public enum ConfigurationTypes
|
public enum ConfigurationTypes
|
||||||
{
|
{
|
||||||
TYPE_STRING,
|
TYPE_STRING,
|
||||||
TYPE_STRING_NOT_EMPTY,
|
TYPE_STRING_NOT_EMPTY,
|
||||||
TYPE_UINT16,
|
TYPE_UINT16,
|
||||||
TYPE_UINT32,
|
TYPE_UINT32,
|
||||||
TYPE_UINT64,
|
TYPE_UINT64,
|
||||||
TYPE_INT16,
|
TYPE_INT16,
|
||||||
TYPE_INT32,
|
TYPE_INT32,
|
||||||
TYPE_INT64,
|
TYPE_INT64,
|
||||||
TYPE_IP_ADDRESS,
|
TYPE_IP_ADDRESS,
|
||||||
TYPE_CHARACTER,
|
TYPE_CHARACTER,
|
||||||
TYPE_BOOLEAN,
|
TYPE_BOOLEAN,
|
||||||
TYPE_BYTE,
|
TYPE_BYTE,
|
||||||
TYPE_LLUUID,
|
TYPE_LLUUID,
|
||||||
TYPE_LLVECTOR3,
|
TYPE_LLVECTOR3,
|
||||||
TYPE_FLOAT,
|
TYPE_FLOAT,
|
||||||
TYPE_DOUBLE
|
TYPE_DOUBLE
|
||||||
};
|
};
|
||||||
|
|
||||||
public string configurationKey = "";
|
public string configurationKey = "";
|
||||||
public string configurationQuestion = "";
|
public string configurationQuestion = "";
|
||||||
public string configurationDefault = "";
|
public string configurationDefault = "";
|
||||||
|
|
||||||
public ConfigurationTypes configurationType = ConfigurationTypes.TYPE_STRING;
|
public ConfigurationTypes configurationType = ConfigurationTypes.TYPE_STRING;
|
||||||
public bool configurationUseDefaultNoPrompt = false;
|
public bool configurationUseDefaultNoPrompt = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,85 +1,85 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Configuration
|
namespace OpenSim.Framework.Configuration
|
||||||
{
|
{
|
||||||
public class GridConfig
|
public class GridConfig
|
||||||
{
|
{
|
||||||
public string GridOwner = "";
|
public string GridOwner = "";
|
||||||
public string DefaultAssetServer = "";
|
public string DefaultAssetServer = "";
|
||||||
public string AssetSendKey = "";
|
public string AssetSendKey = "";
|
||||||
public string AssetRecvKey = "";
|
public string AssetRecvKey = "";
|
||||||
|
|
||||||
public string DefaultUserServer = "";
|
public string DefaultUserServer = "";
|
||||||
public string UserSendKey = "";
|
public string UserSendKey = "";
|
||||||
public string UserRecvKey = "";
|
public string UserRecvKey = "";
|
||||||
|
|
||||||
public string SimSendKey = "";
|
public string SimSendKey = "";
|
||||||
public string SimRecvKey = "";
|
public string SimRecvKey = "";
|
||||||
|
|
||||||
public string DatabaseProvider = "";
|
public string DatabaseProvider = "";
|
||||||
|
|
||||||
private ConfigurationMember configMember;
|
private ConfigurationMember configMember;
|
||||||
public GridConfig(string description, string filename)
|
public GridConfig(string description, string filename)
|
||||||
{
|
{
|
||||||
configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration);
|
configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration);
|
||||||
configMember.performConfigurationRetrieve();
|
configMember.performConfigurationRetrieve();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadConfigurationOptions()
|
public void loadConfigurationOptions()
|
||||||
{
|
{
|
||||||
configMember.addConfigurationOption("grid_owner", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "OGS Grid Owner", "OGS development team", false);
|
configMember.addConfigurationOption("grid_owner", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "OGS Grid Owner", "OGS development team", false);
|
||||||
configMember.addConfigurationOption("default_asset_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Asset Server URI", "http://127.0.0.1:8003/", false);
|
configMember.addConfigurationOption("default_asset_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Asset Server URI", "http://127.0.0.1:8003/", false);
|
||||||
configMember.addConfigurationOption("asset_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to asset server", "null", false);
|
configMember.addConfigurationOption("asset_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to asset server", "null", false);
|
||||||
configMember.addConfigurationOption("asset_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from asset server", "null", false);
|
configMember.addConfigurationOption("asset_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from asset server", "null", false);
|
||||||
|
|
||||||
configMember.addConfigurationOption("default_user_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default User Server URI", "http://127.0.0.1:8002/", false);
|
configMember.addConfigurationOption("default_user_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default User Server URI", "http://127.0.0.1:8002/", false);
|
||||||
configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to user server", "null", false);
|
configMember.addConfigurationOption("user_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to user server", "null", false);
|
||||||
configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from user server", "null", false);
|
configMember.addConfigurationOption("user_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from user server", "null", false);
|
||||||
|
|
||||||
configMember.addConfigurationOption("sim_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to a simulator", "null", false);
|
configMember.addConfigurationOption("sim_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to a simulator", "null", false);
|
||||||
configMember.addConfigurationOption("sim_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from a simulator", "null", false);
|
configMember.addConfigurationOption("sim_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from a simulator", "null", false);
|
||||||
configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false);
|
configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
|
public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
|
||||||
{
|
{
|
||||||
switch (configuration_key)
|
switch (configuration_key)
|
||||||
{
|
{
|
||||||
case "grid_owner":
|
case "grid_owner":
|
||||||
this.GridOwner = (string)configuration_result;
|
this.GridOwner = (string)configuration_result;
|
||||||
break;
|
break;
|
||||||
case "default_asset_server":
|
case "default_asset_server":
|
||||||
this.DefaultAssetServer = (string)configuration_result;
|
this.DefaultAssetServer = (string)configuration_result;
|
||||||
break;
|
break;
|
||||||
case "asset_send_key":
|
case "asset_send_key":
|
||||||
this.AssetSendKey = (string)configuration_result;
|
this.AssetSendKey = (string)configuration_result;
|
||||||
break;
|
break;
|
||||||
case "asset_recv_key":
|
case "asset_recv_key":
|
||||||
this.AssetRecvKey = (string)configuration_result;
|
this.AssetRecvKey = (string)configuration_result;
|
||||||
break;
|
break;
|
||||||
case "default_user_server":
|
case "default_user_server":
|
||||||
this.DefaultUserServer = (string)configuration_result;
|
this.DefaultUserServer = (string)configuration_result;
|
||||||
break;
|
break;
|
||||||
case "user_send_key":
|
case "user_send_key":
|
||||||
this.UserSendKey = (string)configuration_result;
|
this.UserSendKey = (string)configuration_result;
|
||||||
break;
|
break;
|
||||||
case "user_recv_key":
|
case "user_recv_key":
|
||||||
this.UserRecvKey = (string)configuration_result;
|
this.UserRecvKey = (string)configuration_result;
|
||||||
break;
|
break;
|
||||||
case "sim_send_key":
|
case "sim_send_key":
|
||||||
this.SimSendKey = (string)configuration_result;
|
this.SimSendKey = (string)configuration_result;
|
||||||
break;
|
break;
|
||||||
case "sim_recv_key":
|
case "sim_recv_key":
|
||||||
this.SimRecvKey = (string)configuration_result;
|
this.SimRecvKey = (string)configuration_result;
|
||||||
break;
|
break;
|
||||||
case "database_provider":
|
case "database_provider":
|
||||||
this.DatabaseProvider = (string)configuration_result;
|
this.DatabaseProvider = (string)configuration_result;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,40 +1,40 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
namespace OpenSim.Framework.Configuration.Interfaces
|
namespace OpenSim.Framework.Configuration.Interfaces
|
||||||
{
|
{
|
||||||
public interface IGenericConfig
|
public interface IGenericConfig
|
||||||
{
|
{
|
||||||
void SetFileName(string fileName);
|
void SetFileName(string fileName);
|
||||||
void LoadData();
|
void LoadData();
|
||||||
void LoadDataFromString(string data);
|
void LoadDataFromString(string data);
|
||||||
string GetAttribute(string attributeName);
|
string GetAttribute(string attributeName);
|
||||||
bool SetAttribute(string attributeName, string attributeValue);
|
bool SetAttribute(string attributeName, string attributeValue);
|
||||||
void Commit();
|
void Commit();
|
||||||
void Close();
|
void Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,62 +1,62 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Configuration
|
namespace OpenSim.Framework.Configuration
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// UserConfig -- For User Server Configuration
|
/// UserConfig -- For User Server Configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class UserConfig
|
public class UserConfig
|
||||||
{
|
{
|
||||||
public string DefaultStartupMsg = "";
|
public string DefaultStartupMsg = "";
|
||||||
public string GridServerURL = "";
|
public string GridServerURL = "";
|
||||||
public string GridSendKey = "";
|
public string GridSendKey = "";
|
||||||
public string GridRecvKey = "";
|
public string GridRecvKey = "";
|
||||||
|
|
||||||
public string DatabaseProvider = "";
|
public string DatabaseProvider = "";
|
||||||
|
|
||||||
private ConfigurationMember configMember;
|
private ConfigurationMember configMember;
|
||||||
|
|
||||||
public UserConfig(string description, string filename)
|
public UserConfig(string description, string filename)
|
||||||
{
|
{
|
||||||
configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration);
|
configMember = new ConfigurationMember(filename, description, this.loadConfigurationOptions, this.handleIncomingConfiguration);
|
||||||
configMember.performConfigurationRetrieve();
|
configMember.performConfigurationRetrieve();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadConfigurationOptions()
|
public void loadConfigurationOptions()
|
||||||
{
|
{
|
||||||
configMember.addConfigurationOption("default_startup_message", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Startup Message", "Welcome to OGS",false);
|
configMember.addConfigurationOption("default_startup_message", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Startup Message", "Welcome to OGS",false);
|
||||||
|
|
||||||
configMember.addConfigurationOption("default_grid_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Grid Server URI", "http://127.0.0.1:8001/", false);
|
configMember.addConfigurationOption("default_grid_server", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, "Default Grid Server URI", "http://127.0.0.1:8001/", false);
|
||||||
configMember.addConfigurationOption("grid_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to grid server", "null", false);
|
configMember.addConfigurationOption("grid_send_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to send to grid server", "null", false);
|
||||||
configMember.addConfigurationOption("grid_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from grid server", "null", false);
|
configMember.addConfigurationOption("grid_recv_key", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "Key to expect from grid server", "null", false);
|
||||||
configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false);
|
configMember.addConfigurationOption("database_provider", ConfigurationOption.ConfigurationTypes.TYPE_STRING, "DLL for database provider", "OpenSim.Framework.Data.MySQL.dll", false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
|
public bool handleIncomingConfiguration(string configuration_key, object configuration_result)
|
||||||
{
|
{
|
||||||
switch (configuration_key)
|
switch (configuration_key)
|
||||||
{
|
{
|
||||||
case "default_startup_message":
|
case "default_startup_message":
|
||||||
this.DefaultStartupMsg = (string)configuration_result;
|
this.DefaultStartupMsg = (string)configuration_result;
|
||||||
break;
|
break;
|
||||||
case "default_grid_server":
|
case "default_grid_server":
|
||||||
this.GridServerURL = (string)configuration_result;
|
this.GridServerURL = (string)configuration_result;
|
||||||
break;
|
break;
|
||||||
case "grid_send_key":
|
case "grid_send_key":
|
||||||
this.GridSendKey = (string)configuration_result;
|
this.GridSendKey = (string)configuration_result;
|
||||||
break;
|
break;
|
||||||
case "grid_recv_key":
|
case "grid_recv_key":
|
||||||
this.GridRecvKey = (string)configuration_result;
|
this.GridRecvKey = (string)configuration_result;
|
||||||
break;
|
break;
|
||||||
case "database_provider":
|
case "database_provider":
|
||||||
this.DatabaseProvider = (string)configuration_result;
|
this.DatabaseProvider = (string)configuration_result;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,120 +1,120 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
|
||||||
namespace OpenSim.Framework.Types
|
namespace OpenSim.Framework.Types
|
||||||
{
|
{
|
||||||
|
|
||||||
public class LandData
|
public class LandData
|
||||||
{
|
{
|
||||||
public byte[] landBitmapByteArray = new byte[512];
|
public byte[] landBitmapByteArray = new byte[512];
|
||||||
public string landName = "Your Parcel";
|
public string landName = "Your Parcel";
|
||||||
public string landDesc = "";
|
public string landDesc = "";
|
||||||
public LLUUID ownerID = new LLUUID();
|
public LLUUID ownerID = new LLUUID();
|
||||||
public bool isGroupOwned = false;
|
public bool isGroupOwned = false;
|
||||||
public LLVector3 AABBMin = new LLVector3();
|
public LLVector3 AABBMin = new LLVector3();
|
||||||
public LLVector3 AABBMax = new LLVector3();
|
public LLVector3 AABBMax = new LLVector3();
|
||||||
public int area = 0;
|
public int area = 0;
|
||||||
public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned
|
public uint auctionID = 0; //Unemplemented. If set to 0, not being auctioned
|
||||||
public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID
|
public LLUUID authBuyerID = new LLUUID(); //Unemplemented. Authorized Buyer's UUID
|
||||||
public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category
|
public Parcel.ParcelCategory category = new Parcel.ParcelCategory(); //Unemplemented. Parcel's chosen category
|
||||||
public int claimDate = 0; //Unemplemented
|
public int claimDate = 0; //Unemplemented
|
||||||
public int claimPrice = 0; //Unemplemented
|
public int claimPrice = 0; //Unemplemented
|
||||||
public LLUUID groupID = new LLUUID(); //Unemplemented
|
public LLUUID groupID = new LLUUID(); //Unemplemented
|
||||||
public int groupPrims = 0;
|
public int groupPrims = 0;
|
||||||
public int otherPrims = 0;
|
public int otherPrims = 0;
|
||||||
public int ownerPrims = 0;
|
public int ownerPrims = 0;
|
||||||
public int selectedPrims = 0;
|
public int selectedPrims = 0;
|
||||||
public int simwidePrims = 0;
|
public int simwidePrims = 0;
|
||||||
public int simwideArea = 0;
|
public int simwideArea = 0;
|
||||||
public int salePrice = 0; //Unemeplemented. Parcels price.
|
public int salePrice = 0; //Unemeplemented. Parcels price.
|
||||||
public Parcel.ParcelStatus landStatus = Parcel.ParcelStatus.Leased;
|
public Parcel.ParcelStatus landStatus = Parcel.ParcelStatus.Leased;
|
||||||
public uint landFlags = (uint)Parcel.ParcelFlags.AllowFly | (uint)Parcel.ParcelFlags.AllowLandmark | (uint)Parcel.ParcelFlags.AllowAllObjectEntry | (uint)Parcel.ParcelFlags.AllowDeedToGroup | (uint)Parcel.ParcelFlags.AllowTerraform | (uint)Parcel.ParcelFlags.CreateObjects | (uint)Parcel.ParcelFlags.AllowOtherScripts;
|
public uint landFlags = (uint)Parcel.ParcelFlags.AllowFly | (uint)Parcel.ParcelFlags.AllowLandmark | (uint)Parcel.ParcelFlags.AllowAllObjectEntry | (uint)Parcel.ParcelFlags.AllowDeedToGroup | (uint)Parcel.ParcelFlags.AllowTerraform | (uint)Parcel.ParcelFlags.CreateObjects | (uint)Parcel.ParcelFlags.AllowOtherScripts;
|
||||||
public byte landingType = 0;
|
public byte landingType = 0;
|
||||||
public byte mediaAutoScale = 0;
|
public byte mediaAutoScale = 0;
|
||||||
public LLUUID mediaID = LLUUID.Zero;
|
public LLUUID mediaID = LLUUID.Zero;
|
||||||
public int localID = 0;
|
public int localID = 0;
|
||||||
public LLUUID globalID = new LLUUID();
|
public LLUUID globalID = new LLUUID();
|
||||||
|
|
||||||
public string mediaURL = "";
|
public string mediaURL = "";
|
||||||
public string musicURL = "";
|
public string musicURL = "";
|
||||||
public float passHours = 0;
|
public float passHours = 0;
|
||||||
public int passPrice = 0;
|
public int passPrice = 0;
|
||||||
public LLUUID snapshotID = LLUUID.Zero;
|
public LLUUID snapshotID = LLUUID.Zero;
|
||||||
public LLVector3 userLocation = new LLVector3();
|
public LLVector3 userLocation = new LLVector3();
|
||||||
public LLVector3 userLookAt = new LLVector3();
|
public LLVector3 userLookAt = new LLVector3();
|
||||||
|
|
||||||
public LandData()
|
public LandData()
|
||||||
{
|
{
|
||||||
globalID = LLUUID.Random();
|
globalID = LLUUID.Random();
|
||||||
}
|
}
|
||||||
|
|
||||||
public LandData Copy()
|
public LandData Copy()
|
||||||
{
|
{
|
||||||
LandData landData = new LandData();
|
LandData landData = new LandData();
|
||||||
|
|
||||||
landData.AABBMax = this.AABBMax;
|
landData.AABBMax = this.AABBMax;
|
||||||
landData.AABBMin = this.AABBMin;
|
landData.AABBMin = this.AABBMin;
|
||||||
landData.area = this.area;
|
landData.area = this.area;
|
||||||
landData.auctionID = this.auctionID;
|
landData.auctionID = this.auctionID;
|
||||||
landData.authBuyerID = this.authBuyerID;
|
landData.authBuyerID = this.authBuyerID;
|
||||||
landData.category = this.category;
|
landData.category = this.category;
|
||||||
landData.claimDate = this.claimDate;
|
landData.claimDate = this.claimDate;
|
||||||
landData.claimPrice = this.claimPrice;
|
landData.claimPrice = this.claimPrice;
|
||||||
landData.globalID = this.globalID;
|
landData.globalID = this.globalID;
|
||||||
landData.groupID = this.groupID;
|
landData.groupID = this.groupID;
|
||||||
landData.groupPrims = this.groupPrims;
|
landData.groupPrims = this.groupPrims;
|
||||||
landData.otherPrims = this.otherPrims;
|
landData.otherPrims = this.otherPrims;
|
||||||
landData.ownerPrims = this.ownerPrims;
|
landData.ownerPrims = this.ownerPrims;
|
||||||
landData.selectedPrims = this.selectedPrims;
|
landData.selectedPrims = this.selectedPrims;
|
||||||
landData.isGroupOwned = this.isGroupOwned;
|
landData.isGroupOwned = this.isGroupOwned;
|
||||||
landData.localID = this.localID;
|
landData.localID = this.localID;
|
||||||
landData.landingType = this.landingType;
|
landData.landingType = this.landingType;
|
||||||
landData.mediaAutoScale = this.mediaAutoScale;
|
landData.mediaAutoScale = this.mediaAutoScale;
|
||||||
landData.mediaID = this.mediaID;
|
landData.mediaID = this.mediaID;
|
||||||
landData.mediaURL = this.mediaURL;
|
landData.mediaURL = this.mediaURL;
|
||||||
landData.musicURL = this.musicURL;
|
landData.musicURL = this.musicURL;
|
||||||
landData.ownerID = this.ownerID;
|
landData.ownerID = this.ownerID;
|
||||||
landData.landBitmapByteArray = (byte[])this.landBitmapByteArray.Clone();
|
landData.landBitmapByteArray = (byte[])this.landBitmapByteArray.Clone();
|
||||||
landData.landDesc = this.landDesc;
|
landData.landDesc = this.landDesc;
|
||||||
landData.landFlags = this.landFlags;
|
landData.landFlags = this.landFlags;
|
||||||
landData.landName = this.landName;
|
landData.landName = this.landName;
|
||||||
landData.landStatus = this.landStatus;
|
landData.landStatus = this.landStatus;
|
||||||
landData.passHours = this.passHours;
|
landData.passHours = this.passHours;
|
||||||
landData.passPrice = this.passPrice;
|
landData.passPrice = this.passPrice;
|
||||||
landData.salePrice = this.salePrice;
|
landData.salePrice = this.salePrice;
|
||||||
landData.snapshotID = this.snapshotID;
|
landData.snapshotID = this.snapshotID;
|
||||||
landData.userLocation = this.userLocation;
|
landData.userLocation = this.userLocation;
|
||||||
landData.userLookAt = this.userLookAt;
|
landData.userLookAt = this.userLookAt;
|
||||||
|
|
||||||
return landData;
|
return landData;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,136 +1,136 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using OpenSim.Framework.Interfaces;
|
using OpenSim.Framework.Interfaces;
|
||||||
using OpenSim.Framework.Data;
|
using OpenSim.Framework.Data;
|
||||||
|
|
||||||
namespace OpenSim.Framework.InventoryServiceBase
|
namespace OpenSim.Framework.InventoryServiceBase
|
||||||
{
|
{
|
||||||
public class InventoryServiceBase
|
public class InventoryServiceBase
|
||||||
{
|
{
|
||||||
protected Dictionary<string, IInventoryData> m_plugins = new Dictionary<string, IInventoryData>();
|
protected Dictionary<string, IInventoryData> m_plugins = new Dictionary<string, IInventoryData>();
|
||||||
protected IAssetServer m_assetServer;
|
protected IAssetServer m_assetServer;
|
||||||
|
|
||||||
public InventoryServiceBase(IAssetServer assetServer)
|
public InventoryServiceBase(IAssetServer assetServer)
|
||||||
{
|
{
|
||||||
m_assetServer = assetServer;
|
m_assetServer = assetServer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds a new user server plugin - plugins will be requested in the order they were loaded.
|
/// Adds a new user server plugin - plugins will be requested in the order they were loaded.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="FileName">The filename to the user server plugin DLL</param>
|
/// <param name="FileName">The filename to the user server plugin DLL</param>
|
||||||
public void AddPlugin(string FileName)
|
public void AddPlugin(string FileName)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("Inventorytorage: Attempting to load " + FileName);
|
MainLog.Instance.Verbose("Inventorytorage: Attempting to load " + FileName);
|
||||||
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
|
Assembly pluginAssembly = Assembly.LoadFrom(FileName);
|
||||||
|
|
||||||
foreach (Type pluginType in pluginAssembly.GetTypes())
|
foreach (Type pluginType in pluginAssembly.GetTypes())
|
||||||
{
|
{
|
||||||
if (!pluginType.IsAbstract)
|
if (!pluginType.IsAbstract)
|
||||||
{
|
{
|
||||||
Type typeInterface = pluginType.GetInterface("IInventoryData", true);
|
Type typeInterface = pluginType.GetInterface("IInventoryData", true);
|
||||||
|
|
||||||
if (typeInterface != null)
|
if (typeInterface != null)
|
||||||
{
|
{
|
||||||
IInventoryData plug = (IInventoryData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
IInventoryData plug = (IInventoryData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
||||||
plug.Initialise();
|
plug.Initialise();
|
||||||
this.m_plugins.Add(plug.getName(), plug);
|
this.m_plugins.Add(plug.getName(), plug);
|
||||||
MainLog.Instance.Verbose("Inventorystorage: Added IInventoryData Interface");
|
MainLog.Instance.Verbose("Inventorystorage: Added IInventoryData Interface");
|
||||||
}
|
}
|
||||||
|
|
||||||
typeInterface = null;
|
typeInterface = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pluginAssembly = null;
|
pluginAssembly = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the root folder plus any folders in root (so down one level in the Inventory folders tree)
|
/// Returns the root folder plus any folders in root (so down one level in the Inventory folders tree)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="userID"></param>
|
/// <param name="userID"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID)
|
public List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID)
|
||||||
{
|
{
|
||||||
List<InventoryFolderBase> inventoryList = new List<InventoryFolderBase>();
|
List<InventoryFolderBase> inventoryList = new List<InventoryFolderBase>();
|
||||||
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
|
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
|
||||||
{
|
{
|
||||||
InventoryFolderBase rootFolder = plugin.Value.getUserRootFolder(userID);
|
InventoryFolderBase rootFolder = plugin.Value.getUserRootFolder(userID);
|
||||||
if (rootFolder != null)
|
if (rootFolder != null)
|
||||||
{
|
{
|
||||||
inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID);
|
inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID);
|
||||||
inventoryList.Insert(0, rootFolder);
|
inventoryList.Insert(0, rootFolder);
|
||||||
return inventoryList;
|
return inventoryList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return inventoryList;
|
return inventoryList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public InventoryFolderBase RequestUsersRoot(LLUUID userID)
|
public InventoryFolderBase RequestUsersRoot(LLUUID userID)
|
||||||
{
|
{
|
||||||
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
|
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
|
||||||
{
|
{
|
||||||
return plugin.Value.getUserRootFolder(userID);
|
return plugin.Value.getUserRootFolder(userID);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="parentFolderID"></param>
|
/// <param name="parentFolderID"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public List<InventoryFolderBase> RequestSubFolders(LLUUID parentFolderID)
|
public List<InventoryFolderBase> RequestSubFolders(LLUUID parentFolderID)
|
||||||
{
|
{
|
||||||
List<InventoryFolderBase> inventoryList = new List<InventoryFolderBase>();
|
List<InventoryFolderBase> inventoryList = new List<InventoryFolderBase>();
|
||||||
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
|
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
|
||||||
{
|
{
|
||||||
return plugin.Value.getInventoryFolders(parentFolderID);
|
return plugin.Value.getInventoryFolders(parentFolderID);
|
||||||
}
|
}
|
||||||
return inventoryList;
|
return inventoryList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<InventoryItemBase> RequestFolderItems(LLUUID folderID)
|
public List<InventoryItemBase> RequestFolderItems(LLUUID folderID)
|
||||||
{
|
{
|
||||||
List<InventoryItemBase> itemsList = new List<InventoryItemBase>();
|
List<InventoryItemBase> itemsList = new List<InventoryItemBase>();
|
||||||
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
|
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
|
||||||
{
|
{
|
||||||
itemsList = plugin.Value.getInventoryInFolder(folderID);
|
itemsList = plugin.Value.getInventoryInFolder(folderID);
|
||||||
return itemsList;
|
return itemsList;
|
||||||
}
|
}
|
||||||
return itemsList;
|
return itemsList;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inventory"></param>
|
/// <param name="inventory"></param>
|
||||||
public void AddNewInventorySet(UsersInventory inventory)
|
public void AddNewInventorySet(UsersInventory inventory)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class UsersInventory
|
public class UsersInventory
|
||||||
{
|
{
|
||||||
public Dictionary<LLUUID, InventoryFolderBase> Folders = new Dictionary<LLUUID, InventoryFolderBase>();
|
public Dictionary<LLUUID, InventoryFolderBase> Folders = new Dictionary<LLUUID, InventoryFolderBase>();
|
||||||
public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>();
|
public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>();
|
||||||
|
|
||||||
public UsersInventory()
|
public UsersInventory()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void CreateNewInventorySet()
|
protected virtual void CreateNewInventorySet()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,35 +1,35 @@
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
// set of attributes. Change these attribute values to modify the information
|
// set of attributes. Change these attribute values to modify the information
|
||||||
// associated with an assembly.
|
// associated with an assembly.
|
||||||
[assembly: AssemblyTitle("InventoryServiceBase")]
|
[assembly: AssemblyTitle("InventoryServiceBase")]
|
||||||
[assembly: AssemblyDescription("")]
|
[assembly: AssemblyDescription("")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("")]
|
||||||
[assembly: AssemblyProduct("InventoryServiceBase")]
|
[assembly: AssemblyProduct("InventoryServiceBase")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2007")]
|
[assembly: AssemblyCopyright("Copyright © 2007")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
// to COM components. If you need to access a type in this assembly from
|
// to COM components. If you need to access a type in this assembly from
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
[assembly: Guid("7e1fbd0b-4a25-4804-a01f-89b04eb5b349")]
|
[assembly: Guid("7e1fbd0b-4a25-4804-a01f-89b04eb5b349")]
|
||||||
|
|
||||||
// Version information for an assembly consists of the following four values:
|
// Version information for an assembly consists of the following four values:
|
||||||
//
|
//
|
||||||
// Major Version
|
// Major Version
|
||||||
// Minor Version
|
// Minor Version
|
||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,299 +1,299 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Axiom.Math;
|
using Axiom.Math;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using libsecondlife.Packets;
|
using libsecondlife.Packets;
|
||||||
using OpenSim.Framework.Interfaces;
|
using OpenSim.Framework.Interfaces;
|
||||||
using OpenSim.Framework.Types;
|
using OpenSim.Framework.Types;
|
||||||
using OpenSim.Physics.Manager;
|
using OpenSim.Physics.Manager;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Scenes
|
namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
// public delegate void PrimCountTaintedDelegate();
|
// public delegate void PrimCountTaintedDelegate();
|
||||||
|
|
||||||
public class AllNewSceneObjectGroup2 : EntityBase
|
public class AllNewSceneObjectGroup2 : EntityBase
|
||||||
{
|
{
|
||||||
private Encoding enc = Encoding.ASCII;
|
private Encoding enc = Encoding.ASCII;
|
||||||
|
|
||||||
protected AllNewSceneObjectPart2 m_rootPart;
|
protected AllNewSceneObjectPart2 m_rootPart;
|
||||||
protected Dictionary<LLUUID, AllNewSceneObjectPart2> m_parts = new Dictionary<LLUUID, AllNewSceneObjectPart2>();
|
protected Dictionary<LLUUID, AllNewSceneObjectPart2> m_parts = new Dictionary<LLUUID, AllNewSceneObjectPart2>();
|
||||||
|
|
||||||
public event PrimCountTaintedDelegate OnPrimCountTainted;
|
public event PrimCountTaintedDelegate OnPrimCountTainted;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int primCount
|
public int primCount
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public LLVector3 GroupCentrePoint
|
public LLVector3 GroupCentrePoint
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return new LLVector3(0, 0, 0);
|
return new LLVector3(0, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public AllNewSceneObjectGroup2()
|
public AllNewSceneObjectGroup2()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void FlagGroupForFullUpdate()
|
public void FlagGroupForFullUpdate()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void FlagGroupForTerseUpdate()
|
public void FlagGroupForTerseUpdate()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="objectGroup"></param>
|
/// <param name="objectGroup"></param>
|
||||||
public void LinkToGroup(AllNewSceneObjectGroup2 objectGroup)
|
public void LinkToGroup(AllNewSceneObjectGroup2 objectGroup)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="primID"></param>
|
/// <param name="primID"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private AllNewSceneObjectPart2 GetChildPrim(LLUUID primID)
|
private AllNewSceneObjectPart2 GetChildPrim(LLUUID primID)
|
||||||
{
|
{
|
||||||
AllNewSceneObjectPart2 childPart = null;
|
AllNewSceneObjectPart2 childPart = null;
|
||||||
if (this.m_parts.ContainsKey(primID))
|
if (this.m_parts.ContainsKey(primID))
|
||||||
{
|
{
|
||||||
childPart = this.m_parts[primID];
|
childPart = this.m_parts[primID];
|
||||||
}
|
}
|
||||||
return childPart;
|
return childPart;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="localID"></param>
|
/// <param name="localID"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private AllNewSceneObjectPart2 GetChildPrim(uint localID)
|
private AllNewSceneObjectPart2 GetChildPrim(uint localID)
|
||||||
{
|
{
|
||||||
foreach (AllNewSceneObjectPart2 part in this.m_parts.Values)
|
foreach (AllNewSceneObjectPart2 part in this.m_parts.Values)
|
||||||
{
|
{
|
||||||
if (part.m_localID == localID)
|
if (part.m_localID == localID)
|
||||||
{
|
{
|
||||||
return part;
|
return part;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TriggerTainted()
|
public void TriggerTainted()
|
||||||
{
|
{
|
||||||
if (OnPrimCountTainted != null)
|
if (OnPrimCountTainted != null)
|
||||||
{
|
{
|
||||||
this.OnPrimCountTainted();
|
this.OnPrimCountTainted();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="offset"></param>
|
/// <param name="offset"></param>
|
||||||
/// <param name="pos"></param>
|
/// <param name="pos"></param>
|
||||||
/// <param name="remoteClient"></param>
|
/// <param name="remoteClient"></param>
|
||||||
public void GrapMovement(LLVector3 offset, LLVector3 pos, IClientAPI remoteClient)
|
public void GrapMovement(LLVector3 offset, LLVector3 pos, IClientAPI remoteClient)
|
||||||
{
|
{
|
||||||
this.Pos = pos;
|
this.Pos = pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="client"></param>
|
/// <param name="client"></param>
|
||||||
public void GetProperites(IClientAPI client)
|
public void GetProperites(IClientAPI client)
|
||||||
{
|
{
|
||||||
ObjectPropertiesPacket proper = new ObjectPropertiesPacket();
|
ObjectPropertiesPacket proper = new ObjectPropertiesPacket();
|
||||||
proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1];
|
proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1];
|
||||||
proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock();
|
proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock();
|
||||||
proper.ObjectData[0].ItemID = LLUUID.Zero;
|
proper.ObjectData[0].ItemID = LLUUID.Zero;
|
||||||
proper.ObjectData[0].CreationDate = (ulong)this.m_rootPart.CreationDate;
|
proper.ObjectData[0].CreationDate = (ulong)this.m_rootPart.CreationDate;
|
||||||
proper.ObjectData[0].CreatorID = this.m_rootPart.CreatorID;
|
proper.ObjectData[0].CreatorID = this.m_rootPart.CreatorID;
|
||||||
proper.ObjectData[0].FolderID = LLUUID.Zero;
|
proper.ObjectData[0].FolderID = LLUUID.Zero;
|
||||||
proper.ObjectData[0].FromTaskID = LLUUID.Zero;
|
proper.ObjectData[0].FromTaskID = LLUUID.Zero;
|
||||||
proper.ObjectData[0].GroupID = LLUUID.Zero;
|
proper.ObjectData[0].GroupID = LLUUID.Zero;
|
||||||
proper.ObjectData[0].InventorySerial = 0;
|
proper.ObjectData[0].InventorySerial = 0;
|
||||||
proper.ObjectData[0].LastOwnerID = this.m_rootPart.LastOwnerID;
|
proper.ObjectData[0].LastOwnerID = this.m_rootPart.LastOwnerID;
|
||||||
proper.ObjectData[0].ObjectID = this.m_uuid;
|
proper.ObjectData[0].ObjectID = this.m_uuid;
|
||||||
proper.ObjectData[0].OwnerID = this.m_rootPart.OwnerID;
|
proper.ObjectData[0].OwnerID = this.m_rootPart.OwnerID;
|
||||||
proper.ObjectData[0].TouchName = enc.GetBytes(this.m_rootPart.TouchName + "\0");
|
proper.ObjectData[0].TouchName = enc.GetBytes(this.m_rootPart.TouchName + "\0");
|
||||||
proper.ObjectData[0].TextureID = new byte[0];
|
proper.ObjectData[0].TextureID = new byte[0];
|
||||||
proper.ObjectData[0].SitName = enc.GetBytes(this.m_rootPart.SitName + "\0");
|
proper.ObjectData[0].SitName = enc.GetBytes(this.m_rootPart.SitName + "\0");
|
||||||
proper.ObjectData[0].Name = enc.GetBytes(this.m_rootPart.Name + "\0");
|
proper.ObjectData[0].Name = enc.GetBytes(this.m_rootPart.Name + "\0");
|
||||||
proper.ObjectData[0].Description = enc.GetBytes(this.m_rootPart.Description + "\0");
|
proper.ObjectData[0].Description = enc.GetBytes(this.m_rootPart.Description + "\0");
|
||||||
proper.ObjectData[0].OwnerMask = this.m_rootPart.OwnerMask;
|
proper.ObjectData[0].OwnerMask = this.m_rootPart.OwnerMask;
|
||||||
proper.ObjectData[0].NextOwnerMask = this.m_rootPart.NextOwnerMask;
|
proper.ObjectData[0].NextOwnerMask = this.m_rootPart.NextOwnerMask;
|
||||||
proper.ObjectData[0].GroupMask = this.m_rootPart.GroupMask;
|
proper.ObjectData[0].GroupMask = this.m_rootPart.GroupMask;
|
||||||
proper.ObjectData[0].EveryoneMask = this.m_rootPart.EveryoneMask;
|
proper.ObjectData[0].EveryoneMask = this.m_rootPart.EveryoneMask;
|
||||||
proper.ObjectData[0].BaseMask = this.m_rootPart.BaseMask;
|
proper.ObjectData[0].BaseMask = this.m_rootPart.BaseMask;
|
||||||
|
|
||||||
client.OutPacket(proper);
|
client.OutPacket(proper);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Shape
|
#region Shape
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="shapeBlock"></param>
|
/// <param name="shapeBlock"></param>
|
||||||
public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock, uint localID)
|
public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock, uint localID)
|
||||||
{
|
{
|
||||||
AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
|
AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
|
||||||
if (part != null)
|
if (part != null)
|
||||||
{
|
{
|
||||||
part.UpdateShape(shapeBlock);
|
part.UpdateShape(shapeBlock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Position
|
#region Position
|
||||||
public void UpdateGroupPosition(LLVector3 pos)
|
public void UpdateGroupPosition(LLVector3 pos)
|
||||||
{
|
{
|
||||||
this.m_pos = pos;
|
this.m_pos = pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateSinglePosition(LLVector3 pos, uint localID)
|
public void UpdateSinglePosition(LLVector3 pos, uint localID)
|
||||||
{
|
{
|
||||||
AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
|
AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
|
||||||
if (part != null)
|
if (part != null)
|
||||||
{
|
{
|
||||||
if (part.uuid == this.m_rootPart.uuid)
|
if (part.uuid == this.m_rootPart.uuid)
|
||||||
{
|
{
|
||||||
this.UpdateRootPosition(pos);
|
this.UpdateRootPosition(pos);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
part.UpdateOffSet(pos);
|
part.UpdateOffSet(pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateRootPosition(LLVector3 pos)
|
private void UpdateRootPosition(LLVector3 pos)
|
||||||
{
|
{
|
||||||
LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
|
LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
|
||||||
LLVector3 oldPos = new LLVector3(this.Pos.X + this.m_rootPart.OffsetPosition.X, this.Pos.Y + this.m_rootPart.OffsetPosition.Y, this.Pos.Z + this.m_rootPart.OffsetPosition.Z);
|
LLVector3 oldPos = new LLVector3(this.Pos.X + this.m_rootPart.OffsetPosition.X, this.Pos.Y + this.m_rootPart.OffsetPosition.Y, this.Pos.Z + this.m_rootPart.OffsetPosition.Z);
|
||||||
LLVector3 diff = oldPos - newPos;
|
LLVector3 diff = oldPos - newPos;
|
||||||
Axiom.Math.Vector3 axDiff = new Vector3(diff.X, diff.Y, diff.Z);
|
Axiom.Math.Vector3 axDiff = new Vector3(diff.X, diff.Y, diff.Z);
|
||||||
Axiom.Math.Quaternion partRotation = new Quaternion(this.m_rootPart.RotationOffset.W, this.m_rootPart.RotationOffset.X, this.m_rootPart.RotationOffset.Y, this.m_rootPart.RotationOffset.Z);
|
Axiom.Math.Quaternion partRotation = new Quaternion(this.m_rootPart.RotationOffset.W, this.m_rootPart.RotationOffset.X, this.m_rootPart.RotationOffset.Y, this.m_rootPart.RotationOffset.Z);
|
||||||
axDiff = partRotation.Inverse() * axDiff;
|
axDiff = partRotation.Inverse() * axDiff;
|
||||||
diff.X = axDiff.x;
|
diff.X = axDiff.x;
|
||||||
diff.Y = axDiff.y;
|
diff.Y = axDiff.y;
|
||||||
diff.Z = axDiff.z;
|
diff.Z = axDiff.z;
|
||||||
|
|
||||||
foreach (AllNewSceneObjectPart2 obPart in this.m_parts.Values)
|
foreach (AllNewSceneObjectPart2 obPart in this.m_parts.Values)
|
||||||
{
|
{
|
||||||
if (obPart.uuid != this.m_rootPart.uuid)
|
if (obPart.uuid != this.m_rootPart.uuid)
|
||||||
{
|
{
|
||||||
obPart.OffsetPosition = obPart.OffsetPosition + diff;
|
obPart.OffsetPosition = obPart.OffsetPosition + diff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.Pos = newPos;
|
this.Pos = newPos;
|
||||||
pos.X = newPos.X;
|
pos.X = newPos.X;
|
||||||
pos.Y = newPos.Y;
|
pos.Y = newPos.Y;
|
||||||
pos.Z = newPos.Z;
|
pos.Z = newPos.Z;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Roation
|
#region Roation
|
||||||
public void UpdateGroupRotation(LLQuaternion rot)
|
public void UpdateGroupRotation(LLQuaternion rot)
|
||||||
{
|
{
|
||||||
this.m_rootPart.UpdateRotation(rot);
|
this.m_rootPart.UpdateRotation(rot);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pos"></param>
|
/// <param name="pos"></param>
|
||||||
/// <param name="rot"></param>
|
/// <param name="rot"></param>
|
||||||
public void UpdateGroupRotation(LLVector3 pos, LLQuaternion rot)
|
public void UpdateGroupRotation(LLVector3 pos, LLQuaternion rot)
|
||||||
{
|
{
|
||||||
this.m_rootPart.UpdateRotation(rot);
|
this.m_rootPart.UpdateRotation(rot);
|
||||||
this.m_pos = pos;
|
this.m_pos = pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateSingleRotation(LLQuaternion rot, uint localID)
|
public void UpdateSingleRotation(LLQuaternion rot, uint localID)
|
||||||
{
|
{
|
||||||
AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
|
AllNewSceneObjectPart2 part = this.GetChildPrim(localID);
|
||||||
if (part != null)
|
if (part != null)
|
||||||
{
|
{
|
||||||
if (part.uuid == this.m_rootPart.uuid)
|
if (part.uuid == this.m_rootPart.uuid)
|
||||||
{
|
{
|
||||||
this.UpdateRootRotation(rot);
|
this.UpdateRootRotation(rot);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
part.UpdateRotation(rot);
|
part.UpdateRotation(rot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void UpdateRootRotation(LLQuaternion rot)
|
private void UpdateRootRotation(LLQuaternion rot)
|
||||||
{
|
{
|
||||||
this.m_rootPart.UpdateRotation(rot);
|
this.m_rootPart.UpdateRotation(rot);
|
||||||
Axiom.Math.Quaternion axRot = new Quaternion(rot.W, rot.X, rot.Y, rot.Z);
|
Axiom.Math.Quaternion axRot = new Quaternion(rot.W, rot.X, rot.Y, rot.Z);
|
||||||
Axiom.Math.Quaternion oldParentRot = new Quaternion(this.m_rootPart.RotationOffset.W, this.m_rootPart.RotationOffset.X, this.m_rootPart.RotationOffset.Y, this.m_rootPart.RotationOffset.Z);
|
Axiom.Math.Quaternion oldParentRot = new Quaternion(this.m_rootPart.RotationOffset.W, this.m_rootPart.RotationOffset.X, this.m_rootPart.RotationOffset.Y, this.m_rootPart.RotationOffset.Z);
|
||||||
|
|
||||||
foreach (AllNewSceneObjectPart2 prim in this.m_parts.Values)
|
foreach (AllNewSceneObjectPart2 prim in this.m_parts.Values)
|
||||||
{
|
{
|
||||||
if (prim.uuid != this.m_rootPart.uuid)
|
if (prim.uuid != this.m_rootPart.uuid)
|
||||||
{
|
{
|
||||||
Vector3 axPos = new Vector3(prim.OffsetPosition.X, prim.OffsetPosition.Y, prim.OffsetPosition.Z);
|
Vector3 axPos = new Vector3(prim.OffsetPosition.X, prim.OffsetPosition.Y, prim.OffsetPosition.Z);
|
||||||
axPos = oldParentRot * axPos;
|
axPos = oldParentRot * axPos;
|
||||||
axPos = axRot.Inverse() * axPos;
|
axPos = axRot.Inverse() * axPos;
|
||||||
prim.OffsetPosition = new LLVector3(axPos.x, axPos.y, axPos.z);
|
prim.OffsetPosition = new LLVector3(axPos.x, axPos.y, axPos.z);
|
||||||
Axiom.Math.Quaternion primsRot = new Quaternion(prim.RotationOffset.W, prim.RotationOffset.X, prim.RotationOffset.Y, prim.RotationOffset.Z);
|
Axiom.Math.Quaternion primsRot = new Quaternion(prim.RotationOffset.W, prim.RotationOffset.X, prim.RotationOffset.Y, prim.RotationOffset.Z);
|
||||||
Axiom.Math.Quaternion newRot = oldParentRot * primsRot;
|
Axiom.Math.Quaternion newRot = oldParentRot * primsRot;
|
||||||
newRot = axRot.Inverse() * newRot;
|
newRot = axRot.Inverse() * newRot;
|
||||||
prim.RotationOffset = new LLQuaternion(newRot.w, newRot.x, newRot.y, newRot.z);
|
prim.RotationOffset = new LLQuaternion(newRot.w, newRot.x, newRot.y, newRot.z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="part"></param>
|
/// <param name="part"></param>
|
||||||
private void SetPartAsRoot(AllNewSceneObjectPart2 part)
|
private void SetPartAsRoot(AllNewSceneObjectPart2 part)
|
||||||
{
|
{
|
||||||
this.m_rootPart = part;
|
this.m_rootPart = part;
|
||||||
this.m_uuid = part.uuid;
|
this.m_uuid = part.uuid;
|
||||||
this.m_localId = part.m_localID;
|
this.m_localId = part.m_localID;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="part"></param>
|
/// <param name="part"></param>
|
||||||
private void SetPartAsNonRoot(AllNewSceneObjectPart2 part)
|
private void SetPartAsNonRoot(AllNewSceneObjectPart2 part)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,216 +1,216 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System;
|
using System;
|
||||||
using Axiom.Math;
|
using Axiom.Math;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using libsecondlife.Packets;
|
using libsecondlife.Packets;
|
||||||
using OpenSim.Framework.Interfaces;
|
using OpenSim.Framework.Interfaces;
|
||||||
using OpenSim.Framework.Types;
|
using OpenSim.Framework.Types;
|
||||||
|
|
||||||
namespace OpenSim.Region.Environment.Scenes
|
namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
|
|
||||||
public class AllNewSceneObjectPart2
|
public class AllNewSceneObjectPart2
|
||||||
{
|
{
|
||||||
private const uint FULL_MASK_PERMISSIONS = 2147483647;
|
private const uint FULL_MASK_PERMISSIONS = 2147483647;
|
||||||
|
|
||||||
private uint m_flags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456 + 128;
|
private uint m_flags = 32 + 65536 + 131072 + 256 + 4 + 8 + 2048 + 524288 + 268435456 + 128;
|
||||||
private ulong m_regionHandle;
|
private ulong m_regionHandle;
|
||||||
|
|
||||||
public string SitName = "";
|
public string SitName = "";
|
||||||
public string TouchName = "";
|
public string TouchName = "";
|
||||||
public string Text = "";
|
public string Text = "";
|
||||||
|
|
||||||
public LLUUID CreatorID;
|
public LLUUID CreatorID;
|
||||||
public LLUUID OwnerID;
|
public LLUUID OwnerID;
|
||||||
public LLUUID LastOwnerID;
|
public LLUUID LastOwnerID;
|
||||||
public Int32 CreationDate;
|
public Int32 CreationDate;
|
||||||
|
|
||||||
public LLUUID uuid;
|
public LLUUID uuid;
|
||||||
public uint m_localID;
|
public uint m_localID;
|
||||||
|
|
||||||
public uint ParentID = 0;
|
public uint ParentID = 0;
|
||||||
|
|
||||||
public uint OwnerMask = FULL_MASK_PERMISSIONS;
|
public uint OwnerMask = FULL_MASK_PERMISSIONS;
|
||||||
public uint NextOwnerMask = FULL_MASK_PERMISSIONS;
|
public uint NextOwnerMask = FULL_MASK_PERMISSIONS;
|
||||||
public uint GroupMask = FULL_MASK_PERMISSIONS;
|
public uint GroupMask = FULL_MASK_PERMISSIONS;
|
||||||
public uint EveryoneMask = FULL_MASK_PERMISSIONS;
|
public uint EveryoneMask = FULL_MASK_PERMISSIONS;
|
||||||
public uint BaseMask = FULL_MASK_PERMISSIONS;
|
public uint BaseMask = FULL_MASK_PERMISSIONS;
|
||||||
|
|
||||||
protected PrimitiveBaseShape m_Shape;
|
protected PrimitiveBaseShape m_Shape;
|
||||||
|
|
||||||
protected AllNewSceneObjectGroup2 m_parentGroup;
|
protected AllNewSceneObjectGroup2 m_parentGroup;
|
||||||
|
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
protected string m_name;
|
protected string m_name;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public virtual string Name
|
public virtual string Name
|
||||||
{
|
{
|
||||||
get { return m_name; }
|
get { return m_name; }
|
||||||
set { m_name = value; }
|
set { m_name = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
protected LLVector3 m_offset;
|
protected LLVector3 m_offset;
|
||||||
public LLVector3 OffsetPosition
|
public LLVector3 OffsetPosition
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return m_offset;
|
return m_offset;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
m_offset = value;
|
m_offset = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected LLQuaternion m_rotationOffset;
|
protected LLQuaternion m_rotationOffset;
|
||||||
public LLQuaternion RotationOffset
|
public LLQuaternion RotationOffset
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return m_rotationOffset;
|
return m_rotationOffset;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
m_rotationOffset = value;
|
m_rotationOffset = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private string m_description = "";
|
private string m_description = "";
|
||||||
public string Description
|
public string Description
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return this.m_description;
|
return this.m_description;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
this.m_description = value;
|
this.m_description = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public PrimitiveBaseShape Shape
|
public PrimitiveBaseShape Shape
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return this.m_Shape;
|
return this.m_Shape;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public LLVector3 Scale
|
public LLVector3 Scale
|
||||||
{
|
{
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
this.m_Shape.Scale = value;
|
this.m_Shape.Scale = value;
|
||||||
}
|
}
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return this.m_Shape.Scale;
|
return this.m_Shape.Scale;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Constructors
|
||||||
public AllNewSceneObjectPart2(ulong regionHandle, AllNewSceneObjectGroup2 parent, LLUUID ownerID, uint localID, PrimitiveBaseShape shape, LLVector3 position)
|
public AllNewSceneObjectPart2(ulong regionHandle, AllNewSceneObjectGroup2 parent, LLUUID ownerID, uint localID, PrimitiveBaseShape shape, LLVector3 position)
|
||||||
{
|
{
|
||||||
this.m_regionHandle = regionHandle;
|
this.m_regionHandle = regionHandle;
|
||||||
this.m_parentGroup = parent;
|
this.m_parentGroup = parent;
|
||||||
|
|
||||||
this.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
|
this.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
|
||||||
this.OwnerID = ownerID;
|
this.OwnerID = ownerID;
|
||||||
this.CreatorID = this.OwnerID;
|
this.CreatorID = this.OwnerID;
|
||||||
this.LastOwnerID = LLUUID.Zero;
|
this.LastOwnerID = LLUUID.Zero;
|
||||||
this.uuid = LLUUID.Random();
|
this.uuid = LLUUID.Random();
|
||||||
this.m_localID = (uint)(localID);
|
this.m_localID = (uint)(localID);
|
||||||
this.m_Shape = shape;
|
this.m_Shape = shape;
|
||||||
|
|
||||||
this.OffsetPosition = position;
|
this.OffsetPosition = position;
|
||||||
|
|
||||||
//temporary code just so the m_flags field doesn't give a compiler warning
|
//temporary code just so the m_flags field doesn't give a compiler warning
|
||||||
if (m_flags == 1)
|
if (m_flags == 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Shape
|
#region Shape
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="shapeBlock"></param>
|
/// <param name="shapeBlock"></param>
|
||||||
public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock)
|
public void UpdateShape(ObjectShapePacket.ObjectDataBlock shapeBlock)
|
||||||
{
|
{
|
||||||
this.m_Shape.PathBegin = shapeBlock.PathBegin;
|
this.m_Shape.PathBegin = shapeBlock.PathBegin;
|
||||||
this.m_Shape.PathEnd = shapeBlock.PathEnd;
|
this.m_Shape.PathEnd = shapeBlock.PathEnd;
|
||||||
this.m_Shape.PathScaleX = shapeBlock.PathScaleX;
|
this.m_Shape.PathScaleX = shapeBlock.PathScaleX;
|
||||||
this.m_Shape.PathScaleY = shapeBlock.PathScaleY;
|
this.m_Shape.PathScaleY = shapeBlock.PathScaleY;
|
||||||
this.m_Shape.PathShearX = shapeBlock.PathShearX;
|
this.m_Shape.PathShearX = shapeBlock.PathShearX;
|
||||||
this.m_Shape.PathShearY = shapeBlock.PathShearY;
|
this.m_Shape.PathShearY = shapeBlock.PathShearY;
|
||||||
this.m_Shape.PathSkew = shapeBlock.PathSkew;
|
this.m_Shape.PathSkew = shapeBlock.PathSkew;
|
||||||
this.m_Shape.ProfileBegin = shapeBlock.ProfileBegin;
|
this.m_Shape.ProfileBegin = shapeBlock.ProfileBegin;
|
||||||
this.m_Shape.ProfileEnd = shapeBlock.ProfileEnd;
|
this.m_Shape.ProfileEnd = shapeBlock.ProfileEnd;
|
||||||
this.m_Shape.PathCurve = shapeBlock.PathCurve;
|
this.m_Shape.PathCurve = shapeBlock.PathCurve;
|
||||||
this.m_Shape.ProfileCurve = shapeBlock.ProfileCurve;
|
this.m_Shape.ProfileCurve = shapeBlock.ProfileCurve;
|
||||||
this.m_Shape.ProfileHollow = shapeBlock.ProfileHollow;
|
this.m_Shape.ProfileHollow = shapeBlock.ProfileHollow;
|
||||||
this.m_Shape.PathRadiusOffset = shapeBlock.PathRadiusOffset;
|
this.m_Shape.PathRadiusOffset = shapeBlock.PathRadiusOffset;
|
||||||
this.m_Shape.PathRevolutions = shapeBlock.PathRevolutions;
|
this.m_Shape.PathRevolutions = shapeBlock.PathRevolutions;
|
||||||
this.m_Shape.PathTaperX = shapeBlock.PathTaperX;
|
this.m_Shape.PathTaperX = shapeBlock.PathTaperX;
|
||||||
this.m_Shape.PathTaperY = shapeBlock.PathTaperY;
|
this.m_Shape.PathTaperY = shapeBlock.PathTaperY;
|
||||||
this.m_Shape.PathTwist = shapeBlock.PathTwist;
|
this.m_Shape.PathTwist = shapeBlock.PathTwist;
|
||||||
this.m_Shape.PathTwistBegin = shapeBlock.PathTwistBegin;
|
this.m_Shape.PathTwistBegin = shapeBlock.PathTwistBegin;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Texture
|
#region Texture
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="textureEntry"></param>
|
/// <param name="textureEntry"></param>
|
||||||
public void UpdateTextureEntry(byte[] textureEntry)
|
public void UpdateTextureEntry(byte[] textureEntry)
|
||||||
{
|
{
|
||||||
this.m_Shape.TextureEntry = textureEntry;
|
this.m_Shape.TextureEntry = textureEntry;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Position
|
#region Position
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="pos"></param>
|
/// <param name="pos"></param>
|
||||||
public void UpdateOffSet(LLVector3 pos)
|
public void UpdateOffSet(LLVector3 pos)
|
||||||
{
|
{
|
||||||
LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
|
LLVector3 newPos = new LLVector3(pos.X, pos.Y, pos.Z);
|
||||||
this.OffsetPosition = newPos;
|
this.OffsetPosition = newPos;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region rotation
|
#region rotation
|
||||||
public void UpdateRotation(LLQuaternion rot)
|
public void UpdateRotation(LLQuaternion rot)
|
||||||
{
|
{
|
||||||
this.RotationOffset = new LLQuaternion(rot.X, rot.Y, rot.Z, rot.W);
|
this.RotationOffset = new LLQuaternion(rot.X, rot.Y, rot.Z, rot.W);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Resizing/Scale
|
#region Resizing/Scale
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="scale"></param>
|
/// <param name="scale"></param>
|
||||||
public void Resize(LLVector3 scale)
|
public void Resize(LLVector3 scale)
|
||||||
{
|
{
|
||||||
LLVector3 offset = (scale - this.m_Shape.Scale);
|
LLVector3 offset = (scale - this.m_Shape.Scale);
|
||||||
offset.X /= 2;
|
offset.X /= 2;
|
||||||
offset.Y /= 2;
|
offset.Y /= 2;
|
||||||
offset.Z /= 2;
|
offset.Z /= 2;
|
||||||
|
|
||||||
this.OffsetPosition += offset;
|
this.OffsetPosition += offset;
|
||||||
this.m_Shape.Scale = scale;
|
this.m_Shape.Scale = scale;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,84 +1,84 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/* Original code: Tedd Hansen */
|
/* Original code: Tedd Hansen */
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace OpenSim.Region.Scripting.LSL
|
namespace OpenSim.Region.Scripting.LSL
|
||||||
{
|
{
|
||||||
public static class Common
|
public static class Common
|
||||||
{
|
{
|
||||||
static public bool Debug = true;
|
static public bool Debug = true;
|
||||||
static public bool IL_UseTryCatch = true;
|
static public bool IL_UseTryCatch = true;
|
||||||
static public bool IL_CreateConstructor = true;
|
static public bool IL_CreateConstructor = true;
|
||||||
static public bool IL_CreateFunctionList = true;
|
static public bool IL_CreateFunctionList = true;
|
||||||
static public bool IL_ProcessCodeChunks = true;
|
static public bool IL_ProcessCodeChunks = true;
|
||||||
|
|
||||||
public delegate void SendToDebugEventDelegate(string Message);
|
public delegate void SendToDebugEventDelegate(string Message);
|
||||||
public delegate void SendToLogEventDelegate(string Message);
|
public delegate void SendToLogEventDelegate(string Message);
|
||||||
static public event SendToDebugEventDelegate SendToDebugEvent;
|
static public event SendToDebugEventDelegate SendToDebugEvent;
|
||||||
static public event SendToLogEventDelegate SendToLogEvent;
|
static public event SendToLogEventDelegate SendToLogEvent;
|
||||||
|
|
||||||
static public void SendToDebug(string Message)
|
static public void SendToDebug(string Message)
|
||||||
{
|
{
|
||||||
//if (Debug == true)
|
//if (Debug == true)
|
||||||
Console.WriteLine("Debug: " + Message);
|
Console.WriteLine("Debug: " + Message);
|
||||||
SendToDebugEvent(DateTime.Now.ToString("[HH:mm:ss] ") + Message + "\r\n");
|
SendToDebugEvent(DateTime.Now.ToString("[HH:mm:ss] ") + Message + "\r\n");
|
||||||
}
|
}
|
||||||
static public void SendToLog(string Message)
|
static public void SendToLog(string Message)
|
||||||
{
|
{
|
||||||
//if (Debug == true)
|
//if (Debug == true)
|
||||||
Console.WriteLine("LOG: " + Message);
|
Console.WriteLine("LOG: " + Message);
|
||||||
SendToLogEvent(DateTime.Now.ToString("[HH:mm:ss] ") + Message + "\r\n");
|
SendToLogEvent(DateTime.Now.ToString("[HH:mm:ss] ") + Message + "\r\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TEMPORARY TEST THINGIES
|
// TEMPORARY TEST THINGIES
|
||||||
public static class IL_Helper
|
public static class IL_Helper
|
||||||
{
|
{
|
||||||
public static string ReverseFormatString(string text1, string format)
|
public static string ReverseFormatString(string text1, string format)
|
||||||
{
|
{
|
||||||
Common.SendToDebug("ReverseFormatString text1: " + text1);
|
Common.SendToDebug("ReverseFormatString text1: " + text1);
|
||||||
Common.SendToDebug("ReverseFormatString format: " + format);
|
Common.SendToDebug("ReverseFormatString format: " + format);
|
||||||
return string.Format(format, text1);
|
return string.Format(format, text1);
|
||||||
}
|
}
|
||||||
public static string ReverseFormatString(string text1, UInt32 text2, string format)
|
public static string ReverseFormatString(string text1, UInt32 text2, string format)
|
||||||
{
|
{
|
||||||
Common.SendToDebug("ReverseFormatString text1: " + text1);
|
Common.SendToDebug("ReverseFormatString text1: " + text1);
|
||||||
Common.SendToDebug("ReverseFormatString text2: " + text2.ToString());
|
Common.SendToDebug("ReverseFormatString text2: " + text2.ToString());
|
||||||
Common.SendToDebug("ReverseFormatString format: " + format);
|
Common.SendToDebug("ReverseFormatString format: " + format);
|
||||||
return string.Format(format, text1, text2.ToString());
|
return string.Format(format, text1, text2.ToString());
|
||||||
}
|
}
|
||||||
public static string Cast_ToString(object obj)
|
public static string Cast_ToString(object obj)
|
||||||
{
|
{
|
||||||
Common.SendToDebug("OBJECT TO BE CASTED: " + obj.GetType().ToString());
|
Common.SendToDebug("OBJECT TO BE CASTED: " + obj.GetType().ToString());
|
||||||
return "ABCDEFGIHJKLMNOPQ123";
|
return "ABCDEFGIHJKLMNOPQ123";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,56 +1,56 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/* Original code: Tedd Hansen */
|
/* Original code: Tedd Hansen */
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Reflection.Emit;
|
using System.Reflection.Emit;
|
||||||
|
|
||||||
namespace OpenSim.Region.Scripting.LSL
|
namespace OpenSim.Region.Scripting.LSL
|
||||||
{
|
{
|
||||||
partial class LSO_Parser
|
partial class LSO_Parser
|
||||||
{
|
{
|
||||||
private static TypeBuilder CreateType(ModuleBuilder modBuilder, string typeName)
|
private static TypeBuilder CreateType(ModuleBuilder modBuilder, string typeName)
|
||||||
{
|
{
|
||||||
TypeBuilder typeBuilder = modBuilder.DefineType(typeName,
|
TypeBuilder typeBuilder = modBuilder.DefineType(typeName,
|
||||||
TypeAttributes.Public |
|
TypeAttributes.Public |
|
||||||
TypeAttributes.Class |
|
TypeAttributes.Class |
|
||||||
TypeAttributes.AutoClass |
|
TypeAttributes.AutoClass |
|
||||||
TypeAttributes.AnsiClass |
|
TypeAttributes.AnsiClass |
|
||||||
TypeAttributes.BeforeFieldInit |
|
TypeAttributes.BeforeFieldInit |
|
||||||
TypeAttributes.AutoLayout,
|
TypeAttributes.AutoLayout,
|
||||||
typeof(object),
|
typeof(object),
|
||||||
new Type[] { typeof(object) });
|
new Type[] { typeof(object) });
|
||||||
return typeBuilder;
|
return typeBuilder;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,366 +1,366 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/* Original code: Tedd Hansen */
|
/* Original code: Tedd Hansen */
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace OpenSim.Region.Scripting.LSL
|
namespace OpenSim.Region.Scripting.LSL
|
||||||
{
|
{
|
||||||
public interface LSL_BuiltIn_Commands_Interface
|
public interface LSL_BuiltIn_Commands_Interface
|
||||||
{
|
{
|
||||||
void llSin();
|
void llSin();
|
||||||
void llCos();
|
void llCos();
|
||||||
void llTan();
|
void llTan();
|
||||||
void llAtan2();
|
void llAtan2();
|
||||||
void llSqrt();
|
void llSqrt();
|
||||||
void llPow();
|
void llPow();
|
||||||
void llAbs();
|
void llAbs();
|
||||||
void llFabs();
|
void llFabs();
|
||||||
void llFrand();
|
void llFrand();
|
||||||
void llFloor();
|
void llFloor();
|
||||||
void llCeil();
|
void llCeil();
|
||||||
void llRound();
|
void llRound();
|
||||||
void llVecMag();
|
void llVecMag();
|
||||||
void llVecNorm();
|
void llVecNorm();
|
||||||
void llVecDist();
|
void llVecDist();
|
||||||
void llRot2Euler();
|
void llRot2Euler();
|
||||||
void llEuler2Rot();
|
void llEuler2Rot();
|
||||||
void llAxes2Rot();
|
void llAxes2Rot();
|
||||||
void llRot2Fwd();
|
void llRot2Fwd();
|
||||||
void llRot2Left();
|
void llRot2Left();
|
||||||
void llRot2Up();
|
void llRot2Up();
|
||||||
void llRotBetween();
|
void llRotBetween();
|
||||||
void llWhisper();
|
void llWhisper();
|
||||||
void llSay(UInt32 channelID, string text);
|
void llSay(UInt32 channelID, string text);
|
||||||
void llShout();
|
void llShout();
|
||||||
void llListen();
|
void llListen();
|
||||||
void llListenControl();
|
void llListenControl();
|
||||||
void llListenRemove();
|
void llListenRemove();
|
||||||
void llSensor();
|
void llSensor();
|
||||||
void llSensorRepeat();
|
void llSensorRepeat();
|
||||||
void llSensorRemove();
|
void llSensorRemove();
|
||||||
void llDetectedName();
|
void llDetectedName();
|
||||||
void llDetectedKey();
|
void llDetectedKey();
|
||||||
void llDetectedOwner();
|
void llDetectedOwner();
|
||||||
void llDetectedType();
|
void llDetectedType();
|
||||||
void llDetectedPos();
|
void llDetectedPos();
|
||||||
void llDetectedVel();
|
void llDetectedVel();
|
||||||
void llDetectedGrab();
|
void llDetectedGrab();
|
||||||
void llDetectedRot();
|
void llDetectedRot();
|
||||||
void llDetectedGroup();
|
void llDetectedGroup();
|
||||||
void llDetectedLinkNumber();
|
void llDetectedLinkNumber();
|
||||||
void llDie();
|
void llDie();
|
||||||
void llGround();
|
void llGround();
|
||||||
void llCloud();
|
void llCloud();
|
||||||
void llWind();
|
void llWind();
|
||||||
void llSetStatus();
|
void llSetStatus();
|
||||||
void llGetStatus();
|
void llGetStatus();
|
||||||
void llSetScale();
|
void llSetScale();
|
||||||
void llGetScale();
|
void llGetScale();
|
||||||
void llSetColor();
|
void llSetColor();
|
||||||
void llGetAlpha();
|
void llGetAlpha();
|
||||||
void llSetAlpha();
|
void llSetAlpha();
|
||||||
void llGetColor();
|
void llGetColor();
|
||||||
void llSetTexture();
|
void llSetTexture();
|
||||||
void llScaleTexture();
|
void llScaleTexture();
|
||||||
void llOffsetTexture();
|
void llOffsetTexture();
|
||||||
void llRotateTexture();
|
void llRotateTexture();
|
||||||
void llGetTexture();
|
void llGetTexture();
|
||||||
void llSetPos();
|
void llSetPos();
|
||||||
void llGetPos();
|
void llGetPos();
|
||||||
void llGetLocalPos();
|
void llGetLocalPos();
|
||||||
void llSetRot();
|
void llSetRot();
|
||||||
void llGetRot();
|
void llGetRot();
|
||||||
void llGetLocalRot();
|
void llGetLocalRot();
|
||||||
void llSetForce();
|
void llSetForce();
|
||||||
void llGetForce();
|
void llGetForce();
|
||||||
void llTarget();
|
void llTarget();
|
||||||
void llTargetRemove();
|
void llTargetRemove();
|
||||||
void llRotTarget();
|
void llRotTarget();
|
||||||
void llRotTargetRemove();
|
void llRotTargetRemove();
|
||||||
void llMoveToTarget();
|
void llMoveToTarget();
|
||||||
void llStopMoveToTarget();
|
void llStopMoveToTarget();
|
||||||
void llApplyImpulse();
|
void llApplyImpulse();
|
||||||
void llApplyRotationalImpulse();
|
void llApplyRotationalImpulse();
|
||||||
void llSetTorque();
|
void llSetTorque();
|
||||||
void llGetTorque();
|
void llGetTorque();
|
||||||
void llSetForceAndTorque();
|
void llSetForceAndTorque();
|
||||||
void llGetVel();
|
void llGetVel();
|
||||||
void llGetAccel();
|
void llGetAccel();
|
||||||
void llGetOmega();
|
void llGetOmega();
|
||||||
void llGetTimeOfDay();
|
void llGetTimeOfDay();
|
||||||
void llGetWallclock();
|
void llGetWallclock();
|
||||||
void llGetTime();
|
void llGetTime();
|
||||||
void llResetTime();
|
void llResetTime();
|
||||||
void llGetAndResetTime();
|
void llGetAndResetTime();
|
||||||
void llSound();
|
void llSound();
|
||||||
void llPlaySound();
|
void llPlaySound();
|
||||||
void llLoopSound();
|
void llLoopSound();
|
||||||
void llLoopSoundMaster();
|
void llLoopSoundMaster();
|
||||||
void llLoopSoundSlave();
|
void llLoopSoundSlave();
|
||||||
void llPlaySoundSlave();
|
void llPlaySoundSlave();
|
||||||
void llTriggerSound();
|
void llTriggerSound();
|
||||||
void llStopSound();
|
void llStopSound();
|
||||||
void llPreloadSound();
|
void llPreloadSound();
|
||||||
void llGetSubString();
|
void llGetSubString();
|
||||||
void llDeleteSubString();
|
void llDeleteSubString();
|
||||||
void llInsertString();
|
void llInsertString();
|
||||||
void llToUpper();
|
void llToUpper();
|
||||||
void llToLower();
|
void llToLower();
|
||||||
void llGiveMoney();
|
void llGiveMoney();
|
||||||
void llMakeExplosion();
|
void llMakeExplosion();
|
||||||
void llMakeFountain();
|
void llMakeFountain();
|
||||||
void llMakeSmoke();
|
void llMakeSmoke();
|
||||||
void llMakeFire();
|
void llMakeFire();
|
||||||
void llRezObject();
|
void llRezObject();
|
||||||
void llLookAt();
|
void llLookAt();
|
||||||
void llStopLookAt();
|
void llStopLookAt();
|
||||||
void llSetTimerEvent();
|
void llSetTimerEvent();
|
||||||
void llSleep();
|
void llSleep();
|
||||||
void llGetMass();
|
void llGetMass();
|
||||||
void llCollisionFilter();
|
void llCollisionFilter();
|
||||||
void llTakeControls();
|
void llTakeControls();
|
||||||
void llReleaseControls();
|
void llReleaseControls();
|
||||||
void llAttachToAvatar();
|
void llAttachToAvatar();
|
||||||
void llDetachFromAvatar();
|
void llDetachFromAvatar();
|
||||||
void llTakeCamera();
|
void llTakeCamera();
|
||||||
void llReleaseCamera();
|
void llReleaseCamera();
|
||||||
void llGetOwner();
|
void llGetOwner();
|
||||||
void llInstantMessage();
|
void llInstantMessage();
|
||||||
void llEmail();
|
void llEmail();
|
||||||
void llGetNextEmail();
|
void llGetNextEmail();
|
||||||
void llGetKey();
|
void llGetKey();
|
||||||
void llSetBuoyancy();
|
void llSetBuoyancy();
|
||||||
void llSetHoverHeight();
|
void llSetHoverHeight();
|
||||||
void llStopHover();
|
void llStopHover();
|
||||||
void llMinEventDelay();
|
void llMinEventDelay();
|
||||||
void llSoundPreload();
|
void llSoundPreload();
|
||||||
void llRotLookAt();
|
void llRotLookAt();
|
||||||
void llStringLength();
|
void llStringLength();
|
||||||
void llStartAnimation();
|
void llStartAnimation();
|
||||||
void llStopAnimation();
|
void llStopAnimation();
|
||||||
void llPointAt();
|
void llPointAt();
|
||||||
void llStopPointAt();
|
void llStopPointAt();
|
||||||
void llTargetOmega();
|
void llTargetOmega();
|
||||||
void llGetStartParameter();
|
void llGetStartParameter();
|
||||||
void llGodLikeRezObject();
|
void llGodLikeRezObject();
|
||||||
void llRequestPermissions();
|
void llRequestPermissions();
|
||||||
void llGetPermissionsKey();
|
void llGetPermissionsKey();
|
||||||
void llGetPermissions();
|
void llGetPermissions();
|
||||||
void llGetLinkNumber();
|
void llGetLinkNumber();
|
||||||
void llSetLinkColor();
|
void llSetLinkColor();
|
||||||
void llCreateLink();
|
void llCreateLink();
|
||||||
void llBreakLink();
|
void llBreakLink();
|
||||||
void llBreakAllLinks();
|
void llBreakAllLinks();
|
||||||
void llGetLinkKey();
|
void llGetLinkKey();
|
||||||
void llGetLinkName();
|
void llGetLinkName();
|
||||||
void llGetInventoryNumber();
|
void llGetInventoryNumber();
|
||||||
void llGetInventoryName();
|
void llGetInventoryName();
|
||||||
void llSetScriptState();
|
void llSetScriptState();
|
||||||
void llGetEnergy();
|
void llGetEnergy();
|
||||||
void llGiveInventory();
|
void llGiveInventory();
|
||||||
void llRemoveInventory();
|
void llRemoveInventory();
|
||||||
void llSetText();
|
void llSetText();
|
||||||
void llWater();
|
void llWater();
|
||||||
void llPassTouches();
|
void llPassTouches();
|
||||||
void llRequestAgentData();
|
void llRequestAgentData();
|
||||||
void llRequestInventoryData();
|
void llRequestInventoryData();
|
||||||
void llSetDamage();
|
void llSetDamage();
|
||||||
void llTeleportAgentHome();
|
void llTeleportAgentHome();
|
||||||
void llModifyLand();
|
void llModifyLand();
|
||||||
void llCollisionSound();
|
void llCollisionSound();
|
||||||
void llCollisionSprite();
|
void llCollisionSprite();
|
||||||
void llGetAnimation();
|
void llGetAnimation();
|
||||||
void llResetScript();
|
void llResetScript();
|
||||||
void llMessageLinked();
|
void llMessageLinked();
|
||||||
void llPushObject();
|
void llPushObject();
|
||||||
void llPassCollisions();
|
void llPassCollisions();
|
||||||
void llGetScriptName();
|
void llGetScriptName();
|
||||||
void llGetNumberOfSides();
|
void llGetNumberOfSides();
|
||||||
void llAxisAngle2Rot();
|
void llAxisAngle2Rot();
|
||||||
void llRot2Axis();
|
void llRot2Axis();
|
||||||
void llRot2Angle();
|
void llRot2Angle();
|
||||||
void llAcos();
|
void llAcos();
|
||||||
void llAsin();
|
void llAsin();
|
||||||
void llAngleBetween();
|
void llAngleBetween();
|
||||||
void llGetInventoryKey();
|
void llGetInventoryKey();
|
||||||
void llAllowInventoryDrop();
|
void llAllowInventoryDrop();
|
||||||
void llGetSunDirection();
|
void llGetSunDirection();
|
||||||
void llGetTextureOffset();
|
void llGetTextureOffset();
|
||||||
void llGetTextureScale();
|
void llGetTextureScale();
|
||||||
void llGetTextureRot();
|
void llGetTextureRot();
|
||||||
void llSubStringIndex();
|
void llSubStringIndex();
|
||||||
void llGetOwnerKey();
|
void llGetOwnerKey();
|
||||||
void llGetCenterOfMass();
|
void llGetCenterOfMass();
|
||||||
void llListSort();
|
void llListSort();
|
||||||
void llGetListLength();
|
void llGetListLength();
|
||||||
void llList2Integer();
|
void llList2Integer();
|
||||||
void llList2Float();
|
void llList2Float();
|
||||||
void llList2String();
|
void llList2String();
|
||||||
void llList2Key();
|
void llList2Key();
|
||||||
void llList2Vector();
|
void llList2Vector();
|
||||||
void llList2Rot();
|
void llList2Rot();
|
||||||
void llList2List();
|
void llList2List();
|
||||||
void llDeleteSubList();
|
void llDeleteSubList();
|
||||||
void llGetListEntryType();
|
void llGetListEntryType();
|
||||||
void llList2CSV();
|
void llList2CSV();
|
||||||
void llCSV2List();
|
void llCSV2List();
|
||||||
void llListRandomize();
|
void llListRandomize();
|
||||||
void llList2ListStrided();
|
void llList2ListStrided();
|
||||||
void llGetRegionCorner();
|
void llGetRegionCorner();
|
||||||
void llListInsertList();
|
void llListInsertList();
|
||||||
void llListFindList();
|
void llListFindList();
|
||||||
void llGetObjectName();
|
void llGetObjectName();
|
||||||
void llSetObjectName();
|
void llSetObjectName();
|
||||||
void llGetDate();
|
void llGetDate();
|
||||||
void llEdgeOfWorld();
|
void llEdgeOfWorld();
|
||||||
void llGetAgentInfo();
|
void llGetAgentInfo();
|
||||||
void llAdjustSoundVolume();
|
void llAdjustSoundVolume();
|
||||||
void llSetSoundQueueing();
|
void llSetSoundQueueing();
|
||||||
void llSetSoundRadius();
|
void llSetSoundRadius();
|
||||||
void llKey2Name();
|
void llKey2Name();
|
||||||
void llSetTextureAnim();
|
void llSetTextureAnim();
|
||||||
void llTriggerSoundLimited();
|
void llTriggerSoundLimited();
|
||||||
void llEjectFromLand();
|
void llEjectFromLand();
|
||||||
void llParseString2List();
|
void llParseString2List();
|
||||||
void llOverMyLand();
|
void llOverMyLand();
|
||||||
void llGetLandOwnerAt();
|
void llGetLandOwnerAt();
|
||||||
void llGetNotecardLine();
|
void llGetNotecardLine();
|
||||||
void llGetAgentSize();
|
void llGetAgentSize();
|
||||||
void llSameGroup();
|
void llSameGroup();
|
||||||
void llUnSit();
|
void llUnSit();
|
||||||
void llGroundSlope();
|
void llGroundSlope();
|
||||||
void llGroundNormal();
|
void llGroundNormal();
|
||||||
void llGroundContour();
|
void llGroundContour();
|
||||||
void llGetAttached();
|
void llGetAttached();
|
||||||
void llGetFreeMemory();
|
void llGetFreeMemory();
|
||||||
void llGetRegionName();
|
void llGetRegionName();
|
||||||
void llGetRegionTimeDilation();
|
void llGetRegionTimeDilation();
|
||||||
void llGetRegionFPS();
|
void llGetRegionFPS();
|
||||||
void llParticleSystem();
|
void llParticleSystem();
|
||||||
void llGroundRepel();
|
void llGroundRepel();
|
||||||
void llGiveInventoryList();
|
void llGiveInventoryList();
|
||||||
void llSetVehicleType();
|
void llSetVehicleType();
|
||||||
void llSetVehicleFloatParam();
|
void llSetVehicleFloatParam();
|
||||||
void llSetVehicleVectorParam();
|
void llSetVehicleVectorParam();
|
||||||
void llSetVehicleRotationParam();
|
void llSetVehicleRotationParam();
|
||||||
void llSetVehicleFlags();
|
void llSetVehicleFlags();
|
||||||
void llRemoveVehicleFlags();
|
void llRemoveVehicleFlags();
|
||||||
void llSitTarget();
|
void llSitTarget();
|
||||||
void llAvatarOnSitTarget();
|
void llAvatarOnSitTarget();
|
||||||
void llAddToLandPassList();
|
void llAddToLandPassList();
|
||||||
void llSetTouchText();
|
void llSetTouchText();
|
||||||
void llSetSitText();
|
void llSetSitText();
|
||||||
void llSetCameraEyeOffset();
|
void llSetCameraEyeOffset();
|
||||||
void llSetCameraAtOffset();
|
void llSetCameraAtOffset();
|
||||||
void llDumpList2String();
|
void llDumpList2String();
|
||||||
void llScriptDanger();
|
void llScriptDanger();
|
||||||
void llDialog();
|
void llDialog();
|
||||||
void llVolumeDetect();
|
void llVolumeDetect();
|
||||||
void llResetOtherScript();
|
void llResetOtherScript();
|
||||||
void llGetScriptState();
|
void llGetScriptState();
|
||||||
void llRemoteLoadScript();
|
void llRemoteLoadScript();
|
||||||
void llSetRemoteScriptAccessPin();
|
void llSetRemoteScriptAccessPin();
|
||||||
void llRemoteLoadScriptPin();
|
void llRemoteLoadScriptPin();
|
||||||
void llOpenRemoteDataChannel();
|
void llOpenRemoteDataChannel();
|
||||||
void llSendRemoteData();
|
void llSendRemoteData();
|
||||||
void llRemoteDataReply();
|
void llRemoteDataReply();
|
||||||
void llCloseRemoteDataChannel();
|
void llCloseRemoteDataChannel();
|
||||||
void llMD5String();
|
void llMD5String();
|
||||||
void llSetPrimitiveParams();
|
void llSetPrimitiveParams();
|
||||||
void llStringToBase64();
|
void llStringToBase64();
|
||||||
void llBase64ToString();
|
void llBase64ToString();
|
||||||
void llXorBase64Strings();
|
void llXorBase64Strings();
|
||||||
void llRemoteDataSetRegion();
|
void llRemoteDataSetRegion();
|
||||||
void llLog10();
|
void llLog10();
|
||||||
void llLog();
|
void llLog();
|
||||||
void llGetAnimationList();
|
void llGetAnimationList();
|
||||||
void llSetParcelMusicURL();
|
void llSetParcelMusicURL();
|
||||||
void llGetRootPosition();
|
void llGetRootPosition();
|
||||||
void llGetRootRotation();
|
void llGetRootRotation();
|
||||||
void llGetObjectDesc();
|
void llGetObjectDesc();
|
||||||
void llSetObjectDesc();
|
void llSetObjectDesc();
|
||||||
void llGetCreator();
|
void llGetCreator();
|
||||||
void llGetTimestamp();
|
void llGetTimestamp();
|
||||||
void llSetLinkAlpha();
|
void llSetLinkAlpha();
|
||||||
void llGetNumberOfPrims();
|
void llGetNumberOfPrims();
|
||||||
void llGetNumberOfNotecardLines();
|
void llGetNumberOfNotecardLines();
|
||||||
void llGetBoundingBox();
|
void llGetBoundingBox();
|
||||||
void llGetGeometricCenter();
|
void llGetGeometricCenter();
|
||||||
void llGetPrimitiveParams();
|
void llGetPrimitiveParams();
|
||||||
void llIntegerToBase64();
|
void llIntegerToBase64();
|
||||||
void llBase64ToInteger();
|
void llBase64ToInteger();
|
||||||
void llGetGMTclock();
|
void llGetGMTclock();
|
||||||
void llGetSimulatorHostname();
|
void llGetSimulatorHostname();
|
||||||
void llSetLocalRot();
|
void llSetLocalRot();
|
||||||
void llParseStringKeepNulls();
|
void llParseStringKeepNulls();
|
||||||
void llRezAtRoot();
|
void llRezAtRoot();
|
||||||
void llGetObjectPermMask();
|
void llGetObjectPermMask();
|
||||||
void llSetObjectPermMask();
|
void llSetObjectPermMask();
|
||||||
void llGetInventoryPermMask();
|
void llGetInventoryPermMask();
|
||||||
void llSetInventoryPermMask();
|
void llSetInventoryPermMask();
|
||||||
void llGetInventoryCreator();
|
void llGetInventoryCreator();
|
||||||
void llOwnerSay();
|
void llOwnerSay();
|
||||||
void llRequestSimulatorData();
|
void llRequestSimulatorData();
|
||||||
void llForceMouselook();
|
void llForceMouselook();
|
||||||
void llGetObjectMass();
|
void llGetObjectMass();
|
||||||
void llListReplaceList();
|
void llListReplaceList();
|
||||||
void llLoadURL();
|
void llLoadURL();
|
||||||
void llParcelMediaCommandList();
|
void llParcelMediaCommandList();
|
||||||
void llParcelMediaQuery();
|
void llParcelMediaQuery();
|
||||||
void llModPow();
|
void llModPow();
|
||||||
void llGetInventoryType();
|
void llGetInventoryType();
|
||||||
void llSetPayPrice();
|
void llSetPayPrice();
|
||||||
void llGetCameraPos();
|
void llGetCameraPos();
|
||||||
void llGetCameraRot();
|
void llGetCameraRot();
|
||||||
void llSetPrimURL();
|
void llSetPrimURL();
|
||||||
void llRefreshPrimURL();
|
void llRefreshPrimURL();
|
||||||
void llEscapeURL();
|
void llEscapeURL();
|
||||||
void llUnescapeURL();
|
void llUnescapeURL();
|
||||||
void llMapDestination();
|
void llMapDestination();
|
||||||
void llAddToLandBanList();
|
void llAddToLandBanList();
|
||||||
void llRemoveFromLandPassList();
|
void llRemoveFromLandPassList();
|
||||||
void llRemoveFromLandBanList();
|
void llRemoveFromLandBanList();
|
||||||
void llSetCameraParams();
|
void llSetCameraParams();
|
||||||
void llClearCameraParams();
|
void llClearCameraParams();
|
||||||
void llListStatistics();
|
void llListStatistics();
|
||||||
void llGetUnixTime();
|
void llGetUnixTime();
|
||||||
void llGetParcelFlags();
|
void llGetParcelFlags();
|
||||||
void llGetRegionFlags();
|
void llGetRegionFlags();
|
||||||
void llXorBase64StringsCorrect();
|
void llXorBase64StringsCorrect();
|
||||||
void llHTTPRequest();
|
void llHTTPRequest();
|
||||||
void llResetLandBanList();
|
void llResetLandBanList();
|
||||||
void llResetLandPassList();
|
void llResetLandPassList();
|
||||||
void llGetParcelPrimCount();
|
void llGetParcelPrimCount();
|
||||||
void llGetParcelPrimOwners();
|
void llGetParcelPrimOwners();
|
||||||
void llGetObjectPrimCount();
|
void llGetObjectPrimCount();
|
||||||
void llGetParcelMaxPrims();
|
void llGetParcelMaxPrims();
|
||||||
void llGetParcelDetails();
|
void llGetParcelDetails();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,377 +1,377 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/* Original code: Tedd Hansen */
|
/* Original code: Tedd Hansen */
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace OpenSim.Region.Scripting.LSL
|
namespace OpenSim.Region.Scripting.LSL
|
||||||
{
|
{
|
||||||
public class LSL_BuiltIn_Commands_TestImplementation: LSL_BuiltIn_Commands_Interface
|
public class LSL_BuiltIn_Commands_TestImplementation: LSL_BuiltIn_Commands_Interface
|
||||||
{
|
{
|
||||||
public LSL_BuiltIn_Commands_TestImplementation()
|
public LSL_BuiltIn_Commands_TestImplementation()
|
||||||
{
|
{
|
||||||
Common.SendToDebug("LSL_BuiltIn_Commands_TestImplementation: Creating object");
|
Common.SendToDebug("LSL_BuiltIn_Commands_TestImplementation: Creating object");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void llSin() { }
|
public void llSin() { }
|
||||||
public void llCos() { }
|
public void llCos() { }
|
||||||
public void llTan() { }
|
public void llTan() { }
|
||||||
public void llAtan2() { }
|
public void llAtan2() { }
|
||||||
public void llSqrt() { }
|
public void llSqrt() { }
|
||||||
public void llPow() { }
|
public void llPow() { }
|
||||||
public void llAbs() { }
|
public void llAbs() { }
|
||||||
public void llFabs() { }
|
public void llFabs() { }
|
||||||
public void llFrand() { }
|
public void llFrand() { }
|
||||||
public void llFloor() { }
|
public void llFloor() { }
|
||||||
public void llCeil() { }
|
public void llCeil() { }
|
||||||
public void llRound() { }
|
public void llRound() { }
|
||||||
public void llVecMag() { }
|
public void llVecMag() { }
|
||||||
public void llVecNorm() { }
|
public void llVecNorm() { }
|
||||||
public void llVecDist() { }
|
public void llVecDist() { }
|
||||||
public void llRot2Euler() { }
|
public void llRot2Euler() { }
|
||||||
public void llEuler2Rot() { }
|
public void llEuler2Rot() { }
|
||||||
public void llAxes2Rot() { }
|
public void llAxes2Rot() { }
|
||||||
public void llRot2Fwd() { }
|
public void llRot2Fwd() { }
|
||||||
public void llRot2Left() { }
|
public void llRot2Left() { }
|
||||||
public void llRot2Up() { }
|
public void llRot2Up() { }
|
||||||
public void llRotBetween() { }
|
public void llRotBetween() { }
|
||||||
public void llWhisper() { }
|
public void llWhisper() { }
|
||||||
public void llSay(UInt32 channelID, string text)
|
public void llSay(UInt32 channelID, string text)
|
||||||
{
|
{
|
||||||
Common.SendToDebug("INTERNAL FUNCTION llSay(" + channelID + ", \"" + text + "\");");
|
Common.SendToDebug("INTERNAL FUNCTION llSay(" + channelID + ", \"" + text + "\");");
|
||||||
}
|
}
|
||||||
public void llShout() { }
|
public void llShout() { }
|
||||||
public void llListen() { }
|
public void llListen() { }
|
||||||
public void llListenControl() { }
|
public void llListenControl() { }
|
||||||
public void llListenRemove() { }
|
public void llListenRemove() { }
|
||||||
public void llSensor() { }
|
public void llSensor() { }
|
||||||
public void llSensorRepeat() { }
|
public void llSensorRepeat() { }
|
||||||
public void llSensorRemove() { }
|
public void llSensorRemove() { }
|
||||||
public void llDetectedName() { }
|
public void llDetectedName() { }
|
||||||
public void llDetectedKey() { }
|
public void llDetectedKey() { }
|
||||||
public void llDetectedOwner() { }
|
public void llDetectedOwner() { }
|
||||||
public void llDetectedType() { }
|
public void llDetectedType() { }
|
||||||
public void llDetectedPos() { }
|
public void llDetectedPos() { }
|
||||||
public void llDetectedVel() { }
|
public void llDetectedVel() { }
|
||||||
public void llDetectedGrab() { }
|
public void llDetectedGrab() { }
|
||||||
public void llDetectedRot() { }
|
public void llDetectedRot() { }
|
||||||
public void llDetectedGroup() { }
|
public void llDetectedGroup() { }
|
||||||
public void llDetectedLinkNumber() { }
|
public void llDetectedLinkNumber() { }
|
||||||
public void llDie() { }
|
public void llDie() { }
|
||||||
public void llGround() { }
|
public void llGround() { }
|
||||||
public void llCloud() { }
|
public void llCloud() { }
|
||||||
public void llWind() { }
|
public void llWind() { }
|
||||||
public void llSetStatus() { }
|
public void llSetStatus() { }
|
||||||
public void llGetStatus() { }
|
public void llGetStatus() { }
|
||||||
public void llSetScale() { }
|
public void llSetScale() { }
|
||||||
public void llGetScale() { }
|
public void llGetScale() { }
|
||||||
public void llSetColor() { }
|
public void llSetColor() { }
|
||||||
public void llGetAlpha() { }
|
public void llGetAlpha() { }
|
||||||
public void llSetAlpha() { }
|
public void llSetAlpha() { }
|
||||||
public void llGetColor() { }
|
public void llGetColor() { }
|
||||||
public void llSetTexture() { }
|
public void llSetTexture() { }
|
||||||
public void llScaleTexture() { }
|
public void llScaleTexture() { }
|
||||||
public void llOffsetTexture() { }
|
public void llOffsetTexture() { }
|
||||||
public void llRotateTexture() { }
|
public void llRotateTexture() { }
|
||||||
public void llGetTexture() { }
|
public void llGetTexture() { }
|
||||||
public void llSetPos() { }
|
public void llSetPos() { }
|
||||||
public void llGetPos() { }
|
public void llGetPos() { }
|
||||||
public void llGetLocalPos() { }
|
public void llGetLocalPos() { }
|
||||||
public void llSetRot() { }
|
public void llSetRot() { }
|
||||||
public void llGetRot() { }
|
public void llGetRot() { }
|
||||||
public void llGetLocalRot() { }
|
public void llGetLocalRot() { }
|
||||||
public void llSetForce() { }
|
public void llSetForce() { }
|
||||||
public void llGetForce() { }
|
public void llGetForce() { }
|
||||||
public void llTarget() { }
|
public void llTarget() { }
|
||||||
public void llTargetRemove() { }
|
public void llTargetRemove() { }
|
||||||
public void llRotTarget() { }
|
public void llRotTarget() { }
|
||||||
public void llRotTargetRemove() { }
|
public void llRotTargetRemove() { }
|
||||||
public void llMoveToTarget() { }
|
public void llMoveToTarget() { }
|
||||||
public void llStopMoveToTarget() { }
|
public void llStopMoveToTarget() { }
|
||||||
public void llApplyImpulse() { }
|
public void llApplyImpulse() { }
|
||||||
public void llApplyRotationalImpulse() { }
|
public void llApplyRotationalImpulse() { }
|
||||||
public void llSetTorque() { }
|
public void llSetTorque() { }
|
||||||
public void llGetTorque() { }
|
public void llGetTorque() { }
|
||||||
public void llSetForceAndTorque() { }
|
public void llSetForceAndTorque() { }
|
||||||
public void llGetVel() { }
|
public void llGetVel() { }
|
||||||
public void llGetAccel() { }
|
public void llGetAccel() { }
|
||||||
public void llGetOmega() { }
|
public void llGetOmega() { }
|
||||||
public void llGetTimeOfDay() { }
|
public void llGetTimeOfDay() { }
|
||||||
public void llGetWallclock() { }
|
public void llGetWallclock() { }
|
||||||
public void llGetTime() { }
|
public void llGetTime() { }
|
||||||
public void llResetTime() { }
|
public void llResetTime() { }
|
||||||
public void llGetAndResetTime() { }
|
public void llGetAndResetTime() { }
|
||||||
public void llSound() { }
|
public void llSound() { }
|
||||||
public void llPlaySound() { }
|
public void llPlaySound() { }
|
||||||
public void llLoopSound() { }
|
public void llLoopSound() { }
|
||||||
public void llLoopSoundMaster() { }
|
public void llLoopSoundMaster() { }
|
||||||
public void llLoopSoundSlave() { }
|
public void llLoopSoundSlave() { }
|
||||||
public void llPlaySoundSlave() { }
|
public void llPlaySoundSlave() { }
|
||||||
public void llTriggerSound() { }
|
public void llTriggerSound() { }
|
||||||
public void llStopSound() { }
|
public void llStopSound() { }
|
||||||
public void llPreloadSound() { }
|
public void llPreloadSound() { }
|
||||||
public void llGetSubString() { }
|
public void llGetSubString() { }
|
||||||
public void llDeleteSubString() { }
|
public void llDeleteSubString() { }
|
||||||
public void llInsertString() { }
|
public void llInsertString() { }
|
||||||
public void llToUpper() { }
|
public void llToUpper() { }
|
||||||
public void llToLower() { }
|
public void llToLower() { }
|
||||||
public void llGiveMoney() { }
|
public void llGiveMoney() { }
|
||||||
public void llMakeExplosion() { }
|
public void llMakeExplosion() { }
|
||||||
public void llMakeFountain() { }
|
public void llMakeFountain() { }
|
||||||
public void llMakeSmoke() { }
|
public void llMakeSmoke() { }
|
||||||
public void llMakeFire() { }
|
public void llMakeFire() { }
|
||||||
public void llRezObject() { }
|
public void llRezObject() { }
|
||||||
public void llLookAt() { }
|
public void llLookAt() { }
|
||||||
public void llStopLookAt() { }
|
public void llStopLookAt() { }
|
||||||
public void llSetTimerEvent() { }
|
public void llSetTimerEvent() { }
|
||||||
public void llSleep() { }
|
public void llSleep() { }
|
||||||
public void llGetMass() { }
|
public void llGetMass() { }
|
||||||
public void llCollisionFilter() { }
|
public void llCollisionFilter() { }
|
||||||
public void llTakeControls() { }
|
public void llTakeControls() { }
|
||||||
public void llReleaseControls() { }
|
public void llReleaseControls() { }
|
||||||
public void llAttachToAvatar() { }
|
public void llAttachToAvatar() { }
|
||||||
public void llDetachFromAvatar() { }
|
public void llDetachFromAvatar() { }
|
||||||
public void llTakeCamera() { }
|
public void llTakeCamera() { }
|
||||||
public void llReleaseCamera() { }
|
public void llReleaseCamera() { }
|
||||||
public void llGetOwner() { }
|
public void llGetOwner() { }
|
||||||
public void llInstantMessage() { }
|
public void llInstantMessage() { }
|
||||||
public void llEmail() { }
|
public void llEmail() { }
|
||||||
public void llGetNextEmail() { }
|
public void llGetNextEmail() { }
|
||||||
public void llGetKey() { }
|
public void llGetKey() { }
|
||||||
public void llSetBuoyancy() { }
|
public void llSetBuoyancy() { }
|
||||||
public void llSetHoverHeight() { }
|
public void llSetHoverHeight() { }
|
||||||
public void llStopHover() { }
|
public void llStopHover() { }
|
||||||
public void llMinEventDelay() { }
|
public void llMinEventDelay() { }
|
||||||
public void llSoundPreload() { }
|
public void llSoundPreload() { }
|
||||||
public void llRotLookAt() { }
|
public void llRotLookAt() { }
|
||||||
public void llStringLength() { }
|
public void llStringLength() { }
|
||||||
public void llStartAnimation() { }
|
public void llStartAnimation() { }
|
||||||
public void llStopAnimation() { }
|
public void llStopAnimation() { }
|
||||||
public void llPointAt() { }
|
public void llPointAt() { }
|
||||||
public void llStopPointAt() { }
|
public void llStopPointAt() { }
|
||||||
public void llTargetOmega() { }
|
public void llTargetOmega() { }
|
||||||
public void llGetStartParameter() { }
|
public void llGetStartParameter() { }
|
||||||
public void llGodLikeRezObject() { }
|
public void llGodLikeRezObject() { }
|
||||||
public void llRequestPermissions() { }
|
public void llRequestPermissions() { }
|
||||||
public void llGetPermissionsKey() { }
|
public void llGetPermissionsKey() { }
|
||||||
public void llGetPermissions() { }
|
public void llGetPermissions() { }
|
||||||
public void llGetLinkNumber() { }
|
public void llGetLinkNumber() { }
|
||||||
public void llSetLinkColor() { }
|
public void llSetLinkColor() { }
|
||||||
public void llCreateLink() { }
|
public void llCreateLink() { }
|
||||||
public void llBreakLink() { }
|
public void llBreakLink() { }
|
||||||
public void llBreakAllLinks() { }
|
public void llBreakAllLinks() { }
|
||||||
public void llGetLinkKey() { }
|
public void llGetLinkKey() { }
|
||||||
public void llGetLinkName() { }
|
public void llGetLinkName() { }
|
||||||
public void llGetInventoryNumber() { }
|
public void llGetInventoryNumber() { }
|
||||||
public void llGetInventoryName() { }
|
public void llGetInventoryName() { }
|
||||||
public void llSetScriptState() { }
|
public void llSetScriptState() { }
|
||||||
public void llGetEnergy() { }
|
public void llGetEnergy() { }
|
||||||
public void llGiveInventory() { }
|
public void llGiveInventory() { }
|
||||||
public void llRemoveInventory() { }
|
public void llRemoveInventory() { }
|
||||||
public void llSetText() { }
|
public void llSetText() { }
|
||||||
public void llWater() { }
|
public void llWater() { }
|
||||||
public void llPassTouches() { }
|
public void llPassTouches() { }
|
||||||
public void llRequestAgentData() { }
|
public void llRequestAgentData() { }
|
||||||
public void llRequestInventoryData() { }
|
public void llRequestInventoryData() { }
|
||||||
public void llSetDamage() { }
|
public void llSetDamage() { }
|
||||||
public void llTeleportAgentHome() { }
|
public void llTeleportAgentHome() { }
|
||||||
public void llModifyLand() { }
|
public void llModifyLand() { }
|
||||||
public void llCollisionSound() { }
|
public void llCollisionSound() { }
|
||||||
public void llCollisionSprite() { }
|
public void llCollisionSprite() { }
|
||||||
public void llGetAnimation() { }
|
public void llGetAnimation() { }
|
||||||
public void llResetScript() { }
|
public void llResetScript() { }
|
||||||
public void llMessageLinked() { }
|
public void llMessageLinked() { }
|
||||||
public void llPushObject() { }
|
public void llPushObject() { }
|
||||||
public void llPassCollisions() { }
|
public void llPassCollisions() { }
|
||||||
public void llGetScriptName() { }
|
public void llGetScriptName() { }
|
||||||
public void llGetNumberOfSides() { }
|
public void llGetNumberOfSides() { }
|
||||||
public void llAxisAngle2Rot() { }
|
public void llAxisAngle2Rot() { }
|
||||||
public void llRot2Axis() { }
|
public void llRot2Axis() { }
|
||||||
public void llRot2Angle() { }
|
public void llRot2Angle() { }
|
||||||
public void llAcos() { }
|
public void llAcos() { }
|
||||||
public void llAsin() { }
|
public void llAsin() { }
|
||||||
public void llAngleBetween() { }
|
public void llAngleBetween() { }
|
||||||
public void llGetInventoryKey() { }
|
public void llGetInventoryKey() { }
|
||||||
public void llAllowInventoryDrop() { }
|
public void llAllowInventoryDrop() { }
|
||||||
public void llGetSunDirection() { }
|
public void llGetSunDirection() { }
|
||||||
public void llGetTextureOffset() { }
|
public void llGetTextureOffset() { }
|
||||||
public void llGetTextureScale() { }
|
public void llGetTextureScale() { }
|
||||||
public void llGetTextureRot() { }
|
public void llGetTextureRot() { }
|
||||||
public void llSubStringIndex() { }
|
public void llSubStringIndex() { }
|
||||||
public void llGetOwnerKey() { }
|
public void llGetOwnerKey() { }
|
||||||
public void llGetCenterOfMass() { }
|
public void llGetCenterOfMass() { }
|
||||||
public void llListSort() { }
|
public void llListSort() { }
|
||||||
public void llGetListLength() { }
|
public void llGetListLength() { }
|
||||||
public void llList2Integer() { }
|
public void llList2Integer() { }
|
||||||
public void llList2Float() { }
|
public void llList2Float() { }
|
||||||
public void llList2String() { }
|
public void llList2String() { }
|
||||||
public void llList2Key() { }
|
public void llList2Key() { }
|
||||||
public void llList2Vector() { }
|
public void llList2Vector() { }
|
||||||
public void llList2Rot() { }
|
public void llList2Rot() { }
|
||||||
public void llList2List() { }
|
public void llList2List() { }
|
||||||
public void llDeleteSubList() { }
|
public void llDeleteSubList() { }
|
||||||
public void llGetListEntryType() { }
|
public void llGetListEntryType() { }
|
||||||
public void llList2CSV() { }
|
public void llList2CSV() { }
|
||||||
public void llCSV2List() { }
|
public void llCSV2List() { }
|
||||||
public void llListRandomize() { }
|
public void llListRandomize() { }
|
||||||
public void llList2ListStrided() { }
|
public void llList2ListStrided() { }
|
||||||
public void llGetRegionCorner() { }
|
public void llGetRegionCorner() { }
|
||||||
public void llListInsertList() { }
|
public void llListInsertList() { }
|
||||||
public void llListFindList() { }
|
public void llListFindList() { }
|
||||||
public void llGetObjectName() { }
|
public void llGetObjectName() { }
|
||||||
public void llSetObjectName() { }
|
public void llSetObjectName() { }
|
||||||
public void llGetDate() { }
|
public void llGetDate() { }
|
||||||
public void llEdgeOfWorld() { }
|
public void llEdgeOfWorld() { }
|
||||||
public void llGetAgentInfo() { }
|
public void llGetAgentInfo() { }
|
||||||
public void llAdjustSoundVolume() { }
|
public void llAdjustSoundVolume() { }
|
||||||
public void llSetSoundQueueing() { }
|
public void llSetSoundQueueing() { }
|
||||||
public void llSetSoundRadius() { }
|
public void llSetSoundRadius() { }
|
||||||
public void llKey2Name() { }
|
public void llKey2Name() { }
|
||||||
public void llSetTextureAnim() { }
|
public void llSetTextureAnim() { }
|
||||||
public void llTriggerSoundLimited() { }
|
public void llTriggerSoundLimited() { }
|
||||||
public void llEjectFromLand() { }
|
public void llEjectFromLand() { }
|
||||||
public void llParseString2List() { }
|
public void llParseString2List() { }
|
||||||
public void llOverMyLand() { }
|
public void llOverMyLand() { }
|
||||||
public void llGetLandOwnerAt() { }
|
public void llGetLandOwnerAt() { }
|
||||||
public void llGetNotecardLine() { }
|
public void llGetNotecardLine() { }
|
||||||
public void llGetAgentSize() { }
|
public void llGetAgentSize() { }
|
||||||
public void llSameGroup() { }
|
public void llSameGroup() { }
|
||||||
public void llUnSit() { }
|
public void llUnSit() { }
|
||||||
public void llGroundSlope() { }
|
public void llGroundSlope() { }
|
||||||
public void llGroundNormal() { }
|
public void llGroundNormal() { }
|
||||||
public void llGroundContour() { }
|
public void llGroundContour() { }
|
||||||
public void llGetAttached() { }
|
public void llGetAttached() { }
|
||||||
public void llGetFreeMemory() { }
|
public void llGetFreeMemory() { }
|
||||||
public void llGetRegionName() { }
|
public void llGetRegionName() { }
|
||||||
public void llGetRegionTimeDilation() { }
|
public void llGetRegionTimeDilation() { }
|
||||||
public void llGetRegionFPS() { }
|
public void llGetRegionFPS() { }
|
||||||
public void llParticleSystem() { }
|
public void llParticleSystem() { }
|
||||||
public void llGroundRepel() { }
|
public void llGroundRepel() { }
|
||||||
public void llGiveInventoryList() { }
|
public void llGiveInventoryList() { }
|
||||||
public void llSetVehicleType() { }
|
public void llSetVehicleType() { }
|
||||||
public void llSetVehicleFloatParam() { }
|
public void llSetVehicleFloatParam() { }
|
||||||
public void llSetVehicleVectorParam() { }
|
public void llSetVehicleVectorParam() { }
|
||||||
public void llSetVehicleRotationParam() { }
|
public void llSetVehicleRotationParam() { }
|
||||||
public void llSetVehicleFlags() { }
|
public void llSetVehicleFlags() { }
|
||||||
public void llRemoveVehicleFlags() { }
|
public void llRemoveVehicleFlags() { }
|
||||||
public void llSitTarget() { }
|
public void llSitTarget() { }
|
||||||
public void llAvatarOnSitTarget() { }
|
public void llAvatarOnSitTarget() { }
|
||||||
public void llAddToLandPassList() { }
|
public void llAddToLandPassList() { }
|
||||||
public void llSetTouchText() { }
|
public void llSetTouchText() { }
|
||||||
public void llSetSitText() { }
|
public void llSetSitText() { }
|
||||||
public void llSetCameraEyeOffset() { }
|
public void llSetCameraEyeOffset() { }
|
||||||
public void llSetCameraAtOffset() { }
|
public void llSetCameraAtOffset() { }
|
||||||
public void llDumpList2String() { }
|
public void llDumpList2String() { }
|
||||||
public void llScriptDanger() { }
|
public void llScriptDanger() { }
|
||||||
public void llDialog() { }
|
public void llDialog() { }
|
||||||
public void llVolumeDetect() { }
|
public void llVolumeDetect() { }
|
||||||
public void llResetOtherScript() { }
|
public void llResetOtherScript() { }
|
||||||
public void llGetScriptState() { }
|
public void llGetScriptState() { }
|
||||||
public void llRemoteLoadScript() { }
|
public void llRemoteLoadScript() { }
|
||||||
public void llSetRemoteScriptAccessPin() { }
|
public void llSetRemoteScriptAccessPin() { }
|
||||||
public void llRemoteLoadScriptPin() { }
|
public void llRemoteLoadScriptPin() { }
|
||||||
public void llOpenRemoteDataChannel() { }
|
public void llOpenRemoteDataChannel() { }
|
||||||
public void llSendRemoteData() { }
|
public void llSendRemoteData() { }
|
||||||
public void llRemoteDataReply() { }
|
public void llRemoteDataReply() { }
|
||||||
public void llCloseRemoteDataChannel() { }
|
public void llCloseRemoteDataChannel() { }
|
||||||
public void llMD5String() { }
|
public void llMD5String() { }
|
||||||
public void llSetPrimitiveParams() { }
|
public void llSetPrimitiveParams() { }
|
||||||
public void llStringToBase64() { }
|
public void llStringToBase64() { }
|
||||||
public void llBase64ToString() { }
|
public void llBase64ToString() { }
|
||||||
public void llXorBase64Strings() { }
|
public void llXorBase64Strings() { }
|
||||||
public void llRemoteDataSetRegion() { }
|
public void llRemoteDataSetRegion() { }
|
||||||
public void llLog10() { }
|
public void llLog10() { }
|
||||||
public void llLog() { }
|
public void llLog() { }
|
||||||
public void llGetAnimationList() { }
|
public void llGetAnimationList() { }
|
||||||
public void llSetParcelMusicURL() { }
|
public void llSetParcelMusicURL() { }
|
||||||
public void llGetRootPosition() { }
|
public void llGetRootPosition() { }
|
||||||
public void llGetRootRotation() { }
|
public void llGetRootRotation() { }
|
||||||
public void llGetObjectDesc() { }
|
public void llGetObjectDesc() { }
|
||||||
public void llSetObjectDesc() { }
|
public void llSetObjectDesc() { }
|
||||||
public void llGetCreator() { }
|
public void llGetCreator() { }
|
||||||
public void llGetTimestamp() { }
|
public void llGetTimestamp() { }
|
||||||
public void llSetLinkAlpha() { }
|
public void llSetLinkAlpha() { }
|
||||||
public void llGetNumberOfPrims() { }
|
public void llGetNumberOfPrims() { }
|
||||||
public void llGetNumberOfNotecardLines() { }
|
public void llGetNumberOfNotecardLines() { }
|
||||||
public void llGetBoundingBox() { }
|
public void llGetBoundingBox() { }
|
||||||
public void llGetGeometricCenter() { }
|
public void llGetGeometricCenter() { }
|
||||||
public void llGetPrimitiveParams() { }
|
public void llGetPrimitiveParams() { }
|
||||||
public void llIntegerToBase64() { }
|
public void llIntegerToBase64() { }
|
||||||
public void llBase64ToInteger() { }
|
public void llBase64ToInteger() { }
|
||||||
public void llGetGMTclock() { }
|
public void llGetGMTclock() { }
|
||||||
public void llGetSimulatorHostname() { }
|
public void llGetSimulatorHostname() { }
|
||||||
public void llSetLocalRot() { }
|
public void llSetLocalRot() { }
|
||||||
public void llParseStringKeepNulls() { }
|
public void llParseStringKeepNulls() { }
|
||||||
public void llRezAtRoot() { }
|
public void llRezAtRoot() { }
|
||||||
public void llGetObjectPermMask() { }
|
public void llGetObjectPermMask() { }
|
||||||
public void llSetObjectPermMask() { }
|
public void llSetObjectPermMask() { }
|
||||||
public void llGetInventoryPermMask() { }
|
public void llGetInventoryPermMask() { }
|
||||||
public void llSetInventoryPermMask() { }
|
public void llSetInventoryPermMask() { }
|
||||||
public void llGetInventoryCreator() { }
|
public void llGetInventoryCreator() { }
|
||||||
public void llOwnerSay() { }
|
public void llOwnerSay() { }
|
||||||
public void llRequestSimulatorData() { }
|
public void llRequestSimulatorData() { }
|
||||||
public void llForceMouselook() { }
|
public void llForceMouselook() { }
|
||||||
public void llGetObjectMass() { }
|
public void llGetObjectMass() { }
|
||||||
public void llListReplaceList() { }
|
public void llListReplaceList() { }
|
||||||
public void llLoadURL() { }
|
public void llLoadURL() { }
|
||||||
public void llParcelMediaCommandList() { }
|
public void llParcelMediaCommandList() { }
|
||||||
public void llParcelMediaQuery() { }
|
public void llParcelMediaQuery() { }
|
||||||
public void llModPow() { }
|
public void llModPow() { }
|
||||||
public void llGetInventoryType() { }
|
public void llGetInventoryType() { }
|
||||||
public void llSetPayPrice() { }
|
public void llSetPayPrice() { }
|
||||||
public void llGetCameraPos() { }
|
public void llGetCameraPos() { }
|
||||||
public void llGetCameraRot() { }
|
public void llGetCameraRot() { }
|
||||||
public void llSetPrimURL() { }
|
public void llSetPrimURL() { }
|
||||||
public void llRefreshPrimURL() { }
|
public void llRefreshPrimURL() { }
|
||||||
public void llEscapeURL() { }
|
public void llEscapeURL() { }
|
||||||
public void llUnescapeURL() { }
|
public void llUnescapeURL() { }
|
||||||
public void llMapDestination() { }
|
public void llMapDestination() { }
|
||||||
public void llAddToLandBanList() { }
|
public void llAddToLandBanList() { }
|
||||||
public void llRemoveFromLandPassList() { }
|
public void llRemoveFromLandPassList() { }
|
||||||
public void llRemoveFromLandBanList() { }
|
public void llRemoveFromLandBanList() { }
|
||||||
public void llSetCameraParams() { }
|
public void llSetCameraParams() { }
|
||||||
public void llClearCameraParams() { }
|
public void llClearCameraParams() { }
|
||||||
public void llListStatistics() { }
|
public void llListStatistics() { }
|
||||||
public void llGetUnixTime() { }
|
public void llGetUnixTime() { }
|
||||||
public void llGetParcelFlags() { }
|
public void llGetParcelFlags() { }
|
||||||
public void llGetRegionFlags() { }
|
public void llGetRegionFlags() { }
|
||||||
public void llXorBase64StringsCorrect() { }
|
public void llXorBase64StringsCorrect() { }
|
||||||
public void llHTTPRequest() { }
|
public void llHTTPRequest() { }
|
||||||
public void llResetLandBanList() { }
|
public void llResetLandBanList() { }
|
||||||
public void llResetLandPassList() { }
|
public void llResetLandPassList() { }
|
||||||
public void llGetParcelPrimCount() { }
|
public void llGetParcelPrimCount() { }
|
||||||
public void llGetParcelPrimOwners() { }
|
public void llGetParcelPrimOwners() { }
|
||||||
public void llGetObjectPrimCount() { }
|
public void llGetObjectPrimCount() { }
|
||||||
public void llGetParcelMaxPrims() { }
|
public void llGetParcelMaxPrims() { }
|
||||||
public void llGetParcelDetails() { }
|
public void llGetParcelDetails() { }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,351 +1,351 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/* Original code: Tedd Hansen */
|
/* Original code: Tedd Hansen */
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Reflection.Emit;
|
using System.Reflection.Emit;
|
||||||
|
|
||||||
namespace OpenSim.Region.Scripting.LSL
|
namespace OpenSim.Region.Scripting.LSL
|
||||||
{
|
{
|
||||||
partial class LSO_Parser
|
partial class LSO_Parser
|
||||||
{
|
{
|
||||||
//LSO_Enums MyLSO_Enums = new LSO_Enums();
|
//LSO_Enums MyLSO_Enums = new LSO_Enums();
|
||||||
|
|
||||||
internal bool LSL_PROCESS_OPCODE(ILGenerator il)
|
internal bool LSL_PROCESS_OPCODE(ILGenerator il)
|
||||||
{
|
{
|
||||||
|
|
||||||
byte bp1;
|
byte bp1;
|
||||||
UInt32 u32p1;
|
UInt32 u32p1;
|
||||||
UInt16 opcode = br_read(1)[0];
|
UInt16 opcode = br_read(1)[0];
|
||||||
Common.SendToDebug("OPCODE: " + ((LSO_Enums.Operation_Table)opcode).ToString());
|
Common.SendToDebug("OPCODE: " + ((LSO_Enums.Operation_Table)opcode).ToString());
|
||||||
string idesc = ((LSO_Enums.Operation_Table)opcode).ToString();
|
string idesc = ((LSO_Enums.Operation_Table)opcode).ToString();
|
||||||
switch ((LSO_Enums.Operation_Table)opcode)
|
switch ((LSO_Enums.Operation_Table)opcode)
|
||||||
{
|
{
|
||||||
|
|
||||||
case LSO_Enums.Operation_Table.POP:
|
case LSO_Enums.Operation_Table.POP:
|
||||||
case LSO_Enums.Operation_Table.POPL:
|
case LSO_Enums.Operation_Table.POPL:
|
||||||
case LSO_Enums.Operation_Table.POPV:
|
case LSO_Enums.Operation_Table.POPV:
|
||||||
case LSO_Enums.Operation_Table.POPQ:
|
case LSO_Enums.Operation_Table.POPQ:
|
||||||
case LSO_Enums.Operation_Table.POPIP:
|
case LSO_Enums.Operation_Table.POPIP:
|
||||||
case LSO_Enums.Operation_Table.POPBP:
|
case LSO_Enums.Operation_Table.POPBP:
|
||||||
case LSO_Enums.Operation_Table.POPSP:
|
case LSO_Enums.Operation_Table.POPSP:
|
||||||
case LSO_Enums.Operation_Table.POPSLR:
|
case LSO_Enums.Operation_Table.POPSLR:
|
||||||
// ignore -- builds callframe
|
// ignore -- builds callframe
|
||||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Pop);");
|
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Pop);");
|
||||||
il.Emit(OpCodes.Pop);
|
il.Emit(OpCodes.Pop);
|
||||||
break;
|
break;
|
||||||
case LSO_Enums.Operation_Table.POPARG:
|
case LSO_Enums.Operation_Table.POPARG:
|
||||||
Common.SendToDebug("Instruction " + idesc + ": Ignored");
|
Common.SendToDebug("Instruction " + idesc + ": Ignored");
|
||||||
Common.SendToDebug("Instruction " + idesc + ": Description: Drop x bytes from the stack ");
|
Common.SendToDebug("Instruction " + idesc + ": Description: Drop x bytes from the stack ");
|
||||||
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// LONG
|
// LONG
|
||||||
case LSO_Enums.Operation_Table.STORE:
|
case LSO_Enums.Operation_Table.STORE:
|
||||||
case LSO_Enums.Operation_Table.STORES:
|
case LSO_Enums.Operation_Table.STORES:
|
||||||
case LSO_Enums.Operation_Table.STOREL:
|
case LSO_Enums.Operation_Table.STOREL:
|
||||||
case LSO_Enums.Operation_Table.STOREV:
|
case LSO_Enums.Operation_Table.STOREV:
|
||||||
case LSO_Enums.Operation_Table.STOREQ:
|
case LSO_Enums.Operation_Table.STOREQ:
|
||||||
case LSO_Enums.Operation_Table.STOREG:
|
case LSO_Enums.Operation_Table.STOREG:
|
||||||
case LSO_Enums.Operation_Table.STOREGS:
|
case LSO_Enums.Operation_Table.STOREGS:
|
||||||
case LSO_Enums.Operation_Table.STOREGL:
|
case LSO_Enums.Operation_Table.STOREGL:
|
||||||
case LSO_Enums.Operation_Table.STOREGV:
|
case LSO_Enums.Operation_Table.STOREGV:
|
||||||
case LSO_Enums.Operation_Table.STOREGQ:
|
case LSO_Enums.Operation_Table.STOREGQ:
|
||||||
case LSO_Enums.Operation_Table.LOADP:
|
case LSO_Enums.Operation_Table.LOADP:
|
||||||
case LSO_Enums.Operation_Table.LOADSP:
|
case LSO_Enums.Operation_Table.LOADSP:
|
||||||
case LSO_Enums.Operation_Table.LOADLP:
|
case LSO_Enums.Operation_Table.LOADLP:
|
||||||
case LSO_Enums.Operation_Table.LOADVP:
|
case LSO_Enums.Operation_Table.LOADVP:
|
||||||
case LSO_Enums.Operation_Table.LOADQP:
|
case LSO_Enums.Operation_Table.LOADQP:
|
||||||
case LSO_Enums.Operation_Table.PUSH:
|
case LSO_Enums.Operation_Table.PUSH:
|
||||||
case LSO_Enums.Operation_Table.PUSHS:
|
case LSO_Enums.Operation_Table.PUSHS:
|
||||||
case LSO_Enums.Operation_Table.PUSHL:
|
case LSO_Enums.Operation_Table.PUSHL:
|
||||||
case LSO_Enums.Operation_Table.PUSHV:
|
case LSO_Enums.Operation_Table.PUSHV:
|
||||||
case LSO_Enums.Operation_Table.PUSHQ:
|
case LSO_Enums.Operation_Table.PUSHQ:
|
||||||
case LSO_Enums.Operation_Table.PUSHG:
|
case LSO_Enums.Operation_Table.PUSHG:
|
||||||
case LSO_Enums.Operation_Table.PUSHGS:
|
case LSO_Enums.Operation_Table.PUSHGS:
|
||||||
case LSO_Enums.Operation_Table.PUSHGL:
|
case LSO_Enums.Operation_Table.PUSHGL:
|
||||||
case LSO_Enums.Operation_Table.PUSHGV:
|
case LSO_Enums.Operation_Table.PUSHGV:
|
||||||
case LSO_Enums.Operation_Table.PUSHGQ:
|
case LSO_Enums.Operation_Table.PUSHGQ:
|
||||||
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||||
break;
|
break;
|
||||||
// None
|
// None
|
||||||
case LSO_Enums.Operation_Table.PUSHIP:
|
case LSO_Enums.Operation_Table.PUSHIP:
|
||||||
case LSO_Enums.Operation_Table.PUSHBP:
|
case LSO_Enums.Operation_Table.PUSHBP:
|
||||||
case LSO_Enums.Operation_Table.PUSHSP:
|
case LSO_Enums.Operation_Table.PUSHSP:
|
||||||
// Push Stack Top (Memory Address) to stack
|
// Push Stack Top (Memory Address) to stack
|
||||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Ldc_I4, " + myHeader.SP + ");");
|
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Ldc_I4, " + myHeader.SP + ");");
|
||||||
Common.SendToDebug("Instruction " + idesc + ": Description: Pushing Stack Top (Memory Address from header) to stack");
|
Common.SendToDebug("Instruction " + idesc + ": Description: Pushing Stack Top (Memory Address from header) to stack");
|
||||||
il.Emit(OpCodes.Ldc_I4, myHeader.SP);
|
il.Emit(OpCodes.Ldc_I4, myHeader.SP);
|
||||||
break;
|
break;
|
||||||
// BYTE
|
// BYTE
|
||||||
case LSO_Enums.Operation_Table.PUSHARGB:
|
case LSO_Enums.Operation_Table.PUSHARGB:
|
||||||
Common.SendToDebug("Param1: " + br_read(1)[0]);
|
Common.SendToDebug("Param1: " + br_read(1)[0]);
|
||||||
break;
|
break;
|
||||||
// INTEGER
|
// INTEGER
|
||||||
case LSO_Enums.Operation_Table.PUSHARGI:
|
case LSO_Enums.Operation_Table.PUSHARGI:
|
||||||
// TODO: What is size of integer?
|
// TODO: What is size of integer?
|
||||||
u32p1 = BitConverter.ToUInt32(br_read(4), 0);
|
u32p1 = BitConverter.ToUInt32(br_read(4), 0);
|
||||||
Common.SendToDebug("Instruction PUSHSP: il.Emit(OpCodes.Ldc_I4, " + u32p1 + ");");
|
Common.SendToDebug("Instruction PUSHSP: il.Emit(OpCodes.Ldc_I4, " + u32p1 + ");");
|
||||||
Common.SendToDebug("Param1: " + u32p1);
|
Common.SendToDebug("Param1: " + u32p1);
|
||||||
il.Emit(OpCodes.Ldc_I4, u32p1);
|
il.Emit(OpCodes.Ldc_I4, u32p1);
|
||||||
break;
|
break;
|
||||||
// FLOAT
|
// FLOAT
|
||||||
case LSO_Enums.Operation_Table.PUSHARGF:
|
case LSO_Enums.Operation_Table.PUSHARGF:
|
||||||
// TODO: What is size of float?
|
// TODO: What is size of float?
|
||||||
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||||
break;
|
break;
|
||||||
// STRING
|
// STRING
|
||||||
case LSO_Enums.Operation_Table.PUSHARGS:
|
case LSO_Enums.Operation_Table.PUSHARGS:
|
||||||
string s = Read_String();
|
string s = Read_String();
|
||||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Ldstr, \"" + s + "\");");
|
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Ldstr, \"" + s + "\");");
|
||||||
Common.SendToDebug("Param1: " + s);
|
Common.SendToDebug("Param1: " + s);
|
||||||
il.Emit(OpCodes.Ldstr, s);
|
il.Emit(OpCodes.Ldstr, s);
|
||||||
break;
|
break;
|
||||||
// VECTOR z,y,x
|
// VECTOR z,y,x
|
||||||
case LSO_Enums.Operation_Table.PUSHARGV:
|
case LSO_Enums.Operation_Table.PUSHARGV:
|
||||||
Common.SendToDebug("Param1 Z: " + BitConverter.ToUInt32(br_read(4), 0));
|
Common.SendToDebug("Param1 Z: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||||
Common.SendToDebug("Param1 Y: " + BitConverter.ToUInt32(br_read(4), 0));
|
Common.SendToDebug("Param1 Y: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||||
Common.SendToDebug("Param1 X: " + BitConverter.ToUInt32(br_read(4), 0));
|
Common.SendToDebug("Param1 X: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||||
break;
|
break;
|
||||||
// ROTATION s,z,y,x
|
// ROTATION s,z,y,x
|
||||||
case LSO_Enums.Operation_Table.PUSHARGQ:
|
case LSO_Enums.Operation_Table.PUSHARGQ:
|
||||||
Common.SendToDebug("Param1 S: " + BitConverter.ToUInt32(br_read(4), 0));
|
Common.SendToDebug("Param1 S: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||||
Common.SendToDebug("Param1 Z: " + BitConverter.ToUInt32(br_read(4), 0));
|
Common.SendToDebug("Param1 Z: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||||
Common.SendToDebug("Param1 Y: " + BitConverter.ToUInt32(br_read(4), 0));
|
Common.SendToDebug("Param1 Y: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||||
Common.SendToDebug("Param1 X: " + BitConverter.ToUInt32(br_read(4), 0));
|
Common.SendToDebug("Param1 X: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||||
break;
|
break;
|
||||||
// LONG
|
// LONG
|
||||||
case LSO_Enums.Operation_Table.PUSHARGE:
|
case LSO_Enums.Operation_Table.PUSHARGE:
|
||||||
u32p1 = BitConverter.ToUInt32(br_read(4), 0);
|
u32p1 = BitConverter.ToUInt32(br_read(4), 0);
|
||||||
//Common.SendToDebug("Instruction PUSHSP: il.Emit(OpCodes., " + u32p1 + ");");
|
//Common.SendToDebug("Instruction PUSHSP: il.Emit(OpCodes., " + u32p1 + ");");
|
||||||
Common.SendToDebug("Instruction " + idesc + ": Ignoring (not in use according to doc)");
|
Common.SendToDebug("Instruction " + idesc + ": Ignoring (not in use according to doc)");
|
||||||
//Common.SendToDebug("Instruction " + idesc + ": Description: Pushes X bytes of $00 onto the stack (used to put space for local variable memory for a call)");
|
//Common.SendToDebug("Instruction " + idesc + ": Description: Pushes X bytes of $00 onto the stack (used to put space for local variable memory for a call)");
|
||||||
Common.SendToDebug("Param1: " + u32p1);
|
Common.SendToDebug("Param1: " + u32p1);
|
||||||
//il.Emit(OpCodes.ldc_i4, u32p1);
|
//il.Emit(OpCodes.ldc_i4, u32p1);
|
||||||
//if (u32p1 > 0) {
|
//if (u32p1 > 0) {
|
||||||
//for (int _ic=0; _ic < u32p1; _ic++)
|
//for (int _ic=0; _ic < u32p1; _ic++)
|
||||||
//{
|
//{
|
||||||
// Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Ldnull);");
|
// Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Ldnull);");
|
||||||
// il.Emit(OpCodes.Ldnull);
|
// il.Emit(OpCodes.Ldnull);
|
||||||
//}
|
//}
|
||||||
break;
|
break;
|
||||||
// BYTE
|
// BYTE
|
||||||
case LSO_Enums.Operation_Table.ADD:
|
case LSO_Enums.Operation_Table.ADD:
|
||||||
bp1 = br_read(1)[0];
|
bp1 = br_read(1)[0];
|
||||||
Common.SendToDebug("Instruction " + idesc + ": Add type: " + ((LSO_Enums.OpCode_Add_TypeDefs)bp1).ToString());
|
Common.SendToDebug("Instruction " + idesc + ": Add type: " + ((LSO_Enums.OpCode_Add_TypeDefs)bp1).ToString());
|
||||||
Common.SendToDebug("Param1: " + bp1);
|
Common.SendToDebug("Param1: " + bp1);
|
||||||
switch ((LSO_Enums.OpCode_Add_TypeDefs)bp1)
|
switch ((LSO_Enums.OpCode_Add_TypeDefs)bp1)
|
||||||
{
|
{
|
||||||
case LSO_Enums.OpCode_Add_TypeDefs.String:
|
case LSO_Enums.OpCode_Add_TypeDefs.String:
|
||||||
Common.SendToDebug("Instruction " + idesc
|
Common.SendToDebug("Instruction " + idesc
|
||||||
+ ": il.Emit(OpCodes.Call, typeof(System.String).GetMethod(\"Concat\", new Type[] { typeof(object), typeof(object) }));");
|
+ ": il.Emit(OpCodes.Call, typeof(System.String).GetMethod(\"Concat\", new Type[] { typeof(object), typeof(object) }));");
|
||||||
il.Emit(OpCodes.Call, typeof(System.String).GetMethod
|
il.Emit(OpCodes.Call, typeof(System.String).GetMethod
|
||||||
("Concat", new Type[] { typeof(object), typeof(object) }));
|
("Concat", new Type[] { typeof(object), typeof(object) }));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case LSO_Enums.OpCode_Add_TypeDefs.UInt32:
|
case LSO_Enums.OpCode_Add_TypeDefs.UInt32:
|
||||||
default:
|
default:
|
||||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Add);");
|
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Add);");
|
||||||
il.Emit(OpCodes.Add);
|
il.Emit(OpCodes.Add);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//il.Emit(OpCodes.Add, p1);
|
//il.Emit(OpCodes.Add, p1);
|
||||||
break;
|
break;
|
||||||
case LSO_Enums.Operation_Table.SUB:
|
case LSO_Enums.Operation_Table.SUB:
|
||||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Sub);");
|
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Sub);");
|
||||||
bp1 = br_read(1)[0];
|
bp1 = br_read(1)[0];
|
||||||
Common.SendToDebug("Param1: " + bp1);
|
Common.SendToDebug("Param1: " + bp1);
|
||||||
il.Emit(OpCodes.Sub);
|
il.Emit(OpCodes.Sub);
|
||||||
//il.Emit(OpCodes.Sub, p1);
|
//il.Emit(OpCodes.Sub, p1);
|
||||||
break;
|
break;
|
||||||
case LSO_Enums.Operation_Table.MUL:
|
case LSO_Enums.Operation_Table.MUL:
|
||||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Mul);");
|
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Mul);");
|
||||||
bp1 = br_read(1)[0];
|
bp1 = br_read(1)[0];
|
||||||
Common.SendToDebug("Param1: " + bp1);
|
Common.SendToDebug("Param1: " + bp1);
|
||||||
il.Emit(OpCodes.Mul);
|
il.Emit(OpCodes.Mul);
|
||||||
//il.Emit(OpCodes.Mul, p1);
|
//il.Emit(OpCodes.Mul, p1);
|
||||||
break;
|
break;
|
||||||
case LSO_Enums.Operation_Table.DIV:
|
case LSO_Enums.Operation_Table.DIV:
|
||||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Div);");
|
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Div);");
|
||||||
bp1 = br_read(1)[0];
|
bp1 = br_read(1)[0];
|
||||||
Common.SendToDebug("Param1: " + bp1);
|
Common.SendToDebug("Param1: " + bp1);
|
||||||
il.Emit(OpCodes.Div);
|
il.Emit(OpCodes.Div);
|
||||||
//il.Emit(OpCodes.Div, p1);
|
//il.Emit(OpCodes.Div, p1);
|
||||||
break;
|
break;
|
||||||
case LSO_Enums.Operation_Table.EQ:
|
case LSO_Enums.Operation_Table.EQ:
|
||||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Ceq);");
|
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Ceq);");
|
||||||
bp1 = br_read(1)[0];
|
bp1 = br_read(1)[0];
|
||||||
Common.SendToDebug("Param1: " + bp1);
|
Common.SendToDebug("Param1: " + bp1);
|
||||||
il.Emit(OpCodes.Ceq);
|
il.Emit(OpCodes.Ceq);
|
||||||
//il.Emit(OpCodes.Ceq, p1);
|
//il.Emit(OpCodes.Ceq, p1);
|
||||||
break;
|
break;
|
||||||
case LSO_Enums.Operation_Table.NEQ:
|
case LSO_Enums.Operation_Table.NEQ:
|
||||||
case LSO_Enums.Operation_Table.LEQ:
|
case LSO_Enums.Operation_Table.LEQ:
|
||||||
case LSO_Enums.Operation_Table.GEQ:
|
case LSO_Enums.Operation_Table.GEQ:
|
||||||
case LSO_Enums.Operation_Table.LESS:
|
case LSO_Enums.Operation_Table.LESS:
|
||||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Clt_Un);");
|
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Clt_Un);");
|
||||||
bp1 = br_read(1)[0];
|
bp1 = br_read(1)[0];
|
||||||
Common.SendToDebug("Param1: " + bp1);
|
Common.SendToDebug("Param1: " + bp1);
|
||||||
il.Emit(OpCodes.Clt_Un);
|
il.Emit(OpCodes.Clt_Un);
|
||||||
//il.Emit(OpCodes.Clt, p1);
|
//il.Emit(OpCodes.Clt, p1);
|
||||||
break;
|
break;
|
||||||
case LSO_Enums.Operation_Table.GREATER:
|
case LSO_Enums.Operation_Table.GREATER:
|
||||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Cgt_Un);");
|
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Cgt_Un);");
|
||||||
bp1 = br_read(1)[0];
|
bp1 = br_read(1)[0];
|
||||||
Common.SendToDebug("Param1: " + bp1);
|
Common.SendToDebug("Param1: " + bp1);
|
||||||
il.Emit(OpCodes.Cgt_Un);
|
il.Emit(OpCodes.Cgt_Un);
|
||||||
//il.Emit(OpCodes.Cgt, p1);
|
//il.Emit(OpCodes.Cgt, p1);
|
||||||
break;
|
break;
|
||||||
case LSO_Enums.Operation_Table.MOD:
|
case LSO_Enums.Operation_Table.MOD:
|
||||||
case LSO_Enums.Operation_Table.BOOLOR:
|
case LSO_Enums.Operation_Table.BOOLOR:
|
||||||
bp1 = br_read(1)[0];
|
bp1 = br_read(1)[0];
|
||||||
Common.SendToDebug("Param1: " + bp1);
|
Common.SendToDebug("Param1: " + bp1);
|
||||||
break;
|
break;
|
||||||
// LONG
|
// LONG
|
||||||
case LSO_Enums.Operation_Table.JUMP:
|
case LSO_Enums.Operation_Table.JUMP:
|
||||||
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||||
break;
|
break;
|
||||||
// BYTE, LONG
|
// BYTE, LONG
|
||||||
case LSO_Enums.Operation_Table.JUMPIF:
|
case LSO_Enums.Operation_Table.JUMPIF:
|
||||||
case LSO_Enums.Operation_Table.JUMPNIF:
|
case LSO_Enums.Operation_Table.JUMPNIF:
|
||||||
Common.SendToDebug("Param1: " + br_read(1)[0]);
|
Common.SendToDebug("Param1: " + br_read(1)[0]);
|
||||||
Common.SendToDebug("Param2: " + BitConverter.ToUInt32(br_read(4), 0));
|
Common.SendToDebug("Param2: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||||
break;
|
break;
|
||||||
// LONG
|
// LONG
|
||||||
case LSO_Enums.Operation_Table.STATE:
|
case LSO_Enums.Operation_Table.STATE:
|
||||||
bp1 = br_read(1)[0];
|
bp1 = br_read(1)[0];
|
||||||
//il.Emit(OpCodes.Ld); // Load local variable 0 onto stack
|
//il.Emit(OpCodes.Ld); // Load local variable 0 onto stack
|
||||||
//il.Emit(OpCodes.Ldc_I4, 0); // Push index position
|
//il.Emit(OpCodes.Ldc_I4, 0); // Push index position
|
||||||
//il.Emit(OpCodes.Ldstr, EventList[p1]); // Push value
|
//il.Emit(OpCodes.Ldstr, EventList[p1]); // Push value
|
||||||
//il.Emit(OpCodes.Stelem_Ref); // Perform array[index] = value
|
//il.Emit(OpCodes.Stelem_Ref); // Perform array[index] = value
|
||||||
break;
|
break;
|
||||||
case LSO_Enums.Operation_Table.CALL:
|
case LSO_Enums.Operation_Table.CALL:
|
||||||
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||||
break;
|
break;
|
||||||
// BYTE
|
// BYTE
|
||||||
case LSO_Enums.Operation_Table.CAST:
|
case LSO_Enums.Operation_Table.CAST:
|
||||||
bp1 = br_read(1)[0];
|
bp1 = br_read(1)[0];
|
||||||
Common.SendToDebug("Instruction " + idesc + ": Cast to type: " + ((LSO_Enums.OpCode_Cast_TypeDefs)bp1));
|
Common.SendToDebug("Instruction " + idesc + ": Cast to type: " + ((LSO_Enums.OpCode_Cast_TypeDefs)bp1));
|
||||||
Common.SendToDebug("Param1: " + bp1);
|
Common.SendToDebug("Param1: " + bp1);
|
||||||
switch ((LSO_Enums.OpCode_Cast_TypeDefs)bp1)
|
switch ((LSO_Enums.OpCode_Cast_TypeDefs)bp1)
|
||||||
{
|
{
|
||||||
case LSO_Enums.OpCode_Cast_TypeDefs.String:
|
case LSO_Enums.OpCode_Cast_TypeDefs.String:
|
||||||
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Calli, typeof(System.Convert).GetMethod(\"ToString\", new Type[] { typeof(object) }));");
|
Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Calli, typeof(System.Convert).GetMethod(\"ToString\", new Type[] { typeof(object) }));");
|
||||||
//il.Emit(OpCodes.Box, typeof (UInt32));
|
//il.Emit(OpCodes.Box, typeof (UInt32));
|
||||||
il.Emit(OpCodes.Calli, typeof(Common).GetMethod
|
il.Emit(OpCodes.Calli, typeof(Common).GetMethod
|
||||||
("Cast_ToString", new Type[] { typeof(object) }));
|
("Cast_ToString", new Type[] { typeof(object) }));
|
||||||
|
|
||||||
//il.Emit(OpCodes.Box, typeof(System.UInt32) );
|
//il.Emit(OpCodes.Box, typeof(System.UInt32) );
|
||||||
//il.Emit(OpCodes.Box, typeof(string));
|
//il.Emit(OpCodes.Box, typeof(string));
|
||||||
|
|
||||||
//il.Emit(OpCodes.Conv_R8);
|
//il.Emit(OpCodes.Conv_R8);
|
||||||
//il.Emit(OpCodes.Call, typeof(System.Convert).GetMethod
|
//il.Emit(OpCodes.Call, typeof(System.Convert).GetMethod
|
||||||
// ("ToString", new Type[] { typeof(float) }));
|
// ("ToString", new Type[] { typeof(float) }));
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Common.SendToDebug("Instruction " + idesc + ": Unknown cast type!");
|
Common.SendToDebug("Instruction " + idesc + ": Unknown cast type!");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
// LONG
|
// LONG
|
||||||
case LSO_Enums.Operation_Table.STACKTOS:
|
case LSO_Enums.Operation_Table.STACKTOS:
|
||||||
case LSO_Enums.Operation_Table.STACKTOL:
|
case LSO_Enums.Operation_Table.STACKTOL:
|
||||||
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
Common.SendToDebug("Param1: " + BitConverter.ToUInt32(br_read(4), 0));
|
||||||
break;
|
break;
|
||||||
// BYTE
|
// BYTE
|
||||||
case LSO_Enums.Operation_Table.PRINT:
|
case LSO_Enums.Operation_Table.PRINT:
|
||||||
case LSO_Enums.Operation_Table.CALLLIB:
|
case LSO_Enums.Operation_Table.CALLLIB:
|
||||||
Common.SendToDebug("Param1: " + br_read(1)[0]);
|
Common.SendToDebug("Param1: " + br_read(1)[0]);
|
||||||
break;
|
break;
|
||||||
// SHORT
|
// SHORT
|
||||||
case LSO_Enums.Operation_Table.CALLLIB_TWO_BYTE:
|
case LSO_Enums.Operation_Table.CALLLIB_TWO_BYTE:
|
||||||
// TODO: What is size of short?
|
// TODO: What is size of short?
|
||||||
UInt16 U16p1 = BitConverter.ToUInt16(br_read(2), 0);
|
UInt16 U16p1 = BitConverter.ToUInt16(br_read(2), 0);
|
||||||
Common.SendToDebug("Instruction " + idesc + ": Builtin Command: " + ((LSO_Enums.BuiltIn_Functions)U16p1).ToString());
|
Common.SendToDebug("Instruction " + idesc + ": Builtin Command: " + ((LSO_Enums.BuiltIn_Functions)U16p1).ToString());
|
||||||
Common.SendToDebug("Param1: " + U16p1);
|
Common.SendToDebug("Param1: " + U16p1);
|
||||||
switch ((LSO_Enums.BuiltIn_Functions)U16p1)
|
switch ((LSO_Enums.BuiltIn_Functions)U16p1)
|
||||||
{
|
{
|
||||||
case LSO_Enums.BuiltIn_Functions.llSay:
|
case LSO_Enums.BuiltIn_Functions.llSay:
|
||||||
Common.SendToDebug("Instruction " + idesc + " " + ((LSO_Enums.BuiltIn_Functions)U16p1).ToString()
|
Common.SendToDebug("Instruction " + idesc + " " + ((LSO_Enums.BuiltIn_Functions)U16p1).ToString()
|
||||||
+ ": Mapped to internal function");
|
+ ": Mapped to internal function");
|
||||||
|
|
||||||
//il.Emit(OpCodes.Ldstr, "INTERNAL COMMAND: llSay({0}, \"{1}\"");
|
//il.Emit(OpCodes.Ldstr, "INTERNAL COMMAND: llSay({0}, \"{1}\"");
|
||||||
//il.Emit(OpCodes.Call, typeof(IL_Helper).GetMethod("ReverseFormatString",
|
//il.Emit(OpCodes.Call, typeof(IL_Helper).GetMethod("ReverseFormatString",
|
||||||
// new Type[] { typeof(string), typeof(UInt32), typeof(string) }
|
// new Type[] { typeof(string), typeof(UInt32), typeof(string) }
|
||||||
//));
|
//));
|
||||||
|
|
||||||
|
|
||||||
//il.Emit(OpCodes.Pop);
|
//il.Emit(OpCodes.Pop);
|
||||||
//il.Emit(OpCodes.Call,
|
//il.Emit(OpCodes.Call,
|
||||||
// typeof(Console).GetMethod("WriteLine",
|
// typeof(Console).GetMethod("WriteLine",
|
||||||
// new Type[] { typeof(string) }
|
// new Type[] { typeof(string) }
|
||||||
//));
|
//));
|
||||||
|
|
||||||
|
|
||||||
il.Emit(OpCodes.Call,
|
il.Emit(OpCodes.Call,
|
||||||
typeof(Common).GetMethod("SendToLog",
|
typeof(Common).GetMethod("SendToLog",
|
||||||
new Type[] { typeof(string) }
|
new Type[] { typeof(string) }
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//il.Emit(OpCodes.Pop);
|
//il.Emit(OpCodes.Pop);
|
||||||
|
|
||||||
//il.Emit(OpCodes.Ldind_I2, 0);
|
//il.Emit(OpCodes.Ldind_I2, 0);
|
||||||
|
|
||||||
//il.Emit(OpCodes.Call, typeof(string).GetMethod("Format", new Type[] { typeof(string), typeof(object) }));
|
//il.Emit(OpCodes.Call, typeof(string).GetMethod("Format", new Type[] { typeof(string), typeof(object) }));
|
||||||
//il.EmitCalli(OpCodes.Calli,
|
//il.EmitCalli(OpCodes.Calli,
|
||||||
//il.Emit(OpCodes.Call, typeof().GetMethod
|
//il.Emit(OpCodes.Call, typeof().GetMethod
|
||||||
// ("llSay", new Type[] { typeof(UInt32), typeof(string) }));
|
// ("llSay", new Type[] { typeof(UInt32), typeof(string) }));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Common.SendToDebug("Instruction " + idesc + ": " + ((LSO_Enums.BuiltIn_Functions)U16p1).ToString() + ": INTERNAL COMMAND NOT IMPLEMENTED");
|
Common.SendToDebug("Instruction " + idesc + ": " + ((LSO_Enums.BuiltIn_Functions)U16p1).ToString() + ": INTERNAL COMMAND NOT IMPLEMENTED");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Common.SendToDebug("Instruction " + idesc + ": DEBUG: Faking return code:");
|
//Common.SendToDebug("Instruction " + idesc + ": DEBUG: Faking return code:");
|
||||||
//Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Ldc_I4, 0);");
|
//Common.SendToDebug("Instruction " + idesc + ": il.Emit(OpCodes.Ldc_I4, 0);");
|
||||||
//il.Emit(OpCodes.Ldc_I4, 0);
|
//il.Emit(OpCodes.Ldc_I4, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// RETURN
|
// RETURN
|
||||||
case LSO_Enums.Operation_Table.RETURN:
|
case LSO_Enums.Operation_Table.RETURN:
|
||||||
|
|
||||||
Common.SendToDebug("Last OPCODE was return command. Code chunk execution complete.");
|
Common.SendToDebug("Last OPCODE was return command. Code chunk execution complete.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,33 +1,33 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using OpenSim.Region.Scripting;
|
using OpenSim.Region.Scripting;
|
||||||
using OpenSim.Region.Scripting.LSL;
|
using OpenSim.Region.Scripting.LSL;
|
||||||
|
|
||||||
namespace OpenSim.Region.Scripting.LSL
|
namespace OpenSim.Region.Scripting.LSL
|
||||||
{
|
{
|
||||||
class LSLScript : IScript
|
class LSLScript : IScript
|
||||||
{
|
{
|
||||||
ScriptInfo scriptInfo;
|
ScriptInfo scriptInfo;
|
||||||
LSL.Engine lindenScriptEngine;
|
LSL.Engine lindenScriptEngine;
|
||||||
|
|
||||||
public LSLScript(string filename, libsecondlife.LLUUID taskObject)
|
public LSLScript(string filename, libsecondlife.LLUUID taskObject)
|
||||||
{
|
{
|
||||||
scriptInfo.CreateTaskAPI(taskObject);
|
scriptInfo.CreateTaskAPI(taskObject);
|
||||||
|
|
||||||
lindenScriptEngine = new Engine();
|
lindenScriptEngine = new Engine();
|
||||||
lindenScriptEngine.Start(filename);
|
lindenScriptEngine.Start(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Initialise(ScriptInfo info)
|
public void Initialise(ScriptInfo info)
|
||||||
{
|
{
|
||||||
scriptInfo = info;
|
scriptInfo = info;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string getName()
|
public string getName()
|
||||||
{
|
{
|
||||||
return "LSL Script";
|
return "LSL Script";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using OpenSim.Region.Scripting;
|
using OpenSim.Region.Scripting;
|
||||||
using OpenSim.Region.Scripting.LSL;
|
using OpenSim.Region.Scripting.LSL;
|
||||||
|
|
||||||
namespace OpenSim.Region.Scripting
|
namespace OpenSim.Region.Scripting
|
||||||
{
|
{
|
||||||
public class LSLEngine : IScriptCompiler
|
public class LSLEngine : IScriptCompiler
|
||||||
{
|
{
|
||||||
public string FileExt()
|
public string FileExt()
|
||||||
{
|
{
|
||||||
return ".lso";
|
return ".lso";
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dictionary<string, IScript> compile(string filename)
|
public Dictionary<string, IScript> compile(string filename)
|
||||||
{
|
{
|
||||||
LSLScript script = new LSLScript(filename, libsecondlife.LLUUID.Zero);
|
LSLScript script = new LSLScript(filename, libsecondlife.LLUUID.Zero);
|
||||||
Dictionary<string, IScript> returns = new Dictionary<string, IScript>();
|
Dictionary<string, IScript> returns = new Dictionary<string, IScript>();
|
||||||
|
|
||||||
returns.Add(filename, script);
|
returns.Add(filename, script);
|
||||||
|
|
||||||
return returns;
|
return returns;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,31 +1,31 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
using OpenSim.Framework.Types;
|
using OpenSim.Framework.Types;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Primitive=OpenSim.Region.Environment.Scenes.Primitive;
|
using Primitive=OpenSim.Region.Environment.Scenes.Primitive;
|
||||||
|
|
||||||
namespace SimpleApp
|
namespace SimpleApp
|
||||||
{
|
{
|
||||||
public class FileSystemObject : SceneObject
|
public class FileSystemObject : SceneObject
|
||||||
{
|
{
|
||||||
public FileSystemObject(Scene world, FileInfo fileInfo, LLVector3 pos)
|
public FileSystemObject(Scene world, FileInfo fileInfo, LLVector3 pos)
|
||||||
: base( world, world.EventManager, LLUUID.Zero, world.NextLocalId, pos, BoxShape.Default )
|
: base( world, world.EventManager, LLUUID.Zero, world.NextLocalId, pos, BoxShape.Default )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
float size = (float)Math.Pow((double)fileInfo.Length, (double) 1 / 3) / 5;
|
float size = (float)Math.Pow((double)fileInfo.Length, (double) 1 / 3) / 5;
|
||||||
rootPrimitive.ResizeGoup(new LLVector3(size, size, size));
|
rootPrimitive.ResizeGoup(new LLVector3(size, size, size));
|
||||||
rootPrimitive.Text = fileInfo.Name;
|
rootPrimitive.Text = fileInfo.Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Update()
|
public override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,66 +1,66 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<ProductVersion>8.0.50727</ProductVersion>
|
<ProductVersion>8.0.50727</ProductVersion>
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
<ProjectGuid>{2D3DE8E4-9202-46A4-857B-3579B70E8356}</ProjectGuid>
|
<ProjectGuid>{2D3DE8E4-9202-46A4-857B-3579B70E8356}</ProjectGuid>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>OpenSim.Region.Physics.BulletXPlugin</RootNamespace>
|
<RootNamespace>OpenSim.Region.Physics.BulletXPlugin</RootNamespace>
|
||||||
<AssemblyName>OpenSim.Region.Physics.BulletXPlugin</AssemblyName>
|
<AssemblyName>OpenSim.Region.Physics.BulletXPlugin</AssemblyName>
|
||||||
<StartupObject>
|
<StartupObject>
|
||||||
</StartupObject>
|
</StartupObject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>..\..\..\..\bin\Physics\</OutputPath>
|
<OutputPath>..\..\..\..\bin\Physics\</OutputPath>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AssemblyInfo.cs" />
|
<Compile Include="AssemblyInfo.cs" />
|
||||||
<Compile Include="BulletXPlugin.cs" />
|
<Compile Include="BulletXPlugin.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Axiom.MathLib.dll">
|
<Reference Include="Axiom.MathLib.dll">
|
||||||
<HintPath>..\..\..\..\bin\Axiom.MathLib.dll</HintPath>
|
<HintPath>..\..\..\..\bin\Axiom.MathLib.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Modified.XnaDevRu.BulletX, Version=2.50.149.21894, Culture=neutral, processorArchitecture=x86">
|
<Reference Include="Modified.XnaDevRu.BulletX, Version=2.50.149.21894, Culture=neutral, processorArchitecture=x86">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\bin\Modified.XnaDevRu.BulletX.dll</HintPath>
|
<HintPath>..\..\..\..\bin\Modified.XnaDevRu.BulletX.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="MonoXnaCompactMaths, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="MonoXnaCompactMaths, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\bin\MonoXnaCompactMaths.dll</HintPath>
|
<HintPath>..\..\..\..\bin\MonoXnaCompactMaths.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="OpenSim.Region.Physics.Manager, Version=1.0.2741.37128, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="OpenSim.Region.Physics.Manager, Version=1.0.2741.37128, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\..\..\..\bin\OpenSim.Region.Physics.Manager.dll</HintPath>
|
<HintPath>..\..\..\..\bin\OpenSim.Region.Physics.Manager.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -1,110 +1,110 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
using OpenSim.Region.Environment.Scenes;
|
using OpenSim.Region.Environment.Scenes;
|
||||||
using OpenSim.Region.Environment.LandManagement;
|
using OpenSim.Region.Environment.LandManagement;
|
||||||
using OpenSim.Region.Environment;
|
using OpenSim.Region.Environment;
|
||||||
using OpenSim.Region.Interfaces;
|
using OpenSim.Region.Interfaces;
|
||||||
using OpenSim.Framework.Console;
|
using OpenSim.Framework.Console;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
|
||||||
using Db4objects.Db4o;
|
using Db4objects.Db4o;
|
||||||
using Db4objects.Db4o.Query;
|
using Db4objects.Db4o.Query;
|
||||||
|
|
||||||
namespace OpenSim.DataStore.DB4oStorage
|
namespace OpenSim.DataStore.DB4oStorage
|
||||||
{
|
{
|
||||||
|
|
||||||
public class SceneObjectQuery : Predicate
|
public class SceneObjectQuery : Predicate
|
||||||
{
|
{
|
||||||
private LLUUID globalIDSearch;
|
private LLUUID globalIDSearch;
|
||||||
|
|
||||||
public SceneObjectQuery(LLUUID find)
|
public SceneObjectQuery(LLUUID find)
|
||||||
{
|
{
|
||||||
globalIDSearch = find;
|
globalIDSearch = find;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Match(SceneObject obj)
|
public bool Match(SceneObject obj)
|
||||||
{
|
{
|
||||||
return obj.rootUUID == globalIDSearch;
|
return obj.rootUUID == globalIDSearch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class DB4oDataStore : IRegionDataStore
|
public class DB4oDataStore : IRegionDataStore
|
||||||
{
|
{
|
||||||
private IObjectContainer db;
|
private IObjectContainer db;
|
||||||
|
|
||||||
public void Initialise(string dbfile, string dbname)
|
public void Initialise(string dbfile, string dbname)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose("DATASTORE", "DB4O - Opening " + dbfile);
|
MainLog.Instance.Verbose("DATASTORE", "DB4O - Opening " + dbfile);
|
||||||
db = Db4oFactory.OpenFile(dbfile);
|
db = Db4oFactory.OpenFile(dbfile);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StoreObject(SceneObject obj)
|
public void StoreObject(SceneObject obj)
|
||||||
{
|
{
|
||||||
db.Set(obj);
|
db.Set(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveObject(LLUUID obj)
|
public void RemoveObject(LLUUID obj)
|
||||||
{
|
{
|
||||||
IObjectSet result = db.Query(new SceneObjectQuery(obj));
|
IObjectSet result = db.Query(new SceneObjectQuery(obj));
|
||||||
if (result.Count > 0)
|
if (result.Count > 0)
|
||||||
{
|
{
|
||||||
SceneObject item = (SceneObject)result.Next();
|
SceneObject item = (SceneObject)result.Next();
|
||||||
db.Delete(item);
|
db.Delete(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<SceneObject> LoadObjects()
|
public List<SceneObject> LoadObjects()
|
||||||
{
|
{
|
||||||
IObjectSet result = db.Get(typeof(SceneObject));
|
IObjectSet result = db.Get(typeof(SceneObject));
|
||||||
List<SceneObject> retvals = new List<SceneObject>();
|
List<SceneObject> retvals = new List<SceneObject>();
|
||||||
|
|
||||||
MainLog.Instance.Verbose("DATASTORE", "DB4O - LoadObjects found " + result.Count.ToString() + " objects");
|
MainLog.Instance.Verbose("DATASTORE", "DB4O - LoadObjects found " + result.Count.ToString() + " objects");
|
||||||
|
|
||||||
foreach (Object obj in result)
|
foreach (Object obj in result)
|
||||||
{
|
{
|
||||||
retvals.Add((SceneObject)obj);
|
retvals.Add((SceneObject)obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
return retvals;
|
return retvals;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StoreTerrain(double[,] ter)
|
public void StoreTerrain(double[,] ter)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public double[,] LoadTerrain()
|
public double[,] LoadTerrain()
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveLandObject(uint id)
|
public void RemoveLandObject(uint id)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StoreParcel(Land parcel)
|
public void StoreParcel(Land parcel)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Land> LoadLandObjects()
|
public List<Land> LoadLandObjects()
|
||||||
{
|
{
|
||||||
return new List<Land>();
|
return new List<Land>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Shutdown()
|
public void Shutdown()
|
||||||
{
|
{
|
||||||
if (db != null)
|
if (db != null)
|
||||||
{
|
{
|
||||||
db.Commit();
|
db.Commit();
|
||||||
db.Close();
|
db.Close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,35 +1,35 @@
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
// set of attributes. Change these attribute values to modify the information
|
// set of attributes. Change these attribute values to modify the information
|
||||||
// associated with an assembly.
|
// associated with an assembly.
|
||||||
[assembly: AssemblyTitle("OpenSim.DataStore.DB4o")]
|
[assembly: AssemblyTitle("OpenSim.DataStore.DB4o")]
|
||||||
[assembly: AssemblyDescription("")]
|
[assembly: AssemblyDescription("")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("")]
|
||||||
[assembly: AssemblyProduct("OpenSim.DataStore.DB4o")]
|
[assembly: AssemblyProduct("OpenSim.DataStore.DB4o")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2007")]
|
[assembly: AssemblyCopyright("Copyright © 2007")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
// to COM components. If you need to access a type in this assembly from
|
// to COM components. If you need to access a type in this assembly from
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
[assembly: Guid("7a12de8b-fdd1-48f5-89a9-8dc2dafbeebc")]
|
[assembly: Guid("7a12de8b-fdd1-48f5-89a9-8dc2dafbeebc")]
|
||||||
|
|
||||||
// Version information for an assembly consists of the following four values:
|
// Version information for an assembly consists of the following four values:
|
||||||
//
|
//
|
||||||
// Major Version
|
// Major Version
|
||||||
// Minor Version
|
// Minor Version
|
||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
// You can specify all the values or you can default the Revision and Build Numbers
|
// You can specify all the values or you can default the Revision and Build Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
|
|
|
@ -1,83 +1,83 @@
|
||||||
namespace LaunchSLClient
|
namespace LaunchSLClient
|
||||||
{
|
{
|
||||||
partial class Form1
|
partial class Form1
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required designer variable.
|
/// Required designer variable.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private System.ComponentModel.IContainer components = null;
|
private System.ComponentModel.IContainer components = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Clean up any resources being used.
|
/// Clean up any resources being used.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
if (disposing && (components != null))
|
if (disposing && (components != null))
|
||||||
{
|
{
|
||||||
components.Dispose();
|
components.Dispose();
|
||||||
}
|
}
|
||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
#region Windows Form Designer generated code
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Required method for Designer support - do not modify
|
/// Required method for Designer support - do not modify
|
||||||
/// the contents of this method with the code editor.
|
/// the contents of this method with the code editor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.comboBox1 = new System.Windows.Forms.ComboBox();
|
this.comboBox1 = new System.Windows.Forms.ComboBox();
|
||||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// comboBox1
|
// comboBox1
|
||||||
//
|
//
|
||||||
this.comboBox1.FormattingEnabled = true;
|
this.comboBox1.FormattingEnabled = true;
|
||||||
this.comboBox1.Items.AddRange(new object[] {
|
this.comboBox1.Items.AddRange(new object[] {
|
||||||
"Local Sandbox",
|
"Local Sandbox",
|
||||||
"Local Grid Server",
|
"Local Grid Server",
|
||||||
"DeepGrid - www.deepgrid.com",
|
"DeepGrid - www.deepgrid.com",
|
||||||
"OSGrid - www.osgrid.org",
|
"OSGrid - www.osgrid.org",
|
||||||
"Linden Labs - www.secondlife.com"});
|
"Linden Labs - www.secondlife.com"});
|
||||||
this.comboBox1.Location = new System.Drawing.Point(37, 83);
|
this.comboBox1.Location = new System.Drawing.Point(37, 83);
|
||||||
this.comboBox1.Name = "comboBox1";
|
this.comboBox1.Name = "comboBox1";
|
||||||
this.comboBox1.Size = new System.Drawing.Size(348, 21);
|
this.comboBox1.Size = new System.Drawing.Size(348, 21);
|
||||||
this.comboBox1.TabIndex = 0;
|
this.comboBox1.TabIndex = 0;
|
||||||
this.comboBox1.Text = "Choose from list";
|
this.comboBox1.Text = "Choose from list";
|
||||||
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
|
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
|
||||||
//
|
//
|
||||||
// textBox1
|
// textBox1
|
||||||
//
|
//
|
||||||
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||||
this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.textBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.textBox1.Location = new System.Drawing.Point(37, 32);
|
this.textBox1.Location = new System.Drawing.Point(37, 32);
|
||||||
this.textBox1.Name = "textBox1";
|
this.textBox1.Name = "textBox1";
|
||||||
this.textBox1.ReadOnly = true;
|
this.textBox1.ReadOnly = true;
|
||||||
this.textBox1.Size = new System.Drawing.Size(292, 19);
|
this.textBox1.Size = new System.Drawing.Size(292, 19);
|
||||||
this.textBox1.TabIndex = 1;
|
this.textBox1.TabIndex = 1;
|
||||||
this.textBox1.Text = "Choose from one of the following:";
|
this.textBox1.Text = "Choose from one of the following:";
|
||||||
//
|
//
|
||||||
// Form1
|
// Form1
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(501, 339);
|
this.ClientSize = new System.Drawing.Size(501, 339);
|
||||||
this.Controls.Add(this.textBox1);
|
this.Controls.Add(this.textBox1);
|
||||||
this.Controls.Add(this.comboBox1);
|
this.Controls.Add(this.comboBox1);
|
||||||
this.Name = "Form1";
|
this.Name = "Form1";
|
||||||
this.Text = "OpenSim Client Launcher";
|
this.Text = "OpenSim Client Launcher";
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private System.Windows.Forms.ComboBox comboBox1;
|
private System.Windows.Forms.ComboBox comboBox1;
|
||||||
private System.Windows.Forms.TextBox textBox1;
|
private System.Windows.Forms.TextBox textBox1;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,194 +1,194 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
|
|
||||||
namespace LaunchSLClient
|
namespace LaunchSLClient
|
||||||
{
|
{
|
||||||
public partial class Form1 : Form
|
public partial class Form1 : Form
|
||||||
{
|
{
|
||||||
string gridUrl = "";
|
string gridUrl = "";
|
||||||
string sandboxUrl = "";
|
string sandboxUrl = "";
|
||||||
string deepGridUrl = "http://user.deepgrid.com:8002/";
|
string deepGridUrl = "http://user.deepgrid.com:8002/";
|
||||||
string osGridUrl = "http://www.osgrid.org:8002/";
|
string osGridUrl = "http://www.osgrid.org:8002/";
|
||||||
string runUrl = "";
|
string runUrl = "";
|
||||||
string runLine = "";
|
string runLine = "";
|
||||||
Object exeFlags;
|
Object exeFlags;
|
||||||
Object exePath;
|
Object exePath;
|
||||||
|
|
||||||
|
|
||||||
public Form1()
|
public Form1()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
ArrayList menuItems=new ArrayList();
|
ArrayList menuItems=new ArrayList();
|
||||||
menuItems.Add("Please select one:");
|
menuItems.Add("Please select one:");
|
||||||
string sandboxHostName = "";
|
string sandboxHostName = "";
|
||||||
string sandboxPort = "";
|
string sandboxPort = "";
|
||||||
Object simPath = null;
|
Object simPath = null;
|
||||||
FileInfo defaultFile;
|
FileInfo defaultFile;
|
||||||
StreamReader stream;
|
StreamReader stream;
|
||||||
|
|
||||||
|
|
||||||
// get executable path from registry
|
// get executable path from registry
|
||||||
//
|
//
|
||||||
RegistryKey regKey;
|
RegistryKey regKey;
|
||||||
RegistryKey exeKey;
|
RegistryKey exeKey;
|
||||||
regKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Linden Research, Inc.\SecondLife");
|
regKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Linden Research, Inc.\SecondLife");
|
||||||
if (regKey == null)
|
if (regKey == null)
|
||||||
{
|
{
|
||||||
throw new LauncherException("Can't find Second Life. Are you sure it is installed?", "LauncherException.Form1");
|
throw new LauncherException("Can't find Second Life. Are you sure it is installed?", "LauncherException.Form1");
|
||||||
}
|
}
|
||||||
Object exe = regKey.GetValue("Exe");
|
Object exe = regKey.GetValue("Exe");
|
||||||
exeFlags = regKey.GetValue("Flags");
|
exeFlags = regKey.GetValue("Flags");
|
||||||
exePath = regKey.GetValue("");
|
exePath = regKey.GetValue("");
|
||||||
runLine = exePath.ToString() + "\\" + exe.ToString();
|
runLine = exePath.ToString() + "\\" + exe.ToString();
|
||||||
Registry.LocalMachine.Flush();
|
Registry.LocalMachine.Flush();
|
||||||
Registry.LocalMachine.Close();
|
Registry.LocalMachine.Close();
|
||||||
|
|
||||||
// find opensim directory
|
// find opensim directory
|
||||||
//
|
//
|
||||||
exeKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\OpenSim\OpenSim");
|
exeKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\OpenSim\OpenSim");
|
||||||
if (exeKey != null)
|
if (exeKey != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
simPath = exeKey.GetValue("Path");
|
simPath = exeKey.GetValue("Path");
|
||||||
|
|
||||||
// build sandbox URL from Regions\default.xml
|
// build sandbox URL from Regions\default.xml
|
||||||
// this is highly dependant on a standard default.xml
|
// this is highly dependant on a standard default.xml
|
||||||
//
|
//
|
||||||
Directory.SetCurrentDirectory(simPath.ToString()); //this should be set to wherever we decide to put the binaries
|
Directory.SetCurrentDirectory(simPath.ToString()); //this should be set to wherever we decide to put the binaries
|
||||||
string text;
|
string text;
|
||||||
Regex myRegex = new Regex(".*internal_ip_port=\\\"(?<port>.*?)\\\".*external_host_name=\\\"(?<name>.*?)\\\".*");
|
Regex myRegex = new Regex(".*internal_ip_port=\\\"(?<port>.*?)\\\".*external_host_name=\\\"(?<name>.*?)\\\".*");
|
||||||
if (File.Exists(@"Regions\default.xml"))
|
if (File.Exists(@"Regions\default.xml"))
|
||||||
{
|
{
|
||||||
defaultFile = new FileInfo(@"Regions\default.xml");
|
defaultFile = new FileInfo(@"Regions\default.xml");
|
||||||
stream = defaultFile.OpenText();
|
stream = defaultFile.OpenText();
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
text = stream.ReadLine();
|
text = stream.ReadLine();
|
||||||
if (text == null)
|
if (text == null)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
MatchCollection theMatches = myRegex.Matches(text);
|
MatchCollection theMatches = myRegex.Matches(text);
|
||||||
foreach (Match theMatch in theMatches)
|
foreach (Match theMatch in theMatches)
|
||||||
{
|
{
|
||||||
if (theMatch.Length != 0)
|
if (theMatch.Length != 0)
|
||||||
{
|
{
|
||||||
sandboxHostName = theMatch.Groups["name"].ToString();
|
sandboxHostName = theMatch.Groups["name"].ToString();
|
||||||
sandboxPort = theMatch.Groups["port"].ToString();
|
sandboxPort = theMatch.Groups["port"].ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (text != null);
|
} while (text != null);
|
||||||
stream.Close();
|
stream.Close();
|
||||||
sandboxUrl = "http:\\" + sandboxHostName + ":" + sandboxPort;
|
sandboxUrl = "http:\\" + sandboxHostName + ":" + sandboxPort;
|
||||||
menuItems.Add("Local Sandbox");
|
menuItems.Add("Local Sandbox");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox.Show("No OpenSim config files found. Please run OpenSim and finish configuration to run a local sim. Showing public grids only", "No OpenSim");
|
MessageBox.Show("No OpenSim config files found. Please run OpenSim and finish configuration to run a local sim. Showing public grids only", "No OpenSim");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//build local grid URL from network_servers_information.xml
|
//build local grid URL from network_servers_information.xml
|
||||||
// this is highly dependant on a standard default.xml
|
// this is highly dependant on a standard default.xml
|
||||||
//
|
//
|
||||||
myRegex = new Regex(".*UserServerURL=\\\"(?<url>.*?)\\\".*");
|
myRegex = new Regex(".*UserServerURL=\\\"(?<url>.*?)\\\".*");
|
||||||
if (File.Exists(@"network_servers_information.xml"))
|
if (File.Exists(@"network_servers_information.xml"))
|
||||||
{
|
{
|
||||||
defaultFile = new FileInfo(@"network_servers_information.xml");
|
defaultFile = new FileInfo(@"network_servers_information.xml");
|
||||||
|
|
||||||
|
|
||||||
stream = defaultFile.OpenText();
|
stream = defaultFile.OpenText();
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
text = stream.ReadLine();
|
text = stream.ReadLine();
|
||||||
if (text == null)
|
if (text == null)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
MatchCollection theMatches = myRegex.Matches(text);
|
MatchCollection theMatches = myRegex.Matches(text);
|
||||||
foreach (Match theMatch in theMatches)
|
foreach (Match theMatch in theMatches)
|
||||||
{
|
{
|
||||||
if (theMatch.Length != 0)
|
if (theMatch.Length != 0)
|
||||||
{
|
{
|
||||||
gridUrl = theMatch.Groups["url"].ToString();
|
gridUrl = theMatch.Groups["url"].ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (text != null);
|
} while (text != null);
|
||||||
stream.Close();
|
stream.Close();
|
||||||
if (gridUrl != null)
|
if (gridUrl != null)
|
||||||
{
|
{
|
||||||
menuItems.Add("Local Grid Server");
|
menuItems.Add("Local Grid Server");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox.Show("No OpenSim installed. Showing public grids only", "No OpenSim");
|
MessageBox.Show("No OpenSim installed. Showing public grids only", "No OpenSim");
|
||||||
}
|
}
|
||||||
menuItems.Add("DeepGrid - www.deepgrid.com");
|
menuItems.Add("DeepGrid - www.deepgrid.com");
|
||||||
menuItems.Add("OSGrid - www.osgrid.org");
|
menuItems.Add("OSGrid - www.osgrid.org");
|
||||||
menuItems.Add("Linden Labs - www.secondlife.com");
|
menuItems.Add("Linden Labs - www.secondlife.com");
|
||||||
comboBox1.DataSource=menuItems;
|
comboBox1.DataSource=menuItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void radioButton1_CheckedChanged(object sender, EventArgs e)
|
private void radioButton1_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
|
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (comboBox1.Text == "Please select one:") { return; }
|
if (comboBox1.Text == "Please select one:") { return; }
|
||||||
if (comboBox1.Text == "Local Sandbox") { runUrl=" - loginuri " + sandboxUrl;}
|
if (comboBox1.Text == "Local Sandbox") { runUrl=" - loginuri " + sandboxUrl;}
|
||||||
if (comboBox1.Text == "Local Grid Server") { runUrl = " - loginuri " + gridUrl; }
|
if (comboBox1.Text == "Local Grid Server") { runUrl = " - loginuri " + gridUrl; }
|
||||||
if (comboBox1.Text == "DeepGrid - www.deepgrid.com") { runUrl = " - loginuri " + deepGridUrl; }
|
if (comboBox1.Text == "DeepGrid - www.deepgrid.com") { runUrl = " - loginuri " + deepGridUrl; }
|
||||||
if (comboBox1.Text == "OSGrid - www.osgrid.org") { runUrl = " - loginuri " + osGridUrl; }
|
if (comboBox1.Text == "OSGrid - www.osgrid.org") { runUrl = " - loginuri " + osGridUrl; }
|
||||||
if (comboBox1.Text == "Linden Labs - www.secondlife.com") { runUrl = ""; }
|
if (comboBox1.Text == "Linden Labs - www.secondlife.com") { runUrl = ""; }
|
||||||
System.Diagnostics.Process proc = new System.Diagnostics.Process();
|
System.Diagnostics.Process proc = new System.Diagnostics.Process();
|
||||||
proc.StartInfo.FileName = runLine;
|
proc.StartInfo.FileName = runLine;
|
||||||
proc.StartInfo.Arguments = exeFlags.ToString() + " " + runUrl;
|
proc.StartInfo.Arguments = exeFlags.ToString() + " " + runUrl;
|
||||||
proc.StartInfo.UseShellExecute = false;
|
proc.StartInfo.UseShellExecute = false;
|
||||||
proc.StartInfo.RedirectStandardOutput = false;
|
proc.StartInfo.RedirectStandardOutput = false;
|
||||||
proc.StartInfo.WorkingDirectory = exePath.ToString();
|
proc.StartInfo.WorkingDirectory = exePath.ToString();
|
||||||
proc.Start();
|
proc.Start();
|
||||||
proc.WaitForExit();
|
proc.WaitForExit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,120 +1,120 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
|
|
||||||
Version 2.0
|
Version 2.0
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
The primary goals of this format is to allow a simple XML format
|
||||||
that is mostly human readable. The generation and parsing of the
|
that is mostly human readable. The generation and parsing of the
|
||||||
various data types are done through the TypeConverter classes
|
various data types are done through the TypeConverter classes
|
||||||
associated with the data types.
|
associated with the data types.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
... ado.net/XML headers & schema ...
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
<resheader name="version">2.0</resheader>
|
<resheader name="version">2.0</resheader>
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
<comment>This is a comment</comment>
|
<comment>This is a comment</comment>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
There are any number of "resheader" rows that contain simple
|
||||||
name/value pairs.
|
name/value pairs.
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
Each data row contains a name, and value. The row also contains a
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
text/value conversion through the TypeConverter architecture.
|
text/value conversion through the TypeConverter architecture.
|
||||||
Classes that don't support this are serialized and stored with the
|
Classes that don't support this are serialized and stored with the
|
||||||
mimetype set.
|
mimetype set.
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
The mimetype is used for serialized objects, and tells the
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
read any of the formats listed below.
|
read any of the formats listed below.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
value : The object must be serialized into a byte array
|
value : The object must be serialized into a byte array
|
||||||
: using a System.ComponentModel.TypeConverter
|
: using a System.ComponentModel.TypeConverter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
-->
|
-->
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:choice maxOccurs="unbounded">
|
<xsd:choice maxOccurs="unbounded">
|
||||||
<xsd:element name="metadata">
|
<xsd:element name="metadata">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
<xsd:attribute ref="xml:space" />
|
<xsd:attribute ref="xml:space" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
<xsd:element name="assembly">
|
<xsd:element name="assembly">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
<xsd:element name="data">
|
<xsd:element name="data">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
<xsd:attribute ref="xml:space" />
|
<xsd:attribute ref="xml:space" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
<xsd:element name="resheader">
|
<xsd:element name="resheader">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
</xsd:choice>
|
</xsd:choice>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
</xsd:schema>
|
</xsd:schema>
|
||||||
<resheader name="resmimetype">
|
<resheader name="resmimetype">
|
||||||
<value>text/microsoft-resx</value>
|
<value>text/microsoft-resx</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="version">
|
<resheader name="version">
|
||||||
<value>2.0</value>
|
<value>2.0</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="reader">
|
<resheader name="reader">
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
</root>
|
</root>
|
|
@ -1,79 +1,79 @@
|
||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
<ProductVersion>8.0.50727</ProductVersion>
|
<ProductVersion>8.0.50727</ProductVersion>
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
<SchemaVersion>2.0</SchemaVersion>
|
||||||
<ProjectGuid>{50FD2DCD-2E2D-413C-8260-D9CD22405895}</ProjectGuid>
|
<ProjectGuid>{50FD2DCD-2E2D-413C-8260-D9CD22405895}</ProjectGuid>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
<RootNamespace>LaunchSLClient</RootNamespace>
|
<RootNamespace>LaunchSLClient</RootNamespace>
|
||||||
<AssemblyName>LaunchSLClient</AssemblyName>
|
<AssemblyName>LaunchSLClient</AssemblyName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Deployment" />
|
<Reference Include="System.Deployment" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Form1.cs">
|
<Compile Include="Form1.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Form1.Designer.cs">
|
<Compile Include="Form1.Designer.cs">
|
||||||
<DependentUpon>Form1.cs</DependentUpon>
|
<DependentUpon>Form1.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="LauncherException.cs" />
|
<Compile Include="LauncherException.cs" />
|
||||||
<Compile Include="Program.cs" />
|
<Compile Include="Program.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<EmbeddedResource Include="Form1.resx">
|
<EmbeddedResource Include="Form1.resx">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
<DependentUpon>Form1.cs</DependentUpon>
|
<DependentUpon>Form1.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
<EmbeddedResource Include="Properties\Resources.resx">
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
<Generator>ResXFileCodeGenerator</Generator>
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<Compile Include="Properties\Resources.Designer.cs">
|
<Compile Include="Properties\Resources.Designer.cs">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<None Include="Properties\Settings.settings">
|
<None Include="Properties\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
</None>
|
</None>
|
||||||
<Compile Include="Properties\Settings.Designer.cs">
|
<Compile Include="Properties\Settings.Designer.cs">
|
||||||
<AutoGen>True</AutoGen>
|
<AutoGen>True</AutoGen>
|
||||||
<DependentUpon>Settings.settings</DependentUpon>
|
<DependentUpon>Settings.settings</DependentUpon>
|
||||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||||
</Compile>
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
</Target>
|
</Target>
|
||||||
<Target Name="AfterBuild">
|
<Target Name="AfterBuild">
|
||||||
</Target>
|
</Target>
|
||||||
-->
|
-->
|
||||||
</Project>
|
</Project>
|
|
@ -1,53 +1,53 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace LaunchSLClient
|
namespace LaunchSLClient
|
||||||
{
|
{
|
||||||
class LauncherException : ApplicationException
|
class LauncherException : ApplicationException
|
||||||
{
|
{
|
||||||
|
|
||||||
private const string CUSTOMMESSAGE = "The SL Client Launcher has failed with the following error: ";
|
private const string CUSTOMMESSAGE = "The SL Client Launcher has failed with the following error: ";
|
||||||
|
|
||||||
private LauncherException() { }
|
private LauncherException() { }
|
||||||
|
|
||||||
public LauncherException(string errorMesssage, string source)
|
public LauncherException(string errorMesssage, string source)
|
||||||
: base (CUSTOMMESSAGE + errorMesssage)
|
: base (CUSTOMMESSAGE + errorMesssage)
|
||||||
{
|
{
|
||||||
base.Source = source;
|
base.Source = source;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LauncherException(string errorMessage, string source, Exception innerException)
|
public LauncherException(string errorMessage, string source, Exception innerException)
|
||||||
: base(CUSTOMMESSAGE + errorMessage, innerException)
|
: base(CUSTOMMESSAGE + errorMessage, innerException)
|
||||||
{
|
{
|
||||||
base.Source = source;
|
base.Source = source;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,57 +1,57 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
* Copyright (c) Contributors, http://www.openmetaverse.org/
|
||||||
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions are met:
|
* modification, are permitted provided that the following conditions are met:
|
||||||
* * Redistributions of source code must retain the above copyright
|
* * Redistributions of source code must retain the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* notice, this list of conditions and the following disclaimer.
|
||||||
* * Redistributions in binary form must reproduce the above copyright
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
* notice, this list of conditions and the following disclaimer in the
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
* documentation and/or other materials provided with the distribution.
|
* documentation and/or other materials provided with the distribution.
|
||||||
* * Neither the name of the OpenSim Project nor the
|
* * Neither the name of the OpenSim Project nor the
|
||||||
* names of its contributors may be used to endorse or promote products
|
* names of its contributors may be used to endorse or promote products
|
||||||
* derived from this software without specific prior written permission.
|
* derived from this software without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY
|
||||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
|
||||||
namespace LaunchSLClient
|
namespace LaunchSLClient
|
||||||
{
|
{
|
||||||
static class Program
|
static class Program
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The main entry point for the application.
|
/// The main entry point for the application.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[STAThread]
|
[STAThread]
|
||||||
static void Main()
|
static void Main()
|
||||||
{
|
{
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
Application.Run(new Form1());
|
Application.Run(new Form1());
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
// Handles all unhandled errors
|
// Handles all unhandled errors
|
||||||
MessageBox.Show(ex.Message,"Unhandled Error");
|
MessageBox.Show(ex.Message,"Unhandled Error");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,33 +1,33 @@
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// General Information about an assembly is controlled through the following
|
// General Information about an assembly is controlled through the following
|
||||||
// set of attributes. Change these attribute values to modify the information
|
// set of attributes. Change these attribute values to modify the information
|
||||||
// associated with an assembly.
|
// associated with an assembly.
|
||||||
[assembly: AssemblyTitle("LaunchSLClient")]
|
[assembly: AssemblyTitle("LaunchSLClient")]
|
||||||
[assembly: AssemblyDescription("")]
|
[assembly: AssemblyDescription("")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("Home")]
|
[assembly: AssemblyCompany("Home")]
|
||||||
[assembly: AssemblyProduct("LaunchSLClient")]
|
[assembly: AssemblyProduct("LaunchSLClient")]
|
||||||
[assembly: AssemblyCopyright("Copyright © Home 2007")]
|
[assembly: AssemblyCopyright("Copyright © Home 2007")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
// to COM components. If you need to access a type in this assembly from
|
// to COM components. If you need to access a type in this assembly from
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
// COM, set the ComVisible attribute to true on that type.
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
||||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||||
[assembly: Guid("b08c6904-e6cc-4d9c-8d24-feb0464b1648")]
|
[assembly: Guid("b08c6904-e6cc-4d9c-8d24-feb0464b1648")]
|
||||||
|
|
||||||
// Version information for an assembly consists of the following four values:
|
// Version information for an assembly consists of the following four values:
|
||||||
//
|
//
|
||||||
// Major Version
|
// Major Version
|
||||||
// Minor Version
|
// Minor Version
|
||||||
// Build Number
|
// Build Number
|
||||||
// Revision
|
// Revision
|
||||||
//
|
//
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
[assembly: AssemblyVersion("1.0.0.0")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||||
|
|
|
@ -1,71 +1,71 @@
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:2.0.50727.832
|
// Runtime Version:2.0.50727.832
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace LaunchSLClient.Properties
|
namespace LaunchSLClient.Properties
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||||
// class via a tool like ResGen or Visual Studio.
|
// class via a tool like ResGen or Visual Studio.
|
||||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||||
// with the /str option, or rebuild your VS project.
|
// with the /str option, or rebuild your VS project.
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
internal class Resources
|
internal class Resources
|
||||||
{
|
{
|
||||||
|
|
||||||
private static global::System.Resources.ResourceManager resourceMan;
|
private static global::System.Resources.ResourceManager resourceMan;
|
||||||
|
|
||||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||||
|
|
||||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||||
internal Resources()
|
internal Resources()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
/// Returns the cached ResourceManager instance used by this class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
internal static global::System.Resources.ResourceManager ResourceManager
|
internal static global::System.Resources.ResourceManager ResourceManager
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if ((resourceMan == null))
|
if ((resourceMan == null))
|
||||||
{
|
{
|
||||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LaunchSLClient.Properties.Resources", typeof(Resources).Assembly);
|
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LaunchSLClient.Properties.Resources", typeof(Resources).Assembly);
|
||||||
resourceMan = temp;
|
resourceMan = temp;
|
||||||
}
|
}
|
||||||
return resourceMan;
|
return resourceMan;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Overrides the current thread's CurrentUICulture property for all
|
/// Overrides the current thread's CurrentUICulture property for all
|
||||||
/// resource lookups using this strongly typed resource class.
|
/// resource lookups using this strongly typed resource class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
internal static global::System.Globalization.CultureInfo Culture
|
internal static global::System.Globalization.CultureInfo Culture
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return resourceCulture;
|
return resourceCulture;
|
||||||
}
|
}
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
resourceCulture = value;
|
resourceCulture = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,117 +1,117 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<root>
|
<root>
|
||||||
<!--
|
<!--
|
||||||
Microsoft ResX Schema
|
Microsoft ResX Schema
|
||||||
|
|
||||||
Version 2.0
|
Version 2.0
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
The primary goals of this format is to allow a simple XML format
|
||||||
that is mostly human readable. The generation and parsing of the
|
that is mostly human readable. The generation and parsing of the
|
||||||
various data types are done through the TypeConverter classes
|
various data types are done through the TypeConverter classes
|
||||||
associated with the data types.
|
associated with the data types.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
... ado.net/XML headers & schema ...
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
<resheader name="version">2.0</resheader>
|
<resheader name="version">2.0</resheader>
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
<comment>This is a comment</comment>
|
<comment>This is a comment</comment>
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
There are any number of "resheader" rows that contain simple
|
||||||
name/value pairs.
|
name/value pairs.
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
Each data row contains a name, and value. The row also contains a
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
text/value conversion through the TypeConverter architecture.
|
text/value conversion through the TypeConverter architecture.
|
||||||
Classes that don't support this are serialized and stored with the
|
Classes that don't support this are serialized and stored with the
|
||||||
mimetype set.
|
mimetype set.
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
The mimetype is used for serialized objects, and tells the
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
read any of the formats listed below.
|
read any of the formats listed below.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
value : The object must be serialized with
|
value : The object must be serialized with
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
value : The object must be serialized into a byte array
|
value : The object must be serialized into a byte array
|
||||||
: using a System.ComponentModel.TypeConverter
|
: using a System.ComponentModel.TypeConverter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
-->
|
-->
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:choice maxOccurs="unbounded">
|
<xsd:choice maxOccurs="unbounded">
|
||||||
<xsd:element name="metadata">
|
<xsd:element name="metadata">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
<xsd:element name="assembly">
|
<xsd:element name="assembly">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
<xsd:element name="data">
|
<xsd:element name="data">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
<xsd:element name="resheader">
|
<xsd:element name="resheader">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
</xsd:sequence>
|
</xsd:sequence>
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
</xsd:choice>
|
</xsd:choice>
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</xsd:element>
|
||||||
</xsd:schema>
|
</xsd:schema>
|
||||||
<resheader name="resmimetype">
|
<resheader name="resmimetype">
|
||||||
<value>text/microsoft-resx</value>
|
<value>text/microsoft-resx</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="version">
|
<resheader name="version">
|
||||||
<value>2.0</value>
|
<value>2.0</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="reader">
|
<resheader name="reader">
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
</root>
|
</root>
|
|
@ -1,30 +1,30 @@
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// <auto-generated>
|
// <auto-generated>
|
||||||
// This code was generated by a tool.
|
// This code was generated by a tool.
|
||||||
// Runtime Version:2.0.50727.832
|
// Runtime Version:2.0.50727.832
|
||||||
//
|
//
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
// the code is regenerated.
|
// the code is regenerated.
|
||||||
// </auto-generated>
|
// </auto-generated>
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
namespace LaunchSLClient.Properties
|
namespace LaunchSLClient.Properties
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")]
|
||||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||||
{
|
{
|
||||||
|
|
||||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||||
|
|
||||||
public static Settings Default
|
public static Settings Default
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return defaultInstance;
|
return defaultInstance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||||
<Profiles>
|
<Profiles>
|
||||||
<Profile Name="(Default)" />
|
<Profile Name="(Default)" />
|
||||||
</Profiles>
|
</Profiles>
|
||||||
<Settings />
|
<Settings />
|
||||||
</SettingsFile>
|
</SettingsFile>
|
||||||
|
|
Loading…
Reference in New Issue