#nullable disable
#pragma warning disable CS1591
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Jellyfin.Data.Entities;
using Jellyfin.Data.Events;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Users;
namespace MediaBrowser.Controller.Library
{
///
/// Interface IUserManager.
///
public interface IUserManager
{
///
/// Occurs when a user is updated.
///
event EventHandler> OnUserUpdated;
///
/// Gets the users.
///
/// The users.
IEnumerable Users { get; }
///
/// Gets the user ids.
///
/// The users ids.
IEnumerable UsersIds { get; }
///
/// Initializes the user manager and ensures that a user exists.
///
/// Awaitable task.
Task InitializeAsync();
///
/// Gets a user by Id.
///
/// The id.
/// The user with the specified Id, or null if the user doesn't exist.
/// id is an empty Guid.
User GetUserById(Guid id);
///
/// Gets the name of the user by.
///
/// The name.
/// User.
User GetUserByName(string name);
///
/// Renames the user.
///
/// The user.
/// The new name.
/// Task.
/// If user is null.
/// If the provided user doesn't exist.
Task RenameUser(User user, string newName);
///
/// Updates the user.
///
/// The user.
/// If user is null.
/// If the provided user doesn't exist.
void UpdateUser(User user);
///
/// Updates the user.
///
/// The user.
/// If user is null.
/// If the provided user doesn't exist.
/// A task representing the update of the user.
Task UpdateUserAsync(User user);
///
/// Creates a user with the specified name.
///
/// The name of the new user.
/// The created user.
/// is null or empty.
/// already exists.
Task CreateUserAsync(string name);
///
/// Deletes the specified user.
///
/// The id of the user to be deleted.
/// A task representing the deletion of the user.
Task DeleteUserAsync(Guid userId);
///
/// Resets the password.
///
/// The user.
/// Task.
Task ResetPassword(User user);
///
/// Resets the easy password.
///
/// The user.
void ResetEasyPassword(User user);
///
/// Changes the password.
///
/// The user.
/// New password to use.
/// Awaitable task.
Task ChangePassword(User user, string newPassword);
///
/// Changes the easy password.
///
/// The user.
/// New password to use.
/// Hash of new password.
void ChangeEasyPassword(User user, string newPassword, string newPasswordSha1);
///
/// Gets the user dto.
///
/// The user.
/// The remote end point.
/// UserDto.
UserDto GetUserDto(User user, string remoteEndPoint = null);
///
/// Authenticates the user.
///
/// The user.
/// The password to use.
/// Hash of password.
/// Remove endpoint to use.
/// Specifies if a user session.
/// User wrapped in awaitable task.
Task AuthenticateUser(string username, string password, string passwordSha1, string remoteEndPoint, bool isUserSession);
///
/// Starts the forgot password process.
///
/// The entered username.
/// if set to true [is in network].
/// ForgotPasswordResult.
Task StartForgotPasswordProcess(string enteredUsername, bool isInNetwork);
///
/// Redeems the password reset pin.
///
/// The pin.
/// true if XXXX, false otherwise.
Task RedeemPasswordResetPin(string pin);
NameIdPair[] GetAuthenticationProviders();
NameIdPair[] GetPasswordResetProviders();
///
/// This method updates the user's configuration.
/// This is only included as a stopgap until the new API, using this internally is not recommended.
/// Instead, modify the user object directly, then call .
///
/// The user's Id.
/// The request containing the new user configuration.
/// A task representing the update.
Task UpdateConfigurationAsync(Guid userId, UserConfiguration config);
///
/// This method updates the user's policy.
/// This is only included as a stopgap until the new API, using this internally is not recommended.
/// Instead, modify the user object directly, then call .
///
/// The user's Id.
/// The request containing the new user policy.
/// A task representing the update.
Task UpdatePolicyAsync(Guid userId, UserPolicy policy);
///
/// Clears the user's profile image.
///
/// The user.
/// A task representing the clearing of the profile image.
Task ClearProfileImageAsync(User user);
}
}