// Kyoo - A portable and vast media library solution. // Copyright (c) Kyoo. // // See AUTHORS.md and LICENSE file in the project root for full license information. // // Kyoo is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // any later version. // // Kyoo is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Kyoo. If not, see . using System; using System.Linq.Expressions; using System.Threading.Tasks; using Kyoo.Abstractions.Models; namespace Kyoo.Abstractions.Controllers; /// /// A local repository to handle watched items /// public interface IWatchStatusRepository { // /// // /// The event handler type for all events of this repository. // /// // /// The resource created/modified/deleted // /// A representing the asynchronous operation. // public delegate Task ResourceEventHandler(T resource); /// /// Get the watch status of a movie /// /// The movie selector. /// The id of the user. /// The movie's status Task GetMovieStatus(Expression> where, int userId); /// /// Set the watch status of a movie /// /// The id of the movie. /// The id of the user. /// The new status. /// Where the user has stopped watching. Only usable if Status /// is /// The movie's status Task SetMovieStatus(int movieId, int userId, WatchStatus status, int? watchedTime); /// /// Get the watch status of a show. /// /// The show selector. /// The id of the user. /// The show's status Task GetShowStatus(Expression> where, int userId); /// /// Set the watch status of a show. /// /// The id of the movie. /// The id of the user. /// The new status. /// The shows's status Task SetShowStatus(int showId, int userId, WatchStatus status); /// /// Get the watch status of an episode. /// /// The episode selector. /// The id of the user. /// The episode's status Task GetEpisodeStatus(Expression> where, int userId); /// /// Set the watch status of an episode. /// /// The id of the episode. /// The id of the user. /// The new status. /// Where the user has stopped watching. Only usable if Status /// is /// The episode's status Task SetEpisodeStatus(int episodeId, int userId, WatchStatus status, int? watchedTime); }