aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenGridServices.AssetServer
diff options
context:
space:
mode:
authorMW2007-04-30 15:38:51 +0000
committerMW2007-04-30 15:38:51 +0000
commita595881dc06c8359faa731a0af2d8be7290daad1 (patch)
tree3ce516a66b07b4695d9861f52ed91485cd14c2a0 /OpenGridServices.AssetServer
parentAnd it's fixed (diff)
downloadopensim-SC-a595881dc06c8359faa731a0af2d8be7290daad1.zip
opensim-SC-a595881dc06c8359faa731a0af2d8be7290daad1.tar.gz
opensim-SC-a595881dc06c8359faa731a0af2d8be7290daad1.tar.bz2
opensim-SC-a595881dc06c8359faa731a0af2d8be7290daad1.tar.xz
fixed the VS 2005 solution/ project files.
and a couple of other small changes
Diffstat (limited to 'OpenGridServices.AssetServer')
-rw-r--r--OpenGridServices.AssetServer/Main.cs63
-rw-r--r--OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj129
2 files changed, 161 insertions, 31 deletions
diff --git a/OpenGridServices.AssetServer/Main.cs b/OpenGridServices.AssetServer/Main.cs
index b57a5a5..21a4fce 100644
--- a/OpenGridServices.AssetServer/Main.cs
+++ b/OpenGridServices.AssetServer/Main.cs
@@ -32,18 +32,18 @@ using System.IO;
32using System.Text; 32using System.Text;
33using System.Timers; 33using System.Timers;
34using System.Net; 34using System.Net;
35using System.Reflection; 35using System.Reflection;
36using System.Threading; 36using System.Threading;
37using libsecondlife; 37using libsecondlife;
38using OpenSim.Framework; 38using OpenSim.Framework;
39using OpenSim.Framework.Sims; 39using OpenSim.Framework.Sims;
40using OpenSim.Framework.Console; 40using OpenSim.Framework.Console;
41using OpenSim.Framework.Types; 41using OpenSim.Framework.Types;
42using OpenSim.Framework.Interfaces; 42using OpenSim.Framework.Interfaces;
43using OpenSim.GridInterfaces.Local; // REFACTORING IS NEEDED!!!!!!!!!!! 43using OpenSim.GridInterfaces.Local; // REFACTORING IS NEEDED!!!!!!!!!!!
44using OpenSim.Servers; 44using OpenSim.Servers;
45using Db4objects.Db4o; 45using Db4objects.Db4o;
46using Db4objects.Db4o.Query; 46using Db4objects.Db4o.Query;
47 47
48namespace OpenGridServices.AssetServer 48namespace OpenGridServices.AssetServer
49{ 49{
@@ -54,7 +54,7 @@ namespace OpenGridServices.AssetServer
54 private IObjectContainer db; 54 private IObjectContainer db;
55 55
56 public static OpenAsset_Main assetserver; 56 public static OpenAsset_Main assetserver;
57 57
58 private ConsoleBase m_console; 58 private ConsoleBase m_console;
59 59
60 [STAThread] 60 [STAThread]
@@ -85,9 +85,10 @@ namespace OpenGridServices.AssetServer
85 } 85 }
86 86
87 public void Startup() 87 public void Startup()
88 { m_console.WriteLine("Main.cs:Startup() - Setting up asset DB"); 88 {
89 setupDB(); 89 m_console.WriteLine("Main.cs:Startup() - Setting up asset DB");
90 90 setupDB();
91
91 m_console.WriteLine("Main.cs:Startup() - Starting HTTP process"); 92 m_console.WriteLine("Main.cs:Startup() - Starting HTTP process");
92 BaseHttpServer httpServer = new BaseHttpServer(8003); 93 BaseHttpServer httpServer = new BaseHttpServer(8003);
93 94
@@ -98,18 +99,18 @@ namespace OpenGridServices.AssetServer
98 httpServer.Start(); 99 httpServer.Start();
99 100
100 } 101 }
101 102
102 public string assetGetMethod(string request, string path, string param) { 103 public string assetGetMethod(string request, string path, string param) {
103 byte[] assetdata=getAssetData(new LLUUID(param),false); 104 byte[] assetdata=getAssetData(new LLUUID(param),false);
104 if(assetdata!=null) { 105 if(assetdata!=null) {
105 return System.Text.Encoding.ASCII.GetString(assetdata); 106 return System.Text.Encoding.ASCII.GetString(assetdata);
106 } else { 107 } else {
107 return ""; 108 return "";
108 } 109 }
109 110
110 } 111 }
111 112
112 public byte[] getAssetData(LLUUID assetID, bool isTexture) { 113 public byte[] getAssetData(LLUUID assetID, bool isTexture) {
113 byte[] idata = null; 114 byte[] idata = null;
114 bool found = false; 115 bool found = false;
115 AssetStorage foundAsset = null; 116 AssetStorage foundAsset = null;
@@ -129,10 +130,10 @@ namespace OpenGridServices.AssetServer
129 { 130 {
130 return null; 131 return null;
131 } 132 }
132 } 133 }
133 134
134 public void setupDB() { 135 public void setupDB() {
135 bool yapfile=System.IO.File.Exists("assets.yap"); 136 bool yapfile=System.IO.File.Exists("assets.yap");
136 try 137 try
137 { 138 {
138 db = Db4oFactory.OpenFile("assets.yap"); 139 db = Db4oFactory.OpenFile("assets.yap");
@@ -148,9 +149,9 @@ namespace OpenGridServices.AssetServer
148 { 149 {
149 this.LoadDB(); 150 this.LoadDB();
150 } 151 }
151 } 152 }
152 153
153 public void LoadDB() { 154 public void LoadDB() {
154 try 155 try
155 { 156 {
156 157
@@ -236,9 +237,9 @@ namespace OpenGridServices.AssetServer
236 catch (Exception e) 237 catch (Exception e)
237 { 238 {
238 Console.WriteLine(e.Message); 239 Console.WriteLine(e.Message);
239 } 240 }
240 } 241 }
241 242
242 private void LoadAsset(AssetBase info, bool image, string filename) 243 private void LoadAsset(AssetBase info, bool image, string filename)
243 { 244 {
244 245
@@ -255,8 +256,8 @@ namespace OpenGridServices.AssetServer
255 fStream.Close(); 256 fStream.Close();
256 info.Data = idata; 257 info.Data = idata;
257 //info.loaded=true; 258 //info.loaded=true;
258 } 259 }
259 260
260 /*private GridConfig LoadConfigDll(string dllName) 261 /*private GridConfig LoadConfigDll(string dllName)
261 { 262 {
262 Assembly pluginAssembly = Assembly.LoadFrom(dllName); 263 Assembly pluginAssembly = Assembly.LoadFrom(dllName);
diff --git a/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj b/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj
new file mode 100644
index 0000000..0392d9f
--- /dev/null
+++ b/OpenGridServices.AssetServer/OpenGridServices.AssetServer.csproj
@@ -0,0 +1,129 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <ProjectType>Local</ProjectType>
4 <ProductVersion>8.0.50727</ProductVersion>
5 <SchemaVersion>2.0</SchemaVersion>
6 <ProjectGuid>{0021261B-0000-0000-0000-000000000000}</ProjectGuid>
7 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
8 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
9 <ApplicationIcon></ApplicationIcon>
10 <AssemblyKeyContainerName>
11 </AssemblyKeyContainerName>
12 <AssemblyName>OpenGridServices.AssetServer</AssemblyName>
13 <DefaultClientScript>JScript</DefaultClientScript>
14 <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
15 <DefaultTargetSchema>IE50</DefaultTargetSchema>
16 <DelaySign>false</DelaySign>
17 <OutputType>Exe</OutputType>
18 <AppDesignerFolder></AppDesignerFolder>
19 <RootNamespace>OpenGridServices.AssetServer</RootNamespace>
20 <StartupObject></StartupObject>
21 <FileUpgradeFlags>
22 </FileUpgradeFlags>
23 </PropertyGroup>
24 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
25 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
26 <BaseAddress>285212672</BaseAddress>
27 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
28 <ConfigurationOverrideFile>
29 </ConfigurationOverrideFile>
30 <DefineConstants>TRACE;DEBUG</DefineConstants>
31 <DocumentationFile></DocumentationFile>
32 <DebugSymbols>True</DebugSymbols>
33 <FileAlignment>4096</FileAlignment>
34 <Optimize>False</Optimize>
35 <OutputPath>..\bin\</OutputPath>
36 <RegisterForComInterop>False</RegisterForComInterop>
37 <RemoveIntegerChecks>False</RemoveIntegerChecks>
38 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
39 <WarningLevel>4</WarningLevel>
40 <NoWarn></NoWarn>
41 </PropertyGroup>
42 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
43 <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
44 <BaseAddress>285212672</BaseAddress>
45 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
46 <ConfigurationOverrideFile>
47 </ConfigurationOverrideFile>
48 <DefineConstants>TRACE</DefineConstants>
49 <DocumentationFile></DocumentationFile>
50 <DebugSymbols>False</DebugSymbols>
51 <FileAlignment>4096</FileAlignment>
52 <Optimize>True</Optimize>
53 <OutputPath>..\bin\</OutputPath>
54 <RegisterForComInterop>False</RegisterForComInterop>
55 <RemoveIntegerChecks>False</RemoveIntegerChecks>
56 <TreatWarningsAsErrors>False</TreatWarningsAsErrors>
57 <WarningLevel>4</WarningLevel>
58 <NoWarn></NoWarn>
59 </PropertyGroup>
60 <ItemGroup>
61 <Reference Include="System" >
62 <HintPath>System.dll</HintPath>
63 <Private>False</Private>
64 </Reference>
65 <Reference Include="System.Data" >
66 <HintPath>System.Data.dll</HintPath>
67 <Private>False</Private>
68 </Reference>
69 <Reference Include="System.Xml" >
70 <HintPath>System.Xml.dll</HintPath>
71 <Private>False</Private>
72 </Reference>
73 <Reference Include="libsecondlife.dll" >
74 <HintPath>..\bin\libsecondlife.dll</HintPath>
75 <Private>False</Private>
76 </Reference>
77 <Reference Include="Db4objects.Db4o.dll" >
78 <HintPath>..\bin\Db4objects.Db4o.dll</HintPath>
79 <Private>False</Private>
80 </Reference>
81 </ItemGroup>
82 <ItemGroup>
83 <ProjectReference Include="..\OpenSim.Framework\OpenSim.Framework.csproj">
84 <Name>OpenSim.Framework</Name>
85 <Project>{8ACA2445-0000-0000-0000-000000000000}</Project>
86 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
87 <Private>False</Private>
88 </ProjectReference>
89 <ProjectReference Include="..\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj">
90 <Name>OpenSim.Framework.Console</Name>
91 <Project>{A7CD0630-0000-0000-0000-000000000000}</Project>
92 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
93 <Private>False</Private>
94 </ProjectReference>
95 <ProjectReference Include="..\OpenSim.GridInterfaces\Local\OpenSim.GridInterfaces.Local.csproj">
96 <Name>OpenSim.GridInterfaces.Local</Name>
97 <Project>{546099CD-0000-0000-0000-000000000000}</Project>
98 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
99 <Private>False</Private>
100 </ProjectReference>
101 <ProjectReference Include="..\OpenSim.Servers\OpenSim.Servers.csproj">
102 <Name>OpenSim.Servers</Name>
103 <Project>{8BB20F0A-0000-0000-0000-000000000000}</Project>
104 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
105 <Private>False</Private>
106 </ProjectReference>
107 <ProjectReference Include="..\XmlRpcCS\XMLRPC.csproj">
108 <Name>XMLRPC</Name>
109 <Project>{8E81D43C-0000-0000-0000-000000000000}</Project>
110 <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package>
111 <Private>False</Private>
112 </ProjectReference>
113 </ItemGroup>
114 <ItemGroup>
115 <Compile Include="Main.cs">
116 <SubType>Code</SubType>
117 </Compile>
118 <Compile Include="Properties\AssemblyInfo.cs">
119 <SubType>Code</SubType>
120 </Compile>
121 </ItemGroup>
122 <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
123 <PropertyGroup>
124 <PreBuildEvent>
125 </PreBuildEvent>
126 <PostBuildEvent>
127 </PostBuildEvent>
128 </PropertyGroup>
129</Project>