diff options
author | MW | 2007-06-14 12:27:36 +0000 |
---|---|---|
committer | MW | 2007-06-14 12:27:36 +0000 |
commit | 3aecb5437953c793212834e0e9426a4852d85458 (patch) | |
tree | a3d868c450467afee2f557ee85717d1269cf39d0 /OpenSim/OpenSim.GridInterfaces/Local | |
parent | * Applied Prebuild fixes to Sugilite (diff) | |
download | opensim-SC-3aecb5437953c793212834e0e9426a4852d85458.zip opensim-SC-3aecb5437953c793212834e0e9426a4852d85458.tar.gz opensim-SC-3aecb5437953c793212834e0e9426a4852d85458.tar.bz2 opensim-SC-3aecb5437953c793212834e0e9426a4852d85458.tar.xz |
Deleted IGridServer interface (and classes implementing that).
Diffstat (limited to 'OpenSim/OpenSim.GridInterfaces/Local')
4 files changed, 17 insertions, 165 deletions
diff --git a/OpenSim/OpenSim.GridInterfaces/Local/LocalAssetServer.cs b/OpenSim/OpenSim.GridInterfaces/Local/LocalAssetServer.cs index ae394c4..70b14c2 100644 --- a/OpenSim/OpenSim.GridInterfaces/Local/LocalAssetServer.cs +++ b/OpenSim/OpenSim.GridInterfaces/Local/LocalAssetServer.cs | |||
@@ -66,16 +66,16 @@ namespace OpenSim.GridInterfaces.Local | |||
66 | this._assetRequests = new BlockingQueue<ARequest>(); | 66 | this._assetRequests = new BlockingQueue<ARequest>(); |
67 | yapfile = System.IO.File.Exists("assets.yap"); | 67 | yapfile = System.IO.File.Exists("assets.yap"); |
68 | 68 | ||
69 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE,"Local Asset Server class created"); | 69 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE, "Local Asset Server class created"); |
70 | try | 70 | try |
71 | { | 71 | { |
72 | db = Db4oFactory.OpenFile("assets.yap"); | 72 | db = Db4oFactory.OpenFile("assets.yap"); |
73 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE,"Db4 Asset database creation"); | 73 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE, "Db4 Asset database creation"); |
74 | } | 74 | } |
75 | catch (Exception e) | 75 | catch (Exception e) |
76 | { | 76 | { |
77 | db.Close(); | 77 | db.Close(); |
78 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.MEDIUM,"Db4 Asset server :Constructor - Exception occured"); | 78 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.MEDIUM, "Db4 Asset server :Constructor - Exception occured"); |
79 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, e.ToString()); | 79 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, e.ToString()); |
80 | } | 80 | } |
81 | if (!yapfile) | 81 | if (!yapfile) |
@@ -295,4 +295,18 @@ namespace OpenSim.GridInterfaces.Local | |||
295 | //info.loaded=true; | 295 | //info.loaded=true; |
296 | } | 296 | } |
297 | } | 297 | } |
298 | public class AssetUUIDQuery : Predicate | ||
299 | { | ||
300 | private LLUUID _findID; | ||
301 | |||
302 | public AssetUUIDQuery(LLUUID find) | ||
303 | { | ||
304 | _findID = find; | ||
305 | } | ||
306 | public bool Match(AssetStorage asset) | ||
307 | { | ||
308 | return (asset.UUID == _findID); | ||
309 | } | ||
310 | } | ||
311 | |||
298 | } | 312 | } |
diff --git a/OpenSim/OpenSim.GridInterfaces/Local/LocalGridServer.cs b/OpenSim/OpenSim.GridInterfaces/Local/LocalGridServer.cs deleted file mode 100644 index 01003fb..0000000 --- a/OpenSim/OpenSim.GridInterfaces/Local/LocalGridServer.cs +++ /dev/null | |||
@@ -1,158 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Threading; | ||
31 | using System.IO; | ||
32 | using OpenSim.Framework.Interfaces; | ||
33 | using OpenSim.Framework.Types; | ||
34 | using OpenSim.Framework.Console; | ||
35 | using libsecondlife; | ||
36 | using Db4objects.Db4o; | ||
37 | using Db4objects.Db4o.Query; | ||
38 | using System.Collections; | ||
39 | |||
40 | namespace OpenSim.GridInterfaces.Local | ||
41 | { | ||
42 | /// <summary> | ||
43 | /// | ||
44 | /// </summary> | ||
45 | /// | ||
46 | public class LocalGridPlugin : IGridPlugin | ||
47 | { | ||
48 | public LocalGridPlugin() | ||
49 | { | ||
50 | |||
51 | } | ||
52 | |||
53 | public IGridServer GetGridServer() | ||
54 | { | ||
55 | return(new LocalGridServer()); | ||
56 | } | ||
57 | } | ||
58 | |||
59 | public class LocalGridServer : LocalGridBase | ||
60 | { | ||
61 | public List<Login> Sessions = new List<Login>(); | ||
62 | |||
63 | public LocalGridServer() | ||
64 | { | ||
65 | Sessions = new List<Login>(); | ||
66 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(LogPriority.VERBOSE,"Local Grid Server class created"); | ||
67 | } | ||
68 | |||
69 | public override bool RequestConnection(LLUUID SimUUID, string sim_ip, uint sim_port) | ||
70 | { | ||
71 | return true; | ||
72 | } | ||
73 | |||
74 | public override string GetName() | ||
75 | { | ||
76 | return "Local"; | ||
77 | } | ||
78 | |||
79 | public override AuthenticateResponse AuthenticateSession(LLUUID sessionID, LLUUID agentID, uint circuitCode) | ||
80 | { | ||
81 | //we are running local | ||
82 | AuthenticateResponse user = new AuthenticateResponse(); | ||
83 | |||
84 | lock(this.Sessions) | ||
85 | { | ||
86 | |||
87 | for(int i = 0; i < Sessions.Count; i++) | ||
88 | { | ||
89 | if((Sessions[i].Agent == agentID) && (Sessions[i].Session == sessionID)) | ||
90 | { | ||
91 | user.Authorised = true; | ||
92 | user.LoginInfo = Sessions[i]; | ||
93 | } | ||
94 | } | ||
95 | } | ||
96 | return(user); | ||
97 | } | ||
98 | |||
99 | public override bool LogoutSession(LLUUID sessionID, LLUUID agentID, uint circuitCode) | ||
100 | { | ||
101 | return(true); | ||
102 | } | ||
103 | |||
104 | public override UUIDBlock RequestUUIDBlock() | ||
105 | { | ||
106 | UUIDBlock uuidBlock = new UUIDBlock(); | ||
107 | return(uuidBlock); | ||
108 | } | ||
109 | |||
110 | public override NeighbourInfo[] RequestNeighbours() | ||
111 | { | ||
112 | return null; | ||
113 | } | ||
114 | |||
115 | public override void SetServerInfo(string ServerUrl, string SendKey, string RecvKey) | ||
116 | { | ||
117 | |||
118 | } | ||
119 | |||
120 | public override IList RequestMapBlocks(int minX, int minY, int maxX, int maxY) | ||
121 | { | ||
122 | return new ArrayList(); | ||
123 | } | ||
124 | |||
125 | |||
126 | public override void Close() | ||
127 | { | ||
128 | |||
129 | } | ||
130 | |||
131 | /// <summary> | ||
132 | /// used by the local login server to inform us of new sessions | ||
133 | /// </summary> | ||
134 | /// <param name="session"></param> | ||
135 | public override void AddNewSession(Login session) | ||
136 | { | ||
137 | lock(this.Sessions) | ||
138 | { | ||
139 | this.Sessions.Add(session); | ||
140 | } | ||
141 | } | ||
142 | } | ||
143 | |||
144 | public class AssetUUIDQuery : Predicate | ||
145 | { | ||
146 | private LLUUID _findID; | ||
147 | |||
148 | public AssetUUIDQuery(LLUUID find) | ||
149 | { | ||
150 | _findID = find; | ||
151 | } | ||
152 | public bool Match(AssetStorage asset) | ||
153 | { | ||
154 | return (asset.UUID == _findID); | ||
155 | } | ||
156 | } | ||
157 | |||
158 | } | ||
diff --git a/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.csproj b/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.csproj index 1acd1b5..77c76e3 100644 --- a/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.csproj +++ b/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.csproj | |||
@@ -96,9 +96,6 @@ | |||
96 | <Compile Include="LocalAssetServer.cs"> | 96 | <Compile Include="LocalAssetServer.cs"> |
97 | <SubType>Code</SubType> | 97 | <SubType>Code</SubType> |
98 | </Compile> | 98 | </Compile> |
99 | <Compile Include="LocalGridServer.cs"> | ||
100 | <SubType>Code</SubType> | ||
101 | </Compile> | ||
102 | </ItemGroup> | 99 | </ItemGroup> |
103 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | 100 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> |
104 | <PropertyGroup> | 101 | <PropertyGroup> |
diff --git a/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build b/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build index c3c4ae4..1a72d0a 100644 --- a/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build +++ b/OpenSim/OpenSim.GridInterfaces/Local/OpenSim.GridInterfaces.Local.dll.build | |||
@@ -13,7 +13,6 @@ | |||
13 | <sources failonempty="true"> | 13 | <sources failonempty="true"> |
14 | <include name="AssemblyInfo.cs" /> | 14 | <include name="AssemblyInfo.cs" /> |
15 | <include name="LocalAssetServer.cs" /> | 15 | <include name="LocalAssetServer.cs" /> |
16 | <include name="LocalGridServer.cs" /> | ||
17 | </sources> | 16 | </sources> |
18 | <references basedir="${project::get-base-directory()}"> | 17 | <references basedir="${project::get-base-directory()}"> |
19 | <lib> | 18 | <lib> |