aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Interfaces
diff options
context:
space:
mode:
authorMelanie2010-05-08 13:31:36 +0100
committerMelanie2010-05-08 13:31:36 +0100
commit14fcc2510ef9f1effc06d7e99b57f7f74de08eac (patch)
treee52f145ef2aac9a9cc7fb32a6a40e62f67991743 /OpenSim/Services/Interfaces
parentMerge branch 'master' into careminster-presence-refactor (diff)
parenttest commit for panda (diff)
downloadopensim-SC_OLD-14fcc2510ef9f1effc06d7e99b57f7f74de08eac.zip
opensim-SC_OLD-14fcc2510ef9f1effc06d7e99b57f7f74de08eac.tar.gz
opensim-SC_OLD-14fcc2510ef9f1effc06d7e99b57f7f74de08eac.tar.bz2
opensim-SC_OLD-14fcc2510ef9f1effc06d7e99b57f7f74de08eac.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Services/Interfaces')
-rw-r--r--OpenSim/Services/Interfaces/IGridUserService.cs42
-rw-r--r--OpenSim/Services/Interfaces/IPresenceService.cs30
2 files changed, 43 insertions, 29 deletions
diff --git a/OpenSim/Services/Interfaces/IGridUserService.cs b/OpenSim/Services/Interfaces/IGridUserService.cs
index a7c2c6f..e629dff 100644
--- a/OpenSim/Services/Interfaces/IGridUserService.cs
+++ b/OpenSim/Services/Interfaces/IGridUserService.cs
@@ -37,39 +37,79 @@ namespace OpenSim.Services.Interfaces
37 public class GridUserInfo 37 public class GridUserInfo
38 { 38 {
39 public string UserID; 39 public string UserID;
40
40 public UUID HomeRegionID; 41 public UUID HomeRegionID;
41 public Vector3 HomePosition; 42 public Vector3 HomePosition;
42 public Vector3 HomeLookAt; 43 public Vector3 HomeLookAt;
43 44
45 public UUID LastRegionID;
46 public Vector3 LastPosition;
47 public Vector3 LastLookAt;
48
49 public bool Online;
50 public DateTime Login;
51 public DateTime Logout;
52
44 public GridUserInfo() {} 53 public GridUserInfo() {}
45 54
46 public GridUserInfo(Dictionary<string, object> kvp) 55 public GridUserInfo(Dictionary<string, object> kvp)
47 { 56 {
48 if (kvp.ContainsKey("UserID")) 57 if (kvp.ContainsKey("UserID"))
49 UserID = kvp["UserID"].ToString(); 58 UserID = kvp["UserID"].ToString();
59
50 if (kvp.ContainsKey("HomeRegionID")) 60 if (kvp.ContainsKey("HomeRegionID"))
51 UUID.TryParse(kvp["HomeRegionID"].ToString(), out HomeRegionID); 61 UUID.TryParse(kvp["HomeRegionID"].ToString(), out HomeRegionID);
52 if (kvp.ContainsKey("HomePosition")) 62 if (kvp.ContainsKey("HomePosition"))
53 Vector3.TryParse(kvp["HomePosition"].ToString(), out HomePosition); 63 Vector3.TryParse(kvp["HomePosition"].ToString(), out HomePosition);
54 if (kvp.ContainsKey("HomeLookAt")) 64 if (kvp.ContainsKey("HomeLookAt"))
55 Vector3.TryParse(kvp["HomeLookAt"].ToString(), out HomeLookAt); 65 Vector3.TryParse(kvp["HomeLookAt"].ToString(), out HomeLookAt);
66
67 if (kvp.ContainsKey("LastRegionID"))
68 UUID.TryParse(kvp["LastRegionID"].ToString(), out HomeRegionID);
69 if (kvp.ContainsKey("LastPosition"))
70 Vector3.TryParse(kvp["LastPosition"].ToString(), out LastPosition);
71 if (kvp.ContainsKey("LastLookAt"))
72 Vector3.TryParse(kvp["LastLookAt"].ToString(), out LastLookAt);
73
74 if (kvp.ContainsKey("Login"))
75 DateTime.TryParse(kvp["Login"].ToString(), out Login);
76 if (kvp.ContainsKey("Logout"))
77 DateTime.TryParse(kvp["Logout"].ToString(), out Logout);
78 if (kvp.ContainsKey("Online"))
79 Boolean.TryParse(kvp["Online"].ToString(), out Online);
80
56 } 81 }
57 82
58 public Dictionary<string, object> ToKeyValuePairs() 83 public Dictionary<string, object> ToKeyValuePairs()
59 { 84 {
60 Dictionary<string, object> result = new Dictionary<string, object>(); 85 Dictionary<string, object> result = new Dictionary<string, object>();
61 result["UserID"] = UserID; 86 result["UserID"] = UserID;
87
62 result["HomeRegionID"] = HomeRegionID.ToString(); 88 result["HomeRegionID"] = HomeRegionID.ToString();
63 result["HomePosition"] = HomePosition.ToString(); 89 result["HomePosition"] = HomePosition.ToString();
64 result["HomeLookAt"] = HomeLookAt.ToString(); 90 result["HomeLookAt"] = HomeLookAt.ToString();
65 91
92 result["LastRegionID"] = LastRegionID.ToString();
93 result["LastPosition"] = LastPosition.ToString();
94 result["LastLookAt"] = LastLookAt.ToString();
95
96 result["Online"] = Online.ToString();
97 result["Login"] = Login.ToString();
98 result["Logout"] = Logout.ToString();
99
100
66 return result; 101 return result;
67 } 102 }
68 } 103 }
69 104
70 public interface IGridUserService 105 public interface IGridUserService
71 { 106 {
107 GridUserInfo LoggedIn(string userID);
108 bool LoggedOut(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt);
109
110 bool SetHome(string userID, UUID homeID, Vector3 homePosition, Vector3 homeLookAt);
111 bool SetLastPosition(string userID, UUID regionID, Vector3 lastPosition, Vector3 lastLookAt);
112
72 GridUserInfo GetGridUserInfo(string userID); 113 GridUserInfo GetGridUserInfo(string userID);
73 bool StoreGridUserInfo(GridUserInfo info);
74 } 114 }
75} \ No newline at end of file 115} \ No newline at end of file
diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs
index b4c1859..abbae2c 100644
--- a/OpenSim/Services/Interfaces/IPresenceService.cs
+++ b/OpenSim/Services/Interfaces/IPresenceService.cs
@@ -55,23 +55,6 @@ namespace OpenSim.Services.Interfaces
55 UserID = kvp["UserID"].ToString(); 55 UserID = kvp["UserID"].ToString();
56 if (kvp.ContainsKey("RegionID")) 56 if (kvp.ContainsKey("RegionID"))
57 UUID.TryParse(kvp["RegionID"].ToString(), out RegionID); 57 UUID.TryParse(kvp["RegionID"].ToString(), out RegionID);
58 if (kvp.ContainsKey("login"))
59 DateTime.TryParse(kvp["login"].ToString(), out Login);
60 if (kvp.ContainsKey("logout"))
61 DateTime.TryParse(kvp["logout"].ToString(), out Logout);
62 if (kvp.ContainsKey("lookAt"))
63 Vector3.TryParse(kvp["lookAt"].ToString(), out LookAt);
64 if (kvp.ContainsKey("online"))
65 Boolean.TryParse(kvp["online"].ToString(), out Online);
66 if (kvp.ContainsKey("position"))
67 Vector3.TryParse(kvp["position"].ToString(), out Position);
68 if (kvp.ContainsKey("HomeRegionID"))
69 UUID.TryParse(kvp["HomeRegionID"].ToString(), out HomeRegionID);
70 if (kvp.ContainsKey("HomePosition"))
71 Vector3.TryParse(kvp["HomePosition"].ToString(), out HomePosition);
72 if (kvp.ContainsKey("HomeLookAt"))
73 Vector3.TryParse(kvp["HomeLookAt"].ToString(), out HomeLookAt);
74
75 } 58 }
76 59
77 public Dictionary<string, object> ToKeyValuePairs() 60 public Dictionary<string, object> ToKeyValuePairs()
@@ -79,14 +62,6 @@ namespace OpenSim.Services.Interfaces
79 Dictionary<string, object> result = new Dictionary<string, object>(); 62 Dictionary<string, object> result = new Dictionary<string, object>();
80 result["UserID"] = UserID; 63 result["UserID"] = UserID;
81 result["RegionID"] = RegionID.ToString(); 64 result["RegionID"] = RegionID.ToString();
82 result["online"] = Online.ToString();
83 result["login"] = Login.ToString();
84 result["logout"] = Logout.ToString();
85 result["position"] = Position.ToString();
86 result["lookAt"] = LookAt.ToString();
87 result["HomeRegionID"] = HomeRegionID.ToString();
88 result["HomePosition"] = HomePosition.ToString();
89 result["HomeLookAt"] = HomeLookAt.ToString();
90 65
91 return result; 66 return result;
92 } 67 }
@@ -115,11 +90,10 @@ namespace OpenSim.Services.Interfaces
115 public interface IPresenceService 90 public interface IPresenceService
116 { 91 {
117 bool LoginAgent(string userID, UUID sessionID, UUID secureSessionID); 92 bool LoginAgent(string userID, UUID sessionID, UUID secureSessionID);
118 bool LogoutAgent(UUID sessionID, Vector3 position, Vector3 lookAt); 93 bool LogoutAgent(UUID sessionID);
119 bool LogoutRegionAgents(UUID regionID); 94 bool LogoutRegionAgents(UUID regionID);
120 95
121 bool ReportAgent(UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt); 96 bool ReportAgent(UUID sessionID, UUID regionID);
122 bool SetHomeLocation(string userID, UUID regionID, Vector3 position, Vector3 lookAt);
123 97
124 PresenceInfo GetAgent(UUID sessionID); 98 PresenceInfo GetAgent(UUID sessionID);
125 PresenceInfo[] GetAgents(string[] userIDs); 99 PresenceInfo[] GetAgents(string[] userIDs);