From 67e12b95ea7b68f4904a7484d77ecfd787d16d0c Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 30 Oct 2007 09:05:31 +0000 Subject: * Optimized usings * Shortened type references * Removed redundant 'this' qualifier --- .../Framework/Communications/Capabilities/Caps.cs | 136 ++++++++++++--------- .../Communications/Capabilities/LLSDArray.cs | 3 +- .../Capabilities/LLSDAssetUploadComplete.cs | 3 +- .../Capabilities/LLSDAssetUploadRequest.cs | 5 +- .../Capabilities/LLSDAssetUploadResponse.cs | 7 +- .../Communications/Capabilities/LLSDCapEvent.cs | 3 +- .../Communications/Capabilities/LLSDCapsDetails.cs | 12 +- .../Communications/Capabilities/LLSDEmpty.cs | 3 +- .../Communications/Capabilities/LLSDHelpers.cs | 32 ++--- .../Communications/Capabilities/LLSDItemUpdate.cs | 5 +- .../Communications/Capabilities/LLSDMapLayer.cs | 3 +- .../Capabilities/LLSDMapLayerResponse.cs | 3 +- .../Communications/Capabilities/LLSDMapRequest.cs | 3 +- .../Communications/Capabilities/LLSDMethod.cs | 6 +- .../Capabilities/LLSDStreamHandler.cs | 19 ++- .../Communications/Capabilities/LLSDTest.cs | 3 +- .../Communications/Capabilities/LLSDType.cs | 10 +- 17 files changed, 113 insertions(+), 143 deletions(-) (limited to 'OpenSim/Framework/Communications/Capabilities') diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index a114b64..23dfcc6 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs @@ -28,18 +28,23 @@ using System; using System.Collections; using System.Collections.Generic; -using System.Text; using System.IO; using libsecondlife; +using OpenSim.Framework; using OpenSim.Framework.Communications.Cache; +using OpenSim.Framework.Console; using OpenSim.Framework.Servers; -using OpenSim.Framework; namespace OpenSim.Region.Capabilities { - public delegate void UpLoadedAsset(string assetName, string description, LLUUID assetID, LLUUID inventoryItem, LLUUID parentFolder, byte[] data, string inventoryType, string assetType); + public delegate void UpLoadedAsset( + string assetName, string description, LLUUID assetID, LLUUID inventoryItem, LLUUID parentFolder, byte[] data, + string inventoryType, string assetType); + public delegate LLUUID UpdateItem(LLUUID itemID, byte[] data); + public delegate void NewInventoryItem(LLUUID userID, InventoryItemBase item); + public delegate LLUUID ItemUpdatedCallback(LLUUID userID, LLUUID itemID, byte[] data); public class Caps @@ -62,7 +67,8 @@ namespace OpenSim.Region.Capabilities public ItemUpdatedCallback ItemUpdatedCall = null; private bool m_dumpAssetsToFile; - public Caps(AssetCache assetCach, BaseHttpServer httpServer, string httpListen, int httpPort, string capsPath, LLUUID agent, bool dumpAssetsToFile) + public Caps(AssetCache assetCach, BaseHttpServer httpServer, string httpListen, int httpPort, string capsPath, + LLUUID agent, bool dumpAssetsToFile) { assetCache = assetCach; m_capsObjectPath = capsPath; @@ -78,12 +84,17 @@ namespace OpenSim.Region.Capabilities /// public void RegisterHandlers() { - OpenSim.Framework.Console.MainLog.Instance.Verbose("CAPS","Registering CAPS handlers"); + MainLog.Instance.Verbose("CAPS", "Registering CAPS handlers"); string capsBase = "/CAPS/" + m_capsObjectPath; try { - httpListener.AddStreamHandler(new LLSDStreamhandler("POST", capsBase + m_mapLayerPath, this.GetMapLayer)); - httpListener.AddStreamHandler(new LLSDStreamhandler("POST", capsBase + m_newInventory, this.NewAgentInventoryRequest)); + httpListener.AddStreamHandler( + new LLSDStreamhandler("POST", capsBase + m_mapLayerPath, + GetMapLayer)); + httpListener.AddStreamHandler( + new LLSDStreamhandler("POST", + capsBase + m_newInventory, + NewAgentInventoryRequest)); AddLegacyCapsHandler(httpListener, m_requestPath, CapsRequest); //AddLegacyCapsHandler(httpListener, m_requestTexture , RequestTexture); @@ -103,7 +114,7 @@ namespace OpenSim.Region.Capabilities string capsBase = "/CAPS/" + m_capsObjectPath; httpListener.AddStreamHandler(new RestStreamHandler("POST", capsBase + path, restMethod)); } - + /// /// /// @@ -113,8 +124,8 @@ namespace OpenSim.Region.Capabilities /// public string CapsRequest(string request, string path, string param) { - // Console.WriteLine("caps request " + request); - string result = LLSDHelpers.SerialiseLLSDReply(this.GetCapabilities()); + // Console.WriteLine("caps request " + request); + string result = LLSDHelpers.SerialiseLLSDReply(GetCapabilities()); return result; } @@ -125,9 +136,10 @@ namespace OpenSim.Region.Capabilities protected LLSDCapsDetails GetCapabilities() { 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.RequestTextureDownload = capsBaseUrl + m_requestTexture; + // caps.RequestTextureDownload = capsBaseUrl + m_requestTexture; caps.NewFileAgentInventory = capsBaseUrl + m_newInventory; caps.UpdateNotecardAgentInventory = capsBaseUrl + m_notecardUpdatePath; caps.UpdateScriptAgentInventory = capsBaseUrl + m_notecardUpdatePath; @@ -142,7 +154,7 @@ namespace OpenSim.Region.Capabilities public LLSDMapLayerResponse GetMapLayer(LLSDMapRequest mapReq) { LLSDMapLayerResponse mapResponse = new LLSDMapLayerResponse(); - mapResponse.LayerData.Array.Add(this.GetLLSDMapLayerResponse()); + mapResponse.LayerData.Array.Add(GetLLSDMapLayerResponse()); return mapResponse; } @@ -174,6 +186,7 @@ namespace OpenSim.Region.Capabilities } #region EventQueue (Currently not enabled) + /// /// /// @@ -184,10 +197,10 @@ namespace OpenSim.Region.Capabilities public string ProcessEventQueue(string request, string path, string param) { string res = ""; - - if (this.CapsEventQueue.Count > 0) + + if (CapsEventQueue.Count > 0) { - lock (this.CapsEventQueue) + lock (CapsEventQueue) { string item = CapsEventQueue.Dequeue(); res = item; @@ -195,7 +208,7 @@ namespace OpenSim.Region.Capabilities } else { - res = this.CreateEmptyEventResponse(); + res = CreateEmptyEventResponse(); } return res; } @@ -214,8 +227,8 @@ namespace OpenSim.Region.Capabilities eventItem.events.Array.Add(new LLSDEmpty()); string res = LLSDHelpers.SerialiseLLSDReply(eventItem); eventQueueCount++; - - this.CapsEventQueue.Enqueue(res); + + CapsEventQueue.Enqueue(res); return res; } @@ -232,6 +245,7 @@ namespace OpenSim.Region.Capabilities eventQueueCount++; return res; } + #endregion /// @@ -243,24 +257,27 @@ namespace OpenSim.Region.Capabilities /// public string NoteCardAgentInventory(string request, string path, string param) { - Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request)); + Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request)); LLSDItemUpdate llsdRequest = new LLSDItemUpdate(); LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); - + string capsBase = "/CAPS/" + m_capsObjectPath; LLUUID newInvItem = llsdRequest.item_id; string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); - ItemUpdater uploader = new ItemUpdater(newInvItem, capsBase + uploaderPath, this.httpListener, m_dumpAssetsToFile ); - uploader.OnUpLoad += this.ItemUpdated; + ItemUpdater uploader = + new ItemUpdater(newInvItem, capsBase + uploaderPath, httpListener, m_dumpAssetsToFile); + uploader.OnUpLoad += ItemUpdated; - httpListener.AddStreamHandler(new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); - string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase + uploaderPath; + httpListener.AddStreamHandler( + new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); + string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase + + uploaderPath; LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse(); uploadResponse.uploader = uploaderURL; uploadResponse.state = "upload"; - + return LLSDHelpers.SerialiseLLSDReply(uploadResponse); } @@ -272,7 +289,7 @@ namespace OpenSim.Region.Capabilities public LLSDAssetUploadResponse NewAgentInventoryRequest(LLSDAssetUploadRequest llsdRequest) { //Console.WriteLine("asset upload request via CAPS" + llsdRequest.inventory_type +" , "+ llsdRequest.asset_type); - + string assetName = llsdRequest.name; string assetDes = llsdRequest.description; string capsBase = "/CAPS/" + m_capsObjectPath; @@ -281,14 +298,18 @@ namespace OpenSim.Region.Capabilities LLUUID parentFolder = llsdRequest.folder_id; string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); - AssetUploader uploader = new AssetUploader(assetName, assetDes, newAsset, newInvItem, parentFolder, llsdRequest.inventory_type, llsdRequest.asset_type, capsBase + uploaderPath, this.httpListener, m_dumpAssetsToFile); - httpListener.AddStreamHandler(new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); - string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase + uploaderPath; + AssetUploader uploader = + new AssetUploader(assetName, assetDes, newAsset, newInvItem, parentFolder, llsdRequest.inventory_type, + llsdRequest.asset_type, capsBase + uploaderPath, httpListener, m_dumpAssetsToFile); + httpListener.AddStreamHandler( + new BinaryStreamHandler("POST", capsBase + uploaderPath, uploader.uploaderCaps)); + string uploaderURL = "http://" + m_httpListenerHostName + ":" + m_httpListenPort.ToString() + capsBase + + uploaderPath; LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse(); uploadResponse.uploader = uploaderURL; uploadResponse.state = "upload"; - uploader.OnUpLoad += this.UploadCompleteHandler; + uploader.OnUpLoad += UploadCompleteHandler; return uploadResponse; } @@ -298,7 +319,9 @@ namespace OpenSim.Region.Capabilities /// /// /// - public void UploadCompleteHandler(string assetName, string assetDescription, LLUUID assetID, LLUUID inventoryItem, LLUUID parentFolder, byte[] data, string inventoryType, string assetType) + public void UploadCompleteHandler(string assetName, string assetDescription, LLUUID assetID, + LLUUID inventoryItem, LLUUID parentFolder, byte[] data, string inventoryType, + string assetType) { sbyte assType = 0; sbyte inType = 0; @@ -319,14 +342,14 @@ namespace OpenSim.Region.Capabilities asset.FullID = assetID; asset.Type = assType; asset.InvType = inType; - asset.Name = assetName; + asset.Name = assetName; asset.Data = data; - this.assetCache.AddAsset(asset); + assetCache.AddAsset(asset); InventoryItemBase item = new InventoryItemBase(); item.avatarID = agentID; item.creatorsID = agentID; - item.inventoryID = inventoryItem; + item.inventoryID = inventoryItem; item.assetID = asset.FullID; item.inventoryDescription = assetDescription; item.inventoryName = assetName; @@ -340,14 +363,13 @@ namespace OpenSim.Region.Capabilities { AddNewInventoryItem(agentID, item); } - } public LLUUID ItemUpdated(LLUUID itemID, byte[] data) { if (ItemUpdatedCall != null) { - return ItemUpdatedCall(this.agentID, itemID, data); + return ItemUpdatedCall(agentID, itemID, data); } return LLUUID.Zero; } @@ -359,7 +381,7 @@ namespace OpenSim.Region.Capabilities private string uploaderPath = ""; private LLUUID newAssetID; private LLUUID inventoryItemID; - private LLUUID parentFolder; + private LLUUID parentFolder; private BaseHttpServer httpListener; private bool m_dumpAssetsToFile; private string m_assetName = ""; @@ -368,7 +390,9 @@ namespace OpenSim.Region.Capabilities private string m_invType = ""; private string m_assetType = ""; - public AssetUploader(string assetName, string description, LLUUID assetID, LLUUID inventoryItem, LLUUID parentFolderID, string invType, string assetType, string path, BaseHttpServer httpServer, bool dumpAssetsToFile) + public AssetUploader(string assetName, string description, LLUUID assetID, LLUUID inventoryItem, + LLUUID parentFolderID, string invType, string assetType, string path, + BaseHttpServer httpServer, bool dumpAssetsToFile) { m_assetName = assetName; m_assetDes = description; @@ -391,7 +415,7 @@ namespace OpenSim.Region.Capabilities /// public string uploaderCaps(byte[] data, string path, string param) { - LLUUID inv = this.inventoryItemID; + LLUUID inv = inventoryItemID; string res = ""; LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete(); uploadComplete.new_asset = newAssetID.ToStringHyphenated(); @@ -399,29 +423,29 @@ namespace OpenSim.Region.Capabilities uploadComplete.state = "complete"; res = LLSDHelpers.SerialiseLLSDReply(uploadComplete); - + httpListener.RemoveStreamHandler("POST", uploaderPath); - if (this.m_dumpAssetsToFile) + if (m_dumpAssetsToFile) { - this.SaveAssetToFile(m_assetName + ".jp2", data); + SaveAssetToFile(m_assetName + ".jp2", data); } if (OnUpLoad != null) { OnUpLoad(m_assetName, m_assetDes, newAssetID, inv, parentFolder, data, m_invType, m_assetType); } - + return res; } private void SaveAssetToFile(string filename, byte[] data) { - FileStream fs = File.Create(filename); - BinaryWriter bw = new BinaryWriter(fs); - bw.Write(data); - bw.Close(); - fs.Close(); + FileStream fs = File.Create(filename); + BinaryWriter bw = new BinaryWriter(fs); + bw.Write(data); + bw.Close(); + fs.Close(); } } @@ -434,7 +458,7 @@ namespace OpenSim.Region.Capabilities private BaseHttpServer httpListener; private bool m_dumpAssetToFile; - public ItemUpdater( LLUUID inventoryItem, string path, BaseHttpServer httpServer, bool dumpAssetToFile) + public ItemUpdater(LLUUID inventoryItem, string path, BaseHttpServer httpServer, bool dumpAssetToFile) { m_dumpAssetToFile = dumpAssetToFile; @@ -452,7 +476,7 @@ namespace OpenSim.Region.Capabilities /// public string uploaderCaps(byte[] data, string path, string param) { - LLUUID inv = this.inventoryItemID; + LLUUID inv = inventoryItemID; string res = ""; LLSDAssetUploadComplete uploadComplete = new LLSDAssetUploadComplete(); LLUUID assetID = LLUUID.Zero; @@ -461,7 +485,7 @@ namespace OpenSim.Region.Capabilities { assetID = OnUpLoad(inv, data); } - + uploadComplete.new_asset = assetID.ToStringHyphenated(); uploadComplete.new_inventory_item = inv; uploadComplete.state = "complete"; @@ -470,9 +494,9 @@ namespace OpenSim.Region.Capabilities httpListener.RemoveStreamHandler("POST", uploaderPath); - if (this.m_dumpAssetToFile) + if (m_dumpAssetToFile) { - this.SaveAssetToFile("updateditem" + Util.RandomClass.Next(1, 1000) + ".dat", data); + SaveAssetToFile("updateditem" + Util.RandomClass.Next(1, 1000) + ".dat", data); } return res; @@ -488,6 +512,4 @@ namespace OpenSim.Region.Capabilities } } } -} - - +} \ No newline at end of file diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDArray.cs b/OpenSim/Framework/Communications/Capabilities/LLSDArray.cs index 2af5a4a..2ed7750 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDArray.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDArray.cs @@ -36,7 +36,6 @@ namespace OpenSim.Region.Capabilities public LLSDArray() { - } } -} +} \ No newline at end of file diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadComplete.cs b/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadComplete.cs index e65e741..d054386 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadComplete.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadComplete.cs @@ -39,7 +39,6 @@ namespace OpenSim.Region.Capabilities public LLSDAssetUploadComplete() { - } } -} +} \ No newline at end of file diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadRequest.cs b/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadRequest.cs index 3a2fe20..7fed27a 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadRequest.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadRequest.cs @@ -26,9 +26,6 @@ * */ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Region.Capabilities @@ -46,4 +43,4 @@ namespace OpenSim.Region.Capabilities { } } -} +} \ No newline at end of file diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadResponse.cs b/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadResponse.cs index c7a9ee6..3ad618d 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadResponse.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDAssetUploadResponse.cs @@ -26,10 +26,6 @@ * */ -using System; -using System.Collections.Generic; -using System.Text; - namespace OpenSim.Region.Capabilities { [LLSDMap] @@ -40,7 +36,6 @@ namespace OpenSim.Region.Capabilities public LLSDAssetUploadResponse() { - } } -} +} \ No newline at end of file diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDCapEvent.cs b/OpenSim/Framework/Communications/Capabilities/LLSDCapEvent.cs index d1894d4..06afac4 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDCapEvent.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDCapEvent.cs @@ -35,7 +35,6 @@ namespace OpenSim.Region.Capabilities public LLSDCapEvent() { - } } -} +} \ No newline at end of file diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDCapsDetails.cs b/OpenSim/Framework/Communications/Capabilities/LLSDCapsDetails.cs index 3184792..35caa15 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDCapsDetails.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDCapsDetails.cs @@ -34,18 +34,14 @@ namespace OpenSim.Region.Capabilities public string MapLayer = ""; public string NewFileAgentInventory = ""; //public string EventQueueGet = ""; - // public string RequestTextureDownload = ""; - // public string ChatSessionRequest = ""; + // public string RequestTextureDownload = ""; + // public string ChatSessionRequest = ""; public string UpdateNotecardAgentInventory = ""; public string UpdateScriptAgentInventory = ""; - // public string ParcelVoiceInfoRequest = ""; + // public string ParcelVoiceInfoRequest = ""; public LLSDCapsDetails() { - } } -} - - - +} \ No newline at end of file diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDEmpty.cs b/OpenSim/Framework/Communications/Capabilities/LLSDEmpty.cs index 0169d3c..69c525c 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDEmpty.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDEmpty.cs @@ -32,7 +32,6 @@ namespace OpenSim.Region.Capabilities { public LLSDEmpty() { - } } -} +} \ No newline at end of file diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs index 8a2215f..8252a63 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDHelpers.cs @@ -51,7 +51,7 @@ namespace OpenSim.Region.Capabilities public static void SerializeLLSDType(XmlTextWriter writer, object obj) { Type myType = obj.GetType(); - LLSDType[] llsdattributes = (LLSDType[])myType.GetCustomAttributes(typeof(LLSDType), false); + LLSDType[] llsdattributes = (LLSDType[]) myType.GetCustomAttributes(typeof (LLSDType), false); if (llsdattributes.Length > 0) { switch (llsdattributes[0].ObjectType) @@ -62,7 +62,8 @@ namespace OpenSim.Region.Capabilities for (int i = 0; i < fields.Length; i++) { 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) { writer.WriteStartElement(String.Empty, "key", String.Empty); @@ -83,7 +84,7 @@ namespace OpenSim.Region.Capabilities case "ARRAY": // LLSDArray arrayObject = obj as LLSDArray; // 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) { writer.WriteStartElement(String.Empty, "array", String.Empty); @@ -105,7 +106,7 @@ namespace OpenSim.Region.Capabilities public static object DeserialiseLLSDMap(Hashtable llsd, object obj) { Type myType = obj.GetType(); - LLSDType[] llsdattributes = (LLSDType[])myType.GetCustomAttributes(typeof(LLSDType), false); + LLSDType[] llsdattributes = (LLSDType[]) myType.GetCustomAttributes(typeof (LLSDType), false); if (llsdattributes.Length > 0) { switch (llsdattributes[0].ObjectType) @@ -114,7 +115,7 @@ namespace OpenSim.Region.Capabilities IDictionaryEnumerator enumerator = llsd.GetEnumerator(); while (enumerator.MoveNext()) { - FieldInfo field = myType.GetField((string)enumerator.Key); + FieldInfo field = myType.GetField((string) enumerator.Key); if (field != null) { if (enumerator.Value is Hashtable) @@ -142,23 +143,4 @@ namespace OpenSim.Region.Capabilities return obj; } } - - - - - - - - - - - - - - - - - - - -} +} \ No newline at end of file diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDItemUpdate.cs b/OpenSim/Framework/Communications/Capabilities/LLSDItemUpdate.cs index 57fc9e8..3842058 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDItemUpdate.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDItemUpdate.cs @@ -26,9 +26,6 @@ * */ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; namespace OpenSim.Region.Capabilities @@ -42,4 +39,4 @@ namespace OpenSim.Region.Capabilities { } } -} +} \ No newline at end of file diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.cs b/OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.cs index 6d17bff..683e479 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDMapLayer.cs @@ -40,7 +40,6 @@ namespace OpenSim.Region.Capabilities public LLSDMapLayer() { - } } -} +} \ No newline at end of file diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDMapLayerResponse.cs b/OpenSim/Framework/Communications/Capabilities/LLSDMapLayerResponse.cs index 7900290..1945a6c 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDMapLayerResponse.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDMapLayerResponse.cs @@ -35,7 +35,6 @@ namespace OpenSim.Region.Capabilities public LLSDMapLayerResponse() { - } } -} +} \ No newline at end of file diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDMapRequest.cs b/OpenSim/Framework/Communications/Capabilities/LLSDMapRequest.cs index 5fa08c9..935f81d 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDMapRequest.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDMapRequest.cs @@ -35,7 +35,6 @@ namespace OpenSim.Region.Capabilities public LLSDMapRequest() { - } } -} +} \ No newline at end of file diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDMethod.cs b/OpenSim/Framework/Communications/Capabilities/LLSDMethod.cs index 67253ee..6bd47e1 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDMethod.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDMethod.cs @@ -26,11 +26,7 @@ * */ -using System; -using System.Collections.Generic; -using System.Text; - namespace OpenSim.Region.Capabilities { public delegate TResponse LLSDMethod(TRequest request); -} +} \ No newline at end of file diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs index 894b276..08e9563 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDStreamHandler.cs @@ -26,13 +26,11 @@ * */ -using System; -using System.Collections.Generic; -using System.Text; -using OpenSim.Framework.Servers; -using System.IO; using System.Collections; +using System.IO; +using System.Text; using libsecondlife; +using OpenSim.Framework.Servers; namespace OpenSim.Region.Capabilities { @@ -42,11 +40,11 @@ namespace OpenSim.Region.Capabilities private LLSDMethod m_method; public LLSDStreamhandler(string httpMethod, string path, LLSDMethod method) - : base(httpMethod, path ) + : base(httpMethod, path) { m_method = method; } - + public override byte[] Handle(string path, Stream request) { //Encoding encoding = Encoding.UTF8; @@ -55,16 +53,15 @@ namespace OpenSim.Region.Capabilities //string requestBody = streamReader.ReadToEnd(); //streamReader.Close(); - Hashtable hash = (Hashtable)LLSD.LLSDDeserialize( request ); + Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(request); TRequest llsdRequest = new TRequest(); LLSDHelpers.DeserialiseLLSDMap(hash, llsdRequest); TResponse response = m_method(llsdRequest); Encoding encoding = new UTF8Encoding(false); - - return encoding.GetBytes( LLSDHelpers.SerialiseLLSDReply(response) ); + return encoding.GetBytes(LLSDHelpers.SerialiseLLSDReply(response)); } } -} +} \ No newline at end of file diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDTest.cs b/OpenSim/Framework/Communications/Capabilities/LLSDTest.cs index f70fa11..c2a6054 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDTest.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDTest.cs @@ -35,7 +35,6 @@ namespace OpenSim.Region.Capabilities public LLSDTest() { - } } -} +} \ No newline at end of file diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDType.cs b/OpenSim/Framework/Communications/Capabilities/LLSDType.cs index 6af7f39..a90ae03 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDType.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDType.cs @@ -37,23 +37,19 @@ namespace OpenSim.Region.Capabilities public LLSDType(string type) { myType = type; - } public string ObjectType { - get - { - return myType; - } + get { return myType; } } } [AttributeUsage(AttributeTargets.Class)] public class LLSDMap : LLSDType { - public LLSDMap() : base( "MAP" ) + public LLSDMap() : base("MAP") { } } -} +} \ No newline at end of file -- cgit v1.1