using OrderCriterias; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ManagerInterfaces { /// /// All methods to handle lobbies /// /!\ all methods returns a task /// /// a DTO, Entity or Model lobby public interface ILobbyManager { /// /// get the number of lobbies /// /// the number of lobbies public int getNbLobbies(); /// /// add a lobby /// /// the lobby to add /// the lobby added public Task addLobby(T lobby); /// /// delete a lobby /// /// the lobby to remove /// /// the lobby deleted or /// null if there isn't any /// public Task removeLobby(T lobby); /// /// delete a lobby with an id /// /// the id of the lobby /// /// the lobby deleted that corresponde /// to the id or null if there isn't any /// public Task removeLobby(int id); /// /// get a part of all lobbies /// /// the actual page /// number of lobbies in a page /// the order criteria /// /// a set of the number of page and /// all lobbies in the database for /// the page nb (or null if the page /// does not exist (<=> (nb-1)*count outside /// boundaries (0, getNbElement()-1))) /// public Task<(int nbPages, IEnumerable? lobbies)> getLobbies(int nb, int count, LobbyOrderCriteria orderCriteria = LobbyOrderCriteria.ById); /// /// get a lobby with an id /// /// the id of the lobby /// /// the lobby that corresponde /// to the id or null if there isn't any /// public Task getLobby(int id); /// /// get a lobby with a name and a creator id /// /// name of the lobby /// the id of the creator of the lobby /// /// the lobby that corresponde /// to the id or null if there isn't any /// public Task getLobby(string name, int? idCreator); } }