diff options
| author | JP Dillingham <jp@dillingham.me> | 2023-12-31 16:45:44 -0600 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2023-12-31 16:45:44 -0600 |
| commit | b42d1fea954ebc93ecd5a8451db469af1cc76795 (patch) | |
| tree | 6eafea9da08a5209cbd1c59c1579ce2e5777246a /src/slskd/Users/IUserService.cs | |
| parent | e01ead54fab085b8cf8d6f4bf92592a57b6b2d65 (diff) | |
| download | slskd-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.cs | 21 |
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> |
