aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Users/IUserService.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2024-01-01 18:43:18 -0600
committerJP Dillingham <jp@dillingham.me>2024-01-01 18:43:18 -0600
commit1cd4b10a25052e4e82c1f86a9bc92f06f5605114 (patch)
tree2ef809c949945e44de0df0e914134a34ebb06a16 /src/slskd/Users/IUserService.cs
parentd409b1e3e371cfe8fd1e59e9ad53b0f7e4edafca (diff)
downloadslskd-1cd4b10a25052e4e82c1f86a9bc92f06f5605114.tar.gz
wip
Diffstat (limited to 'src/slskd/Users/IUserService.cs')
-rw-r--r--src/slskd/Users/IUserService.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/slskd/Users/IUserService.cs b/src/slskd/Users/IUserService.cs
index 88090f9f..04ef1527 100644
--- a/src/slskd/Users/IUserService.cs
+++ b/src/slskd/Users/IUserService.cs
@@ -39,11 +39,28 @@ namespace slskd.Users
/// <summary>
/// Gets the name of the group for the specified <paramref name="username"/>.
/// </summary>
+ /// <remarks>
+ /// The group name is fetched from cached data, and lookups should always be fast.
+ /// </remarks>
/// <param name="username">The username of the peer.</param>
/// <returns>The group for the specified username.</returns>
string GetGroup(string username);
/// <summary>
+ /// Gets the name of the group for the specified <paramref name="username"/>.
+ /// </summary>
+ /// <remarks>
+ /// An alternative to <see cref="GetGroup(string)"/> that does not rely on the
+ /// internal cache. This method allows privilege and leech detection for users
+ /// that are not watched.
+ /// </remarks>
+ /// <param name="username">The username of the peer.</param>
+ /// <param name="status">The peer's status.</param>
+ /// <param name="statistics">The peer's statistics</param>
+ /// <returns>The group for the specified username.</returns>
+ string GetGroup(string username, Status status, Statistics statistics);
+
+ /// <summary>
/// Retrieves peer <see cref="Info"/>.
/// </summary>
/// <param name="username">The username of the peer.</param>