* Started working on LlsdMethod for BaseHttpServer

*Renamed IRestHandler.cs to RestMethod.cs which is the correct name.
Sugilite
lbsa71 2007-07-02 16:03:58 +00:00
parent c25a2fea59
commit fcabdab7bc
7 changed files with 113 additions and 83 deletions

View File

@ -1,5 +1,5 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual C# Express 2005
# Visual Studio 2005
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework.Data", "OpenSim\Framework\Data\OpenSim.Framework.Data.csproj", "{36B72A9B-0000-0000-0000-000000000000}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Framework.Data.DB4o", "OpenSim\Framework\Data.DB4o\OpenSim.Framework.Data.DB4o.csproj", "{FD2D303D-0000-0000-0000-000000000000}"
@ -25,61 +25,72 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenSim.Grid.UserServer.Config", "OpenSim\Grid\UserServer.Config\OpenSim.Grid.UserServer.Config.csproj", "{08F87229-0000-0000-0000-000000000000}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{36B72A9B-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{36B72A9B-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{36B72A9B-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{36B72A9B-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{FD2D303D-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FD2D303D-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD2D303D-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FD2D303D-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{17F7F694-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17F7F694-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17F7F694-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17F7F694-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{17F7F6BE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17F7F6BE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17F7F6BE-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17F7F6BE-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{6ECC56A9-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6ECC56A9-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6ECC56A9-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6ECC56A9-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{586E2916-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{586E2916-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{586E2916-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{586E2916-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{E5F1A03B-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E5F1A03B-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E5F1A03B-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E5F1A03B-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{4B7BFD1C-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4B7BFD1C-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4B7BFD1C-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4B7BFD1C-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{60FCC3A6-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{60FCC3A6-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{60FCC3A6-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{60FCC3A6-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{1442B635-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1442B635-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1442B635-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1442B635-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{2FC96F92-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2FC96F92-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2FC96F92-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2FC96F92-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{08F87229-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08F87229-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08F87229-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08F87229-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectDependencies) = postSolution
({FD2D303D-0000-0000-0000-000000000000}).2 = ({36B72A9B-0000-0000-0000-000000000000})
({17F7F694-0000-0000-0000-000000000000}).1 = ({36B72A9B-0000-0000-0000-000000000000})
({17F7F6BE-0000-0000-0000-000000000000}).2 = ({36B72A9B-0000-0000-0000-000000000000})
({6ECC56A9-0000-0000-0000-000000000000}).1 = ({36B72A9B-0000-0000-0000-000000000000})
({586E2916-0000-0000-0000-000000000000}).4 = ({36B72A9B-0000-0000-0000-000000000000})
({60FCC3A6-0000-0000-0000-000000000000}).4 = ({36B72A9B-0000-0000-0000-000000000000})
({60FCC3A6-0000-0000-0000-000000000000}).7 = ({4B7BFD1C-0000-0000-0000-000000000000})
({2FC96F92-0000-0000-0000-000000000000}).4 = ({36B72A9B-0000-0000-0000-000000000000})
({2FC96F92-0000-0000-0000-000000000000}).7 = ({586E2916-0000-0000-0000-000000000000})
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{36B72A9B-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{36B72A9B-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{36B72A9B-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{36B72A9B-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{FD2D303D-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FD2D303D-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD2D303D-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FD2D303D-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{17F7F694-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17F7F694-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17F7F694-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17F7F694-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{17F7F6BE-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{17F7F6BE-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{17F7F6BE-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{17F7F6BE-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{6ECC56A9-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6ECC56A9-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6ECC56A9-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6ECC56A9-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{586E2916-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{586E2916-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{586E2916-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{586E2916-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{E5F1A03B-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E5F1A03B-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E5F1A03B-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E5F1A03B-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{4B7BFD1C-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4B7BFD1C-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4B7BFD1C-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4B7BFD1C-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{60FCC3A6-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{60FCC3A6-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{60FCC3A6-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{60FCC3A6-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{1442B635-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1442B635-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1442B635-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1442B635-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{2FC96F92-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2FC96F92-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2FC96F92-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2FC96F92-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
{08F87229-0000-0000-0000-000000000000}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{08F87229-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
{08F87229-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
{08F87229-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -224,15 +224,9 @@ namespace OpenSim.Framework.Servers
break;
case "application/xml":
// probably LLSD we hope, otherwise it should be ignored by the parser
// responseString = ParseLLSDXML(requestBody);
responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod);
response.AddHeader("Content-type", "application/xml");
break;
case "application/octet-stream":
// probably LLSD we hope, otherwise it should be ignored by the parser
// responseString = ParseLLSDXML(requestBody);
// responseString = ParseLLSDXML(requestBody);
responseString = ParseREST(requestBody, request.RawUrl, request.HttpMethod);
response.AddHeader("Content-type", "application/xml");
break;

View File

@ -0,0 +1,8 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace OpenSim.Framework.Servers
{
public delegate string LlsdMethod(string request, string path, string param);
}

View File

@ -1,4 +1,4 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectType>Local</ProjectType>
<ProductVersion>8.0.50727</ProductVersion>
@ -6,7 +6,8 @@
<ProjectGuid>{2CC71860-0000-0000-0000-000000000000}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ApplicationIcon></ApplicationIcon>
<ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<AssemblyName>OpenSim.Framework.Servers</AssemblyName>
@ -15,9 +16,11 @@
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<DelaySign>false</DelaySign>
<OutputType>Library</OutputType>
<AppDesignerFolder></AppDesignerFolder>
<AppDesignerFolder>
</AppDesignerFolder>
<RootNamespace>OpenSim.Framework.Servers</RootNamespace>
<StartupObject></StartupObject>
<StartupObject>
</StartupObject>
<FileUpgradeFlags>
</FileUpgradeFlags>
</PropertyGroup>
@ -28,7 +31,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DocumentationFile></DocumentationFile>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>False</Optimize>
@ -37,7 +41,8 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn></NoWarn>
<NoWarn>
</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
@ -46,7 +51,8 @@
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile></DocumentationFile>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
@ -55,22 +61,24 @@
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoWarn></NoWarn>
<NoWarn>
</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="libsecondlife.dll" >
<Reference Include="libsecondlife.dll">
<HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" >
<Reference Include="System">
<HintPath>System.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System.Xml" >
<Reference Include="System.Data" />
<Reference Include="System.Xml">
<HintPath>System.Xml.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="XMLRPC.dll" >
<Reference Include="XMLRPC.dll">
<HintPath>..\..\..\bin\XMLRPC.dll</HintPath>
<Private>False</Private>
</Reference>
@ -80,13 +88,13 @@
<Name>OpenSim.Framework</Name>
<Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\Console\OpenSim.Framework.Console.csproj">
<Name>OpenSim.Framework.Console</Name>
<Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
<Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
<Private>False</Private>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup>
@ -96,7 +104,8 @@
<Compile Include="CheckSumServer.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="IRestHandler.cs">
<Compile Include="LlsdMethod.cs" />
<Compile Include="RestMethod.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="UDPServerBase.cs">
@ -113,4 +122,4 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>

View File

@ -13,7 +13,7 @@
<sources failonempty="true">
<include name="BaseHttpServer.cs" />
<include name="CheckSumServer.cs" />
<include name="IRestHandler.cs" />
<include name="RestMethod.cs" />
<include name="UDPServerBase.cs" />
<include name="XmlRpcMethod.cs" />
</sources>

View File

@ -34,7 +34,7 @@ namespace OpenSim.Region.Capabilities
[AttributeUsage(AttributeTargets.Class)]
public class LLSDType : Attribute
{
private string myType;
protected string myType;
public LLSDType(string type)
{
@ -50,4 +50,12 @@ namespace OpenSim.Region.Capabilities
}
}
}
[AttributeUsage(AttributeTargets.Class)]
public class LLSDMap : LLSDType
{
public LLSDMap() : base( "MAP" )
{
}
}
}