aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/LocalServers
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim.GridInterfaces/Local/LocalGridServer.cs (renamed from src/LocalServers/LocalGridServers/LocalGrid.cs)135
-rw-r--r--src/LocalServers/LocalGridServers/AssemblyInfo.cs21
-rw-r--r--src/LocalServers/LocalGridServers/LocalGridServers.csproj48
-rw-r--r--src/LocalServers/default.build51
4 files changed, 40 insertions, 215 deletions
diff --git a/src/LocalServers/LocalGridServers/LocalGrid.cs b/OpenSim.GridInterfaces/Local/LocalGridServer.cs
index bd377d3..d70e989 100644
--- a/src/LocalServers/LocalGridServers/LocalGrid.cs
+++ b/OpenSim.GridInterfaces/Local/LocalGridServer.cs
@@ -27,10 +27,14 @@
27using System; 27using System;
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Threading; 29using System.Threading;
30using OpenSim.GridServers; 30using System.IO;
31using OpenSim.Framework.Interfaces;
32using OpenSim.Framework.Assets;
31using libsecondlife; 33using libsecondlife;
34using Db4objects.Db4o;
35using Db4objects.Db4o.Query;
32 36
33namespace LocalGridServers 37namespace OpenSim.GridInterfaces.Local
34{ 38{
35 /// <summary> 39 /// <summary>
36 /// 40 ///
@@ -49,86 +53,26 @@ namespace LocalGridServers
49 } 53 }
50 } 54 }
51 55
52 public class LocalAssetPlugin : IAssetPlugin
53 {
54 public LocalAssetPlugin()
55 {
56
57 }
58
59 public IAssetServer GetAssetServer()
60 {
61 return(new LocalAssetServer());
62 }
63 }
64
65 public class LocalAssetServer : IAssetServer
66 {
67 private IAssetReceiver _receiver;
68 private BlockingQueue<ARequest> _assetRequests;
69
70 public LocalAssetServer()
71 {
72 this._assetRequests = new BlockingQueue<ARequest>();
73 ServerConsole.MainConsole.Instance.WriteLine("Local Asset Server class created");
74 }
75
76 public void SetReceiver(IAssetReceiver receiver)
77 {
78 this._receiver = receiver;
79 }
80
81 public void RequestAsset(LLUUID assetID, bool isTexture)
82 {
83 ARequest req = new ARequest();
84 req.AssetID = assetID;
85 req.IsTexture = isTexture;
86 //this._assetRequests.Enqueue(req);
87 }
88
89 public void UpdateAsset(AssetBase asset)
90 {
91
92 }
93
94 public void UploadNewAsset(AssetBase asset)
95 {
96
97 }
98
99 public void SetServerInfo(string ServerUrl, string SendKey)
100 {
101
102 }
103
104 private void RunRequests()
105 {
106 while(true)
107 {
108 Thread.Sleep(1000);
109 }
110 }
111 }
112
113 public class LocalGridServer : LocalGridBase 56 public class LocalGridServer : LocalGridBase
114 { 57 {
115 public List<Login> Sessions = new List<Login>(); 58 public List<Login> Sessions = new List<Login>();
116 59
117 public LocalGridServer() 60 public LocalGridServer()
118 { 61 {
119 Sessions = new List<Login>(); 62 Sessions = new List<Login>();
120 ServerConsole.MainConsole.Instance.WriteLine("Local Grid Server class created"); 63 OpenSim.Framework.Console.MainConsole.Instance.WriteLine("Local Grid Server class created");
121 }
122
123 public override string GetName()
124 {
125 return "Local";
126 } 64 }
127 65
128 public override bool RequestConnection() 66 public override bool RequestConnection()
129 { 67 {
130 return true; 68 return true;
131 } 69 }
70
71 public override string GetName()
72 {
73 return "Local";
74 }
75
132 public override AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode) 76 public override AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode)
133 { 77 {
134 //we are running local 78 //we are running local
@@ -159,17 +103,22 @@ namespace LocalGridServers
159 UUIDBlock uuidBlock = new UUIDBlock(); 103 UUIDBlock uuidBlock = new UUIDBlock();
160 return(uuidBlock); 104 return(uuidBlock);
161 } 105 }
162 106
163 public override neighbourinfo[] RequestNeighbours(ulong regionhandle) 107 public override NeighbourInfo[] RequestNeighbours()
164 { 108 {
165 return new neighbourinfo[8]; 109 return null;
166 } 110 }
167 111
168 public override void SetServerInfo(string GridServerUrl, string GridSendKey, string GridRecvKey, string UserServerUrl, string UserSendKey, string UserRecvKey) 112 public override void SetServerInfo(string ServerUrl, string SendKey, string RecvKey)
169 { 113 {
170 114
171 } 115 }
172 116
117 public override void Close()
118 {
119
120 }
121
173 /// <summary> 122 /// <summary>
174 /// used by the local login server to inform us of new sessions 123 /// used by the local login server to inform us of new sessions
175 /// </summary> 124 /// </summary>
@@ -182,30 +131,26 @@ namespace LocalGridServers
182 } 131 }
183 } 132 }
184 } 133 }
185
186 public class BlockingQueue< T > {
187 private Queue< T > _queue = new Queue< T >();
188 private object _queueSync = new object();
189 134
190 public void Enqueue(T value) 135 public class AssetUUIDQuery : Predicate
136 {
137 private LLUUID _findID;
138
139 public AssetUUIDQuery(LLUUID find)
191 { 140 {
192 lock(_queueSync) 141 _findID = find;
193 {
194 _queue.Enqueue(value);
195 Monitor.Pulse(_queueSync);
196 }
197 } 142 }
198 143 public bool Match(AssetStorage asset)
199 public T Dequeue()
200 { 144 {
201 lock(_queueSync) 145 return (asset.UUID == _findID);
202 {
203 if( _queue.Count < 1)
204 Monitor.Wait(_queueSync);
205
206 return _queue.Dequeue();
207 }
208 } 146 }
209 } 147 }
210 148
149 public class AssetStorage
150 {
151 public byte[] Data;
152 public sbyte Type;
153 public string Name;
154 public LLUUID UUID;
155 }
211} 156}
diff --git a/src/LocalServers/LocalGridServers/AssemblyInfo.cs b/src/LocalServers/LocalGridServers/AssemblyInfo.cs
deleted file mode 100644
index 4b17ba2..0000000
--- a/src/LocalServers/LocalGridServers/AssemblyInfo.cs
+++ /dev/null
@@ -1,21 +0,0 @@
1using System;
2using System.Reflection;
3using System.Runtime.InteropServices;
4
5// ------------------------------------------------------------------------------
6// <autogenerated>
7// This code was generated by a tool.
8// Mono Runtime Version: 2.0.50727.42
9//
10// Changes to this file may cause incorrect behavior and will be lost if
11// the code is regenerated.
12// </autogenerated>
13// ------------------------------------------------------------------------------
14
15[assembly: ComVisibleAttribute(false)]
16[assembly: CLSCompliantAttribute(false)]
17[assembly: AssemblyVersionAttribute("0.1.0.240")]
18[assembly: AssemblyTitleAttribute("opensim-localservers")]
19[assembly: AssemblyDescriptionAttribute("local grid servers")]
20[assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")]
21
diff --git a/src/LocalServers/LocalGridServers/LocalGridServers.csproj b/src/LocalServers/LocalGridServers/LocalGridServers.csproj
deleted file mode 100644
index 7a5ce3d..0000000
--- a/src/LocalServers/LocalGridServers/LocalGridServers.csproj
+++ /dev/null
@@ -1,48 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <OutputType>Library</OutputType>
4 <RootNamespace>LocalGridServers</RootNamespace>
5 <AssemblyName>LocalGridServers</AssemblyName>
6 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
7 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
8 <ProjectGuid>{D7F0395B-FADC-4936-80A0-D95AACE92F62}</ProjectGuid>
9 </PropertyGroup>
10 <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
11 <OutputPath>bin\Debug\</OutputPath>
12 <Optimize>False</Optimize>
13 <DefineConstants>DEBUG;TRACE</DefineConstants>
14 <DebugSymbols>True</DebugSymbols>
15 <DebugType>Full</DebugType>
16 <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
17 </PropertyGroup>
18 <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
19 <OutputPath>bin\Release\</OutputPath>
20 <Optimize>True</Optimize>
21 <DefineConstants>TRACE</DefineConstants>
22 <DebugSymbols>False</DebugSymbols>
23 <DebugType>None</DebugType>
24 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
25 </PropertyGroup>
26 <ItemGroup>
27 <Reference Include="System" />
28 <Reference Include="System.Xml" />
29 <Reference Include="libsecondlife">
30 <HintPath>..\..\..\bin\libsecondlife.dll</HintPath>
31 <SpecificVersion>False</SpecificVersion>
32 </Reference>
33 </ItemGroup>
34 <ItemGroup>
35 <Compile Include="LocalGrid.cs" />
36 </ItemGroup>
37 <ItemGroup>
38 <ProjectReference Include="..\..\ServerConsole\ServerConsole\ServerConsole.csproj">
39 <Project>{C9A6026D-8E0C-4FE4-8691-FB2A566AA245}</Project>
40 <Name>ServerConsole</Name>
41 </ProjectReference>
42 <ProjectReference Include="..\..\GridInterfaces\GridInterfaces.csproj">
43 <Project>{5DA3174D-42F9-416D-9F0B-AF41FA2BE2F9}</Project>
44 <Name>GridInterfaces</Name>
45 </ProjectReference>
46 </ItemGroup>
47 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
48</Project> \ No newline at end of file
diff --git a/src/LocalServers/default.build b/src/LocalServers/default.build
deleted file mode 100644
index 14c52cd..0000000
--- a/src/LocalServers/default.build
+++ /dev/null
@@ -1,51 +0,0 @@
1<?xml version="1.0"?>
2 <project name="OpenSim" default="build" basedir=".">
3 <description>nant buildfile for OpenSim</description>
4 <property name="debug" value="true" overwrite="false" />
5 <target name="clean" description="remove all generated files">
6 <delete file="../../bin/LocalGridServers.dll" failonerror="false" />
7 </target>
8
9 <target name="svnupdate" description="updates to latest SVN">
10 <exec program="svn">
11 <arg value="update" />
12 </exec>
13 </target>
14
15 <target name="upgrade" description="updates from SVN and then builds" depends="clean,svnupdate,build">
16
17 </target>
18
19 <target name="build" description="compiles the source code">
20
21 <loadfile file="../../VERSION" property="svnver"/>
22 <asminfo output="LocalGridServers/AssemblyInfo.cs" language="CSharp">
23 <imports>
24 <import namespace="System" />
25 <import namespace="System.Reflection" />
26 <import namespace="System.Runtime.InteropServices" />
27 </imports>
28 <attributes>
29 <attribute type="ComVisibleAttribute" value="false" />
30 <attribute type="CLSCompliantAttribute" value="false" />
31 <attribute type="AssemblyVersionAttribute" value="${svnver}" />
32 <attribute type="AssemblyTitleAttribute" value="opensim-localservers" />
33 <attribute type="AssemblyDescriptionAttribute" value="local grid servers" />
34 <attribute type="AssemblyCopyrightAttribute" value="Copyright © OGS development team 2007"/>
35 </attributes>
36 </asminfo>
37
38 <csc target="library" output="../../bin/LocalGridServers.dll" debug="${debug}" verbose="true" warninglevel="4">
39 <references basedir="../../bin" failonempty="true">
40 <include name="System.dll" />
41 <include name="System.Xml.dll" />
42 <include name="libsecondlife.dll" />
43 <include name="GridInterfaces.dll" />
44 <include name="ServerConsole.dll" />
45 </references>
46 <sources basedir="LocalGridServers/">
47 <include name="*.cs" />
48 </sources>
49 </csc>
50 </target>
51</project>