aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Users/IUserService.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2023-12-31 16:45:44 -0600
committerJP Dillingham <jp@dillingham.me>2023-12-31 16:45:44 -0600
commitb42d1fea954ebc93ecd5a8451db469af1cc76795 (patch)
tree6eafea9da08a5209cbd1c59c1579ce2e5777246a /src/slskd/Users/IUserService.cs
parente01ead54fab085b8cf8d6f4bf92592a57b6b2d65 (diff)
downloadslskd-b42d1fea954ebc93ecd5a8451db469af1cc76795.tar.gz
rename GetGroup to ResolveGroup, allow stats and status to be passed in
Diffstat (limited to 'src/slskd/Users/IUserService.cs')
-rw-r--r--src/slskd/Users/IUserService.cs21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/slskd/Users/IUserService.cs b/src/slskd/Users/IUserService.cs
index 88090f9f..885b00e5 100644
--- a/src/slskd/Users/IUserService.cs
+++ b/src/slskd/Users/IUserService.cs
@@ -37,13 +37,6 @@ namespace slskd.Users
IReadOnlyList<string> WatchedUsernames { get; }
/// <summary>
- /// Gets the name of the group for the specified <paramref name="username"/>.
- /// </summary>
- /// <param name="username">The username of the peer.</param>
- /// <returns>The group for the specified username.</returns>
- string GetGroup(string username);
-
- /// <summary>
/// Retrieves peer <see cref="Info"/>.
/// </summary>
/// <param name="username">The username of the peer.</param>
@@ -87,6 +80,20 @@ namespace slskd.Users
bool IsWatched(string username);
/// <summary>
+ /// Resolves the name of the group for the specified <paramref name="username"/>.
+ /// </summary>
+ /// <remarks>
+ /// If the user is watched, and therefore the application is tracking their status and statistics, leech and privilege
+ /// detection works as expected. If the user is not watched, their status and statistics can be specified. If the user
+ /// is neither watched nor status and statistics are supplied, leech and privilege detection will not work.
+ /// </remarks>
+ /// <param name="username">The username of the peer.</param>
+ /// <param name="status">The optional status for the user.</param>
+ /// <param name="statistics">The optional statistics for the user.</param>
+ /// <returns>The group for the specified username.</returns>
+ string ResolveGroup(string username, Status status = null, Statistics statistics = null);
+
+ /// <summary>
/// Adds the specified username to the server-side user list.
/// </summary>
/// <param name="username">The username of the peer.</param>