aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.GridInterfaces/Local/LocalGridServer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/OpenSim.GridInterfaces/Local/LocalGridServer.cs')
-rw-r--r--OpenSim/OpenSim.GridInterfaces/Local/LocalGridServer.cs158
1 files changed, 0 insertions, 158 deletions
diff --git a/OpenSim/OpenSim.GridInterfaces/Local/LocalGridServer.cs b/OpenSim/OpenSim.GridInterfaces/Local/LocalGridServer.cs
deleted file mode 100644
index 9b6a9ff..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*/
28using System;
29using System.Collections.Generic;
30using System.Threading;
31using System.IO;
32using OpenSim.Framework.Interfaces;
33using OpenSim.Framework.Types;
34using OpenSim.Framework.Console;
35using libsecondlife;
36using Db4objects.Db4o;
37using Db4objects.Db4o.Query;
38using System.Collections;
39
40namespace 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 MainConsole.Instance.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}