From da2b23f18d232230ac4d967f8d3b256aebd4741e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 20 Oct 2012 02:02:13 +0100 Subject: Improve efficiency of friends notification by only make one PresenceService call for all friends rather than one for each friend. However, large groups could still take a very long time since we still need to message each avatar on different simulators. --- OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs | 4 ++-- OpenSim/Services/HypergridService/HGFriendsService.cs | 2 +- OpenSim/Services/HypergridService/UserAgentService.cs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs index e235733..6d5ce4b 100644 --- a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs +++ b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs @@ -128,7 +128,7 @@ namespace OpenSim.Services.Connectors.Friends return Call(region, sendData); } - public bool StatusNotify(GridRegion region, UUID userID, UUID friendID, bool online) + public bool StatusNotify(GridRegion region, UUID userID, string friendID, bool online) { Dictionary sendData = new Dictionary(); //sendData["VERSIONMIN"] = ProtocolVersions.ClientProtocolVersionMin.ToString(); @@ -136,7 +136,7 @@ namespace OpenSim.Services.Connectors.Friends sendData["METHOD"] = "status"; sendData["FromID"] = userID.ToString(); - sendData["ToID"] = friendID.ToString(); + sendData["ToID"] = friendID; sendData["Online"] = online.ToString(); return Call(region, sendData); diff --git a/OpenSim/Services/HypergridService/HGFriendsService.cs b/OpenSim/Services/HypergridService/HGFriendsService.cs index 98423d7..a8bcfb2 100644 --- a/OpenSim/Services/HypergridService/HGFriendsService.cs +++ b/OpenSim/Services/HypergridService/HGFriendsService.cs @@ -397,7 +397,7 @@ namespace OpenSim.Services.HypergridService if (region != null) { m_log.DebugFormat("[HGFRIENDS SERVICE]: Remote Notify to region {0}, user {1} is {2}", region.RegionName, foreignUserID, (online ? "online" : "offline")); - m_FriendsSimConnector.StatusNotify(region, foreignUserID, userID, online); + m_FriendsSimConnector.StatusNotify(region, foreignUserID, userID.ToString(), online); } } } diff --git a/OpenSim/Services/HypergridService/UserAgentService.cs b/OpenSim/Services/HypergridService/UserAgentService.cs index a6fc731..a26a922 100644 --- a/OpenSim/Services/HypergridService/UserAgentService.cs +++ b/OpenSim/Services/HypergridService/UserAgentService.cs @@ -504,7 +504,7 @@ namespace OpenSim.Services.HypergridService if (region != null) { m_log.DebugFormat("[USER AGENT SERVICE]: Remote Notify to region {0}, user {1} is {2}", region.RegionName, foreignUserID, (online ? "online" : "offline")); - m_FriendsSimConnector.StatusNotify(region, foreignUserID, userID, online); + m_FriendsSimConnector.StatusNotify(region, foreignUserID, userID.ToString(), online); } } } -- cgit v1.1 From ac037dfe210f416e6355bd7c1210f25d6cb90f63 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 20 Oct 2012 02:26:08 +0100 Subject: Add method doc for IPresenceService --- OpenSim/Services/Interfaces/IPresenceService.cs | 38 ++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/Interfaces/IPresenceService.cs b/OpenSim/Services/Interfaces/IPresenceService.cs index 8d583ff..90f9842 100644 --- a/OpenSim/Services/Interfaces/IPresenceService.cs +++ b/OpenSim/Services/Interfaces/IPresenceService.cs @@ -61,13 +61,49 @@ namespace OpenSim.Services.Interfaces public interface IPresenceService { + /// + /// Store session information. + /// + /// /returns> + /// + /// + /// bool LoginAgent(string userID, UUID sessionID, UUID secureSessionID); + + /// + /// Remove session information. + /// + /// + /// bool LogoutAgent(UUID sessionID); + + /// + /// Remove session information for all agents in the given region. + /// + /// + /// bool LogoutRegionAgents(UUID regionID); + /// + /// Update data for an existing session. + /// + /// + /// + /// bool ReportAgent(UUID sessionID, UUID regionID); + /// + /// Get session information for a given session ID. + /// + /// + /// PresenceInfo GetAgent(UUID sessionID); + + /// + /// Get session information for a collection of users. + /// + /// Session information for the users. + /// PresenceInfo[] GetAgents(string[] userIDs); } -} +} \ No newline at end of file -- cgit v1.1