using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
///
/// Define how to manage an user.
///
public interface IUserManager
{
///
/// Get the current connected user. Null if no user is connected.
///
User? CurrentConnected { get; }
///
/// Get the password manager used to hash passords.
///
IPasswordManager PasswordManager { get; }
///
/// Get a collection of all users in the data.
///
/// A collection of all user.
ICollection GetAllUsers();
///
/// Get an user by his email.
///
/// The user's mail.
/// The user corresponding to the mail.
User GetUserFromMail(string mail);
///
/// Create a new user. The mail and the password are required. Other can be null.
///
This function use the password manager to hash the plain text password.
///
/// The user's mail address.
/// The user's plain text password.
/// The user's name.
/// The user's surname.
/// The user's profile picture.
/// A new user.
User CreateUser(string mail, string password,
string? name = null, string? surname = null, string? profilePict = null);
///
///
///
///
///
bool AddUserToData(User user);
bool ModifyCurrentConnected(User newUser);
bool LogIn(string mail, string password);
void LogOut();
}
}