Update svn properties. Formatting cleanup.

This commit is contained in:
Jeff Ames
2008-05-25 23:27:38 +00:00
parent c20f7d6171
commit 5d77625e9a
44 changed files with 403 additions and 400 deletions

View File

@@ -45,7 +45,7 @@ namespace OpenSim.Framework.Communications
m_server.AddStreamHandler(new RestStreamHandler("POST", path, restMethod));
}
public string CapsRequest(string request, string path, string param,
public string CapsRequest(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
System.Console.WriteLine("new caps request " + request + " from path " + path);

View File

@@ -211,7 +211,7 @@ namespace OpenSim.Framework.Communications.Capabilities
/// <param name="httpRequest">HTTP request header object</param>
/// <param name="httpResponse">HTTP response header object</param>
/// <returns></returns>
public string CapsRequest(string request, string path, string param,
public string CapsRequest(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
m_log.Debug("[CAPS]: Seed Caps Request in region: " + m_regionName);
@@ -509,7 +509,7 @@ namespace OpenSim.Framework.Communications.Capabilities
/// <param name="httpRequest">HTTP request header object</param>
/// <param name="httpResponse">HTTP response header object</param>
/// <returns></returns>
public string ScriptTaskInventory(string request, string path, string param,
public string ScriptTaskInventory(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
try
@@ -564,7 +564,7 @@ namespace OpenSim.Framework.Communications.Capabilities
/// <param name="path"></param>
/// <param name="param"></param>
/// <returns></returns>
public string NoteCardAgentInventory(string request, string path, string param,
public string NoteCardAgentInventory(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName);

View File

@@ -44,7 +44,7 @@ namespace OpenSim.Framework.Communications.Capabilities
m_method = method;
}
public override byte[] Handle(string path, Stream request,
public override byte[] Handle(string path, Stream request,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
//Encoding encoding = Encoding.UTF8;

View File

@@ -73,9 +73,9 @@ namespace OpenSim.Framework
public class PrimitiveBaseShape
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static readonly LLObject.TextureEntry m_defaultTexture;
private byte[] m_textureEntry;
public ushort PathBegin;
@@ -93,39 +93,39 @@ namespace OpenSim.Framework
public sbyte PathTwist;
public sbyte PathTwistBegin;
public byte PCode;
public ushort ProfileBegin;
public ushort ProfileBegin;
public byte ProfileCurve
{
get { return (byte)((byte)HollowShape | (byte)ProfileShape); }
set
set
{
// Handle hollow shape component
byte hollowShapeByte = (byte)(value & 0xf0);
if (!Enum.IsDefined(typeof(HollowShape), hollowShapeByte))
{
m_log.WarnFormat(
"[SHAPE]: Attempt to set a ProfileCurve with a hollow shape value of {0}, which isn't a valid enum. Replacing with default shape.",
hollowShapeByte);
this.HollowShape = HollowShape.Same;
}
else
{
this.HollowShape = (HollowShape)hollowShapeByte;
}
// Handle profile shape component
byte profileShapeByte = (byte)(value & 0xf);
if (!Enum.IsDefined(typeof(ProfileShape), profileShapeByte))
{
m_log.WarnFormat(
"[SHAPE]: Attempt to set a ProfileCurve with a profile shape value of {0}, which isn't a valid enum. Replacing with square.",
profileShapeByte);
this.ProfileShape = ProfileShape.Square;
}
else
@@ -133,13 +133,13 @@ namespace OpenSim.Framework
this.ProfileShape = (ProfileShape)profileShapeByte;
}
}
}
}
public ushort ProfileEnd;
public ushort ProfileHollow;
public LLVector3 Scale;
public byte State;
// Sculpted
[XmlIgnore] public LLUUID SculptTexture = LLUUID.Zero;
[XmlIgnore] public byte SculptType = (byte)0;
@@ -154,7 +154,7 @@ namespace OpenSim.Framework
[XmlIgnore] public float FlexiForceX = 0f;
[XmlIgnore] public float FlexiForceY = 0f;
[XmlIgnore] public float FlexiForceZ = 0f;
//Bright n sparkly
[XmlIgnore] public float LightColorR = 0f;
[XmlIgnore] public float LightColorG = 0f;
@@ -198,8 +198,8 @@ namespace OpenSim.Framework
}
public ProfileShape ProfileShape;
public HollowShape HollowShape;
public HollowShape HollowShape;
public static PrimitiveBaseShape Default
{
@@ -394,7 +394,7 @@ namespace OpenSim.Framework
returnbyte[0] = 0;
return returnbyte;
}
return returnbytes;
//m_log.Info("[EXTRAPARAMS]: Length = " + m_shape.ExtraParams.Length.ToString());
@@ -451,11 +451,11 @@ namespace OpenSim.Framework
int i = 0;
byte extraParamCount = data[i++];
for (int k = 0; k < extraParamCount; k++)
{
ushort epType = Helpers.BytesToUInt16(data, i);
i += 2;
uint paramLength = Helpers.BytesToUIntBig(data, i);
@@ -611,7 +611,7 @@ namespace OpenSim.Framework
// Alpha channel in color is intensity
LLColor tmpColor = new LLColor(LightColorR,LightColorG,LightColorB,LightIntensity);
tmpColor.GetBytes().CopyTo(data, 0);
Helpers.FloatToBytes(LightRadius).CopyTo(data, 4);
Helpers.FloatToBytes(LightCutoff).CopyTo(data, 8);

View File

@@ -164,8 +164,8 @@ namespace OpenSim.Framework.Servers
if (TryGetAgentHandler(request, response, out agentHandler))
{
// m_log.DebugFormat("[HTTP-AGENT] Handler located for {0}", request.UserAgent);
if(HandleAgentRequest(agentHandler, request, response))
return;
if (HandleAgentRequest(agentHandler, request, response))
return;
}
}
@@ -177,22 +177,22 @@ namespace OpenSim.Framework.Servers
string handlerKey = GetHandlerKey(request.HttpMethod, path);
//m_log.DebugFormat("[BASE HTTP SERVER]: Handling {0} request for {1}", request.HttpMethod, path);
if (TryGetStreamHandler(handlerKey, out requestHandler))
{
// Okay, so this is bad, but should be considered temporary until everything is IStreamHandler.
byte[] buffer;
if (requestHandler is IStreamedRequestHandler)
{
IStreamedRequestHandler streamedRequestHandler = requestHandler as IStreamedRequestHandler;
buffer = streamedRequestHandler.Handle(path, request.InputStream, request, response);
}
else
{
IStreamHandler streamHandler = (IStreamHandler) requestHandler;
using (MemoryStream memoryStream = new MemoryStream())
{
streamHandler.Handle(path, request.InputStream, memoryStream, request, response);
@@ -200,11 +200,11 @@ namespace OpenSim.Framework.Servers
buffer = memoryStream.ToArray();
}
}
request.InputStream.Close();
if (!response.IsContentTypeSet) response.ContentType = requestHandler.ContentType;
response.ContentLength64 = buffer.LongLength;
try
{
response.OutputStream.Write(buffer, 0, buffer.Length);
@@ -216,7 +216,7 @@ namespace OpenSim.Framework.Servers
}
return;
}
switch (request.ContentType)
{
case null:
@@ -479,7 +479,7 @@ namespace OpenSim.Framework.Servers
private bool HandleAgentRequest(IHttpAgentHandler handler, OSHttpRequest request, OSHttpResponse response)
{
// In the case of REST, then handler is responsible for ALL aspects of
// In the case of REST, then handler is responsible for ALL aspects of
// the request/response handling. Nothing is done here, not even encoding.
try

View File

@@ -32,7 +32,7 @@ namespace OpenSim.Framework.Servers
{
public abstract class BaseStreamHandler : BaseRequestHandler, IStreamedRequestHandler
{
public abstract byte[] Handle(string path, Stream request,
public abstract byte[] Handle(string path, Stream request,
OSHttpRequest httpRequest, OSHttpResponse httpResponse);
protected BaseStreamHandler(string httpMethod, string path) : base(httpMethod, path)

View File

@@ -55,7 +55,7 @@ namespace OpenSim.Framework.Servers
get { return _acceptTypes; }
}
public Encoding ContentEncoding
public Encoding ContentEncoding
{
get { return _contentEncoding; }
}
@@ -110,7 +110,7 @@ namespace OpenSim.Framework.Servers
get { return _url; }
}
public string UserAgent
public string UserAgent
{
get { return _userAgent; }
}

View File

@@ -36,36 +36,36 @@ namespace OpenSim.Framework.Servers
{
private string _contentType;
private bool _contentTypeSet;
public string ContentType
public string ContentType
{
get { return _contentType; }
set
set
{
_contentType = value;
_contentTypeSet = true;
}
}
public bool IsContentTypeSet
public bool IsContentTypeSet
{
get { return _contentTypeSet; }
}
private long _contentLength64;
public long ContentLength64
public long ContentLength64
{
get { return _contentLength64; }
set
set
{
_contentLength64 = value;
if (null != _resp) _resp.ContentLength64 = value;
}
}
private Encoding _contentEncoding;
public Encoding ContentEncoding
public Encoding ContentEncoding
{
get { return _contentEncoding; }
set
set
{
_contentEncoding = value;
if (null != _resp) _resp.ContentEncoding = value;
@@ -76,10 +76,10 @@ namespace OpenSim.Framework.Servers
public CookieCollection Cookies;
private bool _keepAlive;
public bool KeepAlive
public bool KeepAlive
{
get { return _keepAlive; }
set
set
{
_keepAlive = value;
if (null != _resp) _resp.KeepAlive = value;
@@ -92,7 +92,7 @@ namespace OpenSim.Framework.Servers
public string RedirectLocation
{
get { return _redirectLocation; }
set
set
{
_redirectLocation = value;
if (null != _resp) _resp.RedirectLocation = value;
@@ -103,7 +103,7 @@ namespace OpenSim.Framework.Servers
public bool SendChunked
{
get { return _sendChunked; }
set
set
{
_sendChunked = value;
if (null != _resp) _resp.SendChunked = value;
@@ -111,10 +111,10 @@ namespace OpenSim.Framework.Servers
}
private int _statusCode;
public int StatusCode
public int StatusCode
{
get { return _statusCode; }
set
set
{
_statusCode = value;
if (null != _resp) _resp.StatusCode = value;
@@ -122,10 +122,10 @@ namespace OpenSim.Framework.Servers
}
private string _statusDescription;
public string StatusDescription
public string StatusDescription
{
get { return _statusDescription; }
set
set
{
_statusDescription = value;
if (null != _resp) _resp.StatusDescription = value;

View File

@@ -41,13 +41,13 @@ namespace OpenSim.Framework.Servers
// application level protocol
InfoSwitchingProtocols = 101,
// 2xx Success codes
// 200 Request successful
SuccessOk = 200,
// 201 Request successful, new resource created
SuccessOkCreated = 201,
// 202 Request accepted, processing still on-going
// 202 Request accepted, processing still on-going
SuccessOkAccepted = 202,
// 203 Request successful, meta information not authoritative
SuccessOkNonAuthoritativeInformation = 203,
@@ -60,7 +60,7 @@ namespace OpenSim.Framework.Servers
// 3xx Redirect code: user agent needs to go somewhere else
// 300 Redirect: different presentation forms available, take
// a pick
// a pick
RedirectMultipleChoices = 300,
// 301 Redirect: requested resource has moved and now lives
// somewhere else
@@ -78,7 +78,7 @@ namespace OpenSim.Framework.Servers
// 307 Redirect: Resource temporarily somewhere else, location
// might change
RedirectMovedTemporarily = 307,
// 4xx Client error: the client borked the request
// 400 Client error: bad request, server does not grok what
// the client wants
@@ -92,7 +92,7 @@ namespace OpenSim.Framework.Servers
// deliver, do not try again.
ClientErrorForbidden = 403,
// 404 Client error: Server cannot find anything matching the
// client request.
// client request.
ClientErrorNotFound = 404,
// 405 Client error: The method specified by the client in the
// request is not allowed for the resource requested
@@ -148,7 +148,7 @@ namespace OpenSim.Framework.Servers
// 501 Server error: The server does not do the functionality
// required to carry out the client request. not at
// all. certainly not before breakfast. but also not after
// breakfast.
// breakfast.
ServerErrorNotImplemented = 501,
// 502 Server error: While acting as a proxy or a gateway, the
// server got ditched by the upstream server and as a

View File

@@ -45,7 +45,7 @@ namespace OpenSim.Framework.Servers
m_method = method;
}
public void Handle(string path, Stream request, Stream responseStream,
public void Handle(string path, Stream request, Stream responseStream,
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
{
TRequest deserial;

View File

@@ -27,6 +27,6 @@
namespace OpenSim.Framework.Servers
{
public delegate string RestMethod(string request, string path, string param,
public delegate string RestMethod(string request, string path, string param,
OSHttpRequest httpRequest, OSHttpResponse httpResponse);
}