aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Interfaces
diff options
context:
space:
mode:
authorDiva Canto2009-12-27 20:34:42 -0800
committerDiva Canto2009-12-27 20:34:42 -0800
commit3ef513e863097bdccffa8c84283ab8ffc0915a8f (patch)
tree0e388f2a40f738b4f48e48d833d545b6eb70528b /OpenSim/Services/Interfaces
parentChanged GetAgents to take string[] instead of UUID[] (diff)
downloadopensim-SC_OLD-3ef513e863097bdccffa8c84283ab8ffc0915a8f.zip
opensim-SC_OLD-3ef513e863097bdccffa8c84283ab8ffc0915a8f.tar.gz
opensim-SC_OLD-3ef513e863097bdccffa8c84283ab8ffc0915a8f.tar.bz2
opensim-SC_OLD-3ef513e863097bdccffa8c84283ab8ffc0915a8f.tar.xz
Presence remote connector and handler. Presence HG Broker. Nothing tested, just compiles.
Diffstat (limited to 'OpenSim/Services/Interfaces')
-rw-r--r--OpenSim/Services/Interfaces/IPresenceService.cs39
1 files changed, 38 insertions, 1 deletions
diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs
index 1cda13c..56d8f15 100644
--- a/OpenSim/Services/Interfaces/IPresenceService.cs
+++ b/OpenSim/Services/Interfaces/IPresenceService.cs
@@ -41,6 +41,43 @@ namespace OpenSim.Services.Interfaces
41 public DateTime Logout; 41 public DateTime Logout;
42 public Vector3 Position; 42 public Vector3 Position;
43 public Vector3 LookAt; 43 public Vector3 LookAt;
44
45 public PresenceInfo()
46 {
47 }
48
49 public PresenceInfo(Dictionary<string, object> kvp)
50 {
51 if (kvp.ContainsKey("PrincipalID"))
52 UUID.TryParse(kvp["PrincipalID"].ToString(), out PrincipalID);
53 if (kvp.ContainsKey("RegionID"))
54 UUID.TryParse(kvp["RegionID"].ToString(), out RegionID);
55 if (kvp.ContainsKey("login"))
56 DateTime.TryParse(kvp["login"].ToString(), out Login);
57 if (kvp.ContainsKey("logout"))
58 DateTime.TryParse(kvp["logout"].ToString(), out Logout);
59 if (kvp.ContainsKey("lookAt"))
60 Vector3.TryParse(kvp["lookAt"].ToString(), out LookAt);
61 if (kvp.ContainsKey("online"))
62 Boolean.TryParse(kvp["online"].ToString(), out Online);
63 if (kvp.ContainsKey("position"))
64 Vector3.TryParse(kvp["position"].ToString(), out Position);
65
66 }
67
68 public Dictionary<string, object> ToKeyValuePairs()
69 {
70 Dictionary<string, object> result = new Dictionary<string, object>();
71 result["PrincipalID"] = PrincipalID.ToString();
72 result["RegionID"] = RegionID.ToString();
73 result["online"] = Online.ToString();
74 result["login"] = Login.ToString();
75 result["logout"] = Logout.ToString();
76 result["position"] = Position.ToString();
77 result["lookAt"] = LookAt.ToString();
78
79 return result;
80 }
44 } 81 }
45 82
46 public interface IPresenceService 83 public interface IPresenceService
@@ -52,6 +89,6 @@ namespace OpenSim.Services.Interfaces
52 bool ReportAgent(UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt); 89 bool ReportAgent(UUID sessionID, UUID regionID, Vector3 position, Vector3 lookAt);
53 90
54 PresenceInfo GetAgent(UUID sessionID); 91 PresenceInfo GetAgent(UUID sessionID);
55 PresenceInfo[] GetAgents(string[] principalIDs); 92 PresenceInfo[] GetAgents(string[] userIDs);
56 } 93 }
57} 94}