aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMW2007-07-11 14:39:03 +0000
committerMW2007-07-11 14:39:03 +0000
commit9d989612b0da9c5cc4e33a2f72d13d94116865d1 (patch)
tree414d0697b54e1b2061f4da9aaf3a9877304d1217 /OpenSim/Region
parent* Removing terrain datafiles from trunk's SVN. Will move somewhere else. (diff)
downloadopensim-SC-9d989612b0da9c5cc4e33a2f72d13d94116865d1.zip
opensim-SC-9d989612b0da9c5cc4e33a2f72d13d94116865d1.tar.gz
opensim-SC-9d989612b0da9c5cc4e33a2f72d13d94116865d1.tar.bz2
opensim-SC-9d989612b0da9c5cc4e33a2f72d13d94116865d1.tar.xz
updated libsecondlife.dll to a 1.18 version (from the libsecondlife aditi branch, so when they have a trunk version that is 1.18 ready, best to update again).
Started some work on a userProfile/inventory cache.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Caches/CachedUserInfo.cs20
-rw-r--r--OpenSim/Region/Caches/InventoryFolder.cs51
-rw-r--r--OpenSim/Region/Caches/UserProfileCache.cs75
-rw-r--r--OpenSim/Region/ClientStack/ClientViewBase.cs2
-rw-r--r--OpenSim/Region/Communications/OGS1/OGS1GridServices.cs73
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Interpreter.Logic.cs (renamed from OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/InterpreterLogic.cs)0
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Interpreter.Methods.cs (renamed from OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/InterpreterMethods.cs)0
-rw-r--r--OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Interpreter.Return.cs (renamed from OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/InterpreterReturn.cs)0
8 files changed, 209 insertions, 12 deletions
diff --git a/OpenSim/Region/Caches/CachedUserInfo.cs b/OpenSim/Region/Caches/CachedUserInfo.cs
new file mode 100644
index 0000000..08a7848
--- /dev/null
+++ b/OpenSim/Region/Caches/CachedUserInfo.cs
@@ -0,0 +1,20 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenSim.Framework.Data;
5using libsecondlife;
6
7namespace OpenSim.Region.Caches
8{
9 public class CachedUserInfo
10 {
11 public UserProfileData UserProfile;
12 //public Dictionary<LLUUID, InventoryFolder> Folders = new Dictionary<LLUUID, InventoryFolder>();
13 public InventoryFolder RootFolder;
14
15 public CachedUserInfo()
16 {
17
18 }
19 }
20}
diff --git a/OpenSim/Region/Caches/InventoryFolder.cs b/OpenSim/Region/Caches/InventoryFolder.cs
new file mode 100644
index 0000000..364a184
--- /dev/null
+++ b/OpenSim/Region/Caches/InventoryFolder.cs
@@ -0,0 +1,51 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using libsecondlife;
5using OpenSim.Framework.Data;
6
7namespace OpenSim.Region.Caches
8{
9 public class InventoryFolder : InventoryFolderBase
10 {
11 public Dictionary<LLUUID, InventoryFolder> SubFolders = new Dictionary<LLUUID, InventoryFolder>();
12 public Dictionary<LLUUID, InventoryItemBase> Items = new Dictionary<LLUUID, InventoryItemBase>();
13
14 public InventoryFolder()
15 {
16 }
17
18 public InventoryFolder HasSubFolder(LLUUID folderID)
19 {
20 InventoryFolder returnFolder = null;
21 if (this.SubFolders.ContainsKey(folderID))
22 {
23 returnFolder = this.SubFolders[folderID];
24 }
25 else
26 {
27 foreach (InventoryFolder folder in this.SubFolders.Values)
28 {
29 returnFolder = folder.HasSubFolder(folderID);
30 if (returnFolder != null)
31 {
32 break;
33 }
34 }
35 }
36 return returnFolder;
37 }
38
39 public InventoryFolder CreateNewSubFolder(LLUUID folderID, string folderName, ushort type)
40 {
41 InventoryFolder subFold = new InventoryFolder();
42 subFold.name = folderName;
43 subFold.folderID = folderID;
44 subFold.type = type;
45 subFold.parentID = this.folderID;
46 subFold.agentID = this.agentID;
47 this.SubFolders.Add(subFold.folderID, subFold);
48 return subFold;
49 }
50 }
51}
diff --git a/OpenSim/Region/Caches/UserProfileCache.cs b/OpenSim/Region/Caches/UserProfileCache.cs
new file mode 100644
index 0000000..0717e55
--- /dev/null
+++ b/OpenSim/Region/Caches/UserProfileCache.cs
@@ -0,0 +1,75 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using libsecondlife;
5using OpenSim.Framework.Data;
6
7namespace OpenSim.Region.Caches
8{
9 public class UserProfileCache
10 {
11 public Dictionary<LLUUID, CachedUserInfo> UserProfiles = new Dictionary<LLUUID, CachedUserInfo>();
12
13 public UserProfileCache()
14 {
15
16 }
17
18 /// <summary>
19 /// A new user has moved into a region in this instance
20 /// so get info from servers
21 /// </summary>
22 /// <param name="userID"></param>
23 public void AddNewUser(LLUUID userID)
24 {
25
26 }
27
28 /// <summary>
29 /// A user has left this instance
30 /// so make sure servers have been updated
31 /// Then remove cached info
32 /// </summary>
33 /// <param name="userID"></param>
34 public void UserLogOut(LLUUID userID)
35 {
36
37 }
38
39 /// <summary>
40 /// Request the user profile from User server
41 /// </summary>
42 /// <param name="userID"></param>
43 private void RequestUserProfileForUser(LLUUID userID)
44 {
45
46 }
47
48 /// <summary>
49 /// Request Iventory Info from Inventory server
50 /// </summary>
51 /// <param name="userID"></param>
52 private void RequestInventoryForUser(LLUUID userID)
53 {
54
55 }
56
57 /// <summary>
58 /// Make sure UserProfile is updated on user server
59 /// </summary>
60 /// <param name="userID"></param>
61 private void UpdateUserProfileToServer(LLUUID userID)
62 {
63
64 }
65
66 /// <summary>
67 /// Update Inventory data to Inventory server
68 /// </summary>
69 /// <param name="userID"></param>
70 private void UpdateInventoryToServer(LLUUID userID)
71 {
72
73 }
74 }
75}
diff --git a/OpenSim/Region/ClientStack/ClientViewBase.cs b/OpenSim/Region/ClientStack/ClientViewBase.cs
index 048f4df..211ba8b 100644
--- a/OpenSim/Region/ClientStack/ClientViewBase.cs
+++ b/OpenSim/Region/ClientStack/ClientViewBase.cs
@@ -71,7 +71,7 @@ namespace OpenSim.Region.ClientStack
71 // Keep track of when this packet was sent out 71 // Keep track of when this packet was sent out
72 Pack.TickCount = Environment.TickCount; 72 Pack.TickCount = Environment.TickCount;
73 73
74 Console.WriteLine(CircuitCode + ":OUT: " + Pack.Type.ToString()); 74 // Console.WriteLine(CircuitCode + ":OUT: " + Pack.Type.ToString());
75 75
76 if (!Pack.Header.Resent) 76 if (!Pack.Header.Resent)
77 { 77 {
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
index 66c1739..d32976f 100644
--- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
+++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs
@@ -24,6 +24,11 @@ namespace OpenSim.Region.Communications.OGS1
24 public NetworkServersInfo serversInfo; 24 public NetworkServersInfo serversInfo;
25 public BaseHttpServer httpServer; 25 public BaseHttpServer httpServer;
26 26
27 /// <summary>
28 ///
29 /// </summary>
30 /// <param name="servers_info"></param>
31 /// <param name="httpServe"></param>
27 public OGS1GridServices(NetworkServersInfo servers_info, BaseHttpServer httpServe) 32 public OGS1GridServices(NetworkServersInfo servers_info, BaseHttpServer httpServe)
28 { 33 {
29 serversInfo = servers_info; 34 serversInfo = servers_info;
@@ -32,6 +37,11 @@ namespace OpenSim.Region.Communications.OGS1
32 this.StartRemoting(); 37 this.StartRemoting();
33 } 38 }
34 39
40 /// <summary>
41 ///
42 /// </summary>
43 /// <param name="regionInfo"></param>
44 /// <returns></returns>
35 public RegionCommsListener RegisterRegion(RegionInfo regionInfo) 45 public RegionCommsListener RegisterRegion(RegionInfo regionInfo)
36 { 46 {
37 if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle)) 47 if (!this.regions.ContainsKey((uint)regionInfo.RegionHandle))
@@ -40,8 +50,6 @@ namespace OpenSim.Region.Communications.OGS1
40 } 50 }
41 51
42 Hashtable GridParams = new Hashtable(); 52 Hashtable GridParams = new Hashtable();
43
44
45 // Login / Authentication 53 // Login / Authentication
46 54
47 GridParams["authkey"] = serversInfo.GridSendKey; 55 GridParams["authkey"] = serversInfo.GridSendKey;
@@ -74,15 +82,6 @@ namespace OpenSim.Region.Communications.OGS1
74 return null; 82 return null;
75 } 83 }
76 84
77 /* if (!this.listeners.ContainsKey(regionInfo.RegionHandle))
78 {
79 MainLog.Instance.Verbose("OGS1 - Registering new HTTP listener on port " + regionInfo.InternalEndPoint.Port.ToString());
80 // initialised = true;
81 httpListener = new BaseHttpServer( regionInfo.InternalEndPoint.Port );
82 httpListener.AddXmlRPCHandler("expect_user", this.ExpectUser);
83 httpListener.Start();
84 }*/
85
86 // Initialise the background listeners 85 // Initialise the background listeners
87 RegionCommsListener regListener = new RegionCommsListener(); 86 RegionCommsListener regListener = new RegionCommsListener();
88 if (this.listeners.ContainsKey(regionInfo.RegionHandle)) 87 if (this.listeners.ContainsKey(regionInfo.RegionHandle))
@@ -97,6 +96,11 @@ namespace OpenSim.Region.Communications.OGS1
97 return regListener; 96 return regListener;
98 } 97 }
99 98
99 /// <summary>
100 ///
101 /// </summary>
102 /// <param name="regionInfo"></param>
103 /// <returns></returns>
100 public List<RegionInfo> RequestNeighbours(RegionInfo regionInfo) 104 public List<RegionInfo> RequestNeighbours(RegionInfo regionInfo)
101 { 105 {
102 106
@@ -136,6 +140,11 @@ namespace OpenSim.Region.Communications.OGS1
136 return neighbours; 140 return neighbours;
137 } 141 }
138 142
143 /// <summary>
144 ///
145 /// </summary>
146 /// <param name="regionHandle"></param>
147 /// <returns></returns>
139 public RegionInfo RequestNeighbourInfo(ulong regionHandle) 148 public RegionInfo RequestNeighbourInfo(ulong regionHandle)
140 { 149 {
141 if (this.regions.ContainsKey(regionHandle)) 150 if (this.regions.ContainsKey(regionHandle))
@@ -179,6 +188,14 @@ namespace OpenSim.Region.Communications.OGS1
179 return regionInfo; 188 return regionInfo;
180 } 189 }
181 190
191 /// <summary>
192 ///
193 /// </summary>
194 /// <param name="minX"></param>
195 /// <param name="minY"></param>
196 /// <param name="maxX"></param>
197 /// <param name="maxY"></param>
198 /// <returns></returns>
182 public List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY) 199 public List<MapBlockData> RequestNeighbourMapBlocks(int minX, int minY, int maxX, int maxY)
183 { 200 {
184 Hashtable respData = MapBlockQuery(minX, minY, maxX, maxY); 201 Hashtable respData = MapBlockQuery(minX, minY, maxX, maxY);
@@ -232,6 +249,11 @@ namespace OpenSim.Region.Communications.OGS1
232 } 249 }
233 250
234 // Grid Request Processing 251 // Grid Request Processing
252 /// <summary>
253 ///
254 /// </summary>
255 /// <param name="request"></param>
256 /// <returns></returns>
235 public XmlRpcResponse ExpectUser(XmlRpcRequest request) 257 public XmlRpcResponse ExpectUser(XmlRpcRequest request)
236 { 258 {
237 Console.WriteLine("Expecting User..."); 259 Console.WriteLine("Expecting User...");
@@ -269,6 +291,9 @@ namespace OpenSim.Region.Communications.OGS1
269 } 291 }
270 292
271 #region InterRegion Comms 293 #region InterRegion Comms
294 /// <summary>
295 ///
296 /// </summary>
272 private void StartRemoting() 297 private void StartRemoting()
273 { 298 {
274 TcpChannel ch = new TcpChannel(this.serversInfo.RemotingListenerPort); 299 TcpChannel ch = new TcpChannel(this.serversInfo.RemotingListenerPort);
@@ -281,6 +306,12 @@ namespace OpenSim.Region.Communications.OGS1
281 } 306 }
282 307
283 #region Methods called by regions in this instance 308 #region Methods called by regions in this instance
309 /// <summary>
310 ///
311 /// </summary>
312 /// <param name="regionHandle"></param>
313 /// <param name="agentData"></param>
314 /// <returns></returns>
284 public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData) 315 public bool InformRegionOfChildAgent(ulong regionHandle, AgentCircuitData agentData)
285 { 316 {
286 if (this.listeners.ContainsKey(regionHandle)) 317 if (this.listeners.ContainsKey(regionHandle))
@@ -316,6 +347,13 @@ namespace OpenSim.Region.Communications.OGS1
316 return false; 347 return false;
317 } 348 }
318 349
350 /// <summary>
351 ///
352 /// </summary>
353 /// <param name="regionHandle"></param>
354 /// <param name="agentID"></param>
355 /// <param name="position"></param>
356 /// <returns></returns>
319 public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position) 357 public bool ExpectAvatarCrossing(ulong regionHandle, LLUUID agentID, LLVector3 position)
320 { 358 {
321 if (this.listeners.ContainsKey(regionHandle)) 359 if (this.listeners.ContainsKey(regionHandle))
@@ -353,6 +391,12 @@ namespace OpenSim.Region.Communications.OGS1
353 #endregion 391 #endregion
354 392
355 #region Methods triggered by calls from external instances 393 #region Methods triggered by calls from external instances
394 /// <summary>
395 ///
396 /// </summary>
397 /// <param name="regionHandle"></param>
398 /// <param name="agentData"></param>
399 /// <returns></returns>
356 public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData) 400 public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData)
357 { 401 {
358 if (this.listeners.ContainsKey(regionHandle)) 402 if (this.listeners.ContainsKey(regionHandle))
@@ -363,6 +407,13 @@ namespace OpenSim.Region.Communications.OGS1
363 return false; 407 return false;
364 } 408 }
365 409
410 /// <summary>
411 ///
412 /// </summary>
413 /// <param name="regionHandle"></param>
414 /// <param name="agentID"></param>
415 /// <param name="position"></param>
416 /// <returns></returns>
366 public bool IncomingArrival(ulong regionHandle, LLUUID agentID, LLVector3 position) 417 public bool IncomingArrival(ulong regionHandle, LLUUID agentID, LLVector3 position)
367 { 418 {
368 if (this.listeners.ContainsKey(regionHandle)) 419 if (this.listeners.ContainsKey(regionHandle))
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/InterpreterLogic.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Interpreter.Logic.cs
index 2a11afd..2a11afd 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/InterpreterLogic.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Interpreter.Logic.cs
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/InterpreterMethods.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Interpreter.Methods.cs
index 4d60559..4d60559 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/InterpreterMethods.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Interpreter.Methods.cs
diff --git a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/InterpreterReturn.cs b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Interpreter.Return.cs
index cbedb71..cbedb71 100644
--- a/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/InterpreterReturn.cs
+++ b/OpenSim/Region/Environment/Scenes/scripting/Engines/JVMEngine/Interpreter.Return.cs