aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services
diff options
context:
space:
mode:
authorJohn Hurliman2010-09-29 14:24:32 -0700
committerJohn Hurliman2010-09-29 14:24:32 -0700
commit9b7c99f0cfd8fbcd3ce31e0be6fa68f5bedef78b (patch)
treec22a7beeb227fd525610cad9a0faa1bb5f66aa58 /OpenSim/Services
parentRestrict top colliders / top scripts to estate managers (diff)
downloadopensim-SC_OLD-9b7c99f0cfd8fbcd3ce31e0be6fa68f5bedef78b.zip
opensim-SC_OLD-9b7c99f0cfd8fbcd3ce31e0be6fa68f5bedef78b.tar.gz
opensim-SC_OLD-9b7c99f0cfd8fbcd3ce31e0be6fa68f5bedef78b.tar.bz2
opensim-SC_OLD-9b7c99f0cfd8fbcd3ce31e0be6fa68f5bedef78b.tar.xz
Made IGridUserService.SetLastPosition() more flexible to allow different possible implementations. This doesn't change any behavior or any Robust code, but it simplifies the SimianGrid connector by using the standard OpenSim interface for setting last position now
Diffstat (limited to 'OpenSim/Services')
-rw-r--r--OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs2
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs8
-rw-r--r--OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs6
-rw-r--r--OpenSim/Services/Interfaces/IGridUserService.cs14
-rw-r--r--OpenSim/Services/UserAccountService/GridUserService.cs2
5 files changed, 18 insertions, 14 deletions
diff --git a/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs b/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs
index 935ebb1..48d2939 100644
--- a/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs
+++ b/OpenSim/Services/Connectors/GridUser/GridUserServiceConnector.cs
@@ -123,7 +123,7 @@ namespace OpenSim.Services.Connectors
123 return Set(sendData, userID, regionID, position, lookAt); 123 return Set(sendData, userID, regionID, position, lookAt);
124 } 124 }
125 125
126 public bool SetLastPosition(string userID, UUID regionID, Vector3 position, Vector3 lookAt) 126 public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt)
127 { 127 {
128 Dictionary<string, object> sendData = new Dictionary<string, object>(); 128 Dictionary<string, object> sendData = new Dictionary<string, object>();
129 //sendData["SCOPEID"] = scopeID.ToString(); 129 //sendData["SCOPEID"] = scopeID.ToString();
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs
index 67a06f3..c89c81a 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianActivityDetector.cs
@@ -29,6 +29,7 @@ using System;
29using System.Reflection; 29using System.Reflection;
30using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenSim.Region.Framework.Scenes; 31using OpenSim.Region.Framework.Scenes;
32using OpenSim.Services.Interfaces;
32using OpenMetaverse; 33using OpenMetaverse;
33using log4net; 34using log4net;
34 35
@@ -38,12 +39,12 @@ namespace OpenSim.Services.Connectors.SimianGrid
38 { 39 {
39 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 40 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
40 41
41 private SimianPresenceServiceConnector m_GridUserService; 42 private IGridUserService m_GridUserService;
42 private Scene m_aScene; 43 private Scene m_aScene;
43 44
44 public SimianActivityDetector(SimianPresenceServiceConnector guservice) 45 public SimianActivityDetector(IGridUserService guService)
45 { 46 {
46 m_GridUserService = guservice; 47 m_GridUserService = guService;
47 m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Started"); 48 m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Started");
48 } 49 }
49 50
@@ -103,7 +104,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
103 m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName); 104 m_log.DebugFormat("[SIMIAN ACTIVITY DETECTOR]: Detected client logout {0} in {1}", client.AgentId, client.Scene.RegionInfo.RegionName);
104 m_GridUserService.LoggedOut(client.AgentId.ToString(), client.Scene.RegionInfo.RegionID, position, lookat); 105 m_GridUserService.LoggedOut(client.AgentId.ToString(), client.Scene.RegionInfo.RegionID, position, lookat);
105 } 106 }
106
107 } 107 }
108 108
109 void OnEnteringNewParcel(ScenePresence sp, int localLandID, UUID regionID) 109 void OnEnteringNewParcel(ScenePresence sp, int localLandID, UUID regionID)
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
index a344594..fa51c9a 100644
--- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
+++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs
@@ -304,12 +304,6 @@ namespace OpenSim.Services.Connectors.SimianGrid
304 return UpdateSession(sessionID, regionID, lastPosition, lastLookAt); 304 return UpdateSession(sessionID, regionID, lastPosition, lastLookAt);
305 } 305 }
306 306
307 public bool SetLastPosition(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
308 {
309 // Never called
310 return false;
311 }
312
313 public GridUserInfo GetGridUserInfo(string user) 307 public GridUserInfo GetGridUserInfo(string user)
314 { 308 {
315 m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for agent " + user); 309 m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for agent " + user);
diff --git a/OpenSim/Services/Interfaces/IGridUserService.cs b/OpenSim/Services/Interfaces/IGridUserService.cs
index 95ce5e8..dfb79a4 100644
--- a/OpenSim/Services/Interfaces/IGridUserService.cs
+++ b/OpenSim/Services/Interfaces/IGridUserService.cs
@@ -108,8 +108,18 @@ namespace OpenSim.Services.Interfaces
108 bool LoggedOut(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt); 108 bool LoggedOut(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt);
109 109
110 bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt); 110 bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt);
111 bool SetLastPosition(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt); 111
112 112 /// <summary>
113 /// Stores the last known user position at the grid level
114 /// </summary>
115 /// <param name="userID">Ignore if your connector does not use userID for position updates</param>
116 /// <param name="sessionID">Ignore if your connector does not use sessionID for position updates</param>
117 /// <param name="regionID">RegionID where the user is currently located</param>
118 /// <param name="lastPosition">Region-relative position</param>
119 /// <param name="lastLookAt">Normalized look direction</param>
120 /// <returns>True if the user's last position was successfully updated, otherwise false</returns>
121 bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt);
122
113 GridUserInfo GetGridUserInfo(string userID); 123 GridUserInfo GetGridUserInfo(string userID);
114 } 124 }
115} \ No newline at end of file 125} \ No newline at end of file
diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs
index 697ba63..00a1ae2 100644
--- a/OpenSim/Services/UserAccountService/GridUserService.cs
+++ b/OpenSim/Services/UserAccountService/GridUserService.cs
@@ -139,7 +139,7 @@ namespace OpenSim.Services.UserAccountService
139 return m_Database.Store(d); 139 return m_Database.Store(d);
140 } 140 }
141 141
142 public bool SetLastPosition(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt) 142 public bool SetLastPosition(string userID, UUID sessionID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt)
143 { 143 {
144 //m_log.DebugFormat("[Grid User Service]: SetLastPosition for {0}", userID); 144 //m_log.DebugFormat("[Grid User Service]: SetLastPosition for {0}", userID);
145 GridUserData d = m_Database.Get(userID); 145 GridUserData d = m_Database.Get(userID);